From 37c307087cb50efa9eb3e1f3a22a356024aa43b5 Mon Sep 17 00:00:00 2001 From: liurunze <1414556676@qq.com> Date: Sat, 25 Jul 2020 01:36:01 +0800 Subject: [PATCH] refactor(all project): modular,Document promotion,Some bugs 1. Modularization, use es6, split files 2. Add English documents,enriched parameter description 3. add allowEdit 4. Delete row, insert row,hidden row 5. some bugs BREAKING CHANGE: File name change fix #11, fix #2 --- LICENSE | 21 + README-zh.md | 111 + README.md | 115 +- commitlint.config.js | 3 + deploy_demo.bat | 6 - docs/.vuepress/config.js | 110 +- docs/README.md | 16 +- docs/guide/README.md | 164 +- docs/guide/config.md | 230 +- docs/guide/data.md | 722 +- docs/guide/feature.md | 117 +- docs/guide/format.md | 200 +- docs/guide/operate.md | 412 +- docs/zh/README.md | 15 + docs/zh/guide/README.md | 145 + docs/zh/guide/config.md | 214 + docs/zh/guide/data.md | 745 + docs/zh/guide/feature.md | 124 + docs/zh/guide/format.md | 214 + docs/zh/guide/operate.md | 621 + gulpfile.js | 272 +- index.html | 70 + package.json | 29 +- src/chartMix.css | 22 - src/config.js | 55 + src/controllers/alternateformat.js | 1214 + src/controllers/conditionformat.js | 3658 + src/controllers/constant.js | 1287 + src/controllers/controlHistory.js | 550 + src/controllers/dropCell.js | 2683 + src/controllers/expendPlugins.js | 19 + src/controllers/filter.js | 271 + src/controllers/freezen.js | 1476 + src/controllers/handler.js | 10045 ++ src/controllers/ifFormulaGenerator.js | 545 + src/controllers/insertFormula.js | 467 + src/controllers/locationCell.js | 489 + src/controllers/luckysheetConfigsetting.js | 34 + src/controllers/menuButton.js | 4467 + src/controllers/mobile.js | 178 + src/controllers/moreFormat.js | 1217 + src/controllers/pivotTable.js | 3094 + src/controllers/postil.js | 833 + src/controllers/resize.js | 170 + src/controllers/searchReplace.js | 741 + src/controllers/select.js | 399 + src/controllers/selection.js | 1739 + src/controllers/server.js | 1072 + src/controllers/sheetMove.js | 1991 + src/controllers/sheetSearch.js | 80 + src/controllers/sheetmanage.js | 1507 + src/controllers/sparkline.js | 2254 + src/controllers/splitColumn.js | 315 + src/controllers/updateCell.js | 115 + src/core.js | 141 + src/css/luckysheet-core.css | 241 +- src/data/chartJson.js | 605 + src/demoData/sheetCell.js | 5599 + src/demoData/sheetComment.js | 80 + src/demoData/sheetConditionFormat.js | 6553 + src/demoData/sheetFormula.js | 6613 + src/demoData/sheetPivotTable.js | 202 + src/demoData/sheetPivotTableData.js | 754 + src/demoData/sheetSparkline.js | 7079 + src/demoData/sheetTable.js | 1081 + src/expendPlugins/chart/chartmix.common.0.js | 1034 + .../chart/chartmix.common.0.js.map | 1 + src/expendPlugins/chart/chartmix.common.1.js | 161 + .../chart/chartmix.common.1.js.map | 1 + src/expendPlugins/chart/chartmix.common.10.js | 91 + .../chart/chartmix.common.10.js.map | 1 + src/expendPlugins/chart/chartmix.common.11.js | 82 + .../chart/chartmix.common.11.js.map | 1 + src/expendPlugins/chart/chartmix.common.12.js | 82 + .../chart/chartmix.common.12.js.map | 1 + src/expendPlugins/chart/chartmix.common.2.js | 212 + .../chart/chartmix.common.2.js.map | 1 + src/expendPlugins/chart/chartmix.common.3.js | 476 + .../chart/chartmix.common.3.js.map | 1 + src/expendPlugins/chart/chartmix.common.4.js | 299 + .../chart/chartmix.common.4.js.map | 1 + src/expendPlugins/chart/chartmix.common.5.js | 243 + .../chart/chartmix.common.5.js.map | 1 + src/expendPlugins/chart/chartmix.common.6.js | 208 + .../chart/chartmix.common.6.js.map | 1 + src/expendPlugins/chart/chartmix.common.7.js | 218 + .../chart/chartmix.common.7.js.map | 1 + src/expendPlugins/chart/chartmix.common.8.js | 83 + .../chart/chartmix.common.8.js.map | 1 + src/expendPlugins/chart/chartmix.common.9.js | 92 + .../chart/chartmix.common.9.js.map | 1 + src/expendPlugins/chart/chartmix.common.js | 134858 ++++++++++++++ .../chart/chartmix.common.js.map | 1 + src/expendPlugins/chart/chartmix.css | 1 + src/expendPlugins/chart/chartmix.umd.0.js | 1034 + src/expendPlugins/chart/chartmix.umd.0.js.map | 1 + src/expendPlugins/chart/chartmix.umd.1.js | 161 + src/expendPlugins/chart/chartmix.umd.1.js.map | 1 + src/expendPlugins/chart/chartmix.umd.10.js | 91 + .../chart/chartmix.umd.10.js.map | 1 + src/expendPlugins/chart/chartmix.umd.11.js | 82 + .../chart/chartmix.umd.11.js.map | 1 + src/expendPlugins/chart/chartmix.umd.12.js | 82 + .../chart/chartmix.umd.12.js.map | 1 + src/expendPlugins/chart/chartmix.umd.2.js | 212 + src/expendPlugins/chart/chartmix.umd.2.js.map | 1 + src/expendPlugins/chart/chartmix.umd.3.js | 476 + src/expendPlugins/chart/chartmix.umd.3.js.map | 1 + src/expendPlugins/chart/chartmix.umd.4.js | 299 + src/expendPlugins/chart/chartmix.umd.4.js.map | 1 + src/expendPlugins/chart/chartmix.umd.5.js | 243 + src/expendPlugins/chart/chartmix.umd.5.js.map | 1 + src/expendPlugins/chart/chartmix.umd.6.js | 208 + src/expendPlugins/chart/chartmix.umd.6.js.map | 1 + src/expendPlugins/chart/chartmix.umd.7.js | 218 + src/expendPlugins/chart/chartmix.umd.7.js.map | 1 + src/expendPlugins/chart/chartmix.umd.8.js | 83 + src/expendPlugins/chart/chartmix.umd.8.js.map | 1 + src/expendPlugins/chart/chartmix.umd.9.js | 92 + src/expendPlugins/chart/chartmix.umd.9.js.map | 1 + src/expendPlugins/chart/chartmix.umd.js | 134868 +++++++++++++++ src/expendPlugins/chart/chartmix.umd.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.0.js | 8 + .../chart/chartmix.umd.min.0.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.1.js | 2 + .../chart/chartmix.umd.min.1.js.map | 1 + .../chart/chartmix.umd.min.10.js | 2 + .../chart/chartmix.umd.min.10.js.map | 1 + .../chart/chartmix.umd.min.11.js | 2 + .../chart/chartmix.umd.min.11.js.map | 1 + .../chart/chartmix.umd.min.12.js | 2 + .../chart/chartmix.umd.min.12.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.2.js | 2 + .../chart/chartmix.umd.min.2.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.3.js | 2 + .../chart/chartmix.umd.min.3.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.4.js | 2 + .../chart/chartmix.umd.min.4.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.5.js | 2 + .../chart/chartmix.umd.min.5.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.6.js | 2 + .../chart/chartmix.umd.min.6.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.7.js | 2 + .../chart/chartmix.umd.min.7.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.8.js | 2 + .../chart/chartmix.umd.min.8.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.9.js | 2 + .../chart/chartmix.umd.min.9.js.map | 1 + src/expendPlugins/chart/chartmix.umd.min.js | 16 + .../chart/chartmix.umd.min.js.map | 1 + src/expendPlugins/chart/css/1.68a757d2.css | 1 + src/expendPlugins/chart/css/2.68a757d2.css | 1 + src/expendPlugins/chart/demo.html | 10 + src/expendPlugins/chart/plugin.js | 48 + src/function/func.js | 1779 + src/function/functionImplementation.js | 27370 +++ src/function/functionlist.js | 9049 + src/function/luckysheet_function.js | 12 + src/function/matrix_methods.js | 340 + src/global/analysis.js | 38 + src/global/array.js | 67 + src/global/border.js | 1034 + src/global/browser.js | 131 + src/global/cleargridelement.js | 34 + src/global/count.js | 72 + src/global/createdom.js | 108 + src/global/createsheet.js | 56 + src/global/cursorPos.js | 51 + src/global/datecontroll.js | 87 + src/global/draw.js | 2451 + src/global/dynamicArray.js | 138 + src/global/editor.js | 162 + src/global/extend.js | 1488 + src/global/format.js | 1935 + src/global/formula.js | 4549 + src/global/func_methods.js | 675 + src/global/getRowlen.js | 171 + src/global/getdata.js | 221 + src/global/json.js | 33 + src/global/loading.js | 7 + src/global/location.js | 73 + src/global/method.js | 185 + src/global/refresh.js | 953 + src/global/rhchInit.js | 75 + src/global/scroll.js | 86 + src/global/setdata.js | 216 + src/global/sort.js | 371 + src/global/tooltip.js | 304 + src/global/validate.js | 198 + src/index.html | 68 +- src/index.js | 11 + src/locale/en.js | 660 + src/locale/locale.js | 14 + src/locale/zh.js | 667 + src/luckysheet-chart.js | 1102 - src/luckysheet-core.js | 54560 ------ src/luckysheet-function.js | 43053 ----- src/methods/get.js | 77 + src/methods/set.js | 47 + src/plugins/images/mario.jpg | Bin 66065 -> 0 bytes src/plugins/images/timg.jpg | Bin 33749 -> 0 bytes .../images/world.topo.bathy.200401.jpg | Bin 599466 -> 0 bytes src/plugins/js/jquery-ui.min.js | 2 +- src/store/index.js | 90 + src/utils/chartUtil.js | 92 + src/utils/math.js | 158 + src/utils/polyfill.js | 46 + src/utils/util.js | 642 + 208 files changed, 409271 insertions(+), 99587 deletions(-) create mode 100644 LICENSE create mode 100644 README-zh.md create mode 100644 commitlint.config.js delete mode 100644 deploy_demo.bat create mode 100644 docs/zh/README.md create mode 100644 docs/zh/guide/README.md create mode 100644 docs/zh/guide/config.md create mode 100644 docs/zh/guide/data.md create mode 100644 docs/zh/guide/feature.md create mode 100644 docs/zh/guide/format.md create mode 100644 docs/zh/guide/operate.md create mode 100644 index.html delete mode 100644 src/chartMix.css create mode 100644 src/config.js create mode 100644 src/controllers/alternateformat.js create mode 100644 src/controllers/conditionformat.js create mode 100644 src/controllers/constant.js create mode 100644 src/controllers/controlHistory.js create mode 100644 src/controllers/dropCell.js create mode 100644 src/controllers/expendPlugins.js create mode 100644 src/controllers/filter.js create mode 100644 src/controllers/freezen.js create mode 100644 src/controllers/handler.js create mode 100644 src/controllers/ifFormulaGenerator.js create mode 100644 src/controllers/insertFormula.js create mode 100644 src/controllers/locationCell.js create mode 100644 src/controllers/luckysheetConfigsetting.js create mode 100644 src/controllers/menuButton.js create mode 100644 src/controllers/mobile.js create mode 100644 src/controllers/moreFormat.js create mode 100644 src/controllers/pivotTable.js create mode 100644 src/controllers/postil.js create mode 100644 src/controllers/resize.js create mode 100644 src/controllers/searchReplace.js create mode 100644 src/controllers/select.js create mode 100644 src/controllers/selection.js create mode 100644 src/controllers/server.js create mode 100644 src/controllers/sheetMove.js create mode 100644 src/controllers/sheetSearch.js create mode 100644 src/controllers/sheetmanage.js create mode 100644 src/controllers/sparkline.js create mode 100644 src/controllers/splitColumn.js create mode 100644 src/controllers/updateCell.js create mode 100644 src/core.js create mode 100644 src/data/chartJson.js create mode 100644 src/demoData/sheetCell.js create mode 100644 src/demoData/sheetComment.js create mode 100644 src/demoData/sheetConditionFormat.js create mode 100644 src/demoData/sheetFormula.js create mode 100644 src/demoData/sheetPivotTable.js create mode 100644 src/demoData/sheetPivotTableData.js create mode 100644 src/demoData/sheetSparkline.js create mode 100644 src/demoData/sheetTable.js create mode 100644 src/expendPlugins/chart/chartmix.common.0.js create mode 100644 src/expendPlugins/chart/chartmix.common.0.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.1.js create mode 100644 src/expendPlugins/chart/chartmix.common.1.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.10.js create mode 100644 src/expendPlugins/chart/chartmix.common.10.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.11.js create mode 100644 src/expendPlugins/chart/chartmix.common.11.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.12.js create mode 100644 src/expendPlugins/chart/chartmix.common.12.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.2.js create mode 100644 src/expendPlugins/chart/chartmix.common.2.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.3.js create mode 100644 src/expendPlugins/chart/chartmix.common.3.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.4.js create mode 100644 src/expendPlugins/chart/chartmix.common.4.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.5.js create mode 100644 src/expendPlugins/chart/chartmix.common.5.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.6.js create mode 100644 src/expendPlugins/chart/chartmix.common.6.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.7.js create mode 100644 src/expendPlugins/chart/chartmix.common.7.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.8.js create mode 100644 src/expendPlugins/chart/chartmix.common.8.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.9.js create mode 100644 src/expendPlugins/chart/chartmix.common.9.js.map create mode 100644 src/expendPlugins/chart/chartmix.common.js create mode 100644 src/expendPlugins/chart/chartmix.common.js.map create mode 100644 src/expendPlugins/chart/chartmix.css create mode 100644 src/expendPlugins/chart/chartmix.umd.0.js create mode 100644 src/expendPlugins/chart/chartmix.umd.0.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.1.js create mode 100644 src/expendPlugins/chart/chartmix.umd.1.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.10.js create mode 100644 src/expendPlugins/chart/chartmix.umd.10.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.11.js create mode 100644 src/expendPlugins/chart/chartmix.umd.11.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.12.js create mode 100644 src/expendPlugins/chart/chartmix.umd.12.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.2.js create mode 100644 src/expendPlugins/chart/chartmix.umd.2.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.3.js create mode 100644 src/expendPlugins/chart/chartmix.umd.3.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.4.js create mode 100644 src/expendPlugins/chart/chartmix.umd.4.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.5.js create mode 100644 src/expendPlugins/chart/chartmix.umd.5.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.6.js create mode 100644 src/expendPlugins/chart/chartmix.umd.6.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.7.js create mode 100644 src/expendPlugins/chart/chartmix.umd.7.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.8.js create mode 100644 src/expendPlugins/chart/chartmix.umd.8.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.9.js create mode 100644 src/expendPlugins/chart/chartmix.umd.9.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.js create mode 100644 src/expendPlugins/chart/chartmix.umd.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.0.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.0.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.1.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.1.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.10.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.10.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.11.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.11.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.12.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.12.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.2.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.2.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.3.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.3.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.4.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.4.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.5.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.5.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.6.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.6.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.7.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.7.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.8.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.8.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.9.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.9.js.map create mode 100644 src/expendPlugins/chart/chartmix.umd.min.js create mode 100644 src/expendPlugins/chart/chartmix.umd.min.js.map create mode 100644 src/expendPlugins/chart/css/1.68a757d2.css create mode 100644 src/expendPlugins/chart/css/2.68a757d2.css create mode 100644 src/expendPlugins/chart/demo.html create mode 100644 src/expendPlugins/chart/plugin.js create mode 100644 src/function/func.js create mode 100644 src/function/functionImplementation.js create mode 100644 src/function/functionlist.js create mode 100644 src/function/luckysheet_function.js create mode 100644 src/function/matrix_methods.js create mode 100644 src/global/analysis.js create mode 100644 src/global/array.js create mode 100644 src/global/border.js create mode 100644 src/global/browser.js create mode 100644 src/global/cleargridelement.js create mode 100644 src/global/count.js create mode 100644 src/global/createdom.js create mode 100644 src/global/createsheet.js create mode 100644 src/global/cursorPos.js create mode 100644 src/global/datecontroll.js create mode 100644 src/global/draw.js create mode 100644 src/global/dynamicArray.js create mode 100644 src/global/editor.js create mode 100644 src/global/extend.js create mode 100644 src/global/format.js create mode 100644 src/global/formula.js create mode 100644 src/global/func_methods.js create mode 100644 src/global/getRowlen.js create mode 100644 src/global/getdata.js create mode 100644 src/global/json.js create mode 100644 src/global/loading.js create mode 100644 src/global/location.js create mode 100644 src/global/method.js create mode 100644 src/global/refresh.js create mode 100644 src/global/rhchInit.js create mode 100644 src/global/scroll.js create mode 100644 src/global/setdata.js create mode 100644 src/global/sort.js create mode 100644 src/global/tooltip.js create mode 100644 src/global/validate.js create mode 100644 src/index.js create mode 100644 src/locale/en.js create mode 100644 src/locale/locale.js create mode 100644 src/locale/zh.js delete mode 100644 src/luckysheet-chart.js delete mode 100644 src/luckysheet-core.js delete mode 100644 src/luckysheet-function.js create mode 100644 src/methods/get.js create mode 100644 src/methods/set.js delete mode 100644 src/plugins/images/mario.jpg delete mode 100644 src/plugins/images/timg.jpg delete mode 100644 src/plugins/images/world.topo.bathy.200401.jpg create mode 100644 src/store/index.js create mode 100644 src/utils/chartUtil.js create mode 100644 src/utils/math.js create mode 100644 src/utils/polyfill.js create mode 100644 src/utils/util.js diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..d17c8fab0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020-present, Mengshukeji + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README-zh.md b/README-zh.md new file mode 100644 index 000000000..7b07c1638 --- /dev/null +++ b/README-zh.md @@ -0,0 +1,111 @@ +# Luckysheet +简体中文 | [English](./README.md) + +## 介绍 +Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 + +## 特性 +1. Luckysheet支持表格设置包括冻结行列、合并单元格、筛选、排序、查询、条件格式、批注 +2. 支持数据分析功能包括透视表、图表、分列、矩阵操作、内置385个计算函数 +3. 支持一键截图、复制为json数据、共享编辑、excel与Luckysheet之间数据的复制粘贴 +4. 支持移动端查看 +5. 支持sparkLine +6. 下拉复制 +7. 快捷键 + +![演示](https://minio.cnbabylon.com/public/luckysheet/LuckysheetDemo.gif) + +## 计划 +- 完善图表插件 +- 插入图片 +- 数据验证(复选框、下拉列表) +- 打印 +- 单元格分段样式 +- 树形菜单 +- 表格功能:筛选,切片 +- excel导入/导出 +- 更多... + +## 文档 +[在线demo](https://mengshukeji.github.io/LuckysheetDemo/) + +[在线文档](https://mengshukeji.github.io/LuckysheetDocs/) + +## 环境 +[Node.js](https://nodejs.org/en/) Version >= 6 + +## 安装 +``` +npm install +npm install gulp -g +``` + +## 开发 +开发 +``` +npm run dev +``` +打包 +``` +npm run build +``` +阅读 + +Luckysheet的核心代码为luckysheet-core.js和luckysheet-function.js,开发者看源码只需要看这两个文件即可,接下来会讨论进行模块化方案,完善这个插件. + +## 用法 + +#### 第一步 +`npm run build`后`dist`文件夹下的所有文件复制到项目目录 + +#### 第二步 +引入依赖 +``` + + + + + +``` +#### 第三步 +指定一个表格容器 +``` +
+``` +#### 第四步 +创建一个表格 +``` + +``` + +## 联系 +mengshu@office2.cn + +## 交流 + +- 添加小编微信,拉你进Luckysheet开发者交流微信群,备注:加群 + + 微信群 + +或者 + +- 加入Luckysheet开发者交流QQ群 + + 微信群 + +## 贡献者和感谢 +- [@wpxp123456](https://github.com/wpxp123456) +- [@Dushusir](https://github.com/Dushusir) + +## 版权信息 +[MIT](http://opensource.org/licenses/MIT) + +Copyright (c) 2020-present, mengshukeji diff --git a/README.md b/README.md index 7d1d58458..7db022077 100644 --- a/README.md +++ b/README.md @@ -1,103 +1,106 @@ # Luckysheet +[![Join the chat at https://gitter.im/mengshukeji/Luckysheet](https://badges.gitter.im/mengshukeji/Luckysheet.svg)](https://gitter.im/mengshukeji/Luckysheet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -## Introduction - 介绍 -Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 +English| [简体中文](./README-zh.md) -## Features - 特性 -1. Luckysheet支持表格设置包括冻结行列、合并单元格、筛选、排序、查询、条件格式、批注 -2. 支持数据分析功能包括透视表、图表、分列、矩阵操作、内置385个计算函数 -3. 支持一键截图、复制为json数据、共享编辑、excel与Luckysheet之间数据的复制粘贴 -4. 支持移动端查看 -5. 支持sparkLine -![演示](https://minio.cnbabylon.com/public/luckysheet/LuckysheetDemo.gif) +## Introduction +Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source. -## Plan - 计划 -- 模块化(进行中) -- excel导入/导出 -- 表单 -- 插入图片 -- 更多... -## Documentation - 文档 -[在线demo](https://mengshukeji.github.io/LuckysheetDemo/) +## Features +1. Support table settings including freezing columns, merging cells, filtering, sorting, querying, conditional formatting, and annotations +2. Support data analysis functions including pivottables, charts, columns, matrix operations, built-in 385 calculation functions +3. Support one-click screenshots, data copying as json,shared editing, and free data copying and pasting between excel and luckysheet +4. Support mobile viewing +5. Support sparkLine +6. Drop down copy +7. Keyboard shortcuts -[在线文档](https://mengshukeji.github.io/LuckysheetDocs/) +![Demo](https://minio.cnbabylon.com/public/luckysheet/LuckysheetDemo.gif) -## Requirements - 环境 +## Plan +- Improve chart plugin +- Insert picture +- Data validation (checkbox, drop-down list) +- Print +- Cell segmentation style +- Tree menu +- Table function: filter, slice +- Excel import/export +- More... + +## Documentation +[Online demo](https://mengshukeji.github.io/LuckysheetDemo/) + +[Online documentation](https://mengshukeji.github.io/LuckysheetDocs/en/) + +## Requirements [Node.js](https://nodejs.org/en/) Version >= 6 -## Installation - 安装 +## Installation ``` npm install npm install gulp -g ``` -## Development - 开发 -开发 +## Development +Development ``` npm run dev ``` -打包 +Package ``` npm run build ``` -阅读 +Read -Luckysheet的核心代码为luckysheet-core.js和luckysheet-function.js,开发者看源码只需要看这两个文件即可,接下来会讨论进行模块化方案,完善这个插件. +The core code of Luckysheet is luckysheet-core.js and luckysheet-function.js, developers only need to look at these two files to see the source code, and then we will discuss the modularization scheme and improve this library. -## Usage - 用法 +## Usage -#### 第一步 -npm run build后dist文件夹下的所有文件复制到项目目录 +#### First step +`npm run build`后`dist`文件夹下的所有文件复制到项目目录 -#### 第二步 -引入依赖 +#### Second step +Introduce dependencies ``` - - - - - + + + + + ``` -#### 第三步 -指定一个表格容器 +#### Third step +Specify a table container ```
``` -#### 第四步 -创建一个表格 +#### Fourth step +Create a table ``` ``` -## Contact - 联系 +## Contact mengshu@office2.cn -## communication - 交流 - -- 添加小编微信,拉你进Luckysheet开发者交流微信群,备注:加群 - - 微信群 - -或者 +## communication -- 加入Luckysheet开发者交流QQ群 - - 微信群 +- [Gitter](https://gitter.im/mengshukeji/Luckysheet) -## Authors and acknowledgment - 贡献者和感谢 -- Bug Pan ([@wpxp123456](https://github.com/wpxp123456)) -- Dushusir ([@Dushusir](https://github.com/Dushusir)) +## Authors and acknowledgment +- [@wpxp123456](https://github.com/wpxp123456) +- [@Dushusir](https://github.com/Dushusir) -## License - 版权信息 +## License [MIT](http://opensource.org/licenses/MIT) Copyright (c) 2020-present, mengshukeji diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..f3f3988d8 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ['@commitlint/config-conventional'] +} diff --git a/deploy_demo.bat b/deploy_demo.bat deleted file mode 100644 index 32b43207a..000000000 --- a/deploy_demo.bat +++ /dev/null @@ -1,6 +0,0 @@ -npm run build -cd dist -git init -git add -A -git commit -m 'deploy Luckysheet demo' -git push -f https://github.com/mengshukeji/LuckysheetDemo.git master:gh-pages \ No newline at end of file diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 0b00af84d..75e9f095b 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,34 +1,96 @@ module.exports = { - title: 'Luckysheet文档', - description: 'Luckysheet 配置文档/API/教程', base: '/LuckysheetDocs/', + locales: { + // 键名是该语言所属的子路径 + // 作为特例,默认语言可以使用 '/' 作为其路径。 + '/': { + lang: 'en-US', // 将会被设置为 的 lang 属性 + title: 'Luckysheet Document', + description: 'Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.This site contains official configuration document, API, and tutorial.' + }, + '/zh/': { + lang: 'zh-CN', + title: 'Luckysheet文档', + description: 'Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。本站包含官方配置文档,API,教程。' + }, + + }, themeConfig: { logo: '/img/logo.png', - // 页面滚动 - smoothScroll: true, - // 导航栏 - nav: [ - { text: '首页', link: '/' }, - { text: '指南', link: '/guide/' }, - { text: '演示', link: 'https://mengshukeji.github.io/LuckysheetDemo/' }, - { text: 'Github', link: 'https://github.com/mengshukeji/Luckysheet' }, - ], - // 侧边栏 - sidebar: { - '/guide/': [ - '', - 'config', - 'feature', - 'data', - 'operate', - 'format' - ], - }, + // 仓库地址 repo: 'mengshukeji/Luckysheet', - // 仓库链接文字 - repoLabel: '在 GitHub 上编辑此页', + // 允许编辑链接文字 + editLinks: true, // 仓库的文档目录 docsDir: 'docs', + // 页面滚动 + smoothScroll: true, + locales: { + '/': { + selectText: 'Languages', + label: 'English', + ariaLabel: 'Select language', + editLinkText: 'Edit this page on GitHub', + lastUpdated: 'Last Updated', + serviceWorker: { + updatePopup: { + message: "New content is available.", + buttonText: "Refresh" + } + }, + nav: [ + { text: 'Home', link: '/en/' }, + { text: 'Guide', link: '/en/guide/' }, + { text: 'Demo', link: 'https://mengshukeji.github.io/LuckysheetDemo/' } + ], + // 侧边栏 + sidebar: { + '/guide/': [ + '', + 'config', + 'feature', + 'data', + 'operate', + 'format' + ], + }, + }, + '/zh/': { + // 多语言下拉菜单的标题 + selectText: '选择语言', + // 该语言在下拉菜单中的标签 + label: '简体中文', + ariaLabel: '选择语言', + // 编辑链接文字 + editLinkText: '在 GitHub 上编辑此页', + lastUpdated: '上次更新', + // Service Worker 的配置 + serviceWorker: { + updatePopup: { + message: "发现新内容可用.", + buttonText: "刷新" + } + }, + // 导航栏 + nav: [ + { text: '首页', link: '/' }, + { text: '指南', link: '/guide/' }, + { text: '演示', link: 'https://mengshukeji.github.io/LuckysheetDemo/' } + ], + // 侧边栏 + sidebar: { + '/zh/guide/': [ + '', + 'config', + 'feature', + 'data', + 'operate', + 'format' + ], + }, + }, + + }, }, } \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 28ebb33ad..198825b98 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,15 +1,15 @@ --- home: true heroText: Luckysheet -tagline: Luckysheet 配置文档/API/教程 -actionText: 快速上手 → +tagline: Configuration Document · API · Tutorial +actionText: Get Started → actionLink: /guide/ features: -- title: 功能强大 - details: 包含大量常用电子表格功能,替代你的excel -- title: 配置简单 - details: 最少的配置就能开始上手使用 -- title: 完全开源 - details: 社区驱动,共同来完善你的想法 +- title: Powerful Features + details: Contains a large number of commonly used spreadsheet functions to replace your excel +- title: Simple Configuration + details: Get started with minimal configuration +- title: Open Source + details: Community driven, work together to improve your ideas footer: MIT Licensed | Copyright © 2020-present Mengshukeji --- \ No newline at end of file diff --git a/docs/guide/README.md b/docs/guide/README.md index a20628f9a..0c8f7537b 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -1,123 +1,145 @@ -# 快速上手 +# Get started -## 基本介绍 -Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 +## Introduction +Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source. -### 特性 -1. Luckysheet支持表格设置包括冻结行列、合并单元格、筛选、排序、查询、条件格式、批注 -2. 支持数据分析功能包括透视表、分列、矩阵操作、内置385个计算函数 -3. 支持一键截图、复制为json数据、共享编辑、excel与Luckysheet之间数据的复制粘贴 -4. 支持移动端查看 +### Features +1. Support table settings including freezing columns, merging cells, filtering, sorting, querying, conditional formatting, and annotations +2. Support data analysis functions including pivottables, charts, columns, matrix operations, built-in 385 calculation functions +3. Support one-click screenshots, data copying as json,shared editing, and free data copying and pasting between excel and luckysheet +4. Support mobile viewing +5. Support sparkLine +6. Drop down copy +7. keyboard shortcuts -![演示](https://minio.cnbabylon.com/public/luckysheet/LuckysheetDemo.gif) +![Demo](https://minio.cnbabylon.com/public/luckysheet/LuckysheetDemo.gif) ### Demo -[在线demo](https://mengshukeji.github.io/LuckysheetDemo/) +[Online demo](https://mengshukeji.github.io/LuckysheetDemo/) -## 开发模式 +## Development model -### 环境 +### Requirements [Node.js](https://nodejs.org/en/) Version >= 6 -### 安装 +### Installation ```shell npm install npm install gulp -g ``` -### 开发 +### Development ```shell npm run dev ``` -### 打包 +### Package ```shell npm run build ``` -## 使用步骤 +## Steps for usage -### 第一步 -npm run build后dist文件夹下的所有文件复制到项目目录 +### First step +After `npm run build`, all files in the `dist` folder are copied to the project directory -### 第二步 -引入依赖 +### Second step +Introduce dependencies ```html - - - - - + + + + + ``` -### 第三步 -指定一个表格容器 +### Third step +Specify a table container ```html
``` -### 第四步 -创建一个表格 +### Fourth step +Create a table ```javascript ``` -## 整体结构 +## Structure -### 格式 +### Format -一个完整的Luckysheet表格文件的数据格式为:luckysheetfile,一个表格表格文件包含若干个sheet文件,对应excel的sheet0、sheet1等。 +The data format of a complete Luckysheet table file is: luckysheetfile, a table file contains several sheet files, corresponding to excel sheet0, sheet1, etc. -一个Luckysheet文件的示例如下,该表格包含3个sheet:` -luckysheetfile = [ {sheet1设置}, {sheet2设置}, {sheet3设置} ]` -相当于excel的3个sheet +An example of a Luckysheet file is as follows, the table contains 3 sheets:` +luckysheetfile = [{sheet1 settings}, {sheet2 settings}, {sheet3 settings}]` +Equivalent to 3 sheets of excel ![excel sheet](https://minio.cnbabylon.com/public/luckysheet/excel.png) -文件中的一个sheet的示例如下: +An example of a sheet in the file is as follows: ```javascript luckysheetfile[0] = { - "name": "超市销售额", - "color": "", - "chart": [], - "status": 0, - "order": 0, - "celldata": [], - "row":90, - "column":100, - "index": 0, - "visibledatarow": [], - "visibledatacolumn": [], - "rowsplit": [], - "ch_width": 4629, - "rh_height": 1681, - "luckysheet_select_save": {}, - "luckysheet_selection_range": {}, - "scrollLeft": 0, - "scrollTop": 0, - "load": "1", - "config": { - "columlen": {}, - "rowhidden": {} - } - , - "pivotTable": {}, - "isPivotTable": true, - "calcChain": [], - "filter":{key1:value1, key2:value2}, - "filter_select": {} + "name": "Cell", //Worksheet name + "color": "", //Worksheet color + "config": {}, //Table row height, column width, merged cells, borders, hidden rows and other settings + "index": "0", //Worksheet index + "chart": [], //Chart configuration + "status": "1", //Activation status + "order": "0", //The order of the worksheet + "hide": 0,//whether to hide + "column": 18, //Number of columns + "row": 36, //number of rows + "celldata": [], //Original cell data set + "visibledatarow": [], //The position of all rows + "visibledatacolumn": [], //The position of all columns + "ch_width": 2322, //The width of the worksheet area + "rh_height": 949, //The height of the worksheet area + "scrollLeft": 0, //Left and right scroll bar position + "scrollTop": 315, //Up and down scroll bar position + "luckysheet_select_save": [], //selected area + "luckysheet_conditionformat_save": {},//Conditional format + "calcChain": [],//Formula chain + "isPivotTable":false,//Whether to pivot table + "pivotTable":{},//Pivot table settings + "filter_select": null,//Filter range + "filter": null,//Filter configuration + "luckysheet_alternateformat_save": [], //Alternate colors + "luckysheet_alternateformat_save_modelCustom": []//Customize alternate colors } ``` -### 查看方式 -在chrome的console中查看 +### View method +View in chrome's console `luckysheet.getluckysheetfile()` -可以看到完整设置 -[{shee1}, {sheet2}, {sheet3}] \ No newline at end of file +You can see the complete settings +`[{shee1}, {sheet2}, {sheet3}]` + +## Keyboard shortcuts + +| Keyboard shortcuts | Features | +| ------------ | ------------ | +| CTRL + C | Copy cell | +| CTRL + V | Paste cell | +| CTRL + X | Cut cell | +| CTRL + Z | Undo | +| CTRL + Y | Redo | +| CTRL + A | Select all | +| CTRL + B | Bold | +| CTRL + F | Find | +| CTRL + H | Replace | +| CTRL + I | Italic | +| CTRL + UP/DOWN/LEFT/RIGHT | Quickly adjust cell marquee | +| SHIFT + UP/DOWN/LEFT/RIGHT | Adjust selection area | +| CTRL + Left mouse click | Multiple selection cell | +| SHIFT + Left mouse click | Adjust selection area | +| UP/DOWN/LEFT/RIGHT | Single move adjustment cell selection box | +| ENTER | Edit cell | +| DELETE | Clear cell data | \ No newline at end of file diff --git a/docs/guide/config.md b/docs/guide/config.md index e1cb2f8cf..6b8c8663b 100644 --- a/docs/guide/config.md +++ b/docs/guide/config.md @@ -1,232 +1,214 @@ -# 基本配置 +# Basic Configuration ## container -- 类型:String -- 默认值:"luckysheet" -- 作用:容器的ID +- Type: String +- Default: "luckysheet" +- Usage: Container ID ------------ ## title -- 类型:String -- 默认值:"Luckysheet Demo" -- 作用:表格的名称 +- Type: String +- Default: "Luckysheet Demo" +- Usage: Table's name ------------ ## column -- 类型:Number -- 默认值:60 -- 作用:空表格默认的列数量 +- Type: Number +- Default: 60 +- Usage: The default number of columns in an empty table ------------ ## row -- 类型:Number -- 默认值:84 -- 作用:空表格默认的行数据量 +- Type: Number +- Default: 84 +- Usage: The default number of rows in an empty table ------------ ## data -- 类型:Array -- 默认值:[{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }] -- 作用:客户端sheet数据[shee1, sheet2, sheet3] +- Type: Array +- Default: [{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }] +- Usage: Client sheet data `[shee1, sheet2, sheet3]` ------------ ## fullscreenmode -- 类型:Boolean -- 默认值:true -- 作用:是否全屏模式,非全屏模式下,标记框不会强制选中。 +- Type: Boolean +- Default: true +- Usage: Whether full-screen mode. In non-full-screen mode, the marker box is not forced to be selected ------------ ## autoFormatw -- 类型:Boolean -- 默认值:false -- 作用:自动格式化超过4位数的数字为 亿万格式 例:true or "true" or "TRUE" +- Type: Boolean +- Default: false +- Usage: Automatically format numbers with more than 4 digits as 'billion format', for example: true or "true" or "TRUE" ------------ ## accuracy -- 类型:Number -- 默认值:undefined -- 作用:设置传输来的数值的精确位数,小数点后n位 传参数为数字或数字字符串,例: "0" 或 0 +- Type: Number +- Default: undefined +- Usage: Set the accuracy,the number of digits after the decimal point. Pass the parameter as a number or numeric string, for example: "0" or 0 ------------ ## allowCopy -- 类型:Boolean -- 默认值:true -- 作用:是否允许拷贝 +- Type: Boolean +- Default: true +- Usage: Whether to allow copying ------------ ## showtoolbar -- 类型:Boolean -- 默认值:true -- 作用:是否第二列显示工具栏 +- Type: Boolean +- Default: true +- Usage: Whether to display the toolbar in the second row ------------ ## showinfobar -- 类型:Boolean -- 默认值:true -- 作用:是否显示顶部名称栏 +- Type: Boolean +- Default: true +- Usage: Whether to display the top name bar ------------ ## showsheetbar -- 类型:Boolean -- 默认值:true -- 作用:是否显示底部表格名称区域 +- Type: Boolean +- Default: true +- Usage: Whether to display the bottom table name area ------------ ## showstatisticBar -- 类型:Boolean -- 默认值:true -- 作用:是否显示底部计数栏 - ------------- -## editMode -- 类型:Boolean -- 默认值:false -- 作用:是否为编辑模式 +- Type: Boolean +- Default: true +- Usage: Whether to display the bottom count bar ------------ ## allowEdit -- 类型:Boolean -- 默认值:true -- 作用:是否允许前台编辑 +- Type: Boolean +- Default: true +- Usage: Whether to allow frontend editing ------------ ## enableAddRow -- 类型:Boolean -- 默认值:true -- 作用:允许增加行 +- Type: Boolean +- Default: true +- Usage: Allow add line ------------ ## enableAddCol -- 类型:Boolean -- 默认值:true -- 作用:允许增加列 +- Type: Boolean +- Default: true +- Usage: Allow add column ------------ ## pointEdit -- 类型:Boolean -- 默认值:false -- 作用:是否是编辑器插入表格模式 +- Type: Boolean +- Default: false +- Usage: Whether the editor inserts table mode ------------ ## pointEditUpdate -- 类型:Function -- 默认值:null -- 作用:编辑器表格更新函数 +- Type: Function +- Default: null +- Usage: Editor table update function ------------ ## pointEditZoom -- 类型:Number -- 默认值:1 -- 作用:编辑器表格编辑时缩放比例 - ------------- -## pointEditZoom -- 类型:Number -- 默认值:1 -- 作用:编辑器表格编辑时缩放比例 +- Type: Number +- Default: 1 +- Usage: Editor table scaling when editing ------------ ## userInfo -- 类型:String -- 默认值:`' rabbit'` -- 作用:右上角的用户信息展示样式 +- Type: String +- Default: `' rabbit'` +- Usage: User information display style in the upper right corner ------------ ## userMenuItem -- 类型:Array -- 默认值:`[{url:"www.baidu.com", "icon":'', "name":"我的表格"}, {url:"www.baidu.com", "icon":'', "name":"退出登陆"}]` -- 作用:点击右上角的用户信息弹出的菜单 +- Type: Array +- Default: `[{url:"www.baidu.com", "icon":'', "name":"My Table"}, {url:"www.baidu.com", "icon":'', "name":"Sign Out"}]` +- Usage: The menu, which popped up by clicking the user information in the upper right corner ------------ ## myFolderUrl -- 类型:String -- 默认值:"www.baidu.com" -- 作用:左上角<返回按钮的链接 - ------------- -## config -- 类型:Object -- 默认值:{} -- 作用:表格行高、列宽、合并单元格、公式等设置 +- Type: String +- Default: "www.baidu.com" +- Usage: Back button link in the upper left corner ------------ ## devicePixelRatio -- 类型:Number -- 默认值:window.devicePixelRatio -- 作用:设备比例,比例越大表格分标率越高 +- Type: Number +- Default: window.devicePixelRatio +- Usage: Device Pixel Ratio, the larger the ratio, the higher the table resolution ------------ ## gridKey -- 类型:String -- 默认值:"" -- 作用:表格唯一标识符 +- Type: String +- Default: "" +- Usage: Form unique identifier ------------ ## loadUrl -- 类型:String -- 默认值:"" -- 作用:配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段 +- Type: String +- Default: "" +- Usage: Configure the address of `loadUrl`, Luckysheet will request the table data through ajax. By default, all `data` in the sheet data with status 1 is loaded, and the rest of the sheet loads all fields except the `data` field. ------------ ## loadSheetUrl -- 类型:String -- 默认值:"" -- 作用:配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合 +- Type: String +- Default: "" +- Usage: Configure the address of `loadSheetUrl`, the parameters are `gridKey` (table primary key) and `index` (sheet primary key collection, format is `[1,2,3]`), the returned data is the `data` field set of sheet ------------ ## updateUrl -- 类型:String -- 默认值:"" -- 作用:表格数据的更新地址 +- Type: String +- Default: "" +- Usage: Update URL of table data ------------ ## updateImageUrl -- 类型:String -- 默认值:"" -- 作用:缩略图的更新地址 +- Type: String +- Default: "" +- Usage: Update URL of thumbnail ------------ ## allowUpdate -- 类型:Boolean -- 默认值:false -- 作用:是否允许编辑后的后台更新 +- Type: Boolean +- Default: false +- Usage: Whether to allow background updates after editing ------------ ## functionButton -- 类型:String -- 默认值:"" -- 作用:右上角功能按钮,例如`' '` +- Type: String +- Default: "" +- Usage: Function buttons in the upper right corner, for example`' '` ------------ ## showConfigWindowResize -- 类型:Boolean -- 默认值:true -- 作用:图表和数据透视表的配置会在右侧弹出,设置弹出后表格是否会自动缩进 +- Type: Boolean +- Default: true +- Usage: The configuration of the chart or pivot table will pop up on the right. Set whether the table will be automatically indented after popping up ------------ ## enablePage -- 类型:Boolean -- 默认值:false -- 作用:允许加载下一页 +- Type: Boolean +- Default: false +- Usage: Allow next page to load ------------ ## chartConfigChange -- 类型:Function -- 默认值:null -- 作用:图表插件中图表更新触发的自定义方法 +- Type: Function +- Default: null +- Usage: Custom method for triggering chart update in chart plugin ------------ ## beforeCreateDom -- 类型:Function -- 默认值:null -- 作用:表格创建之前自定义方法 +- Type: Function +- Default: null +- Usage: Custom method before table creation ------------ ## fireMousedown -- 类型:Function -- 默认值:null -- 作用:单元格数据下钻自定义方法 +- Type: Function +- Default: null +- Usage: Custom method for drilling down cell data ------------ \ No newline at end of file diff --git a/docs/guide/data.md b/docs/guide/data.md index 72c236378..b936cfb00 100644 --- a/docs/guide/data.md +++ b/docs/guide/data.md @@ -1,24 +1,44 @@ -# 表格数据 +# Table Data -## 获取表格数据 +## Get table data -- **配置**: +- **Configuration**: - 配置 `updateUrl` 的地址,Luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段。 + Configure the address of `updateUrl`, Luckysheet will request the table data through ajax. By default, all `data` in the sheet data with status 1 is loaded, and the rest of the sheet loads all fields except the `data` field. -- **格式**: +- **Format**: + Through the global method `luckysheet.getluckysheetfile()`, the configuration information of all worksheets can be obtained. - luckysheetfile示例如下: + The luckysheetfile example is as follows: ```json [ { - "name": "Sheet1", - "color": "", - "status": "1", - "order": "0", - "celldata": [], - "config": {}, - "index": 0 + "name": "Cell", //Worksheet name + "color": "", //Worksheet color + "config": {}, //Table row height, column width, merged cells, borders, hidden rows and other settings + "index": "0", //Worksheet index + "chart": [], //Chart configuration + "status": "1", //Activation status + "order": "0", //The order of the worksheet + "hide": 0,//whether to hide + "column": 18, //Number of columns + "row": 36, //number of rows + "celldata": [], //Original cell data set + "visibledatarow": [], //The position of all rows + "visibledatacolumn": [], //The position of all columns + "ch_width": 2322, //The width of the worksheet area + "rh_height": 949, //The height of the worksheet area + "scrollLeft": 0, //Left and right scroll bar position + "scrollTop": 315, //Up and down scroll bar position + "luckysheet_select_save": [], //selected area + "luckysheet_conditionformat_save": {},//Conditional format + "calcChain": [],//Formula chain + "isPivotTable":false,//Whether to pivot table + "pivotTable":{},//Pivot table settings + "filter_select": null,//Filter range + "filter": null,//Filter configuration + "luckysheet_alternateformat_save": [], //Alternate colors + "luckysheet_alternateformat_save_modelCustom": []//Customize alternate colors }, { "name": "Sheet2", @@ -40,53 +60,687 @@ } ] ``` +- **Explanation**: + + ------------ + ## name + - Type:String + - Default:"Sheet1" + - Usage:Worksheet name + + ------------ + ## color + - Type:String + - Default:"##f20e0e" + - Usage:Worksheet color, there will be a bottom border under the worksheet name + + ------------ + ## index + - Type:Number + - Default:0 + - Usage:Worksheet index, starting from 0 + + ------------ + ## status + - Type:Number + - Default:1 + - Usage: Active state, there is only one active worksheet, other worksheets are 0 + + ------------ + ## order + - Type:Number + - Default:0 + - Usage: The order of the worksheets, it will increase when a worksheet is added, starting from 0 + + ------------ + ## hide + - Type:Number + - Default:0 + - Usage: Whether to hide, `0` means not to hide, `1` means to hide + + ------------ + ## column + - Type:Number + - Default:18 + - Usage: Number of cell columns + + ------------ + ## row + - Type:Number + - Default:36 + - Usage: Number of cell rows + + ------------ + ## visibledatarow + - Type:Number + - Default:[] + - Usage: Position information of all rows, incremental row position data + + ------------ + ## visibledatacolumn + - Type:Number + - Default:[] + - Usage: Position information of all columns, incremental column position data + + ------------ + ## ch_width + - Type:Number + - Default:2322 + - Usage:The width of the entire worksheet area (the gray area including the border) + + ------------ + ## rh_height + - Type:Number + - Default:2322 + - Usage:The height of the entire worksheet area (the gray area containing the border) + + ------------ + ## scrollLeft + - Type:Number + - Default:0 + - Usage: Left and right scroll bar position + + ------------ + ## scrollTop + - Type:Number + - Default:0 + - Usage: Up and down scroll bar position + + ------------ + ## config + - Type: Object + - Default: {} + - Usage: Table row height, column width, merged cells, borders, hidden rows and other settings + + ### config.merge + - Type:Object + - Default:{} + - Usage:Merge cell settings, example: + ```js + { + "13_5": { + "r": 13, + "c": 5, + "rs": 3, + "cs": 1 + }, + "13_7": { + "r": 13, + "c": 7, + "rs": 3, + "cs": 2 + }, + "14_2": { + "r": 14, + "c": 2, + "rs": 1, + "cs": 2 + } + } + ``` + The `key` in the object is the spliced value of `r +'_' + c`, and the `value` is the cell information in the upper left corner: r: number of rows, c: number of columns, rs: number of merged rows, cs: merge Number of columns + + ### config.rowlen + - Type:Object + - Default:{} + - Usage:The row height of each cell, example: + ```js + "rowlen": { + "0": 20, + "1": 20, + "2": 20 + } + ``` + + ### config.columlen + - Type:Object + - Default:{} + - Usage:The column width of each cell, example: + ```js + "columlen": { + "0": 97, + "1": 115, + "2": 128 + } + ``` + + ### config.borderInfo + - Type:Object + - Default:{} + - Usage:The border information of the cell, example: + ```js + "borderInfo": [{ + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 3, + "l": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 10, + "color": "rgb(255, 0, 0)" + } + } + }, + { + "rangeType": "range", + "borderType": "border-all", + "style": "3", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [2, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-inside", + "style": "3", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [8, 9] + }] + }] + ``` + There are two types of range: single cell and selection + 1. selection `rangeType: "range"` + + - Border type `borderType:"border-left" | "border-right" | "border-top" | "border-bottom" | "border-all" | "border-outside" | "border-inside" | "border-horizontal" | "border-vertical" | "border-none"`, + - Border thickness `style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick` + - Border color `color: Hexadecimal color value` + - Selection area `range: Row and column information array` + + 2. Single cell `rangeType:"cell"` + - Number of rows and columns `value.row_index: number,value.col_index: number` + - Four border objects `value.l:Left border,value.r:Right border,value.t:Top border,value.b:Bottom border` + - Border thickness `value.l.style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick` + - Border color `value.l.color: Hexadecimal color value` + + ### config.rowhidden + - Type:Object + - Default:{} + - Usage:Hidden row information, example: + ```js + "rowhidden": { + "30": 0, + "31": 0 + } + ``` + - Rows:`rowhidden[Rows]: 0`,`key`Specify the number of rows,`value` is always `0` + + ------------ + ## celldata + - Type:Array + - Default:[] + - Usage: The original cell data set is a set containing `{r:0,c:0,v:{m:"value",v:"value",ct: {fa: "General", t: "g"}} }`The one-dimensional array of format cell information is only used during initialization. After the table is initialized with celldata, the data is converted to the same level field data in the luckysheetfile, such as `luckysheetfile[0].data`, the subsequent operation of the table Data update will be updated to this data field, and celldata is no longer used. If you need to take out data as initial data, you need to execute `luckysheet.getGridData(data)` to convert it to celldata data. One-dimensional array of `rcv` is converted to two-dimensional array using `luckysheet.buildGridData(luckysheetfile)`, and the input parameter is the table data object `luckysheetfile`, example: + ```js + [{ + "r": 0, + "c": 0, + "v": { + ct: {fa: "General", t: "g"}, + m:"value1", + v:"value1" + } + }, { + "r": 0, + "c": 1, + "v": { + ct: {fa: "General", t: "g"}, + m:"value2", + v:"value2" + } + }] + ``` + + ------------ + ## luckysheet_select_save + - Type:Array + - Default:[] + - Usage: The selected area supports multiple selections and is a one-dimensional array containing multiple selection objects. Example: + ```js + [ + { + "left": 0, + "width": 97, + "top": 0, + "height": 20, + "left_move": 0, + "width_move": 97, + "top_move": 0, + "height_move": 41, + "row": [ 0, 1 ], + "column": [ 0, 0 ], + "row_focus": 0, + "column_focus": 0 + }, + { + "left": 98, + "width": 73, + "top": 63, + "height": 20, + "left_move": 98, + "width_move": 189, + "top_move": 63, + "height_move": 41, + "row": [ 3, 4 ], + "column": [ 1, 2 ], + "row_focus": 3, + "column_focus": 1 + }, + { + "left": 288, + "width": 128, + "top": 21, + "height": 20, + "left_move": 288, + "width_move": 128, + "top_move": 21, + "height_move": 62, + "row": [ 1, 3 ], + "column": [ 3, 3 ], + "row_focus": 1, + "column_focus": 3 + } + ] + ``` + + ------------ + ## luckysheet_conditionformat_save + - Type:Array + - Default:[] + - Usage: Conditional format configuration information, a one-dimensional array containing multiple conditional format configuration objects, + + type: "default": Highlight cell rules and project selection rules, + + "dataBar": Data bar, + + "icons": Icon set, + + "colorGradation": Color scale + + Example: + ```js + [ + { + "type": "default", + "cellrange": [ + { + "row": [ 2, 7 ], + "column": [ 2, 2 ] + } + ], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "betweenness", + "conditionRange": [ + { + "row": [ 4, 4 ], + "column": [ 2, 2 ] + }, + { + "row": [ 6, 6 ], + "column": [ 2, 2 ] + } + ], + "conditionValue": [ 2, 4 + ] + }, + { + "type": "dataBar", + "cellrange": [ + { + "row": [ 10, 15 ], + "column": [ 10, 11 ] + } + ], + "format": [ + "#6aa84f", + "#ffffff" + ] + }, + { + "type": "icons", + "cellrange": [ + { + "row": [ 19, 23 ], + "column": [ 2, 2 ] + } + ], + "format": { + "len": "3", + "leftMin": "0", + "top": "0" + } + }, + { + "type": "colorGradation", + "cellrange": [ + { + "left": 422, + "width": 100, + "top": 210, + "height": 20, + "left_move": 422, + "width_move": 100, + "top_move": 210, + "height_move": 125, + "row": [ 10, 15 ], + "column": [ 6, 6 ], + "row_focus": 10, + "column_focus": 6 + } + ], + "format": [ + "rgb(99, 190, 123)", + "rgb(255, 235, 132)", + "rgb(248, 105, 107)" + ] + } + ] + ``` + + ------------ + ## calcChain + - Type:Array + - Default:[] + - Usage:Formula chain, used when the cell linked by the formula is changed, all formulas referencing this cell will be refreshed, example: + ```js + [{ + "r": 6, + "c": 3, + "index": 1, + "func": [true, 23.75, "=AVERAGE(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 7, + "c": 3, + "index": 1, + "func": [true, 30, "=MAX(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }] + ``` + + ------------ + ## isPivotTable + - Type:Boolean + - Default:false + - Usage: Whether PivotTable + + ------------ + ## pivotTable + - Type:Object + - Default:{} + - Usage: Pivot table settings, example: + ```js + { + "pivot_select_save": { + "left": 0, + "width": 73, + "top": 0, + "height": 19, + "left_move": 0, + "width_move": 369, + "top_move": 0, + "height_move": 259, + "row": [0, 12], + "column": [0, 4], + "row_focus": 0, + "column_focus": 0 + }, + "pivotDataSheetIndex": 6, //The sheet index where the source data is located + "column": [{ + "index": 3, + "name": "subject", + "fullname": "subject" + }], + "row": [{ + "index": 1, + "name": "student", + "fullname": "student" + }], + "filter": [], + "values": [{ + "index": 4, + "name": "score", + "fullname": "count:score", + "sumtype": "COUNTA", + "nameindex": 0 + }], + "showType": "column", + "pivotDatas": [ + ["count:score", "science", "mathematics", "foreign language", "English", "total"], + ["Alex", 1, 1, 1, 1, 4], + ["Joy", 1, 1, 1, 1, 4], + ["Tim", 1, 1, 1, 1, 4], + ["total", 3, 3, 3, 3, 12] + ], + "drawPivotTable": false, + "pivotTableBoundary": [5, 6] + } + ``` + + ------------ + ## filter_select + - Type:Object + - Default:{} + - Usage:Filter range, a selection area, a sheet has only one filter range, similar to the `luckysheet_select_save` example: + ```js + { + "left": 74, + "width": 73, + "top": 40, + "height": 19, + "left_move": 74, + "width_move": 221, + "top_move": 40, + "height_move": 99, + "row": [ + 2, + 6 + ], + "column": [ + 1, + 3 + ], + "row_focus": 2, + "column_focus": 1 + } + ``` + + ------------ + ## filter + - Type:Object + - Default:{} + - Usage: Specific settings for filtering, examples: + ```js + { + "0": { + "caljs": {}, + "rowhidden": { + "3": 0, + "4": 0 + }, + "optionstate": true, + "str": 2, + "edr": 6, + "cindex": 1, + "stc": 1, + "edc": 3 + }, + "1": { + "caljs": {}, + "rowhidden": { + "6": 0 + }, + "optionstate": true, + "str": 2, + "edr": 6, + "cindex": 2, + "stc": 1, + "edc": 3 + } + } + ``` + + ------------ + ## luckysheet_alternateformat_save + - Type:Array + - Default:[] + - Usage: Alternating color configuration, example: + ```js + [{ + "cellrange": { + "row": [1, 6], + "column": [1, 5] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5ed593" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }, + "hasRowHeader": false, + "hasRowFooter": false + }, { + "cellrange": { + "row": [1, 6], + "column": [8, 12] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5599fc" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#ecf2fe" + }, + "foot": { + "fc": "#000", + "bc": "#afcbfa" + } + }, + "hasRowHeader": false, + "hasRowFooter": false + }] + ``` + + ------------ + ## luckysheet_alternateformat_save_modelCustom + - Type:Array + - Default:[] + - Usage:Custom alternate colors, including multiple custom alternate colors configuration, example: + ```js + [{ + "head": { + "fc": "#6aa84f", + "bc": "#ffffff" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }] + ``` + + ------------ + ## chart + - Type:Array + - Default:[] + - Usage: Chart configuration (under development) + + ------------ -## 获取sheet数据 +## Get sheet data -- **配置**: +- **Configuration**: - 配置 `loadSheetUrl` 的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合 + Configure the address of `loadSheetUrl`, the parameters are `gridKey` (table primary key) and `index` (sheet primary key collection, format is `[1,2,3]`), the returned data is the `data` field set of sheet -- **格式**: +- **Format**: ```json { - "1": [{r:0, c:1, v:"值1"},{r:10, c:11, v:"值2"}], + "1": [{r:0, c:1, v:"value 1"},{r:10, c:11, v:"value 2"}], "2": [data], "3": [data], } ``` -- **说明**: +- **Explanation**: - r代表行,c代表列,v代表该单元格的值,值可以是字符、数字或者json串。 - 数据只会载入一次,一般来说都只有一个主键,但是考虑到一些公式、图表及数据透视表会引用其他sheet的数据,所以前台会加一个判断,如果该当前sheet引用了其他sheet的数据则把引用到的sheet的数据一并补全。 + `r` stands for row, `c` stands for column, and `v` stands for the value of the cell. The value can be a character, number, or json string. + + The data will only be loaded once, generally speaking, there is only one primary key, but considering that some formulas, charts and pivot tables will refer to the data of other sheets, the front desk will add a judgment, if the current sheet refers to the data of other sheets, then complete the data of the referenced sheet together. -## 获取range范围数据 +## Get range data -- **配置**: +- **Configuration**: - 配置 `loadCellUrl` 的地址,参数为gridKey(表格主键) 、 index(sheet主键)、开始行、结束行、开始列、结束列。后台根据范围获取指定的celldata数据并返回。 + Configure the address of `loadCellUrl`, the parameters are `gridKey` (table primary key), `index` (sheet primary key), start row, end row, start column, end column. The backend gets the specified celldata data according to the range and returns it. -## 更新数据 +## Update data -- **配置**: +- **Configuration**: - 配置 `updateUrl` 的地址,发送到后台的参数为json的字符串。 + Configure the address of `updateUrl`, and the parameter sent to the backend is a json string. -- **格式**: +- **Format**: ```json { compress: false, gridKey:10004, - data: [更新数据] + data: [update data] } ``` -- **说明**: +- **Explanation**: - | 参数 | 说明 | 举例 | + | Parameter | Explanation | Example | | ------------ | ------------ | ------------ | - | compress | Luckysheet采用客户端pako进行zlib参数压缩,如果浏览器支持压缩则为true,否则为false。后台可以根据此参数决定是否解压data中的内容 | 服务端获取参数过程:1. 序列化json字符串 2判断compress字段如果为TRUE则解压data字段 3. 解码data字符串URLDecoder.decode(utf-8) | - | gridKey | Luckysheet文件的标识符 | 无 | - | data | 一个包含更新数据的数组,数组中的参数格式请看下面的介绍。实例中:t表示更新类型、i为sheet的索引、c为行号、r为列号,v为值 | data: [{ t : 'cell', i:0, c : 0, r : 0 , v: 2 }] | + | compress | Luckysheet uses client pako for zlib parameter compression, which is true if the browser supports compression, otherwise false. The backend can decide whether to decompress the data content based on this parameter | The process of obtaining parameters on the server side: 1. Serialize json string 2. Decode the data field if the compress field is TRUE 3. Decode the data string URLDecoder.decode(utf-8) | + | gridKey | Luckysheet file identifier | none | + | data | An array containing updated data. For the parameter format in the array, please see the introduction below. In the example: `t` indicates the update type, `i` is the index of the sheet, `c` is the row number, `r` is the column number, and `v` is the value | `data: [{ t : 'cell', i:0, c : 0, r : 0 , v: 2 }]` | diff --git a/docs/guide/feature.md b/docs/guide/feature.md index c454ca2fa..d3e90473b 100644 --- a/docs/guide/feature.md +++ b/docs/guide/feature.md @@ -1,89 +1,90 @@ -# 高级功能 +# Advanced Features ## luckysheet.getcellvalue(r, c, data, type) -- **参数**: - - r:单元格所在行数;可选值;从0开始的整数,0表示第一行。 - - c:单元格所在列数;可选值;从0开始的整数,0表示第一列。 - - data:表数据;二维数组;默认值为当前表格数据。 - - type:单元格属性值;可选值;默认值为'v',表示获取单元格的值。 -- **用法**: +- **Parameter**: + - r: the number of rows in which the cell is located; optional values; integers starting at 0, 0 representing the first row. + - c: the number of columns in which the cell is located; optional values; integers starting at 0, 0 indicating the first column. + - data: table data; two-dimensional array; the default value is the current table data. + - type: cell attribute value; optional value; the default value is'v', which means to get the cell value. +- **Usage**: - 此方法为获取单元格的值。r, c都没有值时,返回data;r, c只有一个有值时,返回整行或整列数据; + This method is to get the cell value. When `r` and `c` have no value, return `data`; when `r`, `c` has only one value, return the entire row or column of data; ------------ ## luckysheet.getluckysheetfile() -- **用法**: +- **Usage**: - 返回所有表格数据结构。 + Return all table data structures. ------------ ## luckysheet.sheetmanage.getSheetByIndex(index) -- **参数**: - - index:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 -- **用法**: +- **Parameter**: + - index: table subscript; integer starting from 0, 0 means the first table; default is the current table subscript. +- **Usage**: - 返回某个表格数据结构。 + Returns a table data structure. ------------ ## luckysheet.getconfig() -- **用法**: +- **Usage**: - 返回当前表格config配置。 + Returns the current table configuration. ------------ ## luckysheet.getSheetConfig(sheetIndex) -- **参数**: - - sheetIndex:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 -- **用法**: +- **Parameter**: + - sheetIndex: table index; an integer starting from 0, 0 means the first table; the default is the current table index. +- **Usage**: - 返回某个表格config配置。 + Return to a table configuration. ------------ ## luckysheet.getvisibledatarow() -- **用法**: +- **Usage**: - 返回当前表格行高。 + Returns the current table row height. ------------ ## luckysheet.getvisibledatacolumn() -- **用法**: +- **Usage**: - 返回当前表格列宽。 + Returns the current table column width. ------------ ## luckysheet.getluckysheet_select_save() -- **用法**: +- **Usage**: - 返回当前选区。 + Returns the current selection. ------------ ## luckysheet.getdatabyselection(range, sheetIndex) -- **参数**: - - range:选区对象;object: { row: [r1, r2], column: [c1, c2] };默认为当前选区。 - - sheetIndex:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 -- **用法**: +- **Parameter**: + - range: selection object; `object: {row: [r1, r2], column: [c1, c2] }`; the default is the current selection. + - sheetIndex: table index; an integer starting from 0, 0 means the first table; the default is the current table index. +- **Usage**: - 返回某个表格某个区域单元格数据。 + Returns the cell data of a range in a table. ------------ ## luckysheet.luckysheetrefreshgrid(scrollWidth, scrollHeight) -- **参数**: - - scrollWidth:横向滚动值。默认为当前横向滚动位置。 - - scrollHeight:纵向滚动值。默认为当前纵向滚动位置。 -- **用法**: +- **Parameter**: + - scrollWidth: horizontal scroll value. The default is the current horizontal scroll position. + - scrollHeight: vertical scroll value. The default is the current vertical scroll position. +- **Usage**: - 按照scrollWidth, scrollHeight刷新canvas展示数据。 + Refresh canvas display data according to scrollWidth, scrollHeight. ------------ ## luckysheet.setcellvalue(r, c, d, v) -- **参数**: - - r:单元格所在行数;从0开始的整数,0表示第一行。 - - c:单元格所在列数;从0开始的整数,0表示第一列。 - - d:表数据;二维数组。 - - v:要设置的值;可为对象,对象是是要符合单元格对象格式。 -- **用法**: - - 设置某个单元格的值。可配合luckysheet.luckysheetrefreshgrid()刷新查看单元格值改变。 +- **Parameter**: + + - r: the number of rows in which the cell is located; an integer starting from 0, 0 means the first row. + - c: the number of columns in which the cell is located; an integer starting from 0, 0 means the first column. + - d: table data; two-dimensional array. + - v: The value to be set; it can be an object, and the object should conform to the cell object format. +- **Usage**: + + Set the value of a cell. Cooperate with `luckysheet.luckysheetrefreshgrid()` to refresh to see the cell value changes. ```js luckysheet.setcellvalue(0, 0, luckysheet.flowdata, 'abc'); luckysheet.luckysheetrefreshgrid(); @@ -91,11 +92,11 @@ ------------ ## luckysheet.setluckysheet_select_save(v) -- **参数**: - - v:要设置的选区值(数组)。符合选区格式规则,如[{ row: [r1, r2], column: [c1, c2] }]。 -- **用法**: +- **Parameter**: + - v: The selection value (array) to be set. It conforms to the selection format rules, such as `[{ row: [r1, r2], column: [c1, c2] }]`. +- **Usage**: - 设置当前表格选区的值。配合luckysheet.selectHightlightShow()可在界面查看选区改变。 + Set the value of the current table selection. With `luckysheet.selectHightlightShow()`, you can view the selection changes on the interface. ```js luckysheet.setluckysheet_select_save([{ row: [0, 1], column: [0, 1] }]); luckysheet.selectHightlightShow(); @@ -103,22 +104,22 @@ ------------ ## luckysheet.sheetmanage.setSheetHide(index) -- **参数**: - - index:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 -- **用法**: +- **Parameter**: + - index: table subscript; integer starting from 0, 0 means the first table; default is the current table subscript. +- **Usage**: - 隐藏某个表格。 + Hide a table. ------------ ## luckysheet.sheetmanage.setSheetShow(index) -- **参数**: - - index:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 -- **用法**: +- **Parameter**: + - index: table subscript; integer starting from 0, 0 means the first table; default is the current table subscript. +- **Usage**: - 显示某个表格。 + Display a table. ------------ ## luckysheet.method.destroy() -- **用法**: +- **Usage**: - 释放表格 + Release table diff --git a/docs/guide/format.md b/docs/guide/format.md index 56335f492..3c794dbd8 100644 --- a/docs/guide/format.md +++ b/docs/guide/format.md @@ -1,259 +1,157 @@ -# 格式属性 +# Format attributes -## 单元格属性表 +## Cell attributes table - - - - - + + + + + - - + + - + - - + + - + - - + + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - + - - - + + + - + - + - +
属性值全称
说明
值示例Aspose方法或者属性Attribute valueFull name
Explanation
Example valueAspose method or attribute
ct celltype单元格值格式:文本、时间等单元格格式Cell value format: text, time, etc.Cell format
bg background背景颜色background color #fff000 setBackgroundColor
ff fontfamily字体0 微软雅黑、1 宋体(Song)、2 黑体(ST Heiti)、3 楷体(ST Kaiti)、 4仿宋(ST FangSong)、 5 新宋体(ST Song)、 6 华文新魏、 7华文行楷、 8 华文隶书、 9 Arial、 10 Times New Roman 、11 Tahoma 、12 VerdanaFont0 Microsoft Yahei, 1 Song, 2 ST Heiti, 3 ST Kaiti, 4 ST FangSong, 5 ST Song, 6 Chinese New Wei, 7 Chinese Xingkai, 8 Chinese Lishu, 9 Arial, 10 Times New Roman, 11 Tahoma, 12 Verdana Style.Font object's Name property.
fc fontcolor字体颜色font color #fff000 Style.Font object's Color property
bl bold粗体0 常规 、 1加粗Bold0 Regular, 1 Bold Style.Font object's IsBold property to true.
it italic斜体0 常规 、 1 斜体Italic0 Regular, 1 Italic
fs fontsize字体大小font size 14 Style.Font object's Size property.
cl cancelline删除线0 常规 、 1 删除线Cancelline0 Regular, 1 Cancelline Style.Font object's Underline property
ul underline下划线0 常规 、 1 下划线
bsborderstyle边框样式0 noneLineStyle
1 Thin
2 Hair
3 Dotted
4 Dashed
5 DashDot
6 DashDotDot
7 Double
8 Medium
9 MediumDashed
10 MediumDashDot
11 MediumDashDotDot
12 SlantedDashDot
13 Thick
bcbordercolor边框颜色#fff000setBorderColor
bs_tborderstyleTop上边框样式同上
bc_tbordercolorTop上边框颜色
bs_bborderstyleBottom下边框样式
bc_bbordercolorBottom下边框颜色
bs_lborderstyleLeft左边框样式
bc_lbordercolorLeft左边框颜色
bs_rborderstyleRight右边框样式
bc_rbordercolorRight右边框颜色Underline0 Regular, 1 Underline
vt verticaltype垂直对齐0 中间、1 上、2下Vertical alignment0 middle, 1 up, 2 down setVerticalAlignment
ht horizontaltype水平对齐0 居中、1 左、2右Horizontal alignment0 center, 1 left, 2 right setHorizontalAlignment
mc mergecell合并单元格{ rs: 10, cs:5 } 表示从此cell开始到10行5列的cell进行合并。Merge Cells{rs: 10, cs:5} indicates that the cells from this cell to 10 rows and 5 columns are merged. Merge
tr textrotate文字旋转0: 0、1: 45 、2:-45、3 竖排文字、4: 90 、5:-90Text rotation0: 0、1: 45 、2: -45、3 Vertical text、4: 90 、5: -90 setRotationAngle
fl floatlenght小数位数Decimal places 3
tb textbeak文本换行0 截断、1溢出、2 自动换行2:setTextWrapped
0和1:IsTextWrapped = true
Text wrap0 truncation, 1 overflow, 2 word wrap2: setTextWrapped
0和1: IsTextWrapped = true
ov originvalue原始值Original value
v value显示值Display value
f function公式formula setFormula
setArrayFormula
workbook.calculateFormula();
-以下为3个单元格存储: +The following is the storage of 3 cells: ```json [ - {r:0, c:1, v: { v:"显示", f:"=SUM(A2)", bg:"#fff000", bs:"1",bc:"#000"}}, - {r:10, c:11, v:"值2"}, + {r:0, c:1, v: { v:"display", f:"=SUM(A2)", bg:"#fff000", bs:"1",bc:"#000"}}, + {r:10, c:11, v:"value2"}, {r:10, c:11, v:{f:"=sum", v:"100"}} ] ``` -##
单元格格式
+##
Cell format
-参考[Aspose.Cells](https://docs.aspose.com/display/cellsnet/List+of+Supported+Number+Formats#ListofSupportedNumberFormats-Aspose.Cells) +Reference[Aspose.Cells](https://docs.aspose.com/display/cellsnet/List+of+Supported+Number+Formats#ListofSupportedNumberFormats-Aspose.Cells) -格式设置为: +The format is set to: ```json { @@ -267,13 +165,13 @@ } ``` -|参数|说明|使用| +|Parameter|Explanation|Usage| | ------------ | ------------ | ------------ | -|v|value,Aspose中的快捷设置值|`var currencyStyle = book.CreateStyle();`
`currencyStyle.Number = 8;`| -|f|Format:格式的定义串 `$#,##0;$-#,##0`|`var currencyStyle = book.CreateStyle();`
`currencyStyle.Custom  = "#,##0 SEK";`| -|t|Type类型:
0:General
1:Decimal
2:Currency
3:Percentage
4:Scientific
5:Fraction
6:Date
7:Time
8:Accounting
9:Text
10:DateTime|类型是前端区分的格式,excel导入时根据导入format字符的关键字来区分是哪种类型:
1.含YYYY、MM、DD的是6| +|v|value, shortcut setting value in Aspose|`var currencyStyle = book.CreateStyle();`
`currencyStyle.Number = 8;`| +|f|Format: format definition string `$#,##0;$-#,##0`|`var currencyStyle = book.CreateStyle();`
`currencyStyle.Custom  = "#,##0 SEK";`| +|t|Type:
0: General
1: Decimal
2: Currency
3: Percentage
4: Scientific
5: Fraction
6: Date
7: Time
8: Accounting
9: Text
10: DateTime|The type is the format distinguished by the front end. When importing excel, the type is distinguished according to the keyword of the format character:
1. YYYY, MM, DD is 6| -Aspose设置如下: +Aspose is set as follows: | Value | Type | Format String | |-------|------------|---------------------------------------------| | 0 | General | General | @@ -313,4 +211,4 @@ Aspose设置如下: | 48 | Scientific | \#\#0\.0E\+00 | | 49 | Text | @ | -导入/导出只用考虑用户看到的数据样式,例如excel中处理日期格式的方式为把日期统一转换为数字:42736 代表 2017-1-1, \ No newline at end of file +Import/export only considers the data style that the user sees. For example, the way to process the date format in excel is to convert the date into a number: 42736 represents 2017-1-1. \ No newline at end of file diff --git a/docs/guide/operate.md b/docs/guide/operate.md index c111ce8b9..1775f42da 100644 --- a/docs/guide/operate.md +++ b/docs/guide/operate.md @@ -1,8 +1,8 @@ -# 表格操作 +# Table Operation -## 单元格刷新 +## Cell refresh -- **格式**: +- **Format**: ```json { @@ -14,37 +14,37 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |i|当前sheet的index值| - |v|单元格的值| - |r|单元格的行号| - |c|单元格的列号| + |t|Operation type symbol| + |i|The index value of the current sheet| + |v|Cell value| + |r|Row number of cell| + |c|The column number of the cell| -- **后台更新**: +- **Backend update**: - 单元格更新主要是更新 `luckysheetfile[i].celldata` 参数,该参数是一个数组: + The cell update is mainly to update the `luckysheetfile[i].celldata` parameter, which is an array: ```json [ - {r:0, c:1, v: "值1"}, - {r:10, c:11, v:"值2"}, + {r:0, c:1, v: "value1"}, + {r:10, c:11, v:"value2"}, {r:10, c:11, v:{f:"=sum", v:"100"}} ] ``` - 存储了sheet中所有单元格中的值,Luckysheet在建立的时候会根据 `luckysheetfile[i].row` 和 `luckysheetfile[i].column` 的行列数量大小新建一个表格data,然后再使用 `data[r][c]=v` 的方式填充表格数据,空数据单元格以null表示。 + Store the values in all the cells in the sheet, Luckysheet will create a new table data according to the number of rows and columns in `luckysheetfile[i].row` and `luckysheetfile[i].column` when it is created, and then use `data[ r][c]=v` to fill the table data, empty data cells are represented by null. - 后台在保存前台推送的数据时,首先需要把参数转换为 `{r:0, c:1:v:100}` 的格式,然后更新 `luckysheetfile[i].celldata` 字段,如果存在该单元格则更新,如果没有则添加,如果存在该单元格但是v为null则删除该单元格。 + When saving the data posted by the frontend, the backend needs to convert the parameters to the format of `{r:0, c:1:v:100}` first, and then update the field of `luckysheetfile[i].celldata`, if the cell exists the cell is updated, if not, it is added, and if the cell exists but `v` is null, the cell is deleted. -- **前台查看**: +- **Frontend view**: - 可以修改任意单元格的数值,然后到chrome控制台中查看"t"=="v"的操作。 + You can modify the value of any cell, and then go to the chrome console to view the operation of `"t"=="v"`. -## config操作 +## Config operation -- **格式**: +- **Format**: ```json { @@ -57,34 +57,34 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |i|当前sheet的index值| - |v|需要更新的内部key-value| - |k|操作的key名称| + |t|Operation type symbol| + |i|The index value of the current sheet| + |v|The internal key-value that needs to be updated| + |k|Operation key name| -- **后台更新**: +- **Backend update**: - 更新 `luckysheetfile[i].config.[k][v.key] = v.value` ,如果config中不存k,则新建一个k属性并设置为空,如果k中不存在v.key中,则新建一个v.key再更新v.value。 + Update `luckysheetfile[i].config.[k][v.key] = v.value`, if `k` does not exist in `config`, then create a new `k` attribute and set it to empty, If there is no `v.key` in `k`, create a new `v.key` and update `v.value`. - 1. 修改行高度举例: - - 输入:`{"t":"cg","i":3,"v":{"3":10, "5":70, "10":100},"k":" rowlen"}` - - 更新:`luckysheetfile[3].config.["rowlen"]["3"] = 10` + 1. Examples of modifying row height: + - Enter: `{"t":"cg","i":3,"v":{"3":10, "5":70, "10":100},"k":" rowlen"}` + - Update: `luckysheetfile[3].config.["rowlen"]["3"] = 10` - 2. 修改列宽度举例: - - 输入:`{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columlen"}` - - 更新:`luckysheetfile[1].config.["columlen"]["20"] = 74` + 2. Examples of modifying column width: + - Enter: `{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columlen"}` + - Update: `luckysheetfile[1].config.["columlen"]["20"] = 74` - 3. 合并单元格举例: - - 输入:`{"t":"cg","i":1,"v":{"5_10":{row:[1,3], column:[3,5]},"k":" merge "}` - - 更新:`luckysheetfile[1].config.["merge"]["5_10"] = {row:[1,3], column:[3,5]}` + 3. Examples of merged cells: + - Enter: `{"t":"cg","i":1,"v":{"5_10":{row:[1,3], column:[3,5]},"k":" merge "}` + - Update: `luckysheetfile[1].config.["merge"]["5_10"] = {row:[1,3], column:[3,5]}` -## 通用保存 +## General save -- **格式**: +- **Format**: ```json { @@ -99,44 +99,44 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |i|当前sheet的index值| - |v|需要更新的内部key-value| - |k|需要保存的key-value中的value| - |s|如果是true则v保存为字符串,否则按照对象进行保存| + |t|Operation type symbol| + |i|The index value of the current sheet| + |v|The internal key-value that needs to be updated| + |k|The `value` in the key-value that needs to be saved| + |s|If it is `true` then `v` is saved as a string, otherwise it is saved according to the object| -- **后台更新**: +- **Backend update**: `luckysheetfile[3].[k]= v` - 如果s为true,则为 `luckysheetfile[3].[k]= JSON.stringify(v)` + If `s` is `true`, it is `luckysheetfile[3].[k]= JSON.stringify(v)` - 1. 数据透视表: - - 输入:`{"t":"all","i":1,"v":{………},"k":"pivotTable", "s": false}` - - 更新:`luckysheetfile[1].["pivotTable"] = {………}` + 1. Pivot table: + - Enter: `{"t":"all","i":1,"v":{………},"k":"pivotTable", "s": false}` + - Update: `luckysheetfile[1].["pivotTable"] = {………}` - 2. 冻结行列: - - 输入:`{"t":"all","i":3,"v":{………},"k":"freezen", "s": false}` - - 更新:`luckysheetfile[3].["freezen"] = {………}` + 2. Freeze rows and columns: + - Enter: `{"t":"all","i":3,"v":{………},"k":"freezen", "s": false}` + - Update: `luckysheetfile[3].["freezen"] = {………}` - 3. 筛选范围: - - 输入:`{"t":"all","i":3,"v":{………},"k":"filter_select", "s": true }` - - 更新:`luckysheetfile[3].["filter_select"] = JSON.stringify ({………})` + 3. Filter range: + - Enter: `{"t":"all","i":3,"v":{………},"k":"filter_select", "s": true }` + - Update: `luckysheetfile[3].["filter_select"] = JSON.stringify ({………})` - 4. Sheet名称: - - 输入:`{"t":"all","i":1,"v":"文档","k":"name", "s": false}` - - 更新:`luckysheetfile[1].["name"] = "文档"` + 4. Sheet name: + - Enter: `{"t":"all","i":1,"v":"doc","k":"name", "s": false}` + - Update: `luckysheetfile[1].["name"] = "doc"` - 5. Sheet颜色: - - 输入: `{"t":"all","i":2,"v":"#FFF000","k":"color", "s": false}` - - 更新:`luckysheetfile[2].["color"] = "#FFF000"` + 5. Sheet color: + - Enter: `{"t":"all","i":2,"v":"#FFF000","k":"color", "s": false}` + - Update: `luckysheetfile[2].["color"] = "#FFF000"` -## 函数链操作 +## Function chain operation -- **格式**: +- **Format**: ```json { @@ -157,32 +157,32 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |i|当前sheet的index值| - |v|对象值,这里对象的内部字段不需要单独更新,所以存为文本即可| - |op|操作类型,add为新增,update为更新,del为删除| - |pos|更新或者删除的函数位置| + |t|Operation type symbol| + |i|The index value of the current sheet| + |v|Object value, the internal fields of the object do not need to be updated separately, so save as text| + |op|Operation type, `add` is add, `update` is update, and `del` is delete| + |pos|Updated or deleted function location| -- **后台更新**: +- **Backend update**: - calcChain为一个数组 - - 如果op的值add则添加到末尾 `luckysheetfile[i].calcChain.push (v)`, - - 如果op的值update则更新 `luckysheetfile[i].calcChain[pos]= v`, - - 如果op的值del则删除 `luckysheetfile[i].calcChain.splice(pos, 1)`。 + calcChain is an array + - If the value of `op` is `add` then add to the end `luckysheetfile[i].calcChain.push (v)`, + - If the value of `op` is `update` then update `luckysheetfile[i].calcChain[pos]= v`, + - If the value of `op` is `del` then delete `luckysheetfile[i].calcChain.splice(pos, 1)`。 -- **前台查看**: +- **Frontend view**: - 可以修改任意单元格的数值,然后到chrome控制台中查看"t"=="v"的操作。 + You can modify the value of any cell, and then go to the chrome console to view the operation of `"t"=="v"`. -## 行列操作 +## Row and column operations -### 删除行或列 +### Delete rows or columns -- **格式**: +- **Format**: ```json { @@ -196,51 +196,51 @@ } ``` -- **说明**: +- **Explanation**: - - + + - + - + - + - + - +
参数说明ParameterExplanation
t操作类型表示符号Operation type symbol
i当前sheet的index值The index value of the current sheet
rc行操作还是列操作,值r代表行,c代表列Row operation or column operation, the value `r` stands for row, and `c` stands for column
v index从第几行或者列开始删除Delete from which row or column
len删除多少行或者列Number of rows or columns deleted
-- **后台更新**: +- **Backend update**: - 如果rc的值是r删除行, 如果rc的值为c则删除列, 例如rc=r,index=4,len=5,则代表从第4行开始删除之后的5行(4、5、6、7、8)。 + If the value of `rc` is `'r'` then delete the row, if the value of `rc` is `'c'` then delete the column, eg `rc='r'`, `index=4`, `len= 5`, means to delete the next 5 lines (4, 5, 6, 7, 8) from the 4th line. - 主要是对 `luckysheetfile[i].celldata` 中的单元格进行操作,删除参数中所描述符合条件的单元格并且更新其他单元格的行列值,以上述为例,首先查找单元格中r值在4到8的所有单元格并删除,然后把本来行号9以后的单元格的r值减去5,最后把 `luckysheetfile[i].row` 减去5。 - 如果v值为 `"#__qkdelete#"`(不含引号),则此处为需要删除的单元格。 + Mainly operate on the cells in `luckysheetfile[i].celldata`, delete the qualified cells described in the parameters and update the row and column values of other cells. Taking the above as an example, first find the `r` in the cell Delete all the cells with values from 4 to 8, and then subtract the value of 5 from the original cell number 9 and later, and finally subtract 5 from `luckysheetfile[i].row`. + If the `v` value is `"#__qkdelete#"` (without quotes), then this is the cell to be deleted. -- **前台查看**: +- **Front view**: - 可以删除行或者列,然后到chrome控制台中查看"t"=="drc"的操作。 + You can delete rows or columns, and then go to the chrome console to view the operation of `"t"=="drc"`. -### 增加行或列 +### Add rows or columns -- **格式**: +- **Format**: ```json { @@ -255,45 +255,47 @@ } ``` -- **说明**: +- **Explanation**: - - + + - + - + - + - + - + - +
参数说明ParameterExplanation
t操作类型表示符号Operation type symbol
i当前sheet的index值The index value of the current sheet
rc行操作还是列操作,值r代表行,c代表列Row operation or column operation, the value `r` stands for row, and `c` stands for column
v index从第几行或者列开始新增Start from which row or column
len增加多少行或者列How many rows or columns to add
data新增行或者列的内容New row or column content
-- **后台更新**: - - 如果rc的值是r新增行, 如果rc的值为c则新增列, 例如rc=r,index=4,len=5,则代表从第4行开始增加5行,如果data为空则增加空行,如果data不为空则用data中的数组添加新增的行中。 - 主要是对 `luckysheetfile[i].celldata` 中的单元格进行操作,以上述为例,首先 `luckysheetfile[i].row` 加5,然后把r大于4的单元格的整体的r值+5,如果data为空则增加空行则结束,如果data不为空则把二维数组data转换为 `{r:0,c:0,v:100}` 的格式并添加到celldata中,转换的伪代码如下: +- **Backend update**: + + If the value of `rc` is `r`, add a new row. If the value of `rc` is `c`, add a new column. For example, `rc=r, index=4, len=5` then it means increase 5 lines from line 4. If `data` is empty, add an empty line. If `data` is not empty, use the array in `data` to add a new line. + + Mainly operate on the cells in `luckysheetfile[i].celldata`. Taking the above as an example, first add 5 to `luckysheetfile[i].row`, and then add `r` greater than 4 to the entire cell`r `Value +5, if `data` is empty, add an empty line to end, if `data` is not empty, convert the two-dimensional array `data` to `{r:0,c:0,v:100}` Format and added to `celldata`, the pseudo code for conversion is as follows: + ```javascript var ret = []; for(var r=0;r - 参数 - 说明 + Parameter + Explanation t - 操作类型表示符号 + Operation type symbol i - 当前sheet的index值 + The index value of the current sheet v name - 隐藏后跳转的sheet的index值 + The index value of the sheet jumped after hiding color - Sheet颜色 + Sheet color status - 激活状态 + Active state order - Sheet摆放顺序 + Sheet order index - Index索引 + Sheet Index celldata - 单元格数据集 + Cell dataset config - 设置 + Setting pivotTable - 数据透视表设置 + Pivot table settings isPivotTable - 是否数据透视表 + Whether the pivot table -- **后台更新**: +- **Backend update**: - 添加一行(一个文档)到数据库中。 + Add a line (a document) to the database. -### 复制sheet +### Copy sheet -- **格式**: +- **Format**: ```json { "t": "shc", - "i": "新建sheet的位置", + "i": "New sheet location", "v": { "copyindex": "copyindex" } } ``` -- **后台更新**: +- **Backend update**: - 复制表格中的sheet索引值为copyindex并添加到数据库中,添加的设置该新文档的index为i对应的值。 + Copy the sheet index value in the table, set it to `copyindex` and add it to the database, set the `index` of the new document to the value corresponding to `i`. -### 删除sheet +### Delete sheet -- **格式**: +- **Format**: ```json { @@ -490,32 +492,32 @@ } ``` -- **说明**: +- **Explanation**: - - + + - + - +
参数说明ParameterExplanation
t操作类型表示符号Operation type symbol
v deleIndex需要删除的sheet索引The sheet index to be deleted
-- **后台更新**: +- **Backend update**: - 删除索引为deleIndex对应值得sheet。 + Delete the sheet whose index is the value corresponding to `deleIndex`. -### 位置 +### Position -- **格式**: +- **Format**: ```json { @@ -526,24 +528,24 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |v|设置Sheet的排序,为一个键值对,key代表sheet的index,value代表order值。格式为:`{"1": 3, "2":1, "0": 2, "3":0}| + |t|Operation type symbol| + |v|Set the sorting of Sheet as a key-value pair, `key` represents the index of the sheet, and `value` represents the order value. The format is: `{"1": 3, "2":1, "0": 2, "3":0}`| -- **后台更新**: +- **Backend update**: - 对sheet的index等于key的页设置其order属性为value值。示例: + For the page where the `index` of the sheet is equal to the `key`, set its `order` attribute to the `value`. Examples: `luckysheetfile[key1].order = value1` `luckysheetfile[key2].order = value2` `luckysheetfile[key3].order = value3` -## sheet属性(隐藏或显示) +## Sheet attributes (hide or show) -- **格式**: +- **Format**: ```json { @@ -555,48 +557,48 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |i|当前sheet的index值| - |op|操作选项,有hide、show。| - |v|如果hide为1则隐藏,为0或者空则为显示| - |cur|隐藏后设置索引对应cur的sheet为激活状态。| + |t|Operation type symbol| + |i|The index value of the current sheet| + |op|Operation options include hide and show| + |v|Hide if `hide` is `1`, show if `0` or empty| + |cur|After hiding, set sheet which index corresponding to the `cur` to the active state| -- **后台更新**: +- **Backend update**: - 更新"i"对应sheet的根路径hide字段为v,当隐藏时status值为0,当显示时为1, 如果为隐藏则更新index对应cur的sheet的status状态为1。 + The `hide` field of the root path of the sheet corresponding to `i` is updated to `v`. When hidden, the `status` value is `0`. When displayed, it is `1`. If hidden, the sheet which `cur` corresponds to `index`, its `status` is updated to `1`. -## 表格信息更改 +## Table information change -### 表格名称 +### Table name -- **格式**: +- **Format**: ```json { "t": "na", "i": null, - "v": "数据" + "v": "Data" } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |v|表格的名称| + |t|Operation type symbol| + |v|The name of the table| -- **后台更新**: +- **Backend update**: - 根据gridkey更新数据库中的表格名称。 + Update the table name in the database according to gridkey. -### 缩略图 +### Thumbnail -- **格式**: +- **Format**: ```json { @@ -606,14 +608,14 @@ } ``` -- **说明**: +- **Explanation**: - |参数|说明| + |Parameter|Explanation| | ------------ | ------------ | - |t|操作类型表示符号| - |img|当前表格的缩略图,为base64字符串| - |curindex|当前表格默认打开的sheet| + |t|Operation type symbol| + |img|Thumbnail of current table, base64 string| + |curindex|The current sheet opened by default| -- **后台更新**: +- **Backend update**: - 根据gridkey更新mysql中表格的缩略图字段为img值,同时更新index为curindex值的sheet的status字段为1,设置其他sheet的status值为0。 \ No newline at end of file + According to gridkey, update the thumbnail field of the table in mysql to the img value, and update the status field of the sheet whose index is the curindex value to 1, and set the status value of other sheets to 0. \ No newline at end of file diff --git a/docs/zh/README.md b/docs/zh/README.md new file mode 100644 index 000000000..67ac3339d --- /dev/null +++ b/docs/zh/README.md @@ -0,0 +1,15 @@ +--- +home: true +heroText: Luckysheet +tagline: 配置文档 · API · 教程 +actionText: 快速上手 → +actionLink: /zh/guide/ +features: +- title: 功能强大 + details: 包含大量常用电子表格功能,替代你的excel +- title: 配置简单 + details: 最少的配置就能开始上手使用 +- title: 完全开源 + details: 社区驱动,共同来完善你的想法 +footer: MIT Licensed | Copyright © 2020-present Mengshukeji +--- \ No newline at end of file diff --git a/docs/zh/guide/README.md b/docs/zh/guide/README.md new file mode 100644 index 000000000..c780ae128 --- /dev/null +++ b/docs/zh/guide/README.md @@ -0,0 +1,145 @@ +# 快速上手 + +## 基本介绍 +Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 + +### 特性 +1. Luckysheet支持表格设置包括冻结行列、合并单元格、筛选、排序、查询、条件格式、批注 +2. 支持数据分析功能包括透视表、分列、矩阵操作、内置385个计算函数 +3. 支持一键截图、复制为json数据、共享编辑、excel与Luckysheet之间数据的复制粘贴 +4. 支持移动端查看 +5. 支持sparkLine +6. 下拉复制 +7. 快捷键 + +![演示](https://minio.cnbabylon.com/public/luckysheet/LuckysheetDemo.gif) + + +### Demo +[在线demo](https://mengshukeji.github.io/LuckysheetDemo/) + +## 开发模式 + +### 环境 +[Node.js](https://nodejs.org/en/) Version >= 6 + +### 安装 +```shell +npm install +npm install gulp -g +``` + +### 开发 +```shell +npm run dev +``` + +### 打包 +```shell +npm run build +``` + +## 使用步骤 + +### 第一步 +`npm run build`后`dist`文件夹下的所有文件复制到项目目录 + +### 第二步 +引入依赖 +```html + + + + + +``` +### 第三步 +指定一个表格容器 +```html +
+``` +### 第四步 +创建一个表格 +```javascript + +``` + +## 整体结构 + +### 格式 + +一个完整的Luckysheet表格文件的数据格式为:luckysheetfile,一个表格文件包含若干个sheet文件,对应excel的sheet0、sheet1等。 + +一个Luckysheet文件的示例如下,该表格包含3个sheet:` +luckysheetfile = [ {sheet1设置}, {sheet2设置}, {sheet3设置} ]` +相当于excel的3个sheet + +![excel sheet](https://minio.cnbabylon.com/public/luckysheet/excel.png) + +文件中的一个sheet的示例如下: +```javascript +luckysheetfile[0] = +{ + "name": "Cell", //工作表名称 + "color": "", //工作表颜色 + "config": {}, //表格行高、列宽、合并单元格、边框、隐藏行等设置 + "index": "0", //工作表索引 + "chart": [], //图表配置 + "status": "1", //激活状态 + "order": "0", //工作表的顺序 + "hide": 0,//是否隐藏 + "column": 18, //列数 + "row": 36, //行数 + "celldata": [], //原始单元格数据集 + "visibledatarow": [], //所有行的位置 + "visibledatacolumn": [], //所有列的位置 + "ch_width": 2322, //工作表区域的宽度 + "rh_height": 949, //工作表区域的高度 + "scrollLeft": 0, //左右滚动条位置 + "scrollTop": 315, //上下滚动条位置 + "luckysheet_select_save": [], //选中的区域 + "luckysheet_conditionformat_save": {},//条件格式 + "calcChain": [],//公式链 + "isPivotTable":false,//是否数据透视表 + "pivotTable":{},//数据透视表设置 + "filter_select": null,//筛选范围 + "filter": null,//筛选配置 + "luckysheet_alternateformat_save": [], //交替颜色 + "luckysheet_alternateformat_save_modelCustom": []//自定义交替颜色 +} +``` +### 查看方式 +在chrome的console中查看 +`luckysheet.getluckysheetfile()` +可以看到完整设置 +`[{shee1}, {sheet2}, {sheet3}]` + +## 快捷键 + +| 快捷键 | 功能 | +| ------------ | ------------ | +| CTRL + C | 复制单元格 | +| CTRL + V | 粘贴单元格 | +| CTRL + X | 剪切单元格 | +| CTRL + Z | 撤销 | +| CTRL + Y | 重做 | +| CTRL + A | 全选 | +| CTRL + B | 加粗 | +| CTRL + F | 查找 | +| CTRL + H | 替换 | +| CTRL + I | 斜体 | +| CTRL + UP/DOWN/LEFT/RIGHT | 快捷调整单元格选框 | +| SHIFT + UP/DOWN/LEFT/RIGHT | 调整选区 | +| CTRL + 鼠标左击 | 多选单元格 | +| SHIFT + 鼠标左击 | 调整选区 | +| UP/DOWN/LEFT/RIGHT | 单个移动调整单元格选框 | +| ENTER | 编辑单元格 | +| DELETE | 清除单元格数据 | diff --git a/docs/zh/guide/config.md b/docs/zh/guide/config.md new file mode 100644 index 000000000..f66b1d747 --- /dev/null +++ b/docs/zh/guide/config.md @@ -0,0 +1,214 @@ +# 基本配置 + +## container +- 类型:String +- 默认值:"luckysheet" +- 作用:容器的ID + +------------ +## title +- 类型:String +- 默认值:"Luckysheet Demo" +- 作用:表格的名称 + +------------ +## column +- 类型:Number +- 默认值:60 +- 作用:空表格默认的列数量 + +------------ +## row +- 类型:Number +- 默认值:84 +- 作用:空表格默认的行数据量 + +------------ +## data +- 类型:Array +- 默认值:[{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }] +- 作用:客户端sheet数据`[shee1, sheet2, sheet3]` + +------------ + +## fullscreenmode +- 类型:Boolean +- 默认值:true +- 作用:是否全屏模式。非全屏模式下,标记框不会强制选中 + +------------ +## autoFormatw +- 类型:Boolean +- 默认值:false +- 作用:自动格式化超过4位数的数字为‘亿万格式’,例:true or "true" or "TRUE" + +------------ +## accuracy +- 类型:Number +- 默认值:undefined +- 作用:设置精度,小数点后的位数。传参数为数字或数字字符串,例: "0" 或 0 + +------------ +## allowCopy +- 类型:Boolean +- 默认值:true +- 作用:是否允许拷贝 + +------------ +## showtoolbar +- 类型:Boolean +- 默认值:true +- 作用:是否第二列显示工具栏 + +------------ +## showinfobar +- 类型:Boolean +- 默认值:true +- 作用:是否显示顶部名称栏 + +------------ +## showsheetbar +- 类型:Boolean +- 默认值:true +- 作用:是否显示底部表格名称区域 + +------------ + +## showstatisticBar +- 类型:Boolean +- 默认值:true +- 作用:是否显示底部计数栏 + +------------ +## allowEdit +- 类型:Boolean +- 默认值:true +- 作用:是否允许前台编辑 + +------------ +## enableAddRow +- 类型:Boolean +- 默认值:true +- 作用:允许增加行 + +------------ +## enableAddCol +- 类型:Boolean +- 默认值:true +- 作用:允许增加列 + +------------ +## pointEdit +- 类型:Boolean +- 默认值:false +- 作用:是否是编辑器插入表格模式 + +------------ +## pointEditUpdate +- 类型:Function +- 默认值:null +- 作用:编辑器表格更新函数 + +------------ +## pointEditZoom +- 类型:Number +- 默认值:1 +- 作用:编辑器表格编辑时缩放比例 + +------------ +## userInfo +- 类型:String +- 默认值:`' rabbit'` +- 作用:右上角的用户信息展示样式 + +------------ +## userMenuItem +- 类型:Array +- 默认值:`[{url:"www.baidu.com", "icon":'', "name":"我的表格"}, {url:"www.baidu.com", "icon":'', "name":"退出登陆"}]` +- 作用:点击右上角的用户信息弹出的菜单 + +------------ +## myFolderUrl +- 类型:String +- 默认值:"www.baidu.com" +- 作用:左上角<返回按钮的链接 + +------------ +## devicePixelRatio +- 类型:Number +- 默认值:window.devicePixelRatio +- 作用:设备比例,比例越大表格分辨率越高 + +------------ +## gridKey +- 类型:String +- 默认值:"" +- 作用:表格唯一标识符 + +------------ +## loadUrl +- 类型:String +- 默认值:"" +- 作用:配置`loadUrl`的地址,Luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有`data`,其余的sheet载入除`data`字段外的所有字段 + +------------ +## loadSheetUrl +- 类型:String +- 默认值:"" +- 作用:配置`loadSheetUrl`的地址,参数为`gridKey`(表格主键) 和 `index`(sheet主键合集,格式为`[1,2,3]`),返回的数据为sheet的`data`字段数据集合 + +------------ +## updateUrl +- 类型:String +- 默认值:"" +- 作用:表格数据的更新地址 + +------------ +## updateImageUrl +- 类型:String +- 默认值:"" +- 作用:缩略图的更新地址 + +------------ +## allowUpdate +- 类型:Boolean +- 默认值:false +- 作用:是否允许编辑后的后台更新 + +------------ +## functionButton +- 类型:String +- 默认值:"" +- 作用:右上角功能按钮,例如`' '` + +------------ +## showConfigWindowResize +- 类型:Boolean +- 默认值:true +- 作用:图表或数据透视表的配置会在右侧弹出,设置弹出后表格是否会自动缩进 + +------------ +## enablePage +- 类型:Boolean +- 默认值:false +- 作用:允许加载下一页 + +------------ +## chartConfigChange +- 类型:Function +- 默认值:null +- 作用:图表插件中图表更新触发的自定义方法 + +------------ +## beforeCreateDom +- 类型:Function +- 默认值:null +- 作用:表格创建之前自定义方法 + +------------ +## fireMousedown +- 类型:Function +- 默认值:null +- 作用:单元格数据下钻自定义方法 + +------------ \ No newline at end of file diff --git a/docs/zh/guide/data.md b/docs/zh/guide/data.md new file mode 100644 index 000000000..58ed98d9c --- /dev/null +++ b/docs/zh/guide/data.md @@ -0,0 +1,745 @@ +# 表格数据 + +## 获取表格数据 + +- **配置**: + + 配置 `updateUrl` 的地址,Luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有`data`,其余的sheet载入除`data`字段外的所有字段。 + +- **格式**: + 通过全局方法 `luckysheet.getluckysheetfile()`可以获取所有工作表的配置信息。 + + luckysheetfile示例如下: + ```json + [ + { + "name": "Cell", //工作表名称 + "color": "", //工作表颜色 + "config": {}, //表格行高、列宽、合并单元格、边框、隐藏行等设置 + "index": "0", //工作表索引 + "chart": [], //图表配置 + "status": "1", //激活状态 + "order": "0", //工作表的顺序 + "hide": 0,//是否隐藏 + "column": 18, //列数 + "row": 36, //行数 + "celldata": [], //原始单元格数据集 + "visibledatarow": [], //所有行的位置 + "visibledatacolumn": [], //所有列的位置 + "ch_width": 2322, //工作表区域的宽度 + "rh_height": 949, //工作表区域的高度 + "scrollLeft": 0, //左右滚动条位置 + "scrollTop": 315, //上下滚动条位置 + "luckysheet_select_save": [], //选中的区域 + "luckysheet_conditionformat_save": {},//条件格式 + "calcChain": [],//公式链 + "isPivotTable":false,//是否数据透视表 + "pivotTable":{},//数据透视表设置 + "filter_select": null,//筛选范围 + "filter": null,//筛选配置 + "luckysheet_alternateformat_save": [], //交替颜色 + "luckysheet_alternateformat_save_modelCustom": []//自定义交替颜色 + }, + { + "name": "Sheet2", + "color": "", + "status": "0", + "order": "1", + "data": [], + "config": {}, + "index": 1 + }, + { + "name": "Sheet3", + "color": "", + "status": "0", + "order": "2", + "data": [], + "config": {}, + "index": 2 + } + ] + ``` +- **说明**: + + ------------ + ## name + - 类型:String + - 默认值:"Sheet1" + - 作用:工作表名称 + + ------------ + ## color + - 类型:String + - 默认值:"##f20e0e" + - 作用:工作表颜色,工作表名称下方会有一条底部边框 + + ------------ + ## index + - 类型:Number + - 默认值:0 + - 作用:工作表索引,从0开始 + + ------------ + ## status + - 类型:Number + - 默认值:1 + - 作用: 激活状态,仅有一个激活状态的工作表,其他工作表为 0 + + ------------ + ## order + - 类型:Number + - 默认值:0 + - 作用: 工作表的顺序,新增工作表时会递增,从0开始 + + ------------ + ## hide + - 类型:Number + - 默认值:0 + - 作用: 是否隐藏,`0`为不隐藏,`1`为隐藏 + + ------------ + ## column + - 类型:Number + - 默认值:18 + - 作用: 单元格列数 + + ------------ + ## row + - 类型:Number + - 默认值:36 + - 作用: 单元格行数 + + ------------ + ## visibledatarow + - 类型:Number + - 默认值:[] + - 作用: 所有行的位置信息,递增的行位置数据 + + ------------ + ## visibledatacolumn + - 类型:Number + - 默认值:[] + - 作用: 所有列的位置信息,递增的列位置数据 + + ------------ + ## ch_width + - 类型:Number + - 默认值:2322 + - 作用: 整个工作表区域的宽度(包含边界的灰色区域) + + ------------ + ## rh_height + - 类型:Number + - 默认值:2322 + - 作用: 整个工作表区域的高度(包含边界的灰色区域) + + ------------ + ## scrollLeft + - 类型:Number + - 默认值:0 + - 作用: 左右滚动条位置 + + ------------ + ## scrollTop + - 类型:Number + - 默认值:0 + - 作用: 上下滚动条位置 + + ------------ + ## config + - 类型:Object + - 默认值:{} + - 作用:表格行高、列宽、合并单元格、边框、隐藏行等设置 + + ### config.merge + - 类型:Object + - 默认值:{} + - 作用:合并单元格设置,示例: + ```js + { + "13_5": { + "r": 13, + "c": 5, + "rs": 3, + "cs": 1 + }, + "13_7": { + "r": 13, + "c": 7, + "rs": 3, + "cs": 2 + }, + "14_2": { + "r": 14, + "c": 2, + "rs": 1, + "cs": 2 + } + } + ``` + 对象中的`key`为`r + '_' + c`的拼接值,`value`为左上角单元格信息: r:行数,c:列数,rs:合并的行数,cs:合并的列数 + + ### config.rowlen + - 类型:Object + - 默认值:{} + - 作用:每个单元格的行高,示例: + ```js + "rowlen": { + "0": 20, + "1": 20, + "2": 20 + } + ``` + + ### config.columlen + - 类型:Object + - 默认值:{} + - 作用:每个单元格的列宽,示例: + ```js + "columlen": { + "0": 97, + "1": 115, + "2": 128 + } + ``` + + ### config.borderInfo + - 类型:Object + - 默认值:{} + - 作用:单元格的边框信息,示例: + ```js + "borderInfo": [{ + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 3, + "l": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 10, + "color": "rgb(255, 0, 0)" + } + } + }, + { + "rangeType": "range", + "borderType": "border-all", + "style": "3", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [2, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-inside", + "style": "3", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [8, 9] + }] + }] + ``` + 范围类型分单个单元格和选区两种情况 + 1. 选区 `rangeType: "range"` + + - 边框类型 `borderType:"border-left" | "border-right" | "border-top" | "border-bottom" | "border-all" | "border-outside" | "border-inside" | "border-horizontal" | "border-vertical" | "border-none"`, + - 边框粗细 `style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick` + - 边框颜色 `color: 16进制颜色值` + - 选区范围 `range: 行列信息数组` + + 2. 单个单元格 `rangeType:"cell"` + - 行数和列数 `value.row_index: 数字,value.col_index: 数字` + - 四个边框对象 `value.l:左边框,value.r:右边框,value.t:上边框,value.b:下边框` + - 边框粗细 `value.l.style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick` + - 边框颜色 `value.l.color: 16进制颜色值` + + ### config.rowhidden + - 类型:Object + - 默认值:{} + - 作用:隐藏行信息,示例: + ```js + "rowhidden": { + "30": 0, + "31": 0 + } + ``` + - 行数:`rowhidden[行数]: 0`,`key`指定行数即可,`value`总是为`0` + + ------------ + ## celldata + - 类型:Array + - 默认值:[] + - 作用: 原始单元格数据集,是一个包含`{r:0,c:0,v:{m:"value",v:"value",ct: {fa: "General", t: "g"}}}`格式单元格信息的一维数组,只在初始化的时候使用,使用celldata初始化完表格后,数据转换为luckysheetfile中的同级字段data,如`luckysheetfile[0].data`,后续操作表格的数据更新,会更新到这个data字段中,celldata不再使用。如果需要将data拿出来作为初始化数据,则需要执行 `luckysheet.getGridData(data)`转换为celldata数据。其中`rcv`一维数组转换为二维数组使用的是`luckysheet.buildGridData(luckysheetfile)`,传入参数为表格数据对象`luckysheetfile`,示例: + ```js + [{ + "r": 0, + "c": 0, + "v": { + ct: {fa: "General", t: "g"}, + m:"value1", + v:"value1" + } + }, { + "r": 0, + "c": 1, + "v": { + ct: {fa: "General", t: "g"}, + m:"value2", + v:"value2" + } + }] + ``` + + ------------ + ## luckysheet_select_save + - 类型:Array + - 默认值:[] + - 作用: 选中的区域,支持多选,是一个包含多个选区对象的一维数组,示例: + ```js + [ + { + "left": 0, + "width": 97, + "top": 0, + "height": 20, + "left_move": 0, + "width_move": 97, + "top_move": 0, + "height_move": 41, + "row": [ 0, 1 ], + "column": [ 0, 0 ], + "row_focus": 0, + "column_focus": 0 + }, + { + "left": 98, + "width": 73, + "top": 63, + "height": 20, + "left_move": 98, + "width_move": 189, + "top_move": 63, + "height_move": 41, + "row": [ 3, 4 ], + "column": [ 1, 2 ], + "row_focus": 3, + "column_focus": 1 + }, + { + "left": 288, + "width": 128, + "top": 21, + "height": 20, + "left_move": 288, + "width_move": 128, + "top_move": 21, + "height_move": 62, + "row": [ 1, 3 ], + "column": [ 3, 3 ], + "row_focus": 1, + "column_focus": 3 + } + ] + ``` + + ------------ + ## luckysheet_conditionformat_save + - 类型:Array + - 默认值:[] + - 作用: 条件格式配置信息,包含多个条件格式配置对象的一维数组, + + type: "default": 突出显示单元格规则和项目选区规则, + + "dataBar":数据条, + + "icons":图标集, + + "colorGradation": 色阶 + + 示例: + ```js + [ + { + "type": "default", + "cellrange": [ + { + "row": [ 2, 7 ], + "column": [ 2, 2 ] + } + ], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "betweenness", + "conditionRange": [ + { + "row": [ 4, 4 ], + "column": [ 2, 2 ] + }, + { + "row": [ 6, 6 ], + "column": [ 2, 2 ] + } + ], + "conditionValue": [ 2, 4 + ] + }, + { + "type": "dataBar", + "cellrange": [ + { + "row": [ 10, 15 ], + "column": [ 10, 11 ] + } + ], + "format": [ + "#6aa84f", + "#ffffff" + ] + }, + { + "type": "icons", + "cellrange": [ + { + "row": [ 19, 23 ], + "column": [ 2, 2 ] + } + ], + "format": { + "len": "3", + "leftMin": "0", + "top": "0" + } + }, + { + "type": "colorGradation", + "cellrange": [ + { + "left": 422, + "width": 100, + "top": 210, + "height": 20, + "left_move": 422, + "width_move": 100, + "top_move": 210, + "height_move": 125, + "row": [ 10, 15 ], + "column": [ 6, 6 ], + "row_focus": 10, + "column_focus": 6 + } + ], + "format": [ + "rgb(99, 190, 123)", + "rgb(255, 235, 132)", + "rgb(248, 105, 107)" + ] + } + ] + ``` + + ------------ + ## calcChain + - 类型:Array + - 默认值:[] + - 作用: 公式链,用于公式所链接的单元格改变后,所有引用此单元格的公式都会联动刷新,示例: + ```js + [{ + "r": 6, + "c": 3, + "index": 1, + "func": [true, 23.75, "=AVERAGE(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 7, + "c": 3, + "index": 1, + "func": [true, 30, "=MAX(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }] + ``` + + ------------ + ## isPivotTable + - 类型:Boolean + - 默认值:false + - 作用: 是否数据透视表 + + ------------ + ## pivotTable + - 类型:Object + - 默认值:{} + - 作用: 数据透视表设置,示例: + ```js + { + "pivot_select_save": { + "left": 0, + "width": 73, + "top": 0, + "height": 19, + "left_move": 0, + "width_move": 369, + "top_move": 0, + "height_move": 259, + "row": [0, 12], + "column": [0, 4], + "row_focus": 0, + "column_focus": 0 + }, + "pivotDataSheetIndex": 6, //The sheet index where the source data is located + "column": [{ + "index": 3, + "name": "subject", + "fullname": "subject" + }], + "row": [{ + "index": 1, + "name": "student", + "fullname": "student" + }], + "filter": [], + "values": [{ + "index": 4, + "name": "score", + "fullname": "count:score", + "sumtype": "COUNTA", + "nameindex": 0 + }], + "showType": "column", + "pivotDatas": [ + ["count:score", "science", "mathematics", "foreign language", "English", "total"], + ["Alex", 1, 1, 1, 1, 4], + ["Joy", 1, 1, 1, 1, 4], + ["Tim", 1, 1, 1, 1, 4], + ["total", 3, 3, 3, 3, 12] + ], + "drawPivotTable": false, + "pivotTableBoundary": [5, 6] + } + ``` + + ------------ + ## filter_select + - 类型:Object + - 默认值:{} + - 作用: 筛选范围,一个选区,一个sheet只有一个筛选范围,类似`luckysheet_select_save`示例: + ```js + { + "left": 74, + "width": 73, + "top": 40, + "height": 19, + "left_move": 74, + "width_move": 221, + "top_move": 40, + "height_move": 99, + "row": [ + 2, + 6 + ], + "column": [ + 1, + 3 + ], + "row_focus": 2, + "column_focus": 1 + } + ``` + + ------------ + ## filter + - 类型:Object + - 默认值:{} + - 作用: 筛选的具体设置,示例: + ```js + { + "0": { + "caljs": {}, + "rowhidden": { + "3": 0, + "4": 0 + }, + "optionstate": true, + "str": 2, + "edr": 6, + "cindex": 1, + "stc": 1, + "edc": 3 + }, + "1": { + "caljs": {}, + "rowhidden": { + "6": 0 + }, + "optionstate": true, + "str": 2, + "edr": 6, + "cindex": 2, + "stc": 1, + "edc": 3 + } + } + ``` + + ------------ + ## luckysheet_alternateformat_save + - 类型:Array + - 默认值:[] + - 作用: 交替颜色配置,示例: + ```js + [{ + "cellrange": { + "row": [1, 6], + "column": [1, 5] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5ed593" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }, + "hasRowHeader": false, + "hasRowFooter": false + }, { + "cellrange": { + "row": [1, 6], + "column": [8, 12] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5599fc" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#ecf2fe" + }, + "foot": { + "fc": "#000", + "bc": "#afcbfa" + } + }, + "hasRowHeader": false, + "hasRowFooter": false + }] + ``` + + ------------ + ## luckysheet_alternateformat_save_modelCustom + - 类型:Array + - 默认值:[] + - 作用:自定义交替颜色,包含多个自定义交替颜色的配置,示例: + ```js + [{ + "head": { + "fc": "#6aa84f", + "bc": "#ffffff" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }] + ``` + + ------------ + ## chart + - 类型:Array + - 默认值:[] + - 作用: 图表配置(开发中) + + ------------ + +## 获取sheet数据 + +- **配置**: + + 配置`loadSheetUrl`的地址,参数为`gridKey`(表格主键) 和 `index`(sheet主键合集,格式为`[1,2,3]`),返回的数据为sheet的`data`字段数据集合 + +- **格式**: + + ```json + { + "1": [{r:0, c:1, v:"值1"},{r:10, c:11, v:"值2"}], + "2": [data], + "3": [data], + } + ``` +- **说明**: + + r代表行,c代表列,v代表该单元格的值,值可以是字符、数字或者json串。 + 数据只会载入一次,一般来说都只有一个主键,但是考虑到一些公式、图表及数据透视表会引用其他sheet的数据,所以前台会加一个判断,如果该当前sheet引用了其他sheet的数据则把引用到的sheet的数据一并补全。 + +## 获取range范围数据 + +- **配置**: + + 配置 `loadCellUrl` 的地址,参数为`gridKey`(表格主键) 、 `index`(sheet主键)、开始行、结束行、开始列、结束列。后台根据范围获取指定的`celldata`数据并返回。 + +## 更新数据 + +- **配置**: + + 配置 `updateUrl` 的地址,发送到后台的参数为json的字符串。 + +- **格式**: + + ```json + { + compress: false, + gridKey:10004, + data: [更新数据] + } + ``` + +- **说明**: + + | 参数 | 说明 | 举例 | + | ------------ | ------------ | ------------ | + | compress | Luckysheet采用客户端pako进行zlib参数压缩,如果浏览器支持压缩则为true,否则为false。后台可以根据此参数决定是否解压data中的内容 | 服务端获取参数过程:1. 序列化json字符串 2. 判断compress字段如果为TRUE则解压data字段 3. 解码data字符串URLDecoder.decode(utf-8) | + | gridKey | Luckysheet文件的标识符 | 无 | + | data | 一个包含更新数据的数组,数组中的参数格式请看下面的介绍。实例中:`t`表示更新类型、`i`为sheet的索引、`c`为行号、`r`为列号,`v`为值 | `data: [{ t : 'cell', i:0, c : 0, r : 0 , v: 2 }]` | diff --git a/docs/zh/guide/feature.md b/docs/zh/guide/feature.md new file mode 100644 index 000000000..e25ba634b --- /dev/null +++ b/docs/zh/guide/feature.md @@ -0,0 +1,124 @@ +# 高级功能 + +## luckysheet.getcellvalue(r, c, data, type) +- **参数**: + - r:单元格所在行数;可选值;从0开始的整数,0表示第一行。 + - c:单元格所在列数;可选值;从0开始的整数,0表示第一列。 + - data:表数据;二维数组;默认值为当前表格数据。 + - type:单元格属性值;可选值;默认值为'v',表示获取单元格的值。 +- **用法**: + + 此方法为获取单元格的值。`r`, `c`都没有值时,返回`data`;`r`, `c`只有一个有值时,返回整行或整列数据; + +------------ +## luckysheet.getluckysheetfile() +- **用法**: + + 返回所有表格数据结构。 + +------------ +## luckysheet.sheetmanage.getSheetByIndex(index) +- **参数**: + - index:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 +- **用法**: + + 返回某个表格数据结构。 + +------------ +## luckysheet.getconfig() +- **用法**: + + 返回当前表格config配置。 + +------------ +## luckysheet.getSheetConfig(sheetIndex) +- **参数**: + - sheetIndex:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 +- **用法**: + + 返回某个表格config配置。 + +------------ +## luckysheet.getvisibledatarow() +- **用法**: + + 返回当前表格行高。 + +------------ +## luckysheet.getvisibledatacolumn() +- **用法**: + + 返回当前表格列宽。 + +------------ +## luckysheet.getluckysheet_select_save() +- **用法**: + + 返回当前选区。 + +------------ +## luckysheet.getdatabyselection(range, sheetIndex) +- **参数**: + - range:选区对象;`object: { row: [r1, r2], column: [c1, c2] }`;默认为当前选区。 + - sheetIndex:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 +- **用法**: + + 返回某个表格某个区域单元格数据。 + +------------ +## luckysheet.luckysheetrefreshgrid(scrollWidth, scrollHeight) +- **参数**: + - scrollWidth:横向滚动值。默认为当前横向滚动位置。 + - scrollHeight:纵向滚动值。默认为当前纵向滚动位置。 +- **用法**: + + 按照scrollWidth, scrollHeight刷新canvas展示数据。 + +------------ +## luckysheet.setcellvalue(r, c, d, v) +- **参数**: + - r:单元格所在行数;从0开始的整数,0表示第一行。 + - c:单元格所在列数;从0开始的整数,0表示第一列。 + - d:表数据;二维数组。 + - v:要设置的值;可为对象,对象是是要符合单元格对象格式。 +- **用法**: + + 设置某个单元格的值。可配合`luckysheet.luckysheetrefreshgrid()`刷新查看单元格值改变。 + ```js + luckysheet.setcellvalue(0, 0, luckysheet.flowdata, 'abc'); + luckysheet.luckysheetrefreshgrid(); + ``` + +------------ +## luckysheet.setluckysheet_select_save(v) +- **参数**: + - v:要设置的选区值(数组)。符合选区格式规则,如`[{ row: [r1, r2], column: [c1, c2] }]`。 +- **用法**: + + 设置当前表格选区的值。配合`luckysheet.selectHightlightShow()`可在界面查看选区改变。 + ```js + luckysheet.setluckysheet_select_save([{ row: [0, 1], column: [0, 1] }]); + luckysheet.selectHightlightShow(); + ``` + +------------ +## luckysheet.sheetmanage.setSheetHide(index) +- **参数**: + - index:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 +- **用法**: + + 隐藏某个表格。 + +------------ +## luckysheet.sheetmanage.setSheetShow(index) +- **参数**: + - index:表格下标;从0开始的整数,0表示第一个表格;默认为当前表格下标。 +- **用法**: + + 显示某个表格。 + +------------ +## luckysheet.method.destroy() +- **用法**: + + 释放表格 diff --git a/docs/zh/guide/format.md b/docs/zh/guide/format.md new file mode 100644 index 000000000..64fb6c456 --- /dev/null +++ b/docs/zh/guide/format.md @@ -0,0 +1,214 @@ +# 格式属性 + +## 单元格属性表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
属性值全称
说明
值示例Aspose方法或者属性
ctcelltype单元格值格式:文本、时间等单元格格式
bgbackground背景颜色#fff000setBackgroundColor
fffontfamily字体0 微软雅黑、1 宋体(Song)、2 黑体(ST Heiti)、3 楷体(ST Kaiti)、 4仿宋(ST FangSong)、 5 新宋体(ST Song)、 6 华文新魏、 7华文行楷、 8 华文隶书、 9 Arial、 10 Times New Roman 、11 Tahoma 、12 VerdanaStyle.Font object's Name property.
fcfontcolor字体颜色#fff000Style.Font object's Color property
blbold粗体0 常规 、 1加粗Style.Font object's IsBold property to true.
ititalic斜体0 常规 、 1 斜体
fsfontsize字体大小14Style.Font object's Size property.
clcancelline删除线0 常规 、 1 删除线Style.Font object's Underline property
ulunderline下划线0 常规 、 1 下划线
vtverticaltype垂直对齐0 中间、1 上、2下setVerticalAlignment
hthorizontaltype水平对齐0 居中、1 左、2右setHorizontalAlignment
mcmergecell合并单元格{ rs: 10, cs:5 } 表示从此cell开始到10行5列的cell进行合并。Merge
trtextrotate文字旋转0: 0、1: 45 、2:-45、3 竖排文字、4: 90 、5:-90setRotationAngle
flfloatlenght小数位数3
tbtextbeak文本换行0 截断、1溢出、2 自动换行2:setTextWrapped
0和1:IsTextWrapped = true
ovoriginvalue原始值
vvalue显示值
ffunction公式setFormula
setArrayFormula
workbook.calculateFormula();
+ + +以下为3个单元格存储: +```json +[ + {r:0, c:1, v: { v:"显示", f:"=SUM(A2)", bg:"#fff000", bs:"1",bc:"#000"}}, + {r:10, c:11, v:"值2"}, + {r:10, c:11, v:{f:"=sum", v:"100"}} +] +``` + +##
单元格格式
+ +参考[Aspose.Cells](https://docs.aspose.com/display/cellsnet/List+of+Supported+Number+Formats#ListofSupportedNumberFormats-Aspose.Cells) + +格式设置为: + +```json +{ + "v": "", + "f": "", + "ct": { + "v": 1, + "f": "#,##0.00", + "t": " Decimal" + } +} +``` + +|参数|说明|使用| +| ------------ | ------------ | ------------ | +|v|value,Aspose中的快捷设置值|`var currencyStyle = book.CreateStyle();`
`currencyStyle.Number = 8;`| +|f|Format:格式的定义串 `$#,##0;$-#,##0`|`var currencyStyle = book.CreateStyle();`
`currencyStyle.Custom  = "#,##0 SEK";`| +|t|Type类型:
0:General
1:Decimal
2:Currency
3:Percentage
4:Scientific
5:Fraction
6:Date
7:Time
8:Accounting
9:Text
10:DateTime|类型是前端区分的格式,excel导入时根据导入format字符的关键字来区分是哪种类型:
1.含YYYY、MM、DD的是6| + +Aspose设置如下: +| Value | Type | Format String | +|-------|------------|---------------------------------------------| +| 0 | General | General | +| 1 | Decimal | 0 | +| 2 | Decimal | 0\.00 | +| 3 | Decimal | \#,\#\#0 | +| 4 | Decimal | \#,\#\#0\.00 | +| 5 | Currency | $\#,\#\#0;$\-\#,\#\#0 | +| 6 | Currency | $\#,\#\#0;$\-\#,\#\#0 | +| 7 | Currency | $\#,\#\#0\.00;$\-\#,\#\#0\.00 | +| 8 | Currency | $\#,\#\#0\.00;$\-\#,\#\#0\.00 | +| 9 | Percentage | 0% | +| 10 | Percentage | 0\.00% | +| 11 | Scientific | 0\.00E\+00 | +| 12 | Fraction | \# ?/? | +| 13 | Fraction | \# / | +| 14 | Date | m/d/yy | +| 15 | Date | d\-mmm\-yy | +| 16 | Date | d\-mmm | +| 17 | Date | mmm\-yy | +| 18 | Time | h:mm AM/PM | +| 19 | Time | h:mm:ss AM/PM | +| 20 | Time | h:mm | +| 21 | Time | h:mm:ss | +| 22 | Time | m/d/yy h:mm | +| 37 | Currency | \#,\#\#0;\-\#,\#\#0 | +| 38 | Currency | \#,\#\#0;\-\#,\#\#0 | +| 39 | Currency | \#,\#\#0\.00;\-\#,\#\#0\.00 | +| 40 | Currency | \#,\#\#0\.00;\-\#,\#\#0\.00 | +| 41 | Accounting | \_ \* \#,\#\#0\_ ;\_ \* "\_ ;\_ @\_ | +| 42 | Accounting | \_ $\* \#,\#\#0\_ ;\_ $\* "\_ ;\_ @\_ | +| 43 | Accounting | \_ \* \#,\#\#0\.00\_ ;\_ \* "??\_ ;\_ @\_ | +| 44 | Accounting | \_ $\* \#,\#\#0\.00\_ ;\_ $\* "??\_ ;\_ @\_ | +| 45 | Time | mm:ss | +| 46 | Time | h :mm:ss | +| 47 | Time | mm:ss\.0 | +| 48 | Scientific | \#\#0\.0E\+00 | +| 49 | Text | @ | + +导入/导出只用考虑用户看到的数据样式,例如excel中处理日期格式的方式为把日期统一转换为数字:42736 代表 2017-1-1, \ No newline at end of file diff --git a/docs/zh/guide/operate.md b/docs/zh/guide/operate.md new file mode 100644 index 000000000..45469caf5 --- /dev/null +++ b/docs/zh/guide/operate.md @@ -0,0 +1,621 @@ +# 表格操作 + +## 单元格刷新 + +- **格式**: + + ```json + { + "t": "v", + "i": 3, + "v": "asdf", + "r": 5, + "c": 7 + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |i|当前sheet的index值| + |v|单元格的值| + |r|单元格的行号| + |c|单元格的列号| + +- **后台更新**: + + 单元格更新主要是更新 `luckysheetfile[i].celldata` 参数,该参数是一个数组: + ```json + [ + {r:0, c:1, v: "值1"}, + {r:10, c:11, v:"值2"}, + {r:10, c:11, v:{f:"=sum", v:"100"}} + ] + ``` + 存储了sheet中所有单元格中的值,Luckysheet在建立的时候会根据 `luckysheetfile[i].row` 和 `luckysheetfile[i].column` 的行列数量大小新建一个表格data,然后再使用 `data[r][c]=v` 的方式填充表格数据,空数据单元格以null表示。 + + 后台在保存前台推送的数据时,首先需要把参数转换为 `{r:0, c:1:v:100}` 的格式,然后更新 `luckysheetfile[i].celldata` 字段,如果存在该单元格则更新,如果没有则添加,如果存在该单元格但是`v`为null则删除该单元格。 + +- **前台查看**: + + 可以修改任意单元格的数值,然后到chrome控制台中查看`"t"=="v"`的操作。 + +## config操作 + +- **格式**: + + ```json + { + "t": "cg", + "i": 3, + "v": { + "7": 192 + }, + "k": "rowlen" + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |i|当前sheet的index值| + |v|需要更新的内部key-value| + |k|操作的key名称| + +- **后台更新**: + + 更新 `luckysheetfile[i].config.[k][v.key] = v.value` ,如果`config`中不存在`k`,则新建一个`k`属性并设置为空,如果`k`中不存在`v.key`,则新建一个`v.key`再更新`v.value`。 + + 1. 修改行高度举例: + - 输入:`{"t":"cg","i":3,"v":{"3":10, "5":70, "10":100},"k":" rowlen"}` + - 更新:`luckysheetfile[3].config.["rowlen"]["3"] = 10` + + 2. 修改列宽度举例: + - 输入:`{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columlen"}` + - 更新:`luckysheetfile[1].config.["columlen"]["20"] = 74` + + 3. 合并单元格举例: + - 输入:`{"t":"cg","i":1,"v":{"5_10":{row:[1,3], column:[3,5]},"k":" merge "}` + - 更新:`luckysheetfile[1].config.["merge"]["5_10"] = {row:[1,3], column:[3,5]}` + +## 通用保存 + +- **格式**: + + ```json + { + "t": "all", + "i": 3, + "v": { + "v": 1, + "m":1, + }, + "k": "freezen", + "s": false + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |i|当前sheet的index值| + |v|需要更新的内部key-value| + |k|需要保存的key-value中的`value`| + |s|如果是`true`则`v`保存为字符串,否则按照对象进行保存| + +- **后台更新**: + + `luckysheetfile[3].[k]= v` + 如果`s`为`true`,则为 `luckysheetfile[3].[k]= JSON.stringify(v)` + + 1. 数据透视表: + - 输入:`{"t":"all","i":1,"v":{………},"k":"pivotTable", "s": false}` + - 更新:`luckysheetfile[1].["pivotTable"] = {………}` + + 2. 冻结行列: + - 输入:`{"t":"all","i":3,"v":{………},"k":"freezen", "s": false}` + - 更新:`luckysheetfile[3].["freezen"] = {………}` + + 3. 筛选范围: + - 输入:`{"t":"all","i":3,"v":{………},"k":"filter_select", "s": true }` + - 更新:`luckysheetfile[3].["filter_select"] = JSON.stringify ({………})` + + 4. Sheet名称: + - 输入:`{"t":"all","i":1,"v":"文档","k":"name", "s": false}` + - 更新:`luckysheetfile[1].["name"] = "文档"` + + 5. Sheet颜色: + - 输入: `{"t":"all","i":2,"v":"#FFF000","k":"color", "s": false}` + - 更新:`luckysheetfile[2].["color"] = "#FFF000"` + +## 函数链操作 + +- **格式**: + + ```json + { + "t": "fc", + "i": 0, + "v": { + "r": 3, + "c": 7, + "index": 0, + "func": [ + true, + 187282, + "=SUM(E4:G4)" + ] + }, + "op": "add", + "pos": 0 + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |i|当前sheet的index值| + |v|对象值,这里对象的内部字段不需要单独更新,所以存为文本即可| + |op|操作类型,`add`为新增,`update`为更新,`del`为删除| + |pos|更新或者删除的函数位置| + +- **后台更新**: + + calcChain为一个数组 + - 如果`op`的值为`add`则添加到末尾 `luckysheetfile[i].calcChain.push (v)`, + - 如果`op`的值为`update`则更新 `luckysheetfile[i].calcChain[pos]= v`, + - 如果`op`的值为`del`则删除 `luckysheetfile[i].calcChain.splice(pos, 1)`。 + +- **前台查看**: + + 可以修改任意单元格的数值,然后到chrome控制台中查看`"t"=="v"`的操作。 + +## 行列操作 + +### 删除行或列 + +- **格式**: + + ```json + { + "t": "drc", + "i": 3, + "v": { + "index": 6, + "len": 2 + }, + "rc": "r" + } + ``` + +- **说明**: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数说明
t操作类型表示符号
i当前sheet的index值
rc行操作还是列操作,值`r`代表行,`c`代表列
vindex从第几行或者列开始删除
len删除多少行或者列
+ +- **后台更新**: + + 如果`rc`的值是`'r'`删除行, 如果`rc`的值为`'c'`则删除列, 例如`rc='r'`,`index=4`,`len=5`,则代表从第4行开始删除之后的5行(4、5、6、7、8)。 + + 主要是对 `luckysheetfile[i].celldata` 中的单元格进行操作,删除参数中所描述符合条件的单元格并且更新其他单元格的行列值,以上述为例,首先查找单元格中`r`值在4到8的所有单元格并删除,然后把本来行号9以后的单元格的`r`值减去5,最后把 `luckysheetfile[i].row` 减去5。 + 如果`v`值为 `"#__qkdelete#"`(不含引号),则此处为需要删除的单元格。 + +- **前台查看**: + + 可以删除行或者列,然后到chrome控制台中查看`"t"=="drc"`的操作。 + +### 增加行或列 + +- **格式**: + + ```json + { + "t": "arc", + "i": 0, + "v": { + "index": 5, + "len": 10, + "data": [] + }, + "rc": "c" + } + ``` + +- **说明**: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数说明
t操作类型表示符号
i当前sheet的index值
rc行操作还是列操作,值`r`代表行,`c`代表列
vindex从第几行或者列开始新增
len增加多少行或者列
data新增行或者列的内容
+ +- **后台更新**: + + 如果`rc`的值是`r`新增行, 如果`rc`的值为`c`则新增列, 例如`rc=r,index=4,len=5`,则代表从第4行开始增加5行,如果`data`为空则增加空行,如果`data`不为空则用`data`中的数组添加新增的行中。 + + 主要是对 `luckysheetfile[i].celldata` 中的单元格进行操作,以上述为例,首先 `luckysheetfile[i].row` 加5,然后把`r`大于4的单元格的整体的`r`值+5,如果`data`为空则增加空行则结束,如果`data`不为空则把二维数组`data`转换为 `{r:0,c:0,v:100}` 的格式并添加到`celldata`中,转换的伪代码如下: + + ```javascript + var ret = []; + for(var r=0;r + + 参数 + 说明 + + + t + 操作类型表示符号 + + + i + 当前sheet的index值 + + + v + name + 隐藏后跳转的sheet的index值 + + + color + Sheet颜色 + + + status + 激活状态 + + + order + Sheet摆放顺序 + + + index + Index索引 + + + celldata + 单元格数据集 + + + config + 设置 + + + pivotTable + 数据透视表设置 + + + isPivotTable + 是否数据透视表 + + + + +- **后台更新**: + + 添加一行(一个文档)到数据库中。 + +### 复制sheet + +- **格式**: + + ```json + { + "t": "shc", + "i": "新建sheet的位置", + "v": { + "copyindex": "copyindex" + } + } + ``` + +- **后台更新**: + + 复制表格中的sheet索引值为`copyindex`并添加到数据库中,添加的设置该新文档的`index`为`i`对应的值。 + +### 删除sheet + +- **格式**: + + ```json + { + "t": "shd", + "i": null, + "v": { + "deleIndex": 0 + } + } + ``` + +- **说明**: + + + + + + + + + + + + + + + + +
参数说明
t操作类型表示符号
vdeleIndex需要删除的sheet索引
+ +- **后台更新**: + + 删除索引为`deleIndex`对应值的sheet。 + +### 位置 + +- **格式**: + + ```json + { + "t": "shr", + "v": { + "index": "positon" + } + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |v|设置Sheet的排序,为一个键值对,`key`代表sheet的`index`,`value`代表`order`值。格式为:`{"1": 3, "2":1, "0": 2, "3":0}`| + +- **后台更新**: + + 对sheet的`index`等于`key`的页,设置其`order`属性为`value`值。示例: + + `luckysheetfile[key1].order = value1` + `luckysheetfile[key2].order = value2` + `luckysheetfile[key3].order = value3` + +## sheet属性(隐藏或显示) + +- **格式**: + + ```json + { + "t": "sh", + "i": 0, + "v": 1, + "op": " hide", + "cur": 2 + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |i|当前sheet的index值| + |op|操作选项,有hide、show| + |v|如果`hide`为`1`则隐藏,为`0`或者空则为显示| + |cur|隐藏后设置索引对应`cur`的sheet为激活状态| + +- **后台更新**: + + 更新`i`对应sheet的根路径`hide`字段为`v`,当隐藏时`status`值为`0`,当显示时为`1`,如果为隐藏则更新`index`对应`cur`的sheet的`status`状态为`1`。 + +## 表格信息更改 + +### 表格名称 + +- **格式**: + + ```json + { + "t": "na", + "i": null, + "v": "数据" + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |v|表格的名称| + +- **后台更新**: + + 根据gridkey更新数据库中的表格名称。 + +### 缩略图 + +- **格式**: + + ```json + { + "t": "thumb", + "img": "base64", + "curindex": "curindx" + } + ``` + +- **说明**: + + |参数|说明| + | ------------ | ------------ | + |t|操作类型表示符号| + |img|当前表格的缩略图,为base64字符串| + |curindex|当前表格默认打开的sheet| + +- **后台更新**: + + 根据gridkey更新mysql中表格的缩略图字段为img值,同时更新index为curindex值的sheet的status字段为1,设置其他sheet的status值为0。 \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 498fd55ae..2ac9305e8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,87 +1,247 @@ const gulp = require('gulp'); -// gulp 核心方法 +// gulp core function const { src, dest, series, parallel, watch } = require('gulp'); -// gulp压缩js +// gulp compress js const uglify = require('gulp-uglify'); -// gulp判断 +// gulp judgment const gulpif = require('gulp-if'); -// gulp压缩css +// gulp compress css const cleanCSS = require('gulp-clean-css'); -// 删除文件 +// Delete Files const del = require('delete'); -// 实时刷新浏览器 +// Refresh the browser in real time const browserSync = require('browser-sync').create(); const reload = browserSync.reload; -// 文件合并 -const useref = require('gulp-useref'); -// uglify js压缩配置 https://github.com/mishoo/UglifyJS#minify-options +// According to html reference, files are merged +// const useref = require('gulp-useref'); +// File merge +const concat = require('gulp-concat'); +// rollup packaging, processing es6 modules +const { rollup } = require('rollup'); +// rollup looks for node_modules module +const { nodeResolve } = require('@rollup/plugin-node-resolve'); +// rollup converts commonjs module to es6 module +const commonjs = require('@rollup/plugin-commonjs'); +// rollup code compression +const terser = require('rollup-plugin-terser').terser; +// rollup babel plugin, support the latest ES grammar +const babel = require('@rollup/plugin-babel').default; +// Distinguish development and production environments +const production = process.env.NODE_ENV === 'production' ? true : false; + +// uglify js Compression configuration https://github.com/mishoo/UglifyJS#minify-options const uglifyOptions = { compress: { drop_console: true } } -// 清除dist目录 +// babel config +const babelConfig = { + babelHelpers: 'bundled', + exclude: 'node_modules/**', // Only compile our source code + plugins: [ + ], + presets: [ + '@babel/preset-env' + ] +}; + +// file handler paths +const paths = { + // static resources,contains index.html, fonts and images,and extension plugins dependency + staticHtml: ['src/*.html'], + staticFonts: ['src/fonts/**'], + staticImages: ['src/plugins/images/*.png'], + staticExpendPlugins: ['src/expendPlugins/**', '!src/expendPlugins/**/plugin.js'], + staticDemoData: ['src/demoData/*.js'], + staticCssImages: ['src/css/**','!src/css/*.css'], + + // static resources dest + destStaticHtml: ['dist'], + destStaticFonts: ['dist/fonts'], + destStaticImages: ['dist/plugins/images'], + destStaticExpendPlugins: ['dist/expendPlugins'], + destStaticDemoData: ['dist/demoData'], + destStaticCssImages: ['dist/css'], + + //core es module + core: ['src/**/*.js','!src/demoData/*.js','src/expendPlugins/**/plugin.js','!src/plugins/js/*.js'], + + //plugins src + pluginsCss: ['src/plugins/css/*.css'], + plugins: ['src/plugins/*.css'], + css:['src/css/*.css'], + pluginsJs:[ + 'src/plugins/js/jquery.min.js', + 'src/plugins/js/clipboard.min.js', + 'src/plugins/js/spectrum.min.js', + 'src/plugins/js/jquery-ui.min.js', + 'src/plugins/js/jquery.mousewheel.min.js', + 'src/plugins/js/moment.min.js', + 'src/plugins/js/moment-timezone-with-data.min.js', + 'src/plugins/js/moment-msdate.js', + 'src/plugins/js/numeral.min.js', + 'src/plugins/js/html2canvas.min.js', + 'src/plugins/js/pako.min.js', + 'src/plugins/js/localforage.min.js', + 'src/plugins/js/lodash.min.js', + 'src/plugins/js/daterangepicker.js', + 'src/plugins/js/jstat.min.js' + ], + + //plugins concat + concatPluginsCss: 'pluginsCss.css', + concatPlugins: 'plugins.css', + concatCss: 'luckysheet.css', + concatPluginsJs: 'plugin.js', + + //plugins dest + destPluginsCss: ['dist/plugins/css'], + destPlugins: ['dist/plugins'], + destCss: ['dist/css'], + destPluginsJs: ['dist/plugins/js'], + + // Package directory + dist: 'dist', +}; + +// Clear the dist directory function clean() { - return del(['dist']); -} -//监听文件+重载 -function watchReload() { - serve(); - const watcher = watch(['src/**']); - - // 多次刷新节流 - let reloadTimer = null; - watcher.on('change', function (path, stats) { - if (reloadTimer !== null) { - return; + return del([paths.dist]); +} + +// Static server +function serve(done) { + browserSync.init({ + server: { + baseDir: paths.dist } - reloadTimer = setTimeout(() => { - reload(); - reloadTimer = null; - }, 500); + }, done) +} + +// Monitoring file changes +function watcher(done) { + watch(paths.core,{ delay: 500 }, series(core, reloadBrowser)); + + // watch plugins and css + watch(paths.pluginsCss,{ delay: 500 }, series(pluginsCss, reloadBrowser)); + watch(paths.plugins,{ delay: 500 }, series(plugins, reloadBrowser)); + watch(paths.css,{ delay: 500 }, series(css, reloadBrowser)); + watch(paths.pluginsJs,{ delay: 500 }, series(pluginsJs, reloadBrowser)); + + // watch static + watch(paths.staticHtml,{ delay: 500 }, series(copyStaticHtml, reloadBrowser)); + watch(paths.staticFonts,{ delay: 500 }, series(copyStaticFonts, reloadBrowser)); + watch(paths.staticImages,{ delay: 500 }, series(copyStaticImages, reloadBrowser)); + watch(paths.staticExpendPlugins,{ delay: 500 }, series(copyStaticExpendPlugins, reloadBrowser)); + watch(paths.staticDemoData,{ delay: 500 }, series(copyStaticDemoData, reloadBrowser)); + watch(paths.staticCssImages,{ delay: 500 }, series(copyStaticCssImages, reloadBrowser)); + + done(); +} + +// Refresh browser +function reloadBrowser(done) { + reload(); + done(); +} + +//Package the core code +async function core() { + const bundle = await rollup({ + input: 'src/index.js', + plugins: [ + nodeResolve(), // tells Rollup how to find date-fns in node_modules + commonjs(), // converts date-fns to ES modules + // postcss({ + // plugins: [], + // extract: true, + // // minimize: isProductionEnv, + // }), + production && terser(), // minify, but only in production + babel(babelConfig) + ], }); + + bundle.write({ + file: 'dist/luckysheet.umd.js', + format: 'umd', + name: 'luckysheet', + sourcemap: true + }); + + if(production){ + bundle.write({ + file: 'dist/luckysheet.esm.js', + format: 'esm', + name: 'luckysheet', + sourcemap: true + }); + } + } -// 打包js -function js() { - return src(['src/**/*.html', '!src/lib/**']) - .pipe(useref(), function () { - return vinylPaths(del) - }) - .pipe(gulpif(isJavaScript, uglify(uglifyOptions))) - .pipe(gulpif(isCss, cleanCSS())) - .pipe(dest('dist/')) +// According to the build tag in html, package js and css +function pluginsCss() { + return src(paths.pluginsCss) + .pipe(concat(paths.concatPluginsCss)) + .pipe(gulpif(production, cleanCSS())) + .pipe(dest(paths.destPluginsCss)) + } -// 打包其他文件 -function otherFile() { - return src(['src/**', '!src/**/*.html', '!src/**/*.js', '!src/**/*.css', '!src/lib/**']) - .pipe(dest('dist/')) + +function plugins() { + return src(paths.plugins) + .pipe(concat(paths.concatPlugins)) + .pipe(gulpif(production, cleanCSS())) + .pipe(dest(paths.destPlugins)); } -// 静态服务器 -function serve() { - browserSync.init({ - server: { - baseDir: "src" - } - }); +function css() { + return src(paths.css) + .pipe(concat(paths.concatCss)) + .pipe(gulpif(production, cleanCSS())) + .pipe(dest(paths.destCss)); } -// 判断文件的扩展名是否是 '.js' , 且需要为未压缩过的js -function isJavaScript(file) { - return file.extname === '.js'; +function pluginsJs() { + return src(paths.pluginsJs) + .pipe(concat(paths.concatPluginsJs)) + .pipe(gulpif(production, uglify(uglifyOptions))) + .pipe(dest(paths.destPluginsJs)); } -// 判断文件的扩展名是否是 '.css' , 且需要为未压缩过的css -function isCss(file) { - return file.extname === '.css'; +// Copy static resources +function copyStaticHtml(){ + return src(paths.staticHtml) + .pipe(dest(paths.destStaticHtml)); +} +function copyStaticFonts(){ + return src(paths.staticFonts) + .pipe(dest(paths.destStaticFonts)); +} +function copyStaticImages(){ + return src(paths.staticImages) + .pipe(dest(paths.destStaticImages)); +} +function copyStaticExpendPlugins(){ + return src(paths.staticExpendPlugins) + .pipe(dest(paths.destStaticExpendPlugins)); +} +function copyStaticDemoData(){ + return src(paths.staticDemoData) + .pipe(dest(paths.destStaticDemoData)); +} +function copyStaticCssImages(){ + return src(paths.staticCssImages) + .pipe(dest(paths.destStaticCssImages)); } -const build = series(clean, parallel(js, otherFile)); -const dev = watchReload; +const dev = series(clean, parallel(pluginsCss, plugins, css, pluginsJs, copyStaticHtml, copyStaticFonts, copyStaticImages, copyStaticExpendPlugins, copyStaticDemoData, copyStaticCssImages, core), watcher, serve); +const build = series(clean, parallel(pluginsCss, plugins, css, pluginsJs, copyStaticHtml, copyStaticFonts, copyStaticImages, copyStaticExpendPlugins, copyStaticDemoData, copyStaticCssImages, core)); -exports.build = build; exports.dev = dev; -exports.default = build; \ No newline at end of file +exports.build = build; +exports.default = dev; \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000..169b36aea --- /dev/null +++ b/index.html @@ -0,0 +1,70 @@ + + + + + + + + + Luckysheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/package.json b/package.json index e35267a09..2c184206d 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,46 @@ { "name": "luckysheet", - "version": "1.0.0", + "version": "1.0.1-6", "main": "dist/luckysheet.cjs.js", "module": "dist/luckysheet.esm.js", "browser": "dist/luckysheet.umd.js", "devDependencies": { + "@babel/preset-env": "^7.10.2", + "@commitlint/cli": "^9.1.1", + "@commitlint/config-conventional": "^9.1.1", + "@rollup/plugin-babel": "^5.0.3", + "@rollup/plugin-commonjs": "^13.0.0", + "@rollup/plugin-node-resolve": "^8.0.1", "browser-sync": "^2.26.7", + "commitizen": "^4.1.2", + "cross-env": "^7.0.2", "delete": "^1.1.0", "gulp": "^4.0.2", "gulp-clean-css": "^4.3.0", + "gulp-concat": "^2.6.1", "gulp-if": "^3.0.0", "gulp-uglify": "^3.0.2", "gulp-useref": "^4.0.1", + "rollup": "^2.16.1", + "rollup-plugin-terser": "^6.1.0", + "standard-version": "^8.0.2", "vuepress": "^1.5.0" }, "dependencies": {}, "scripts": { - "build": "gulp build", - "dev": "gulp dev", + "build": "cross-env NODE_ENV=production gulp build", + "dev": "cross-env NODE_ENV=development gulp dev", "docs:dev": "vuepress dev docs", - "docs:build": "vuepress build docs" + "docs:build": "vuepress build docs", + "commit": "git-cz", + "release": "standard-version" }, "files": [ "dist" - ] + ], + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + } } diff --git a/src/chartMix.css b/src/chartMix.css deleted file mode 100644 index a429ca0d8..000000000 --- a/src/chartMix.css +++ /dev/null @@ -1,22 +0,0 @@ - .chart-render-loading{ - position: absolute; - top:0; - left:0; - background: rgba(0,0,0,0.1); - width:100%; - height:100%; - } - .chart-render-loading>div{ - position: absolute; - top:50%; - left:50%; - transform: translate(-50%, -50%); - max-height: 200px; - width: 15%; - height: 15%; - /*background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwcHgiIGhlaWdodD0iMjAwcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIiBjbGFzcz0ibGRzLWJhci1jaGFydCIgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyBiYWNrZ3JvdW5kOiBub25lOyI+PGcgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDUwIDUwKSIgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+PHJlY3QgbmctYXR0ci14PSJ7e2NvbmZpZy54MX19IiB5PSIxNSIgbmctYXR0ci13aWR0aD0ie3tjb25maWcud2lkdGh9fSIgaGVpZ2h0PSI0OC43OTM2IiBmaWxsPSIjZmZiNmJiIiB4PSIxNSIgd2lkdGg9IjEwIiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJoZWlnaHQiIGNhbGNNb2RlPSJzcGxpbmUiIHZhbHVlcz0iNTA7NzA7MzA7NTAiIGtleVRpbWVzPSIwOzAuMzM7MC42NjsxIiBkdXI9IjEiIGtleVNwbGluZXM9IjAuNSAwIDAuNSAxOzAuNSAwIDAuNSAxOzAuNSA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FsY01vZGU9InNwbGluZSIgdmFsdWVzPSI1MDs3MDszMDs1MCIga2V5VGltZXM9IjA7MC4zMzswLjY2OzEiIGR1cj0iMSIga2V5U3BsaW5lcz0iMC41IDAgMC41IDE7MC41IDAgMC41IDE7MC41IDAgMC41IDEiIGJlZ2luPSItMC42cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIHN0eWxlPSJhbmltYXRpb24tcGxheS1zdGF0ZTogcnVubmluZzsgYW5pbWF0aW9uLWRlbGF5OiAwczsiPjwvYW5pbWF0ZT48L3JlY3Q+PHJlY3QgbmctYXR0ci14PSJ7e2NvbmZpZy54NH19IiB5PSIxNSIgbmctYXR0ci13aWR0aD0ie3tjb25maWcud2lkdGh9fSIgaGVpZ2h0PSI0MS4yMiIgZmlsbD0iIzU4NTg3MiIgeD0iNzUiIHdpZHRoPSIxMCIgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+PGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iaGVpZ2h0IiBjYWxjTW9kZT0ic3BsaW5lIiB2YWx1ZXM9IjUwOzcwOzMwOzUwIiBrZXlUaW1lcz0iMDswLjMzOzAuNjY7MSIgZHVyPSIxIiBrZXlTcGxpbmVzPSIwLjUgMCAwLjUgMTswLjUgMCAwLjUgMTswLjUgMCAwLjUgMSIgYmVnaW49IjBzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+PC9hbmltYXRlPjwvcmVjdD48L2c+PC9zdmc+) top center no-repeat; - background-size:cover;*/ - - } - /*查看chart json的框高度*/ - .dialogShowChartJson .el-textarea__inner{ min-height: 250px !important;} diff --git a/src/config.js b/src/config.js new file mode 100644 index 000000000..045b13752 --- /dev/null +++ b/src/config.js @@ -0,0 +1,55 @@ +/** + * The default luckysheet config object. + */ +export default { + container: "luckysheet", //容器的ID + column: 60, //空表格默认的列数量 + row: 84, //空表格默认的行数据量 + allowCopy: true, //是否允许拷贝 + showtoolbar: true, //是否第二列显示工具栏 + showinfobar: true, //是否显示顶部名称栏 + showsheetbar: true, //是否显示底部表格名称区域 + showstatisticBar: true, //是否显示底部计数栏 + pointEdit: false, //是否是编辑器插入表格模式 + pointEditUpdate: null, //编辑器表格更新函数 + pointEditZoom: 1, //编辑器表格编辑时缩放比例 + // menu: "undo|redo|freezenrow|freezencolumn|download|share|chart|pivot", + data: [{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }], //客户端sheet数据[shee1, sheet2, sheet3] + title: "Luckysheet Demo", //表格的名称 + userInfo: ' rabbit', //右上角的用户信息展示样式 + userMenuItem: [{url:"www.baidu.com", "icon":'', "name":"我的表格"}, {url:"www.baidu.com", "icon":'', "name":"退出登陆"}], //点击右上角的用户信息弹出的菜单 + myFolderUrl: "www.baidu.com", //左上角<返回按钮的链接 + config: {}, //表格行高、列宽、合并单元格、公式等设置 + fullscreenmode: true, //是否全屏模式,非全屏模式下,标记框不会强制选中。 + devicePixelRatio: window.devicePixelRatio, //设备比例,比例越大表格分标率越高 + allowEdit: true, //是否允许前台编辑 + loadUrl: "", // 配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段 + loadSheetUrl: "", //配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合 + gridKey: "", // 表格唯一标识符 + updateUrl: "", //表格数据的更新地址 + updateImageUrl: "", //缩略图的更新地址 + allowUpdate: false, //是否允许编辑后的后台更新 + functionButton: "", //右上角功能按钮,例如' ' + showConfigWindowResize: true, //图表和数据透视表的配置会在右侧弹出,设置弹出后表格是否会自动缩进 + enableAddRow: true,//允许增加行 + enableAddCol: true,//允许增加列 + enablePage: false,//允许加载下一页 + autoFormatw: false, //自动格式化超过4位数的数字为 亿万格式 例:true or "true" or "TRUE" + accuracy: undefined, //设置传输来的数值的精确位数,小数点后n位 传参数为数字或数字字符串,例: "0" 或 0 + pageInfo:{ + 'queryExps':'', + 'reportId':'', + 'fields':'', + 'mobile':'', + 'frezon':'', + 'currentPage':'', + "totalPage":10, + "pageUrl":"", + }, + editMode: false, //是否为编辑模式 + chartConfigChange: null,//图表插件中图表更新触发的自定义方法 + beforeCreateDom: null,//表格创建之前的方法 + fireMousedown: null, //单元格数据下钻 + lang: 'en', //language + plugins: [], //plugins, e.g. ['chart'] +} \ No newline at end of file diff --git a/src/controllers/alternateformat.js b/src/controllers/alternateformat.js new file mode 100644 index 000000000..4ec557b25 --- /dev/null +++ b/src/controllers/alternateformat.js @@ -0,0 +1,1214 @@ + +import { getSheetIndex, getRangetxt } from '../methods/get'; +import { replaceHtml } from '../utils/util'; +import formula from '../global/formula'; +import { isEditMode } from '../global/validate'; +import tooltip from '../global/tooltip'; +import { luckysheetrefreshgrid } from '../global/refresh'; +import { luckysheetAlternateformatHtml, modelHTML } from './constant'; +import luckysheetsizeauto from './resize'; +import server from './server'; +import { selectHightlightShow } from './select'; +import Store from '../store'; + +//交替颜色 +const alternateformat = { + rangefocus: false, + modelfocusIndex: null, + FixedModelColor: [ + { + "head": { "fc": "#000", "bc": "#bfbdbe" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f8f3f7" }, + "foot": { "fc": "#000", "bc": "#dde2de" } + }, + { + "head": { "fc": "#000", "bc": "#4bd4e7" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#eaf7ff" }, + "foot": { "fc": "#000", "bc": "#aae9f8" } + }, + { + "head": { "fc": "#000", "bc": "#5ed593" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#e5fbee" }, + "foot": { "fc": "#000", "bc": "#a5efcc" } + }, + { + "head": { "fc": "#000", "bc": "#f6cb4b" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#fff9e7" }, + "foot": { "fc": "#000", "bc": "#ffebac" } + }, + { + "head": { "fc": "#000", "bc": "#f96420" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#ffe5d9" }, + "foot": { "fc": "#000", "bc": "#ffcfba" } + }, + { + "head": { "fc": "#000", "bc": "#5599fc" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#ecf2fe" }, + "foot": { "fc": "#000", "bc": "#afcbfa" } + }, + { + "head": { "fc": "#000", "bc": "#22a69b" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#dff2f8" }, + "foot": { "fc": "#000", "bc": "#8dd4d0" } + }, + { + "head": { "fc": "#000", "bc": "#7a939a" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f0eff7" }, + "foot": { "fc": "#000", "bc": "#bdcad0" } + }, + { + "head": { "fc": "#000", "bc": "#d7a270" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#fdf3f1" }, + "foot": { "fc": "#000", "bc": "#ead2b6" } + }, + { + "head": { "fc": "#000", "bc": "#89c54b" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f1f7e9" }, + "foot": { "fc": "#000", "bc": "#c5e3a7" } + }, + { + "head": { "fc": "#000", "bc": "#8f88f0" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f0e5ff" }, + "foot": { "fc": "#000", "bc": "#c6c4f6" } + }, + { + "head": { "fc": "#000", "bc": "#fd1664" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#feddee" }, + "foot": { "fc": "#000", "bc": "#f98ab5" } + }, + { + "head": { "fc": "#000", "bc": "#da96d3" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#fce8fb" }, + "foot": { "fc": "#000", "bc": "#f2caee" } + }, + { + "head": { "fc": "#000", "bc": "#b49191" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f5ebe8" }, + "foot": { "fc": "#000", "bc": "#d8c3c3" } + }, + { + "head": { "fc": "#000", "bc": "#91b493" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f0fbf0" }, + "foot": { "fc": "#000", "bc": "#b4cfb6" } + }, + { + "head": { "fc": "#000", "bc": "#b4a891" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f8f6f1" }, + "foot": { "fc": "#000", "bc": "#d3cab8" } + }, + { + "head": { "fc": "#000", "bc": "#91abb4" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#eff7fa" }, + "foot": { "fc": "#000", "bc": "#b7cbd3" } + }, + { + "head": { "fc": "#000", "bc": "#b7ba82" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#fafbeb" }, + "foot": { "fc": "#000", "bc": "#dadcb4" } + }, + { + "head": { "fc": "#000", "bc": "#df3e3e" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#fde9e9" }, + "foot": { "fc": "#000", "bc": "#f89292" } + }, + { + "head": { "fc": "#000", "bc": "#f2711c" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#fef0d7" }, + "foot": { "fc": "#000", "bc": "#fbb335" } + }, + { + "head": { "fc": "#000", "bc": "#b5cc18" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f9fbd4" }, + "foot": { "fc": "#000", "bc": "#e2ed2a" } + }, + { + "head": { "fc": "#000", "bc": "#00b5ad" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#ccfaf9" }, + "foot": { "fc": "#000", "bc": "#00e4df" } + }, + { + "head": { "fc": "#000", "bc": "#2185d0" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#d8f3fc" }, + "foot": { "fc": "#000", "bc": "#3cc4f0" } + }, + { + "head": { "fc": "#000", "bc": "#a5673f" }, + "one": { "fc": "#000", "bc": "#ffffff" }, + "two": { "fc": "#000", "bc": "#f6ede5" }, + "foot": { "fc": "#000", "bc": "#d3a47c" } + } + ], + getModelBox: function(hasRowHeader, hasRowFooter){ + let _this = this; + + $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").empty(); + $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").empty(); + + //格式样式 模板 + let modelListHtml = ''; + + for(let i = 0; i < _this.FixedModelColor.length; i++){ + let obj = _this.FixedModelColor[i]; + + let color1, color2, color3, color4; + + if(hasRowHeader && hasRowFooter){ + color1 = obj["head"]; + color2 = obj["one"]; + color3 = obj["two"]; + color4 = obj["foot"]; + } + else if(hasRowHeader){ + color1 = obj["head"]; + color2 = obj["one"]; + color3 = obj["two"]; + color4 = obj["one"]; + } + else if(hasRowFooter){ + color1 = obj["one"]; + color2 = obj["two"]; + color3 = obj["one"]; + color4 = obj["foot"]; + } + else{ + color1 = obj["one"]; + color2 = obj["two"]; + color3 = obj["one"]; + color4 = obj["two"]; + } + + modelListHtml += '
'+ + '
'+ + ''+ + ''+ + ''+ + ''+ + '
'+ + '
'; + } + + $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").append(modelListHtml); + + //自定义 模板 + let modelCustom = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_alternateformat_save_modelCustom"]; + if(modelCustom != null && modelCustom.length > 0){ + let modelCustomHtml = ''; + + for(let i = 0; i < modelCustom.length; i++){ + let obj = modelCustom[i]; + + let color1, color2, color3, color4; + + if(hasRowHeader && hasRowFooter){ + color1 = obj["head"]; + color2 = obj["one"]; + color3 = obj["two"]; + color4 = obj["foot"]; + } + else if(hasRowHeader){ + color1 = obj["head"]; + color2 = obj["one"]; + color3 = obj["two"]; + color4 = obj["one"]; + } + else if(hasRowFooter){ + color1 = obj["one"]; + color2 = obj["two"]; + color3 = obj["one"]; + color4 = obj["foot"]; + } + else{ + color1 = obj["one"]; + color2 = obj["two"]; + color3 = obj["one"]; + color4 = obj["two"]; + } + + modelCustomHtml += '
'+ + '
'+ + ''+ + ''+ + ''+ + ''+ + '
'+ + '
'; + } + + $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").append(modelCustomHtml); + } + }, + init: function(){ + let _this = this; + + $("#luckysheet-modal-dialog-slider-alternateformat").remove(); + $("body").append(luckysheetAlternateformatHtml()); + luckysheetsizeauto(); + + //关闭 + $("#luckysheet-modal-dialog-slider-alternateformat .luckysheet-model-close-btn").click(function () { + $("#luckysheet-modal-dialog-slider-alternateformat").hide(); + luckysheetsizeauto(); + }); + + //应用范围 + $(document).off("focus.AFrangeInput").on("focus.AFrangeInput", "#luckysheet-alternateformat-range input", function(){ + _this.rangefocus = true; + }); + $(document).off("blur.AFrangeInput").on("blur.AFrangeInput", "#luckysheet-alternateformat-range input", function(){ + _this.rangefocus = false; + }); + + $(document).off("keydown.AFrangeInput").on("keydown.AFrangeInput", "#luckysheet-alternateformat-range input", function(e){ + let rangeValue = $(this).val().trim(); + if(e.keyCode == 13){ + _this.update(); + } + }); + $(document).off("click.AFrangeIcon").on("click.AFrangeIcon", "#luckysheet-alternateformat-range .fa-table", function(){ + $("#luckysheet-modal-dialog-slider-alternateformat").hide(); + luckysheetsizeauto(); + + let rangeValue = $(this).parents("#luckysheet-alternateformat-range").find("input").val().trim(); + _this.rangeDialog(rangeValue); + }); + $(document).off("click.AFrDCf").on("click.AFrDCf", "#luckysheet-alternateformat-rangeDialog-confirm", function(){ + let rangeValue = $(this).parents("#luckysheet-alternateformat-rangeDialog").find("input").val().trim(); + $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val(rangeValue); + + $(this).parents("#luckysheet-alternateformat-rangeDialog").hide(); + $("#luckysheet-modal-dialog-slider-alternateformat").show(); + luckysheetsizeauto(); + + _this.update(); + }); + $(document).off("click.AFrDCl").on("click.AFrDCl", "#luckysheet-alternateformat-rangeDialog-close", function(){ + $(this).parents("#luckysheet-alternateformat-rangeDialog").hide(); + $("#luckysheet-modal-dialog-slider-alternateformat").show(); + luckysheetsizeauto(); + }); + $(document).off("click.AFrDTitle").on("click.AFrDTitle", "#luckysheet-alternateformat-rangeDialog .luckysheet-modal-dialog-title-close", function(){ + $(this).parents("#luckysheet-alternateformat-rangeDialog").hide(); + $("#luckysheet-modal-dialog-slider-alternateformat").show(); + luckysheetsizeauto(); + }); + + //页眉、页脚选中 + $(document).off("change.AFrowHeader").on("change.AFrowHeader", "#luckysheet-alternateformat-rowHeader", function(){ + let hasRowHeader; + if($(this).is(":checked")){ + hasRowHeader = true; + } + else{ + hasRowHeader = false; + } + + let hasRowFooter; + if($("#luckysheet-alternateformat-rowFooter").is(":checked")){ + hasRowFooter = true; + } + else{ + hasRowFooter = false; + } + + _this.checkboxChange(hasRowHeader, hasRowFooter); + _this.modelboxOn(); + _this.update(); + }); + $(document).off("change.AFrowFooter").on("change.AFrowFooter", "#luckysheet-alternateformat-rowFooter", function(){ + let hasRowHeader; + if($("#luckysheet-alternateformat-rowHeader").is(":checked")){ + hasRowHeader = true; + } + else{ + hasRowHeader = false; + } + + let hasRowFooter; + if($(this).is(":checked")){ + hasRowFooter = true; + } + else{ + hasRowFooter = false; + } + + _this.checkboxChange(hasRowHeader, hasRowFooter); + _this.modelboxOn(); + _this.update(); + }); + + //点击样式模板 + $(document).off("click.AFmodelbox").on("click.AFmodelbox", "#luckysheet-modal-dialog-slider-alternateformat .modelbox", function(){ + let index = $(this).index(); + let $id = $(this).parents(".cf").attr("id"); + + if($id == "luckysheet-alternateformat-modelList"){ + _this.modelfocusIndex = index; + } + else if($id == "luckysheet-alternateformat-modelCustom"){ + let len = _this.FixedModelColor.length; + _this.modelfocusIndex = index + len; + } + + _this.modelboxOn(); + _this.update(); + }); + + //点击选择文本/单元格颜色 + $(document).off("click.AFselectColor").on("click.AFselectColor", "#luckysheet-modal-dialog-slider-alternateformat .luckysheet-color-menu-button-indicator", function(){ + let $parent = $(this).closest(".toningbox"); + + let colorType, currenColor; + if($(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-text-color")){ + colorType = "fc"; + currenColor = $parent.find(".toningShow").data("fc"); + } + else if($(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-cell-color")){ + colorType = "bc"; + currenColor = $parent.find(".toningShow").data("bc"); + } + + //source + let source; + if($parent.hasClass("header")){ + source = "0"; + } + else if($parent.hasClass("ctOne")){ + source = "1"; + } + else if($parent.hasClass("ctTwo")){ + source = "2"; + } + else if($parent.hasClass("footer")){ + source = "3"; + } + + _this.colorSelectDialog(currenColor, colorType, source); + }); + + //选择颜色 确定 添加自定义模板 + $(document).off("click.AFselectColorConfirm").on("click.AFselectColorConfirm", "#luckysheet-alternateformat-colorSelect-dialog-confirm", function(){ + let $parent = $(this).parents("#luckysheet-alternateformat-colorSelect-dialog"); + + $("#luckysheet-modal-dialog-mask").hide(); + $parent.hide(); + + //获取currenColor colorType source + let currenColor = $parent.find(".currenColor span").attr("title"); + + let colorType; + if($parent.find(".luckysheet-modal-dialog-title-text").text() == "选择文本颜色"){ + colorType = "fc"; + } + else if($parent.find(".luckysheet-modal-dialog-title-text").text() == "选择单元格颜色"){ + colorType = "bc"; + } + + let source = $parent.find(".currenColor").attr("data-source"); + + //赋给颜色 + if(source == "0"){ + if(colorType == "fc"){ + $("#luckysheet-alternateformat-modelToning .header .toningShow").css("color", currenColor); + $("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc", currenColor); + $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + if(colorType == "bc"){ + $("#luckysheet-alternateformat-modelToning .header .toningShow").css("background-color", currenColor); + $("#luckysheet-alternateformat-modelToning .header .toningShow").data("bc", currenColor); + $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + } + else if(source == "1"){ + if(colorType == "fc"){ + $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("color", currenColor); + $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc", currenColor); + $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + if(colorType == "bc"){ + $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("background-color", currenColor); + $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("bc", currenColor); + $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + } + else if(source == "2"){ + if(colorType == "fc"){ + $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("color", currenColor); + $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc", currenColor); + $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + if(colorType == "bc"){ + $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("background-color", currenColor); + $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("bc", currenColor); + $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + } + else if(source == "3"){ + if(colorType == "fc"){ + $("#luckysheet-alternateformat-modelToning .footer .toningShow").css("color", currenColor); + $("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc", currenColor); + $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + if(colorType == "bc"){ + $("#luckysheet-alternateformat-modelToning .footer .toningShow").css("background-color", currenColor); + $("#luckysheet-alternateformat-modelToning .footer .toningShow").data("bc", currenColor); + $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); + } + } + + //若模板聚焦在固有模板,则新加模板;若模板聚焦在自定义模板,则修改该模板 + let hasRowHeader; + if($("#luckysheet-alternateformat-rowHeader").is(":checked")){ + hasRowHeader = true; + } + else{ + hasRowHeader = false; + } + + let hasRowFooter; + if($("#luckysheet-alternateformat-rowFooter").is(":checked")){ + hasRowFooter = true; + } + else{ + hasRowFooter = false; + } + + let index = _this.modelfocusIndex; + let len = _this.FixedModelColor.length; + + let format, file; + if(index < len){ + format = $.extend(true, {}, _this.getFormatByIndex()); + } + else{ + file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + let modelCustom = file["luckysheet_alternateformat_save_modelCustom"]; + + format = $.extend(true, {}, modelCustom[index - len]); + } + + if(source == "0"){ + if(colorType == "fc"){ + format["head"]["fc"] = currenColor; + } + else if(colorType == "bc"){ + format["head"]["bc"] = currenColor; + } + } + else if(source == "1"){ + if(colorType == "fc"){ + format["one"]["fc"] = currenColor; + } + else if(colorType == "bc"){ + format["one"]["bc"] = currenColor; + } + } + else if(source == "2"){ + if(colorType == "fc"){ + format["two"]["fc"] = currenColor; + } + else if(colorType == "bc"){ + format["two"]["bc"] = currenColor; + } + } + else if(source == "3"){ + if(colorType == "fc"){ + format["foot"]["fc"] = currenColor; + } + if(colorType == "bc"){ + format["foot"]["bc"] = currenColor; + } + } + + if(_this.modelfocusIndex < len){ + _this.addCustomModel(format); + _this.modelfocusIndex = _this.getIndexByFormat(format); + } + else{ + file["luckysheet_alternateformat_save_modelCustom"][index - len] = format; + + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, file["luckysheet_alternateformat_save_modelCustom"], { "k": "luckysheet_alternateformat_save_modelCustom" }); + } + } + + _this.getModelBox(hasRowHeader, hasRowFooter); + _this.modelboxOn(); + _this.update(); + }); + + //点击 移除交替颜色 按钮 + $(document).off("click.AFremove").on("click.AFremove", "#luckysheet-alternateformat-remove", function(){ + let dataIndex = $(this).data("index"); + + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + let ruleArr = file["luckysheet_alternateformat_save"]; + + //保存之前的规则 + let historyRules = $.extend(true, [], ruleArr); + + //保存当前的规则 + if(ruleArr.length > 1){ + ruleArr.splice(dataIndex, 1); + } + else{ + ruleArr = []; + } + + let currentRules = $.extend(true, [], ruleArr); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, ruleArr, { "k": "luckysheet_alternateformat_save" }); + } + + //隐藏一些dom + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-modal-dialog-slider-alternateformat").hide(); + + luckysheetsizeauto(); + }); + }, + perfect: function(){ + let _this = this; + + let range = $.extend(true, {}, Store.luckysheet_select_save[0]); + let existsIndex = _this.rangeIsExists(range)[1]; + + let obj = $.extend(true, {}, Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_alternateformat_save"][existsIndex]); + + //应用范围 + let cellrange = obj["cellrange"]; + $("#luckysheet-alternateformat-range input").val(getRangetxt(Store.currentSheetIndex, { "row": cellrange["row"], "column": cellrange["column"] }, Store.currentSheetIndex)); + + Store.luckysheet_select_save = [{ "row": cellrange["row"], "column": cellrange["column"] }]; + selectHightlightShow(); + + //页眉、页脚 + let hasRowHeader = obj["hasRowHeader"]; + let hasRowFooter = obj["hasRowFooter"]; + + //模板聚焦 + let format = obj["format"]; + _this.modelfocusIndex = _this.getIndexByFormat(format); + + if(_this.modelfocusIndex == null){ + _this.addCustomModel(format); + _this.modelfocusIndex = _this.getIndexByFormat(format); + } + + _this.checkboxChange(hasRowHeader, hasRowFooter); + _this.modelboxOn(); + + //标识 交替颜色的index + $("#luckysheet-alternateformat-remove").data("index", existsIndex); + }, + checkboxChange: function(hasRowHeader, hasRowFooter){ + if(hasRowHeader){ + $("#luckysheet-alternateformat-rowHeader").prop("checked", true); + $("#luckysheet-alternateformat-modelToning .header").show(); + } + else{ + $("#luckysheet-alternateformat-rowHeader").removeAttr("checked"); + $("#luckysheet-alternateformat-modelToning .header").hide(); + } + + if(hasRowFooter){ + $("#luckysheet-alternateformat-rowFooter").prop("checked", true); + $("#luckysheet-alternateformat-modelToning .footer").show(); + } + else{ + $("#luckysheet-alternateformat-rowFooter").removeAttr("checked"); + $("#luckysheet-alternateformat-modelToning .footer").hide(); + } + + this.getModelBox(hasRowHeader, hasRowFooter); + }, + modelboxOn: function(){ + let _this = this; + + //模板 foucs + $("#luckysheet-modal-dialog-slider-alternateformat .modelbox").removeClass("on"); + + let index = _this.modelfocusIndex; + let len = _this.FixedModelColor.length; + + if(index < len){ + $("#luckysheet-alternateformat-modelList .modelbox").eq(index).addClass("on"); + } + else{ + $("#luckysheet-alternateformat-modelCustom .modelbox").eq(index - len).addClass("on"); + } + + //编辑 对应颜色改变 + _this.modelToningColor(); + }, + modelToningColor: function(){ + let format = this.getFormatByIndex(); + + //页眉 + $("#luckysheet-alternateformat-modelToning .header .toningShow").css({"color": format["head"].fc, "background-color": format["head"].bc}); + $("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc", format["head"].fc).data("bc", format["head"].bc); + $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["head"].fc); + $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["head"].bc); + + //颜色1 + $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css({"color": format["one"].fc, "background-color": format["one"].bc}); + $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc", format["one"].fc).data("bc", format["one"].bc); + $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["one"].fc); + $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["one"].bc); + + //颜色2 + $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css({"color": format["two"].fc, "background-color": format["two"].bc}); + $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc", format["two"].fc).data("bc", format["two"].bc); + $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["two"].fc); + $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["two"].bc); + + //页脚 + $("#luckysheet-alternateformat-modelToning .footer .toningShow").css({"color": format["foot"].fc, "background-color": format["foot"].bc}); + $("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc", format["foot"].fc).data("bc", format["foot"].bc); + $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["foot"].fc); + $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["foot"].bc); + }, + addCustomModel: function(format){ + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + if(file["luckysheet_alternateformat_save_modelCustom"] == null){ + file["luckysheet_alternateformat_save_modelCustom"] = []; + } + + file["luckysheet_alternateformat_save_modelCustom"].push(format); + + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, file["luckysheet_alternateformat_save_modelCustom"], { "k": "luckysheet_alternateformat_save_modelCustom" }); + } + }, + colorSelectDialog: function(currenColor, colorType, source){ + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-alternateformat-colorSelect-dialog").remove(); + + let title; + if(colorType == "fc"){ + title = "选择文本颜色"; + } + else if(colorType == "bc"){ + title = "选择单元格颜色"; + } + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-alternateformat-colorSelect-dialog", + "addclass": "luckysheet-alternateformat-colorSelect-dialog", + "title": title, + "content": "
当前颜色:
", + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-alternateformat-colorSelect-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 300) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-alternateformat-colorSelect-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + + //初始化选择颜色插件 + $("#luckysheet-alternateformat-colorSelect-dialog").find(".colorshowbox").spectrum({ + showPalette: true, + showPaletteOnly: true, + preferredFormat: "hex", + clickoutFiresChange: false, + showInitial: true, + showInput: true, + flat: true, + hideAfterPaletteSelect: true, + showSelectionPalette: true, + showButtons: false,//隐藏选择取消按钮 + maxPaletteSize: 8, + maxSelectionSize: 8, + color: currenColor, + cancelText: "取消", + chooseText: "确定颜色", + togglePaletteMoreText: "自定义", + togglePaletteLessText: "收起", + togglePaletteOnly: true, + clearText: "清除颜色选择", + noColorSelectedText: "没有颜色被选择", + localStorageKey: "spectrum.textcolor" + server.gridKey, + palette: [ + ["#000", "#444", "#666", "#999", "#ccc", "#eee", "#f3f3f3", "#fff"], + ["#f00", "#f90", "#ff0", "#0f0", "#0ff", "#00f", "#90f", "#f0f"], + ["#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d0e0e3", "#cfe2f3", "#d9d2e9", "#ead1dc"], + ["#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#9fc5e8", "#b4a7d6", "#d5a6bd"], + ["#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6fa8dc", "#8e7cc3", "#c27ba0"], + ["#c00", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3d85c6", "#674ea7", "#a64d79"], + ["#900", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#0b5394", "#351c75", "#741b47"], + ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] + ], + move: function(color){ + if (color != null) { + color = color.toHexString(); + } + else { + color = "#000"; + } + + $("#luckysheet-alternateformat-colorSelect-dialog .currenColor span").css("background-color", color).attr("title", color); + } + }); + }, + rangeDialog: function(value){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-alternateformat-rangeDialog").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-alternateformat-rangeDialog", + "addclass": "luckysheet-alternateformat-rangeDialog", + "title": "选择应用范围", + "content": '', + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-alternateformat-rangeDialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 300) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-alternateformat-rangeDialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + }, + rangeIsExists: function(range, index){ + let _this = this; + + let isExists = false; + let existsIndex = null; + + //获取已有交替颜色所有应用范围 + let AFarr = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_alternateformat_save"]); + + if(index != undefined && index != null){ + if(AFarr.length > 1){ + AFarr.splice(index, 1); + } + else{ + AFarr = []; + } + } + + if(AFarr.length > 0){ + let arr = []; + for(let i = 0; i < AFarr.length; i++){ + let obj = { + "index": i, + "map": _this.getRangeMap(AFarr[i]["cellrange"]["row"], AFarr[i]["cellrange"]["column"]) + } + + arr.push(obj); + } + + //获取当前选区 + let rangeMap = _this.getRangeMap(range["row"], range["column"]); + + //遍历 + for(let x in rangeMap){ + if(isExists){ + break; + } + + for(let j = 0; j < arr.length; j++){ + if(x in arr[j]["map"]){ + isExists = true; + existsIndex = arr[j]["index"]; + break; + } + } + } + } + + return [isExists, existsIndex]; + }, + getRangeMap: function(row, column){ + let map = {}; + let st_r = row[0], ed_r = row[1], st_c = column[0], ed_c = column[1]; + + for(let r = st_r; r <= ed_r; r++){ + for(let c = st_c; c <= ed_c; c++){ + map[r + "_" + c] = 0; + } + } + + return map; + }, + getIndexByFormat: function(format){ + let _this = this; + let index = null; + + //格式样式 模板 + let modelList = _this.FixedModelColor; + for(let i = 0; i < modelList.length; i++){ + let obj = modelList[i]; + + if(format["head"].fc == obj["head"].fc && format["head"].bc == obj["head"].bc){ + if(format["one"].fc == obj["one"].fc && format["one"].bc == obj["one"].bc){ + if(format["two"].fc == obj["two"].fc && format["two"].bc == obj["two"].bc){ + if(format["foot"].fc == obj["foot"].fc && format["foot"].bc == obj["foot"].bc){ + index = i; + break; + } + } + } + } + } + + //自定义 模板 + let modelCustom = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_alternateformat_save_modelCustom"]; + if(modelCustom != null && modelCustom.length > 0){ + for(let j = 0; j < modelCustom.length; j++){ + let obj = modelCustom[j]; + + if(format["head"].fc == obj["head"].fc && format["head"].bc == obj["head"].bc){ + if(format["one"].fc == obj["one"].fc && format["one"].bc == obj["one"].bc){ + if(format["two"].fc == obj["two"].fc && format["two"].bc == obj["two"].bc){ + if(format["foot"].fc == obj["foot"].fc && format["foot"].bc == obj["foot"].bc){ + index = modelList.length + j; + break; + } + } + } + } + } + } + + return index; + }, + getFormatByIndex: function(){ + let _this = this; + + let index = _this.modelfocusIndex; + let len = _this.FixedModelColor.length; + + let format = {}; + + if(index < len){ + format = _this.FixedModelColor[index]; + } + else{ + format = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_alternateformat_save_modelCustom"][index - len]; + } + + return format; + }, + new: function(cellrange){ + let _this = this; + + let format = _this.getFormatByIndex(); + + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + let ruleArr = file["luckysheet_alternateformat_save"]; + + if(ruleArr == null){ + ruleArr = []; + } + + //保存之前的规则 + let historyRules = $.extend(true, [], ruleArr); + + //保存当前的规则 + let obj = { + "cellrange": { + "row": cellrange["row"], + "column": cellrange["column"] + }, + "format": format, + "hasRowHeader": true, + "hasRowFooter": false + } + + ruleArr.push(obj); + + let currentRules = $.extend(true, [], ruleArr); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, ruleArr, { "k": "luckysheet_alternateformat_save" }); + } + }, + update: function(){ + let _this = this; + + //获取标识 + let dataIndex = $("#luckysheet-alternateformat-remove").data("index"); + + //应用范围 + let rangeValue = $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val().trim(); + + if(!formula.iscelldata(rangeValue)){ + if(isEditMode()){ + alert("您选择的应用范围不是选区!"); + } + else{ + tooltip.info("您选择的应用范围不是选区!", ""); + } + + return; + } + + let cellrange = formula.getcellrange(rangeValue); + let isExists = _this.rangeIsExists(cellrange, dataIndex)[0]; + + if(isExists){ + if(isEditMode()){ + alert("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!"); + } + else{ + tooltip.info("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!", ""); + } + + return; + } + + //页眉、页脚 + let hasRowHeader; + if($("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowHeader").is(":checked")){ + hasRowHeader = true; + } + else{ + hasRowHeader = false; + } + + let hasRowFooter; + if($("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowFooter").is(":checked")){ + hasRowFooter = true; + } + else{ + hasRowFooter = false; + } + + //获取选中样式模板的颜色 + let format = _this.getFormatByIndex(); + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + let ruleArr = file["luckysheet_alternateformat_save"]; + if(ruleArr == null){ + ruleArr = []; + } + + //保存之前的规则 + let historyRules = $.extend(true, [], ruleArr); + + //保存当前的规则 + let obj = { + "cellrange": { + "row": cellrange["row"], + "column": cellrange["column"] + }, + "format": format, + "hasRowHeader": hasRowHeader, + "hasRowFooter": hasRowFooter + } + + ruleArr[dataIndex] = obj; + + let currentRules = $.extend(true, [], ruleArr); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, ruleArr, { "k": "luckysheet_alternateformat_save" }); + } + }, + checksAF: function(r, c, computeMap){ + if((r + "_" + c) in computeMap){ + //返回值(fc bc) + return computeMap[r + "_" + c]; + } + else{ + return null; + } + }, + getComputeMap: function(){ + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + let ruleArr = file["luckysheet_alternateformat_save"]; + + let computeMap = this.compute(ruleArr); + + return computeMap; + }, + compute: function(obj){ + //计算存储 + let computeMap = {}; + + if(obj != null && obj.length > 0){ + for(let i = 0; i < obj.length; i++){ + let cellrange = obj[i]["cellrange"]; + let format = obj[i]["format"]; + let hasRowHeader = obj[i]["hasRowHeader"]; + let hasRowFooter = obj[i]["hasRowFooter"]; + let st_r = cellrange["row"][0], + ed_r = cellrange["row"][1], + st_c = cellrange["column"][0], + ed_c = cellrange["column"][1]; + + if(hasRowHeader && hasRowFooter){ + //页眉所在行 + for(let c = st_c; c <= ed_c; c++){ + computeMap[st_r + "_" + c] = [format["head"].fc, format["head"].bc]; + } + + //中间行 + if(ed_r - st_r > 1){ + for(let r = st_r + 1; r < ed_r; r++){ + let fc, bc; + if((r - st_r) % 2 != 0){ + fc = format["one"].fc; + bc = format["one"].bc; + } + else{ + fc = format["two"].fc; + bc = format["two"].bc; + } + + for(let c = st_c; c <= ed_c; c++){ + computeMap[r + "_" + c] = [fc, bc]; + } + } + } + + //页脚所在行 + if(ed_r > st_r){ + for(let c = st_c; c <= ed_c; c++){ + computeMap[ed_r + "_" + c] = [format["foot"].fc, format["foot"].bc]; + } + } + } + else if(hasRowHeader){ + //页眉所在行 + for(let c = st_c; c <= ed_c; c++){ + computeMap[st_r + "_" + c] = [format["head"].fc, format["head"].bc]; + } + + //中间行 + if(ed_r > st_r){ + for(let r = st_r + 1; r <= ed_r; r++){ + let fc, bc; + if((r - st_r) % 2 != 0){ + fc = format["one"].fc; + bc = format["one"].bc; + } + else{ + fc = format["two"].fc; + bc = format["two"].bc; + } + + for(let c = st_c; c <= ed_c; c++){ + computeMap[r + "_" + c] = [fc, bc]; + } + } + } + } + else if(hasRowFooter){ + //中间行 + if(ed_r > st_r){ + for(let r = st_r; r < ed_r; r++){ + let fc, bc; + if((r - st_r) % 2 == 0){ + fc = format["one"].fc; + bc = format["one"].bc; + } + else{ + fc = format["two"].fc; + bc = format["two"].bc; + } + + for(let c = st_c; c <= ed_c; c++){ + computeMap[r + "_" + c] = [fc, bc]; + } + } + } + + //页脚所在行 + for(let c = st_c; c <= ed_c; c++){ + computeMap[ed_r + "_" + c] = [format["foot"].fc, format["foot"].bc]; + } + } + else{ + //中间行 + for(let r = st_r; r <= ed_r; r++){ + let fc, bc; + if((r - st_r) % 2 == 0){ + fc = format["one"].fc; + bc = format["one"].bc; + } + else{ + fc = format["two"].fc; + bc = format["two"].bc; + } + + for(let c = st_c; c <= ed_c; c++){ + computeMap[r + "_" + c] = [fc, bc]; + } + } + } + } + } + + return computeMap; + }, + ref: function(historyRules, currentRules){ + if (Store.clearjfundo) { + Store.jfundo = []; + + let redo = {}; + redo["type"] = "updateAF"; + redo["sheetIndex"] = Store.currentSheetIndex; + redo["data"] = {"historyRules": historyRules, "currentRules": currentRules}; + Store.jfredo.push(redo); + } + + let index = getSheetIndex(Store.currentSheetIndex); + Store.luckysheetfile[index]["luckysheet_alternateformat_save"] = currentRules; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } +} + +export default alternateformat; \ No newline at end of file diff --git a/src/controllers/conditionformat.js b/src/controllers/conditionformat.js new file mode 100644 index 000000000..c9d3c6ea4 --- /dev/null +++ b/src/controllers/conditionformat.js @@ -0,0 +1,3658 @@ +import { getSheetIndex, getRangetxt } from '../methods/get'; +import { replaceHtml, getObjType, chatatABC } from '../utils/util'; +import formula from '../global/formula'; +import { isRealNull, isEditMode } from '../global/validate'; +import tooltip from '../global/tooltip'; +import { luckysheetrefreshgrid } from '../global/refresh'; +import { getcellvalue } from '../global/getdata'; +import { genarate } from '../global/format'; +import { modelHTML, luckysheet_CFiconsImg } from './constant'; +import server from './server'; +import { selectionCopyShow } from './select'; +import sheetmanage from './sheetmanage'; +import locale from '../locale/locale'; +import Store from '../store'; + +//条件格式 +const conditionformat = { + fileClone: [], + editorRule: null, //{"sheetIndex": sheetIndex,"itemIndex": itemIndex,"data": luckysheetfile[sheetIndex].luckysheet_conditionformat_save[itemIndex]} + ruleTypeHtml: function(){ + const conditionformat_Text = locale().conditionformat; + + return `
+
+ + ${conditionformat_Text.ruleTypeItem1} +
+
+ + ${conditionformat_Text.ruleTypeItem2} +
+
+ + ${conditionformat_Text.ruleTypeItem3} +
+
+ + ${conditionformat_Text.ruleTypeItem4} +
+
+ + ${conditionformat_Text.ruleTypeItem5} +
+
`; + }, + textCellColorHtml: function(){ + const conditionformat_Text = locale().conditionformat; + + return `
+
+ + + +
+
+ + + +
+
`; + }, + selectRange: [], + selectStatus: false, + dataBarList: [ + { "format": ["#638ec6", "#ffffff"] }, //蓝-白渐变 数据条 + { "format": ["#63c384", "#ffffff"] }, //绿-白渐变 数据条 + { "format": ["#ff555a", "#ffffff"] }, //红-白渐变 数据条 + { "format": ["#ffb628", "#ffffff"] }, //橙-白渐变 数据条 + { "format": ["#008aef", "#ffffff"] }, //浅蓝-白渐变 数据条 + { "format": ["#d6007b", "#ffffff"] }, //紫-白渐变 数据条 + + { "format": ["#638ec6"] }, //蓝色 数据条 + { "format": ["#63c384"] }, //绿色 数据条 + { "format": ["#ff555a"] }, //红色 数据条 + { "format": ["#ffb628"] }, //橙色 数据条 + { "format": ["#008aef"] }, //浅蓝色 数据条 + { "format": ["#d6007b"] } //紫色 数据条 + ], + colorGradationList: [ + { "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)", "rgb(248, 105, 107)"] }, //绿-黄-红色阶 + { "format": ["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] }, //红-黄-绿色阶 + + { "format": ["rgb(99, 190, 123)", "rgb(252, 252, 255)", "rgb(248, 105, 107)"] }, //绿-白-红色阶 + { "format": ["rgb(248, 105, 107)", "rgb(252, 252, 255)", "rgb(99, 190, 123)"] }, //红-白-绿色阶 + + { "format": ["rgb(90, 138, 198)", "rgb(252, 252, 255)", "rgb(248, 105, 107)"] }, //蓝-白-红色阶 + { "format": ["rgb(248, 105, 107)", "rgb(252, 252, 255)", "rgb(90, 138, 198)"] }, //红-白-蓝色阶 + + { "format": ["rgb(252, 252, 255)", "rgb(248, 105, 107)"] }, //白-红色阶 + { "format": ["rgb(248, 105, 107)", "rgb(252, 252, 255)"] }, //红-白色阶 + + { "format": ["rgb(99, 190, 123)", "rgb(252, 252, 255)"] }, //绿-白色阶 + { "format": ["rgb(252, 252, 255)", "rgb(99, 190, 123)"] }, //白-绿色阶 + + { "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)"] }, //绿-黄色阶 + { "format": ["rgb(255, 235, 132)", "rgb(99, 190, 123)"] } //黄-绿色阶 + ], + init: function(){ + let _this = this; + + // 管理规则 + $(document).off("change.CFchooseSheet").on("change.CFchooseSheet", "#luckysheet-administerRule-dialog .chooseSheet", function(){ + let index = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); + _this.getConditionRuleList(index); + }); + $(document).off("click.CFadministerRuleItem").on("click.CFadministerRuleItem", "#luckysheet-administerRule-dialog .ruleList .listBox .item", function(){ + $(this).addClass("on").siblings().removeClass("on"); + }); + + $(document).off("click.CFadministerRuleConfirm").on("click.CFadministerRuleConfirm", "#luckysheet-administerRule-dialog-confirm", function(){ + //保存之前的规则 + let fileH = $.extend(true, [], Store.luckysheetfile); + let historyRules = _this.getHistoryRules(fileH); + + //保存当前的规则 + let fileClone = $.extend(true, [], _this.fileClone); + for(let c = 0; c < fileClone.length; c++){ + let sheetIndex = fileClone[c]["index"]; + Store.luckysheetfile[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = fileClone[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"]; + } + + let fileC = $.extend(true, [], Store.luckysheetfile); + let currentRules = _this.getCurrentRules(fileC); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + //隐藏一些dom + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-administerRule-dialog").hide(); + + //发送给后台 + if(server.allowUpdate){ + let files = $.extend(true, [], Store.luckysheetfile); + for(let i = 0; i < files.length; i++){ + server.saveParam("all", files[i]["index"], files[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" }); + } + } + }); + + $(document).off("click.CFadministerRuleClose").on("click.CFadministerRuleClose", "#luckysheet-administerRule-dialog-close", function(){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-administerRule-dialog").hide(); + _this.fileClone = []; + }); + $(document).off("click.CFadministerRuleFa").on("click.CFadministerRuleFa", "#luckysheet-administerRule-dialog .item .fa-table", function(){ + $(this).parents("#luckysheet-administerRule-dialog").hide(); + + let sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet select option:selected").val(); + if(sheetIndex != Store.currentSheetIndex){ + sheetmanage.changeSheetExec(sheetIndex); + } + + let txt = $(this).siblings("input").val().trim(); + let dataItem = $(this).parents(".item").attr("data-item"); + + _this.multiRangeDialog(dataItem, txt); + + _this.selectRange = []; + + let range = _this.getRangeByTxt(txt); + if(range.length > 0){ + for(let s = 0; s < range.length; s++){ + let r1 = range[s].row[0], r2 = range[s].row[1]; + let c1 = range[s].column[0], c2 = range[s].column[1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + _this.selectRange.push({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [r1, r2], + "column": [c1, c2], + "row_focus": r1, + "column_focus": c1 + }); + } + } + + selectionCopyShow(_this.selectRange); + }); + $(document).off("click.CFmultiRangeConfirm").on("click.CFmultiRangeConfirm", "#luckysheet-multiRange-dialog-confirm", function(){ + $(this).parents("#luckysheet-multiRange-dialog").hide(); + + let dataItem = $(this).attr("data-item"); + let v = $(this).parents("#luckysheet-multiRange-dialog").find("input").val(); + $("#luckysheet-administerRule-dialog .item[data-item="+dataItem+"] input").val(v); + + let sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); + _this.fileClone[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"][dataItem].cellrange = _this.getRangeByTxt(v); + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-administerRule-dialog").show(); + + let range = []; + selectionCopyShow(range); + }); + $(document).off("click.CFmultiRangeClose").on("click.CFmultiRangeClose", "#luckysheet-multiRange-dialog-close", function(){ + $(this).parents("#luckysheet-multiRange-dialog").hide(); + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-administerRule-dialog").show(); + + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + + let range = []; + selectionCopyShow(range); + }); + + // 新建规则 + $(document).off("click.CFnewConditionRule").on("click.CFnewConditionRule", "#newConditionRule", function(){ + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择应用范围"); + } + else{ + tooltip.info("请选择应用范围", ""); + } + return; + } + + _this.newConditionRuleDialog(1); + }); + $(document).off("click.CFnewConditionRuleConfirm").on("click.CFnewConditionRuleConfirm", "#luckysheet-newConditionRule-dialog-confirm", function(){ + let index = $("#luckysheet-newConditionRule-dialog .ruleTypeItem.on").index(); + let type1 = $("#luckysheet-newConditionRule-dialog #type1 option:selected").val(); + let type2 = $("#luckysheet-newConditionRule-dialog ." + type1 + "Box #type2 option:selected").val(); + + let format, rule; + if(index == 0){ + if(type1 == "dataBar"){ //数据条 + let color = $(this).parents("#luckysheet-newConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString(); + + if(type2 == "gradient"){ //渐变填充 + format = [color, "#ffffff"]; + } + else if(type2 == "solid"){ //实心填充 + format = [color]; + } + + rule = { + "type": "dataBar", + "cellrange": $.extend(true, [], Store.luckysheet_select_save), + "format": format + }; + } + else if(type1 == "colorGradation"){ //色阶 + let maxcolor = $(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); + let midcolor = $(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); + let mincolor = $(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); + + if(type2 == "threeColor"){ //三色 + format = [maxcolor, midcolor, mincolor]; + } + else if(type2 == "twoColor"){ //双色 + format = [maxcolor, mincolor]; + } + + rule = { + "type": "colorGradation", + "cellrange": $.extend(true, [], Store.luckysheet_select_save), + "format": format + }; + } + else if(type1 == "icons"){ //图标集 + let len = $(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-len"); + let leftMin = $(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"); + let top = $(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-top"); + + format = { + "len": len, + "leftMin": leftMin, + "top": top + }; + + rule = { + "type": "icons", + "cellrange": $.extend(true, [], Store.luckysheet_select_save), + "format": format + }; + } + } + else{ + let conditionName = "", conditionRange = [], conditionValue = []; + + if(index == 1){ + if(type1 == "number"){ //单元格值 + conditionName = type2; + + if(type2 == "betweenness"){ + let v1 = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); + let v2 = $("#luckysheet-newConditionRule-dialog #conditionVal2 input").val().trim(); + + //条件值是否是选区 + let rangeArr1 = _this.getRangeByTxt(v1); + if(rangeArr1.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr1.length == 1){ + let r1 = rangeArr1[0].row[0], r2 = rangeArr1[0].row[1]; + let c1 = rangeArr1[0].column[0], c2 = rangeArr1[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v1 = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr1[0].row, "column": rangeArr1[0].column }); + conditionValue.push(v1); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr1.length == 0){ + if(isNaN(v1) || v1 == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v1); + } + } + + let rangeArr2 = _this.getRangeByTxt(v2); + if(rangeArr2.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr2.length == 1){ + let r1 = rangeArr2[0].row[0], r2 = rangeArr2[0].row[1]; + let c1 = rangeArr2[0].column[0], c2 = rangeArr2[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v2 = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr2[0].row, "column": rangeArr2[0].column }); + conditionValue.push(v2); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr2.length == 0){ + if(isNaN(v2) || v2 == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v2); + } + } + } + else{ + //条件值 + let v = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); + + //条件值是否是选区 + let rangeArr = _this.getRangeByTxt(v); + if(rangeArr.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr.length == 1){ + let r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; + let c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); + conditionValue.push(v); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr.length == 0){ + if(isNaN(v) || v == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v); + } + } + } + } + else if(type1 == "text"){ //特定文本 + conditionName = "textContains"; + + //条件值 + let v = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); + + //条件值是否是选区 + let rangeArr = _this.getRangeByTxt(v); + if(rangeArr.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr.length == 1){ + let r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; + let c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); + conditionValue.push(v); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr.length == 0){ + if(isNaN(v) || v == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v); + } + } + } + else if(type1 == "date"){ //发生日期 + conditionName = "occurrenceDate"; + + //条件值 + let v = $("#luckysheet-newConditionRule-dialog #daterange-btn").val(); + + if(v == "" || v == null){ + _this.infoDialog("请选择日期", ""); + return; + } + + conditionValue.push(v); + } + } + else if(index == 2){ //排名靠前靠后 + //条件名称 + if(type1 == "top"){ + if($("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")){ + conditionName = "top10%"; + } + else{ + conditionName = "top10"; + } + } + else if(type1 == "last"){ + if($("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")){ + conditionName = "last10%"; + } + else{ + conditionName = "last10"; + } + } + + //条件值 + let v = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); + + if(parseInt(v) != v || parseInt(v) < 1 || parseInt(v) > 1000){ + _this.infoDialog("请输入一个介于 1 和 1000 之间的整数", ""); + return; + } + + conditionValue.push(v); + } + else if(index == 3){ //平均值 + if(type1 == "AboveAverage"){ + conditionName = "AboveAverage"; + conditionValue.push("AboveAverage"); + } + else if(type1 == "SubAverage"){ + conditionName = "SubAverage"; + conditionValue.push("SubAverage"); + } + } + else if(index == 4){ //重复值 + conditionName = "duplicateValue"; + conditionValue.push(type1); + } + + //格式颜色 + let textcolor; + if($("#luckysheet-newConditionRule-dialog #checkTextColor").is(":checked")){ + textcolor = $("#luckysheet-newConditionRule-dialog #textcolorshow").spectrum("get").toHexString(); + } + else{ + textcolor = null; + } + + let cellcolor; + if($("#luckysheet-newConditionRule-dialog #checkCellColor").is(":checked")){ + cellcolor = $("#luckysheet-newConditionRule-dialog #cellcolorshow").spectrum("get").toHexString(); + } + else{ + cellcolor = null; + } + + format = { + "textColor": textcolor, + "cellColor": cellcolor + }; + + rule = { + "type": "default", + "cellrange": $.extend(true, [], Store.luckysheet_select_save), + "format": format, + "conditionName": conditionName, + "conditionRange": conditionRange, + "conditionValue": conditionValue + }; + } + + $("#luckysheet-newConditionRule-dialog").hide(); + + //新建规则的入口 + let source = $(this).attr("data-source"); + + if(source == 0){ + $("#luckysheet-modal-dialog-mask").hide(); + + //保存之前的规则 + let fileH = $.extend(true, [], Store.luckysheetfile); + let historyRules = _this.getHistoryRules(fileH); + + //保存当前的规则 + let ruleArr = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] == undefined ? [] : Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]; + ruleArr.push(rule); + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] = ruleArr; + + let fileC = $.extend(true, [], Store.luckysheetfile); + let currentRules = _this.getCurrentRules(fileC); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + //发送给后台 + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, ruleArr, { "k": "luckysheet_conditionformat_save" }); + } + } + else if(source == 1){ + //临时存储新规则 + let ruleArr = !!_this.fileClone[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] ? _this.fileClone[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] : []; + ruleArr.push(rule); + _this.fileClone[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] = ruleArr; + + //新建规则隐藏,管理规则显示 + _this.administerRuleDialog(); + } + }); + $(document).off("click.CFnewConditionRuleClose").on("click.CFnewConditionRuleClose", "#luckysheet-newConditionRule-dialog-close", function(){ + //新建规则的入口 + let source = $(this).attr("data-source"); + if(source == 0){ + $("#luckysheet-modal-dialog-mask").hide(); + } + if(source == 1){ + $("#luckysheet-administerRule-dialog").show(); + } + + //新建规则隐藏 + $("#luckysheet-newConditionRule-dialog").hide(); + + //隐藏虚线框 + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + }); + + // 编辑规则 + $(document).off("click.CFeditorConditionRule").on("click.CFeditorConditionRule", "#editorConditionRule", function(){ + let sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); + let itemIndex = $("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item"); + let rule = { + "sheetIndex": sheetIndex, + "itemIndex": itemIndex, + "data": _this.fileClone[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"][itemIndex] + }; + _this.editorRule = rule; + _this.editorConditionRuleDialog(); + }); + $(document).off("click.CFeditorConditionRuleConfirm").on("click.CFeditorConditionRuleConfirm", "#luckysheet-editorConditionRule-dialog-confirm",function(){ + let index = $("#luckysheet-editorConditionRule-dialog .ruleTypeItem.on").index(); + let type1 = $("#luckysheet-editorConditionRule-dialog #type1 option:selected").val(); + let type2 = $("#luckysheet-editorConditionRule-dialog ." + type1 + "Box #type2 option:selected").val(); + + let cellrange = _this.editorRule["data"].cellrange; + + let format, rule; + if(index == 0){ + if(type1 == "dataBar"){ //数据条 + let color = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString(); + + if(type2 == "gradient"){ //渐变填充 + format = [color, "#ffffff"]; + } + else if(type2 == "solid"){ //实心填充 + format = [color]; + } + + rule = { + "type": "dataBar", + "cellrange": cellrange, + "format": format + }; + } + else if(type1 == "colorGradation"){ //色阶 + let maxcolor = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); + let midcolor = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); + let mincolor = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); + + if(type2 == "threeColor"){ //三色 + format = [maxcolor, midcolor, mincolor]; + } + else if(type2 == "twoColor"){ //双色 + format = [maxcolor, mincolor]; + } + + rule = { + "type": "colorGradation", + "cellrange": cellrange, + "format": format + }; + } + else if(type1 == "icons"){ //图标集 + let len = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-len"); + let leftMin = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"); + let top = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-top"); + + format = { + "len": len, + "leftMin": leftMin, + "top": top + }; + + rule = { + "type": "icons", + "cellrange": cellrange, + "format": format + }; + } + } + else{ + let conditionName = "", conditionRange = [], conditionValue = []; + + if(index == 1){ + if(type1 == "number"){ //单元格值 + conditionName = type2; + + if(type2 == "betweenness"){ + let v1 = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); + let v2 = $("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val().trim(); + + //条件值是否是选区 + let rangeArr1 = _this.getRangeByTxt(v1); + if(rangeArr1.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr1.length == 1){ + let r1 = rangeArr1[0].row[0], r2 = rangeArr1[0].row[1]; + let c1 = rangeArr1[0].column[0], c2 = rangeArr1[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v1 = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr1[0].row, "column": rangeArr1[0].column }); + conditionValue.push(v1); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr1.length == 0){ + if(isNaN(v1) || v1 == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v1); + } + } + + let rangeArr2 = _this.getRangeByTxt(v2); + if(rangeArr2.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr2.length == 1){ + let r1 = rangeArr2[0].row[0], r2 = rangeArr2[0].row[1]; + let c1 = rangeArr2[0].column[0], c2 = rangeArr2[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v2 = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr2[0].row, "column": rangeArr2[0].column }); + conditionValue.push(v2); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr2.length == 0){ + if(isNaN(v2) || v2 == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v2); + } + } + } + else{ + //条件值 + let v = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); + + //条件值是否是选区 + let rangeArr = _this.getRangeByTxt(v); + if(rangeArr.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr.length == 1){ + let r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; + let c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); + conditionValue.push(v); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr.length == 0){ + if(isNaN(v) || v == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v); + } + } + } + } + else if(type1 == "text"){ //特定文本 + conditionName = "textContains"; + + //条件值 + let v = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); + + //条件值是否是选区 + let rangeArr = _this.getRangeByTxt(v); + if(rangeArr.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr.length == 1){ + let r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; + let c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); + conditionValue.push(v); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr.length == 0){ + if(isNaN(v) || v == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v); + } + } + } + else if(type1 == "date"){ //发生日期 + conditionName = "occurrenceDate"; + + //条件值 + let v = $("#luckysheet-editorConditionRule-dialog #daterange-btn").val(); + + if(v == "" || v == null){ + _this.infoDialog("请选择日期", ""); + return; + } + + conditionValue.push(v); + } + } + else if(index == 2){ //排名靠前靠后 + //条件名称 + if(type1 == "top"){ + if($("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")){ + conditionName = "top10%"; + } + else{ + conditionName = "top10"; + } + } + else if(type1 == "last"){ + if($("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")){ + conditionName = "last10%"; + } + else{ + conditionName = "last10"; + } + } + + //条件值 + let v = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); + + if(parseInt(v) != v || parseInt(v) < 1 || parseInt(v) > 1000){ + _this.infoDialog("请输入一个介于 1 和 1000 之间的整数", ""); + return; + } + + conditionValue.push(v); + } + else if(index == 3){ //平均值 + if(type1 == "AboveAverage"){ + conditionName = "AboveAverage"; + conditionValue.push("AboveAverage"); + } + else if(type1 == "SubAverage"){ + conditionName = "SubAverage"; + conditionValue.push("SubAverage"); + } + } + else if(index == 4){ //重复值 + conditionName = "duplicateValue"; + conditionValue.push(type1); + } + + //格式颜色 + let textcolor; + if($("#luckysheet-editorConditionRule-dialog #checkTextColor").is(":checked")){ + textcolor = $("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("get").toHexString(); + } + else{ + textcolor = null; + } + + let cellcolor; + if($("#luckysheet-editorConditionRule-dialog #checkCellColor").is(":checked")){ + cellcolor = $("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("get").toHexString(); + } + else{ + cellcolor = null; + } + + format = { + "textColor": textcolor, + "cellColor": cellcolor + }; + + rule = { + "type": "default", + "cellrange": cellrange, + "format": format, + "conditionName": conditionName, + "conditionRange": conditionRange, + "conditionValue": conditionValue + }; + } + + //修改编辑的规则 + let sheetIndex = _this.editorRule["sheetIndex"]; + let itemIndex = _this.editorRule["itemIndex"]; + _this.fileClone[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"][itemIndex] = rule; + + //编辑规则隐藏,管理规则显示 + $("#luckysheet-editorConditionRule-dialog").hide(); + _this.administerRuleDialog(); + }); + $(document).off("click.CFeditorConditionRuleClose").on("click.CFeditorConditionRuleClose", "#luckysheet-editorConditionRule-dialog-close",function(){ + //编辑规则隐藏,管理规则显示 + $("#luckysheet-editorConditionRule-dialog").hide(); + $("#luckysheet-administerRule-dialog").show(); + //隐藏虚线框 + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + }); + + // 新建规则、编辑规则 类型切换 + $(document).off("click.CFnewEditorRuleItem").on("click.CFnewEditorRuleItem", ".luckysheet-newEditorRule-dialog .ruleTypeItem", function(){ + $(this).addClass("on").siblings().removeClass("on"); + + let index = $(this).index(); + $(this).parents(".luckysheet-newEditorRule-dialog").find(".ruleExplainBox").html(_this.getRuleExplain(index)); + + _this.colorSelectInit(); + }); + $(document).off("change.CFnewEditorRuleType1").on("change.CFnewEditorRuleType1", ".luckysheet-newEditorRule-dialog #type1", function(){ + let optionVal = $(this).find("option:selected").val(); + + if(optionVal == "dataBar" || optionVal == "colorGradation" || optionVal == "icons" || optionVal == "number" || optionVal == "text" || optionVal == "date"){ + $(this).parents(".luckysheet-newEditorRule-dialog").find("." + optionVal + "Box").show().siblings().hide(); + } + + if(optionVal == "date"){ + _this.daterangeInit($(this).parents(".luckysheet-newEditorRule-dialog").attr("id")); + } + }); + $(document).off("change.CFnewEditorRuleType2").on("change.CFnewEditorRuleType2", ".luckysheet-newEditorRule-dialog #type2", function(){ + let type1 = $(this).parents(".luckysheet-newEditorRule-dialog").find("#type1 option:selected").val(); + + if(type1 == "colorGradation"){ + let type2 = $(this).find("option:selected").val(); + + if(type2 == "threeColor"){ + $(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").show(); + } + else{ + $(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").hide(); + } + } + else if(type1 == "number"){ + let type2 = $(this).find("option:selected").val(); + + if(type2 == "betweenness"){ + $(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").show(); + $(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").show(); + } + else{ + $(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").hide(); + $(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").hide(); + } + } + }); + $(document).off("click.CFiconsShowbox").on("click.CFiconsShowbox", ".luckysheet-newEditorRule-dialog .iconsBox .showbox", function(){ + $(this).parents(".iconsBox").find("ul").toggle(); + }); + $(document).off("click.CFiconsLi").on("click.CFiconsLi", ".luckysheet-newEditorRule-dialog .iconsBox li", function(){ + let len = $(this).find("div").attr("data-len"); + let leftmin = $(this).find("div").attr("data-leftmin"); + let top = $(this).find("div").attr("data-top"); + let title = $(this).find("div").attr("title"); + let position = $(this).find("div").css("background-position"); + + $(this).parents(".iconsBox").find(".showbox .model").css("background-position", position); + $(this).parents(".iconsBox").find(".showbox .model").attr("data-len", len); + $(this).parents(".iconsBox").find(".showbox .model").attr("data-leftmin", leftmin); + $(this).parents(".iconsBox").find(".showbox .model").attr("data-top", top); + $(this).parents(".iconsBox").find(".showbox .model").attr("title", title); + + $(this).parents("ul").hide(); + }); + + // 删除规则 + $(document).off("click.CFdeleteConditionRule").on("click.CFdeleteConditionRule", "#deleteConditionRule", function(){ + let sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); + let itemIndex = $("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item"); + _this.fileClone[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"].splice(itemIndex, 1); + _this.administerRuleDialog(); + }); + + // 规则子菜单弹出层 点击确定修改样式 + $(document).off("click.CFdefault").on("click.CFdefault", "#luckysheet-conditionformat-dialog-confirm", function(){ + //条件名称 + let conditionName = $("#luckysheet-conditionformat-dialog .box").attr("data-itemvalue"); + + //条件单元格 + let conditionRange = []; + + //条件值 + let conditionValue = []; + if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "equal" || conditionName == "textContains"){ + let v = $("#luckysheet-conditionformat-dialog #conditionVal").val().trim(); + + //条件值是否是选区 + let rangeArr = _this.getRangeByTxt(v); + if(rangeArr.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr.length == 1){ + let r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; + let c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); + conditionValue.push(v); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr.length == 0){ + if(isNaN(v) || v == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v); + } + } + } + else if(conditionName == "betweenness"){//介于 + let v1 = $("#luckysheet-conditionformat-dialog #conditionVal").val().trim(); + let v2 = $("#luckysheet-conditionformat-dialog #conditionVal2").val().trim(); + + //条件值是否是选区 + let rangeArr1 = _this.getRangeByTxt(v1); + if(rangeArr1.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr1.length == 1){ + let r1 = rangeArr1[0].row[0], r2 = rangeArr1[0].row[1]; + let c1 = rangeArr1[0].column[0], c2 = rangeArr1[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v1 = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr1[0].row, "column": rangeArr1[0].column }); + conditionValue.push(v1); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr1.length == 0){ + if(isNaN(v1) || v1 == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v1); + } + } + + let rangeArr2 = _this.getRangeByTxt(v2); + if(rangeArr2.length > 1){ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + else if(rangeArr2.length == 1){ + let r1 = rangeArr2[0].row[0], r2 = rangeArr2[0].row[1]; + let c1 = rangeArr2[0].column[0], c2 = rangeArr2[0].column[1]; + + if(r1 == r2 && c1 == c2){ + v2 = getcellvalue(r1, c1, Store.flowdata); + + conditionRange.push({ "row": rangeArr2[0].row, "column": rangeArr2[0].column }); + conditionValue.push(v2); + } + else{ + _this.infoDialog("只能对单个单元格进行引用", ""); + return; + } + } + else if(rangeArr2.length == 0){ + if(isNaN(v2) || v2 == ""){ + _this.infoDialog("条件值只能是数字或者单个单元格", ""); + return; + } + else{ + conditionValue.push(v2); + } + } + } + else if(conditionName == "occurrenceDate"){//日期 + let v = $("#luckysheet-conditionformat-dialog #daterange-btn").val(); + + if(v == "" || v == null){ + _this.infoDialog("请选择日期", ""); + return; + } + + conditionValue.push(v); + } + else if(conditionName == "duplicateValue"){//重复值 + conditionValue.push($("#luckysheet-conditionformat-dialog #conditionVal option:selected").val()); + } + else if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%"){ + let v = $("#luckysheet-conditionformat-dialog #conditionVal").val().trim(); + + if(parseInt(v) != v || parseInt(v) < 1 || parseInt(v) > 1000){ + _this.infoDialog("请输入一个介于 1 和 1000 之间的整数", ""); + return; + } + + conditionValue.push(v); + } + else if(conditionName == "AboveAverage"){ //高于平均值 + conditionValue.push("AboveAverage"); + } + else if(conditionName == "SubAverage"){ //低于平均值 + conditionValue.push("SubAverage"); + } + + //格式颜色 + let textcolor; + if($("#checkTextColor").is(":checked")){ + textcolor = $("#textcolorshow").spectrum("get").toHexString(); + } + else{ + textcolor = null; + } + + let cellcolor; + if($("#checkCellColor").is(":checked")){ + cellcolor = $("#cellcolorshow").spectrum("get").toHexString(); + } + else{ + cellcolor = null; + } + + //保存之前的规则 + let fileH = $.extend(true, [], Store.luckysheetfile); + let historyRules = _this.getHistoryRules(fileH); + + //保存当前的规则 + let rule = { + "type": "default", + "cellrange": $.extend(true, [], Store.luckysheet_select_save), + "format": { + "textColor": textcolor, + "cellColor": cellcolor + }, + "conditionName": conditionName, + "conditionRange": conditionRange, + "conditionValue": conditionValue + }; + let ruleArr = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] == undefined ? [] : Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]; + ruleArr.push(rule); + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] = ruleArr; + + let fileC = $.extend(true, [], Store.luckysheetfile); + let currentRules = _this.getCurrentRules(fileC); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + //隐藏一些dom + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-conditionformat-dialog").hide(); + + //发送给后台 + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, ruleArr, { "k": "luckysheet_conditionformat_save" }); + } + }); + + // 图标集弹出层 选择 + $(document).off("click.CFicons").on("click.CFicons", "#luckysheet-CFicons-dialog .item", function(){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-CFicons-dialog").hide(); + + if(Store.luckysheet_select_save.length > 0){ + let cellrange = $.extend(true, [], Store.luckysheet_select_save); + let format = { + "len": $(this).attr("data-len"), + "leftMin": $(this).attr("data-leftMin"), + "top": $(this).attr("data-top") + } + + _this.updateItem("icons", cellrange, format); + } + }); + + // 选择单元格 + $(document).on("click", ".range .fa-table", function(){ + let id = $(this).parents(".luckysheet-modal-dialog").attr("id"); + $("#" + id).hide(); + //入口 + let source; + if(id == "luckysheet-conditionformat-dialog"){ + if($(this).siblings("input").attr("id") == "conditionVal"){ + source = "0_1"; + } + else{ + source = "0_2"; + } + } + else if(id == "luckysheet-newConditionRule-dialog"){ + if($(this).parents(".range").attr("id") == "conditionVal"){ + source = "1_1"; + } + else{ + source = "1_2"; + } + } + else if(id == "luckysheet-editorConditionRule-dialog"){ + if($(this).parents(".range").attr("id") == "conditionVal"){ + source = "2_1"; + } + else{ + source = "2_2"; + } + } + //input值 + let v = $(this).siblings("input").val(); + + _this.singleRangeDialog(source, v); + selectionCopyShow(_this.getRangeByTxt(v)); + }); + $(document).on("click", "#luckysheet-singleRange-dialog-confirm", function(){ + $("#luckysheet-modal-dialog-mask").show(); + $(this).parents("#luckysheet-singleRange-dialog").hide(); + + let source = $(this).attr("data-source"); + let v = $(this).parents("#luckysheet-singleRange-dialog").find("input").val(); + + if(source == "0_1"){ + $("#luckysheet-conditionformat-dialog").show(); + $("#luckysheet-conditionformat-dialog #conditionVal").val(v); + } + else if(source == "0_2"){ + $("#luckysheet-conditionformat-dialog").show(); + $("#luckysheet-conditionformat-dialog #conditionVal2").val(v); + } + else if(source == "1_1"){ + $("#luckysheet-newConditionRule-dialog").show(); + $("#luckysheet-newConditionRule-dialog #conditionVal input").val(v); + } + else if(source == "1_2"){ + $("#luckysheet-newConditionRule-dialog").show(); + $("#luckysheet-newConditionRule-dialog #conditionVal2 input").val(v); + } + else if(source == "2_1"){ + $("#luckysheet-editorConditionRule-dialog").show(); + $("#luckysheet-editorConditionRule-dialog #conditionVal input").val(v); + } + else if(source == "2_2"){ + $("#luckysheet-editorConditionRule-dialog").show(); + $("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val(v); + } + + let range = []; + selectionCopyShow(range); + }); + $(document).on("click", "#luckysheet-singleRange-dialog-close", function(){ + $("#luckysheet-modal-dialog-mask").show(); + $(this).parents("#luckysheet-singleRange-dialog").hide(); + + let source = $(this).attr("data-source"); + if(source == "0_1" || source == "0_2"){ + $("#luckysheet-conditionformat-dialog").show(); + } + else if(source == "1_1" || source == "1_2"){ + $("#luckysheet-newConditionRule-dialog").show(); + } + else if(source == "2_1" || source == "2_2"){ + $("#luckysheet-editorConditionRule-dialog").show(); + } + + let range = []; + selectionCopyShow(range); + }); + + // 弹出层右上角关闭按钮 + $(document).on("click", ".luckysheet-modal-dialog-title-close", function(){ + let id = $(this).parents(".luckysheet-modal-dialog").attr("id"); + + //新建规则弹出层 + if(id == "luckysheet-newConditionRule-dialog"){ + let source=$("#" + id).find("#luckysheet-newConditionRule-dialog-close").attr("data-source"); + //新建规则入口 + if(source == 1){ + $("#luckysheet-administerRule-dialog").show(); + } + } + + //编辑规则弹出层 + if(id == "luckysheet-editorConditionRule-dialog"){ + $("#luckysheet-administerRule-dialog").show(); + } + + //选择单元格弹出层 + if(id == "luckysheet-singleRange-dialog"){ + $("#luckysheet-modal-dialog-mask").show(); + + let source = $(this).parents("#luckysheet-singleRange-dialog").find("#luckysheet-singleRange-dialog-confirm").attr("data-source"); + if(source == "0_1" || source == "0_2"){ + $("#luckysheet-conditionformat-dialog").show(); + } + else if(source == "1_1" || source == "1_2"){ + $("#luckysheet-newConditionRule-dialog").show(); + } + else if(source == "2_1" || source == "2_2"){ + $("#luckysheet-editorConditionRule-dialog").show(); + } + + let range = []; + selectionCopyShow(range); + } + + //选择应用范围弹出层 + if(id == "luckysheet-multiRange-dialog"){ + $("#luckysheet-modal-dialog-mask").show(); + + $("#luckysheet-administerRule-dialog").show(); + + let range = []; + selectionCopyShow(range); + } + + //提示框 + if(id == "luckysheet-conditionformat-info-dialog"){ + $("#luckysheet-modal-dialog-mask").show(); + } + }); + + //提示框 + $(document).on("click", "#luckysheet-conditionformat-info-dialog-close", function(){ + $(this).parents("#luckysheet-conditionformat-info-dialog").hide(); + }); + }, + singleRangeDialog: function(source, value){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-singleRange-dialog").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-singleRange-dialog", + "addclass": "luckysheet-singleRange-dialog", + "title": "选择单元格", + "content": '', + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-singleRange-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 300) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-singleRange-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + }, + multiRangeDialog: function(dataItem, value){ + let _this = this; + + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-multiRange-dialog").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-multiRange-dialog", + "addclass": "luckysheet-multiRange-dialog", + "title": "选择应用范围", + "content": '', + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-multiRange-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 300) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-multiRange-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + + selectionCopyShow(_this.getRangeByTxt(value)); + }, + getTxtByRange: function(range){ + if(range.length > 0){ + let txt = []; + + for(let s = 0; s < range.length; s++){ + let r1 = range[s].row[0], r2 = range[s].row[1]; + let c1 = range[s].column[0], c2 = range[s].column[1]; + + txt.push(getRangetxt(Store.currentSheetIndex, { "row": [r1, r2], "column": [c1, c2] }, Store.currentSheetIndex)); + } + + return txt.join(","); + } + }, + getRangeByTxt: function(txt){ + let range = []; + + if(txt.indexOf(",") != -1){ + let arr = txt.split(","); + for(let i = 0; i < arr.length; i++){ + if(formula.iscelldata(arr[i])){ + range.push(formula.getcellrange(arr[i])); + } + else{ + range = []; + break; + } + } + } + else{ + if(formula.iscelldata(txt)){ + range.push(formula.getcellrange(txt)); + } + } + + return range; + }, + colorSelectInit: function(){ + $(".luckysheet-conditionformat-config-color").spectrum({ + showPalette: true, + showPaletteOnly:true, + preferredFormat: "hex", + clickoutFiresChange: false, + showInitial: true, + showInput: true, + // flat: true, + hideAfterPaletteSelect: true, + showSelectionPalette: true, + // showButtons: false,//隐藏选择取消按钮 + maxPaletteSize: 8, + maxSelectionSize: 8, + // color: currenColor, + cancelText: "取消", + chooseText: "确定颜色", + togglePaletteMoreText: "自定义", + togglePaletteLessText: "收起", + togglePaletteOnly: true, + clearText: "清除颜色选择", + noColorSelectedText: "没有颜色被选择", + localStorageKey: "spectrum.textcolor" + server.gridKey, + palette: [["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"], + ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"], + ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"], + ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"], + ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"], + ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"], + ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"], + ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]], + change: function(color){ + if (color != null) { + color = color.toHexString(); + } + } + }); + }, + conditionformatDialog: function(title, content){ + let _this = this; + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-conditionformat-dialog").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-conditionformat-dialog", + "addclass": "luckysheet-conditionformat-dialog", + "title": title, + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-conditionformat-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 300) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-conditionformat-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + + _this.init(); + _this.colorSelectInit(); + + if(title == "条件格式——发生日期"){ + _this.daterangeInit("luckysheet-conditionformat-dialog"); + } + }, + CFiconsDialog: function(){  + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-CFicons-dialog").remove(); + + let content = '
'+ + '
请点击选择一组图标:
'+ + '
方向
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
形状
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
标记
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
等级
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-CFicons-dialog", + "addclass": "luckysheet-CFicons-dialog", + "title": "图标集", + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-CFicons-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 400) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-CFicons-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + }, + administerRuleDialog: function(){ + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-administerRule-dialog").remove(); + + const conditionformat_Text = locale().conditionformat; + + //工作表 + let opHtml = ''; + for(let j = 0; j < Store.luckysheetfile.length; j++){ + if(Store.luckysheetfile[j].status == "1"){ + opHtml += ``; + } + else{ + opHtml += ``; + } + } + + let content = `
+ + +
+
+
+ + + +
+
+
+ ${conditionformat_Text.rule} + ${conditionformat_Text.format} + ${conditionformat_Text.applyRange} +
+
+
+
`; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-administerRule-dialog", + "addclass": "luckysheet-administerRule-dialog", + "title": conditionformat_Text.manageRules, + "content": content, + "botton": ` + `, + "style": "z-index:100003" + })); + let $t = $("#luckysheet-administerRule-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 400) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-administerRule-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + + //当前工作表的规则列表 + let index = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); + this.getConditionRuleList(index); + }, + getConditionRuleList: function(index){ + let _this = this; + + $("#luckysheet-administerRule-dialog .ruleList .listBox").empty(); + + let ruleArr = _this.fileClone[getSheetIndex(index)].luckysheet_conditionformat_save; //条件格式规则集合 + if(ruleArr != null && ruleArr.length > 0){ + const conditionformat_Text = locale().conditionformat; + + for(let i = 0; i < ruleArr.length; i++){ + let type = ruleArr[i]["type"]; //规则类型 + let format = ruleArr[i]["format"]; //规则样式 + let cellrange = ruleArr[i]["cellrange"]; //规则应用范围 + + let ruleName; //规则名称 + let formatHtml = ''; //样式dom + if(type == "dataBar"){ + ruleName = conditionformat_Text.dataBar; + + formatHtml = ''; + } + else if(type == "colorGradation"){ + ruleName = conditionformat_Text.colorGradation; + + formatHtml = ''; + } + else if(type == "icons"){ + ruleName = conditionformat_Text.icons; + + formatHtml = ''; + } + else{ + ruleName = _this.getConditionRuleName(ruleArr[i].conditionName, ruleArr[i].conditionRange, ruleArr[i].conditionValue); + + if(format["textColor"] != null){ + formatHtml += ''; + } + + if(format["cellColor"] != null){ + formatHtml += ''; + } + } + + //应用范围dom + let rangeTxtArr = []; + for(let s = 0; s < cellrange.length; s++){ + let r1 = cellrange[s].row[0], r2 = cellrange[s].row[1]; + let c1 = cellrange[s].column[0], c2 = cellrange[s].column[1]; + + rangeTxtArr.push(chatatABC(c1) + (r1 + 1) + ":" + chatatABC(c2) + (r2 + 1)); + } + + //条件格式规则列表dom + let itemHtml = '
' + + '
' + ruleName + '
' + + '
' + formatHtml + '
' + + '
' + + '' + + '' + + '
' + + '
'; + + $("#luckysheet-administerRule-dialog .ruleList .listBox").prepend(itemHtml); + } + + $("#luckysheet-administerRule-dialog .ruleList .listBox .item canvas").each(function(i){ + let x = $(this).closest(".item").attr("data-item"); + + let type = ruleArr[x]["type"]; + let format = ruleArr[x]["format"]; + + let can = $(this).get(0).getContext("2d"); + if(type == "dataBar"){ + if(format.length == 2){ + let my_gradient = can.createLinearGradient(0, 0, 46, 0); + my_gradient.addColorStop(0, format[0]); + my_gradient.addColorStop(1, format[1]); + can.fillStyle = my_gradient; + can.fillRect(0, 0, 46, 18); + + can.beginPath(); + can.moveTo(0, 0); + can.lineTo(0, 18); + can.lineTo(46, 18); + can.lineTo(46, 0); + can.lineTo(0, 0); + can.lineWidth = Store.devicePixelRatio; + can.strokeStyle = format[0]; + can.stroke(); + can.closePath(); + } + else if(format.length == 1){ + can.fillStyle = format[0]; + can.fillRect(0, 0, 46, 18); + + can.beginPath(); + can.moveTo(0, 0); + can.lineTo(0, 18); + can.lineTo(46, 18); + can.lineTo(46, 0); + can.lineTo(0, 0); + can.lineWidth = Store.devicePixelRatio; + can.strokeStyle = format[0]; + can.stroke(); + can.closePath(); + } + } + else if(type == "colorGradation"){ + let my_gradient = can.createLinearGradient(0, 0, 46, 0); + + if(format.length == 3){ + my_gradient.addColorStop(0, format[0]); + my_gradient.addColorStop(0.5, format[1]); + my_gradient.addColorStop(1, format[2]); + } + else if(format.length == 2){ + my_gradient.addColorStop(0, format[0]); + my_gradient.addColorStop(1, format[1]); + } + + can.fillStyle = my_gradient; + can.fillRect(0, 0, 46, 18); + } + else if(type == "icons"){ + let len = format["len"]; + let l = format["leftMin"]; + let t = format["top"]; + + let w1 = 32 * len + 10 * (len - 1); + let h1 = 32; + let w2 = 46; + let h2 = 46 * 32 / w1; + + if(l == "0"){ + can.drawImage(luckysheet_CFiconsImg, 0, t * 32, w1, h1, 0, (18 - h2) / 2, w2, h2); + } + else if(l == "5"){ + can.drawImage(luckysheet_CFiconsImg, 210, t * 32, w1, h1, 0, (18 - h2) / 2, w2, h2); + } + } + }) + + $("#luckysheet-administerRule-dialog .ruleList .listBox .item").eq(0).addClass("on"); + } + }, + getConditionRuleName: function(conditionName, conditionRange, conditionValue){ + //v 有条件单元格取条件单元格,若无取条件值 + let v + if(conditionRange[0]!=null){ + v = chatatABC(conditionRange[0]["column"][0]) + (conditionRange[0]["row"][0] + 1); + } + else{ + v = conditionValue[0]; + } + + const conditionformat_Text = locale().conditionformat; + + //返回条件格式规则名称 + if(conditionName == "greaterThan"){ + return conditionformat_Text.cellValue + " > " + v; + } + else if(conditionName == "lessThan"){ + return conditionformat_Text.cellValue + " < " + v; + } + else if(conditionName == "betweenness"){ + let v2; + if(conditionRange[1] != null){ + v2 = chatatABC(conditionRange[1]["column"][0]) + (conditionRange[1]["row"][0] + 1); + } + else{ + v2 = conditionValue[1]; + } + return conditionformat_Text.cellValue + " " + conditionformat_Text.between + " " + v + " " + conditionformat_Text.in + " " + v2 + " " + conditionformat_Text.between2; + } + else if(conditionName == "equal"){ + return conditionformat_Text.cellValue + " = " + v; + } + else if(conditionName == "textContains"){ + return conditionformat_Text.cellValue + conditionformat_Text.contain + " =" + v; + } + else if(conditionName == "occurrenceDate"){ + return conditionValue; + } + else if(conditionName == "duplicateValue"){ + if(conditionValue == "0"){ + return conditionformat_Text.duplicateValue; + } + if(conditionValue == "1"){ + return conditionformat_Text.uniqueValue; + } + } + else if(conditionName == "top10"){ + return conditionformat_Text.top + " " + v + " " + conditionformat_Text.oneself; + } + else if(conditionName == "top10%"){ + return conditionformat_Text.top + " " + v + "% " + conditionformat_Text.oneself; + } + else if(conditionName == "last10"){ + return conditionformat_Text.last + " " + v + " " + conditionformat_Text.oneself; + } + else if(conditionName == "last10%"){ + return conditionformat_Text.last + " " + v + "% " + conditionformat_Text.oneself; + } + else if(conditionName == "AboveAverage"){ + return conditionformat_Text.aboveAverage; + } + else if(conditionName == "SubAverage"){ + return conditionformat_Text.belowAverage; + } + }, + newConditionRuleDialog: function(source){ + let _this = this; + + const conditionformat_Text = locale().conditionformat; + + //规则说明 + let ruleExplainHtml = _this.getRuleExplain(0); + + //弹出层 + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-administerRule-dialog").hide(); + $("#luckysheet-newConditionRule-dialog").remove(); + + let content = '
' + + '
' + conditionformat_Text.chooseRuleType + ':
' + + _this.ruleTypeHtml() + + '
' + conditionformat_Text.editRuleDescription + ':
' + + '
' + + ruleExplainHtml + + '
' + + '
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-newConditionRule-dialog", + "addclass": "luckysheet-newEditorRule-dialog", + "title": conditionformat_Text.newFormatRule, + "content": content, + "botton": ` + `, + "style": "z-index:100003" + })); + let $t = $("#luckysheet-newConditionRule-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 400) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-newConditionRule-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + + //index的规则类型focus + $("#luckysheet-newConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq(0)").addClass("on").siblings().removeClass("on"); + + _this.colorSelectInit(); + }, + editorConditionRuleDialog: function(){ + let _this = this; + + let rule = _this.editorRule.data; + let ruleType = rule["type"], ruleFormat = rule["format"]; + + let index, type1; + if(ruleType == "dataBar" || ruleType == "colorGradation" || ruleType == "icons"){ + index = 0; + type1 = ruleType; + } + else{ + let conditionName = rule["conditionName"]; + + if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "betweenness" || conditionName == "equal" || conditionName == "textContains" || conditionName == "occurrenceDate"){ + index = 1; + + if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "betweenness" || conditionName == "equal"){ + type1 = "number"; + } + else if(conditionName == "textContains"){ + type1 = "text"; + } + else if(conditionName == "occurrenceDate"){ + type1 = "date"; + } + } + else if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%"){ + index = 2; + + if(conditionName == "top10" || conditionName == "top10%"){ + type1 = "top"; + } + else if(conditionName == "last10" || conditionName == "last10%"){ + type1 = "last"; + } + } + else if(conditionName == "AboveAverage" || conditionName == "SubAverage"){ + index = 3; + type1 = conditionName; + } + else if(conditionName == "duplicateValue"){ + index = 4; + type1 = rule["conditionValue"]; + } + } + + //规则说明 + let ruleExplainHtml = _this.getRuleExplain(index); + + //弹出层 + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-administerRule-dialog").hide(); + $("#luckysheet-editorConditionRule-dialog").remove(); + + let content = '
' + + '
选择规则类型:
' + + _this.ruleTypeHtml() + + '
编辑规则说明:
' + + '
' + + ruleExplainHtml + + '
' + + '
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-editorConditionRule-dialog", + "addclass": "luckysheet-newEditorRule-dialog", + "title": "编辑格式规则", + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-editorConditionRule-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 400) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-editorConditionRule-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + + _this.colorSelectInit(); + + //规则类型focus + $("#luckysheet-editorConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq(" + index + ")").addClass("on").siblings().removeClass("on"); + + //type1 + $("#luckysheet-editorConditionRule-dialog #type1").val(type1); + if(type1 == "dataBar" || type1 == "colorGradation" || type1 == "icons" || type1 == "number" || type1 == "text" || type1 == "date"){ + $("#luckysheet-editorConditionRule-dialog ." + type1 + "Box").show(); + $("#luckysheet-editorConditionRule-dialog ." + type1 + "Box").siblings().hide(); + } + + if(type1 == "date"){ + _this.daterangeInit("luckysheet-editorConditionRule-dialog"); + } + + //type2 format value + if(ruleType == "dataBar" || ruleType == "colorGradation" || ruleType == "icons"){ + if(type1 == "dataBar"){ + if(ruleFormat.length == 2){ + $("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("gradient"); + } + else if(ruleFormat.length == 1){ + $("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("solid"); + } + + $("#luckysheet-editorConditionRule-dialog .dataBarBox .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[0]); + } + else if(type1 == "colorGradation"){ + if(ruleFormat.length == 3){ + $("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("threeColor"); + + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").show(); + + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[0]); + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[1]); + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[2]); + } + else if(ruleFormat.length == 2){ + $("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("twoColor"); + + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").hide(); + + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[0]); + $("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[1]); + } + } + else if(type1 == "icons"){ + let len = ruleFormat["len"]; + let l = ruleFormat["leftMin"]; + let t = ruleFormat["top"]; + + $("#luckysheet-editorConditionRule-dialog .iconsBox li").each(function(i, e){ + if($(e).find("div").attr("data-len") == len && $(e).find("div").attr("data-leftmin") == l && $(e).find("div").attr("data-top") == t){ + $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").css("background-position", $(e).find("div").css("background-position")); + $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-len", $(e).find("div").attr("data-len")); + $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-leftmin", $(e).find("div").attr("data-leftmin")); + $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-top", $(e).find("div").attr("data-leftmin")); + $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("title", $(e).find("div").attr("title")); + + return true; + } + }); + } + } + else{ + if(type1 == "number"){ + $("#luckysheet-editorConditionRule-dialog .numberBox #type2").val(conditionName); + + let val1; + if(rule.conditionRange[0] != null){ + val1 = getRangetxt(Store.currentSheetIndex, { "row": rule.conditionRange[0]["row"], "column": rule.conditionRange[0]["column"] }, Store.currentSheetIndex); + } + else{ + val1 = rule.conditionValue[0]; + } + + $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal input").val(val1); + + if(conditionName == "betweenness"){ + $("#luckysheet-editorConditionRule-dialog .numberBox .txt").show(); + $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").show(); + + let val2; + if(rule.conditionRange[1] != null){ + val2 = getRangetxt(Store.currentSheetIndex, { "row": rule.conditionRange[1]["row"], "column": rule.conditionRange[1]["column"] }, Store.currentSheetIndex); + } + else{ + val2 = rule.conditionValue[1]; + } + + $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2 input").val(val2); + } + else{ + $("#luckysheet-editorConditionRule-dialog .numberBox .txt").hide(); + $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").hide(); + } + } + else if(type1 == "text"){ + let val1; + if(rule.conditionRange[0] != null){ + val1 = getRangetxt(Store.currentSheetIndex, { "row": rule.conditionRange[0]["row"], "column": rule.conditionRange[0]["column"] }, Store.currentSheetIndex); + } + else{ + val1 = rule.conditionValue[0]; + } + + $("#luckysheet-editorConditionRule-dialog .textBox #conditionVal input").val(val1); + } + else if(type1 == "date"){ + _this.daterangeInit("luckysheet-editorConditionRule-dialog"); + + let val1 = rule.conditionValue[0]; + $("#luckysheet-editorConditionRule-dialog .dateBox #daterange-btn").val(val1); + } + else if(type1 == "top" || type1 == "last"){ + let val1 = rule.conditionValue[0]; + + if(conditionName == "top10%" || conditionName == "last10%"){ + $("#luckysheet-editorConditionRule-dialog #isPercent").attr("checked", "checked"); + } + } + + $("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("set", ruleFormat.textColor); + $("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("set", ruleFormat.cellColor); + } + }, + infoDialog: function(title, content){ + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-conditionformat-info-dialog").remove(); + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-conditionformat-info-dialog", + "addclass": "", + "title": title, + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-conditionformat-info-dialog") + .find(".luckysheet-modal-dialog-content") + .css("min-width", 300) + .end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-conditionformat-info-dialog").css({ + "left": (winw + scrollLeft - myw) / 2, + "top": (winh + scrollTop - myh) / 3 + }).show(); + }, + getRuleExplain: function(index){ + const conditionformat_Text = locale().conditionformat; + + let textCellColorHtml = this.textCellColorHtml(); + + let ruleExplainHtml; + switch(index){ + case 0: //基于各自值设置所有单元格的格式 + ruleExplainHtml = `
${conditionformat_Text.ruleTypeItem1}:
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
`; + break; + case 1: //只为包含以下内容的单元格设置格式 + ruleExplainHtml = '
只为满足以下条件的单元格:
' + + '
' + + ''+ + '
' + + '
' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
设置格式:
' + textCellColorHtml; + break; + case 2: //仅对排名靠前或靠后的数值设置格式 + ruleExplainHtml = '
为以下排名内的值:
'+ + '
'+ + ''+ + '
'+ + ''+ + '
'+ + ''+ + ''+ + '
'+ + '
设置格式:
' + textCellColorHtml; + break; + case 3: //仅对高于或低于平均值的数值设置格式 + ruleExplainHtml = '
为满足以下条件的值:
'+ + '
'+ + ''+ + '选定范围的平均值'+ + '
'+ + '
设置格式:
' + textCellColorHtml; + break; + case 4: //仅对唯一值或重复值设置格式 + ruleExplainHtml = '
全部:
'+ + '
'+ + ''+ + '选定范围中的数值'+ + '
'+ + '
设置格式:
' + textCellColorHtml; + break; + } + + return ruleExplainHtml; + }, + daterangeInit: function(id){ + //日期选择插件 + $('.ranges_1 ul').remove(); + $('#' + id).find("#daterange-btn").daterangepicker({ + ranges: + { + // '全部': [moment(), moment().subtract(-1, 'days')], + '昨天': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + '今天': [moment(), moment()], + // '明天': [moment().subtract(-1, 'days'), moment().subtract(-1, 'days')], + '上周': [moment(moment().subtract(1, 'week')).subtract(new Date().getDay() - 1, 'days'), moment().subtract(new Date().getDay(), 'days')], + '本周': [moment().subtract(new Date().getDay() - 1, 'days'), moment().add(7 - new Date().getDay(), 'days')], + '上月': [moment(moment().format('YYYY-MM')).subtract(1, 'month'), moment(moment().format('YYYY-MM')).subtract(1, 'day')], + '本月': [moment().format('YYYY-MM'), moment(moment(moment().format('YYYY-MM')).add(1, 'month')).subtract(1, 'day')], + '去年': [moment(moment(moment().format('YYYY'))).subtract(1, 'years').format('YYYY'), moment(moment().format('YYYY')).subtract(1, 'day')], + '本年': [moment().format('YYYY'), moment(moment(moment().add(1, 'years')).format('YYYY')).subtract(1, 'day')], + '最近7天': [moment().subtract(6, 'days'), moment()], + '最近30天': [moment().subtract(29, 'days'), moment()] + // '未来七天': [moment(),moment().subtract(-6, 'days')], + // '未来30天': [moment(),moment().subtract(-29, 'days')], + // '未来60天': [moment(),moment().subtract(-59, 'days'), ] + }, + startDate: moment(), + endDate: moment() + }, + function(start, end,label) { + //label:通过它来知道用户选择的是什么,传给后台进行相应的展示 + if(label == '全部'){ + $('#daterange-btn').val(''); + } + else if(label == '昨天' || label == '今天'){ + $('#daterange-btn').val(start.format('YYYY/MM/DD')); + } + else if(label == '上周' || label == '本周' || label == '上月' || label == '本月' || label == '去年' || label == '本年' || label == '最近7天' || label == '最近30天'){ + $('#daterange-btn').val(start.format('YYYY/MM/DD')+'-'+end.format('YYYY/MM/DD')); + } + } + ); + }, + CFSplitRange: function(range1, range2, range3, type){ + let range = []; + + let offset_r = range3["row"][0] - range2["row"][0]; + let offset_c = range3["column"][0] - range2["column"][0]; + + let r1 = range1["row"][0], r2 = range1["row"][1]; + let c1 = range1["column"][0], c2 = range1["column"][1]; + + if(r1 >= range2["row"][0] && r2 <= range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 全部 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = []; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + } + else if(r1 >= range2["row"][0] && r1 <= range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 行贯穿 条件格式应用范围 上部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + } + else if(r2 >= range2["row"][0] && r2 <= range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 行贯穿 条件格式应用范围 下部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + } + else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 行贯穿 条件格式应用范围 中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } + ]; + } + } + else if(c1 >= range2["column"][0] && c1 <= range2["column"][1] && r1 >= range2["row"][0] && r2 <= range2["row"][1]){ + //选区 列贯穿 条件格式应用范围 左部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] }, + { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(c2 >= range2["column"][0] && c2 <= range2["column"][1] && r1 >= range2["row"][0] && r2 <= range2["row"][1]){ + //选区 列贯穿 条件格式应用范围 右部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] }, + { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + } + else if(c1 < range2["column"][0] && c2 > range2["column"][1] && r1 >= range2["row"][0] && r2 <= range2["row"][1]){ + //选区 列贯穿 条件格式应用范围 中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] }, + { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] }, + { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] }, + { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(r1 >= range2["row"][0] && r1 <= range2["row"][1] && c1 >= range2["column"][0] && c1 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 左上角部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(r1 >= range2["row"][0] && r1 <= range2["row"][1] && c2 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 右上角部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + } + else if(r2 >= range2["row"][0] && r2 <= range2["row"][1] && c1 >= range2["column"][0] && c1 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 左下角部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(r2 >= range2["row"][0] && r2 <= range2["row"][1] && c2 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 右下角部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + } + else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c1 >= range2["column"][0] && c1 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 左中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c2 >= range2["column"][0] && c2 <= range2["column"][1]){ + //选区 包含 条件格式应用范围 右中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } + ]; + } + } + else if(c1 < range2["column"][0] && c2 > range2["column"][1] && r1 >= range2["row"][0] && r1 <= range2["row"][1]){ + //选区 包含 条件格式应用范围 上中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(c1 < range2["column"][0] && c2 > range2["column"][1] && r2 >= range2["row"][0] && r2 <= range2["row"][1]){ + //选区 包含 条件格式应用范围 下中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c1 < range2["column"][0] && c2 > range2["column"][1]){ + //选区 包含 条件格式应用范围 正中间部分 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, + { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, + { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = [ + { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } + ]; + } + } + else{ + //选区 在 条件格式应用范围 之外 + + if(type == "allPart"){ //所有部分 + range = [ + { "row": [r1, r2], "column": [c1, c2] } + ]; + } + else if(type == "restPart"){ //剩余部分 + range = [ + { "row": [r1, r2], "column": [c1, c2] } + ]; + } + else if(type == "operatePart"){ //操作部分 + range = []; + } + } + + return range; + }, + getcolorGradation: function(color1, color2, value1, value2, value){ + let rgb1 = color1.split(','); + let r1 = parseInt(rgb1[0].split('(')[1]); + let g1 = parseInt(rgb1[1]); + let b1 = parseInt(rgb1[2].split(')')[0]); + + let rgb2 = color2.split(','); + let r2 = parseInt(rgb2[0].split('(')[1]); + let g2 = parseInt(rgb2[1]); + let b2 = parseInt(rgb2[2].split(')')[0]); + + let r = Math.round(r1 - (r1 - r2) / (value1 - value2) * (value1 - value)); + let g = Math.round(g1 - (g1 - g2) / (value1 - value2) * (value1 - value)); + let b = Math.round(b1 - (b1 - b2) / (value1 - value2) * (value1 - value)); + + return "rgb("+ r +", "+ g +", "+ b +")"; + }, + getCFPartRange: function(sheetIndex, range1, range2){ + let ruleArr = []; + + let cf = Store.luckysheetfile[getSheetIndex(sheetIndex)].luckysheet_conditionformat_save; + if(cf != null && cf.length > 0){ + label: for(let i = 0; i < cf.length; i++){ + let cellrange = cf[i].cellrange; + + for(let j = 0; j < cellrange.length; j++){ + let r1 = cellrange[j].row[0], r2 = cellrange[j].row[1]; + let c1 = cellrange[j].column[0], c2 = cellrange[j].column[1]; + + for(let s = 0; s < range.length; s++){ + if((range[s].row[0] >= r1 && range[s].row[0] <= r2) || (range[s].row[1] >= r1 && range[s].row[1] <= r2) || (range[s].column[0] >= c1 && range[s].column[0] <= c2) || (range[s].column[1] >= c1 && range[s].column[1] <= c2)){ + ruleArr.push(cf[i]); + + continue label; + } + } + } + } + } + + return ruleArr; + }, + checksCF: function(r, c, computeMap){ + if(computeMap != null && (r + "_" + c) in computeMap){ + return computeMap[r + "_" + c]; + } + else{ + return null; + } + }, + getComputeMap: function(){ + let index = getSheetIndex(Store.currentSheetIndex); + + let ruleArr = Store.luckysheetfile[index]["luckysheet_conditionformat_save"]; + let data = Store.luckysheetfile[index]["data"]; + + if(data == null){ + return null; + } + + let computeMap = this.compute(ruleArr, data); + + return computeMap; + }, + compute: function(ruleArr, d){ + let _this = this; + + if(ruleArr == null){ + ruleArr = []; + } + + //条件计算存储 + let computeMap = {}; + + if(ruleArr.length > 0){ + for(let i = 0; i < ruleArr.length; i++){ + let type = ruleArr[i]["type"]; + let cellrange = ruleArr[i]["cellrange"]; + let format = ruleArr[i]["format"]; + + if(type == "dataBar"){ //数据条 + let max = null, min = null; + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(max == null || parseInt(cell.v) > max){ + max = parseInt(cell.v); + } + + if(min == null || parseInt(cell.v) < min){ + min = parseInt(cell.v); + } + } + } + } + } + + if(max != null && min != null){ + if(min < 0){ //选区范围内有负数 + let plusLen = Math.round(max / (max - min) * 10) / 10; //正数所占比 + let minusLen = Math.round(Math.abs(min) / (max - min) * 10) / 10; //负数所占比 + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(parseInt(cell.v) < 0){ //负数 + let valueLen = Math.round(Math.abs(parseInt(cell.v)) / Math.abs(min) * 100) / 100; + + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["dataBar"] = { "valueType": "minus", "minusLen": minusLen, "valueLen": valueLen, "format": format }; + } + else{ + computeMap[r + "_" + c] = { "dataBar": { "valueType": "minus", "minusLen": minusLen, "valueLen": valueLen, "format": format } }; + } + } + + if(parseInt(cell.v) > 0){ //正数 + let valueLen = Math.round(parseInt(cell.v) / max * 100) / 100; + + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["dataBar"] = { "valueType": "plus", "plusLen": plusLen, "minusLen": minusLen, "valueLen": valueLen, "format": format }; + } + else{ + computeMap[r + "_" + c] = { "dataBar": { "valueType": "plus", "plusLen": plusLen, "minusLen": minusLen, "valueLen": valueLen, "format": format } }; + } + } + } + } + } + } + } + else{ + let plusLen = 1; + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + let valueLen; + if(max == 0){ + valueLen = 1; + } + else{ + valueLen = Math.round(parseInt(cell.v) / max * 100) / 100; + } + + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["dataBar"] = { "valueType": "plus", "plusLen": plusLen, "valueLen": valueLen, "format": format }; + } + else{ + computeMap[r + "_" + c] = { "dataBar": { "valueType": "plus", "plusLen": plusLen, "valueLen": valueLen, "format": format } }; + } + } + } + } + } + } + } + } + else if(type == "colorGradation"){ //色阶 + let max = null, min = null, sum = 0, count = 0; + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + count++; + sum += parseInt(cell.v); + + if(max == null || parseInt(cell.v) > max){ + max = parseInt(cell.v); + } + + if(min == null || parseInt(cell.v) < min){ + min = parseInt(cell.v); + } + } + } + } + } + + if(max != null && min != null){ + if(format.length == 3){ //三色色阶 + let avg = Math.floor(sum / count); + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(parseInt(cell.v) == min){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = format[2]; + } + else{ + computeMap[r + "_" + c] = { "cellColor": format[2] }; + } + } + else if(parseInt(cell.v) > min && parseInt(cell.v) < avg){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = _this.getcolorGradation(format[2], format[1], min, avg, parseInt(cell.v)); + } + else{ + computeMap[r + "_" + c] = { "cellColor": _this.getcolorGradation(format[2], format[1], min, avg, parseInt(cell.v)) }; + } + } + else if(parseInt(cell.v) == avg){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = format[1]; + } + else{ + computeMap[r + "_" + c] = { "cellColor": format[1] }; + } + } + else if(parseInt(cell.v) > avg && parseInt(cell.v) < max){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = _this.getcolorGradation(format[1], format[0], avg, max, parseInt(cell.v)); + } + else{ + computeMap[r + "_" + c] = { "cellColor": _this.getcolorGradation(format[1], format[0], avg, max, parseInt(cell.v)) }; + } + } + else if(parseInt(cell.v) == max){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = format[0]; + } + else{ + computeMap[r + "_" + c] = { "cellColor": format[0] }; + } + } + } + } + } + } + } + else if(format.length == 2){ //两色色阶 + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(parseInt(cell.v) == min){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = format[1]; + } + else{ + computeMap[r + "_" + c] = { "cellColor": format[1] }; + } + } + else if(parseInt(cell.v) > min && parseInt(cell.v) < max){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = _this.getcolorGradation(format[1], format[0], min, max, parseInt(cell.v)); + } + else{ + computeMap[r + "_" + c] = { "cellColor": _this.getcolorGradation(format[1], format[0], min, max, parseInt(cell.v)) }; + } + } + else if(parseInt(cell.v) == max){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["cellColor"] = format[0]; + } + else{ + computeMap[r + "_" + c] = { "cellColor": format[0] }; + } + } + } + } + } + } + } + } + } + else if(type == "icons"){ //图标集 + let len = parseInt(format["len"]); + let leftMin = parseInt(format["leftMin"]); + let top = parseInt(format["top"]); + + let max = null, min = null; + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(max == null || parseInt(cell.v) > max){ + max = parseInt(cell.v); + } + + if(min == null || parseInt(cell.v) < min){ + min = parseInt(cell.v); + } + } + } + } + } + + if(max != null && min != null){ + let a = Math.floor((max - min + 1) / len); + let b = (max - min + 1) % len; + + if(len == 3){ //一组图标有三个 + let v1, v2, v3; + if(b == 2){ + v1 = [min, min + a]; + v2 = [min + a + 1, min + a * 2]; + v3 = [min + a * 2 + 1, max]; + } + else{ + v1 = [min, min + a - 1]; + v2 = [min + a, min + a * 2 - 1]; + v3 = [min + a * 2, max]; + } + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(parseInt(cell.v) >= v1[0] && parseInt(cell.v) <= v1[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 2, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 2, "top": top} }; + } + } + else if(parseInt(cell.v) >= v2[0] && parseInt(cell.v) <= v2[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 1, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 1, "top": top} }; + } + } + else if(parseInt(cell.v) >= v3[0] && parseInt(cell.v) <= v3[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin, "top": top} }; + } + } + } + } + } + } + } + else if(len == 4){ //一组图标有四个 + let v1, v2, v3, v4; + if(b == 2){ + v1 = [min, min + a]; + v2 = [min + a + 1, min + a * 2]; + v3 = [min + a * 2 + 1, min + a * 3]; + v4 = [min + a * 3 + 1, max]; + } + else if(b == 3){ + v1 = [min, min + a]; + v2 = [min + a + 1, min + a * 2]; + v3 = [min + a * 2 + 1, min + a * 3 + 1]; + v4 = [min + a * 3 + 2, max]; + } + else{ + v1 = [min, min + a - 1]; + v2 = [min + a, min + a * 2 - 1]; + v3 = [min + a * 2, min + a * 3 - 1]; + v4 = [min + a * 3, max]; + } + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(parseInt(cell.v) >= v1[0] && parseInt(cell.v) <= v1[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 3, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 3, "top": top} }; + } + } + else if(parseInt(cell.v) >= v2[0] && parseInt(cell.v) <= v2[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 2, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 2, "top": top} }; + } + } + else if(parseInt(cell.v) >= v3[0] && parseInt(cell.v) <= v3[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 1, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 1, "top": top} }; + } + } + else if(parseInt(cell.v) >= v4[0] && parseInt(cell.v) <= v4[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin, "top": top} }; + } + } + } + } + } + } + } + else if(len == 5){ //一组图标有五个 + let v1, v2, v3, v4, v5; + if(b == 2){ + v1 = [min, min + a]; + v2 = [min + a + 1, min + a * 2]; + v3 = [min + a * 2 + 1, min + a * 3]; + v4 = [min + a * 3 + 1, min + a * 4]; + v5 = [min + a * 4 + 1, max]; + } + else if(b == 3){ + v1 = [min, min + a]; + v2 = [min + a + 1, min + a * 2]; + v3 = [min + a * 2 + 1, min + a * 3 + 1]; + v4 = [min + a * 3 + 2, min + a * 4 + 1]; + v5 = [min + a * 4 + 2, max]; + } + else if(b == 4){ + v1 = [min, min + a]; + v2 = [min + a + 1, min + a * 2 + 1]; + v3 = [min + a * 2 + 2, min + a * 3 + 1]; + v4 = [min + a * 3 + 2, min + a * 4 + 2]; + v5 = [min + a * 4 + 3, max]; + } + else{ + v1 = [min, min + a - 1]; + v2 = [min + a, min + a * 2 - 1]; + v3 = [min + a * 2, min + a * 3 - 1]; + v4 = [min + a * 3, min + a * 4 - 1]; + v5 = [min + a * 4, max]; + } + + for(let s = 0; s < cellrange.length; s++){ + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + let cell = d[r][c]; + + if(getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ + if(parseInt(cell.v) >= v1[0] && parseInt(cell.v) <= v1[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 4, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 4, "top": top} }; + } + } + else if(parseInt(cell.v) >= v2[0] && parseInt(cell.v) <= v2[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 3, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 3, "top": top} }; + } + } + else if(parseInt(cell.v) >= v3[0] && parseInt(cell.v) <= v3[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 2, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 2, "top": top} }; + } + } + else if(parseInt(cell.v) >= v4[0] && parseInt(cell.v) <= v4[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin + 1, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin + 1, "top": top} }; + } + } + else if(parseInt(cell.v) >= v5[0] && parseInt(cell.v) <= v5[1]){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["icons"] = {"left": leftMin, "top": top}; + } + else{ + computeMap[r + "_" + c] = { "icons": {"left": leftMin, "top": top} }; + } + } + } + } + } + } + } + } + } + else{ + //获取变量值 + let conditionName = ruleArr[i].conditionName, //条件名称 + conditionValue0 = ruleArr[i].conditionValue[0], //条件值1 + conditionValue1 = ruleArr[i].conditionValue[1], //条件值2 + textColor = format.textColor, //条件格式文本颜色 fc + cellColor = format.cellColor; //条件格式单元格颜色 bg + + for(let s = 0; s < cellrange.length; s++){ + //条件类型判断 + if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "equal" || conditionName == "textContains"){ + //循环应用范围计算 + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + //单元格值 + let cell = d[r][c]; + + if(getObjType(cell) != "object" || isRealNull(cell.v)){ + continue; + } + + //符合条件 + if(conditionName == "greaterThan" && cell.v > conditionValue0){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + else if(conditionName == "lessThan" && cell.v < conditionValue0){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + else if(conditionName == "equal" && cell.v == conditionValue0){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + else if(conditionName == "textContains" && cell.v.toString().indexOf(conditionValue0) != -1){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + else if(conditionName == "betweenness"){ + //比较条件值1和条件值2的大小 + let vBig, vSmall; + if(conditionValue0 > conditionValue1){ + vBig = conditionValue0; + vSmall = conditionValue1; + } + else{ + vBig = conditionValue1; + vSmall = conditionValue0; + } + //循环应用范围计算 + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + //单元格值 + let cell = d[r][c]; + + if(getObjType(cell) != "object" || isRealNull(cell.v)){ + continue; + } + + //符合条件 + if(cell.v >= vSmall && cell.v <= vBig){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + else if(conditionName == "occurrenceDate"){ + //获取日期所对应的数值 + let dBig, dSmall; + if(conditionValue0.toString().indexOf("-") == -1){ + dBig = genarate(conditionValue0)[2]; + dSmall = genarate(conditionValue0)[2]; + } + else{ + let str = conditionValue0.toString().split("-"); + dBig = genarate(str[1].trim())[2]; + dSmall = genarate(str[0].trim())[2]; + } + //循环应用范围计算 + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + //单元格值类型为日期类型 + if(d[r][c].ct != null && d[r][c].ct.t == "d"){ + //单元格值 + let cellVal = getcellvalue(r, c, d); + //符合条件 + if(cellVal >= dSmall && cellVal <= dBig){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + } + else if(conditionName == "duplicateValue"){ + //应用范围单元格值处理 + let dmap = {}; + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + let item = getcellvalue(r, c, d); + if(!(item in dmap)){ + dmap[item] = []; + } + dmap[item].push({"r": r, "c": c}); + } + } + //循环应用范围计算 + if(conditionValue0 == "0"){//重复值 + for(let x in dmap){ + if(x != "null" && x != "undefined" && dmap[x].length > 1){ + for(let j = 0; j < dmap[x].length; j++){ + if((dmap[x][j].r + "_" + dmap[x][j].c) in computeMap){ + computeMap[dmap[x][j].r + "_" + dmap[x][j].c]["textColor"] = textColor; + computeMap[dmap[x][j].r + "_" + dmap[x][j].c]["cellColor"] = cellColor; + } + else{ + computeMap[dmap[x][j].r + "_" + dmap[x][j].c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + if(conditionValue0 == "1"){//唯一值 + for(let x in dmap){ + if(x != "null" && x != "undefined" && dmap[x].length == 1){ + if((dmap[x][0].r + "_" + dmap[x][0].c) in computeMap){ + computeMap[dmap[x][0].r + "_" + dmap[x][0].c]["textColor"] = textColor; + computeMap[dmap[x][0].r + "_" + dmap[x][0].c]["cellColor"] = cellColor; + } + else{ + computeMap[dmap[x][0].r + "_" + dmap[x][0].c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + else if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%" || conditionName == "AboveAverage" || conditionName == "SubAverage"){ + //应用范围单元格值(数值型) + let dArr=[]; + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + //单元格值类型为数字类型 + if(d[r][c].ct != null && d[r][c].ct.t == "n"){ + dArr.push(getcellvalue(r, c, d)); + } + } + } + //数组处理 + if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%"){ + //从大到小排序 + for(let j = 0; j < dArr.length; j++){ + for(let k = 0; k < dArr.length - 1 - j; k++){ + if(dArr[k] averageNum){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + else if(conditionName == "SubAverage"){ //低于平均值 + for(let r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ + for(let c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ + if(d[r] == null || d[r][c] == null){ + continue; + } + + //单元格值 + let cellVal = getcellvalue(r, c, d); + //符合条件 + if(cellVal < averageNum){ + if((r + "_" + c) in computeMap){ + computeMap[r + "_" + c]["textColor"] = textColor; + computeMap[r + "_" + c]["cellColor"] = cellColor; + } + else{ + computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; + } + } + } + } + } + } + } + } + } + } + } + + return computeMap; + }, + updateItem: function(type, cellrange, format){ + let _this = this; + let index = getSheetIndex(Store.currentSheetIndex); + + //保存之前的规则 + let fileH = $.extend(true, [], Store.luckysheetfile); + let historyRules = _this.getHistoryRules(fileH); + + //保存当前的规则 + let ruleArr; + if(type == "delSheet"){ + ruleArr = []; + } + else{ + let rule = { + "type": type, + "cellrange": cellrange, + "format": format + }; + ruleArr = Store.luckysheetfile[index]["luckysheet_conditionformat_save"] == null ? [] : Store.luckysheetfile[index]["luckysheet_conditionformat_save"]; + ruleArr.push(rule); + } + + Store.luckysheetfile[index]["luckysheet_conditionformat_save"] = ruleArr; + + let fileC = $.extend(true, [], Store.luckysheetfile); + let currentRules = _this.getCurrentRules(fileC); + + //刷新一次表格 + _this.ref(historyRules, currentRules); + + //发送给后台 + if(server.allowUpdate){ + server.saveParam("all", Store.currentSheetIndex, ruleArr, { "k": "luckysheet_conditionformat_save" }); + } + }, + getHistoryRules: function(fileH){ + let historyRules = []; + + for(let h = 0; h < fileH.length; h++){ + historyRules.push({"sheetIndex": fileH[h]["index"], "luckysheet_conditionformat_save": fileH[h]["luckysheet_conditionformat_save"]}); + } + + return historyRules; + }, + getCurrentRules: function(fileC){ + let currentRules = []; + + for(let c = 0; c < fileC.length; c++){ + currentRules.push({"sheetIndex": fileC[c]["index"], "luckysheet_conditionformat_save": fileC[c]["luckysheet_conditionformat_save"]}); + } + + return currentRules; + }, + ref: function(historyRules, currentRules){ + if (Store.clearjfundo) { + Store.jfundo = []; + + let redo = {}; + redo["type"] = "updateCF"; + redo["data"] = {"historyRules": historyRules, "currentRules": currentRules}; + Store.jfredo.push(redo); + } + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } +} + +export default conditionformat; \ No newline at end of file diff --git a/src/controllers/constant.js b/src/controllers/constant.js new file mode 100644 index 000000000..9697dd016 --- /dev/null +++ b/src/controllers/constant.js @@ -0,0 +1,1287 @@ +import locale from '../locale/locale'; + +//dom variable +const gridHTML = '
' + + '' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '
新打开
' + + '
待更新
' + + '
${functionButton}
' + + '
' + + '
${menu}
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
${columnHeader}' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
${rowHeader}' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
${flow}' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
', + columeHeader_word = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'], + columeHeader_word_index = { 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25 }, + flow = '
${flow}
', + colsmenuHTML = ''; + +//右键菜单dom +function rightclickHTML(){ + const rightclick = locale().rightclick; + + return `
+
+
${rightclick.copy}
+
+
+
+ ${rightclick.copyAs} +
+
+
+
${rightclick.paste}
+
+
+ +
+
+ ${rightclick.insert} +
+
+
+
+ ${rightclick.delete} +
+
+
+
+ ${rightclick.hide} +
+
+
+
+ +
+
+ ${rightclick.to} + ${rightclick.left} + ${rightclick.add} + + ${rightclick.column} + +
+
+
+
+ ${rightclick.to} + ${rightclick.right} + ${rightclick.add} + + ${rightclick.column} + +
+
+
+
+ ${rightclick.deleteSelected} + ${rightclick.column} +
+
+
+
+ ${rightclick.column} + ${rightclick.width} + + px + +
+
+
+
+ +
+
${rightclick.orderAZ}
+
+
+
${rightclick.orderZA}
+
+
+
+ +
+
${rightclick.clearContent}
+
+
+
+ ${rightclick.matrix} +
+
+
+
${rightclick.sortSelection}
+
+
+
${rightclick.filterSelection}
+
+
+
${rightclick.chartGeneration}
+
+
+
+
+
+
+ Json + + +
+
+
+
${rightclick.array1}
+
+
+
${rightclick.array2}
+
+
+
+
${rightclick.array3}
+
+ + × + + +
+
+
+ +
+
${rightclick.diagonal}
+
+
+
${rightclick.antiDiagonal}
+
+
+
+ ${rightclick.diagonalOffset} + + ${rightclick.column} + +
+
+
+
${rightclick.boolean}
+
+
+
+
+
+ ${rightclick.to}${rightclick.top}${rightclick.add} + + ${rightclick.row} + +
+
+
+
+ ${rightclick.to}${rightclick.bottom}${rightclick.add} + + ${rightclick.row} + +
+
+
+
+ ${rightclick.to}${rightclick.left}${rightclick.add} + + ${rightclick.column} + +
+
+
+
+ ${rightclick.to}${rightclick.right}${rightclick.add} + + ${rightclick.column} + +
+
+
+
+
+
+ ${rightclick.deleteSelected}${rightclick.row} +
+
+
+
+ ${rightclick.deleteSelected}${rightclick.column} +
+
+
+
+
+
+ ${rightclick.hideSelected}${rightclick.row} +
+
+
+
+ ${rightclick.showHide}${rightclick.row} +
+
+
+
+
+
+ ${rightclick.flip} + + +
+
+
+
+ ${rightclick.flip} + + +
+
+
+
${rightclick.transpose}
+
+ +
+
+
${rightclick.matrixCalculation}
+
+ + + +
+
+
+
+
+ ${rightclick.delete0} + + +
+
+
+
+ ${rightclick.removeDuplicate} + + +
+
+
+
${rightclick.generateNewMatrix}
+
+
`; +} + +const pivottableconfigHTML = '
排序
排序依据
显示总计
', + pivottablesumHTML = '
求和
数值计数
计数
去重计数
平均值
最大值
最小值
中位数
乘积
标准差
整体标准差
方差
整体方差
', + sheetHTML = '
${name} ${colorset}
', + columnHeaderHTML = '
${column}
', + sheetselectlistHTML = '
${item}
', + sheetselectlistitemHTML = '
${icon}${name}
', + inputHTML = '
', + modelHTML = '', + + maskHTML = '
'; + +//底部 表格标签操作dom +function sheetconfigHTML(){ + const sheetconfig = locale().sheetconfig; + + return `
+
+
${sheetconfig.delete}
+
+
+
${sheetconfig.copy}
+
+
+
${sheetconfig.rename}
+
+
+
+ ${sheetconfig.changeColor} +
+
+ +
+
${sheetconfig.hide}
+
+
+
${sheetconfig.unhide}
+
+ +
+
${sheetconfig.moveLeft}
+
+
+
${sheetconfig.moveRight}
+
+
+
+
+
${sheetconfig.resetColor}
+
+
+
+ +
+
+
`; +} + +const luckysheetPivotTableHTML = '
数据透视表
编辑范围
选择需要添加到数据透视表的字段 清除
筛选
数值
'; + + + function filtermenuHTML() { + const _locale = locale(); + const locale_filter = _locale.filter; + + return `
${locale_filter.sortByAsc}
${locale_filter.sortByDesc}
${locale_filter.filterByColor}
${locale_filter.filterByCondition}
${locale_filter.filterByValues}
${locale_filter.filterValueByAllBtn} - ${locale_filter.filterValueByClearBtn} - ${locale_filter.filterValueByInverseBtn}
${locale_filter.filterConform}
${locale_filter.filterCancel}
${locale_filter.clearFilter}
` + } + + + function filtersubmenuHTML() { + const _locale = locale(); + const locale_filter = _locale.filter; + + return `
${locale_filter.conditionNone}
${locale_filter.conditionCellIsNull}
${locale_filter.conditionCellNotNull}
${locale_filter.conditionCellTextContain}
${locale_filter.conditionCellTextNotContain}
${locale_filter.conditionCellTextStart}
${locale_filter.conditionCellTextEnd}
${locale_filter.conditionCellTextEqual}
${locale_filter.conditionCellDateEqual}
${locale_filter.conditionCellDateBefore}
${locale_filter.conditionCellDateAfter}
${locale_filter.conditionCellGreater}
${locale_filter.conditionCellGreaterEqual}
${locale_filter.conditionCellLess}
${locale_filter.conditionCellLessEqual}
${locale_filter.conditionCellEqual}
${locale_filter.conditionCellNotEqual}
${locale_filter.conditionCellBetween}
${locale_filter.conditionCellNotBetween}
` + } + + +function luckysheetAlternateformatHtml(){ + const _locale = locale() + const alternatingColors =_locale.alternatingColors; + const toolbar = _locale.toolbar; + + + return '
'+ + '
'+ + ''+ toolbar.alternatingColors +''+ + ''+ + ''+ + ''+ + '
'+ + '
'+ + '
'+ alternatingColors.applyRange +'
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + '
'+alternatingColors.textTitle+'
'+ + '
'+ + '
'+alternatingColors.custom+'
'+ + '
'+ + '
'+ + '
'+ + '
'+ alternatingColors.header +'
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ alternatingColors.colorShow +'1
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ alternatingColors.colorShow +'2
'+ + '
'+ + '
'+ + '
'+ + ''+ + '
'+ + ''+ + '
'+ + '
'; + } + +const luckysheetchartpointconfigHTML = '
选择维度
排序
全选 - 清除 - 反选可以直接框选数据点
数据点设置
图形颜色
图形大小
图形形状
边框粗细
边框样式
边框颜色
文字标签
数值比例
小数位数
标签格式
数据名称
标签位置
'; +const luckysheetToolHTML = ''; + +// toolbar +function menuToolBar (){ + const toolbar = locale().toolbar; + const fontarray = locale().fontarray; + return `
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ ¥ +
+
+
+
+
+
+ % +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ 123 +
+
+
+
+
+
+
+
+
+
+
+
+ ${fontarray[0]} +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + ${toolbar.freezeTopRow} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+ ${toolbar.sum} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${toolbar.conditionalFormat} +
+
+
+
+
+
+
+
+
+
+ ${toolbar.postil} +
+
+
+
+
+
+
+ + ${toolbar.pivotTable} +
+
+ + + ${toolbar.chart} +
+
+ + + ${toolbar.screenshot} +
+
+ + + ${toolbar.splitColumn} +
`; +} +const luckysheetlodingHTML = '
渲染中...
'; + +// var menusetting = { +// menu_selectall: '
全选
', +// menu_copy: '
复制
', +// menu_undo: '
撤销
', +// menu_redo: '
恢复
', +// menu_paste: '
粘贴
', +// menu_download: '
下载
', +// menu_share: '
分享
', +// menu_chart: '
图表生成
', +// menu_pivot: '
数据透视表
', +// menu_freezenrow: '
冻结首行
', +// menu_freezencolumn: '
冻结首列
', +// }; + +const luckyColor = [ + "#c1232b", + "#27727b", + "#fcce10", + "#e87c25", + "#b5c334", + "#fe8463", + "#9bca63", + "#fad860", + "#f3a43b", + "#60c0dd", + "#d7504b", + "#c6e579", + "#f4e001", + "#f0805a", + "#26c0c0", + "#c12e34", + "#e6b600", + "#0098d9", + "#2b821d", + "#005eaa", + "#339ca8", + "#cda819", + "#32a487", + "#3fb1e3", + "#6be6c1", + "#626c91", + "#a0a7e6", + "#c4ebad", + "#96dee8" +]; + +const keycode = { + + BACKSPACE: 8, + TAB: 9, + ENTER: 13, + SHIFT: 16, + CTRL: 17, + PAUSE: 19, + CAPSLOCK: 20, + ESC: 27, + + SPACE: 33, + PAGEUP: 33, + PAGEDOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + INSERT: 45, + DELETE: 46, + + WIN: 91, + WIN_R: 92, + MENU: 93, + + F1: 112, + F2: 113, + F3: 114, + F4: 115, + F5: 116, + F6: 117, + F7: 118, + F8: 119, + F9: 120, + F10: 121, + F11: 122, + F12: 123, + NUMLOCK: 144, + SCROLLLOCK: 145 +}; + +const luckysheetdefaultstyle = { + font: 'normal '+ Math.ceil(10 * window.devicePixelRatio) +'pt "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif', + fillStyle: "#000000", + textBaseline: "middle", + strokeStyle: "#dfdfdf", + rowFillStyle: "#5e5e5e", + textAlign: 'center' +} + +const luckysheet_CFiconsImg = new Image(); +luckysheet_CFiconsImg.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZoAAAGACAYAAACUS6SeAAAACXBIWXMAAC4jAAAuIwF4pT92AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFW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g6xTUZQchkZRlCzo+oyiqKFRFEVR1NAoiqIoamgURVEURQ2NoiiKooZGURRFUdTQKIqiKGpoFEVRlHZlaOoKvDc9mJsbaeRDdarOIOtUFCWHoXm0wHsfS3vtRhr5UJ2qM8g6FUXJQhlwFVALfAFrx3a2mgfw9rT3bgX6IefXWwl+mEDOUvieDa2qU3UGWaeiKDkMTR0SPt0JLcC3zJ9XqE7VGWSdiqLkMDQdgrdm7+c4jbPO9jZ9t/BDpznfR1EUxZKh6QLci/WpiTgyNXE5Ow/AKgfuAk6zODWRRA6WuhjrC7WqU3UGWaeiKDkMzQzgTJv3XYwcRXqT+f9U4CKbaXwFOafa6n2qU3UGWaeiKFkIA2cUeO/paa/dSCMfqlN1Blmnoig5DE2XAu/t3mZ6w2ka+VCdqjPIOhVFyWFoFEVRFEUNjaIoiqKGRlEURVHU0CiKoihqaBRFURQ1NIqiKIqihkZRFEVRQ6MoiqJ0BEOzscB716W9diONfKhO1RlknYqi5DA0/yrw3mfTXj/nQhr5UJ2qM8g6FUXJYWguNw9zq8V7WoC/Ajenvfdj4G/sjJabj1bzEE+xoVV1qs4g61QUJQv/PwAlukJhy2ScjQAAAABJRU5ErkJggg=="; + + + +export { + gridHTML, + columeHeader_word, + columeHeader_word_index, + flow, + colsmenuHTML, + rightclickHTML, + pivottableconfigHTML, + pivottablesumHTML, + sheetHTML, + columnHeaderHTML, + sheetselectlistHTML, + sheetselectlistitemHTML, + inputHTML, + modelHTML, + maskHTML, + filtermenuHTML, + filtersubmenuHTML, + sheetconfigHTML, + luckysheetPivotTableHTML, + luckysheetAlternateformatHtml, + luckysheetchartpointconfigHTML, + luckysheetToolHTML, + menuToolBar, + luckysheetlodingHTML, + luckyColor, + keycode, + luckysheetdefaultstyle, + luckysheet_CFiconsImg, +} \ No newline at end of file diff --git a/src/controllers/controlHistory.js b/src/controllers/controlHistory.js new file mode 100644 index 000000000..7e96c57b0 --- /dev/null +++ b/src/controllers/controlHistory.js @@ -0,0 +1,550 @@ +import sheetmanage from './sheetmanage'; +import server from './server'; +import pivotTable from './pivotTable'; +import conditionformat from './conditionformat'; +import luckysheetPostil from './postil'; +import { createFilter, createFilterOptions, labelFilterOptionState } from './filter'; +import formula from '../global/formula'; +import json from '../global/json'; +import cleargridelement from '../global/cleargridelement'; +import { + jfrefreshgrid, + jfrefreshgridall, + jfrefreshrange, + jfrefreshgrid_rhcw, + jfrefreshgrid_adRC, + jfrefreshgrid_pastcut, + luckysheetrefreshgrid +} from '../global/refresh'; +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; + +const controlHistory = { + redo: function (e) { + if (Store.jfredo.length == 0) { + return; + } + + let ctr = Store.jfredo.pop(); + Store.jfundo.push(ctr); + Store.clearjfundo = false; + + if (sheetmanage.hasSheet(ctr.sheetIndex) && Store.currentSheetIndex != ctr.sheetIndex) { + sheetmanage.changeSheetExec(ctr.sheetIndex); + } + + if (ctr.type == "datachange") { + //如果有单元格为null,则对应公式应该删除 + for(let s = 0; s < ctr.range.length; s++){ + let st_r = ctr.range[s].row[0]; + let ed_r = ctr.range[s].row[1]; + let st_c = ctr.range[s].column[0]; + let ed_c = ctr.range[s].column[1]; + + for(let r = st_r;r < ed_r + 1; r++){ + for(let c = st_c; c < ed_c +1; c++){ + if(r > ctr.data.length - 1){ + break; + } + + if(ctr.data[r][c] == null){ + formula.delFunctionGroup(r,c); + } + } + } + } + formula.execFunctionGroup(null, null, null, null, ctr.data);//取之前的数据 + + jfrefreshgrid(ctr.data, ctr.range, ctr.config, ctr.cdformat, ctr.RowlChange); + } + else if (ctr.type == "pasteCut") { + let s = { + "sheetIndex": ctr.source["sheetIndex"], + "data": ctr.source["curData"], + "curData": ctr.source["data"], + "config": ctr.source["curConfig"], + "curConfig": ctr.source["config"], + "cdformat": ctr.source["curCdformat"], + "curCdformat": ctr.source["cdformat"], + "range": ctr.source["range"] + } + let t = { + "sheetIndex": ctr.target["sheetIndex"], + "data": ctr.target["curData"], + "curData": ctr.target["data"], + "config": ctr.target["curConfig"], + "curConfig": ctr.target["config"], + "cdformat": ctr.target["curCdformat"], + "curCdformat": ctr.target["cdformat"], + "range": ctr.target["range"] + } + jfrefreshgrid_pastcut(s, t, ctr.RowlChange); + } + else if (ctr.type == "rangechange") { + //如果有单元格为null,则对应公式应该删除 + for(let s = 0; s < ctr.range.length; s++){ + let st_r = ctr.range[s].row[0]; + let ed_r = ctr.range[s].row[1]; + let st_c = ctr.range[s].column[0]; + let ed_c = ctr.range[s].column[1]; + + for(let r = st_r;r < ed_r + 1; r++){ + for(let c = st_c; c < ed_c +1; c++){ + if(ctr.data[r][c] == null){ + formula.delFunctionGroup(r,c); + } + } + } + } + formula.execFunctionGroup(null, null, null, null, ctr.data);//取之前的数据 + + jfrefreshrange(ctr.data, ctr.range, ctr.cdformat); + } + else if (ctr.type == "resize") { + Store.config = ctr.config; + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config; + + if(ctr.ctrlType == "resizeR"){ + server.saveParam("cg", ctr.sheetIndex, ctr.config["rowlen"], { "k": "rowlen" }); + } + else if(ctr.ctrlType == "resizeC"){ + server.saveParam("cg", ctr.sheetIndex, ctr.config["columlen"], { "k": "columlen" }); + } + + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + else if (ctr.type == "cellRowChange") { + jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, ctr.ctrlType, ctr.ctrlValue, ctr.cdformat); + } + else if (ctr.type == "extend") { + jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, "dele", ctr.ctrlValue); + } + else if (ctr.type == "dele") { + let ctrlValue1 = $.extend(true, {}, ctr.ctrlValue); + ctrlValue1.restore = true; + jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, "extend", ctrlValue1); + } + else if (ctr.type == "addRC") { //增加行列撤销操作 + let ctrlValue = $.extend(true, {}, ctr.ctrlValue); + if(ctrlValue.direction == "rightbottom"){ + ctrlValue.index = ctrlValue.index + 1; + } + + jfrefreshgrid_adRC(ctr.data, ctr.config, "delRC", ctrlValue, ctr.calc, ctr.filterObj, ctr.cf, ctr.af, ctr.freezen); + } + else if (ctr.type == "delRC") { //删除行列撤销操作 + let ctrlValue = $.extend(true, {}, ctr.ctrlValue); + ctrlValue.restore = true; + ctrlValue.direction = "lefttop"; + + jfrefreshgrid_adRC(ctr.data, ctr.config, "addRC", ctrlValue, ctr.calc, ctr.filterObj, ctr.cf, ctr.af, ctr.freezen); + } + else if (ctr.type == "showHidRows") { // 隐藏、显示行 撤销操作 + //config + Store.config = ctr.config; + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.config; + + server.saveParam("cg", ctr.sheetIndex, ctr.config["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + else if (ctr.type == "datachangeAll") { + formula.execFunctionGroup(); + jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, null, ctr.range, "datachangeAll", ctr.ctrlValue); + } + else if (ctr.type == "datachangeAll_filter_clear") { + createFilterOptions(ctr.filter_save); + + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").each(function(i){ + let $top = $(this); + let item = ctr.optiongroups[i]; + labelFilterOptionState($top, item.optionstate, item.rowhidden, item.caljs, false, item.st_r, item.ed_r, item.cindex, item.st_c, item.ed_c); + }); + + server.saveParam("fsr", Store.currentSheetIndex, { "filter": ctr.optiongroups, "filter_select": ctr.filter_save }); + + //config + Store.config = ctr.config; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + if(Store.config["rowhidden"] == null){ + Store.config["rowhidden"] = {}; + } + + server.saveParam("cg", Store.currentSheetIndex, Store.config["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + } + else if (ctr.type == "datachangeAll_filter") { + let $top = $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(ctr["optionsindex"]); + let st_r = $top.data("str"), + ed_r = $top.data("edr"), + cindex = $top.data("cindex"), + st_c = $top.data("stc"), + ed_c = $top.data("edc"); + + labelFilterOptionState($top, json.hasKey(ctr.rowhidenPre), ctr.rowhidenPre, ctr.caljs, true, st_r, ed_r, cindex, st_c, ed_c); + + //config + Store.config = ctr.config; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + if(Store.config["rowhidden"] == null){ + Store.config["rowhidden"] = {}; + } + + server.saveParam("cg", Store.currentSheetIndex, Store.config["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + } + else if (ctr.type == "filtershow") { + $('#luckysheet-filter-selected-sheet' + ctr.sheetIndex + ', #luckysheet-filter-options-sheet' + ctr.sheetIndex).remove(); + + if(server.allowUpdate){ + server.saveParam("all", ctr.sheetIndex, null, { "k": "filter_select" }); + } + } + else if(ctr.type == "pivotTable_change"){ + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].pivotTable = ctr.pivotTable; + + pivotTable.getCellData(ctr.sheetIndex); + pivotTable.initialPivotManage(true); + + pivotTable.refreshPivotTable(); + } + else if (ctr.type == "addSheet") { + sheetmanage.deleteSheet(ctr.index); + sheetmanage.changeSheetExec(ctr.currentSheetIndex); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + } + else if (ctr.type == "copySheet") { + sheetmanage.deleteSheet(ctr.index); + sheetmanage.changeSheetExec(ctr.copyindex); + } + else if (ctr.type == "deleteSheet") { + let isDupName = false; + + for(let i = 0; i < Store.luckysheetfile.length; i++){ + if(Store.luckysheetfile[i].name == ctr.name){ + isDupName = true; + } + } + + if(!isDupName){ + sheetmanage.createSheetbydata(ctr, "isrenew"); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + } + } + else if (ctr.type == "sheetName") { + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].name = ctr.oldtxt; + $("#luckysheet-sheets-item" + ctr.sheetIndex).find(".luckysheet-sheets-item-name").html(ctr.oldtxt); + + server.saveParam("all", ctr.sheetIndex, ctr.oldtxt, { "k": "name" }); + } + else if (ctr.type == "sheetColor") { + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].color = ctr.oldcolor; + + let luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + ctr.sheetIndex); + luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); + + if(ctr.oldcolor != null){ + luckysheetcurrentSheetitem.append('
'); + } + + server.saveParam("all", ctr.sheetIndex, ctr.oldcolor, { "k": "color" }); + } + else if (ctr.type == "mergeChange") { + jfrefreshgrid(ctr.data, ctr.range, ctr.config); + } + else if (ctr.type == "updateCF"){ + let historyRules = ctr["data"]["historyRules"]; + + for(let i = 0; i < historyRules.length; i++){ + //条件规则 + let sheetIndex = historyRules[i]["sheetIndex"]; + Store.luckysheetfile[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = historyRules[i]["luckysheet_conditionformat_save"]; + + if(server.allowUpdate){ + server.saveParam("all", sheetIndex, historyRules[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" }); + } + } + + //刷新一次表格 + conditionformat.ref(); + } + else if (ctr.type == "updateAF"){ + let historyRules = ctr["data"]["historyRules"]; + + let index = getSheetIndex(ctr["sheetIndex"]); + + Store.luckysheetfile[index]["luckysheet_alternateformat_save"] = $.extend(true, [], historyRules); + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + else if (ctr.type == "borderChange"){ + if(ctr.config["borderInfo"] == null){ + server.saveParam("cg", ctr.sheetIndex, [], { "k": "borderInfo" }); + } + else{ + server.saveParam("cg", ctr.sheetIndex, ctr.config["borderInfo"], { "k": "borderInfo" }); + } + + Store.config = ctr.config; + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + else if (ctr.type == "postil"){ + luckysheetPostil.ref(ctr.data, ctr.rc); + + for(let i = 0; i < ctr.rc.length; i++){ + let r = ctr.rc[i].split("_")[0]; + let c = ctr.rc[i].split("_")[1]; + + if(ctr.data[r][c] != null && ctr.data[r][c].ps != null){ + luckysheetPostil.buildPs(r, c, ctr.data[r][c].ps); + } + else{ + luckysheetPostil.buildPs(r, c, null); + } + } + } + + cleargridelement(e); + Store.clearjfundo = true; + }, + undo: function () { + if (Store.jfundo.length == 0) { + return; + } + + let ctr = Store.jfundo.pop(); + Store.jfredo.push(ctr); + Store.clearjfundo = false; + + if (sheetmanage.hasSheet(ctr.sheetIndex) && Store.currentSheetIndex != ctr.sheetIndex) { + sheetmanage.changeSheetExec(ctr.sheetIndex); + } + + if (ctr.type == "datachange") { + formula.execFunctionGroup(); + + jfrefreshgrid(ctr.curdata, ctr.range, ctr.curConfig, ctr.curCdformat, ctr.RowlChange); + } + else if (ctr.type == "pasteCut") { + jfrefreshgrid_pastcut(ctr.source, ctr.target, ctr.RowlChange); + } + else if (ctr.type == "rangechange") { + formula.execFunctionGroup(); + jfrefreshrange(ctr.curdata, ctr.range, ctr.curCdformat); + } + else if (ctr.type == "resize") { + Store.config = ctr.curconfig; + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config; + + if(ctr.ctrlType == "resizeR"){ + server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowlen"], { "k": "rowlen" }); + } + else if(ctr.ctrlType == "resizeC"){ + server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["columlen"], { "k": "columlen" }); + } + + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + else if (ctr.type == "cellRowChange") { + jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue, ctr.curCdformat); + } + else if (ctr.type == "extend") { + jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue); + } + else if (ctr.type == "dele") { + let ctrlValue1 = $.extend(true, {}, ctr.ctrlValue); + ctrlValue1.restore = true; + jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue); + } + else if (ctr.type == "addRC") { //增加行列重做操作 + jfrefreshgrid_adRC(ctr.curData, ctr.curConfig, "addRC", ctr.ctrlValue, ctr.curCalc, ctr.curFilterObj, ctr.curCf, ctr.curAf, ctr.curFreezen); + } + else if (ctr.type == "delRC") { //删除行列重做操作 + jfrefreshgrid_adRC(ctr.curData, ctr.curConfig, "delRC", ctr.ctrlValue, ctr.curCalc, ctr.curFilterObj, ctr.curCf, ctr.curAf, ctr.curFreezen); + } + else if (ctr.type == "showHidRows") { // 隐藏、显示行 重做操作 + //config + Store.config = ctr.curconfig; + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.curconfig; + + server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + else if (ctr.type == "datachangeAll") { + formula.execFunctionGroup(); + jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, null, ctr.currange, "datachangeAll", ctr.ctrlValue); + } + else if (ctr.type == "datachangeAll_filter_clear") { + server.saveParam("fsc", Store.currentSheetIndex, null); + + //config + Store.config = ctr.curconfig; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, {}, { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + + + $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(); + $("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无"); + + $('#luckysheet-filter-selected-sheet' + Store.currentSheetIndex + ', #luckysheet-filter-options-sheet' + Store.currentSheetIndex).remove(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + } + else if (ctr.type == "datachangeAll_filter") { + let $top = $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(ctr["optionsindex"]); + let st_r = $top.data("str"), + ed_r = $top.data("edr"), + cindex = $top.data("cindex"), + st_c = $top.data("stc"), + ed_c = $top.data("edc"); + + labelFilterOptionState($top, json.hasKey(ctr.rowhidden), ctr.rowhidden, ctr.caljs, true, st_r, ed_r, cindex, st_c, ed_c); + + //config + Store.config = ctr.curconfig; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, Store.config["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + } + else if (ctr.type == "filtershow") { + Store.luckysheet_select_save = [ctr.filter_save]; + Store.filterchage = false; + createFilter(); + Store.filterchage = true; + server.saveParam("all", ctr.sheetIndex, ctr.filter_save, { "k": "filter_select" }); + } + else if (ctr.type == "pivotTable_change") { + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].pivotTable = ctr.pivotTablecur; + pivotTable.getCellData(ctr.sheetIndex); + pivotTable.initialPivotManage(true); + pivotTable.refreshPivotTable(); + } + else if (ctr.type == "addSheet") { + sheetmanage.createSheetbydata(ctr.sheetconfig); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + } + else if (ctr.type == "copySheet") { + sheetmanage.copySheet(ctr.copyindex); + } + else if (ctr.type == "deleteSheet") { + sheetmanage.deleteSheet(ctr.index); + + if (ctr.order == 0) { + sheetmanage.changeSheetExec(Store.luckysheetfile[0].index); + } + else { + sheetmanage.changeSheetExec(Store.luckysheetfile[ctr.order - 1].index); + } + + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + } + else if (ctr.type == "sheetName") { + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].name = ctr.txt; + $("#luckysheet-sheets-item" + ctr.sheetIndex).find(".luckysheet-sheets-item-name").html(ctr.txt); + + server.saveParam("all", ctr.sheetIndex, ctr.txt, { "k": "name" }); + } + else if (ctr.type == "sheetColor") { + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].color = ctr.color; + + let luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + ctr.sheetIndex); + luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); + + if(ctr.color != null){ + luckysheetcurrentSheetitem.append('
'); + } + + server.saveParam("all", ctr.sheetIndex, ctr.color, { "k": "color" }); + } + else if (ctr.type == "mergeChange") { + jfrefreshgrid(ctr.curData, ctr.range, ctr.curConfig); + } + else if (ctr.type == "updateCF"){ + let currentRules = ctr["data"]["currentRules"]; + + for(let i = 0; i < currentRules.length; i++){ + //条件规则 + let sheetIndex = currentRules[i]["sheetIndex"]; + Store.luckysheetfile[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = currentRules[i]["luckysheet_conditionformat_save"]; + + if(server.allowUpdate){ + server.saveParam("all", sheetIndex, currentRules[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" }); + } + } + + //刷新一次表格 + conditionformat.ref(); + } + else if (ctr.type == "updateAF"){ + let currentRules = ctr["data"]["currentRules"]; + + let index = getSheetIndex(ctr["sheetIndex"]); + + Store.luckysheetfile[index]["luckysheet_alternateformat_save"] = $.extend(true, [], currentRules); + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + else if (ctr.type == "borderChange"){ + server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["borderInfo"], { "k": "borderInfo" }); + + Store.config = ctr.curconfig; + Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + else if (ctr.type == "postil"){ + luckysheetPostil.ref(ctr.curdata, ctr.rc); + + for(let i = 0; i < ctr.rc.length; i++){ + let r = ctr.rc[i].split("_")[0]; + let c = ctr.rc[i].split("_")[1]; + + if(ctr.curdata[r][c] != null && ctr.curdata[r][c].ps != null){ + luckysheetPostil.buildPs(r, c, ctr.curdata[r][c].ps); + } + else{ + luckysheetPostil.buildPs(r, c, null); + } + } + } + + Store.clearjfundo = true; + } +}; + +export default controlHistory; \ No newline at end of file diff --git a/src/controllers/dropCell.js b/src/controllers/dropCell.js new file mode 100644 index 000000000..a7aebcecd --- /dev/null +++ b/src/controllers/dropCell.js @@ -0,0 +1,2683 @@ +import { rowLocationByIndex, colLocationByIndex } from '../global/location'; +import { countfunc } from '../global/count'; +import { getBorderInfoCompute } from '../global/border'; +import { isRealNum } from '../global/validate'; +import { genarate, update } from '../global/format'; +import { jfrefreshgrid } from '../global/refresh'; +import editor from '../global/editor'; +import formula from '../global/formula'; +import conditionformat from './conditionformat'; +import { selectHightlightShow } from './select'; +import { getSheetIndex } from '../methods/get'; +import { getObjType } from '../utils/util'; +import Store from '../store'; + +//选区下拉 +const luckysheetDropCell = { + iconHtml: '
'+ + '
'+ + '
', + typeListHtml: '
'+ + '
'+ + '
'+ + '复制单元格'+ + '
'+ + '
'+ + '
'+ + '
'+ + '填充序列'+ + '
'+ + '
'+ + '
'+ + '
'+ + '仅填充格式'+ + '
'+ + '
'+ + '
'+ + '
'+ + '不带格式填充'+ + '
'+ + '
'+ + '
'+ + '
'+ + '以天数填充'+ + '
'+ + '
'+ + '
'+ + '
'+ + '以工作日填充'+ + '
'+ + '
'+ + '
'+ + '
'+ + '以月填充'+ + '
'+ + '
'+ + '
'+ + '
'+ + '以年填充'+ + '
'+ + '
'+ + '
'+ + '
'+ + '以中文小写数字填充'+ + '
'+ + '
'+ + '
', + copyRange: {}, //复制范围 + applyRange: {}, //应用范围 + applyType: null, //0复制单元格,1填充序列,2仅填充格式,3不带格式填充,4以天数填充,5以工作日填充,6以月填充,7以年填充,8以中文小写数字序列填充 + direction: null, //down-往下拖拽,right-往右拖拽,up-往上拖拽,left-往左拖拽 + chnNumChar: {"零": 0, "一": 1, "二": 2, "三": 3, "四": 4, "五": 5, "六": 6, "七": 7, "八": 8, "九": 9}, + chnNameValue: { + "十": {value: 10, secUnit: false}, + "百": {value: 100, secUnit: false}, + "千": {value: 1000, secUnit: false}, + "万": {value: 10000, secUnit: true}, + "亿": {value: 100000000, secUnit: true} + }, + ChineseToNumber: function(chnStr){ + let _this = this; + + let rtn = 0; + let section = 0; + let number = 0; + let secUnit = false; + let str = chnStr.split(""); + + for(let i = 0; i < str.length; i++){ + let num = _this.chnNumChar[str[i]]; + + if(typeof num != "undefined"){ + number = num; + + if(i == str.length - 1){ + section += number; + } + } + else{ + let unit = _this.chnNameValue[str[i]].value; + secUnit = _this.chnNameValue[str[i]].secUnit; + + if(secUnit){ + section = (section + number) * unit; + rtn += section; + section = 0; + } + else{ + section += (number * unit); + } + + number = 0; + } + } + + return rtn + section; + }, + chnNumChar2: ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], + chnUnitSection: ["", "万", "亿", "万亿", "亿亿"], + chnUnitChar: ["", "十", "百", "千"], + SectionToChinese: function(section){ + let _this = this; + + let strIns = '', chnStr = ''; + let unitPos = 0; + let zero = true; + + while(section > 0){ + let v = section % 10; + + if(v == 0){ + if(!zero){ + zero = true; + chnStr = _this.chnNumChar2[v] + chnStr; + } + } + else{ + zero = false; + strIns = _this.chnNumChar2[v]; + strIns += _this.chnUnitChar[unitPos]; + chnStr = strIns + chnStr; + } + + unitPos++; + section = Math.floor(section / 10); + } + + return chnStr; + }, + NumberToChinese: function(num){ + let _this = this; + + let unitPos = 0; + let strIns = '', chnStr = ''; + let needZero = false; + + if(num == 0){ + return _this.chnNumChar2[0]; + } + while(num > 0){ + let section = num % 10000; + + if(needZero){ + chnStr = _this.chnNumChar2[0] + chnStr; + } + + strIns = _this.SectionToChinese(section); + strIns += (section != 0) ? _this.chnUnitSection[unitPos] : _this.chnUnitSection[0]; + chnStr = strIns + chnStr; + needZero = (section < 1000) && (section > 0); + num = Math.floor(num / 10000); + unitPos++; + } + + return chnStr; + }, + isChnNumber: function(txt){ + let _this = this; + + let isChnNumber = true; + + if(txt.length == 1){ + if(txt == "日" || (txt in _this.chnNumChar)){ + isChnNumber = true; + } + else{ + isChnNumber = false; + } + } + else{ + let str = txt.split(""); + for(let i = 0; i < str.length; i++){ + if(!((str[i] in _this.chnNumChar) || (str[i] in _this.chnNameValue))){ + isChnNumber = false; + break; + } + } + } + + return isChnNumber; + }, + isExtendNumber: function(txt){ + let reg = /[0-9]/; + let isExtendNumber; + if(reg.test(txt.substr(txt.length - 1, 1))){ + isExtendNumber = true; + } + else{ + isExtendNumber = false; + } + + if(isExtendNumber){ + let str = txt.split(""); + str.reverse(); + + let len = 0; + for(let i = 0; i < str.length; i++){ + if(!reg.test(str[i])){ + len = i; + break; + } + } + + return [isExtendNumber, txt.substr(0, txt.length - len), txt.substr(txt.length - len, len)]; + } + else{ + return [isExtendNumber]; + } + }, + isChnWeek1: function(txt){ + let _this = this; + + let isChnWeek1; + if(txt.length == 1){ + if(txt == "日" || _this.ChineseToNumber(txt) < 7){ + isChnWeek1 = true; + } + else{ + isChnWeek1 = false; + } + } + else{ + isChnWeek1 = false; + } + + return isChnWeek1; + }, + isChnWeek2: function(txt){ + let isChnWeek2; + if(txt.length == 2){ + if(txt == "周一" || txt == "周二" || txt == "周三" || txt == "周四" || txt == "周五" || txt == "周六" || txt == "周日"){ + isChnWeek2 = true; + } + else{ + isChnWeek2 = false; + } + } + else{ + isChnWeek2 = false; + } + + return isChnWeek2; + }, + isChnWeek3: function(txt){ + let isChnWeek3; + if(txt.length == 3){ + if(txt == "星期一" || txt == "星期二" || txt == "星期三" || txt == "星期四" || txt == "星期五" || txt == "星期六" || txt == "星期日"){ + isChnWeek3 = true; + } + else{ + isChnWeek3 = false; + } + } + else{ + isChnWeek3 = false; + } + + return isChnWeek3; + }, + createIcon: function(){ + let _this = this; + + let copy_r = _this.copyRange["row"][1], + copy_c = _this.copyRange["column"][1]; + let apply_r = _this.applyRange["row"][1], + apply_c = _this.applyRange["column"][1]; + + let row_index, col_index; + if(apply_r >= copy_r && apply_c >= copy_c){ + row_index = apply_r; + col_index = apply_c; + } + else{ + row_index = copy_r; + col_index = copy_c; + } + + let row = rowLocationByIndex(row_index)[1], + row_pre = rowLocationByIndex(row_index)[0]; + let col = colLocationByIndex(col_index)[1], + col_pre = colLocationByIndex(col_index)[0]; + + $("#luckysheet-dropCell-icon").remove(); + $("#luckysheet-cell-main").append(_this.iconHtml); + $("#luckysheet-dropCell-icon").css({"left": col, "top": row}); + + //点击icon + $("#luckysheet-dropCell-icon").mouseover(function(){ + $(this).css("background-color", "#ffe8e8"); + }).mouseleave(function(){ + $(this).css("background-color", "#f1f1f1"); + }).mousedown(function(event){ + $("#luckysheet-dropCell-typeList").remove(); + $("body").append(_this.typeListHtml); + + let typeItemHide = _this.typeItemHide(); + if(!typeItemHide[0] && !typeItemHide[1] && !typeItemHide[2] && !typeItemHide[3] && !typeItemHide[4] && !typeItemHide[5] && !typeItemHide[6]){ + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=1]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide(); + } + + if(!typeItemHide[2]){ + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(); + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide(); + } + + if(!typeItemHide[3]){ + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide(); + } + + let left = $(this).offset().left; + let top = $(this).offset().top + 25; + let winH = $(window).height(), winW = $(window).width(); + let menuW = $("#luckysheet-dropCell-typeList").width(), + menuH = $("#luckysheet-dropCell-typeList").height(); + + if (left + menuW > winW) { + left = left - menuW; + } + + if (top + menuH > winH) { + top = top - menuH - 38; + } + + if (top < 0) { + top = 0; + } + + $("#luckysheet-dropCell-typeList").css({"left": left, "top": top}).show(); + $("#luckysheet-dropCell-icon").mouseleave(function(){ $(this).css("backgroundColor", "#ffe8e8") }); + + let type = _this.applyType; + $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type="+ type +"]").find("span").append(''); + event.stopPropagation(); + }); + + //点击数据填充类型 + $(document).off("click.dCtypeList").on("click.dCtypeList", "#luckysheet-dropCell-typeList .luckysheet-cols-menuitem", function(){ + $("#luckysheet-dropCell-typeList .fa-check").remove(); + $(this).find("span").append(''); + + let type = $(this).attr("data-type"); + _this.applyType = type; + + _this.update(); + + $("#luckysheet-dropCell-typeList").hide(); + $("#luckysheet-dropCell-icon").css("backgroundColor", "#f1f1f1"); + $("#luckysheet-dropCell-icon").mouseleave(function(){ $(this).css("backgroundColor", "#f1f1f1") }); + + countfunc(); + }); + }, + typeItemHide: function(){ + let _this = this; + + let copyRange = _this.copyRange; + let str_r = copyRange["row"][0], end_r = copyRange["row"][1]; + let str_c = copyRange["column"][0], end_c = copyRange["column"][1]; + + let hasNumber = false, + hasExtendNumber = false, + hasDate = false, + hasChn = false, + hasChnWeek1 = false, + hasChnWeek2 = false, + hasChnWeek3 = false; + + for(let r = str_r; r <= end_r; r++){ + for(let c = str_c; c <= end_c; c++){ + if(!!Store.flowdata[r][c]){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && cell["v"] != null && cell["f"] == null){ + if(cell["ct"] != null && cell["ct"].t == "n"){ + hasNumber = true; + } + else if(cell["ct"] != null && cell["ct"].t == "d"){ + hasDate = true; + } + else if(_this.isExtendNumber(cell["m"])[0]){ + hasExtendNumber = true; + } + else if(_this.isChnNumber(cell["m"]) && cell["m"] != "日"){ + hasChn = true; + } + else if(cell["m"] == "日"){ + hasChnWeek1 = true; + } + else if(_this.isChnWeek2(cell["m"])){ + hasChnWeek2 = true; + } + else if(_this.isChnWeek3(cell["m"])){ + hasChnWeek3 = true; + } + } + } + } + } + + return [hasNumber, hasExtendNumber, hasDate, hasChn, hasChnWeek1, hasChnWeek2, hasChnWeek3]; + }, + update: function(){ + let _this = this; + + let d = editor.deepCopyFlowData(Store.flowdata); + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + let cfg = $.extend(true, {}, Store.config); + let borderInfoCompute = getBorderInfoCompute(); + + let direction = _this.direction; + let type = _this.applyType; + + //复制范围 + let copyRange = _this.copyRange; + let copy_str_r = copyRange["row"][0], copy_end_r = copyRange["row"][1]; + let copy_str_c = copyRange["column"][0], copy_end_c = copyRange["column"][1]; + let copyData = _this.getCopyData(d, copy_str_r, copy_end_r, copy_str_c, copy_end_c, direction); + + let csLen; + if(direction == "down" || direction == "up"){ + csLen = copy_end_r - copy_str_r + 1; + } + else if(direction == "right" || direction == "left"){ + csLen = copy_end_c - copy_str_c + 1; + } + + //应用范围 + let applyRange = _this.applyRange; + let apply_str_r = applyRange["row"][0], apply_end_r = applyRange["row"][1]; + let apply_str_c = applyRange["column"][0], apply_end_c = applyRange["column"][1]; + + if(direction == "down" || direction == "up"){ + let asLen = apply_end_r - apply_str_r + 1; + + for(let i = apply_str_c; i <= apply_end_c; i++){ + let copyD = copyData[i - apply_str_c]; + + let applyData = _this.getApplyData(copyD, csLen, asLen); + + if(direction == "down"){ + for(let j = apply_str_r; j <= apply_end_r; j++){ + let cell = applyData[j - apply_str_r]; + + if(cell.f != null){ + let f = "=" + formula.functionCopy(cell.f, "down", j - apply_str_r + 1); + let v = formula.execfunction(f, j, i, true); + + cell.f = v[2]; + cell.v = v[1]; + + if(cell.spl != null){ + cell.spl = v[3].data; + } + else{ + if(isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ + if(cell.v == Infinity || cell.v == -Infinity){ + cell.m = cell.v.toString(); + } + else{ + if(cell.v.toString().indexOf("e") > -1){ + let len = cell.v.toString().split(".")[1].split("e")[0].length; + if(len > 5){ + len = 5; + } + + cell.m = cell.v.toExponential(len).toString(); + } + else{ + let mask = genarate(Math.round(cell.v * 1000000000) / 1000000000); + cell.m = mask[0].toString(); + } + } + + cell.ct = { "fa": "General", "t": "n" }; + } + else{ + let mask = genarate(cell.v); + cell.m = mask[0].toString(); + cell.ct = mask[1]; + } + } + } + + d[j][i] = cell; + + //边框 + let bd_r = copy_str_r + (j - apply_str_r) % csLen; + let bd_c = i; + + if(borderInfoCompute[bd_r + "_" + bd_c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": j, + "col_index": i, + "l": borderInfoCompute[bd_r + "_" + bd_c].l, + "r": borderInfoCompute[bd_r + "_" + bd_c].r, + "t": borderInfoCompute[bd_r + "_" + bd_c].t, + "b": borderInfoCompute[bd_r + "_" + bd_c].b + } + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[j + "_" + i]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": j, + "col_index": i, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + cfg["borderInfo"].push(bd_obj); + } + } + } + if(direction == "up"){ + for(let j = apply_end_r; j >= apply_str_r; j--){ + let cell = applyData[apply_end_r - j]; + + if(cell.f != null){ + let f = "=" + formula.functionCopy(cell.f, "up", apply_end_r - j + 1); + let v = formula.execfunction(f, j, i, true); + + cell.f = v[2]; + cell.v = v[1]; + + if(cell.spl != null){ + cell.spl = v[3].data; + } + else{ + if(isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ + if(cell.v == Infinity || cell.v == -Infinity){ + cell.m = cell.v.toString(); + } + else{ + if(cell.v.toString().indexOf("e") > -1){ + let len = cell.v.toString().split(".")[1].split("e")[0].length; + if(len > 5){ + len = 5; + } + + cell.m = cell.v.toExponential(len).toString(); + } + else{ + let mask = genarate(Math.round(cell.v * 1000000000) / 1000000000); + cell.m = mask[0].toString(); + } + } + + cell.ct = { "fa": "General", "t": "n" }; + } + else{ + let mask = genarate(cell.v); + cell.m = mask[0].toString(); + cell.ct = mask[1]; + } + } + } + + d[j][i] = cell; + + //边框 + let bd_r = copy_end_r - (apply_end_r - j) % csLen; + let bd_c = i; + + if(borderInfoCompute[bd_r + "_" + bd_c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": j, + "col_index": i, + "l": borderInfoCompute[bd_r + "_" + bd_c].l, + "r": borderInfoCompute[bd_r + "_" + bd_c].r, + "t": borderInfoCompute[bd_r + "_" + bd_c].t, + "b": borderInfoCompute[bd_r + "_" + bd_c].b + } + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[j + "_" + i]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": j, + "col_index": i, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + cfg["borderInfo"].push(bd_obj); + } + } + } + } + } + else if(direction == "right" || direction == "left"){ + let asLen = apply_end_c - apply_str_c + 1; + + for(let i = apply_str_r; i <= apply_end_r; i++){ + let copyD = copyData[i - apply_str_r]; + + let applyData = _this.getApplyData(copyD, csLen, asLen); + + if(direction == "right"){ + for(let j = apply_str_c; j <= apply_end_c; j++){ + let cell = applyData[j - apply_str_c]; + + if(cell.f != null){ + let f = "=" + formula.functionCopy(cell.f, "right", j - apply_str_c + 1); + let v = formula.execfunction(f, i, j, true); + + cell.f = v[2]; + cell.v = v[1]; + + if(cell.spl != null){ + cell.spl = v[3].data; + } + else{ + if(isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ + if(cell.v == Infinity || cell.v == -Infinity){ + cell.m = cell.v.toString(); + } + else{ + if(cell.v.toString().indexOf("e") > -1){ + let len = cell.v.toString().split(".")[1].split("e")[0].length; + if(len > 5){ + len = 5; + } + + cell.m = cell.v.toExponential(len).toString(); + } + else{ + let mask = genarate(Math.round(cell.v * 1000000000) / 1000000000); + cell.m = mask[0].toString(); + } + } + + cell.ct = { "fa": "General", "t": "n" }; + } + else{ + let mask = genarate(cell.v); + cell.m = mask[0].toString(); + cell.ct = mask[1]; + } + } + } + + d[i][j] = cell; + + //边框 + let bd_r = i; + let bd_c = copy_str_c + (j - apply_str_c) % csLen; + + if(borderInfoCompute[bd_r + "_" + bd_c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": i, + "col_index": j, + "l": borderInfoCompute[bd_r + "_" + bd_c].l, + "r": borderInfoCompute[bd_r + "_" + bd_c].r, + "t": borderInfoCompute[bd_r + "_" + bd_c].t, + "b": borderInfoCompute[bd_r + "_" + bd_c].b + } + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[i + "_" + j]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": i, + "col_index": j, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + cfg["borderInfo"].push(bd_obj); + } + } + } + if(direction == "left"){ + for(let j = apply_end_c; j >= apply_str_c; j--){ + let cell = applyData[apply_end_c - j]; + + if(cell.f != null){ + let f = "=" + formula.functionCopy(cell.f, "left", apply_end_c - j + 1); + let v = formula.execfunction(f, i, j, true); + + cell.f = v[2]; + cell.v = v[1]; + + if(cell.spl != null){ + cell.spl = v[3].data; + } + else{ + if(isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ + if(cell.v == Infinity || cell.v == -Infinity){ + cell.m = cell.v.toString(); + } + else{ + if(cell.v.toString().indexOf("e") > -1){ + let len = cell.v.toString().split(".")[1].split("e")[0].length; + if(len > 5){ + len = 5; + } + + cell.m = cell.v.toExponential(len).toString(); + } + else{ + let mask = genarate(Math.round(cell.v * 1000000000) / 1000000000); + cell.m = mask[0].toString(); + } + } + + cell.ct = { "fa": "General", "t": "n" }; + } + else{ + let mask = genarate(cell.v); + cell.m = mask[0].toString(); + cell.ct = mask[1]; + } + } + } + + d[i][j] = cell; + + //边框 + let bd_r = i; + let bd_c = copy_end_c - (apply_end_c - j) % csLen; + + if(borderInfoCompute[bd_r + "_" + bd_c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": i, + "col_index": j, + "l": borderInfoCompute[bd_r + "_" + bd_c].l, + "r": borderInfoCompute[bd_r + "_" + bd_c].r, + "t": borderInfoCompute[bd_r + "_" + bd_c].t, + "b": borderInfoCompute[bd_r + "_" + bd_c].b + } + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[i + "_" + j]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": i, + "col_index": j, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + cfg["borderInfo"].push(bd_obj); + } + } + } + } + } + + //条件格式 + let cdformat = $.extend(true, [], file["luckysheet_conditionformat_save"]); + if(cdformat != null && cdformat.length > 0){ + for(let i = 0; i < cdformat.length; i++){ + let cdformat_cellrange = cdformat[i].cellrange; + + let emptyRange = []; + + for(let j = 0; j < cdformat_cellrange.length; j++){ + let range = conditionformat.CFSplitRange(cdformat_cellrange[j], {"row": copyRange["row"], "column": copyRange["column"]}, {"row": applyRange["row"], "column": applyRange["column"]}, "operatePart"); + if(range.length > 0){ + emptyRange = emptyRange.concat(range); + } + } + + if(emptyRange.length > 0){ + cdformat[i].cellrange.push(applyRange); + } + } + } + + //刷新一次表格 + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, cdformat); + + selectHightlightShow(); + }, + getCopyData: function(d, r1, r2, c1, c2, direction){ + let _this = this; + + let copyData = []; + + let a1, a2, b1, b2; + if(direction == "down" || direction == "up"){ + a1 = c1; + a2 = c2; + b1 = r1; + b2 = r2; + } + else if(direction == "right" || direction == "left"){ + a1 = r1; + a2 = r2; + b1 = c1; + b2 = c2; + } + + for(let a = a1; a <= a2; a++){ + let obj = {}; + + let arrData = []; + let arrIndex = []; + let text = ""; + let extendNumberStr = null; + let isSameStr = true; + + for(let b = b1; b <= b2; b++){ + //单元格 + let data; + if(direction == "down" || direction == "up"){ + data = d[b][a]; + } + else if(direction == "right" || direction == "left"){ + data = d[a][b]; + } + + //单元格值类型 + let str; + if(!!data && !!data["v"] && data["f"] == null){ + if(!!data["ct"] && data["ct"]["t"] == "n"){ + str = "number"; + extendNumberStr = null; + } + else if(!!data["ct"] && data["ct"]["t"] == "d"){ + str = "date"; + extendNumberStr = null; + } + else if(_this.isExtendNumber(data["m"])[0]){ + str = "extendNumber"; + + if(extendNumberStr == null){ + isSameStr = true; + extendNumberStr = _this.isExtendNumber(data["m"])[1]; + } + else{ + if(_this.isExtendNumber(data["m"])[1] != extendNumberStr){ + isSameStr = false; + extendNumberStr = _this.isExtendNumber(data["m"])[1]; + } + else{ + isSameStr = true; + } + } + } + else if(_this.isChnNumber(data["m"])){ + str = "chnNumber"; + extendNumberStr = null; + } + else if(_this.isChnWeek2(data["m"])){ + str = "chnWeek2"; + extendNumberStr = null; + } + else if(_this.isChnWeek3(data["m"])){ + str = "chnWeek3"; + extendNumberStr = null; + } + else{ + str = "other"; + extendNumberStr = null; + } + } + else{ + str = "other"; + extendNumberStr = null; + } + + if(str == "extendNumber"){ + if(b == b1){ + if(b1 == b2){ + text = str; + arrData.push(data); + arrIndex.push(b - b1 + 1); + + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + text = str; + arrData.push(data); + arrIndex.push(b - b1 + 1); + } + } + else if(b == b2){ + if(text == str && isSameStr){ + arrData.push(data); + arrIndex.push(b - b1 + 1); + + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + } + else{ + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + + text = str; + arrData = []; + arrData.push(data); + arrIndex = []; + arrIndex.push(b - b1 + 1); + + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + } + } + else{ + if(text == str && isSameStr){ + arrData.push(data); + arrIndex.push(b - b1 + 1); + } + else{ + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + + text = str; + arrData = []; + arrData.push(data); + arrIndex = []; + arrIndex.push(b - b1 + 1); + } + } + } + else{ + if(b == b1){ + if(b1 == b2){ + text = str; + arrData.push(data); + arrIndex.push(b - b1 + 1); + + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + text = str; + arrData.push(data); + arrIndex.push(b - b1 + 1); + } + } + else if(b == b2){ + if(text == str){ + arrData.push(data); + arrIndex.push(b - b1 + 1); + + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + } + else{ + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + + text = str; + arrData = []; + arrData.push(data); + arrIndex = []; + arrIndex.push(b - b1 + 1); + + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + } + } + else{ + if(text == str){ + arrData.push(data); + arrIndex.push(b - b1 + 1); + } + else{ + if(text in obj){ + obj[text].push({"data": arrData, "index": arrIndex}); + } + else{ + obj[text] = []; + obj[text].push({"data": arrData, "index": arrIndex}); + } + + text = str; + arrData = []; + arrData.push(data); + arrIndex = []; + arrIndex.push(b - b1 + 1); + } + } + } + } + + copyData.push(obj); + } + + return copyData; + }, + getApplyData: function(copyD, csLen, asLen){ + let _this = this; + + let applyData = []; + + let direction = _this.direction; + let type = _this.applyType; + + let num = Math.floor(asLen / csLen); + let rsd = asLen % csLen; + + //纯数字类型 + let copyD_number = copyD["number"]; + let applyD_number = []; + if(!!copyD_number){ + for(let i = 0; i < copyD_number.length; i++){ + let s = _this.getLenS(copyD_number[i]["index"], rsd); + let len = copyD_number[i]["index"].length * num + s; + + let arrData; + if(type == "1" || type == "3"){ + arrData = _this.getDataByType(copyD_number[i]["data"], len, direction, type, "number"); + } + else if(type == "2"){ + arrData = _this.getDataByType(copyD_number[i]["data"], len, direction, type); + } + else{ + arrData = _this.getDataByType(copyD_number[i]["data"], len, direction, "0"); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_number[i]["index"]); + applyD_number.push({"data": arrData, "index": arrIndex}); + } + } + + //扩展数字型(即一串字符最后面的是数字) + let copyD_extendNumber = copyD["extendNumber"]; + let applyD_extendNumber = []; + if(!!copyD_extendNumber){ + for(let i = 0; i < copyD_extendNumber.length; i++){ + let s = _this.getLenS(copyD_extendNumber[i]["index"], rsd); + let len = copyD_extendNumber[i]["index"].length * num + s; + + let arrData; + if(type == "1" || type == "3"){ + arrData = _this.getDataByType(copyD_extendNumber[i]["data"], len, direction, type, "extendNumber"); + } + else if(type == "2"){ + arrData = _this.getDataByType(copyD_extendNumber[i]["data"], len, direction, type); + } + else{ + arrData = _this.getDataByType(copyD_extendNumber[i]["data"], len, direction, "0"); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_extendNumber[i]["index"]); + applyD_extendNumber.push({"data": arrData, "index": arrIndex}); + } + } + + //日期类型 + let copyD_date = copyD["date"]; + let applyD_date = []; + if(!!copyD_date){ + for(let i = 0; i < copyD_date.length; i++){ + let s = _this.getLenS(copyD_date[i]["index"], rsd); + let len = copyD_date[i]["index"].length * num + s; + + let arrData; + if(type == "1" || type == "3"){ + arrData = _this.getDataByType(copyD_date[i]["data"], len, direction, type, "date"); + } + else if(type == "8"){ + arrData = _this.getDataByType(copyD_date[i]["data"], len, direction, "0"); + } + else{ + arrData = _this.getDataByType(copyD_date[i]["data"], len, direction, type); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_date[i]["index"]); + applyD_date.push({"data": arrData, "index": arrIndex}); + } + } + + //中文小写数字 或 一~日 + let copyD_chnNumber = copyD["chnNumber"]; + let applyD_chnNumber = []; + if(!!copyD_chnNumber){ + for(let i = 0; i < copyD_chnNumber.length; i++){ + let s = _this.getLenS(copyD_chnNumber[i]["index"], rsd); + let len = copyD_chnNumber[i]["index"].length * num + s; + + let arrData; + if(type == "1" || type == "3"){ + arrData = _this.getDataByType(copyD_chnNumber[i]["data"], len, direction, type, "chnNumber"); + } + else if(type == "2" || type == "8"){ + arrData = _this.getDataByType(copyD_chnNumber[i]["data"], len, direction, type); + } + else{ + arrData = _this.getDataByType(copyD_chnNumber[i]["data"], len, direction, "0"); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_chnNumber[i]["index"]); + applyD_chnNumber.push({"data": arrData, "index": arrIndex}); + } + } + + //周一~周日 + let copyD_chnWeek2 = copyD["chnWeek2"]; + let applyD_chnWeek2 = []; + if(!!copyD_chnWeek2){ + for(let i = 0; i < copyD_chnWeek2.length; i++){ + let s = _this.getLenS(copyD_chnWeek2[i]["index"], rsd); + let len = copyD_chnWeek2[i]["index"].length * num + s; + + let arrData; + if(type == "1" || type == "3"){ + arrData = _this.getDataByType(copyD_chnWeek2[i]["data"], len, direction, type, "chnWeek2"); + } + else if(type == "2"){ + arrData = _this.getDataByType(copyD_chnWeek2[i]["data"], len, direction, type); + } + else{ + arrData = _this.getDataByType(copyD_chnWeek2[i]["data"], len, direction, "0"); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_chnWeek2[i]["index"]); + applyD_chnWeek2.push({"data": arrData, "index": arrIndex}); + } + } + + //星期一~星期日 + let copyD_chnWeek3 = copyD["chnWeek3"]; + let applyD_chnWeek3 = []; + if(!!copyD_chnWeek3){ + for(let i = 0; i < copyD_chnWeek3.length; i++){ + let s = _this.getLenS(copyD_chnWeek3[i]["index"], rsd); + let len = copyD_chnWeek3[i]["index"].length * num + s; + + let arrData; + if(type == "1" || type == "3"){ + arrData = _this.getDataByType(copyD_chnWeek3[i]["data"], len, direction, type, "chnWeek3"); + } + else if(type == "2"){ + arrData = _this.getDataByType(copyD_chnWeek3[i]["data"], len, direction, type); + } + else{ + arrData = _this.getDataByType(copyD_chnWeek3[i]["data"], len, direction, "0"); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_chnWeek3[i]["index"]); + applyD_chnWeek3.push({"data": arrData, "index": arrIndex}); + } + } + + //其它 + let copyD_other = copyD["other"]; + let applyD_other = []; + if(!!copyD_other){ + for(let i = 0; i < copyD_other.length; i++){ + let s = _this.getLenS(copyD_other[i]["index"], rsd); + let len = copyD_other[i]["index"].length * num + s; + + let arrData; + if(type == "2" || type == "3"){ + arrData = _this.getDataByType(copyD_other[i]["data"], len, direction, type); + } + else{ + arrData = _this.getDataByType(copyD_other[i]["data"], len, direction, "0"); + } + + let arrIndex = _this.getDataIndex(csLen, asLen, copyD_other[i]["index"]); + applyD_other.push({"data": arrData, "index": arrIndex}); + } + } + + for(let x = 1; x <= asLen; x++){ + if(applyD_number.length > 0){ + for(let y = 0; y < applyD_number.length; y++){ + if(x in applyD_number[y]["index"]){ + applyData.push(applyD_number[y]["data"][applyD_number[y]["index"][x]]); + } + } + } + + if(applyD_extendNumber.length > 0){ + for(let y = 0; y < applyD_extendNumber.length; y++){ + if(x in applyD_extendNumber[y]["index"]){ + applyData.push(applyD_extendNumber[y]["data"][applyD_extendNumber[y]["index"][x]]); + } + } + } + + if(applyD_date.length > 0){ + for(let y = 0; y < applyD_date.length; y++){ + if(x in applyD_date[y]["index"]){ + applyData.push(applyD_date[y]["data"][applyD_date[y]["index"][x]]); + } + } + } + + if(applyD_chnNumber.length > 0){ + for(let y = 0; y < applyD_chnNumber.length; y++){ + if(x in applyD_chnNumber[y]["index"]){ + applyData.push(applyD_chnNumber[y]["data"][applyD_chnNumber[y]["index"][x]]); + } + } + } + + if(applyD_chnWeek2.length > 0){ + for(let y = 0; y < applyD_chnWeek2.length; y++){ + if(x in applyD_chnWeek2[y]["index"]){ + applyData.push(applyD_chnWeek2[y]["data"][applyD_chnWeek2[y]["index"][x]]); + } + } + } + + if(applyD_chnWeek3.length > 0){ + for(let y = 0; y < applyD_chnWeek3.length; y++){ + if(x in applyD_chnWeek3[y]["index"]){ + applyData.push(applyD_chnWeek3[y]["data"][applyD_chnWeek3[y]["index"][x]]); + } + } + } + + if(applyD_other.length > 0){ + for(let y = 0; y < applyD_other.length; y++){ + if(x in applyD_other[y]["index"]){ + applyData.push(applyD_other[y]["data"][applyD_other[y]["index"][x]]); + } + } + } + } + + return applyData; + }, + getLenS: function(indexArr, rsd){ + let s = 0; + + for(let j = 0; j < indexArr.length; j++){ + if(indexArr[j] <= rsd){ + s++; + } + else{ + break; + } + } + + return s; + }, + getDataIndex: function(csLen, asLen, indexArr){ + let obj = {}; + + let num = Math.floor(asLen / csLen); + let rsd = asLen % csLen; + + let sum = 0; + if(num > 0){ + for(let i = 1; i <= num; i++){ + for(let j = 0; j < indexArr.length; j++){ + obj[indexArr[j] + (i - 1) * csLen] = sum; + sum++; + } + } + for(let a = 0; a < indexArr.length; a++){ + if(indexArr[a] <= rsd){ + obj[indexArr[a] + csLen * num] = sum; + sum++; + } + else{ + break; + } + } + } + else{ + for(let a = 0; a < indexArr.length; a++){ + if(indexArr[a] <= rsd){ + obj[indexArr[a]] = sum; + sum++; + } + else{ + break; + } + } + } + + return obj; + }, + getDataByType: function(data, len, direction, type ,dataType){ + let _this = this; + + let applyData = []; + + if(type == "0"){ //复制单元格 + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + applyData = _this.FillCopy(data, len); + } + else if(type == "1"){ //填充序列 + if(dataType == "number"){ + //数据类型是 数字 + applyData = _this.FillSeries(data, len, direction); + } + else if(dataType == "extendNumber"){ + //扩展数字(一串字符最后面的是数字) + if(data.length == 1){ + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillExtendNumber(data, len, step); + } + else{ + let dataNumArr = []; + + for(let i = 0; i < data.length; i++){ + let txt = data[i]["m"]; + dataNumArr.push(Number(_this.isExtendNumber(txt)[2])); + } + + if(direction == "up" || direction == "left"){ + data.reverse(); + dataNumArr.reverse(); + } + + if(_this.isEqualDiff(dataNumArr)){ + //等差数列,以等差为step + let step = dataNumArr[1] - dataNumArr[0]; + applyData = _this.FillExtendNumber(data, len, step); + } + else{ + //不是等差数列,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + else if(dataType == "date"){ + //数据类型是 日期 + if(data.length == 1){ + //以一天为step + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillDays(data, len, step); + } + else{ + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let judgeDate = _this.judgeDate(data); + if(judgeDate[0] && judgeDate[3]){ + //日一样,月差为等差数列,以月差为step + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + applyData = _this.FillMonths(data, len, step); + } + else if(!judgeDate[0] && judgeDate[2]){ + //日不一样,日差为等差数列,以日差为step + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); + applyData = _this.FillDays(data, len, step); + } + else{ + //其它,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + else if(dataType == "chnNumber"){ + //数据类型是 中文小写数字 + if(data.length == 1){ + if(data[0]["m"] == "日" || _this.ChineseToNumber(data[0]["m"]) < 7){ + //数字小于7,以周一~周日序列填充 + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillChnWeek(data, len, step); + } + else{ + //数字大于7,以中文小写数字序列填充 + let step + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillChnNumber(data, len, step); + } + } + else{ + let hasweek = false; + for(let i = 0; i < data.length; i++){ + if(data[i]["m"] == "日"){ + hasweek = true; + break; + } + } + + let dataNumArr = []; + let weekIndex = 0; + for(let i = 0; i < data.length; i++){ + if(data[i]["m"] == "日"){ + if(i == 0){ + dataNumArr.push(0); + } + else{ + weekIndex++; + dataNumArr.push(weekIndex * 7); + } + } + else if(hasweek && _this.ChineseToNumber(data[i]["m"]) > 0 && _this.ChineseToNumber(data[i]["m"]) < 7){ + dataNumArr.push(_this.ChineseToNumber(data[i]["m"]) + weekIndex * 7); + } + else{ + dataNumArr.push(_this.ChineseToNumber(data[i]["m"])); + } + } + + if(direction == "up" || direction == "left"){ + data.reverse(); + dataNumArr.reverse(); + } + + if(_this.isEqualDiff(dataNumArr)){ + if(hasweek || (dataNumArr[dataNumArr.length - 1] < 6 && dataNumArr[0] > 0) || (dataNumArr[0] < 6 && dataNumArr[dataNumArr.length - 1] > 0)){ + //以周一~周日序列填充 + let step = dataNumArr[1] - dataNumArr[0]; + applyData = _this.FillChnWeek(data, len, step); + } + else{ + //以中文小写数字序列填充 + let step = dataNumArr[1] - dataNumArr[0]; + applyData = _this.FillChnNumber(data, len, step); + } + } + else{ + //不是等差数列,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + else if(dataType == "chnWeek2"){ + //周一~周日 + if(data.length == 1){ + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillChnWeek2(data, len, step); + } + else{ + let dataNumArr = []; + let weekIndex = 0; + + for(let i = 0; i < data.length; i++){ + let lastTxt = data[i]["m"].substr(data[i]["m"].length - 1, 1); + if(data[i]["m"] == "周日"){ + if(i == 0){ + dataNumArr.push(0); + } + else{ + weekIndex++; + dataNumArr.push(weekIndex * 7); + } + } + else{ + dataNumArr.push(_this.ChineseToNumber(lastTxt) + weekIndex * 7); + } + } + + if(direction == "up" || direction == "left"){ + data.reverse(); + dataNumArr.reverse(); + } + + if(_this.isEqualDiff(dataNumArr)){ + //等差数列,以等差为step + let step = dataNumArr[1] - dataNumArr[0]; + applyData = _this.FillChnWeek2(data, len, step); + } + else{ + //不是等差数列,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + else if(dataType == "chnWeek3"){ + //星期一~星期日 + if(data.length == 1){ + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillChnWeek3(data, len, step); + } + else{ + let dataNumArr = []; + let weekIndex = 0; + + for(let i = 0; i < data.length; i++){ + let lastTxt = data[i]["m"].substr(data[i]["m"].length - 1, 1); + if(data[i]["m"] == "星期日"){ + if(i == 0){ + dataNumArr.push(0); + } + else{ + weekIndex++; + dataNumArr.push(weekIndex * 7); + } + } + else{ + dataNumArr.push(_this.ChineseToNumber(lastTxt) + weekIndex * 7); + } + } + + if(direction == "up" || direction == "left"){ + data.reverse(); + dataNumArr.reverse(); + } + + if(_this.isEqualDiff(dataNumArr)){ + //等差数列,以等差为step + let step = dataNumArr[1] - dataNumArr[0]; + applyData = _this.FillChnWeek3(data, len, step); + } + else{ + //不是等差数列,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + else{ + //数据类型是 其它 + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + applyData = _this.FillCopy(data, len); + } + } + else if(type == "2"){ //仅填充格式 + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + applyData = _this.FillOnlyFormat(data, len); + } + else if(type == "3"){ //不带格式填充 + let dataArr = _this.getDataByType(data, len, direction, "1" ,dataType); + applyData = _this.FillWithoutFormat(dataArr); + } + else if(type == "4"){ //以天数填充 + if(data.length == 1){ + //以一天为step + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillDays(data, len, step); + } + else if(data.length == 2){ + //以日差为step + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); + applyData = _this.FillDays(data, len, step); + } + else{ + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let judgeDate = _this.judgeDate(data); + if(judgeDate[0] && judgeDate[3]){ + //日一样,且月差为等差数列,以月差为step + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + applyData = _this.FillMonths(data, len, step); + } + else if(!judgeDate[0] && judgeDate[2]){ + //日不一样,且日差为等差数列,以日差为step + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); + applyData = _this.FillDays(data, len, step); + } + else{ + //日差不是等差数列,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + else if(type == "5"){ //以工作日填充 + if(data.length == 1){ + //以一天为step(若那天为休息日,则跳过) + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + let newLen = Math.round(len * 1.5); + for(let i = 1; i <= newLen; i++){ + let d = $.extend(true, {}, data[0]); + + let day = moment(d["m"]).add(i, "days").day(); + if(day == 0 || day == 6){ + continue; + } + + let date = moment(d["m"]).add(step * i, "days").format("YYYY-MM-DD"); + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + + if(applyData.length == len){ + break; + } + } + } + else if(data.length == 2){ + if(moment(data[1]["m"]).date() == moment(data[0]["m"]).date() && moment(data[1]["m"]).diff(moment(data[0]["m"]), "months") != 0){ + //日一样,且月差大于一月,以月差为step(若那天为休息日,则向前取最近的工作日) + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let day = moment(data[data.length - 1]).add(step * i, "months").day(), + date; + if(day == 0){ + date = moment(data[data.length - 1]).add(step * i, "months").subtract(2, "days").format("YYYY-MM-DD"); + } + else if(day == 6){ + date = moment(data[data.length - 1]).add(step * i, "months").subtract(1, "days").format("YYYY-MM-DD"); + } + else{ + date = moment(data[data.length - 1]).add(step * i, "months").format("YYYY-MM-DD"); + } + + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + else{ + //日不一样 + if(Math.abs(moment(data[1]["m"]).diff(moment(data[0]["m"]))) > 7){ + //若日差大于7天,以一月为step(若那天是休息日,则向前取最近的工作日) + let step_month; + if(direction == "down" || direction == "right"){ + step_month = 1; + } + else if(direction == "up" || direction == "left"){ + step_month = -1; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); + } + + let day = moment(d["m"]).add(step, "days").day(), + date; + if(day == 0){ + date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); + } + else if(day == 6){ + date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); + } + else{ + date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + } + + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + else{ + //若日差小于等于7天,以7天为step(若那天是休息日,则向前取最近的工作日) + let step_day; + if(direction == "down" || direction == "right"){ + step_day = 7; + } + else if(direction == "up" || direction == "left"){ + step_day = -7; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_day * num, "days").diff(moment(d["m"]), "days"); + } + + let day = moment(d["m"]).add(step, "days").day(), + date; + if(day == 0){ + date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); + } + else if(day == 6){ + date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); + } + else{ + date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + } + + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + } + } + else{ + let judgeDate = _this.judgeDate(data); + if(judgeDate[0] && judgeDate[3]){ + //日一样,且月差为等差数列,以月差为step(若那天为休息日,则向前取最近的工作日) + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let day = moment(data[data.length - 1]["m"]).add(step * i, "months").day(), + date; + if(day == 0){ + date = moment(data[data.length - 1]["m"]).add(step * i, "months").subtract(2, "days").format("YYYY-MM-DD"); + } + else if(day == 6){ + date = moment(data[data.length - 1]["m"]).add(step * i, "months").subtract(1, "days").format("YYYY-MM-DD"); + } + else{ + date = moment(data[data.length - 1]["m"]).add(step * i, "months").format("YYYY-MM-DD"); + } + + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + else if(!judgeDate[0] && judgeDate[2]){ + //日不一样,且日差为等差数列 + if(Math.abs(moment(data[1]["m"]).diff(moment(data[0]["m"]))) > 7){ + //若日差大于7天,以一月为step(若那天是休息日,则向前取最近的工作日) + let step_month + if(direction == "down" || direction == "right"){ + step_month = 1; + } + else if(direction == "up" || direction == "left"){ + step_month = -1; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); + } + + let day = moment(d["m"]).add(step, "days").day(), + date; + if(day == 0){ + date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); + } + else if(day == 6){ + date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); + } + else{ + date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + } + + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + else{ + //若日差小于等于7天,以7天为step(若那天是休息日,则向前取最近的工作日) + let step_day; + if(direction == "down" || direction == "right"){ + step_day = 7; + } + else if(direction == "up" || direction == "left"){ + step_day = -7; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_day * num, "days").diff(moment(d["m"]), "days"); + } + + let day = moment(d["m"]).add(step, "days").day(), + date; + if(day == 0){ + date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); + } + else if(day == 6){ + date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); + } + else{ + date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + } + + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + } + else{ + //日差不是等差数列,复制数据 + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + applyData = _this.FillCopy(data, len); + } + } + } + else if(type == "6"){ //以月填充 + if(data.length == 1){ + //以一月为step + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillMonths(data, len, step); + } + else if(data.length == 2){ + if(moment(data[1]["m"]).date() == moment(data[0]["m"]).date() && moment(data[1]["m"]).diff(moment(data[0]["m"]), "months") != 0){ + //日一样,且月差大于一月,以月差为step + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + applyData = _this.FillMonths(data, len, step); + } + else{ + //以一月为step + let step_month; + if(direction == "down" || direction == "right"){ + step_month = 1; + } + else if(direction == "up" || direction == "left"){ + step_month = -1; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); + } + + let date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + } + else{ + let judgeDate = _this.judgeDate(data); + if(judgeDate[0] && judgeDate[3]){ + //日一样,且月差为等差数列,以月差为step + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + applyData = _this.FillMonths(data, len, step); + } + else if(!judgeDate[0] && judgeDate[2]){ + //日不一样,且日差为等差数列,以一月为step + let step_month; + if(direction == "down" || direction == "right"){ + step_month = 1; + } + else if(direction == "up" || direction == "left"){ + step_month = -1; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); + } + + let date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + else{ + //日差不是等差数列,复制数据 + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + applyData = _this.FillCopy(data, len); + } + } + } + else if(type == "7"){ //以年填充 + if(data.length == 1){ + //以一年为step + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillYears(data, len, step); + } + else if(data.length == 2){ + if(moment(data[1]["m"]).date() == moment(data[0]["m"]).date() && moment(data[1]["m"]).month() == moment(data[0]["m"]).month() && moment(data[1]["m"]).diff(moment(data[0]["m"]), "years") != 0){ + //日月一样,且年差大于一年,以年差为step + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "years"); + applyData = _this.FillYears(data, len, step); + } + else{ + //以一年为step + let step_year; + if(direction == "down" || direction == "right"){ + step_year = 1; + } + else if(direction == "up" || direction == "left"){ + step_year = -1; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_year * num, "years").diff(moment(d["m"]), "days"); + } + + let date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + } + else{ + let judgeDate = _this.judgeDate(data); + if(judgeDate[0] && judgeDate[1] && judgeDate[4]){ + //日月一样,且年差为等差数列,以年差为step + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + let step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "years"); + applyData = _this.FillYears(data, len, step); + } + else if((judgeDate[0] && judgeDate[3]) || judgeDate[2]){ + //日一样且月差为等差数列,或天差为等差数列,以一年为step + let step_year; + if(direction == "down" || direction == "right"){ + step_year = 1; + } + else if(direction == "up" || direction == "left"){ + step_year = -1; + data.reverse(); + } + + let step; //以数组第一个为对比 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = Math.ceil(i / data.length); + if(index == 0){ + step = moment(d["m"]).add(step_year * num, "years").diff(moment(d["m"]), "days"); + } + + let date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); + d["m"] = date; + d["v"] = genarate(date)[2]; + applyData.push(d); + } + } + else{ + //日差不是等差数列,复制数据 + if(direction == "up" || direction == "left"){ + data.reverse(); + } + + applyData = _this.FillCopy(data, len); + } + } + } + else if(type == "8"){ //以中文小写数字序列填充 + if(data.length == 1){ + let step; + if(direction == "down" || direction == "right"){ + step = 1; + } + else if(direction == "up" || direction == "left"){ + step = -1; + } + + applyData = _this.FillChnNumber(data, len, step); + } + else{ + let dataNumArr = []; + for(let i = 0; i < data.length; i++){ + dataNumArr.push(_this.ChineseToNumber(data[i]["m"])); + } + + if(direction == "up" || direction == "left"){ + data.reverse(); + dataNumArr.reverse(); + } + + if(_this.isEqualDiff(dataNumArr)){ + let step = dataNumArr[1] - dataNumArr[0]; + applyData = _this.FillChnNumber(data, len, step); + } + else{ + //不是等差数列,复制数据 + applyData = _this.FillCopy(data, len); + } + } + } + + return applyData; + }, + FillCopy: function(data, len){ + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + applyData.push(d); + } + + return applyData; + }, + FillSeries: function(data, len, direction){ + let _this = this; + + let applyData = []; + + let dataNumArr = []; + for(let j = 0; j < data.length; j++){ + dataNumArr.push(Number(data[j]["v"])); + } + + if(data.length > 2 && _this.isEqualRatio(dataNumArr)){ + //等比数列 + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num; + if(direction == "down" || direction == "right"){ + num = Number(data[data.length -1]["v"]) * Math.pow(Number(data[1]["v"]) / Number(data[0]["v"]), i); + } + else if(direction == "up" || direction == "left"){ + num = Number(data[0]["v"]) / Math.pow(Number(data[1]["v"]) / Number(data[0]["v"]), i); + } + + d["v"] = num; + d["m"] = update(d["ct"]["fa"], num); + applyData.push(d); + } + } + else{ + //线性数列 + let xArr = _this.getXArr(data.length); + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let y; + if(direction == "down" || direction == "right"){ + y = _this.forecast(data.length + i, dataNumArr, xArr); + } + else if(direction == "up" || direction == "left"){ + y = _this.forecast(1 - i, dataNumArr, xArr); + } + + d["v"] = y; + d["m"] = update(d["ct"]["fa"], y); + applyData.push(d); + } + } + + return applyData; + }, + FillExtendNumber: function(data, len, step){ + let _this = this; + + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let last = data[data.length - 1]["m"]; + let lastTxt = _this.isExtendNumber(last)[1]; + let lastNum = _this.isExtendNumber(last)[2]; + + let num = Math.abs(Number(lastNum) + step * i); + d["v"] = lastTxt + num.toString(); + d["m"] = lastTxt + num.toString(); + + applyData.push(d); + } + + return applyData; + }, + FillOnlyFormat: function(data, len){ + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + delete d["f"]; + delete d["m"]; + delete d["v"]; + + applyData.push(d); + } + + return applyData; + }, + FillWithoutFormat: function(dataArr){ + let applyData = []; + + for(let i = 0; i < dataArr.length; i++){ + let d = $.extend(true, {}, dataArr[i]); + + let obj; + if(d["f"] == null){ + obj = {"m": d["v"].toString(), "v": d["v"]}; + } + else{ + obj = {"f": d["f"], "m": d["v"].toString(), "v": d["v"]}; + } + + applyData.push(obj); + } + + return applyData; + }, + FillDays: function(data, len, step){ + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let date = update("yyyy-MM-dd", d["v"]); + date = moment(date).add(step * i, "days").format("YYYY-MM-DD"); + + d["v"] = genarate(date)[2]; + d["m"] = update(d["ct"]["fa"], d["v"]); + + applyData.push(d); + } + + return applyData; + }, + FillMonths: function(data, len, step){ + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let date = update("yyyy-MM-dd", d["v"]); + date = moment(date).add(step * i, "months").format("YYYY-MM-DD"); + + d["v"] = genarate(date)[2]; + d["m"] = update(d["ct"]["fa"], d["v"]); + + applyData.push(d); + } + + return applyData; + }, + FillYears: function(data, len, step){ + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let date = update("yyyy-MM-dd", d["v"]); + date = moment(date).add(step * i, "years").format("YYYY-MM-DD"); + + d["v"] = genarate(date)[2]; + d["m"] = update(d["ct"]["fa"], d["v"]); + + applyData.push(d); + } + + return applyData; + }, + FillChnWeek: function(data, len, step){ + let _this = this; + + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num; + if(data[data.length - 1]["m"] == "日"){ + num = 7 + step * i; + } + else{ + num = _this.ChineseToNumber(data[data.length - 1]["m"]) + step * i; + } + + if(num < 0){ + num = Math.ceil(Math.abs(num) / 7) * 7 + num; + } + + let rsd = num % 7; + if(rsd == 0){ + d["m"] = "日"; + d["v"] = "日"; + } + else if(rsd == 1){ + d["m"] = "一"; + d["v"] = "一"; + } + else if(rsd == 2){ + d["m"] = "二"; + d["v"] = "二"; + } + else if(rsd == 3){ + d["m"] = "三"; + d["v"] = "三"; + } + else if(rsd == 4){ + d["m"] = "四"; + d["v"] = "四"; + } + else if(rsd == 5){ + d["m"] = "五"; + d["v"] = "五"; + } + else if(rsd == 6){ + d["m"] = "六"; + d["v"] = "六"; + } + + applyData.push(d); + } + + return applyData; + }, + FillChnWeek2: function(data, len, step){ + let _this = this; + + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num; + if(data[data.length - 1]["m"] == "周日"){ + num = 7 + step * i; + } + else{ + let last = data[data.length - 1]["m"]; + let txt = last.substr(last.length - 1, 1); + num = _this.ChineseToNumber(txt) + step * i; + } + + if(num < 0){ + num = Math.ceil(Math.abs(num) / 7) * 7 + num; + } + + let rsd = num % 7; + if(rsd == 0){ + d["m"] = "周日"; + d["v"] = "周日"; + } + else if(rsd == 1){ + d["m"] = "周一"; + d["v"] = "周一"; + } + else if(rsd == 2){ + d["m"] = "周二"; + d["v"] = "周二"; + } + else if(rsd == 3){ + d["m"] = "周三"; + d["v"] = "周三"; + } + else if(rsd == 4){ + d["m"] = "周四"; + d["v"] = "周四"; + } + else if(rsd == 5){ + d["m"] = "周五"; + d["v"] = "周五"; + } + else if(rsd == 6){ + d["m"] = "周六"; + d["v"] = "周六"; + } + + applyData.push(d); + } + + return applyData; + }, + FillChnWeek3: function(data, len, step){ + let _this = this; + + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num; + if(data[data.length - 1]["m"] == "星期日"){ + num = 7 + step * i; + } + else{ + let last = data[data.length - 1]["m"]; + let txt = last.substr(last.length - 1, 1); + num = _this.ChineseToNumber(txt) + step * i; + } + + if(num < 0){ + num = Math.ceil(Math.abs(num) / 7) * 7 + num; + } + + let rsd = num % 7; + if(rsd == 0){ + d["m"] = "星期日"; + d["v"] = "星期日"; + } + else if(rsd == 1){ + d["m"] = "星期一"; + d["v"] = "星期一"; + } + else if(rsd == 2){ + d["m"] = "星期二"; + d["v"] = "星期二"; + } + else if(rsd == 3){ + d["m"] = "星期三"; + d["v"] = "星期三"; + } + else if(rsd == 4){ + d["m"] = "星期四"; + d["v"] = "星期四"; + } + else if(rsd == 5){ + d["m"] = "星期五"; + d["v"] = "星期五"; + } + else if(rsd == 6){ + d["m"] = "星期六"; + d["v"] = "星期六"; + } + + applyData.push(d); + } + + return applyData; + }, + FillChnNumber: function(data, len, step){ + let _this = this; + + let applyData = []; + + for(let i = 1; i <= len; i++){ + let index = (i - 1) % data.length; + let d = $.extend(true, {}, data[index]); + + let num = _this.ChineseToNumber(data[data.length - 1]["m"]) + step * i, + txt; + if(num <= 0){ + txt = "零"; + } + else{ + txt = _this.NumberToChinese(num); + } + + d["v"] = txt; + d["m"] = txt.toString(); + applyData.push(d); + } + + return applyData; + }, + isEqualDiff: function(arr){ + let diff = true; + let step = arr[1] - arr[0]; + + for(let i = 1; i < arr.length; i++){ + if(arr[i] - arr[i - 1] != step){ + diff = false; + break; + } + } + + return diff; + }, + isEqualRatio: function(arr){ + let ratio = true; + let step = arr[1] / arr[0]; + + for(let i = 1; i < arr.length; i++){ + if(arr[i] / arr[i - 1] != step){ + ratio = false; + break; + } + } + + return ratio; + }, + getXArr: function(len){ + let xArr = []; + + for(let i = 1; i <= len; i++){ + xArr.push(i); + } + + return xArr; + }, + forecast: function(x, yArr, xArr){ + function getAverage(arr){ + let sum = 0; + + for(let i = 0; i < arr.length; i++){ + sum += arr[i]; + } + + return sum / arr.length; + } + + let ax = getAverage(xArr); //x数组 平均值 + let ay = getAverage(yArr); //y数组 平均值 + + let sum_d = 0, sum_n = 0; + for(let j = 0; j < xArr.length; j++){ + //分母和 + sum_d += (xArr[j] - ax)*(yArr[j] - ay); + //分子和 + sum_n += (xArr[j] - ax)*(xArr[j] - ax); + } + + let b; + if(sum_n == 0){ + b = 1; + } + else{ + b = sum_d / sum_n; + } + + let a = ay - b * ax; + + return Math.round((a + b * x) * 100000) / 100000; + }, + judgeDate: function(data){ + let isSameDay = true, + isSameMonth = true, + isEqualDiffDays = true, + isEqualDiffMonths = true, + isEqualDiffYears = true; + let sameDay = moment(data[0]["m"]).date(), + sameMonth = moment(data[0]["m"]).month(); + let equalDiffDays = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); + let equalDiffMonths = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); + let equalDiffYears = moment(data[1]["m"]).diff(moment(data[0]["m"]), "years"); + + for(let i = 1; i < data.length; i++){ + //日是否一样 + if(moment(data[i]["m"]).date() != sameDay){ + isSameDay = false; + } + //月是否一样 + if(moment(data[i]["m"]).month() != sameMonth){ + isSameMonth = false; + } + //日差是否是 等差数列 + if(moment(data[i]["m"]).diff(moment(data[i - 1]["m"]), "days") != equalDiffDays){ + isEqualDiffDays = false; + } + //月差是否是 等差数列 + if(moment(data[i]["m"]).diff(moment(data[i - 1]["m"]), "months") != equalDiffMonths){ + isEqualDiffMonths = false; + } + //年差是否是 等差数列 + if(moment(data[i]["m"]).diff(moment(data[i - 1]["m"]), "years") != equalDiffYears){ + isEqualDiffYears = false; + } + } + + if(equalDiffDays == 0){ + isEqualDiffDays = false; + } + if(equalDiffMonths == 0){ + isEqualDiffMonths = false; + } + if(equalDiffYears == 0){ + isEqualDiffYears = false; + } + + return [isSameDay, isSameMonth, isEqualDiffDays, isEqualDiffMonths, isEqualDiffYears]; + } +} + +export default luckysheetDropCell; \ No newline at end of file diff --git a/src/controllers/expendPlugins.js b/src/controllers/expendPlugins.js new file mode 100644 index 000000000..2f3c96721 --- /dev/null +++ b/src/controllers/expendPlugins.js @@ -0,0 +1,19 @@ +import { chart } from '../expendPlugins/chart/plugin' + +const pluginsObj = { + 'chart':chart +} +/** + * Register plugins + */ +function initPlugins(plugins){ + if(plugins.length){ + plugins.forEach(plugin => { + pluginsObj[plugin](); + }); + } +} + +export { + initPlugins +} \ No newline at end of file diff --git a/src/controllers/filter.js b/src/controllers/filter.js new file mode 100644 index 000000000..e667cf5b7 --- /dev/null +++ b/src/controllers/filter.js @@ -0,0 +1,271 @@ +import { getSheetIndex } from '../methods/get'; +import editor from '../global/editor'; +import { isRealNull, isEditMode } from '../global/validate'; +import tooltip from '../global/tooltip'; +import { orderbydata } from '../global/sort'; +import { rowlenByRange } from '../global/getRowlen'; +import { jfrefreshgrid } from '../global/refresh'; +import { selectHightlightShow } from './select'; +import { luckysheetMoveEndCell } from './sheetMove'; +import server from './server'; +import Store from '../store'; + +//筛选配置状态 +function labelFilterOptionState($top, optionstate, rowhidden, caljs, notSave, str, edr, cindex, stc, edc) { + if (optionstate) { + $top.addClass("luckysheet-filter-options-active").data("rowhidden", JSON.stringify(rowhidden)).data("caljs", JSON.stringify(caljs)).html(''); + + if (caljs != null) { + $top.data("byconditionvalue", caljs["value"]).data("byconditiontype", caljs["type"]).data("byconditiontext", caljs["text"]); + + if (caljs["value1"] != null) { + $top.data("byconditionvalue1", caljs["value1"]); + } + + if (caljs["value2"] != null) { + $top.data("byconditionvalue2", caljs["value2"]); + } + } + } + else { + $top.removeClass("luckysheet-filter-options-active").data("rowhidden", "").data("caljs", "").html(''); + + $top.data("byconditionvalue", "null").data("byconditiontype", "0").data("byconditiontext", "无").data("byconditionvalue1", "").data("byconditionvalue2", ""); + } + + if(!!notSave){ + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + if(file.filter == null){ + file.filter = {}; + } + + if (optionstate) { + let param = { + "caljs": caljs, + "rowhidden": rowhidden, + "optionstate": optionstate, + "str": str, + "edr": edr, + "cindex": cindex, + "stc": stc, + "edc": edc + }; + file.filter[cindex - stc] = param; + } + else { + delete file.filter[cindex - stc]; + } + + server.saveParam("all", Store.currentSheetIndex, file.filter, { "k": "filter" }); + } +} + +//筛选排序 +function orderbydatafiler(str, stc, edr, edc, index, asc) { + let d = editor.deepCopyFlowData(Store.flowdata); + + str = str + 1; + + let hasMc = false; //排序选区是否有合并单元格 + let data = []; + + for(let r = str; r <= edr; r++){ + let data_row = []; + + for(let c = stc; c <= edc; c++){ + if(d[r][c] != null && d[r][c].mc != null){ + hasMc = true; + break; + } + + data_row.push(d[r][c]); + } + + data.push(data_row); + } + + if(hasMc){ + if(isEditMode()){ + alert("筛选选区有合并单元格,无法执行此操作!"); + } + else{ + tooltip.info("筛选选区有合并单元格,无法执行此操作!", ""); + } + + return; + } + + data = orderbydata(data, index - stc, asc); + + for(let r = str; r <= edr; r++){ + for(let c = stc; c <= edc; c++){ + d[r][c] = data[r - str][c - stc]; + } + } + + if(Store.config["rowlen"] != null){ + let cfg = $.extend(true, {}, Store.config); + cfg = rowlenByRange(d, str, edr, cfg); + + jfrefreshgrid(d, [{ "row": [str, edr], "column": [stc, edc] }], cfg, null, true); + } + else{ + jfrefreshgrid(d, [{ "row": [str, edr], "column": [stc, edc] }]); + } +} + +//创建筛选按钮 +function createFilter() { + if(Store.luckysheet_select_save.length > 1){ + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + $("#" + container).attr("tabindex", 0).focus(); + + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + if(Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].isPivotTable){ + return; + } + + $('#luckysheet-filter-selected-sheet' + Store.currentSheetIndex + ', #luckysheet-filter-options-sheet' + Store.currentSheetIndex).remove(); + + let last = Store.luckysheet_select_save[0]; + if (last["row"][0] == last["row"][1] && last["column"][0] == last["column"][1]) { + let st_c, ed_c, curR = last["row"][1]; + + for (let c = 0; c < Store.flowdata[curR].length; c++) { + let cell = Store.flowdata[curR][c]; + + if (cell != null && !isRealNull(cell.v)) { + if (st_c == null) { + st_c = c; + } + } + else if (st_c != null) { + ed_c = c - 1; + break; + } + } + + if (ed_c == null) { + ed_c = Store.flowdata[curR].length - 1; + } + + Store.luckysheet_select_save = [{ "row": [curR, curR], "column": [st_c, ed_c] }]; + selectHightlightShow(); + + Store.luckysheet_shiftpositon = $.extend(true, {}, last); + luckysheetMoveEndCell("down", "range"); + } + else if (last["row"][1] - last["row"][0] < 2) { + Store.luckysheet_shiftpositon = $.extend(true, {}, last); + luckysheetMoveEndCell("down", "range"); + } + + Store.luckysheet_filter_save = $.extend(true, {}, Store.luckysheet_select_save[0]); + + createFilterOptions(Store.luckysheet_filter_save); + + server.saveParam("all", Store.currentSheetIndex, Store.luckysheet_filter_save, { "k": "filter_select" }); + + if (Store.filterchage) { + Store.jfredo.push({ + "type": "filtershow", + "data": [], + "curdata": [], + "sheetIndex": Store.currentSheetIndex, + "filter_save": Store.luckysheet_filter_save + }); + } +} + +//创建筛选配置 +function createFilterOptions(luckysheet_filter_save, filterObj) { + $("#luckysheet-filter-selected-sheet" + Store.currentSheetIndex).remove(); + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex).remove(); + + if(luckysheet_filter_save == null || JSON.stringify(luckysheet_filter_save) == "{}"){ + return; + } + + let r1 = luckysheet_filter_save.row[0], + r2 = luckysheet_filter_save.row[1]; + let c1 = luckysheet_filter_save.column[0], + c2 = luckysheet_filter_save.column[1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let newSelectedHTML = '
'; + $("#luckysheet-cell-main").append(newSelectedHTML); + + let optionHTML = ""; + + for (let c = c1; c <= c2; c++) { + if(filterObj == null || filterObj[c - c1] == null){ + optionHTML += '
'; + } + else{ + let caljs_data; + + if(filterObj[c - c1].caljs != null){ + let caljs_value1_data; + if (filterObj[c - c1].caljs["value1"] != null) { + caljs_value1_data = 'data-byconditionvalue1="'+ filterObj[c - c1].caljs["value1"] +'" '; + } + else{ + caljs_value1_data = ''; + } + + let caljs_value2_data; + if (filterObj[c - c1].caljs["value2"] != null) { + caljs_value2_data = 'data-byconditionvalue2="'+ filterObj[c - c1].caljs["value2"] +'" '; + } + else{ + caljs_value2_data = ''; + } + + caljs_data = 'data-caljs="'+ JSON.stringify(filterObj[c - c1].caljs) +'" ' + + 'data-byconditionvalue="'+ filterObj[c - c1].caljs["value"] +'" ' + + 'data-byconditiontype="'+ filterObj[c - c1].caljs["type"] +'" ' + + 'data-byconditiontext="'+ filterObj[c - c1].caljs["text"] +'" ' + + caljs_value1_data + caljs_value2_data; + } + else{ + caljs_data = ''; + } + + optionHTML += '
'; + } + } + + $("#luckysheet-cell-main").append('
' + optionHTML + '
'); + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + + if ($("#luckysheet-cell-main").scrollTop() > luckysheet_filter_save["top_move"]) { + $("#luckysheet-scrollbar-y").scrollTop(luckysheet_filter_save["top_move"]); + } + + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + file.filter_select = luckysheet_filter_save; +} + +export { + labelFilterOptionState, + orderbydatafiler, + createFilter, + createFilterOptions +} \ No newline at end of file diff --git a/src/controllers/freezen.js b/src/controllers/freezen.js new file mode 100644 index 000000000..60f7fde74 --- /dev/null +++ b/src/controllers/freezen.js @@ -0,0 +1,1476 @@ +import { getSheetIndex } from '../methods/get'; +import { luckysheet_searcharray } from './sheetSearch'; +import { selectHightlightShow } from './select'; +import { createFilterOptions } from './filter'; +import server from './server'; +import menuButton from './menuButton'; +import luckysheetPostil from './postil'; +import luckysheetDropCell from './dropCell'; +import { rowLocationByIndex, colLocationByIndex } from '../global/location'; +import Store from '../store'; +import locale from '../locale/locale'; + +const luckysheetFreezen = { + freezenHorizontalHTML: '
 
', + freezenVerticalHTML: '
 
', + initialHorizontal: true, + initialVertical: true, + horizontalmovestate: false, + horizontalmoveposition: null, + verticalmovestate: false, + verticalmoveposition: null, + windowHeight: null, + windowWidth: null, + freezenhorizontaldata: null, + freezenverticaldata: null, + cutVolumn: function (arr, cutindex) { + if(cutindex <= 0){ + return arr; + } + + let pre = arr.slice(0, cutindex); + let premax = pre[pre.length - 1]; + let ret = arr.slice(cutindex); + + for (let i = 0; i < ret.length; i++) { + ret[i] -= premax; + } + + return ret; + }, + cancelFreezenVertical: function (sheetIndex) { + let _this = this; + + $("#luckysheet-freezen-btn-vertical").html(' 冻结首列'); + _this.freezenverticaldata = null; + let isvertical = $("#luckysheet-freezebar-vertical").is(":visible"); + $("#luckysheet-freezebar-vertical").hide(); + + if (sheetIndex == null) { + sheetIndex = Store.currentSheetIndex; + } + + let currentSheet = Store.luckysheetfile[getSheetIndex(sheetIndex)]; + if (currentSheet.freezen != null) { + currentSheet.freezen.vertical = null; + } + + if(currentSheet.freezen != null && isvertical){ + server.saveParam("all", sheetIndex, currentSheet.freezen, { "k": "freezen" }); + } + }, + createFreezenVertical: function (freezenverticaldata, left) { + let _this = this; + + if (_this.initialVertical) { + _this.initialVertical = false; + $("#luckysheet-grid-window-1").append(_this.freezenVerticalHTML); + + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").hover(function () { + $(this).parent().addClass("luckysheet-freezebar-hover"); + }, function () { + $(this).parent().removeClass("luckysheet-freezebar-hover"); + }); + + + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").mousedown(function () { + _this.verticalmovestate = true; + _this.verticalmoveposition = $(this).position().left; + _this.windowWidth = $("#luckysheet-grid-window-1").width(); + + $(this).parent().addClass("luckysheet-freezebar-active"); + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css("cursor", "-webkit-grabbing"); + }); + + let gridheight = $("#luckysheet-grid-window-1").height(); + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({ + "height": gridheight - 10, + "width": "4px", + "cursor": "-webkit-grab", + "top": "0px" + }).end().find(".luckysheet-freezebar-vertical-drop").css({ + "height": gridheight - 10, + "width": "4px", + "top": "0px", + "cursor": "-webkit-grab" + }); + } + + if (freezenverticaldata == null) { + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let dataset_col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollLeft); + if (dataset_col_st == -1) { + dataset_col_st = 0; + } + + left = Store.visibledatacolumn[dataset_col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + freezenverticaldata = [ + Store.visibledatacolumn[dataset_col_st], + dataset_col_st + 1, + scrollLeft, + _this.cutVolumn(Store.visibledatacolumn, dataset_col_st + 1), + left + ]; + _this.saveFreezen(null, null, freezenverticaldata, left); + } + + _this.freezenverticaldata = freezenverticaldata; + + + + $("#luckysheet-freezen-btn-horizontal").html(' '+locale().freezen.freezenCancel); + + $("#luckysheet-freezebar-vertical").show().find(".luckysheet-freezebar-vertical-handle").css({ "left": left }).end().find(".luckysheet-freezebar-vertical-drop").css({ "left": left }); + }, + saveFreezen: function (freezenhorizontaldata, top, freezenverticaldata, left) { + let currentSheet = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + if (currentSheet.freezen == null) { + currentSheet.freezen = {}; + } + + if (freezenhorizontaldata != null) { + if (currentSheet.freezen.horizontal == null) { + currentSheet.freezen.horizontal = {}; + } + + currentSheet.freezen.horizontal.freezenhorizontaldata = freezenhorizontaldata; + currentSheet.freezen.horizontal.top = top; + } + + if (freezenverticaldata != null) { + if (currentSheet.freezen.vertical == null) { + currentSheet.freezen.vertical = {}; + } + + currentSheet.freezen.vertical.freezenverticaldata = freezenverticaldata; + currentSheet.freezen.vertical.left = left; + } + + if(currentSheet.freezen != null){ + server.saveParam("all", Store.currentSheetIndex, currentSheet.freezen, { "k": "freezen" }); + } + }, + initialFreezen: function (sheetIndex) { + let _this = this; + + let currentSheet = Store.luckysheetfile[getSheetIndex(sheetIndex)]; + if (currentSheet.freezen != null && currentSheet.freezen.horizontal != null && currentSheet.freezen.horizontal.freezenhorizontaldata != null) { + _this.createFreezenHorizontal(currentSheet.freezen.horizontal.freezenhorizontaldata, currentSheet.freezen.horizontal.top); + } + else { + _this.cancelFreezenHorizontal(sheetIndex); + } + + if (currentSheet.freezen != null && currentSheet.freezen.vertical != null && currentSheet.freezen.vertical.freezenverticaldata != null) { + _this.createFreezenVertical(currentSheet.freezen.vertical.freezenverticaldata, currentSheet.freezen.vertical.left); + } + else { + _this.cancelFreezenVertical(sheetIndex); + } + + _this.createAssistCanvas(); + }, + changeFreezenIndex: function (originindex, type) { + let _this = this; + + if (type == "v" && _this.freezenverticaldata != null) { + let freezen_colindex = _this.freezenverticaldata[1]; + let offset = luckysheet_searcharray(Store.visibledatacolumn, $("#luckysheet-cell-main").scrollLeft()); + + if (originindex - offset < freezen_colindex) { + originindex = originindex - offset; + } + } + else if (type == "h" && _this.freezenhorizontaldata != null) { + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let offset = luckysheet_searcharray(Store.visibledatarow, $("#luckysheet-cell-main").scrollTop()); + + if (originindex - offset < freezen_rowindex) { + originindex = originindex - offset; + } + } + + return originindex; + }, + scrollFreezen: function () { + let _this = this; + + let row; + let row_focus = Store.luckysheet_select_save[0]["row_focus"]; + if(row_focus == Store.luckysheet_select_save[0]["row"][0]){ + row = Store.luckysheet_select_save[0]["row"][1]; + } + else if(row_focus == Store.luckysheet_select_save[0]["row"][1]){ + row = Store.luckysheet_select_save[0]["row"][0]; + } + + let column; + let column_focus = Store.luckysheet_select_save[0]["column_focus"]; + if(column_focus == Store.luckysheet_select_save[0]["column"][0]){ + column = Store.luckysheet_select_save[0]["column"][1]; + } + else if(column_focus == Store.luckysheet_select_save[0]["column"][1]){ + column = Store.luckysheet_select_save[0]["column"][0]; + } + + if (_this.freezenverticaldata != null) { + let freezen_colindex = _this.freezenverticaldata[1]; + let offset = luckysheet_searcharray(_this.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft()); + + freezen_colindex += offset; + + if (column <= freezen_colindex) { + setTimeout(function () { $("#luckysheet-scrollbar-x").scrollLeft(0); }, 10); + } + } + + if (_this.freezenhorizontaldata != null) { + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let offset = luckysheet_searcharray(_this.freezenhorizontaldata[3], $("#luckysheet-cell-main").scrollTop()); + + freezen_rowindex += offset; + + if (row <= freezen_rowindex) { + setTimeout(function () { $("#luckysheet-scrollbar-y").scrollTop(0); }, 10); + } + } + }, + cancelFreezenHorizontal: function (sheetIndex) { + let _this = this; + + + + $("#luckysheet-freezen-btn-horizontal").html(' '+locale().freezen.default); + _this.freezenhorizontaldata = null; + let ishorizontal = $("#luckysheet-freezebar-horizontal").is(":visible"); + $("#luckysheet-freezebar-horizontal").hide(); + + if (sheetIndex == null) { + sheetIndex = Store.currentSheetIndex; + } + + let currentSheet = Store.luckysheetfile[getSheetIndex(sheetIndex)]; + if (currentSheet.freezen != null) { + currentSheet.freezen.horizontal = null; + } + + if(currentSheet.freezen != null && ishorizontal){ + server.saveParam("all", sheetIndex, currentSheet.freezen, { "k": "freezen" }); + } + }, + createFreezenHorizontal: function (freezenhorizontaldata, top) { + let _this = this; + + if (_this.initialHorizontal) { + _this.initialHorizontal = false; + $("#luckysheet-grid-window-1").append(_this.freezenHorizontalHTML); + + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").hover(function () { + $(this).parent().addClass("luckysheet-freezebar-hover"); + }, function () { + $(this).parent().removeClass("luckysheet-freezebar-hover"); + }); + + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").mousedown(function () { + _this.horizontalmovestate = true; + _this.horizontalmoveposition = $(this).position().top; + _this.windowHeight = $("#luckysheet-grid-window-1").height(); + + $(this).parent().addClass("luckysheet-freezebar-active"); + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css("cursor", "-webkit-grabbing"); + }); + + let gridwidth = $("#luckysheet-grid-window-1").width(); + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({ + "width": gridwidth - 10, + "height": "4px", + "cursor": "-webkit-grab", + "left": "0px" + }).end().find(".luckysheet-freezebar-horizontal-drop").css({ + "width": gridwidth - 10, + "height": "4px", + "left": "0px", + "cursor": "-webkit-grab" + }); + } + + if (freezenhorizontaldata == null) { + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let dataset_row_st = luckysheet_searcharray(Store.visibledatarow, scrollTop); + if (dataset_row_st == -1) { + dataset_row_st = 0; + } + + top = Store.visibledatarow[dataset_row_st] - 2 - scrollTop + Store.columeHeaderHeight; + freezenhorizontaldata = [ + Store.visibledatarow[dataset_row_st], + dataset_row_st + 1, + scrollTop, + _this.cutVolumn(Store.visibledatarow, dataset_row_st + 1), + top + ]; + _this.saveFreezen(freezenhorizontaldata, top, null, null); + } + + _this.freezenhorizontaldata = freezenhorizontaldata; + + $("#luckysheet-freezen-btn-horizontal").html(' '+locale().freezen.freezenCancel); + $("#luckysheet-freezebar-horizontal").show().find(".luckysheet-freezebar-horizontal-handle").css({ "top": top }).end().find(".luckysheet-freezebar-horizontal-drop").css({ "top": top }); + }, + createAssistCanvas: function(){ + let _this = this; + _this.removeAssistCanvas(); + + if (_this.freezenverticaldata != null || _this.freezenhorizontaldata != null) { + let freezen_horizon_px, freezen_horizon_ed, freezen_horizon_scrollTop; + let freezen_vertical_px, freezen_vertical_ed, freezen_vertical_scrollTop; + let drawWidth = Store.luckysheetTableContentHW[0], + drawHeight = Store.luckysheetTableContentHW[1]; + + //双向freezen + if (_this.freezenverticaldata != null && _this.freezenhorizontaldata != null) { + freezen_horizon_px = _this.freezenhorizontaldata[0]; + freezen_horizon_ed = _this.freezenhorizontaldata[1]; + freezen_horizon_scrollTop = _this.freezenhorizontaldata[2]; + + freezen_vertical_px = _this.freezenverticaldata[0]; + freezen_vertical_ed = _this.freezenverticaldata[1]; + freezen_vertical_scrollTop = _this.freezenverticaldata[2]; + + //3 + _this.createCanvas("freezen_3", freezen_vertical_px - freezen_vertical_scrollTop, freezen_horizon_px - freezen_horizon_scrollTop + 1, Store.rowHeaderWidth - 1, Store.columeHeaderHeight - 1); + //4 + _this.createCanvas("freezen_4", drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, freezen_horizon_px - freezen_horizon_scrollTop + 1, freezen_vertical_px - freezen_vertical_scrollTop + Store.rowHeaderWidth - 1, Store.columeHeaderHeight - 1); + //7 + _this.createCanvas("freezen_7", freezen_vertical_px - freezen_vertical_scrollTop, drawHeight - freezen_horizon_px + freezen_horizon_scrollTop - Store.columeHeaderHeight, Store.rowHeaderWidth - 1, freezen_horizon_px - freezen_horizon_scrollTop + Store.columeHeaderHeight - 1); + } + //水平freezen + else if (_this.freezenhorizontaldata != null) { + freezen_horizon_px = _this.freezenhorizontaldata[0]; + freezen_horizon_ed = _this.freezenhorizontaldata[1]; + freezen_horizon_scrollTop = _this.freezenhorizontaldata[2]; + + _this.createCanvas("freezen_h", drawWidth, freezen_horizon_px - freezen_horizon_scrollTop + 1, Store.rowHeaderWidth - 1, Store.columeHeaderHeight - 1); + } + //垂直freezen + else if (_this.freezenverticaldata != null) { + freezen_vertical_px = _this.freezenverticaldata[0]; + freezen_vertical_ed = _this.freezenverticaldata[1]; + freezen_vertical_scrollTop = _this.freezenverticaldata[2]; + + _this.createCanvas("freezen_v", freezen_vertical_px - freezen_vertical_scrollTop, drawHeight, Store.rowHeaderWidth - 1, Store.columeHeaderHeight - 1); + } + + _this.scrollAdapt(); + } + }, + createCanvas: function(id, width, height, left, top){ + let c = $("").appendTo("#luckysheet-grid-window-1").attr({ + "id": id, + "width": Math.ceil(width * Store.devicePixelRatio), + "height": Math.ceil(height * Store.devicePixelRatio) + }).css({ + "user-select": "none", + "postion": "absolute", + "left": left, + "top": top, + "width": width, + "height": height, + "z-index": 10, + "pointer-events": "none" + }); + }, + removeAssistCanvas: function(){ + $("#luckysheet-grid-window-1 > canvas").not($("#luckysheetTableContent")).remove(); + $("#luckysheet-cell-selected").css("z-index", 15); + }, + scrollAdapt: function(){ + let _this = this; + + //有冻结时 选区框 滚动适应 + if(Store.luckysheet_select_save != null && Store.luckysheet_select_save.length > 0){ + _this.scrollAdaptOfselect(); + } + + //有冻结时 图表框 滚动适应 + if($("#luckysheet-cell-main .luckysheet-data-visualization-chart").length > 0){ + _this.scrollAdaptOfchart(); + } + + //有冻结时 批注框 滚动适应 + if($("#luckysheet-postil-showBoxs .luckysheet-postil-show").length > 0){ + _this.scrollAdaptOfpostil(); + } + + //有冻结时 下拉选区图标 滚动适应 + if($("#luckysheet-dropCell-icon").length > 0){ + _this.scrollAdaptOfdpicon(); + } + + //有冻结时 筛选下拉按钮 滚动适应 + if($("#luckysheet-filter-options-sheet"+ Store.currentSheetIndex +" .luckysheet-filter-options").length > 0){ + _this.scrollAdaptOffilteroptions(); + } + }, + scrollAdaptOfselect: function(){ + let _this = this; + + if($("#luckysheet-row-count-show").is(":visible")){ + $("#luckysheet-row-count-show").hide(); + } + + if($("#luckysheet-column-count-show").is(":visible")){ + $("#luckysheet-column-count-show").hide(); + } + + $("#luckysheet-rows-h-selected").empty(); + $("#luckysheet-cols-h-selected").empty(); + + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + + if (_this.freezenhorizontaldata != null && _this.freezenverticaldata != null) { + let freezenTop = _this.freezenhorizontaldata[0]; + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let offTop = scrollTop - _this.freezenhorizontaldata[2]; + + let freezenLeft = _this.freezenverticaldata[0]; + let freezen_colindex = _this.freezenverticaldata[1]; + let offLeft = scrollLeft - _this.freezenverticaldata[2]; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let obj = $.extend(true, {}, Store.luckysheet_select_save[s]); + + let r1 = obj.row[0], + r2 = obj.row[1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + + let top_move = row_pre; + let height_move = row - row_pre - 1; + + let rangeshow = true; + + if(r1 >= freezen_rowindex){//原选区在冻结区外 + if(top_move + height_move < freezenTop + offTop){ + rangeshow = false; + } + else if(top_move < freezenTop + offTop){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": freezenTop + offTop, + "height": height_move - (freezenTop + offTop - top_move) + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": top_move, + "height": height_move + }); + } + } + else if(r2 >= freezen_rowindex){//原选区有一部分在冻结区内 + if(top_move + height_move < freezenTop + offTop){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": top_move + offTop, + "height": freezenTop - top_move + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": top_move + offTop, + "height": height_move - offTop + }); + } + } + else{//原选区在冻结区内 + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("top", top_move + offTop); + } + + let c1 = obj.column[0], + c2 = obj.column[1]; + + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let left_move = col_pre; + let width_move = col - col_pre - 1; + + if(c1 >= freezen_colindex){//原选区在冻结区外 + if(left_move + width_move < freezenLeft + offLeft){ + rangeshow = false; + } + else if(left_move < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": freezenLeft + offLeft, + "width": width_move - (freezenLeft + offLeft - left_move) + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": left_move, + "width": width_move + }); + } + } + else if(c2 >= freezen_colindex){//原选区有一部分在冻结区内 + if(left_move + width_move < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": left_move + offLeft, + "width": freezenLeft - left_move + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": left_move + offLeft, + "width": width_move - offLeft + }); + } + } + else{//原选区在冻结区内 + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("left", left_move + offLeft); + } + + if(!rangeshow){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide(); + } + + if(s == Store.luckysheet_select_save.length - 1){ + let rf = obj.row_focus == null ? r1 : obj.row_focus; + let cf = obj.column_focus == null ? c1 : obj.column_focus; + + let row_f = Store.visibledatarow[rf], + row_pre_f = rf - 1 == -1 ? 0 : Store.visibledatarow[rf - 1]; + let col_f = Store.visibledatacolumn[cf], + col_pre_f = cf - 1 == -1 ? 0 : Store.visibledatacolumn[cf - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, rf, cf); + if(!!margeset){ + row_f = margeset.row[1]; + row_pre_f = margeset.row[0]; + + col_f = margeset.column[1]; + col_pre_f = margeset.column[0]; + } + + let top = row_pre_f; + let height = row_f - row_pre_f - 1; + + let left = col_pre_f; + let width = col_f - col_pre_f - 1; + + let focuscell = true; + + if(top >= freezenTop){ + if(top + height < freezenTop + offTop){ + focuscell = false; + } + else if(top < freezenTop + offTop){ + $("#luckysheet-cell-selected-focus").show().css({ + "top": freezenTop + offTop, + "height": height - (freezenTop + offTop - top) + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "top": top, + "height": height + }); + } + } + else if(top + height >= freezenTop){ + if(top + height < freezenTop + offTop){ + $("#luckysheet-cell-selected-focus").show().css({ + "top": top + offTop, + "height": freezenTop - top + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "top": top + offTop, + "height": height - offTop + }) + } + } + else{ + $("#luckysheet-cell-selected-focus").show().css("top", top + offTop); + } + + if(left >= freezenLeft){ + if(left + width < freezenLeft + offLeft){ + focuscell = false; + } + else if(left < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-focus").show().css({ + "left": freezenLeft + offLeft, + "width": width - (freezenLeft + offLeft - left) + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "left": left, + "width": width + }); + } + } + else if(left + width >= freezenLeft){ + if(left + width < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-focus").show().css({ + "left": left + offLeft, + "width": freezenLeft - left + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "left": left + offLeft, + "width": width - offLeft + }) + } + } + else{ + $("#luckysheet-cell-selected-focus").show().css("left", left + offLeft); + } + + if(!focuscell){ + $("#luckysheet-cell-selected-focus").hide(); + } + } + } + } + else if (_this.freezenhorizontaldata != null) { + let freezenTop = _this.freezenhorizontaldata[0]; + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let offTop = scrollTop - _this.freezenhorizontaldata[2]; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let obj = $.extend(true, {}, Store.luckysheet_select_save[s]); + + let r1 = obj.row[0], + r2 = obj.row[1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + + let top_move = row_pre; + let height_move = row - row_pre - 1; + + if(r1 >= freezen_rowindex){//原选区在冻结区外 + if(top_move + height_move < freezenTop + offTop){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide(); + } + else if(top_move < freezenTop + offTop){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": freezenTop + offTop, + "height": height_move - (freezenTop + offTop - top_move) + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": top_move, + "height": height_move + }); + } + } + else if(r2 >= freezen_rowindex){//原选区有一部分在冻结区内 + if(top_move + height_move < freezenTop + offTop){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": top_move + offTop, + "height": freezenTop - top_move + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "top": top_move + offTop, + "height": height_move - offTop + }); + } + } + else{//原选区在冻结区内 + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("top", top_move + offTop); + } + + if(s == Store.luckysheet_select_save.length - 1){ + let rf = obj.row_focus == null ? r1 : obj.row_focus; + let cf = obj.column_focus == null ? obj.column[0] : obj.column_focus; + + let row_f = Store.visibledatarow[rf], + row_pre_f = rf - 1 == -1 ? 0 : Store.visibledatarow[rf - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, rf, cf); + if(!!margeset){ + row_f = margeset.row[1]; + row_pre_f = margeset.row[0]; + } + + let top = row_pre_f; + let height = row_f - row_pre_f - 1; + + if(top >= freezenTop){ + if(top + height < freezenTop + offTop){ + $("#luckysheet-cell-selected-focus").hide(); + } + else if(top < freezenTop + offTop){ + $("#luckysheet-cell-selected-focus").show().css({ + "top": freezenTop + offTop, + "height": height - (freezenTop + offTop - top) + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "top": top, + "height": height + }); + } + } + else if(top + height >= freezenTop){ + if(top + height < freezenTop + offTop){ + $("#luckysheet-cell-selected-focus").show().css({ + "top": top + offTop, + "height": freezenTop - top + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "top": top + offTop, + "height": height - offTop + }) + } + } + else{ + $("#luckysheet-cell-selected-focus").show().css("top", top + offTop); + } + } + } + } + else if (_this.freezenverticaldata != null) { + let freezenLeft = _this.freezenverticaldata[0]; + let freezen_colindex = _this.freezenverticaldata[1]; + let offLeft = scrollLeft - _this.freezenverticaldata[2]; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let obj = $.extend(true, {}, Store.luckysheet_select_save[s]); + + let c1 = obj.column[0], + c2 = obj.column[1]; + + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let left_move = col_pre; + let width_move = col - col_pre - 1; + + if(c1 >= freezen_colindex){//原选区在冻结区外 + if(left_move + width_move < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide(); + } + else if(left_move < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": freezenLeft + offLeft, + "width": width_move - (freezenLeft + offLeft - left_move) + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": left_move, + "width": width_move + }); + } + } + else if(c2 >= freezen_colindex){//原选区有一部分在冻结区内 + if(left_move + width_move < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": left_move + offLeft, + "width": freezenLeft - left_move + }); + } + else{ + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ + "left": left_move + offLeft, + "width": width_move - offLeft + }); + } + } + else{//原选区在冻结区内 + $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("left", left_move + offLeft); + } + + if(s == Store.luckysheet_select_save.length - 1){ + let rf = obj.row_focus == null ? obj.row[0] : obj.row_focus; + let cf = obj.column_focus == null ? c1 : obj.column_focus; + + let col_f = Store.visibledatacolumn[cf], + col_pre_f = cf - 1 == -1 ? 0 : Store.visibledatacolumn[cf - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, rf, cf); + if(!!margeset){ + col_f = margeset.column[1]; + col_pre_f = margeset.column[0]; + } + + let left = col_pre_f; + let width = col_f - col_pre_f - 1; + + if(left >= freezenLeft){ + if(left + width < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-focus").hide(); + } + else if(left < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-focus").show().css({ + "left": freezenLeft + offLeft, + "width": width - (freezenLeft + offLeft - left) + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "left": left, + "width": width + }); + } + } + else if(left + width >= freezenLeft){ + if(left + width < freezenLeft + offLeft){ + $("#luckysheet-cell-selected-focus").show().css({ + "left": left + offLeft, + "width": freezenLeft - left + }) + } + else{ + $("#luckysheet-cell-selected-focus").show().css({ + "left": left + offLeft, + "width": width - offLeft + }) + } + } + else{ + $("#luckysheet-cell-selected-focus").show().css("left", left + offLeft); + } + } + } + } + else{ + selectHightlightShow(); + } + }, + scrollAdaptOfchart: function(){ + let _this = this; + + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + + if(_this.freezenhorizontaldata != null && _this.freezenverticaldata != null){ + let freezenTop = _this.freezenhorizontaldata[0] - _this.freezenhorizontaldata[2]; + let freezenLeft = _this.freezenverticaldata[0] - _this.freezenverticaldata[2]; + + $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ + let x = $(e).position(); + let width = $(e).width(); + let height = $(e).height(); + + let $canvas_width = $(e).find("canvas").width(); + let $canvas_height = $(e).find("canvas").height(); + + let height_diff = $canvas_height - height; + let width_diff = $canvas_width - width; + + if((x.top - height_diff) < freezenTop){ + let size = freezenTop - (x.top - height_diff); + + if(size > ($canvas_height + 40 + 2)){ + $(e).css("visibility", "hidden"); + } + else{ + $(e).css({ + "top": freezenTop + scrollTop, + "height": $canvas_height - size, + "visibility": "visible" + }); + $(e).find("canvas").css("top", - size); + } + } + else{ + $(e).css({ + "top": x.top - height_diff + scrollTop, + "height": $canvas_height, + "visibility": "visible" + }); + $(e).find("canvas").css("top", 0); + } + + if((x.left - width_diff) < freezenLeft){ + let size = freezenLeft - (x.left - width_diff); + + if(size > ($canvas_width + 20 + 2)){ + $(e).css("visibility", "hidden"); + } + else{ + $(e).css({ + "left": freezenLeft + scrollLeft, + "width": $canvas_width - size, + "visibility": "visible" + }); + $(e).find("canvas").css("left", - size); + } + } + else{ + $(e).css({ + "left": x.left - width_diff + scrollLeft, + "width": $canvas_width, + "visibility": "visible" + }); + $(e).find("canvas").css("left", 0); + } + }) + } + else if(_this.freezenhorizontaldata != null){ + let freezenTop = _this.freezenhorizontaldata[0] - _this.freezenhorizontaldata[2]; + + $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ + let x = $(e).position(); + let height = $(e).height(); + + let $canvas_height = $(e).find("canvas").height(); + + let height_diff = $canvas_height - height; + + if((x.top - height_diff) < freezenTop){ + let size = freezenTop - (x.top - height_diff); + + if(size > ($canvas_height + 40 + 2)){ + $(e).css("visibility", "hidden"); + } + else{ + $(e).css({ + "top": freezenTop + scrollTop, + "height": $canvas_height - size, + "visibility": "visible" + }); + $(e).find("canvas").css("top", - size); + } + } + else{ + $(e).css({ + "top": x.top - height_diff + scrollTop, + "height": $canvas_height, + "visibility": "visible" + }); + $(e).find("canvas").css("top", 0); + } + }) + } + else if(_this.freezenverticaldata != null){ + let freezenLeft = _this.freezenverticaldata[0] - _this.freezenverticaldata[2]; + + $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ + let x = $(e).position(); + let width = $(e).width(); + + let $canvas_width = $(e).find("canvas").width(); + + let width_diff = $canvas_width - width; + + if((x.left - width_diff) < freezenLeft){ + let size = freezenLeft - (x.left - width_diff); + + if(size > ($canvas_width + 20 + 2)){ + $(e).css("visibility", "hidden"); + } + else{ + $(e).css({ + "left": freezenLeft + scrollLeft, + "width": $canvas_width - size, + "visibility": "visible" + }); + $(e).find("canvas").css("left", - size); + } + } + else{ + $(e).css({ + "left": x.left - width_diff + scrollLeft, + "width": $canvas_width, + "visibility": "visible" + }); + $(e).find("canvas").css("left", 0); + } + }) + } + else{ + $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ + let x = $(e).position(); + let width = $(e).width(); + let height = $(e).height(); + + let $canvas_width = $(e).find("canvas").width(); + let $canvas_height = $(e).find("canvas").height(); + + let height_diff = $canvas_height - height; + let width_diff = $canvas_width - width; + + $(e).css({ + "top": x.top - height_diff + scrollTop, + "height": $canvas_height, + "left": x.left - width_diff + scrollLeft, + "width": $canvas_width, + "visibility": "visible" + }); + + $(e).find("canvas").css({ + "top": 0, + "left": 0 + }); + }) + } + }, + scrollAdaptOfpostil: function(){ + let _this = this; + + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + + if(_this.freezenhorizontaldata != null && _this.freezenverticaldata != null){ + let freezenTop = _this.freezenhorizontaldata[0]; + let freezenLeft = _this.freezenverticaldata[0]; + + let offTop = scrollTop - _this.freezenhorizontaldata[2]; + let offLeft = scrollLeft - _this.freezenverticaldata[2]; + + $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ + let id = $(e).attr("id"); + + let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; + let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let postil = Store.flowdata[r][c].ps; + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let postil_left = postil["left"] == null ? toX + 18 : postil["left"]; + let postil_top = postil["top"] == null ? toY - 18 : postil["top"]; + let postil_width = postil["width"] == null ? luckysheetPostil.defaultWidth : postil["width"]; + let postil_height = postil["height"] == null ? luckysheetPostil.defaultHeight : postil["height"]; + + if(postil_top < 0){ + postil_top = 2; + } + + let size = luckysheetPostil.getArrowCanvasSize(postil_left, postil_top, toX, toY); + let show = true; + let show2 = true; + + if(postil_top + postil_height < freezenTop){ + $(e).show().find(".luckysheet-postil-show-main").css("top", postil_top + offTop); + $(e).show().find(".arrowCanvas").css("top", size[1] + offTop); + } + else{ + if(postil_top < freezenTop + offTop){ + if(postil_top + postil_height <= freezenTop + offTop){ + show = false; + } + else{ + $(e).show().find(".luckysheet-postil-show-main").css({ "top": freezenTop + offTop, "height": postil_height - (freezenTop + offTop - postil_top) }); + $(e).show().find(".formulaInputFocus").css("margin-top", -(freezenTop + offTop - postil_top)); + $(e).show().find(".arrowCanvas").hide(); + + show2 = false; + } + } + else{ + $(e).show().find(".luckysheet-postil-show-main").css({ + "top": postil_top, + "height": postil_height + }); + $(e).show().find(".formulaInputFocus").css("margin-top", 0); + $(e).show().find(".arrowCanvas").css("top", size[1]); + // luckysheetPostil.buildPs(r, c, postil); + } + } + + if(postil_left + postil_width < freezenLeft){ + $(e).show().find(".luckysheet-postil-show-main").css("left", postil_left + offLeft); + $(e).show().find(".arrowCanvas").css("left", size[0] + offLeft); + } + else{ + if(postil_left < freezenLeft + offLeft){ + if(postil_left + postil_width <= freezenLeft + offLeft){ + show = false; + } + else{ + $(e).show().find(".luckysheet-postil-show-main").css({ "left": freezenLeft + offLeft, "width": postil_width - (freezenLeft + offLeft - postil_left) }); + $(e).show().find(".formulaInputFocus").css("margin-left", -(freezenLeft + offLeft - postil_left)); + $(e).show().find(".arrowCanvas").hide(); + + show2 = false; + } + } + else{ + $(e).show().find(".luckysheet-postil-show-main").css({ + "left": postil_left, + "width": postil_width + }); + $(e).show().find(".formulaInputFocus").css("margin-left", 0); + $(e).show().find(".arrowCanvas").css("left", size[0]); + // luckysheetPostil.buildPs(r, c, postil); + } + } + + if(!show){ + $(e).hide(); + } + + if(show && show2){ + $(e).show().find(".arrowCanvas").show(); + } + }) + } + else if(_this.freezenhorizontaldata != null){ + let freezenTop = _this.freezenhorizontaldata[0]; + let offTop = scrollTop - _this.freezenhorizontaldata[2]; + + $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ + let id = $(e).attr("id"); + + let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; + let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let postil = Store.flowdata[r][c].ps; + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let postil_left = postil["left"] == null ? toX + 18 : postil["left"]; + let postil_top = postil["top"] == null ? toY - 18 : postil["top"]; + let postil_width = postil["width"] == null ? luckysheetPostil.defaultWidth : postil["width"]; + let postil_height = postil["height"] == null ? luckysheetPostil.defaultHeight : postil["height"]; + + if(postil_top < 0){ + postil_top = 2; + } + + let size = luckysheetPostil.getArrowCanvasSize(postil_left, postil_top, toX, toY); + + if(postil_top + postil_height < freezenTop){ + $(e).show().find(".luckysheet-postil-show-main").css("top", postil_top + offTop); + $(e).show().find(".arrowCanvas").css("top", size[1] + offTop); + } + else{ + if(postil_top < freezenTop + offTop){ + if(postil_top + postil_height <= freezenTop + offTop){ + $(e).hide(); + } + else{ + $(e).show().find(".luckysheet-postil-show-main").css({ "top": freezenTop + offTop, "height": postil_height - (freezenTop + offTop - postil_top) }); + $(e).show().find(".formulaInputFocus").css("margin-top", -(freezenTop + offTop - postil_top)); + $(e).show().find(".arrowCanvas").hide(); + } + } + else{ + luckysheetPostil.buildPs(r, c, postil); + } + } + }) + } + else if(_this.freezenverticaldata != null){ + let freezenLeft = _this.freezenverticaldata[0]; + let offLeft = scrollLeft - _this.freezenverticaldata[2]; + + $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ + let id = $(e).attr("id"); + + let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; + let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let postil = Store.flowdata[r][c].ps; + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let postil_left = postil["left"] == null ? toX + 18 : postil["left"]; + let postil_top = postil["top"] == null ? toY - 18 : postil["top"]; + let postil_width = postil["width"] == null ? luckysheetPostil.defaultWidth : postil["width"]; + let postil_height = postil["height"] == null ? luckysheetPostil.defaultHeight : postil["height"]; + + if(postil_top < 0){ + postil_top = 2; + } + + let size = luckysheetPostil.getArrowCanvasSize(postil_left, postil_top, toX, toY); + + if(postil_left + postil_width < freezenLeft){ + $(e).show().find(".luckysheet-postil-show-main").css("left", postil_left + offLeft); + $(e).show().find(".arrowCanvas").css("left", size[0] + offLeft); + } + else{ + if(postil_left < freezenLeft + offLeft){ + if(postil_left + postil_width <= freezenLeft + offLeft){ + $(e).hide(); + } + else{ + $(e).show().find(".luckysheet-postil-show-main").css({ "left": freezenLeft + offLeft, "width": postil_width - (freezenLeft + offLeft - postil_left) }); + $(e).show().find(".formulaInputFocus").css("margin-left", -(freezenLeft + offLeft - postil_left)); + $(e).show().find(".arrowCanvas").hide(); + } + } + else{ + luckysheetPostil.buildPs(r, c, postil); + } + } + }) + } + else{ + $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ + let id = $(e).attr("id"); + + let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; + let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let postil = Store.flowdata[r][c].ps; + + luckysheetPostil.buildPs(r, c, postil); + }) + } + }, + scrollAdaptOfdpicon: function(){ + let _this = this; + + let copy_r = luckysheetDropCell.copyRange["row"][1], + copy_c = luckysheetDropCell.copyRange["column"][1]; + + let apply_r = luckysheetDropCell.applyRange["row"][1], + apply_c = luckysheetDropCell.applyRange["column"][1]; + + let row_index, col_index; + if(apply_r >= copy_r && apply_c >= copy_c){ + row_index = apply_r; + col_index = apply_c; + } + else{ + row_index = copy_r; + col_index = copy_c; + } + + if(_this.freezenhorizontaldata != null && _this.freezenverticaldata != null){ + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let offsetRow = luckysheet_searcharray(_this.freezenhorizontaldata[3], $("#luckysheet-cell-main").scrollTop() - _this.freezenhorizontaldata[2]); + let freezen_colindex = _this.freezenverticaldata[1]; + let offsetColumn = luckysheet_searcharray(_this.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - _this.freezenverticaldata[2]); + + if(row_index >= freezen_rowindex && col_index >= freezen_colindex){ + if(row_index < (freezen_rowindex + offsetRow - 1) || col_index < (freezen_colindex + offsetColumn - 1)){ + $("#luckysheet-dropCell-icon").hide(); + } + else{ + $("#luckysheet-dropCell-icon").show(); + } + } + else if(row_index >= freezen_rowindex){ + if(row_index < (freezen_rowindex + offsetRow - 1)){ + $("#luckysheet-dropCell-icon").hide(); + } + else{ + let col = colLocationByIndex(col_index + offsetColumn)[1]; + + $("#luckysheet-dropCell-icon").show().css("left", col); + } + } + else if(col_index >= freezen_colindex){ + if(col_index < (freezen_colindex + offsetColumn - 1)){ + $("#luckysheet-dropCell-icon").hide(); + } + else{ + let row = rowLocationByIndex(row_index + offsetRow)[1]; + + $("#luckysheet-dropCell-icon").show().css("top", row); + } + } + else{ + let row = rowLocationByIndex(row_index + offsetRow)[1], + col = colLocationByIndex(col_index + offsetColumn)[1]; + + $("#luckysheet-dropCell-icon").show().css({ "left": col, "top": row }); + } + } + else if(_this.freezenhorizontaldata != null){ + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let offsetRow = luckysheet_searcharray(_this.freezenhorizontaldata[3], $("#luckysheet-cell-main").scrollTop() - _this.freezenhorizontaldata[2]); + + if(row_index >= freezen_rowindex){ + if(row_index < (freezen_rowindex + offsetRow - 1)){ + $("#luckysheet-dropCell-icon").hide(); + } + else{ + $("#luckysheet-dropCell-icon").show(); + } + } + else{ + let row = rowLocationByIndex(row_index + offsetRow)[1]; + + $("#luckysheet-dropCell-icon").show().css("top", row); + } + } + else if(_this.freezenverticaldata != null){ + let freezen_colindex = _this.freezenverticaldata[1]; + let offsetColumn = luckysheet_searcharray(_this.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - _this.freezenverticaldata[2]); + + if(col_index >= freezen_colindex){ + if(col_index < (freezen_colindex + offsetColumn - 1)){ + $("#luckysheet-dropCell-icon").hide(); + } + else{ + $("#luckysheet-dropCell-icon").show(); + } + } + else{ + let col = colLocationByIndex(col_index + offsetColumn)[1]; + + $("#luckysheet-dropCell-icon").show().css("left", col); + } + } + else{ + let row = rowLocationByIndex(row_index)[1], + col = colLocationByIndex(col_index)[1]; + + $("#luckysheet-dropCell-icon").show().css({ "left": col, "top": row }); + } + }, + scrollAdaptOffilteroptions: function(){ + let _this = this; + + if(_this.freezenhorizontaldata != null && _this.freezenverticaldata != null){ + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let freezen_top = _this.freezenhorizontaldata[0] + $("#luckysheet-cell-main").scrollTop(); + + let freezen_colindex = _this.freezenverticaldata[1]; + let offsetColumn = luckysheet_searcharray(_this.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - _this.freezenverticaldata[2]); + + $("#luckysheet-filter-options-sheet"+ Store.currentSheetIndex +" .luckysheet-filter-options").each(function(i, e){ + let row_index = $(e).data("str"); + let top = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + + let col_index = $(e).data("cindex"); + + if(row_index >= freezen_rowindex && col_index >= freezen_colindex){ + if(top < freezen_top || col_index < (freezen_colindex + offsetColumn)){ + $(e).hide(); + } + else{ + $(e).show(); + } + } + else if(row_index >= freezen_rowindex){ + if(top < freezen_top){ + $(e).hide(); + } + else{ + let left = Store.visibledatacolumn[col_index + offsetColumn] - 20; + + $(e).show().css("left", left); + } + } + else if(col_index >= freezen_colindex){ + if(col_index < (freezen_colindex + offsetColumn)){ + $(e).hide(); + } + else{ + $(e).show().css("top", top + $("#luckysheet-cell-main").scrollTop()); + } + } + else{ + let left = Store.visibledatacolumn[col_index + offsetColumn] - 20; + + $(e).show().css({ "left": left, "top": top + $("#luckysheet-cell-main").scrollTop() }); + } + }); + } + else if(_this.freezenhorizontaldata != null){ + let freezen_rowindex = _this.freezenhorizontaldata[1]; + let freezen_top = _this.freezenhorizontaldata[0] + $("#luckysheet-cell-main").scrollTop(); + + $("#luckysheet-filter-options-sheet"+ Store.currentSheetIndex +" .luckysheet-filter-options").each(function(i, e){ + let row_index = $(e).data("str"); + let top = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + + if(row_index >= freezen_rowindex){ + if(top < freezen_top){ + $(e).hide(); + } + else{ + $(e).show(); + } + } + else{ + $(e).show().css("top", top + $("#luckysheet-cell-main").scrollTop()); + } + }); + } + else if(_this.freezenverticaldata != null){ + let freezen_colindex = _this.freezenverticaldata[1]; + let offsetColumn = luckysheet_searcharray(_this.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - _this.freezenverticaldata[2]); + + $("#luckysheet-filter-options-sheet"+ Store.currentSheetIndex +" .luckysheet-filter-options").each(function(i, e){ + let col_index = $(e).data("cindex"); + + if(col_index >= freezen_colindex){ + if(col_index < (freezen_colindex + offsetColumn)){ + $(e).hide(); + } + else{ + $(e).show(); + } + } + else{ + let left = Store.visibledatacolumn[col_index + offsetColumn] - 20; + + $(e).show().css("left", left); + } + }); + } + else{ + $("#luckysheet-filter-options-sheet"+ Store.currentSheetIndex).empty(); + createFilterOptions(Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].filter_select); + } + } +} + +export default luckysheetFreezen; \ No newline at end of file diff --git a/src/controllers/handler.js b/src/controllers/handler.js new file mode 100644 index 000000000..cf6458111 --- /dev/null +++ b/src/controllers/handler.js @@ -0,0 +1,10045 @@ +import mobileinit from './mobile'; +import luckysheetConfigsetting from './luckysheetConfigsetting'; +import luckysheetFreezen from './freezen'; +import pivotTable from './pivotTable'; +import luckysheetDropCell from './dropCell'; +import luckysheetPostil from './postil'; +import menuButton from './menuButton'; +import conditionformat from './conditionformat'; +import alternateformat from './alternateformat'; +import ifFormulaGenerator from './ifFormulaGenerator'; +import sheetmanage from './sheetmanage'; +import server from './server'; +import luckysheetupdateCell from './updateCell'; +import { luckysheet_searcharray } from './sheetSearch'; +import { modelHTML, sheetselectlistitemHTML, sheetselectlistHTML, keycode } from './constant'; +import luckysheetsizeauto from './resize'; +import { + luckysheetMoveHighlightCell, + luckysheetMoveHighlightCell2, + luckysheetMoveHighlightRange, + luckysheetMoveHighlightRange2 +} from './sheetMove'; +import { selectHightlightShow, selectIsOverlap, selectionCopyShow, luckysheet_count_show } from './select'; +import selection from './selection'; +import searchReplace from './searchReplace'; +import controlHistory from './controlHistory'; +import splitColumn from './splitColumn'; +import { labelFilterOptionState, orderbydatafiler, createFilter, createFilterOptions } from './filter'; +import insertFormula from './insertFormula'; +import { + replaceHtml, + getObjType, + chatatABC, + ArrayUnique, + getByteLen, + rgbTohex, + showrightclickmenu, + luckysheetactiveCell, + numFormat, + mouseclickposition, +} from '../utils/util'; +import { getSheetIndex, getRangetxt } from '../methods/get'; +import { + rowLocation, + rowLocationByIndex, + colLocation, + colLocationByIndex, + mouseposition +} from '../global/location'; +import { rowlenByRange } from '../global/getRowlen'; +import { isRealNull, isRealNum, hasPartMC, isEditMode } from '../global/validate'; +import { countfunc } from '../global/count'; +import browser from '../global/browser'; +import formula from '../global/formula'; +import { luckysheetextendtable, luckysheetdeletetable } from '../global/extend'; +import cleargridelement from '../global/cleargridelement'; +import luckysheetscrollevent from '../global/scroll'; +import { + jfrefreshgrid, + jfrefreshgridall, + jfrefreshgrid_rhcw, + luckysheetrefreshgrid, +} from '../global/refresh'; +import { getdatabyselection, getcellvalue, datagridgrowth } from '../global/getdata'; +import { orderbydata, orderbydata1D, sortColumnSeletion } from '../global/sort'; +import tooltip from '../global/tooltip'; +import editor from '../global/editor'; +import { isdatatype } from '../global/datecontroll'; +import json from '../global/json'; +import { update, genarate } from '../global/format'; +import method from '../global/method'; +import { getBorderInfoCompute } from '../global/border'; +import { luckysheetDrawMain } from '../global/draw'; +import locale from '../locale/locale'; +import Store from '../store'; + +//, columeflowset, rowflowset +export default function luckysheetHandler() { + //移动端 + if(browser.mobilecheck()){ + mobileinit(); + } + + //滚动监听 + $("#luckysheet-cell-main").scroll(function () { + + }) + .mousewheel(function (event, delta) { + event.preventDefault(); + }); + + $("#luckysheet-grid-window-1").mousewheel(function (event, delta) { + let scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(), + scrollTop = $("#luckysheet-scrollbar-y").scrollTop(); + let visibledatacolumn_c = Store.visibledatacolumn, + visibledatarow_c = Store.visibledatarow; + + if (luckysheetFreezen.freezenhorizontaldata != null) { + visibledatarow_c = luckysheetFreezen.freezenhorizontaldata[3]; + } + + if (luckysheetFreezen.freezenverticaldata != null) { + visibledatacolumn_c = luckysheetFreezen.freezenverticaldata[3]; + } + + visibledatacolumn_c = ArrayUnique(visibledatacolumn_c); + visibledatarow_c = ArrayUnique(visibledatarow_c); + + let col_st = luckysheet_searcharray(visibledatacolumn_c, scrollLeft); + let row_st = luckysheet_searcharray(visibledatarow_c, scrollTop); + + let colscroll = 0; + let rowscroll = 0; + + //一次滚动三行或三列 + if(event.deltaX != 0){ + let col_ed; + + if(event.deltaX < 0){ + col_ed = col_st + 3; + + if(col_ed >= visibledatacolumn_c.length){ + col_ed = visibledatacolumn_c.length - 1; + } + } + else{ + col_ed = col_st - 3; + + if(col_ed < 0){ + col_ed = 0; + } + } + + colscroll = col_ed == 0 ? 0 : visibledatacolumn_c[col_ed - 1]; + + $("#luckysheet-scrollbar-x").scrollLeft(colscroll); + } + + if(event.deltaY != 0){ + let row_ed; + + if(event.deltaY < 0){ + row_ed = row_st + 3; + + if(row_ed >= visibledatarow_c.length){ + row_ed = visibledatarow_c.length - 1; + } + } + else{ + row_ed = row_st - 3; + + if(row_ed < 0){ + row_ed = 0; + } + } + + rowscroll = row_ed == 0 ? 0 : visibledatarow_c[row_ed - 1]; + + $("#luckysheet-scrollbar-y").scrollTop(rowscroll); + } + }); + + $("#luckysheet-scrollbar-x").scroll(function(){ + setTimeout(function(){ + luckysheetscrollevent(true); + },10); + }) + .mousewheel(function (event, delta) { + event.preventDefault(); + }); + + $("#luckysheet-scrollbar-y").scroll(function(){ + setTimeout(function(){ + luckysheetscrollevent(true); + },10); + }) + .mousewheel(function (event, delta) { + event.preventDefault(); + }); + + //页面resize + $(window).resize(function () { + let luckysheetDocument = document.getElementById(Store.container); + if(luckysheetDocument){ + luckysheetsizeauto(); + } + }); + + //表格mousedown + $("#luckysheet-cell-main, #luckysheetTableContent").mousedown(function (event) { + $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle") + .css("cursor","default") + .end() + .find(".luckysheet-cs-draghandle") + .css("cursor","default"); + $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"); + + //有批注在编辑时 + luckysheetPostil.removeActivePs(); + + //luckysheetautoadjustmousedown = 1; + let mouse = mouseposition(event.pageX, event.pageY); + if (mouse[0] >= Store.cellmainWidth - Store.cellMainSrollBarSize || mouse[1] >= Store.cellmainHeight - Store.cellMainSrollBarSize) { + return; + } + + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + if(luckysheetFreezen.freezenverticaldata != null && mouse[0] < (luckysheetFreezen.freezenverticaldata[0] - luckysheetFreezen.freezenverticaldata[2])){ + x = mouse[0] + luckysheetFreezen.freezenverticaldata[2]; + } + + if(luckysheetFreezen.freezenhorizontaldata != null && mouse[1] < (luckysheetFreezen.freezenhorizontaldata[0] - luckysheetFreezen.freezenhorizontaldata[2])){ + y = mouse[1] + luckysheetFreezen.freezenhorizontaldata[2]; + } + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let row_index_ed = row_index, col_index_ed = col_index; + let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + row_index = margeset.row[2]; + row_index_ed = margeset.row[3]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + col_index = margeset.column[2]; + col_index_ed = margeset.column[3]; + } + + //若点击单元格部分不在视图内 + if(col_pre < $("#luckysheet-cell-main").scrollLeft()){ + $("#luckysheet-scrollbar-x").scrollLeft(col_pre); + } + + if(row_pre < $("#luckysheet-cell-main").scrollTop()){ + $("#luckysheet-scrollbar-y").scrollTop(row_pre); + } + + //mousedown是右键 + if (event.which == "3") { + let isright = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + if (Store.luckysheet_select_save[s]["row"] != null && (row_index >= Store.luckysheet_select_save[s]["row"][0] && row_index <= Store.luckysheet_select_save[s]["row"][1] && col_index >= Store.luckysheet_select_save[s]["column"][0] && col_index <= Store.luckysheet_select_save[s]["column"][1])) { + isright = true; + break; + } + } + + if(isright){ + return; + } + } + + //单元格数据下钻 + if(Store.flowdata[row_index] != null && Store.flowdata[row_index][col_index] != null && Store.flowdata[row_index][col_index].dd != null){ + if(luckysheetConfigsetting.fireMousedown != null && getObjType(luckysheetConfigsetting.fireMousedown) == "function"){ + luckysheetConfigsetting.fireMousedown(Store.flowdata[row_index][col_index].dd); + return; + } + } + + Store.luckysheet_scroll_status = true; + + //公式相关 + let $input = $("#luckysheet-input-box"); + if (parseInt($input.css("top")) > 0) { + if (formula.rangestart || formula.rangedrag_column_start || formula.rangedrag_row_start || formula.israngeseleciton()) { + //公式选区 + let rowseleted = [row_index, row_index_ed]; + let columnseleted = [col_index, col_index_ed]; + + let left = col_pre; + let width = col - col_pre - 1; + let top = row_pre; + let height = row - row_pre - 1; + + if(event.shiftKey){ + let last = formula.func_selectedrange; + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + luckysheet_count_show(left, top, width, height, rowseleted, columnseleted); + + last["row"] = rowseleted; + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + last["top_move"] = top; + last["height_move"] = height; + + formula.func_selectedrange = last; + } + else if(event.ctrlKey && $("#luckysheet-rich-text-editor").find("span").last().text() != ","){ + //按住ctrl 选择选区时 先处理上一个选区 + let vText = $("#luckysheet-rich-text-editor").text() + ","; + if(vText.length > 0 && vText.substr(0, 1) == "="){ + vText = formula.functionHTMLGenerate(vText); + + if (window.getSelection) { // all browsers, except IE before version 9 + let currSelection = window.getSelection(); + formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; + } + else { // Internet Explorer before version 9 + let textRange = document.selection.createRange(); + formula.functionRangeIndex = textRange; + } + + $("#luckysheet-rich-text-editor").html(vText); + + formula.canceFunctionrangeSelected(); + formula.createRangeHightlight(); + } + + formula.rangestart = false; + formula.rangedrag_column_start = false; + formula.rangedrag_row_start = false; + + $("#luckysheet-functionbox-cell").html(vText); + formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); + + //再进行 选区的选择 + formula.israngeseleciton(); + formula.func_selectedrange = { + "left": left, + "width": width, + "top": top, + "height": height, + "left_move": left, + "width_move": width, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": columnseleted, + "row_focus": row_index, + "column_focus": col_index + }; + } + else{ + formula.func_selectedrange = { + "left": left, + "width": width, + "top": top, + "height": height, + "left_move": left, + "width_move": width, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": columnseleted, + "row_focus": row_index, + "column_focus": col_index + }; + } + + formula.rangeSetValue({ "row": rowseleted, "column": columnseleted }); + + formula.rangestart = true; + formula.rangedrag_column_start = false; + formula.rangedrag_row_start = false; + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": top, + "height": height + }).show(); + $("#luckysheet-formula-help-c").hide(); + luckysheet_count_show(left, top, width, height, rowseleted, columnseleted); + + setTimeout(function(){ + let currSelection = window.getSelection(); + let anchorOffset = currSelection.anchorNode; + + let $editor; + if($("#luckysheet-search-formula-parm").is(":visible") || $("#luckysheet-search-formula-parm-select").is(":visible")){ + $editor = $("#luckysheet-rich-text-editor"); + formula.rangechangeindex = formula.data_parm_index; + } + else{ + $editor = $(anchorOffset).closest("div"); + } + + let $span = $editor.find("span[rangeindex='" + formula.rangechangeindex + "']"); + + formula.setCaretPosition($span.get(0), 0, $span.html().length); + }, 1); + + return; + } + else { + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + Store.luckysheet_select_status = true; + + if($("#luckysheet-info").is(":visible")){ + Store.luckysheet_select_status = false; + } + } + } + else { + Store.luckysheet_select_status = true; + } + + //条件格式 应用范围可选择多个单元格 + if($("#luckysheet-multiRange-dialog").is(":visible")){ + conditionformat.selectStatus = true; + Store.luckysheet_select_status = false; + + if(event.shiftKey){ + let last = conditionformat.selectRange[conditionformat.selectRange.length - 1]; + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + last["top_move"] = top; + last["height_move"] = height; + + conditionformat.selectRange[conditionformat.selectRange.length - 1] = last; + } + else if(event.ctrlKey){ + conditionformat.selectRange.push({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index_ed], + "column": [col_index, col_index_ed], + "row_focus": row_index, + "column_focus": col_index + }); + } + else{ + conditionformat.selectRange = []; + conditionformat.selectRange.push({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index_ed], + "column": [col_index, col_index_ed], + "row_focus": row_index, + "column_focus": col_index + }); + } + + selectionCopyShow(conditionformat.selectRange); + + let range = conditionformat.getTxtByRange(conditionformat.selectRange); + $("#luckysheet-multiRange-dialog input").val(range); + + return; + } + else{ + conditionformat.selectStatus = false; + conditionformat.selectRange = []; + } + + //条件格式 条件值只能选择单个单元格 + if($("#luckysheet-singleRange-dialog").is(":visible")){ + Store.luckysheet_select_status = false; + + selectionCopyShow([{"row": [row_index, row_index], "column": [col_index, col_index]}]); + + let range = getRangetxt( + Store.currentSheetIndex, + { "row": [row_index, row_index], "column": [col_index, col_index] }, + Store.currentSheetIndex + ); + $("#luckysheet-singleRange-dialog input").val(range); + + return; + } + + //if公式生成器 + if(ifFormulaGenerator.singleRangeFocus){ + $("#luckysheet-ifFormulaGenerator-dialog .singRange").click(); + } + if($("#luckysheet-ifFormulaGenerator-singleRange-dialog").is(":visible")){ + //选择单个单元格 + Store.luckysheet_select_status = false; + formula.rangestart = false; + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + $("#luckysheet-formula-help-c").hide(); + + let range = getRangetxt( + Store.currentSheetIndex, + { "row": [row_index, row_index], "column": [col_index, col_index] }, + Store.currentSheetIndex + ); + $("#luckysheet-ifFormulaGenerator-singleRange-dialog input").val(range); + + return; + } + if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){ + //选择范围 + Store.luckysheet_select_status = false; + formula.func_selectedrange = { + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index], + "column": [col_index, col_index], + "row_focus": row_index, + "column_focus": col_index + }; + formula.rangestart = true; + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + $("#luckysheet-formula-help-c").hide(); + + let range = getRangetxt( + Store.currentSheetIndex, + { "row": [row_index, row_index], "column": [col_index, col_index] }, + Store.currentSheetIndex + ); + $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); + + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + + return; + } + + if (Store.luckysheet_select_status) { + if(event.shiftKey){ + //按住shift点击,选择范围 + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); //选区最后一个 + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + last["top_move"] = top; + last["height_move"] = height; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + + //交替颜色选择范围 + if($("#luckysheet-alternateformat-rangeDialog").is(":visible")){ + $("#luckysheet-alternateformat-rangeDialog input").val(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save)); + } + + if (pivotTable.luckysheet_pivotTable_select_state) { + $("#luckysheet-pivotTable-range-selection-input").val(Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].name + "!" + chatatABC(Store.luckysheet_select_save[0]["column"][0]) + (Store.luckysheet_select_save[0]["row"][0] + 1) + ":" + chatatABC(Store.luckysheet_select_save[0]["column"][1]) + (Store.luckysheet_select_save[0]["row"][1] + 1)); + } + } + else if(event.ctrlKey){ + //选区添加 + Store.luckysheet_select_save.push({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index_ed], + "column": [col_index, col_index_ed], + "row_focus": row_index, + "column_focus": col_index + }); + } + else{ + Store.luckysheet_select_save = []; + Store.luckysheet_select_save.push({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index_ed], + "column": [col_index, col_index_ed], + "row_focus": row_index, + "column_focus": col_index + }); + + //单元格格式icon对应 + menuButton.menuButtonFocus(Store.flowdata, row_index, col_index); + //函数公式显示栏 + formula.fucntionboxshow(row_index, col_index); + } + + selectHightlightShow(); + + if(luckysheetFreezen.freezenhorizontaldata != null || luckysheetFreezen.freezenverticaldata != null){ + luckysheetFreezen.scrollAdaptOfselect(); + } + + if(!browser.mobilecheck()){ //非移动端聚焦输入框 + luckysheetactiveCell(); + } + + if(server.allowUpdate){ + //允许编辑后的后台更新时 + server.saveParam("mv", Store.currentSheetIndex, Store.luckysheet_select_save); + } + } + + //交替颜色 + if(alternateformat.rangefocus){ + alternateformat.rangefocus = false; + $("#luckysheet-alternateformat-range .fa-table").click(); + } + + $("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(); + + if(!isEditMode()){ + //chartMix 隐藏当前页的数据选择区域高亮 + !!window.store && store.commit("hideAllNeedRangeShow"); + } + + $("#luckysheet-helpbox-cell").text(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1])); + + //数据透视表 + pivotTable.pivotclick(row_index, col_index, Store.currentSheetIndex); + + $("#" + Store.container).attr("tabindex", 0).focus(); + + //$("#luckysheet-cols-h-c .luckysheet-cols-h-cells-c .luckysheet-cols-h-cells-clip .luckysheet-cols-h-cell-sel").removeClass("luckysheet-cols-h-cell-sel").addClass("luckysheet-cols-h-cell-nosel"); + + //$("#luckysheet-rows-h .luckysheet-rows-h-cells .luckysheet-rows-h-cells-c .luckysheet-rows-h-cells-clip .luckysheet-rows-h-cell-sel").removeClass("luckysheet-rows-h-cell-sel").addClass("luckysheet-rows-h-cell-nosel"); + + + //$("#luckysheet-cols-h-c .luckysheet-cols-h-cells-c .luckysheet-cols-h-cells-clip .luckysheet-cols-h-cell-nosel").eq(col_index).removeClass("luckysheet-cols-h-cell-nosel").addClass("luckysheet-cols-h-cell-sel"); + + //$("#luckysheet-rows-h .luckysheet-rows-h-cells .luckysheet-rows-h-cells-c .luckysheet-rows-h-cells-clip .luckysheet-rows-h-cell-nosel").eq(row_index).removeClass("luckysheet-rows-h-cell-nosel").addClass("luckysheet-rows-h-cell-sel"); + + //event.stopImmediatePropagation(); + + }).mouseup(function (event) { + if (event.which == "3") { + //禁止前台编辑(只可 框选单元格、滚动查看表格) + if(!Store.allowEdit){ + return; + } + + if(isEditMode()){ //非编辑模式下禁止右键功能框 + return; + } + + let x = event.pageX; + let y = event.pageY; + let data = Store.flowdata; + + let obj_s = Store.luckysheet_select_save[0]; + + $("#luckysheet-cols-rows-data").show(); + $("#luckysheet-cols-rows-handleincell").show(); + $("#luckysheet-cols-rows-add, #luckysheet-cols-rows-shift").hide(); + + if (obj_s["row"] != null && obj_s["row"][0] == 0 && obj_s["row"][1] == Store.flowdata.length - 1) { + Store.luckysheetRightHeadClickIs = "column"; + + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(locale().rightclick.column); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(locale().rightclick.width); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(locale().rightclick.left); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(locale().rightclick.right); + + $("#luckysheet-cols-rows-add").show(); + $("#luckysheet-cols-rows-data").show(); + $("#luckysheet-cols-rows-shift").hide(); + $("#luckysheet-cols-rows-handleincell").hide(); + + Store.luckysheet_cols_menu_status = true; + + //列宽默认值 + let cfg = $.extend(true, {}, Store.config); + if(cfg["columlen"] == null){ + cfg["columlen"] = {}; + } + + let first_collen = cfg["columlen"][Store.luckysheet_select_save[0].column[0]] == null ? Store.defaultcollen : cfg["columlen"][Store.luckysheet_select_save[0].column[0]]; + let isSame = true; + + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let s = Store.luckysheet_select_save[i]; + let c1 = s.column[0], c2 = s.column[1]; + + for(let c = c1; c <= c2; c++){ + let collen = cfg["columlen"][c] == null ? Store.defaultcollen : cfg["columlen"][c]; + + if(collen != first_collen){ + isSame = false; + break; + } + } + } + + if(isSame){ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_collen); + } + else{ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); + } + } + else if (obj_s["column"] != null && obj_s["column"][0] == 0 && obj_s["column"][1] == Store.flowdata[0].length - 1) { + Store.luckysheetRightHeadClickIs = "row"; + + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(locale().rightclick.row); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(locale().rightclick.height); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(locale().rightclick.top); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(locale().rightclick.bottom); + + $("#luckysheet-cols-rows-add").show(); + $("#luckysheet-cols-rows-data").show(); + $("#luckysheet-cols-rows-shift").hide(); + $("#luckysheet-cols-rows-handleincell").hide(); + + Store.luckysheet_cols_menu_status = true; + + //行高默认值 + let cfg = $.extend(true, {}, Store.config); + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + let first_rowlen = cfg["rowlen"][Store.luckysheet_select_save[0].row[0]] == null ? Store.defaultrowlen : cfg["rowlen"][Store.luckysheet_select_save[0].row[0]]; + let isSame = true; + + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let s = Store.luckysheet_select_save[i]; + let r1 = s.row[0], r2 = s.row[1]; + + for(let r = r1; r <= r2; r++){ + let rowlen = cfg["rowlen"][r] == null ? Store.defaultrowlen : cfg["rowlen"][r]; + + if(rowlen != first_rowlen){ + isSame = false; + break; + } + } + } + + if(isSame){ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_rowlen); + } + else{ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); + } + } + + showrightclickmenu($("#luckysheet-rightclick-menu"), x, y); + } + }).dblclick(function (event) { + //禁止前台编辑(只可 框选单元格、滚动查看表格) + if(!Store.allowEdit){ + return; + } + + if(parseInt($("#luckysheet-input-box").css("top")) > 0){ + return; + } + + let mouse = mouseposition(event.pageX, event.pageY); + if (mouse[0] >= Store.cellmainWidth - Store.cellMainSrollBarSize || mouse[1] >= Store.cellmainHeight - Store.cellMainSrollBarSize) { + return; + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + if (pivotTable.isPivotRange(row_index, col_index)) { + //数据透视表没有 任何数据 + if((pivotTable.filter == null || pivotTable.filter.length == 0) && (pivotTable.row == null || pivotTable.row.length == 0) && (pivotTable.column == null || pivotTable.column.length == 0) && (pivotTable.values == null || pivotTable.values.length == 0)){ + return; + } + + //数据透视表没有 数值数据 + if(pivotTable.values == null || pivotTable.values.length == 0){ + return; + } + + //点击位置不是 数值数据 所在区域 + if(row_index == 0 || col_index == 0){ + return; + } + + if(pivotTable.column != null && pivotTable.column.length > 0){ + if(pivotTable.values.length >= 2 && pivotTable.showType == "column"){ + if(row_index <= pivotTable.column.length || col_index >= pivotTable.pivotDatas[0].length - pivotTable.values.length){ + return; + } + } + else{ + if(row_index <= pivotTable.column.length - 1 || col_index >= pivotTable.pivotDatas[0].length - 1){ + return; + } + } + } + + if(pivotTable.row != null && pivotTable.row.length > 0){ + if(pivotTable.values.length >= 2 && pivotTable.showType == "row"){ + if(col_index <= pivotTable.row.length || row_index >= pivotTable.pivotDatas.length - pivotTable.values.length){ + return; + } + } + else{ + if(col_index <= pivotTable.row.length - 1 || row_index >= pivotTable.pivotDatas.length - 1){ + return; + } + } + } + + sheetmanage.addNewSheet(event); + + pivotTable.drillDown(row_index, col_index); + + return; + } + + let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + row_index = margeset.row[2]; + col = margeset.column[1]; + col_pre = margeset.column[0]; + col_index = margeset.column[2]; + } + + if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ + //公式参数栏显示 + $("#luckysheet-cell-selected").hide(); + } + else if($("#luckysheet-conditionformat-dialog").is(":visible")||$("#luckysheet-administerRule-dialog").is(":visible")||$("#luckysheet-newConditionRule-dialog").is(":visible")||$("#luckysheet-editorConditionRule-dialog").is(":visible")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible")){ + //条件格式 + return; + } + else if($("#luckysheet-modal-dialog-slider-alternateformat").is(":visible") || $("#luckysheet-alternateformat-rangeDialog").is(":visible")){ + //交替颜色 + return; + } + else{ + if(menuButton.luckysheetPaintModelOn){ + menuButton.cancelPaintModel(); + } + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); + } + }); + + //表格mousemove + $(document).mousemove(function (event) { + luckysheetPostil.overshow(event); //有批注显示 + + clearInterval(Store.jfautoscrollTimeout); + + if(formula.functionResizeStatus){ + let y = event.pageY; + let movepx = y - formula.functionResizeData.y; + let mpx = formula.functionResizeData.calculatebarHeight + movepx; + let winh = Math.round($(window).height()/2); + + if(mpx <= 28){ + if(mpx <= 20){ + return; + } + mpx = 28; + } + else if(mpx >= winh){ + if(mpx >= winh + 8){ + return; + } + mpx = winh; + } + + Store.calculatebarHeight = mpx; + $("#luckysheet-wa-calculate").css("height", Store.calculatebarHeight - 2); + $("#luckysheet-wa-calculate-size").css({"background":"#5e5e5e", "cursor":"ns-resize"}); + + clearTimeout(formula.functionResizeTimeout); + formula.functionResizeTimeout = setTimeout(function(){ + luckysheetsizeauto(); + }, 15); + } + else if (!!luckysheetFreezen.horizontalmovestate) { + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let top = mouse[1] + Store.columeHeaderHeight; + + if (top < Store.columeHeaderHeight) { + top = Store.columeHeaderHeight; + } + + if (top > luckysheetFreezen.windowHeight - 4) { + top = luckysheetFreezen.windowHeight - 4; + } + + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({ "top": top }); + + if (top + scrollTop - Store.columeHeaderHeight >= row_pre + (row - row_pre) / 2) { + top = row - 2 - scrollTop + Store.columeHeaderHeight; + luckysheetFreezen.freezenhorizontaldata = [row, row_index + 1, scrollTop, luckysheetFreezen.cutVolumn(Store.visibledatarow, row_index + 1), top]; + } + else { + top = row_pre - 2 - scrollTop + Store.columeHeaderHeight; + luckysheetFreezen.freezenhorizontaldata = [row_pre, row_index, scrollTop, luckysheetFreezen.cutVolumn(Store.visibledatarow, row_index), top]; + } + + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").css({ "top": top }); + luckysheetFreezen.saveFreezen(luckysheetFreezen.freezenhorizontaldata, top, null, null); + } + else if (!!luckysheetFreezen.verticalmovestate) { + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let left = mouse[0] + Store.rowHeaderWidth; + + if (left < Store.rowHeaderWidth) { + left = Store.rowHeaderWidth; + } + + if (left > luckysheetFreezen.windowWidth - 4) { + left = luckysheetFreezen.windowWidth - 4; + } + + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({ "left": left }); + + if (left + scrollLeft - Store.rowHeaderWidth >= col_pre + (col - col_pre) / 2) { + left = col - 2 - scrollLeft + Store.rowHeaderWidth; + luckysheetFreezen.freezenverticaldata = [col, col_index + 1, scrollLeft, luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_index + 1), left]; + } + else { + left = col_pre - 2 - scrollLeft + Store.rowHeaderWidth; + luckysheetFreezen.freezenverticaldata = [col_pre, col_index, scrollLeft, luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_index), left]; + } + + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").css({ "left": left }); + luckysheetFreezen.saveFreezen(null, null, luckysheetFreezen.freezenverticaldata, left); + luckysheetsizeauto();//调节选区时下部单元格溢出 + } + else if (!!pivotTable && pivotTable.movestate) { + let x = event.pageX, y = event.pageY; + $("#luckysheet-modal-dialog-slider-pivot-move").css({ + "left": x - pivotTable.movesave.width / 2, + "top": y - pivotTable.movesave.height + }); + } + else if (Store.luckysheet_sheet_move_status) { + let scrollLeft = $("#luckysheet-sheet-container-c").scrollLeft(); + let x = event.pageX + scrollLeft; + + if (Math.abs(event.pageX - Store.luckysheet_sheet_move_data.pageX) < 3) { + return; + } + + let winW = $("#luckysheet-sheet-container").width(); + let left = x - Store.luckysheet_sheet_move_data.curleft - $("#luckysheet-sheet-container").offset().left; + Store.luckysheet_sheet_move_data.activeobject.css({ "left": left }); + + let row_index = luckysheet_searcharray(Store.luckysheet_sheet_move_data.widthlist, left + Store.luckysheet_sheet_move_data.curleft); + Store.luckysheet_sheet_move_data.cursorobject.css({ "cursor": "move" }); + + if (left - scrollLeft <= 6) { + $("#luckysheet-sheets-leftscroll").click(); + } + + if (left - scrollLeft >= winW - 40) { + $("#luckysheet-sheets-rightscroll").click(); + } + + if (row_index != Store.luckysheet_sheet_move_data.curindex) { + if (row_index == -1 && left > 0) { + row_index = Store.luckysheet_sheet_move_data.widthlist.length - 1; + $("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(row_index)); + } + else if (row_index == -1 && left <= 0) { + $("#luckysheet-sheets-item-clone").insertBefore($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(0)); + } + else { + $("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(row_index)); + } + + Store.luckysheet_sheet_move_data.widthlist = []; + $("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function (i) { + if (i == 0) { + Store.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())); + } + else { + Store.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth()) + Store.luckysheet_sheet_move_data.widthlist[i - 1]); + } + }); + + Store.luckysheet_sheet_move_data.curindex = $("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").index($("#luckysheet-sheets-item-clone")); + } + } + else if (Store.luckysheet_model_move_state) { + let scrollTop = $(document).scrollTop(), scrollLeft = $(document).scrollLeft(); + let y = event.pageY + scrollTop, x = event.pageX + scrollLeft; + let winH = $(window).height(), winW = $(window).width(); + let myh = Store.luckysheet_model_move_obj.height(), + myw = Store.luckysheet_model_move_obj.width(); + let top = y - Store.luckysheet_model_xy[1], + left = x - Store.luckysheet_model_xy[0]; + + if (top < 0) { + top = 0; + } + + if (top + myh + 62 > winH) { + top = winH - myh - 62; + } + + if (left < 0) { + left = 0; + } + + if (left + myw + 86 > winW) { + left = winW - myw - 86; + } + + Store.luckysheet_model_move_obj.css({ "top": top, "left": left }); + event.preventDefault(); + } + else if (!!Store.luckysheet_scroll_status || !!Store.luckysheet_select_status || !!Store.luckysheet_rows_selected_status || !!Store.luckysheet_cols_selected_status || !!Store.luckysheet_cell_selected_move || !!Store.luckysheet_cell_selected_extend || !!Store.luckysheet_cols_change_size || !!Store.luckysheet_rows_change_size || !!formula.rangeResize || !!formula.rangeMove) { + if (Store.luckysheet_select_status) { + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + } + + Store.jfautoscrollTimeout = setInterval(function () { + if (Store.luckysheet_scroll_status && !Store.luckysheet_cols_change_size && !Store.luckysheet_rows_change_size) { + let mouse = mouseposition(event.pageX, event.pageY); + let left = $("#luckysheet-scrollbar-x").scrollLeft(), + top = $("#luckysheet-scrollbar-y").scrollTop(); + let x = mouse[0]; + let y = mouse[1]; + let winH = $("#luckysheet-cell-main").height() - 20, + winW = $("#luckysheet-cell-main").width() - 60; + + if (y < 0 || y > winH) { + let stop; + if (y < 0) { + stop = top + y/2; + } + else { + stop = top + (y - winH)/2; + } + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + + if (x < 0 || x > winW) { + let sleft; + if (x < 0) { + sleft = left + x/2; + } + else { + sleft = left + (x - winW)/2; + } + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + if (Store.luckysheet_select_status) { + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + last["top_move"] = top; + last["height_move"] = height; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + + selectHightlightShow(); + + luckysheetFreezen.scrollFreezen(); + + $("#luckysheet-helpbox-cell").text(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1])); + + //交替颜色选择范围 + if($("#luckysheet-alternateformat-rangeDialog").is(":visible")){ + $("#luckysheet-alternateformat-rangeDialog input").val(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1])); + } + + if (pivotTable.luckysheet_pivotTable_select_state) { + $("#luckysheet-pivotTable-range-selection-input").val(Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].name + "!" + chatatABC(Store.luckysheet_select_save[0]["column"][0]) + (Store.luckysheet_select_save[0]["row"][0] + 1) + ":" + chatatABC(Store.luckysheet_select_save[0]["column"][1]) + (Store.luckysheet_select_save[0]["row"][1] + 1)); + } + } + else if(conditionformat.selectStatus){ + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let last = conditionformat.selectRange[conditionformat.selectRange.length - 1]; + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + last["top_move"] = top; + last["height_move"] = height; + + conditionformat.selectRange[conditionformat.selectRange.length - 1] = last; + + selectionCopyShow(conditionformat.selectRange); + + let range = conditionformat.getTxtByRange(conditionformat.selectRange); + $("#luckysheet-multiRange-dialog input").val(range); + } + else if (formula.rangestart) { + formula.rangedrag(event); + } + else if (formula.rangedrag_row_start) { + formula.rangedrag_row(event); + } + else if (formula.rangedrag_column_start) { + formula.rangedrag_column(event); + } + else if (Store.luckysheet_rows_selected_status) { + let mouse = mouseposition(event.pageX, event.pageY); + let y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); + if (y < 0) { + return false; + } + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_index = Store.visibledatacolumn.length - 1, + col = Store.visibledatacolumn[col_index], + col_pre = 0; + + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + last["row"] = rowseleted; + + last["top_move"] = top; + last["height_move"] = height; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + + selectHightlightShow(); + + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + } + else if (Store.luckysheet_cols_selected_status) { + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cols-h-c").scrollLeft(); + if (x < 0) { + return false; + } + + let row_index = Store.visibledatarow.length - 1, + row = Store.visibledatarow[row_index], + row_pre = 0; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + + selectHightlightShow(); + + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + } + else if (Store.luckysheet_cell_selected_move) { + let mouse = mouseposition(event.pageX, event.pageY); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let winH = $(window).height() + scrollTop - Store.sheetBarHeight - Store.statisticBarHeight, + winW = $(window).width() + scrollLeft; + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let row_index_original = Store.luckysheet_cell_selected_move_index[0], + col_index_original = Store.luckysheet_cell_selected_move_index[1]; + + let row_s = Store.luckysheet_select_save[0]["row"][0] - row_index_original + row_index, + row_e = Store.luckysheet_select_save[0]["row"][1] - row_index_original + row_index; + + let col_s = Store.luckysheet_select_save[0]["column"][0] - col_index_original + col_index, + col_e = Store.luckysheet_select_save[0]["column"][1] - col_index_original + col_index; + + if (row_s < 0 || y < 0) { + row_s = 0; + row_e = Store.luckysheet_select_save[0]["row"][1] - Store.luckysheet_select_save[0]["row"][0]; + } + + if (col_s < 0 || x < 0) { + col_s = 0; + col_e = Store.luckysheet_select_save[0]["column"][1] - Store.luckysheet_select_save[0]["column"][0]; + } + + if (row_e >= Store.visibledatarow[Store.visibledatarow.length - 1] || y > winH) { + row_s = Store.visibledatarow.length - 1 - Store.luckysheet_select_save[0]["row"][1] + Store.luckysheet_select_save[0]["row"][0]; + row_e = Store.visibledatarow.length - 1; + } + + if (col_e >= Store.visibledatacolumn[Store.visibledatacolumn.length - 1] || x > winW) { + col_s = Store.visibledatacolumn.length - 1 - Store.luckysheet_select_save[0]["column"][1] + Store.luckysheet_select_save[0]["column"][0]; + col_e = Store.visibledatacolumn.length - 1; + } + + col_pre = col_s - 1 == -1 ? 0 : Store.visibledatacolumn[col_s - 1]; + col = Store.visibledatacolumn[col_e]; + row_pre = row_s - 1 == -1 ? 0 : Store.visibledatarow[row_s - 1]; + row = Store.visibledatarow[row_e]; + + $("#luckysheet-cell-selected-move").css({ + "left": col_pre, + "width": col - col_pre - 2, + "top": row_pre, + "height": row - row_pre - 2, + "display": "block" + }); + } + else if (Store.luckysheet_cell_selected_extend) { + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft() - 5; + let scrollTop = $("#luckysheet-cell-main").scrollTop() - 5; + + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let winH = $(window).height() + scrollTop - Store.sheetBarHeight - Store.statisticBarHeight, + winW = $(window).width() + scrollLeft; + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let row_index_original = Store.luckysheet_cell_selected_extend_index[0], + col_index_original = Store.luckysheet_cell_selected_extend_index[1]; + + let row_s = Store.luckysheet_select_save[0]["row"][0], + row_e = Store.luckysheet_select_save[0]["row"][1]; + let col_s = Store.luckysheet_select_save[0]["column"][0], + col_e = Store.luckysheet_select_save[0]["column"][1]; + + if (row_s < 0 || y < 0) { + row_s = 0; + row_e = Store.luckysheet_select_save[0]["row"][1] - Store.luckysheet_select_save[0]["row"][0]; + } + + if (col_s < 0 || x < 0) { + col_s = 0; + col_e = Store.luckysheet_select_save[0]["column"][1] - Store.luckysheet_select_save[0]["column"][0]; + } + + if (row_e >= Store.visibledatarow[Store.visibledatarow.length - 1] || y > winH) { + row_s = Store.visibledatarow.length - 1 - Store.luckysheet_select_save[0]["row"][1] + Store.luckysheet_select_save[0]["row"][0]; + row_e = Store.visibledatarow.length - 1; + } + + if (col_e >= Store.visibledatacolumn[Store.visibledatacolumn.length - 1] || x > winW) { + col_s = Store.visibledatacolumn.length - 1 - Store.luckysheet_select_save[0]["column"][1] + Store.luckysheet_select_save[0]["column"][0]; + col_e = Store.visibledatacolumn.length - 1; + } + + let top = Store.luckysheet_select_save[0].top_move, + height = Store.luckysheet_select_save[0].height_move; + let left = Store.luckysheet_select_save[0].left_move, + width = Store.luckysheet_select_save[0].width_move; + + if (Math.abs(row_index_original - row_index) > Math.abs(col_index_original - col_index)) { + if (!(row_index >= row_s && row_index <= row_e)) { + if (Store.luckysheet_select_save[0].top_move >= row_pre) { + top = row_pre; + height = Store.luckysheet_select_save[0].top_move + Store.luckysheet_select_save[0].height_move - row_pre; + } + else { + top = Store.luckysheet_select_save[0].top_move; + height = row - Store.luckysheet_select_save[0].top_move - 1; + } + } + } + else { + if (!(col_index >= col_s && col_index <= col_e)) { + if (Store.luckysheet_select_save[0].left_move >= col_pre) { + left = col_pre; + width = Store.luckysheet_select_save[0].left_move + Store.luckysheet_select_save[0].width_move - col_pre; + } + else { + left = Store.luckysheet_select_save[0].left_move; + width = col - Store.luckysheet_select_save[0].left_move - 1; + } + } + } + + $("#luckysheet-cell-selected-extend").css({ + "left": left, + "width": width, + "top": top, + "height": height, + "display": "block" + }); + } + else if (Store.luckysheet_cols_change_size) { + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); + let x = mouse[0] + scrollLeft; + let winW = $(window).width(); + + let row_index = Store.visibledatarow.length - 1, + row = Store.visibledatarow[row_index], + row_pre = 0; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + if ((x + 3) - Store.luckysheet_cols_change_size_start[0] > 30 && x < winW + scrollLeft - 100) { + $("#luckysheet-change-size-line").css({ "left": x }); + $("#luckysheet-cols-change-size").css({ "left": x - 2 }); + } + } + else if (Store.luckysheet_rows_change_size) { + let mouse = mouseposition(event.pageX, event.pageY); + let scrollTop = $("#luckysheet-rows-h").scrollTop(); + let y = mouse[1] + scrollTop; + let winH = $(window).height(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + if ((y + 3) - Store.luckysheet_rows_change_size_start[0] > 19 && y < winH + scrollTop - 200) { + $("#luckysheet-change-size-line").css({ "top": y }); + $("#luckysheet-rows-change-size").css({ "top": y }); + } + } + else if (luckysheetPostil.move){ + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let myh = luckysheetPostil.currentObj.outerHeight(), + myw = luckysheetPostil.currentObj.outerWidth(); + + let top = y - luckysheetPostil.moveXY[1], + left = x - luckysheetPostil.moveXY[0]; + + if (top < 0) { + top = 0; + } + + if (top + myh + 42 + 6 > luckysheetPostil.currentWinH) { + top = luckysheetPostil.currentWinH - myh - 42 - 6; + } + + if (left < 0) { + left = 0; + } + + if (left + myw + 22 + 36 > luckysheetPostil.currentWinW) { + left = luckysheetPostil.currentWinW - myw - 22 - 36; + } + + luckysheetPostil.currentObj.css({ "left": left, "top": top }); + } + else if (!!luckysheetPostil.resize){ + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + if (x < 0 || y < 0) { + return false; + } + + let resizeXY = luckysheetPostil.resizeXY; + + let topchange = y - resizeXY[1], + leftchange = x - resizeXY[0]; + + let top = resizeXY[5], + height = resizeXY[3], + left = resizeXY[4], + width = resizeXY[2]; + + let resize = luckysheetPostil.resize; + + if(resize == "lm" || resize == "lt" || resize == "lb"){ + left = x; + width = resizeXY[2] - leftchange; + + if(left > resizeXY[2] + resizeXY[4] - 60){ + left = resizeXY[2] + resizeXY[4] - 60; + width = resizeXY[2] - (resizeXY[2] + resizeXY[4] - 60 - resizeXY[0]); + } + else if(left <= 0){ + left = 0; + width = resizeXY[2] + resizeXY[0]; + } + } + + if(resize == "rm" || resize == "rt" || resize == "rb"){ + width = resizeXY[2] + leftchange; + + if(width < 60){ + width = 60; + } + else if(width >= luckysheetPostil.currentWinW - resizeXY[4] - 22 - 36){ + width = luckysheetPostil.currentWinW - resizeXY[4] - 22 - 36; + } + } + + if(resize == "mt" || resize == "lt" || resize == "rt"){ + top = y; + height = resizeXY[3] - topchange; + + if(top > resizeXY[3] + resizeXY[5] - 60){ + top = resizeXY[3] + resizeXY[5] - 60; + height = resizeXY[3] - (resizeXY[3] + resizeXY[5] - 60 - resizeXY[1]); + } + else if(top <= 0){ + top = 0; + height = resizeXY[3] + resizeXY[1]; + } + } + + if(resize == "mb" || resize == "lb" || resize == "rb"){ + height = resizeXY[3] + topchange; + + if(height < 60){ + height = 60; + } + else if(height >= luckysheetPostil.currentWinH - resizeXY[5] - 42 - 6){ + height = luckysheetPostil.currentWinH - resizeXY[5] - 42 - 6; + } + } + + luckysheetPostil.currentObj.css({ "width": width, "height": height, "left": left, "top": top }); + } + else if (!!formula.rangeResize) { + formula.rangeResizeDraging(event, formula.rangeResizeObj, formula.rangeResizexy, formula.rangeResize, formula.rangeResizeWinW, formula.rangeResizeWinH, Store.ch_width, Store.rh_height); + } + else if (!!formula.rangeMove) { + formula.rangeMoveDraging(event, formula.rangeMovexy, formula.rangeMoveObj.data("range"), formula.rangeMoveObj, Store.sheetBarHeight, Store.statisticBarHeight); + } + }, 1); + } + }); + + //表格mouseup + $(document).mouseup(function (event) { + //数据窗格主体 + if (Store.luckysheet_select_status) { + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function(){ + countfunc(); + }, 0); + + //格式刷 + if(menuButton.luckysheetPaintModelOn){ + selection.pasteHandlerOfPaintModel(Store.luckysheet_copy_save); + + if(menuButton.luckysheetPaintSingle){ + //单次 格式刷 + menuButton.cancelPaintModel(); + } + } + } + + Store.luckysheet_select_status = false; + clearTimeout(Store.jfautoscrollTimeout); + Store.luckysheet_scroll_status = false; + + $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","move"); + $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"); + + //行标题窗格主体 + Store.luckysheet_rows_selected_status = false; + + //列标题窗格主体 + Store.luckysheet_cols_selected_status = false; + + Store.luckysheet_model_move_state = false; + + if(formula.functionResizeStatus){ + formula.functionResizeStatus = false; + $("#luckysheet-wa-calculate-size").removeAttr("style"); + } + + if (!!luckysheetFreezen.horizontalmovestate) { + luckysheetFreezen.horizontalmovestate = false; + $("#luckysheet-freezebar-horizontal").removeClass("luckysheet-freezebar-active"); + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css("cursor", "-webkit-grab"); + if (luckysheetFreezen.freezenhorizontaldata[4] <= Store.columeHeaderHeight) { + luckysheetFreezen.cancelFreezenHorizontal(); + } + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + if (!!luckysheetFreezen.verticalmovestate) { + luckysheetFreezen.verticalmovestate = false; + $("#luckysheet-freezebar-vertical").removeClass("luckysheet-freezebar-active"); + $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css("cursor", "-webkit-grab"); + if (luckysheetFreezen.freezenverticaldata[4] <= Store.rowHeaderWidth) { + luckysheetFreezen.cancelFreezenVertical(); + } + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + if (!!pivotTable && pivotTable.movestate) { + $("#luckysheet-modal-dialog-slider-pivot-move").remove(); + pivotTable.movestate = false; + $("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor", "default"); + + if (pivotTable.movesave.containerid != "luckysheet-modal-dialog-pivotTable-list") { + let $cur = $(event.target).closest(".luckysheet-modal-dialog-slider-config-list"); + if ($cur.length == 0) { + if (pivotTable.movesave.containerid == "luckysheet-modal-dialog-config-value") { + pivotTable.resetOrderby(pivotTable.movesave.obj); + } + + pivotTable.movesave.obj.remove(); + pivotTable.showvaluecolrow(); + + $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { + $(this).find(".luckysheet-slider-list-item-selected").find("i").remove(); + }); + + $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + let index = $(this).data("index"); + + $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { + let $seleted = $(this).find(".luckysheet-slider-list-item-selected"); + if ($(this).data("index") == index && $seleted.find("i").length == 0) { + $seleted.append(''); + } + }); + + }); + + pivotTable.refreshPivotTable(); + } + } + } + + if (Store.luckysheet_sheet_move_status) { + Store.luckysheet_sheet_move_status = false; + Store.luckysheet_sheet_move_data.activeobject.insertBefore($("#luckysheet-sheets-item-clone")); + Store.luckysheet_sheet_move_data.activeobject.removeAttr("style"); + $("#luckysheet-sheets-item-clone").remove(); + Store.luckysheet_sheet_move_data.cursorobject.css({ "cursor": "pointer" }); + Store.luckysheet_sheet_move_data = {}; + sheetmanage.reOrderAllSheet(); + } + + if (!!formula.rangeResize) { + formula.rangeResizeDragged(event, formula.rangeResizeObj, formula.rangeResize, formula.rangeResizexy, formula.rangeResizeWinW, formula.rangeResizeWinH); + } + + //批注框 移动 + if (luckysheetPostil.move) { + luckysheetPostil.move = false; + + let ps_id = luckysheetPostil.currentObj.closest(".luckysheet-postil-show").attr("id"); + + let ps_r = ps_id.split("luckysheet-postil-show_")[1].split("_")[0]; + let ps_c = ps_id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let d = editor.deepCopyFlowData(Store.flowdata); + let rc = []; + + d[ps_r][ps_c].ps.left = luckysheetPostil.currentObj.position().left; + d[ps_r][ps_c].ps.top = luckysheetPostil.currentObj.position().top; + d[ps_r][ps_c].ps.value = luckysheetPostil.currentObj.find(".formulaInputFocus").text(); + + rc.push(ps_r + "_" + ps_c); + + luckysheetPostil.ref(d, rc); + + $("#" + ps_id).remove(); + + if(d[ps_r][ps_c].ps.isshow){ + luckysheetPostil.buildPs(ps_r, ps_c, d[ps_r][ps_c].ps); + $("#" + ps_id).addClass("luckysheet-postil-show-active"); + $("#" + ps_id).find(".luckysheet-postil-dialog-resize").show(); + } + else{ + luckysheetPostil.editPs(ps_r, ps_c); + } + } + + //批注框 改变大小 + if (!!luckysheetPostil.resize) { + luckysheetPostil.resize = null; + + let ps_id = luckysheetPostil.currentObj.closest(".luckysheet-postil-show").attr("id"); + + let ps_r = ps_id.split("luckysheet-postil-show_")[1].split("_")[0]; + let ps_c = ps_id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let d = editor.deepCopyFlowData(Store.flowdata); + let rc = []; + + d[ps_r][ps_c].ps.left = luckysheetPostil.currentObj.position().left; + d[ps_r][ps_c].ps.top = luckysheetPostil.currentObj.position().top; + d[ps_r][ps_c].ps.width = luckysheetPostil.currentObj.outerWidth(); + d[ps_r][ps_c].ps.height = luckysheetPostil.currentObj.outerHeight(); + d[ps_r][ps_c].ps.value = luckysheetPostil.currentObj.find(".formulaInputFocus").text(); + + rc.push(ps_r + "_" + ps_c); + + luckysheetPostil.ref(d, rc); + + $("#" + ps_id).remove(); + + if(d[ps_r][ps_c].ps.isshow){ + luckysheetPostil.buildPs(ps_r, ps_c, d[ps_r][ps_c].ps); + $("#" + ps_id).addClass("luckysheet-postil-show-active"); + $("#" + ps_id).find(".luckysheet-postil-dialog-resize").show(); + } + else{ + luckysheetPostil.editPs(ps_r, ps_c); + } + } + + //改变行高 + if (Store.luckysheet_rows_change_size) { + Store.luckysheet_rows_change_size = false; + + $("#luckysheet-change-size-line").hide(); + $("#luckysheet-rows-change-size").css("opacity", 0); + $("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor", "default"); + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollTop = $("#luckysheet-rows-h").scrollTop(); + let y = mouse[1] + scrollTop; + let winH = $(window).height(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + let size = (y + 3) - Store.luckysheet_rows_change_size_start[0]; + + if ((y + 3) - Store.luckysheet_rows_change_size_start[0] < 19) { + size = 19; + } + + if (y >= winH - 200 + scrollTop) { + size = winW - 200 - Store.luckysheet_rows_change_size_start[0] + scrollTop; + } + + let cfg = $.extend(true, {}, Store.config); + if (cfg["rowlen"] == null) { + cfg["rowlen"] = {}; + } + + cfg["rowlen"][Store.luckysheet_rows_change_size_start[1]] = Math.ceil(size); + + if (Store.clearjfundo) { + Store.jfundo = []; + + Store.jfredo.push({ + "type": "resize", + "ctrlType": "resizeR", + "config": $.extend(true, {}, Store.config), + "curconfig": $.extend(true, {}, cfg), + "sheetIndex": Store.currentSheetIndex + }); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, cfg["rowlen"], { "k": "rowlen" }); + + jfrefreshgrid_rhcw(Store.flowdata.length, null); + } + + //改变列宽 + if (Store.luckysheet_cols_change_size) { + Store.luckysheet_cols_change_size = false; + + $("#luckysheet-change-size-line").hide(); + $("#luckysheet-cols-change-size").css("opacity", 0); + $("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor", "default"); + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); + let x = mouse[0] + scrollLeft; + let winW = $(window).width(); + + let row_index = Store.visibledatarow.length - 1, + row = Store.visibledatarow[row_index], + row_pre = 0; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let size = (x + 3) - Store.luckysheet_cols_change_size_start[0]; + + let firstcolumlen = Store.defaultcollen; + if (Store.config["columlen"] != null && Store.config["columlen"][Store.luckysheet_cols_change_size_start[1]] != null) { + firstcolumlen = Store.config["columlen"][Store.luckysheet_cols_change_size_start[1]]; + } + + if (Math.abs(size - firstcolumlen) < 3) { + return; + } + + if ((x + 3) - Store.luckysheet_cols_change_size_start[0] < 30) { + size = 30; + } + + if (x >= winW - 100 + scrollLeft) { + size = winW - 100 - Store.luckysheet_cols_change_size_start[0] + scrollLeft; + } + + let cfg = $.extend(true, {}, Store.config); + if (cfg["columlen"] == null) { + cfg["columlen"] = {}; + } + + cfg["columlen"][Store.luckysheet_cols_change_size_start[1]] = Math.ceil(size); + + if (Store.clearjfundo) { + Store.jfundo = []; + + Store.jfredo.push({ + "type": "resize", + "ctrlType": "resizeC", + "config": $.extend(true, {}, Store.config), + "curconfig": $.extend(true, {}, cfg), + "sheetIndex": Store.currentSheetIndex + }); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, cfg["columlen"], { "k": "columlen" }); + + jfrefreshgrid_rhcw(null, Store.flowdata[0].length); + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + + if (formula.rangeMove) { + formula.rangeMoveDragged(formula.rangeMoveObj); + } + + //改变选择框的位置并替换目标单元格 + if (Store.luckysheet_cell_selected_move) { + $("#luckysheet-cell-selected-move").hide(); + + Store.luckysheet_cell_selected_move = false; + let mouse = mouseposition(event.pageX, event.pageY); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let winH = $(window).height() + scrollTop - Store.sheetBarHeight - Store.statisticBarHeight, + winW = $(window).width() + scrollLeft; + + let row_index = rowLocation(y)[2]; + let col_index = colLocation(x)[2]; + + let row_index_original = Store.luckysheet_cell_selected_move_index[0], + col_index_original = Store.luckysheet_cell_selected_move_index[1]; + + if(row_index == row_index_original && col_index == col_index_original){ + return; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let data = getdatabyselection(last); + + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + //选区包含部分单元格 + if(hasPartMC(cfg, last["row"][0], last["row"][1], last["column"][0], last["column"][1])){ + if(isEditMode()){ + alert("无法对合并单元格执行此操作"); + } + else{ + tooltip.info('提示',"无法对合并单元格执行此操作"); + } + return; + } + + let row_s = last["row"][0] - row_index_original + row_index, + row_e = last["row"][1] - row_index_original + row_index; + let col_s = last["column"][0] - col_index_original + col_index, + col_e = last["column"][1] - col_index_original + col_index; + + if (row_s < 0 || y < 0) { + row_s = 0; + row_e = last["row"][1] - last["row"][0]; + } + + if (col_s < 0 || x < 0) { + col_s = 0; + col_e = last["column"][1] - last["column"][0]; + } + + if (row_e >= Store.visibledatarow[Store.visibledatarow.length - 1] || y > winH) { + row_s = Store.visibledatarow.length - 1 - last["row"][1] + last["row"][0]; + row_e = Store.visibledatarow.length - 1; + } + + if (col_e >= Store.visibledatacolumn[Store.visibledatacolumn.length - 1] || x > winW) { + col_s = Store.visibledatacolumn.length - 1 - last["column"][1] + last["column"][0]; + col_e = Store.visibledatacolumn.length - 1; + } + + //替换的位置包含部分单元格 + if(hasPartMC(cfg, row_s, row_e, col_s, col_e)){ + if(isEditMode()){ + alert("无法对合并单元格执行此操作"); + } + else{ + tooltip.info('提示',"无法对合并单元格执行此操作"); + } + return; + } + + let borderInfoCompute = getBorderInfoCompute(Store.currentSheetIndex); + + //删除原本位置的数据 + let RowlChange = null; + for (let r = last["row"][0]; r <= last["row"][1]; r++) { + if(r in cfg["rowlen"]){ + RowlChange = true; + } + + for (let c = last["column"][0]; c <= last["column"][1]; c++) { + let cell = d[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + if((cell["mc"].r + "_" + cell["mc"].c) in cfg["merge"]){ + delete cfg["merge"][cell["mc"].r + "_" + cell["mc"].c]; + } + } + + d[r][c] = null; + } + } + + //边框 + if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ + let borderInfo = []; + + for(let i = 0; i < cfg["borderInfo"].length; i++){ + let bd_rangeType = cfg["borderInfo"][i].rangeType; + + if(bd_rangeType == "range"){ + let bd_range = cfg["borderInfo"][i].range; + let bd_emptyRange = []; + + for(let j = 0; j < bd_range.length; j++){ + bd_emptyRange = bd_emptyRange.concat(conditionformat.CFSplitRange(bd_range[j], {"row": last["row"], "column": last["column"]}, {"row": [row_s, row_e], "column": [col_s, col_e]}, "restPart")); + } + + cfg["borderInfo"][i].range = bd_emptyRange; + + borderInfo.push(cfg["borderInfo"][i]); + } + else if(bd_rangeType == "cell"){ + let bd_r = cfg["borderInfo"][i].value.row_index; + let bd_c = cfg["borderInfo"][i].value.col_index; + + if(!(bd_r >= last["row"][0] && bd_r <= last["row"][1] && bd_c >= last["column"][0] && bd_c <= last["column"][1])){ + borderInfo.push(cfg["borderInfo"][i]); + } + } + } + + cfg["borderInfo"] = borderInfo; + } + + //替换位置数据更新 + let offsetMC = {}; + for (let r = 0; r < data.length; r++) { + for (let c = 0; c < data[0].length; c++) { + if(borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": r + row_s, + "col_index": c + col_s, + "l": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].l, + "r": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].r, + "t": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].t, + "b": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].b + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + + let value = ""; + if (data[r] != null && data[r][c] != null) { + value = data[r][c]; + } + + if(getObjType(value) == "object" && ("mc" in value)){ + let mc = $.extend(true, {}, value["mc"]); + if("rs" in value["mc"]){ + offsetMC[mc.r + "_" + mc.c] = [r + row_s, c + col_s]; + + value["mc"].r = r + row_s; + value["mc"].c = c + col_s; + + cfg["merge"][(r + row_s) + "_" + (c + col_s)] = value["mc"]; + } + else{ + value["mc"].r = offsetMC[mc.r + "_" + mc.c][0]; + value["mc"].c = offsetMC[mc.r + "_" + mc.c][1]; + } + } + d[r + row_s][c + col_s] = value; + } + } + + if(RowlChange){ + cfg = rowlenByRange(d, last["row"][0], last["row"][1], cfg); + cfg = rowlenByRange(d, row_s, row_e, cfg); + } + + //条件格式 + let cdformat = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]); + if(cdformat != null && cdformat.length > 0){ + for(let i = 0; i < cdformat.length; i++){ + let cdformat_cellrange = cdformat[i].cellrange; + let emptyRange = []; + for(let j = 0; j < cdformat_cellrange.length; j++){ + let range = conditionformat.CFSplitRange(cdformat_cellrange[j], {"row": last["row"], "column": last["column"]}, {"row": [row_s, row_e], "column": [col_s, col_e]}, "allPart"); + emptyRange = emptyRange.concat(range); + } + cdformat[i].cellrange = emptyRange; + } + } + + let rf; + if(Store.luckysheet_select_save[0].row_focus == Store.luckysheet_select_save[0].row[0]){ + rf = row_s; + } + else{ + rf = row_e; + } + + let cf; + if(Store.luckysheet_select_save[0].column_focus == Store.luckysheet_select_save[0].column[0]){ + cf = col_s; + } + else{ + cf = col_e; + } + + let range = []; + range.push({ "row": last["row"], "column": last["column"] }); + range.push({ "row": [row_s, row_e], "column": [col_s, col_e] }); + + last["row"] = [row_s, row_e]; + last["column"] = [col_s, col_e]; + last["row_focus"] = rf; + last["column_focus"] = cf; + + jfrefreshgrid(d, range, cfg, cdformat, RowlChange); + + selectHightlightShow(); + + $("#luckysheet-sheettable").css("cursor", "default"); + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + } + + //选区下拉 + if (Store.luckysheet_cell_selected_extend) { + Store.luckysheet_cell_selected_extend = false; + $("#luckysheet-cell-selected-extend").hide(); + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + + let x = mouse[0] + scrollLeft - 5; + let y = mouse[1] + scrollTop - 5; + + let winH = $(window).height() + scrollTop - Store.sheetBarHeight - Store.statisticBarHeight, + winW = $(window).width() + scrollLeft; + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let row_index_original = Store.luckysheet_cell_selected_extend_index[0], + col_index_original = Store.luckysheet_cell_selected_extend_index[1]; + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let row_s = last["row"][0], row_e = last["row"][1]; + let col_s = last["column"][0], col_e = last["column"][1]; + + if (row_s < 0 || y < 0) { + row_s = 0; + row_e = last["row"][1] - last["row"][0]; + } + + if (col_s < 0 || x < 0) { + col_s = 0; + col_e = last["column"][1] - last["column"][0]; + } + + if (row_e >= Store.visibledatarow[Store.visibledatarow.length - 1] || y > winH) { + row_s = Store.visibledatarow.length - 1 - last["row"][1] + last["row"][0]; + row_e = Store.visibledatarow.length - 1; + } + + if (col_e >= Store.visibledatacolumn[Store.visibledatacolumn.length - 1] || x > winW) { + col_s = Store.visibledatacolumn.length - 1 - last["column"][1] + last["column"][0]; + col_e = Store.visibledatacolumn.length - 1; + } + + //复制范围 + luckysheetDropCell.copyRange = {"row": $.extend(true, [], last["row"]), "column": $.extend(true, [], last["column"])}; + //applyType + let typeItemHide = luckysheetDropCell.typeItemHide(); + + if(!typeItemHide[0] && !typeItemHide[1] && !typeItemHide[2] && !typeItemHide[3] && !typeItemHide[4] && !typeItemHide[5] && !typeItemHide[6]){ + luckysheetDropCell.applyType = "0"; + } + else{ + luckysheetDropCell.applyType = "1"; + } + + if (Math.abs(row_index_original - row_index) > Math.abs(col_index_original - col_index)) { + if (!(row_index >= row_s && row_index <= row_e)) { + if (Store.luckysheet_select_save[0].top_move >= row_pre) {//当往上拖拽时 + luckysheetDropCell.applyRange = {"row": [row_index, last["row"][0] - 1], "column": last["column"]}; + luckysheetDropCell.direction = "up"; + + row_s -= last["row"][0] - row_index; + + //是否有数据透视表范围 + if(pivotTable.isPivotRange(row_s, col_e)){ + tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); + return; + } + } + else {//当往下拖拽时 + luckysheetDropCell.applyRange = {"row": [last["row"][1] + 1, row_index], "column": last["column"]}; + luckysheetDropCell.direction = "down"; + + row_e += row_index - last["row"][1]; + + //是否有数据透视表范围 + if(pivotTable.isPivotRange(row_e, col_e)){ + tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); + return; + } + } + } + else{ + return; + } + } + else { + if (!(col_index >= col_s && col_index <= col_e)) { + if (Store.luckysheet_select_save[0].left_move >= col_pre) {//当往左拖拽时 + luckysheetDropCell.applyRange = {"row": last["row"], "column": [col_index, last["column"][0] - 1]}; + luckysheetDropCell.direction = "left"; + + col_s -= last["column"][0] - col_index; + + //是否有数据透视表范围 + if(pivotTable.isPivotRange(row_e, col_s)){ + tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); + return; + } + } + else {//当往右拖拽时 + luckysheetDropCell.applyRange = {"row": last["row"], "column": [last["column"][1] + 1, col_index]}; + luckysheetDropCell.direction = "right"; + + col_e += col_index - last["column"][1]; + + //是否有数据透视表范围 + if(pivotTable.isPivotRange(row_e, col_e)){ + tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); + return; + } + } + } + else{ + return; + } + } + + if(Store.config["merge"] != null){ + let hasMc = false; + + for(let r = last["row"][0]; r <= last["row"][1]; r++){ + for(let c = last["column"][0]; c <= last["column"][1]; c++){ + let cell = Store.flowdata[r][c]; + + if(cell != null && cell.mc != null){ + hasMc = true; + break; + } + } + } + + if(hasMc){ + if(isEditMode()){ + alert("无法对合并单元格执行此操作"); + } + else{ + tooltip.info("无法对合并单元格执行此操作", ""); + } + + return; + } + + for(let r = row_s; r <= row_e; r++){ + for(let c = col_s; c <= col_e; c++){ + let cell = Store.flowdata[r][c]; + + if(cell != null && cell.mc != null){ + hasMc = true; + break; + } + } + } + + if(hasMc){ + if(isEditMode()){ + alert("无法对合并单元格执行此操作"); + } + else{ + tooltip.info("无法对合并单元格执行此操作", ""); + } + + return; + } + } + + last["row"] = [row_s, row_e]; + last["column"] = [col_s, col_e]; + + luckysheetDropCell.update(); + luckysheetDropCell.createIcon(); + + $("#luckysheet-cell-selected-move").hide(); + + $("#luckysheet-sheettable").css("cursor", "default"); + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + } + }); + + //禁止浏览器 右键默认菜单 + $(".luckysheet-grid-container, #luckysheet-rightclick-menu").on("contextmenu", function (e) { + e.preventDefault(); + }); + + //禁止前台编辑(只可 框选单元格、滚动查看表格) + if(!Store.allowEdit){ + return; + } + + //选区拖动替换 + $("#luckysheet-cell-main div.luckysheet-cs-draghandle").mousedown(function (event) { + if(isEditMode()){//此模式下禁用选区拖动 + return; + } + + $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle") + .css("cursor","move") + .end() + .find(".luckysheet-cs-draghandle") + .css("cursor","move"); + $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","move"); + + Store.luckysheet_cell_selected_move = true; + Store.luckysheet_scroll_status = true; + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let row_location = rowLocation(y), + row_pre = row_location[0], + row = row_location[1], + row_index = row_location[2]; + let col_location = colLocation(x), + col_pre = col_location[0], + col = col_location[1], + col_index = col_location[2]; + + Store.luckysheet_cell_selected_move_index = [row_index, col_index]; + + $("#luckysheet-cell-selected-move").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "display": "block" + }); + + event.stopPropagation(); + }); + + //选区下拉 + $("#luckysheet-cell-main div.luckysheet-cs-fillhandle").mousedown(function (event) { + if(isEditMode()){//此模式下禁用选区下拉 + return; + } + + $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle") + .css("cursor","crosshair") + .end() + .find(".luckysheet-cs-draghandle") + .css("cursor","crosshair"); + $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","crosshair"); + + Store.luckysheet_cell_selected_extend_time = setTimeout(function () { + Store.luckysheet_cell_selected_extend = true; + Store.luckysheet_scroll_status = true; + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft() - 5; + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop() - 5; + + let row_location = rowLocation(y), + row_pre = row_location[0], + row = row_location[1], + row_index = row_location[2]; + let col_location = colLocation(x), + col_pre = col_location[0], + col = col_location[1], + col_index = col_location[2]; + + Store.luckysheet_cell_selected_extend_index = [row_index, col_index]; + + $("#luckysheet-cell-selected-extend").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "display": "block" + }); + }, 100); + + event.stopPropagation(); + }).click(function () { + clearTimeout(Store.luckysheet_cell_selected_extend_time); + event.stopPropagation(); + }).dblclick(function () { + let last = Store.luckysheet_select_save[0]; + + let r0 = last.row[0], + r1 = last.row[1], + c0 = last.column[0], + c1 = last.column[1]; + + if(pivotTable.isPivotRange(r0, c0)){ + return; + } + + let dropCellState = false; + let step = 0; + + for(let r = r1 + 1; r < Store.flowdata.length; r++){ + if(c0 - 1 >= 0 && c1 + 1 < Store.flowdata[0].length){ + let cell1 = Store.flowdata[r][c0 - 1]; + let cell2 = Store.flowdata[r][c1 + 1]; + + if(r == r1 + 1){ + if((cell1 == null || isRealNull(cell1.v)) && (cell2 == null || isRealNull(cell2.v))){ + dropCellState = false; + break; + } + else{ + dropCellState = true; + step++; + } + } + else{ + if((cell1 == null || isRealNull(cell1.v)) && (cell2 == null || isRealNull(cell2.v))){ + break; + } + + step++; + } + } + else if(c0 - 1 >= 0){ + let cell = Store.flowdata[r][c0 - 1]; + + if(r == r1 + 1){ + if(cell == null || isRealNull(cell.v)){ + dropCellState = false; + break; + } + else{ + dropCellState = true; + step++; + } + } + else{ + if(cell == null || isRealNull(cell.v)){ + break; + } + + step++; + } + } + else if(c1 + 1 < Store.flowdata[0].length){ + let cell = Store.flowdata[r][c1 + 1]; + + if(r == r1 + 1){ + if(cell == null || isRealNull(cell.v)){ + dropCellState = false; + break; + } + else{ + dropCellState = true; + step++; + } + } + else{ + if(cell == null || isRealNull(cell.v)){ + break; + } + + step++; + } + } + } + + if(!dropCellState || step == 0){ + event.stopPropagation(); + return; + } + + //复制范围 + luckysheetDropCell.copyRange = { "row": [r0, r1], "column": [c0, c1] }; + + //applyType + let typeItemHide = luckysheetDropCell.typeItemHide(); + + if(!typeItemHide[0] && !typeItemHide[1] && !typeItemHide[2] && !typeItemHide[3] && !typeItemHide[4] && !typeItemHide[5] && !typeItemHide[6]){ + luckysheetDropCell.applyType = "0"; + } + else{ + luckysheetDropCell.applyType = "1"; + } + + luckysheetDropCell.applyRange = { "row": [r1 + 1, r1 + step], "column": [c0, c1] }; + luckysheetDropCell.direction = "down"; + + Store.luckysheet_select_save = [{ "row": [r0, r1 + step], "column": [c0, c1] }]; + + luckysheetDropCell.update(); + luckysheetDropCell.createIcon(); + + $("#luckysheet-cell-selected-move").hide(); + + $("#luckysheet-sheettable").css("cursor", "default"); + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + + event.stopPropagation(); + }); + + // + $("#luckysheet-bottom-add-row, #luckysheet-bottom-add-row-input, #luckysheet-bottom-return-top").on("mousedown dblclick mouseup",function(e){ + e.stopPropagation(); + }); + + //底部添加行按钮 + $("#luckysheet-bottom-add-row").on("click", function(e) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), value = $("#luckysheet-bottom-add-row-input").val(); + + if(value == ""){ + value = 100; + } + + if (isNaN(parseInt(value))) { + if(isEditMode()){ + alert("请输入数字"); + } + else{ + tooltip.info("增加错误", "请输入数字"); + } + return; + } + + value = parseInt(value); + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误", "增加范围限制在1-100"); + } + return; + } + + luckysheetextendtable("row", Store.flowdata.length - 1, value); + }); + + $("#luckysheet-bottom-return-top").on("click", function(e) { + $("#luckysheet-scrollbar-y").scrollTop(0); + }); + + //单元格编辑输入 + let luckysheet_shiftkeydown = false; + + $("#luckysheet-input-box").click(function () { + formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); + }).add("#" + Store.container).on("keydown", function (event) { + if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("formulaInputFocus")) { + return; + } + + let ctrlKey = event.ctrlKey; + let altKey = event.altKey; + let shiftKey = event.shiftKey; + let kcode = event.keyCode; + + if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("sp-input") || (parseInt($("#luckysheet-input-box").css("top")) > 0 && $(event.target).closest(".luckysheet-input-box").length > 0 && kcode != keycode.ENTER && kcode != keycode.TAB && kcode != keycode.UP && kcode != keycode.DOWN && kcode != keycode.LEFT && kcode != keycode.RIGHT)) { + let anchor = $(window.getSelection().anchorNode); + + if(anchor.parent().is("#luckysheet-helpbox-cell") || anchor.is("#luckysheet-helpbox-cell")){ + if(kcode == keycode.ENTER){ + let helpboxValue = $("#luckysheet-helpbox-cell").text(); + + if(formula.iscelldata(helpboxValue)){ + let cellrange = formula.getcellrange(helpboxValue); + + Store.luckysheet_select_save = [{ "row": cellrange["row"], "column": cellrange["column"], "row_focus": cellrange["row"][0], "column_focus": cellrange["column"][0] }]; + selectHightlightShow(); + + $("#luckysheet-helpbox-cell").blur(); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), + winW = $("#luckysheet-cell-main").width(); + + let row = Store.visibledatarow[cellrange["row"][1]], + row_pre = cellrange["row"][0] - 1 == -1 ? 0 : Store.visibledatarow[cellrange["row"][0] - 1]; + let col = Store.visibledatacolumn[cellrange["column"][1]], + col_pre = cellrange["column"][0] - 1 == -1 ? 0 : Store.visibledatacolumn[cellrange["column"][0] - 1]; + + if (col - scrollLeft - winW + 20 > 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); + } + else if (col_pre - scrollLeft - 20 < 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); + } + + if (row - scrollTop - winH + 20 > 0) { + $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); + } + else if (row_pre - scrollTop - 20 < 0) { + $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); + } + } + } + } + + return; + } + + let $inputbox = $("#luckysheet-input-box"); + + if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) { + if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) { + formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); + } + else { + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + Store.luckysheet_select_save = [{ + "row": [Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[0]], + "column": [Store.luckysheetCellUpdate[1], Store.luckysheetCellUpdate[1]], + "row_focus": Store.luckysheetCellUpdate[0], + "column_focus": Store.luckysheetCellUpdate[1] + }]; + luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); + } + + //若有参数弹出框,隐藏 + if($("#luckysheet-search-formula-parm").is(":visible")){ + $("#luckysheet-search-formula-parm").hide(); + } + //若有参数选取范围弹出框,隐藏 + if($("#luckysheet-search-formula-parm-select").is(":visible")){ + $("#luckysheet-search-formula-parm-select").hide(); + } + event.preventDefault(); + } + else if (kcode == keycode.TAB) { + if (parseInt($inputbox.css("top")) > 0) { + return; + } + + luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); + event.preventDefault(); + } + else if(kcode == keycode.F2){ + if (parseInt($inputbox.css("top")) > 0) { + return; + } + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"], col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); + event.preventDefault(); + } + else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { + formula.setfreezonFuc(event); + event.preventDefault(); + } + else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) { + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + event.preventDefault(); + } + else if (kcode == keycode.ENTER) { + if($(event.target).hasClass("formulaInputFocus") || $("#luckysheet-conditionformat-dialog").is(":visible")){ + return; + } + else if (String.fromCharCode(kcode) != null && $("#luckysheet-cell-selected").is(":visible")) { + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"], col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + row_index = margeset.row[2]; + col = margeset.column[1]; + col_pre = margeset.column[0]; + col_index = margeset.column[2]; + } + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); + event.preventDefault(); + } + } + else { + if (ctrlKey || event.metaKey) { + if (shiftKey) { + if (!luckysheet_shiftkeydown) { + Store.luckysheet_shiftpositon = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); + Store.luckysheet_shiftkeydown = true; + } + + //Ctrl + shift + 方向键 调整选区 + if (kcode == keycode.UP) { + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightRange2("up", "rangeOfSelect"); + } + else if (kcode == keycode.DOWN) { + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightRange2("down", "rangeOfSelect"); + } + else if (kcode == keycode.LEFT) { + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightRange2("left", "rangeOfSelect"); + } + else if (kcode == keycode.RIGHT) { + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightRange2("right", "rangeOfSelect"); + } + } + else if (kcode == 66) {//Ctrl + B 加粗 + $("#luckysheet-icon-bold").click(); + } + else if (kcode == 67) {//Ctrl + C 复制 + //复制时存在格式刷状态,取消格式刷 + if(menuButton.luckysheetPaintModelOn){ + menuButton.cancelPaintModel(); + } + + if(Store.luckysheet_select_save.length == 0){ + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + //多重选区 有条件格式时 提示 + let cdformat = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].luckysheet_conditionformat_save; + if(Store.luckysheet_select_save.length > 1 && cdformat != null && cdformat.length > 0){ + let hasCF = false; + + let cf_compute = conditionformat.getComputeMap(); + + label: + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + if(hasCF){ + break; + } + + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + if(conditionformat.checksCF(r, c, cf_compute) != null){ + hasCF = true; + continue label; + } + } + } + } + + if(hasCF){ + if(isEditMode()){ + alert("无法对多重选择区域执行此操作"); + } + else{ + tooltip.info("无法对多重选择区域执行此操作", ""); + } + return; + } + } + + //多重选区 行不一样且列不一样时 提示 + if(Store.luckysheet_select_save.length > 1){ + let isSameRow = true, + str_r = luckysheet_select_save[0].row[0], + end_r = luckysheet_select_save[0].row[1]; + let isSameCol = true, + str_c = luckysheet_select_save[0].column[0], + end_c = luckysheet_select_save[0].column[1]; + + for(let s = 1; s < luckysheet_select_save.length; s++){ + if(luckysheet_select_save[s].row[0] != str_r || luckysheet_select_save[s].row[1] != end_r){ + isSameRow = false; + } + if(luckysheet_select_save[s].column[0] != str_c || luckysheet_select_save[s].column[1] != end_c){ + isSameCol = false; + } + } + + if((!isSameRow && !isSameCol) || selectIsOverlap()){ + if(isEditMode()){ + alert("无法对多重选择区域执行此操作"); + } + else{ + tooltip.info("无法对多重选择区域执行此操作", ""); + } + return; + } + } + + selection.copy(event); + + Store.luckysheet_paste_iscut = false; + luckysheetactiveCell(); + + event.stopPropagation(); + return; + } + else if (kcode == 70) {//Ctrl + F 查找 + searchReplace.createDialog(0); + searchReplace.init(); + + $("#luckysheet-search-replace #searchInput input").focus(); + } + else if (kcode == 72) {//Ctrl + H 替换 + searchReplace.createDialog(1); + searchReplace.init(); + + $("#luckysheet-search-replace #searchInput input").focus(); + } + else if (kcode == 73) {//Ctrl + I 斜体 + $("#luckysheet-icon-italic").click(); + } + else if (kcode == 86) {//Ctrl + V 粘贴 + if(isEditMode()){//此模式下禁用粘贴 + return; + } + + if($(event.target).hasClass("formulaInputFocus")){ + return; + } + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("无法在此处粘贴此内容,请选择粘贴区域的一个单元格,然后再次尝试粘贴"); + } + else{ + tooltip.info("无法在此处粘贴此内容,请选择粘贴区域的一个单元格,然后再次尝试粘贴", ""); + } + return; + } + + selection.isPasteAction = true; + luckysheetactiveCell(); + + event.stopPropagation(); + return; + } + else if (kcode == 88) {//Ctrl + X 剪切 + //复制时存在格式刷状态,取消格式刷 + if(menuButton.luckysheetPaintModelOn){ + menuButton.cancelPaintModel(); + } + + if(Store.luckysheet_select_save.length == 0){ + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(luckysheetConfigsetting.editMode){ + alert("无法对合并单元格执行此操作"); + } + else{ + tooltip.info("无法对合并单元格执行此操作", ""); + } + return; + } + } + + //多重选区时 提示 + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + selection.copy(event); + + Store.luckysheet_paste_iscut = true; + luckysheetactiveCell(); + + event.stopPropagation(); + return; + } + else if (kcode == 90) {//Ctrl + Z 撤销 + controlHistory.redo(event); + luckysheetactiveCell(); + event.stopPropagation(); + return; + } + else if (kcode == 89) {//Ctrl + Y 重做 + controlHistory.undo(event); + luckysheetactiveCell(); + event.stopPropagation(); + return; + } + else if (kcode == keycode.UP) {//Ctrl + up 调整单元格 + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell2("up", "rangeOfSelect"); + } + else if (kcode == keycode.DOWN) {//Ctrl + down 调整单元格 + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell2("down", "rangeOfSelect"); + } + else if (kcode == keycode.LEFT) {//Ctrl + top 调整单元格 + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell2("left", "rangeOfSelect"); + } + else if (kcode == keycode.RIGHT) {//Ctrl + right 调整单元格 + if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell2("right", "rangeOfSelect"); + } + else if (String.fromCharCode(kcode).toLocaleUpperCase() == "A") {//Ctrl + A 全选 + $("#luckysheet-left-top").trigger("mousedown"); + $(document).trigger("mouseup"); + } + + event.preventDefault(); + return; + } + else if (shiftKey && (kcode == keycode.UP || kcode == keycode.DOWN || kcode == keycode.LEFT || kcode == keycode.RIGHT || (altKey && (kcode == 53 || kcode == 101)))) { + if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus")) { + return; + } + + if (!luckysheet_shiftkeydown) { + Store.luckysheet_shiftpositon = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); + Store.luckysheet_shiftkeydown = true; + } + + //shift + 方向键 调整选区 + if (kcode == keycode.UP) { + if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ + return; + } + + luckysheetMoveHighlightRange("down", -1, "rangeOfSelect"); + } + else if (kcode == keycode.DOWN) { + if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ + return; + } + + luckysheetMoveHighlightRange("down", 1, "rangeOfSelect"); + } + else if (kcode == keycode.LEFT) { + if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ + return; + } + + luckysheetMoveHighlightRange("right", -1, "rangeOfSelect"); + } + else if (kcode == keycode.RIGHT) { + if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ + return; + } + + luckysheetMoveHighlightRange("right", 1, "rangeOfSelect"); + } + else if (altKey && (kcode == 53 || kcode == 101)) { + //Alt + Shift + 5(删除线) + $("#luckysheet-icon-strikethrough").click(); + } + + event.preventDefault(); + } + else if (kcode == keycode.ESC) { + if(menuButton.luckysheetPaintModelOn){ + menuButton.cancelPaintModel(); + } + else{ + cleargridelement(event); + event.preventDefault(); + } + + selectHightlightShow(); + } + else if (kcode == keycode.DELETE) { + $("#luckysheet-delete-text").click(); + + event.preventDefault(); + } + else if (kcode == keycode.UP) { + if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); + event.preventDefault(); + } + else if (kcode == keycode.DOWN) { + if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); + event.preventDefault(); + } + else if (kcode == keycode.LEFT) { + if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); + event.preventDefault(); + } + else if (kcode == keycode.RIGHT) { + if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { + return; + } + + luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); + event.preventDefault(); + } + else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || kcode == 0 || (event.ctrlKey && kcode == 86)) { + if (String.fromCharCode(kcode) != null && $("#luckysheet-cell-selected").is(":visible") && (kcode != keycode.CAPSLOCK && kcode != keycode.WIN && kcode != 18)) { + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"], col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + row_index = margeset.row[2]; + col = margeset.column[1]; + col_pre = margeset.column[0]; + col_index = margeset.column[2]; + } + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata, true); + if(kcode == 8){ + $("#luckysheet-rich-text-editor").html("
"); + } + formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode); + } + } + } + + luckysheetactiveCell(); + + event.stopPropagation(); + }); + + //右键菜单 复制按钮 + $("#luckysheet-copy-btn, #luckysheet-cols-copy-btn, #luckysheet-paste-btn-title").click(function (event) { + $(this).parent().hide(); + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + //多重选区 有条件格式时 提示 + let cdformat = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].luckysheet_conditionformat_save; + if(Store.luckysheet_select_save.length > 1 && cdformat != null && cdformat.length > 0){ + let hasCF = false; + + let cf_compute = conditionformat.getComputeMap(); + + label: + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + if(hasCF){ + break; + } + + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + if(conditionformat.checksCF(r, c, cf_compute) != null){ + hasCF = true; + continue label; + } + } + } + } + + if(hasCF){ + if(isEditMode()){ + alert("无法对多重选择区域执行此操作"); + } + else{ + tooltip.info("无法对多重选择区域执行此操作", ""); + } + return; + } + } + + //多重选区 行不一样且列不一样时 提示 + if(Store.luckysheet_select_save.length > 1){ + let isSameRow = true, + str_r = Store.luckysheet_select_save[0].row[0], + end_r = Store.luckysheet_select_save[0].row[1]; + let isSameCol = true, + str_c = Store.luckysheet_select_save[0].column[0], + end_c = Store.luckysheet_select_save[0].column[1]; + + for(let s = 1; s < Store.luckysheet_select_save.length; s++){ + if(Store.luckysheet_select_save[s].row[0] != str_r || Store.luckysheet_select_save[s].row[1] != end_r){ + isSameRow = false; + } + if(Store.luckysheet_select_save[s].column[0] != str_c || Store.luckysheet_select_save[s].column[1] != end_c){ + isSameCol = false; + } + } + + if((!isSameRow && !isSameCol) || selectIsOverlap()){ + if(isEditMode()){ + alert("无法对多重选择区域执行此操作"); + } + else{ + tooltip.info("无法对多重选择区域执行此操作", ""); + } + return; + } + } + + selection.copy(event); + }); + + //右键菜单 粘贴按钮 + $("#luckysheet-copy-paste, #luckysheet-cols-paste-btn, #luckysheet-paste-btn-title").click(function (event) { + selection.paste(event, "btn"); + $(this).parent().hide(); + }); + + //菜单栏 图表按钮 + $("#luckysheet-chart-btn-title").click(function () { + $("#luckysheetdatavisual").click(); + let chartData = getdatabyselection() + let { render , container } = Store.createChart($('.luckysheet-cell-main')[0] , chartData) + + container.style.width = '400px' + container.style.height = '250px' + container.style.position = 'absolute' + container.style.background = '#fff' + container.style.left = Math.random()*100 + 'px' + container.style.top = Math.random()*100 + 'px' + render.style.width = '100%' + render.style.height = '100%' + container.style.zIndex = Store.zIndex + Store.zIndex++ + let chartSetting = document.getElementsByClassName('chartSetting')[0] + chartSetting.style.display = 'block' + + $('.luckysheet-cell-main').click(function(e){ + console.dir(e) + if(e.target.parentNode.parentNode && Array.from(e.target.parentNode.parentNode.classList).includes('jfgrid-modal-dialog-content')){ + Store.highlightChart(e.target.parentNode.parentNode.id) + container.style.zIndex = ++Store.zIndex + chartSetting.style.display = 'block' + }else{ + chartSetting.style.display = 'none' + } + }) + }); + + //菜单栏 数据透视表 + $("#luckysheet-pivot-btn-title").click(function (e) { + pivotTable.createPivotTable(e); + }); + + //菜单栏 截图按钮 + $("#luckysheet-chart-btn-screenshot").click(function () { + const _locale = locale(); + const locale_screenshot = _locale.screenshot; + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert(locale_screenshot.screenshotTipNoSelection); + } + else{ + tooltip.info(locale_screenshot.screenshotTipTitle, locale_screenshot.screenshotTipNoSelection); + } + return; + } + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert(locale_screenshot.screenshotTipHasMulti); + } + else{ + tooltip.info(locale_screenshot.screenshotTipTitle, locale_screenshot.screenshotTipHasMulti); + } + + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert(locale_screenshot.screenshotTipHasMerge); + } + else{ + tooltip.info(locale_screenshot.screenshotTipTitle, locale_screenshot.screenshotTipHasMerge); + } + return; + } + } + + let st_r = Store.luckysheet_select_save[0].row[0], + ed_r = Store.luckysheet_select_save[0].row[1]; + let st_c = Store.luckysheet_select_save[0].column[0], + ed_c = Store.luckysheet_select_save[0].column[1]; + + let shotData = datagridgrowth([], ed_r + 1, ed_c + 1); + + for(let r = st_r; r <= ed_r; r++){ + for(let c = st_c; c <= ed_c; c++){ + shotData[r][c] = Store.flowdata[r][c]; + } + } + + let scrollHeight, rh_height; + if(st_r - 1 < 0){ + scrollHeight = 0; + rh_height = Store.visibledatarow[ed_r]; + } + else{ + scrollHeight = Store.visibledatarow[st_r - 1]; + rh_height = Store.visibledatarow[ed_r] - Store.visibledatarow[st_r - 1]; + } + + let scrollWidth, ch_width; + if(st_c - 1 < 0){ + scrollWidth = 0; + ch_width = Store.visibledatacolumn[ed_c]; + } + else{ + scrollWidth = Store.visibledatacolumn[st_c - 1]; + ch_width = Store.visibledatacolumn[ed_c] - Store.visibledatacolumn[st_c - 1]; + } + + let newCanvas = $("").attr({ + width: Math.ceil(ch_width * devicePixelRatio), + height: Math.ceil(rh_height * devicePixelRatio) + }).css({ width: ch_width, height: rh_height }); + + let d = Store.flowdata; + Store.flowdata = shotData; + + luckysheetDrawMain(scrollWidth, scrollHeight, ch_width, rh_height, 1, 1, null, null, newCanvas); + + Store.flowdata = d; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + + let image = new Image(); + let url = newCanvas.get(0).toDataURL("image/png"); + image.src = url; + + if(ch_width > rh_height){ + image.style.width = "100%"; + } + else{ + image.style.height = "100%"; + } + + let maxHeight = $(window).height() - 200; + tooltip.screenshot(locale_screenshot.screenshotTipSuccess, '
', url); + $("#luckysheet-confirm-screenshot-save").append(image); + newCanvas.remove(); + }); + + //截图下载 + $(document).on("click", "a.download", function(){ + let dataURI = $("#luckysheet-confirm-screenshot-save img").attr("src"); + const _locale = locale(); + const locale_screenshot = _locale.screenshot; + let binStr = atob(dataURI.split(",")[1]), + len = binStr.length, + arr = new Uint8Array(len); + + for(let i = 0; i < len; i++){ + arr[i] = binStr.charCodeAt(i); + } + + let blob = new Blob([arr]); + + let element = document.createElement('a'); + element.setAttribute('href', URL.createObjectURL(blob)); + element.setAttribute('download', locale_screenshot.screenshotImageName+'.png'); + + element.style.display = 'none'; + document.body.appendChild(element); + + element.click(); + + let clickHandler; + element.addEventListener('click', clickHandler = function(){ + requestAnimationFrame(function(){ + URL.revokeObjectURL(element.href); + }); + + element.removeAttribute('href'); + element.removeEventListener('click', clickHandler); + }) + + document.body.removeChild(element); + }) + + //菜单栏 分列按钮 + $("#luckysheet-splitColumn-btn-title").click(function(){ + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + return; + } + + if(Store.luckysheet_select_save.length > 1){ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + return; + } + + if(Store.luckysheet_select_save[0].column[0] != Store.luckysheet_select_save[0].column[1]){ + tooltip.info("一次只能转换一列数据,选定区域可以有多行,但不能有多列,请在选定单列区域以后再试", ""); + return; + } + + splitColumn.createDialog(); + splitColumn.init(); + }); + + //冻结行列 + $("#luckysheet-freezen-btn-horizontal").click(function () { + if($.trim($(this).text())==locale().freezen.freezenCancel){ + if (luckysheetFreezen.freezenverticaldata != null) { + luckysheetFreezen.cancelFreezenVertical(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + if (luckysheetFreezen.freezenhorizontaldata != null) { + luckysheetFreezen.cancelFreezenHorizontal(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + luckysheetFreezen.scrollAdapt(); + } + else{ + if (luckysheetFreezen.freezenverticaldata != null) { + luckysheetFreezen.cancelFreezenVertical(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + if (luckysheetFreezen.freezenhorizontaldata == null) { + luckysheetFreezen.createFreezenHorizontal(); + luckysheetFreezen.createAssistCanvas(); + } + } + }); + + $("#luckysheet-freezen-btn-vertical").click(function () { + if (luckysheetFreezen.freezenverticaldata != null) { + luckysheetFreezen.cancelFreezenVertical(); + luckysheetrefreshgrid(); + } + else { + luckysheetFreezen.createFreezenVertical(); + } + luckysheetFreezen.createAssistCanvas(); + }); + + //右键菜单 菜单项hover + let submenuhide = null, rightclickmenu = null; + $(".luckysheet-cols-menu .luckysheet-cols-submenu").hover( + function () { + let $t = $(this), attrid = $t.attr("id"), $attr = $("#" + attrid + "_sub"), $con = $t.parent(); + let winW = $(window).width(), winH = $(window).height(); + let menuW = $con.width(), attrH = $attr.height() + 25, attrW = $attr.width() + 5; + let offset = $t.offset(); + let top = offset.top, left = offset.left + menuW; + + if (left + attrW > winW) { + left = offset.left - attrW; + } + + if (top + attrH > winH) { + top = winH - attrH; + } + + $attr.css({ "top": top, "left": left }).show(); + rightclickmenu = $t; + }, + function () { + let $t = $(this), attrid = $t.attr("id"), $attr = $("#" + attrid + "_sub"); + submenuhide = setTimeout(function () { $attr.hide(); }, 200); + } + ); + + $(".luckysheet-rightgclick-menu-sub").hover( + function () { + rightclickmenu.addClass("luckysheet-cols-menuitem-hover"); + clearTimeout(submenuhide); + }, + function () { + rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"); + $(this).hide(); + } + ); + + $("#luckysheet-rightclick-menu input").on("keydown", function (e) { + e.stopPropagation(); + }); + + $("#luckysheet-modal-dialog-mask").on("click dbclick mousedown mousemove mouseup", function (e) { + e.stopPropagation(); + e.preventDefault(); + }); + + let copychange = function () { + if (document.hidden || document.webkitHidden || document.msHidden) { + Store.iscopyself = false; + } + } + + $(document).on("visibilitychange webkitvisibilitychange msvisibilitychange", copychange).mouseleave(function () { + Store.iscopyself = false; + }).mousedown(function (event) { + //有批注在编辑时 + luckysheetPostil.removeActivePs(); + + if (!$(event.target).hasClass("luckysheet-mousedown-cancel") && $(event.target).filter("[class*='sp-palette']").length == 0 && $(event.target).filter("[class*='sp-thumb']").length == 0 && $(event.target).filter("[class*='sp-']").length == 0) { + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-cols-h-hover").hide(); + $("#luckysheet-cols-menu-btn").hide(); + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(); + $("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide(); + //$("body > luckysheet-menuButton").hide(); + Store.luckysheet_cols_menu_status = false; + } + + //点击功能栏时 如果是单元格编辑模式 则退出编辑模式 + if($(event.target).closest("#luckysheet-wa-editor").length > 0 && parseInt($("#luckysheet-input-box").css("top")) > 0){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + } + }); + + //单元格编辑 keydown (公式 上下左右键移动) + $("#" + Store.container).add("#luckysheet-input-box").keydown(function (event) { + if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("formulaInputFocus")) { + return; + } + + let ctrlKey = event.ctrlKey; + let altKey = event.altKey; + let shiftKey = event.shiftKey; + let kcode = event.keyCode; + + let $inputbox = $("#luckysheet-input-box"); + if (kcode == keycode.ESC && parseInt($("#luckysheet-input-box").css("top")) > 0) { + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + event.preventDefault(); + } + else if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) { + if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) { + formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); + event.preventDefault(); + } + } + else if(kcode == keycode.TAB && parseInt($inputbox.css("top")) > 0){ + if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) { + formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); + } + else{ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); + } + + event.preventDefault(); + } + else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { + formula.setfreezonFuc(event); + event.preventDefault(); + } + else if (kcode == keycode.UP && parseInt($inputbox.css("top")) > 0) { + formulaMoveEvent("up", ctrlKey, shiftKey); + } + else if (kcode == keycode.DOWN && parseInt($inputbox.css("top")) > 0) { + formulaMoveEvent("down", ctrlKey, shiftKey); + } + else if (kcode == keycode.LEFT && parseInt($inputbox.css("top")) > 0) { + formulaMoveEvent("left", ctrlKey, shiftKey); + } + else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) { + formulaMoveEvent("right", ctrlKey, shiftKey); + } + else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) { + formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode); + } + }).keyup(function (e) { + let kcode = e.keyCode; + + if (!e.shiftKey && kcode == 16) { + Store.luckysheet_shiftkeydown = false; + Store.luckysheet_shiftpositon = null; + } + + //输入框中文输入后 shift 和 空格 处理 + if(parseInt($("#luckysheet-input-box").css("top")) > 0 && (kcode == 13 || kcode == 16 || kcode == 32)){ + formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode); + } + + e.preventDefault(); + }); + + function formulaMoveEvent(dir, ctrlKey, shiftKey){ + if ($("#luckysheet-formula-search-c").is(":visible")) { + let $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next(); + if ($up.length == 0) { + $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first(); + } + + $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); + $up.addClass("luckysheet-formula-search-item-active"); + + event.preventDefault(); + } + else{ + if($("#luckysheet-formula-functionrange-select").is(":visible")){ + if(ctrlKey && shiftKey){ + luckysheetMoveHighlightRange2(dir, "rangeOfFormula"); + } + else if(ctrlKey){ + luckysheetMoveHighlightCell2(dir, "rangeOfFormula"); + } + else if(shiftKey){ + let dir_n = dir, step = 1; + if(dir == 'up'){ + dir_n = 'down'; + step = -1; + } + if(dir == 'left'){ + dir_n = 'right'; + step = -1; + } + + luckysheetMoveHighlightRange(dir_n, step, "rangeOfFormula"); + } + else{ + let dir_n = dir, step = 1; + if(dir == 'up'){ + dir_n = 'down'; + step = -1; + } + if(dir == 'left'){ + dir_n = 'right'; + step = -1; + } + + luckysheetMoveHighlightCell(dir_n, step, "rangeOfFormula"); + } + } + else if(formula.israngeseleciton()){ + let anchor = $(window.getSelection().anchorNode); + + if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ + let vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); + let range = formula.getcellrange(vText); + + if(range == null){ + range = formula.getcellrange($("#luckysheet-input-box-index").text()); + } + + let r1 = range["row"][0], r2 = range["row"][1]; + let c1 = range["column"][0], c2 = range["column"][1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + formula.func_selectedrange = { + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [r1, r2], + "column": [c1, c2], + "row_focus": r1, + "column_focus": c1 + }; + + formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); + + formula.rangestart = true; + formula.rangedrag_column_start = false; + formula.rangedrag_row_start = false; + + if(ctrlKey && shiftKey){ + luckysheetMoveHighlightRange2(dir, "rangeOfFormula"); + } + else if(ctrlKey){ + luckysheetMoveHighlightCell2(dir, "rangeOfFormula"); + } + else if(shiftKey){ + let dir_n = dir, step = 1; + if(dir == 'up'){ + dir_n = 'down'; + step = -1; + } + if(dir == 'left'){ + dir_n = 'right'; + step = -1; + } + + luckysheetMoveHighlightRange(dir_n, step, "rangeOfFormula"); + } + else{ + let dir_n = dir, step = 1; + if(dir == 'up'){ + dir_n = 'down'; + step = -1; + } + if(dir == 'left'){ + dir_n = 'right'; + step = -1; + } + + luckysheetMoveHighlightCell(dir_n, step, "rangeOfFormula"); + } + } + } + else if(!ctrlKey && !shiftKey){ + let anchor = $(window.getSelection().anchorNode); + let anchorOffset = window.getSelection().anchorOffset; + + if(dir == 'up'){ + if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); + + event.preventDefault(); + } + } + else if(dir == 'down'){ + if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); + + event.preventDefault(); + } + } + else if(dir == 'left'){ + if(anchor.parent().is("span") && anchor.parent().prev().length == 0 && anchorOffset == 0){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.is("#luckysheet-rich-text-editor") && anchorOffset == 1){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchorOffset == 0){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); + + event.preventDefault(); + } + } + else if(dir == 'right'){ + if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); + + event.preventDefault(); + } + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); + + event.preventDefault(); + } + } + } + } + } + + //表格左上角点击 全选表格 + $("#luckysheet-left-top").mousedown(function (event) { + $("#luckysheet-wa-functionbox-confirm").click(); + Store.luckysheet_select_status = false; + + Store.luckysheet_select_save = [{ "row": [0, Store.flowdata.length - 1], "column": [0, Store.flowdata[0].length - 1], "row_focus": 0, "column_focus": 0 }]; + selectHightlightShow(); + + clearTimeout(Store.countfuncTimeout); + Store.countfuncTimeout = setTimeout(function () { countfunc() }, 500); + + event.stopPropagation(); + }); + + //表格行标题 mouse事件 + $("#luckysheet-rows-h").mousedown(function (event) { + //有批注在编辑时 + luckysheetPostil.removeActivePs(); + + let mouse = mouseposition(event.pageX, event.pageY); + let y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_index = Store.visibledatacolumn.length - 1, + col = Store.visibledatacolumn[col_index], col_pre = 0; + + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + + //mousedown是右键 + if (event.which == "3") { + let isright = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let obj_s = Store.luckysheet_select_save[s]; + + if(obj_s["row"] != null && (row_index >= obj_s["row"][0] && row_index <= obj_s["row"][1]) && (obj_s["column"][0] == 0 && obj_s["column"][1] == Store.flowdata[0].length - 1)){ + isright = true; + break; + } + } + + if(isright){ + return; + } + } + + let top = row_pre, height = row - row_pre - 1; + let rowseleted = [row_index, row_index]; + + Store.luckysheet_scroll_status = true; + + //公式相关 + let $input = $("#luckysheet-input-box"); + if (parseInt($input.css("top")) > 0) { + if (formula.rangestart || formula.rangedrag_column_start || formula.rangedrag_row_start || formula.israngeseleciton() || $("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")) { + //公式选区 + let changeparam = menuButton.mergeMoveMain([0, col_index], rowseleted, {"row_focus": row_index, "column_focus": 0}, top, height, col_pre, col); + if(changeparam != null){ + //columnseleted = changeparam[0]; + rowseleted = changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + //left = changeparam[4]; + //width = changeparam[5]; + } + + if(event.shiftKey){ + let last = formula.func_selectedrange; + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let changeparam = menuButton.mergeMoveMain([0, col_index], rowseleted, {"row_focus": row_index, "column_focus": 0}, top, height, col_pre, col); + if(changeparam != null){ + // columnseleted = changeparam[0]; + rowseleted = changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + // left = changeparam[4]; + // width = changeparam[5]; + } + + last["row"] = rowseleted; + + last["top_move"] = top; + last["height_move"] = height; + + formula.func_selectedrange = last; + } + else if(event.ctrlKey && $("#luckysheet-rich-text-editor").find("span").last().text() != ","){ + //按住ctrl 选择选区时 先处理上一个选区 + let vText = $("#luckysheet-rich-text-editor").text() + ","; + if(vText.length > 0 && vText.substr(0, 1) == "="){ + vText = formula.functionHTMLGenerate(vText); + + if (window.getSelection) { // all browsers, except IE before version 9 + let currSelection = window.getSelection(); + formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; + } + else { // Internet Explorer before version 9 + let textRange = document.selection.createRange(); + formula.functionRangeIndex = textRange; + } + + $("#luckysheet-rich-text-editor").html(vText); + + formula.canceFunctionrangeSelected(); + formula.createRangeHightlight(); + } + + formula.rangestart = false; + formula.rangedrag_column_start = false; + formula.rangedrag_row_start = false; + + $("#luckysheet-functionbox-cell").html(vText); + formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); + + //再进行 选区的选择 + formula.israngeseleciton(); + formula.func_selectedrange = { + "left": colLocationByIndex(0)[0], + "width": colLocationByIndex(0)[1] - colLocationByIndex(0)[0] - 1, + "top": top, + "height": height, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": [0, col_index], + "row_focus": row_index, + "column_focus": 0 + } + } + else{ + formula.func_selectedrange = { + "left": colLocationByIndex(0)[0], + "width": colLocationByIndex(0)[1] - colLocationByIndex(0)[0] - 1, + "top": top, + "height": height, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": [0, col_index], + "row_focus": row_index, + "column_focus": 0 + } + } + + if(formula.rangestart || formula.rangedrag_column_start || formula.rangedrag_row_start || formula.israngeseleciton()){ + formula.rangeSetValue({ "row": rowseleted, "column": [null, null] }); + } + else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){//if公式生成器 + let range = getRangetxt(Store.currentSheetIndex, { "row": rowseleted, "column": [0, col_index] }, Store.currentSheetIndex); + $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); + } + + formula.rangedrag_row_start = true; + formula.rangestart = false; + formula.rangedrag_column_start = false; + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": top, + "height": height + }).show(); + $("#luckysheet-formula-help-c").hide(); + + luckysheet_count_show(col_pre, top, col - col_pre - 1, height, rowseleted, [0, col_index]); + + setTimeout(function(){ + let currSelection = window.getSelection(); + let anchorOffset = currSelection.anchorNode; + + let $editor; + if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ + $editor = $("#luckysheet-rich-text-editor"); + formula.rangechangeindex = formula.data_parm_index; + } + else{ + $editor = $(anchorOffset).closest("div"); + } + + let $span = $editor.find("span[rangeindex='" + formula.rangechangeindex + "']"); + + formula.setCaretPosition($span.get(0), 0, $span.html().length); + }, 1); + + return; + } + else { + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + Store.luckysheet_rows_selected_status = true; + } + } + else { + Store.luckysheet_rows_selected_status = true; + } + + if (Store.luckysheet_rows_selected_status) { + if(event.shiftKey){ + //按住shift点击行索引选取范围 + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); //选区最后一个 + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + last["row"] = rowseleted; + + last["top_move"] = top; + last["height_move"] = height; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + } + else if(event.ctrlKey){ + Store.luckysheet_select_save.push({ + "left": colLocationByIndex(0)[0], + "width": colLocationByIndex(0)[1] - colLocationByIndex(0)[0] - 1, + "top": top, + "height": height, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": [0, col_index], + "row_focus": row_index, + "column_focus": 0 + }); + } + else{ + Store.luckysheet_select_save = []; + Store.luckysheet_select_save.push({ + "left": colLocationByIndex(0)[0], + "width": colLocationByIndex(0)[1] - colLocationByIndex(0)[0] - 1, + "top": top, + "height": height, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": [0, col_index], + "row_focus": row_index, + "column_focus": 0 + }); + } + + selectHightlightShow(); + + if(server.allowUpdate){ + //允许编辑后的后台更新时 + server.saveParam("mv", Store.currentSheetIndex, Store.luckysheet_select_save); + } + } + + $("#luckysheet-helpbox-cell").text(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1])); + + setTimeout(function () { + clearTimeout(Store.countfuncTimeout); + countfunc(); + }, 101); + }).mousemove(function (event) { + if (Store.luckysheet_rows_selected_status || Store.luckysheet_rows_change_size || Store.luckysheet_select_status) { + $("#luckysheet-rows-h-hover").hide(); + return; + } + + let mouse = mouseposition(event.pageX, event.pageY); + let y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + $("#luckysheet-rows-h-hover").css({ "top": row_pre, "height": row - row_pre - 1, "display": "block" }); + + if (y < row - 1 && y >= row - 5) { + $("#luckysheet-rows-change-size").css({ "top": row - 3, "opacity": 0 }); + } + else { + $("#luckysheet-rows-change-size").css("opacity", 0); + } + }).mouseleave(function (event) { + $("#luckysheet-rows-h-hover").hide(); + $("#luckysheet-rows-change-size").css("opacity", 0); + }).mouseup(function (event) { + if (event.which == 3) { + if(isEditMode()){ //非编辑模式下禁止右键功能框 + return; + } + + $("#luckysheet-cols-rows-shift").hide(); + Store.luckysheetRightHeadClickIs = "row"; + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(locale().rightclick.row); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(locale().rightclick.height); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(locale().rightclick.top); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(locale().rightclick.bottom); + + $("#luckysheet-cols-rows-add").show(); + $("#luckysheet-cols-rows-data").show(); + $("#luckysheet-cols-rows-shift").hide(); + $("#luckysheet-cols-rows-handleincell").hide(); + + showrightclickmenu($("#luckysheet-rightclick-menu"), $(this).offset().left + 46, event.pageY); + Store.luckysheet_cols_menu_status = true; + + //行高默认值 + let cfg = $.extend(true, {}, Store.config); + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + let first_rowlen = cfg["rowlen"][Store.luckysheet_select_save[0].row[0]] == null ? Store.defaultrowlen : cfg["rowlen"][Store.luckysheet_select_save[0].row[0]]; + let isSame = true; + + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let s = Store.luckysheet_select_save[i]; + let r1 = s.row[0], r2 = s.row[1]; + + for(let r = r1; r <= r2; r++){ + let rowlen = cfg["rowlen"][r] == null ? Store.defaultrowlen : cfg["rowlen"][r]; + + if(rowlen != first_rowlen){ + isSame = false; + break; + } + } + } + + if(isSame){ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_rowlen); + } + else{ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); + } + } + }); + + //表格列标题 mouse事件 + $("#luckysheet-cols-h-c").mousedown(function (event) { + //有批注在编辑时 + luckysheetPostil.removeActivePs(); + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $(this).scrollLeft(); + + let row_index = Store.visibledatarow.length - 1, + row = Store.visibledatarow[row_index], row_pre = 0; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + Store.orderbyindex = col_index;//排序全局函数 + + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + + //mousedown是右键 + if (event.which == "3") { + let isright = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let obj_s = Store.luckysheet_select_save[s]; + + if(obj_s["column"] != null && (col_index >= obj_s["column"][0] && col_index <= obj_s["column"][1]) && (obj_s["row"][0] == 0 && obj_s["row"][1] == Store.flowdata.length - 1)){ + isright = true; + break; + } + } + + if(isright){ + return; + } + } + + let left = col_pre, width = col - col_pre - 1; + let columnseleted = [col_index, col_index]; + + Store.luckysheet_scroll_status = true; + + //公式相关 + let $input = $("#luckysheet-input-box"); + if (parseInt($input.css("top")) > 0) { + if (formula.rangestart || formula.rangedrag_column_start || formula.rangedrag_row_start || formula.israngeseleciton() || $("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")) { + //公式选区 + let changeparam = menuButton.mergeMoveMain(columnseleted, [0, row_index], {"row_focus": 0, "column_focus": col_index}, row_pre, row, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + //rowseleted= changeparam[1]; + //top = changeparam[2]; + //height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + if(event.shiftKey){ + let last = formula.func_selectedrange; + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted , [0, row_index], {"row_focus": 0, "column_focus": col_index}, row_pre, row, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + //rowseleted= changeparam[1]; + //top = changeparam[2]; + //height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + + formula.func_selectedrange = last; + } + else if(event.ctrlKey && $("#luckysheet-rich-text-editor").find("span").last().text() != ","){ + //按住ctrl 选择选区时 先处理上一个选区 + let vText = $("#luckysheet-rich-text-editor").text() + ","; + if(vText.length > 0 && vText.substr(0, 1) == "="){ + vText = formula.functionHTMLGenerate(vText); + + if (window.getSelection) { // all browsers, except IE before version 9 + let currSelection = window.getSelection(); + formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; + } + else { // Internet Explorer before version 9 + let textRange = document.selection.createRange(); + formula.functionRangeIndex = textRange; + } + + $("#luckysheet-rich-text-editor").html(vText); + + formula.canceFunctionrangeSelected(); + formula.createRangeHightlight(); + } + + formula.rangestart = false; + formula.rangedrag_column_start = false; + formula.rangedrag_row_start = false; + + $("#luckysheet-functionbox-cell").html(vText); + formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); + + //再进行 选区的选择 + formula.israngeseleciton(); + formula.func_selectedrange = { + "left": left, + "width": width, + "top": rowLocationByIndex(0)[0], + "height": rowLocationByIndex(0)[1] - rowLocationByIndex(0)[0] - 1, + "left_move": left, + "width_move": width, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [0, row_index], + "column": columnseleted, + "row_focus": 0, + "column_focus": col_index + } + } + else{ + formula.func_selectedrange = { + "left": left, + "width": width, + "top": rowLocationByIndex(0)[0], + "height": rowLocationByIndex(0)[1] - rowLocationByIndex(0)[0] - 1, + "left_move": left, + "width_move": width, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [0, row_index], + "column": columnseleted, + "row_focus": 0, + "column_focus": col_index + } + } + + if(formula.rangestart || formula.rangedrag_column_start || formula.rangedrag_row_start || formula.israngeseleciton()){ + formula.rangeSetValue({ "row": [null, null], "column": columnseleted }); + } + else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){//if公式生成器 + let range = getRangetxt(Store.currentSheetIndex, { "row": [0, row_index], "column": columnseleted }, Store.currentSheetIndex); + $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); + } + + formula.rangedrag_column_start = true; + formula.rangestart = false; + formula.rangedrag_row_start = false; + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + $("#luckysheet-formula-help-c").hide(); + + luckysheet_count_show(left, row_pre, width, row - row_pre - 1, [0, row_index], columnseleted); + + return; + } + else { + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + Store.luckysheet_cols_selected_status = true; + } + } + else { + Store.luckysheet_cols_selected_status = true; + } + + if (Store.luckysheet_cols_selected_status) { + if(event.shiftKey){ + //按住shift点击列索引选取范围 + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); //选区最后一个 + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + } + else if(event.ctrlKey){ + //选区添加 + Store.luckysheet_select_save.push({ + "left": left, + "width": width, + "top": rowLocationByIndex(0)[0], + "height": rowLocationByIndex(0)[1] - rowLocationByIndex(0)[0] - 1, + "left_move": left, + "width_move": width, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [0, row_index], + "column": columnseleted, + "row_focus": 0, + "column_focus": col_index + }); + } + else{ + Store.luckysheet_select_save = []; + Store.luckysheet_select_save.push({ + "left": left, + "width": width, + "top": rowLocationByIndex(0)[0], + "height": rowLocationByIndex(0)[1] - rowLocationByIndex(0)[0] - 1, + "left_move": left, + "width_move": width, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [0, row_index], + "column": columnseleted, + "row_focus": 0, + "column_focus": col_index + }); + } + + selectHightlightShow(); + + if(server.allowUpdate){ + //允许编辑后的后台更新时 + server.saveParam("mv", Store.currentSheetIndex, Store.luckysheet_select_save); + } + } + + $("#luckysheet-helpbox-cell").text(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1])); + + setTimeout(function () { + clearTimeout(Store.countfuncTimeout); + countfunc(); + }, 101); + + if (Store.luckysheet_cols_menu_status) { + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-cols-h-hover").hide(); + $("#luckysheet-cols-menu-btn").hide(); + Store.luckysheet_cols_menu_status = false; + } + event.stopPropagation(); + }).mousemove(function (event) { + if (Store.luckysheet_cols_selected_status || Store.luckysheet_select_status) { + $("#luckysheet-cols-h-hover").hide(); + $("#luckysheet-cols-menu-btn").hide(); + return; + } + + if (Store.luckysheet_cols_menu_status || Store.luckysheet_cols_change_size) { + return; + } + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cols-h-c").scrollLeft(); + + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + $("#luckysheet-cols-h-hover").css({ "left": col_pre, "width": col - col_pre - 1, "display": "block" }); + $("#luckysheet-cols-menu-btn").css({ "left": col - 19, "display": "block" }); + + $("#luckysheet-cols-change-size").css({ "left": col - 5 }); + if (x < col && x >= col - 5) { + $("#luckysheet-cols-change-size").css({ "opacity": 0 }); + $("#luckysheet-cols-menu-btn").hide(); + } + else { + $("#luckysheet-change-size-line").hide(); + $("#luckysheet-cols-change-size").css("opacity", 0); + } + }).mouseleave(function (event) { + if (Store.luckysheet_cols_menu_status || Store.luckysheet_cols_change_size) { + return; + } + + $("#luckysheet-cols-h-hover").hide(); + $("#luckysheet-cols-menu-btn").hide(); + $("#luckysheet-cols-change-size").css("opacity", 0); + }).mouseup(function (event) { + if (event.which == 3) { + if(isEditMode()){ //非编辑模式下禁止右键功能框 + return; + } + + Store.luckysheetRightHeadClickIs = "column"; + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(locale().rightclick.column); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text(locale().rightclick.width); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(locale().rightclick.left); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(locale().rightclick.right); + + $("#luckysheet-cols-rows-add").show(); + $("#luckysheet-cols-rows-data").show(); + $("#luckysheet-cols-rows-shift").hide(); + $("#luckysheet-cols-rows-handleincell").hide(); + + showrightclickmenu($("#luckysheet-rightclick-menu"), event.pageX, $(this).offset().top + 18); + Store.luckysheet_cols_menu_status = true; + + //列宽默认值 + let cfg = $.extend(true, {}, Store.config); + if(cfg["columlen"] == null){ + cfg["columlen"] = {}; + } + + let first_collen = cfg["columlen"][Store.luckysheet_select_save[0].column[0]] == null ? Store.defaultcollen : cfg["columlen"][Store.luckysheet_select_save[0].column[0]]; + let isSame = true; + + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let s = Store.luckysheet_select_save[i]; + let c1 = s.column[0], c2 = s.column[1]; + + for(let c = c1; c <= c2; c++){ + let collen = cfg["columlen"][c] == null ? Store.defaultcollen : cfg["columlen"][c]; + + if(collen != first_collen){ + isSame = false; + break; + } + } + } + + if(isSame){ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_collen); + } + else{ + $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); + } + } + }); + + //表格列标题 改变列宽按钮 + $("#luckysheet-cols-change-size").mousedown(function (event) { + //有批注在编辑时 + luckysheetPostil.removeActivePs(); + + $("#luckysheet-input-box").hide(); + $("#luckysheet-cols-change-size").css({ "opacity": 1 }); + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(); + let x = mouse[0] + scrollLeft; + + let row_index = Store.visibledatarow.length - 1, + row = Store.visibledatarow[row_index], row_pre = 0; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + Store.luckysheet_cols_change_size = true; + Store.luckysheet_scroll_status = true; + $("#luckysheet-change-size-line").css({ + "height": winH + scrollTop, + "border-width": "0 1px 0 0", + "top": 0, + "left": col - 3, + "width": "1px", + "display": "block", + "cursor": "ew-resize" + }); + $("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor", "ew-resize"); + Store.luckysheet_cols_change_size_start = [col_pre, col_index]; + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-cols-h-hover").hide(); + $("#luckysheet-cols-menu-btn").hide(); + Store.luckysheet_cols_dbclick_times = 0; + event.stopPropagation(); + }).dblclick(function () { + luckysheetcolsdbclick(); + }) + + function luckysheetcolsdbclick() { + Store.luckysheet_cols_change_size = false; + $("#luckysheet-change-size-line").hide(); + $("#luckysheet-cols-change-size").css("opacity", 0); + $("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor", "default"); + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); + let x = mouse[0] + scrollLeft; + let winW = $(window).width(); + + let row_index = Store.visibledatarow.length - 1, + row = Store.visibledatarow[row_index], + row_pre = 0; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + Store.luckysheet_cols_change_size_start = [col_pre, col_index]; + let dataflow = $("#luckysheetTableContent").get(0).getContext("2d"); + let cfg = $.extend(true, {}, Store.config); + + let matchColumn = {}; + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + if (col_index < c1 || col_index > c2) { + if(col_index in matchColumn){//此列已计算过 + continue; + } + + x = -Infinity; + let countret = 0; + let fontsize = 13; + for (let r = 0; r < Store.flowdata.length; r++) { + if (countret >= 15) { + break; + } + + let value = getcellvalue(r, Store.luckysheet_cols_change_size_start[1], Store.flowdata); + let mask = getcellvalue(r, Store.luckysheet_cols_change_size_start[1], Store.flowdata, "m"); + + if(mask != null){ + value = mask; + } + + let cell = Store.flowdata[r][Store.luckysheet_cols_change_size_start[1]]; + if(getObjType(cell) == "object" && ("fs" in cell)){ + if(cell.fs > fontsize){ + fontsize = cell.fs; + } + } + + if (value == null || value.toString().length == 0) { + countret++; + continue; + } + let textMetrics = dataflow.measureText(value).width; + if (textMetrics > x) { + x = textMetrics; + } + } + + let size = x + fontsize * 1.5; + if ((x + 3) < 30) { + size = 30; + } + + if (x >= winW - 100 + scrollLeft) { + size = winW - 100 + scrollLeft; + } + + if (cfg["columlen"] == null) { + cfg["columlen"] = {}; + } + + cfg["columlen"][Store.luckysheet_cols_change_size_start[1]] = Math.ceil(size); + + matchColumn[col_index] = 1; + } + else { + for (let c = c1; c <= c2; c++) { + if(c in matchColumn){//此列已计算过 + continue; + } + + x = -Infinity; + let countret = 0; + let fontsize = 13; + for (let r = 0; r < Store.flowdata.length; r++) { + if (countret >= 15) { + break; + } + let value = getcellvalue(r, c, Store.flowdata); + + let cell = Store.flowdata[r][c]; + if(getObjType(cell) == "object" && ("fs" in cell)){ + if(cell.fs > fontsize){ + fontsize = cell.fs; + } + } + + if (isRealNull(value)) { + countret++; + continue; + } + + let textMetrics = dataflow.measureText(value).width; + if (textMetrics > x) { + x = textMetrics; + } + } + + let size = x + fontsize*1.5;; + if ((x + 3) < 30) { + size = 30; + } + + if (x >= winW - 100 + scrollLeft) { + size = winW - 100 + scrollLeft; + } + + if (cfg["columlen"] == null) { + cfg["columlen"] = {}; + } + cfg["columlen"][c] = Math.ceil(size); + + matchColumn[c] = 1; + } + } + } + + jfrefreshgridall(Store.flowdata[0].length, Store.flowdata.length, Store.flowdata, cfg, Store.luckysheet_select_save, "resizeC", "columlen"); + } + + //表格行标题 改变行高按钮 + $("#luckysheet-rows-change-size").mousedown(function (event) { + //有批注在编辑时 + luckysheetPostil.removeActivePs(); + + $("#luckysheet-input-box").hide(); + $("#luckysheet-rows-change-size").css({ "opacity": 1 }); + + let mouse = mouseposition(event.pageX, event.pageY); + let y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let winW = $("#luckysheet-cell-main").width(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + Store.luckysheet_rows_change_size = true; + Store.luckysheet_scroll_status = true; + $("#luckysheet-change-size-line").css({ + "height": "1px", + "border-width": + "0 0px 1px 0", + "top": row - 3, + "left": 0, + "width": scrollLeft + winW, + "display": "block", + "cursor": "ns-resize" + }); + $("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor", "ns-resize"); + Store.luckysheet_rows_change_size_start = [row_pre, row_index]; + $("#luckysheet-rightclick-menu").hide(); + $("#luckysheet-rows-h-hover").hide(); + $("#luckysheet-cols-menu-btn").hide(); + event.stopPropagation(); + }); + + $("#luckysheet-cols-menu-btn").click(function (event) { + let $menu = $("#luckysheet-rightclick-menu"); + let offset = $(this).offset(); + $("#luckysheet-cols-rows-shift").show(); + Store.luckysheetRightHeadClickIs = "column"; + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text(locale().rightclick.column); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text(locale().rightclick.left); + $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text(locale().rightclick.right); + + $("#luckysheet-cols-rows-add").show(); + $("#luckysheet-cols-rows-data").hide(); + $("#luckysheet-cols-rows-shift").show(); + $("#luckysheet-cols-rows-handleincell").hide(); + + showrightclickmenu($menu, offset.left, offset.top + 18); + Store.luckysheet_cols_menu_status = true; + }); + + //菜单栏 排序按钮 + $("#luckysheetorderbyasc, #luckysheetorderbyasc_t").mousedown(function (event) { + cleargridelement(event); + sortColumnSeletion(Store.orderbyindex, true); + selectHightlightShow(); + }); + + $("#luckysheetorderbydesc, #luckysheetorderbydesc_t").click(function (event) { + cleargridelement(event); + sortColumnSeletion(Store.orderbyindex, false); + selectHightlightShow(); + }); + + //右键功能键 + //复制为json格式字符串,首行为标题 + $("#luckysheet-copy-json-head").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + + if (getdata.length == 1) { + let obj = {}; + for (let i = 0; i < getdata[0].length; i++) { + obj[getcellvalue(0, i, getdata)] = ""; + } + arr.push(obj); + } + else { + for (let r = 1; r < getdata.length; r++) { + let obj = {}; + for (let c = 0; c < getdata[0].length; c++) { + if(getcellvalue(0, c, getdata) == undefined){ + obj[""] = getcellvalue(r, c, getdata); + }else{ + obj[getcellvalue(0, c, getdata)] = getcellvalue(r, c, getdata); + } + } + arr.push(obj); + } + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为json格式字符串,无标题,采用ABCD作为标题 + $("#luckysheet-copy-json-nohead").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + let st = Store.luckysheet_select_save[0]["column"][0]; + for (let r = 0; r < getdata.length; r++) { + let obj = {}; + for (let c = 0; c < getdata[0].length; c++) { + obj[chatatABC(c + st)] = getcellvalue(r, c, getdata); + } + arr.push(obj); + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为一维数组 + $("#luckysheet-copy-array1").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + for (let r = 0; r < getdata.length; r++) { + for (let c = 0; c < getdata[0].length; c++) { + arr.push(getcellvalue(r, c, getdata)); + } + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为二维数组 + $("#luckysheet-copy-array2").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + for (let r = 0; r < getdata.length; r++) { + let a = []; + for (let c = 0; c < getdata[0].length; c++) { + a.push(getcellvalue(r, c, getdata)); + } + arr.push(a); + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为多维数组 + $("#luckysheet-copy-arraymore-confirm").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + + for (let r = 0; r < getdata.length; r++) { + for (let c = 0; c < getdata[0].length; c++) { + arr.push(getdata[r][c]); + } + } + + let row = $("#luckysheet-copy-arraymore-row").val(), col = $("#luckysheet-copy-arraymore-col").val(); + + if (row == "" && col == "") { + selection.copybyformat(event, JSON.stringify(arr)); + $("body .luckysheet-cols-menu").hide(); + return; + } + + if (row == "") { + row = 1; + } + else { + row = parseInt(row); + if (row == null) { + row = 1; + } + } + + if (col == "") { + col = 1; + } + else { + col = parseInt(col); + if (col == null) { + col = 1; + } + } + + if(row.toString() == "NaN" || col.toString() == "NaN"){ + if(isEditMode()){ + alert("请输入正确的数值!"); + } + else{ + tooltip.info("请输入正确的数值!", ""); + } + return; + } + + if(row < 1 || col < 1){ + if(isEditMode()){ + alert("行列数不能小于1!"); + } + else{ + tooltip.info("行列数不能小于1!", ""); + } + return; + } + + let arrlen = arr.length, i = 0, ret = []; + for (let r = 0; r < row; r++) { + let a = []; + for (let c = 0; c < col; c++) { + a.push(arr[i++]); + if (i >= arrlen) { + selection.copybyformat(event, JSON.stringify(ret)); + $("body .luckysheet-cols-menu").hide(); + return; + } + } + ret.push(a); + } + + selection.copybyformat(event, JSON.stringify(ret)); + }); + + //复制为对角线 + $("#luckysheet-copy-diagonal").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + + let clen = getdata[0].length; + for (let r = 0; r < getdata.length; r++) { + if (r >= clen) { + break; + } + arr.push(getdata[r][r]); + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为反对角线 + $("#luckysheet-copy-antidiagonal").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + + let clen = getdata[0].length; + for (let r = 0; r < getdata.length; r++) { + if (r >= clen) { + break; + } + arr.push(getdata[r][clen - r - 1]); + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为对角偏移n列 + $("#luckysheet-copy-diagonaloffset").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + + let clen = getdata[0].length, + offset = parseInt($("#luckysheet-copy-diagonaloffset-value").val()); + + if(offset.toString() == "NaN"){ + if(isEditMode()){ + alert("请输入正确的数值!"); + } + else{ + tooltip.info("请输入正确的数值!", ""); + } + return; + } + + if(offset < 0){ + if(isEditMode()){ + alert("偏移列不能为负数!"); + } + else{ + tooltip.info("偏移列不能为负数!", ""); + } + return; + } + + if (offset == null) { + offset = 1; + } + + for (let r = 0; r < getdata.length; r++) { + if (r + offset >= clen) { + break; + } + arr.push(getdata[r][r + offset]); + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //复制为布尔值 + $("#luckysheet-copy-boolvalue").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + //复制范围内包含部分合并单元格,提示 + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + let arr = []; + if (getdata.length == 0) { + return; + } + for (let r = 0; r < getdata.length; r++) { + let a = []; + for (let c = 0; c < getdata[0].length; c++) { + let bool = false; + + if(getObjType(getdata[r][c]) == "object"){ + let v = getdata[r][c].v; + } + else{ + let v = getdata[r][c]; + } + + if (v == null || v == "") { + bool = false; + } + else { + v = parseInt(v); + if (v == null || v > 0) { + bool = true; + } + else { + bool = false; + } + } + a.push(bool); + } + arr.push(a); + } + + selection.copybyformat(event, JSON.stringify(arr)); + }); + + //矩阵操作选区 翻转 上下 + $("#luckysheet-matrix-turn-up").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + for (let r = getdata.length - 1; r >= 0; r--) { + let a = []; + for (let c = 0; c < getdata[0].length; c++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + } + a.push(value); + } + arr.push(a); + } + + editor.controlHandler(arr); + }); + + //矩阵操作选区 翻转 左右 + $("#luckysheet-matrix-turn-left").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + for (let r = 0; r < getdata.length; r++) { + let a = []; + for (let c = getdata[0].length - 1; c >= 0; c--) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + } + a.push(value); + } + arr.push(a); + } + + editor.controlHandler(arr); + }); + + //矩阵操作选区 翻转 顺时针 + $("#luckysheet-matrix-turn-cw").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + for (let c = 0; c < getdata[0].length; c++) { + let a = []; + for (let r = getdata.length - 1; r >= 0; r--) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + } + a.push(value); + } + arr.push(a); + } + + editor.controlHandlerD(arr); + }); + + //矩阵操作选区 翻转 逆时针 + $("#luckysheet-matrix-turn-anticw").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + for (let c = getdata[0].length - 1; c >= 0; c--) { + let a = []; + for (let r = 0; r < getdata.length; r++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + } + a.push(value); + } + arr.push(a); + } + + editor.controlHandlerD(arr); + }); + + //矩阵操作选区 转置 + $("#luckysheet-matrix-turn-trans").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + for (let c = 0; c < getdata[0].length; c++) { + let a = []; + for (let r = 0; r < getdata.length; r++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + } + a.push(value); + } + arr.push(a); + } + + editor.controlHandlerD(arr); + }); + + let jfnqrt = function (x, p) { + if (x == 0) + return 0; + let x0, x1; + x0 = x; + x1 = ((p - 1) * x0 / p) + (x / (Math.pow(x0, p - 1) * p));//利用迭代法求解 + while (Math.abs(x1 - x0) > 0.000001) { + x0 = x1; + x1 = ((p - 1) * x0 / p) + (x / (Math.pow(x0, p - 1) * p)); + } + return x1; + } + + //矩阵操作选区 矩阵计算 + $("#luckysheet-matrix-cal-confirm").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let caltype = $("#luckysheet-matrix-cal-type").val(), + calvalue = parseInt($("#luckysheet-matrix-cal-value").val()); + + if(calvalue.toString() == "NaN"){ + if(isEditMode()){ + alert("请输入正确的数值!"); + } + else{ + tooltip.info("请输入正确的数值!", ""); + } + return; + } + + if (calvalue == null) { + calvalue = 2; + } + + let arr = []; + + for (let r = 0; r < getdata.length; r++) { + let a = []; + + for (let c = 0; c < getdata[0].length; c++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + if (parseInt(value) != null && getdata[r][c].ct != undefined && getdata[r][c].ct.t == "n") { + if (caltype == "minus") { + value.v = value.v - calvalue; + } + else if (caltype == "multiply") { + value.v = value.v * calvalue; + } + else if (caltype == "divided") { + value.v = numFormat(value.v / calvalue, 4); + } + else if (caltype == "power") { + value.v = Math.pow(value.v, calvalue); + } + else if (caltype == "root") { + if (calvalue == 2) { + value.v = numFormat(Math.sqrt(value.v), 4); + } + else if (calvalue == 3 && Math.cbrt) { + value.v = numFormat(Math.cbrt(value.v), 4); + } + else { + value.v = numFormat(jfnqrt(value.v, calvalue), 4); + } + } + else if (caltype == "log") { + value.v = numFormat(Math.log(value.v) * 10000 / Math.log(Math.abs(calvalue)), 4); + } + else { + value.v = value.v + calvalue; + } + + if(value.v == null){ + value.m = ""; + } + else{ + value.m = value.v.toString(); + } + } + } + a.push(value); + } + arr.push(a); + } + + editor.controlHandler(arr); + }); + + //矩阵操作选区 删除两端0值 按行 + $("#luckysheet-matrix-delezero-row").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + let getdatalen = getdata[0].length; + for (let r = 0; r < getdata.length; r++) { + let a = [], stdel = true, eddel = true; + for (let c = 0; c < getdatalen; c++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + if ((value.v == "0" || value.v == 0) && stdel) { + continue; + } + else { + stdel = false; + } + } + a.push(value); + } + + let a1 = []; + if (a.length == getdatalen) { + a1 = a; + } + else { + for (let c = a.length - 1; c >= 0; c--) { + let value = ""; + if (a[c] != null) { + value = a[c]; + if ((value.v == "0" || value.v == 0) && eddel) { + continue; + } + else { + eddel = false; + } + } + a1.unshift(value); + } + + let l = getdatalen - a1.length; + for (let c1 = 0; c1 < l; c1++) { + a1.push(""); + } + } + arr.push(a1); + } + + editor.controlHandler(arr); + }); + + //矩阵操作选区 删除两端0值 按列 + $("#luckysheet-matrix-delezero-column").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + let getdatalen = getdata.length, collen = getdata[0].length; + for (let c = 0; c < collen; c++) { + let a = [], stdel = true, eddel = true; + for (let r = 0; r < getdatalen; r++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + if ((value.v == "0" || value.v == 0) && stdel) { + continue; + } + else { + stdel = false; + } + } + a.push(value); + } + + let a1 = []; + if (a.length == getdatalen) { + a1 = a; + } + else { + for (let r = a.length - 1; r >= 0; r--) { + let value = ""; + if (a[r] != null) { + value = a[r]; + if ((value.v == "0" || value.v == 0) && eddel) { + continue; + } + else { + eddel = false; + } + } + a1.unshift(value); + } + + let l = getdatalen - a1.length; + for (let r1 = 0; r1 < l; r1++) { + a1.push(""); + } + } + arr.push(a1); + } + + let arr1 = []; + for (let c = 0; c < arr[0].length; c++) { + let a = []; + for (let r = 0; r < arr.length; r++) { + let value = ""; + if (arr[r] != null && arr[r][c] != null) { + value = arr[r][c]; + } + a.push(value); + } + arr1.push(a); + } + + editor.controlHandler(arr1); + }); + + //矩阵操作选区 删除重复值 按行 + $("#luckysheet-matrix-delerpt-row").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + let getdatalen = getdata[0].length; + for (let r = 0; r < getdata.length; r++) { + let a = [], repeat = {}; + + for (let c = 0; c < getdatalen; c++) { + let value = null; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + + if(value.v in repeat){ + repeat[value.v].push(value); + } + else{ + repeat[value.v] = []; + repeat[value.v].push(value); + } + } + } + + for (let c = 0; c < getdatalen; c++) { + let value = null; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + + if(repeat[value.v].length == 1){ + a.push(value); + } + } + } + + let l = getdatalen - a.length; + for (let c1 = 0; c1 < l; c1++) { + a.push(null); + } + arr.push(a); + } + + editor.controlHandler(arr); + }); + + //矩阵操作选区 删除重复值 按列 + $("#luckysheet-matrix-delerpt-column").click(function (event) { + $("body .luckysheet-cols-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); + } + return; + } + + let getdata = getdatabyselection(Store.luckysheet_select_save[0]); + if (getdata.length == 0) { + return; + } + + let arr = []; + let getdatalen = getdata.length, collen = getdata[0].length; + for (let c = 0; c < collen; c++) { + let a = [], repeat = {}; + + for (let r = 0; r < getdatalen; r++) { + let value = null; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + + if(value.v in repeat){ + repeat[value.v].push(value); + } + else{ + repeat[value.v] = []; + repeat[value.v].push(value); + } + } + } + + for (let r = 0; r < getdatalen; r++) { + let value = null; + if (getdata[r] != null && getdata[r][c] != null) { + value = getdata[r][c]; + + if(repeat[value.v].length == 1){ + a.push(value); + } + } + } + + a1 = a; + let l = getdatalen - a1.length; + for (let r1 = 0; r1 < l; r1++) { + a1.push(null); + } + arr.push(a1); + } + + let arr1 = []; + for (let c = 0; c < arr[0].length; c++) { + let a = []; + for (let r = 0; r < arr.length; r++) { + let value = null; + if (arr[r] != null && arr[r][c] != null) { + value = arr[r][c]; + } + a.push(value); + } + arr1.push(a); + } + + editor.controlHandler(arr1); + }); + + //回退 重做 按钮 + $("#luckysheet-icon-undo").click(function (event) { + controlHistory.redo(event); + }); + $("#luckysheet-icon-redo").click(function (event) { + controlHistory.undo(event); + }); + + //表格底部名称栏区域 相关事件(增、删、改、隐藏显示、颜色等等) + let isInitialSheetConfig = false, luckysheetcurrentSheetitem = null, jfdbclicklagTimeout = null; + function showsheetconfigmenu() { + if (!isInitialSheetConfig) { + isInitialSheetConfig = true; + $("#luckysheetsheetconfigcolorur").spectrum({ + showPalette: true, + preferredFormat: "hex", + clickoutFiresChange: false, + showInitial: true, + showInput: true, + flat: true, + hideAfterPaletteSelect: false, + showSelectionPalette: true, + maxPaletteSize: 10, + cancelText: locale().sheetconfig.cancelText, + chooseText: locale().sheetconfig.chooseText, + togglePaletteMoreText: "更多", + togglePaletteLessText: "少于", + clearText: "清除颜色选择", + noColorSelectedText: "没有颜色被选择", + palette: [["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", "rgb(204, 204, 204)", "rgb(217, 217, 217)", "rgb(255, 255, 255)"], ["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)", "rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"], ["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)", "rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)"], ["rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)", "rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)"], ["rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)", "rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)"], ["rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)", "rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)"], ["rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)", "rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"], ["#c1232b", "#27727b", "#fcce10", "#e87c25", "#b5c334", "#fe8463", "#9bca63", "#fad860", "#f3a43b", "#60c0dd", "#d7504b", "#c6e579", "#f4e001", "#f0805a", "#26c0c0", "#c12e34", "#e6b600", "#0098d9", "#2b821d", "#005eaa", "#339ca8", "#cda819", "#32a487", "#3fb1e3", "#6be6c1", "#626c91", "#a0a7e6", "#c4ebad", "#96dee8"]], + change: function (color) { + let $input = $(this); + if (color != null) { + color = color.toHexString(); + } + else { + color = "rgb(0, 0, 0)"; + } + + let oldcolor = null; + if(luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").length>0){ + oldcolor = luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").css("background-color"); + } + + luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); + luckysheetcurrentSheetitem.append('
'); + let index = getSheetIndex(Store.currentSheetIndex); + Store.luckysheetfile[index].color = color; + server.saveParam("all", Store.currentSheetIndex, color, { "k": "color" }); + + if (Store.clearjfundo) { + let redo = {}; + redo["type"] = "sheetColor"; + redo["sheetIndex"] = Store.currentSheetIndex; + + redo["oldcolor"] = oldcolor; + redo["color"] = color; + + Store.jfundo = []; + Store.jfredo.push(redo); + } + } + }); + + $("#luckysheetsheetconfigcolorreset").click(function () { + let oldcolor = null; + if(luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").length>0){ + oldcolor = luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").css("background-color"); + } + + luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); + let index = getSheetIndex(Store.currentSheetIndex); + Store.luckysheetfile[index].color = null; + server.saveParam("all", Store.currentSheetIndex, null, { "k": "color" } ); + + if (Store.clearjfundo) { + let redo = {}; + redo["type"] = "sheetColor"; + redo["sheetIndex"] = Store.currentSheetIndex; + + redo["oldcolor"] = oldcolor; + redo["color"] = null; + + Store.jfundo = []; + Store.jfredo.push(redo); + } + }); + } + + let index = getSheetIndex(Store.currentSheetIndex); + if (Store.luckysheetfile[index].color != null && Store.luckysheetfile[index].color.length > 0) { + $("#luckysheetsheetconfigcolorur").spectrum("set", Store.luckysheetfile[index].color); + + } + + $("#luckysheetsheetconfigcolorur").parent().find("span, div, button, input, a").addClass("luckysheet-mousedown-cancel"); + setTimeout(function(){ + mouseclickposition($("#luckysheet-rightclick-sheet-menu"), luckysheetcurrentSheetitem.offset().left + luckysheetcurrentSheetitem.width(), luckysheetcurrentSheetitem.offset().top - 18, "leftbottom"); + },1); + } + + let luckysheetsheetrightclick = function ($t, $cur, e) { + clearTimeout(jfdbclicklagTimeout); + if ($cur.hasClass("luckysheet-sheets-item-name") && $cur.attr("contenteditable") == "true") { + return; + } + if (formula.rangestart || formula.rangedrag_column_start || formula.rangedrag_row_start || formula.israngeseleciton()) { + setTimeout(function () { + formula.setCaretPosition(formula.rangeSetValueTo.get(0), 0, formula.rangeSetValueTo.text().length); + formula.createRangeHightlight(); + $("#luckysheet-input-box-index").find(".luckysheet-input-box-index-sheettxt").remove().end().prepend("" + sheetmanage.getSheetName(formula.rangetosheet) + "!").show(); + $("#luckysheet-input-box-index").css({"left": $("#luckysheet-input-box").css("left"), "top": (parseInt($("#luckysheet-input-box").css("top")) - 20) + "px", "z-index": $("#luckysheet-input-box").css("z-index")}); + }, 1); + } + else { + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); + } + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); + $t.addClass("luckysheet-sheets-item-active"); + cleargridelement(e); + sheetmanage.changeSheet($t.data("index")); + + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + + if ($cur.hasClass("luckysheet-sheets-item-menu") || $cur.hasClass("fa-sort-desc") || e.which == "3") { + luckysheetcurrentSheetitem = $cur.closest(".luckysheet-sheets-item"); + showsheetconfigmenu(); + } + } + + $("#luckysheet-sheet-area").on("mousedown", "div.luckysheet-sheets-item", function (e) { + if(isEditMode()){ + // alert("非编辑模式下不允许该操作!"); + return; + } + + let $t = $(this), $cur = $(e.target), $item = $cur.closest(".luckysheet-sheets-item"); + + if (e.which == "3") { + luckysheetsheetrightclick($t, $cur, e); + luckysheetcurrentSheetitem = $item; + showsheetconfigmenu(); + return; + } + + if ($item.hasClass("luckysheet-sheets-item-active") && $item.find(".luckysheet-sheets-item-name").attr("contenteditable") == "false") { + jfdbclicklagTimeout = setTimeout(function () { + Store.luckysheet_sheet_move_status = true; + Store.luckysheet_sheet_move_data = {}; + Store.luckysheet_sheet_move_data.widthlist = []; + + $("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function (i) { + if (i == 0) { + Store.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())); + } + else { + Store.luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth()) + Store.luckysheet_sheet_move_data.widthlist[i - 1]); + } + }); + + Store.luckysheet_sheet_move_data.curindex = $("#luckysheet-sheet-area div.luckysheet-sheets-item").index($item); + let x = e.pageX; + Store.luckysheet_sheet_move_data.curleft = x - $item.offset().left; + Store.luckysheet_sheet_move_data.pageX = x; + Store.luckysheet_sheet_move_data.activeobject = $item; + Store.luckysheet_sheet_move_data.cursorobject = $cur; + let $itemclone = $item.clone().css("visibility", "hidden").attr("id", "luckysheet-sheets-item-clone"); + $item.after($itemclone); + $item.css({ "position": "absolute", "opacity": 0.8, "cursor": "move", "transition": "initial", "z-index": 10 }); + }, 200); + } + }).on("click", "div.luckysheet-sheets-item", function (e) { + if(isEditMode()){ + // alert("非编辑模式下不允许该操作!"); + return; + } + + let $t = $(this), $cur = $(e.target); + luckysheetsheetrightclick($t, $cur, e); + }); + + let luckysheetsheetnameeditor = function ($t) { + $t.attr("contenteditable", "true").addClass("luckysheet-mousedown-cancel").data("oldtxt", $t.text()); + + setTimeout(function () { + if (document.selection) { + let range = document.body.createTextRange(); + range.moveToElementText($t.get(0)); + range.select(); + } else if (window.getSelection) { + let range = document.createRange(); + range.selectNodeContents($t.get(0)); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + }, 1); + } + + $("#luckysheet-sheet-area").on("dblclick", "span.luckysheet-sheets-item-name", function (e) { + luckysheetsheetnameeditor($(this)); + }); + + $("#luckysheet-sheet-area").on("blur", "span.luckysheet-sheets-item-name", function (e) { + let $t = $(this); + let txt = $t.text(), oldtxt = $t.data("oldtxt"); + let index = getSheetIndex(Store.currentSheetIndex); + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (index != i && Store.luckysheetfile[i].name == txt) { + if(isEditMode()){ + alert("标签页的名称不能重复!请重新修改"); + } + else{ + tooltip.info("提示", "标签页的名称不能重复!请重新修改"); + } + $t.text(oldtxt).attr("contenteditable", "false"); + return; + } + } + + let winW = $(window).width(); + + let c_width = 0; + $("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){ + c_width += $(this).outerWidth(); + }); + + if (c_width >= winW * 0.7) { + $("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display", "inline-block"); + $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); + } + + Store.luckysheetfile[index].name = txt; + server.saveParam("all", Store.currentSheetIndex, txt, { "k": "name" }); + + $t.attr("contenteditable", "false").removeClass("luckysheet-mousedown-cancel"); + + if (Store.clearjfundo) { + let redo = {}; + redo["type"] = "sheetName"; + redo["sheetIndex"] = Store.currentSheetIndex; + + redo["oldtxt"] = oldtxt; + redo["txt"] = txt; + + Store.jfundo = []; + Store.jfredo.push(redo); + } + }); + + $("#luckysheet-sheet-area").on("keydown", "span.luckysheet-sheets-item-name", function (e) { + let kcode = e.keyCode; + let $t = $(this); + if (kcode == keycode.ENTER) { + let index = getSheetIndex(Store.currentSheetIndex); + Store.luckysheetfile[index].name = $t.text(); + $t.attr("contenteditable", "false"); + } + }); + + $("#luckysheetsheetconfigrename").click(function () { + luckysheetsheetnameeditor(luckysheetcurrentSheetitem.find("span.luckysheet-sheets-item-name")); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + }); + + $("#luckysheetsheetconfigshow").click(function () { + $("#luckysheet-sheets-m").click(); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-rightclick-sheet-menu").hide(); + }); + + $("#luckysheetsheetconfigmoveleft").click(function () { + if (luckysheetcurrentSheetitem.preval(":visible").length > 0) { + luckysheetcurrentSheetitem.insertBefore(luckysheetcurrentSheetitem.preval(":visible").eq(0)); + sheetmanage.reOrderAllSheet(); + } + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + }); + + $("#luckysheetsheetconfigmoveright").click(function () { + if (luckysheetcurrentSheetitem.nextAll(":visible").length > 0) { + luckysheetcurrentSheetitem.insertAfter(luckysheetcurrentSheetitem.nextAll(":visible").eq(0)); + sheetmanage.reOrderAllSheet(); + } + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + }); + + $("#luckysheetsheetconfigdelete").click(function (e) { + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + + if($("#luckysheet-sheet-container-c .luckysheet-sheets-item:visible").length <= 1){ + if(isEditMode()){ + alert("工作薄内至少含有一张可视工作表。若需删除选定的工作表,请先插入一张新工作表或显示一张隐藏的工作表。"); + } + else{ + tooltip.info("工作薄内至少含有一张可视工作表。若需删除选定的工作表,请先插入一张新工作表或显示一张隐藏的工作表。", ""); + } + + return; + } + + let index = getSheetIndex(Store.currentSheetIndex); + + tooltip.confirm("是否删除【" + Store.luckysheetfile[index].name + "】?", "可以通过Ctrl+Z撤销删除", function () { + sheetmanage.deleteSheet(luckysheetcurrentSheetitem.data("index")); + }, null); + + $("#luckysheet-input-box").removeAttr("style"); + }); + + $("#luckysheetsheetconfigcopy").click(function (e) { + sheetmanage.copySheet(luckysheetcurrentSheetitem.data("index"), e); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + }); + + $("#luckysheetsheetconfighide").click(function () { + if ($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").length == 1) { + if(isEditMode()){ + alert("不能隐藏, 至少保留一个sheet标签"); + } + else{ + tooltip.info("不能隐藏", "至少保留一个sheet标签"); + } + return; + } + sheetmanage.setSheetHide(luckysheetcurrentSheetitem.data("index")); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + }); + + $("#luckysheet-sheets-add").click(function (e) { + sheetmanage.addNewSheet(e); + sheetmanage.locationSheet(); + $("#luckysheet-input-box").removeAttr("style"); + }); + + let sheetscrollani = null, sheetscrollstart = 0, sheetscrollend = 0, sheetscrollstep = 150; + $("#luckysheet-sheets-leftscroll").click(function () { + let $c = $("#luckysheet-sheet-container-c"); + sheetscrollstart = $c.scrollLeft(); + sheetscrollend = $c.scrollLeft() - sheetscrollstep; + + if (sheetscrollend <= 0) { + $("#luckysheet-sheet-container .docs-sheet-fade-left").hide(); + } + $("#luckysheet-sheet-container .docs-sheet-fade-right").show(); + + clearInterval(sheetscrollani); + sheetscrollani = setInterval(function () { + sheetscrollstart -= 4; + $c.scrollLeft(sheetscrollstart); + if (sheetscrollstart <= sheetscrollend) { + clearInterval(sheetscrollani); + } + }, 1); + }); + + $("#luckysheet-sheets-rightscroll").click(function () { + let $c = $("#luckysheet-sheet-container-c"); + sheetscrollstart = $c.scrollLeft(); + sheetscrollend = $c.scrollLeft() + sheetscrollstep; + + if (sheetscrollstart > 0) { + $("#luckysheet-sheet-container .docs-sheet-fade-right").hide(); + } + $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); + + clearInterval(sheetscrollani); + sheetscrollani = setInterval(function () { + sheetscrollstart += 4; + $c.scrollLeft(sheetscrollstart); + if (sheetscrollstart >= sheetscrollend) { + clearInterval(sheetscrollani); + } + }, 1); + }); + + let initialOpenSheet = true; + $("#luckysheet-sheets-m").click(function (e) { + $("#luckysheet-sheet-list").html(""); + + let item = ""; + for (let i = 0; i < Store.luckysheetfile.length; i++) { + let f = Store.luckysheetfile[i], icon = '', style = ""; + if (f["status"] == 1) { + icon = ''; + } + + if (f["hide"] == 1) { + icon = ''; + style += "color:#BBBBBB;"; + } + + if (f["color"] != null && f["color"].length > 0) { + style += "border-right:4px solid " + f["color"] + ";"; + } + + item += replaceHtml(sheetselectlistitemHTML, { "index": f["index"], "name": f["name"], "icon": icon, "style": style }); + } + + if (initialOpenSheet) { + $("#" + Store.container).append(replaceHtml(sheetselectlistHTML, { "item": item })); + $("#luckysheet-sheet-list").on("click", ".luckysheet-cols-menuitem", function (e) { + if(isEditMode()){ + // tooltip.info("提示", "图表编辑模式下不允许该操作!"); + alert("图表编辑模式下不允许该操作!"); + return; + } + + let $item = $(this), index = $item.data("index"); + + if ($item.data("index") != Store.currentSheetIndex) { + sheetmanage.setSheetShow(index); + sheetmanage.locationSheet(); + } + }); + + initialOpenSheet = false; + } + else { + $("#luckysheet-sheet-list").html(item); + } + + let $t = $("#luckysheet-sheet-list"); + + mouseclickposition($t, $(this).offset().left, $(this).offset().top - 12, "leftbottom"); + $("#luckysheet-input-box").removeAttr("style"); + }); + + //向左增加列,向上增加行 + $("#luckysheet-add-lefttop, #luckysheet-add-lefttop_t").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + let $t = $(this), value = $t.parent().find("input").val(); + if (!isRealNum(value)) { + if(isEditMode()){ + alert("增加错误, 请输入数字"); + } + else{ + tooltip.info("增加错误, 请输入数字", ""); + } + + return; + } + + value = parseInt(value); + + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加错误, 增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误, 增加范围限制在1-100", ""); + } + return; + } + + let st_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][0]; + luckysheetextendtable(Store.luckysheetRightHeadClickIs, st_index, value, "lefttop"); + }); + $("#luckysheet-addTopRows").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + let $t = $(this), value = $t.parent().find("input").val(); + if (!isRealNum(value)) { + if(isEditMode()){ + alert("增加错误, 请输入数字"); + } + else{ + tooltip.info("增加错误, 请输入数字", ""); + } + + return; + } + + value = parseInt(value); + + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加错误, 增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误, 增加范围限制在1-100", ""); + } + return; + } + + let st_index = Store.luckysheet_select_save[0].row[0]; + luckysheetextendtable('row', st_index, value, "lefttop"); + }) + $("#luckysheet-addLeftCols").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + let $t = $(this), value = $t.parent().find("input").val(); + if (!isRealNum(value)) { + if(isEditMode()){ + alert("增加错误, 请输入数字"); + } + else{ + tooltip.info("增加错误, 请输入数字", ""); + } + + return; + } + + value = parseInt(value); + + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加错误, 增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误, 增加范围限制在1-100", ""); + } + return; + } + + let st_index = Store.luckysheet_select_save[0].column[0]; + luckysheetextendtable('column', st_index, value, "lefttop"); + }) + + //向右增加列,向下增加行 + $("#luckysheet-add-rightbottom, #luckysheet-add-rightbottom_t").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + let $t = $(this), value = $t.parent().find("input").val(); + if (!isRealNum(value)) { + if(isEditMode()){ + alert("增加错误, 请输入数字"); + } + else{ + tooltip.info("增加错误, 请输入数字", ""); + } + + return; + } + + value = parseInt(value); + + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加错误, 增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误, 增加范围限制在1-100", ""); + } + + return; + } + + let st_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][1]; + luckysheetextendtable(Store.luckysheetRightHeadClickIs, st_index, value, "rightbottom"); + }); + $("#luckysheet-addBottomRows").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + let $t = $(this), value = $t.parent().find("input").val(); + if (!isRealNum(value)) { + if(isEditMode()){ + alert("增加错误, 请输入数字"); + } + else{ + tooltip.info("增加错误, 请输入数字", ""); + } + + return; + } + + value = parseInt(value); + + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加错误, 增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误, 增加范围限制在1-100", ""); + } + + return; + } + + let st_index = Store.luckysheet_select_save[0].row[1]; + luckysheetextendtable('row', st_index, value, "rightbottom"); + }); + $("#luckysheet-addRightCols").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + let $t = $(this), value = $t.parent().find("input").val(); + if (!isRealNum(value)) { + if(isEditMode()){ + alert("增加错误, 请输入数字"); + } + else{ + tooltip.info("增加错误, 请输入数字", ""); + } + + return; + } + + value = parseInt(value); + + if (value < 1 || value > 100) { + if(isEditMode()){ + alert("增加错误, 增加范围限制在1-100"); + } + else{ + tooltip.info("增加错误, 增加范围限制在1-100", ""); + } + + return; + } + + let st_index = Store.luckysheet_select_save[0].column[1]; + luckysheetextendtable('column', st_index, value, "rightbottom"); + }); + + //删除选中行列 + $("#luckysheet-del-selected, #luckysheet-del-selected_t").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(Store.luckysheetRightHeadClickIs == "row"){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + } + else if(Store.luckysheetRightHeadClickIs == "column"){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + } + return; + } + + let st_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][0], + ed_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][1]; + luckysheetdeletetable(Store.luckysheetRightHeadClickIs, st_index, ed_index); + }); + $("#luckysheet-delRows").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(Store.luckysheetRightHeadClickIs == "row"){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + } + else if(Store.luckysheetRightHeadClickIs == "column"){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + } + return; + } + + let st_index = Store.luckysheet_select_save[0].row[0], + ed_index = Store.luckysheet_select_save[0].row[1]; + luckysheetdeletetable('row', st_index, ed_index); + }) + $("#luckysheet-delCols").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(Store.luckysheetRightHeadClickIs == "row"){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + } + else if(Store.luckysheetRightHeadClickIs == "column"){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + } + return; + } + + let st_index = Store.luckysheet_select_save[0].column[0], + ed_index = Store.luckysheet_select_save[0].column[1]; + luckysheetdeletetable('column', st_index, ed_index); + }) + + //隐藏、显示行 + $("#luckysheet-hidRows").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let cfg = $.extend(true, {}, Store.config); + if(cfg["rowhidden"] == null){ + cfg["rowhidden"] = {}; + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1], + c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + for(let r = r1; r <= r2; r++){ + cfg["rowhidden"][r] = 0; + } + } + + //保存撤销 + if(Store.clearjfundo){ + let redo = {}; + redo["type"] = "showHidRows"; + redo["sheetIndex"] = Store.currentSheetIndex; + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = cfg; + + Store.jfundo = []; + Store.jfredo.push(redo); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, cfg["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + }) + $("#luckysheet-showHidRows").click(function (event) { + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let cfg = $.extend(true, {}, Store.config); + if(cfg["rowhidden"] == null){ + return; + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1], + c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + for(let r = r1; r <= r2; r++){ + delete cfg["rowhidden"][r]; + } + } + + //保存撤销 + if(Store.clearjfundo){ + let redo = {}; + redo["type"] = "showHidRows"; + redo["sheetIndex"] = Store.currentSheetIndex; + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = cfg; + + Store.jfundo = []; + Store.jfredo.push(redo); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, cfg["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + }) + + //清除单元格内容 + $("#luckysheet-delete-text").click(function(){ + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 0){ + let d = editor.deepCopyFlowData(Store.flowdata); + + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + if(hasPartMC(Store.config, r1, r2, c1, c2)){ + has_PartMC = true; + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + + return; + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + if(pivotTable.isPivotRange(r, c)){ + continue; + } + + if(getObjType(d[r][c]) == "object"){ + delete d[r][c]["m"]; + delete d[r][c]["v"]; + + if(d[r][c]["f"] != null){ + delete d[r][c]["f"]; + formula.delFunctionGroup(r, c, Store.currentSheetIndex); + + delete d[r][c]["spl"]; + } + } + else{ + d[r][c] = null; + } + } + } + } + + jfrefreshgrid(d, Store.luckysheet_select_save); + } + }); + + //行高列宽设置 + $("#luckysheet-rows-cols-changesize").click(function(){ + $("#luckysheet-rightclick-menu").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let size = parseInt($(this).siblings("input[type='number']").val().trim()); + + if(size < 0 || size > 255){ + if(isEditMode()){ + alert("数值必须在0 ~ 255之间"); + } + else{ + tooltip.info("数值必须在0 ~ 255之间", ""); + } + + return; + } + + let cfg = $.extend(true, {}, Store.config); + let type; + + if(Store.luckysheetRightHeadClickIs == "row"){ + type = "resizeR"; + + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0]; + let r2 = Store.luckysheet_select_save[s].row[1]; + + for(let r = r1; r <= r2; r++){ + cfg["rowlen"][r] = size; + } + } + } + else if(Store.luckysheetRightHeadClickIs == "column"){ + type = "resizeC"; + + if(cfg["columlen"] == null){ + cfg["columlen"] = {}; + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let c1 = Store.luckysheet_select_save[s].column[0]; + let c2 = Store.luckysheet_select_save[s].column[1]; + + for(let c = c1; c <= c2; c++){ + cfg["columlen"][c] = size; + } + } + } + + if (Store.clearjfundo) { + Store.jfundo = []; + Store.jfredo.push({ + "type": "resize", + "ctrlType": type, + "config": $.extend(true, {}, Store.config), + "curconfig": $.extend(true, {}, cfg), + "sheetIndex": Store.currentSheetIndex + }); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + if(Store.luckysheetRightHeadClickIs == "row"){ + server.saveParam("cg", Store.currentSheetIndex, cfg["rowlen"], { "k": "rowlen" }); + jfrefreshgrid_rhcw(Store.flowdata.length, null); + } + else if(Store.luckysheetRightHeadClickIs == "column"){ + server.saveParam("cg", Store.currentSheetIndex, cfg["columlen"], { "k": "columlen" }); + jfrefreshgrid_rhcw(null, Store.flowdata[0].length); + } + }); + + //模态框拖动 + $(document).on("mousedown", "div.luckysheet-modal-dialog", function (e) { + if (!$(e.target).is(".luckysheet-modal-dialog")) { + return; + } + + Store.luckysheet_model_move_state = true; + + Store.luckysheet_model_move_obj = $(e.currentTarget); + let toffset = Store.luckysheet_model_move_obj.offset(); + Store.luckysheet_model_xy = [e.pageX - toffset.left, e.pageY - toffset.top]; + }); + + //模态框关闭 + $(document).on("click", ".luckysheet-modal-dialog-title-close, .luckysheet-model-close-btn", function (e) { + //选择文本颜色和单元格颜色弹出框取消 + if($("#textcolorselect").is(":visible")||$("#cellcolorselect").is(":visible")){ + $("#luckysheet-conditionformat-dialog").show(); + } + $(e.currentTarget).parents(".luckysheet-modal-dialog").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + + //函数查找功能所有弹出框关闭和取消 + if($(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula")){ + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + } + if($(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm")){ + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + } + if($(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm-select")){ + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + } + + $("#" + Store.container).attr("tabindex", 0).focus(); + }); + + //排序事件 + let luckysheet_sort_initial = true; + $("#luckysheetorderby").click(function () { + $("body .luckysheet-cols-menu").hide(); + const _locale = locale(); + const locale_sort = _locale.sort; + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert(locale_sort.noRangeError); + } + else{ + tooltip.info(locale_sort.noRangeError, ""); + } + return; + } + + let last = Store.luckysheet_select_save[0]; + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + + if (luckysheet_sort_initial) { + luckysheet_sort_initial = false; + + let content = `
${locale_sort.hasTitle}
+ ${locale_sort.addOthers}
`; + + $("body").append(replaceHtml(modelHTML, { "id": "luckysheet-sort-dialog", "addclass": "", "title": "排序范围", "content": content, "botton": ``})); + + $("#luckysheet-sort-dialog .luckysheet-sort-dialog-additem").click(function () { + let last = Store.luckysheet_select_save[0]; + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + + let option = "", i = $("#luckysheet-sort-dialog table").data("itemcount") + 1; + let t = $("#luckysheet-sort-haveheader").is(':checked'); + + for (let c = c1; c <= c2; c++) { + if (t) { + let v = getcellvalue(r1, c, Store.flowdata, "m"); + + if(v == null){ + v = locale_sort.columnOperation + (c - c1 + 1); + } + + option += ''; + } + else { + option += ''; + } + } + + $("#luckysheet-sort-dialog table").append(` + + ${locale_sort.secondaryTitle} + +
+
+
+ + + `); + $("#luckysheet-sort-dialog table").data("itemcount", i); + }); + + $("#luckysheet-sort-haveheader").change(function () { + let last = Store.luckysheet_select_save[0]; + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + + let t = $(this).is(':checked'); + let option = ""; + + for (let c = c1; c <= c2; c++) { + if (t) { + let v = getcellvalue(r1, c, Store.flowdata, "m"); + + if(v == null){ + v = locale_sort.columnOperation + (c - c1 + 1); + } + + option += ''; + } + else { + option += ''; + } + } + + $("#luckysheet-sort-dialog tr select").each(function () { + $(this).html(option); + }); + }); + + //Custom sort + $("#luckysheet-sort-modal-confirm").click(function () { + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert(locale_sort.noRangeError); + } + else{ + tooltip.info(locale_sort.noRangeError, ""); + } + + return; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + + let last = Store.luckysheet_select_save[0]; + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + + //Data has header row + let t = $("#luckysheet-sort-haveheader").is(':checked'); + + let str; + if(t){ + str = r1 + 1; + } + else{ + str = r1; + } + + let hasMc = false; //Whether the sort selection has merged cells + + let data = []; + + for(let r = str; r <= r2; r++){ + let data_row = []; + + for(let c = c1; c <= c2; c++){ + if(d[r][c] != null && d[r][c].mc != null){ + hasMc = true; + break; + } + + data_row.push(d[r][c]); + } + + data.push(data_row); + } + + if(hasMc){ + if(isEditMode()){ + alert(locale_sort.mergeError); + } + else{ + tooltip.info(locale_sort.mergeError, ""); + } + + return; + } + + $($("#luckysheet-sort-dialog table tr").toArray().reverse()).each(function () { + let i = $(this).find("select").val(), + asc = $(this).find('input:radio:checked').val(); + + i -= c1; + + if (asc == "asc") { + asc = true; + } + else { + asc = false; + } + + data = orderbydata([].concat(data), i, asc); + }); + + for(let r = str; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + d[r][c] = data[r - str][c - c1]; + } + } + + if(Store.config["rowlen"] != null){ + let cfg = $.extend(true, {}, Store.config); + cfg = rowlenByRange(d, str, r2, cfg); + + jfrefreshgrid(d, [{ "row": [str, r2], "column": [c1, c2] }], cfg, null, true); + } + else{ + jfrefreshgrid(d, [{ "row": [str, r2], "column": [c1, c2] }]); + } + + $("#luckysheet-sort-dialog").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + }); + } + + let option = ""; + for (let c = c1; c <= c2; c++) { + option += ''; + } + + $("#luckysheet-sort-dialog select").html(option); + + $("#luckysheet-sort-dialog .luckysheet-sort-dialog-tr").remove(); + + $("#luckysheet-sort-haveheader").prop("checked", false); + $("#luckysheet-sort-dialog input:radio:first").prop("checked", "checked"); + + $("#luckysheet-sort-dialog .luckysheet-modal-dialog-title-text").html(locale_sort.sortRangeTitle+"" + chatatABC(c1) + (r1 + 1) + ""+ locale_sort.sortRangeTitleTo +"" + chatatABC(c2) + (r2 + 1) + ""); + + let $t = $("#luckysheet-sort-dialog"), myh = $t.outerHeight(), myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + + $("#luckysheet-sort-dialog-tablec").css("max-height", (winh - myh) / 2); + $("#luckysheet-sort-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 2 }).show(); + $("#luckysheet-modal-dialog-mask").show(); + + if (r1 < r2) { + setTimeout(function () { + let flowrowdata1 = Store.flowdata[r1], + flowrowdata2 = Store.flowdata[r1 + 1], + hastitle = false; + + for (let i = c1; i <= c2; i++) { + let isdatatype_r1 = isdatatype(flowrowdata1[i]), + isdatatype_r2 = isdatatype(flowrowdata2[i]); + + if (isdatatype_r1 != isdatatype_r2) { + hastitle = true; + } + } + + if (hastitle) { + $("#luckysheet-sort-haveheader").prop("checked", true).change(); + } + }, 10); + } + }); + + //filter event handler + let hidefilersubmenu = null; + $("#luckysheetfilter").click(createFilter); + + $("#luckysheet-filter-menu").mouseover(function () { + clearTimeout(hidefilersubmenu); + + hidefilersubmenu = setTimeout(function () { + $("#luckysheet-filter-submenu").hide(); + }, 500); + }); + + $("#luckysheet-filter-submenu").mouseover(function () { + clearTimeout(hidefilersubmenu); + }).find(".luckysheet-cols-menuitem").click(function (e) { + $("#luckysheet-filter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value", $(this).data("value")); + $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide(); + + let $type = $(this).data("type"); + let $value = $(this).attr("data-value"); + + if ($type == "2") { + $("#luckysheet-filter-selected span").data("type", "2"); + $("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show(); + $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "number"); + } + else if ($type == "0") { + $("#luckysheet-filter-selected span").data("type", "0"); + } + else { + $("#luckysheet-filter-selected span").data("type", "1"); + $("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show(); + + //若是日期 改变input type类型为date + if($value == "dateequal" || $value == "datelessthan" || $value == "datemorethan"){ + $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "date"); + } + else if($value == "morethan" || $value == "moreequalthan" || $value == "lessthan" || $value == "lessequalthan" || $value == "equal" || $value == "noequal"){ + $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "number"); + } + else{ + $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "text"); + } + } + + $("#luckysheet-filter-byvalue").next().slideUp(); + $("#luckysheet-filter-submenu").hide(); + }); + + $("#luckysheet-filter-bycondition, #luckysheet-filter-byvalue").click(function () { + let $t = $(this); + $t.next().slideToggle(200); + + setTimeout(function () { + if ($t.attr("id") == "luckysheet-filter-bycondition" && $("#luckysheet-filter-bycondition").next().is(":visible")) { + if ($("#luckysheet-filter-selected span").text() != "无") { + $("#luckysheet-filter-byvalue").next().slideUp(200); + } + } + + if ($t.is($("#luckysheet-filter-bycondition"))) { + if ($("#luckysheet-filter-bycondition").next().is(":hidden") && $("#luckysheet-filter-byvalue").next().is(":hidden")) { + $("#luckysheet-filter-byvalue").next().slideDown(200); + } + } + }, 300); + }); + + $("#luckysheet-filter-selected").click(function () { + let $t = $(this), toffset = $t.offset(), $menu = $("#luckysheet-filter-submenu"); + $menu.hide(); + + let winH = $(window).height(), winW = $(window).width(); + let menuW = $menu.width(), menuH = $menu.height(); + let top = toffset.top, left = toffset.left, mheight = winH - toffset.top - 20; + + if (toffset.left + menuW > winW) { + left = toffset.left - menuW; + } + + if (toffset.top > winH / 2) { + top = winH - toffset.top; + + if (top < 0) { + top = 0; + } + + mheight = toffset.top - 20; + } + + $menu.css({ "top": top, "left": left, "height": mheight }).show(); + clearTimeout(hidefilersubmenu); + }); + + //筛选按钮点击事件 + $("#luckysheet-cell-main").on("click", ".luckysheet-filter-options", function (e) { + let $t = $(e.currentTarget), + toffset = $t.offset(), + $menu = $("#luckysheet-filter-menu"), + winH = $(window).height(), + winW = $(window).width(); + + let st_r = $t.data("str"), + ed_r = $t.data("edr"), + cindex = $t.data("cindex"), + st_c = $t.data("stc"), + ed_c = $t.data("edc"), + rowhidden = $t.data("rowhidden") == "" ? {} : JSON.parse($t.data("rowhidden").replace(/\'/g, '"')); + + $("body .luckysheet-cols-menu").hide(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + $("#luckysheet-filter-byvalue-input").val(""); + $("#luckysheet-filter-bycondition").next().hide(); + $("#luckysheet-filter-byvalue").next().show(); + + $menu.data("str", st_r); + $menu.data("edr", ed_r); + $menu.data("cindex", cindex); + $menu.data("stc", st_c); + $menu.data("edc", ed_c); + + $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(); + $("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无"); + + let byconditiontype = $t.data("byconditiontype"); + $("#luckysheet-filter-selected span").data("value", $t.data("byconditionvalue")).data("type", byconditiontype).text($t.data("byconditiontext")); + + if (byconditiontype == "2") { + let $input = $("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show().find("input"); + $input.eq(0).val($t.data("byconditionvalue1")); + $input.eq(1).val($t.data("byconditionvalue2")); + } + else if (byconditiontype == "1") { + $("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show().find("input").val($t.data("byconditionvalue1")); + } + + $("#luckysheet-filter-orderby-asc").off("click").on("click", function () { + orderbydatafiler(st_r, st_c, ed_r, ed_c, cindex, true); + }); + + $("#luckysheet-filter-orderby-desc").off("click").on("click", function () { + orderbydatafiler(st_r, st_c, ed_r, ed_c, cindex, false); + }); + + $("#luckysheet-filter-byvalue-select").empty().html('
数据量大!请稍后
'); + + let rowhiddenother = {}; //其它筛选列的隐藏行 + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").not(this).each(function () { + let $t = $(this), rh = $t.data("rowhidden"); + + if (rh == "") { + return true; + } + + rh = JSON.parse(rh.replace(/\'/g, '"')); + + for (let r in rh) { + rowhiddenother[r] = 0; + } + }); + + let data = Store.flowdata; + + setTimeout(function () { + //日期值 + let dvmap = {}; + let dvmap_uncheck = {}; + + //除日期以外的值 + let vmap = {}; + let vmap_uncheck = {}; + + for (let r = st_r + 1; r <= ed_r; r++) { + if(r in rowhiddenother){ + continue; + } + + if(Store.flowdata[r] == null){ + continue; + } + + let cell = Store.flowdata[r][cindex]; + + if(cell != null && !isRealNull(cell.v) && cell.ct != null && cell.ct.t == "d" ){ //单元格是日期 + let v = update("YYYY-MM-DD", cell.v); + + let y = v.split("-")[0]; + let m = v.split("-")[1]; + let d = v.split("-")[2]; + + if(!(y in dvmap)){ + dvmap[y] = {}; + } + + if(!(m in dvmap[y])){ + dvmap[y][m] = {}; + } + + if(!(d in dvmap[y][m])){ + dvmap[y][m][d] = 0; + } + + dvmap[y][m][d]++; + + if(r in rowhidden){ + dvmap_uncheck[y] = 0; + dvmap_uncheck[m] = 0; + dvmap_uncheck[d] = 0; + } + } + else{ + let v, m; + if(cell == null || isRealNull(cell.v)){ + v = null; + m = null; + } + else{ + v = cell.v; + m = cell.m; + } + + if(!(v in vmap)){ + vmap[v] = {}; + } + + if(!(m in vmap[v])){ + vmap[v][m] = 0; + } + + vmap[v][m]++; + + if(r in rowhidden){ + vmap_uncheck[v + "#$$$#" + m] = 0; + } + } + } + + //遍历数据加到页面 + let item = []; + + if(JSON.stringify(dvmap).length > 2){ + for(let y in dvmap){ + let ysum = 0; + let monthHtml = ''; + + for(let m in dvmap[y]){ + let msum = 0; + let dayHtml = ''; + + for(let d in dvmap[y][m]){ + let dayL = dvmap[y][m][d]; + msum += dayL; + + //月 小于 10 + let mT; + if(Number(m) < 10){ + mT = "0" + Number(m); + } + else{ + mT = m; + } + + //日 小于 10 + let dT; + if(Number(d) < 10){ + dT = "0" + Number(d); + } + else{ + dT = d; + } + + //日是否选中状态 + if((y in dvmap_uncheck) && (m in dvmap_uncheck) && (d in dvmap_uncheck)){ + dayHtml += '
' + + '' + + '' + + '( ' + dayL + ' )' + + '
'; + } + else{ + dayHtml += '
' + + '' + + '' + + '( ' + dayL + ' )' + + '
'; + } + } + + ysum += msum; + + //月 小于 10 + let mT2; + if(Number(m) < 10){ + mT2 = "0" + Number(m); + } + else{ + mT2 = m; + } + + //月是否选中状态 + if((y in dvmap_uncheck) && (m in dvmap_uncheck)){ + monthHtml += '
' + + '
' + + '' + + '' + + '' + + '( ' + msum + ' )' + + '
' + + '
' + dayHtml + '
' + + '
'; + } + else{ + monthHtml += '
' + + '
' + + '' + + '' + + '' + + '( ' + msum + ' )' + + '
' + + '
' + dayHtml + '
' + + '
'; + } + } + + //年是否选中状态 + let yearHtml; + if(y in dvmap_uncheck){ + yearHtml = '
' + + '
' + + '' + + '' + + '' + + '( ' + ysum + ' )' + + '
' + + '
' + monthHtml + '
' + + '
'; + } + else{ + yearHtml = '
' + + '
' + + '' + + '' + + '' + + '( ' + ysum + ' )' + + '
' + + '
' + monthHtml + '
' + + '
'; + } + + item.unshift(yearHtml); + } + } + + if(JSON.stringify(vmap).length > 2){ + let vmapKeys = Object.keys(vmap); + vmapKeys = orderbydata1D(vmapKeys, true); + + for(let i = 0; i < vmapKeys.length; i++){ + let v = vmapKeys[i]; + + for(let x in vmap[v]){ + let text; + if((v + "#$$$#" + x) == "null#$$$#null"){ + text = "(空白)"; + } + else{ + text = x; + } + + //是否选中状态 + let dataHtml; + if((v + "#$$$#" + x) in vmap_uncheck){ + dataHtml = '
' + + '' + + '' + + '( ' + vmap[v][x] + ' )' + + '
'; + } + else{ + dataHtml = '
' + + '' + + '' + + '( ' + vmap[v][x] + ' )' + + '
'; + } + + item.push(dataHtml); + } + } + } + + $("#luckysheet-filter-byvalue-select").html("
" + item.join("") + "
"); + }, 1); + + showrightclickmenu($menu, toffset.left, toffset.top + 20); + + e.stopPropagation(); + return false; + }); + + //按颜色筛选 + $("#luckysheet-filter-orderby-color").hover( + function(){ + //遍历筛选列颜色 + let $menu = $("#luckysheet-filter-menu"); + let st_r = $menu.data("str"), + ed_r = $menu.data("edr"), + cindex = $menu.data("cindex"), + st_c = $menu.data("stc"), + ed_c = $menu.data("edc"); + let bgMap = {}; //单元格颜色 + let fcMap = {}; //字体颜色 + + let af_compute = alternateformat.getComputeMap(); + let cf_compute = conditionformat.getComputeMap(); + + for (let r = st_r + 1; r <= ed_r; r++) { + let cell = Store.flowdata[r][cindex]; + + //单元格颜色 + let bg = menuButton.checkstatus(Store.flowdata, r, cindex , "bg"); + + let checksAF = alternateformat.checksAF(r, cindex, af_compute); + if(checksAF != null){//若单元格有交替颜色 + bg = checksAF[1]; + } + + let checksCF = conditionformat.checksCF(r, cindex, cf_compute); + if(checksCF != null && checksCF["cellColor"] != null){//若单元格有条件格式 + bg = checksCF["cellColor"]; + } + + if(bg.indexOf("rgb") > -1){ + bg = rgbTohex(bg); + } + + if(bg.length == 4){ + bg = bg.substr(0, 1) + bg.substr(1, 1).repeat(2) + bg.substr(2, 1).repeat(2) + bg.substr(3, 1).repeat(2); + } + + //字体颜色 + let fc = menuButton.checkstatus(Store.flowdata, r, cindex , "fc"); + + if(checksAF != null){//若单元格有交替颜色 + fc = checksAF[0]; + } + + if(checksCF != null && checksCF["textColor"] != null){//若单元格有条件格式 + fc = checksCF["textColor"]; + } + + if(fc.indexOf("rgb") > -1){ + fc = rgbTohex(fc); + } + + if(fc.length == 4){ + fc = fc.substr(0, 1) + fc.substr(1, 1).repeat(2) + fc.substr(2, 1).repeat(2) + fc.substr(3, 1).repeat(2); + } + + if(Store.config != null && Store.config["rowhidden"] != null && r in Store.config["rowhidden"]){ + bgMap[bg] = 1; + + if(cell != null && !isRealNull(cell.v)){ + fcMap[fc] = 1; + } + } + else{ + bgMap[bg] = 0; + + if(cell != null && !isRealNull(cell.v)){ + fcMap[fc] = 0; + } + } + } + // + let filterBgColorHtml = ''; + if(JSON.stringify(bgMap).length > 2 && Object.keys(bgMap).length > 1){ + let bgColorItemHtml = ''; + for(let b in bgMap){ + if(bgMap[b] == 0){ + bgColorItemHtml += '
'; + } + else{ + bgColorItemHtml += '
'; + } + } + filterBgColorHtml = '
按单元格颜色筛选
' + bgColorItemHtml + '
'; + } + + let filterFcColorHtml = ''; + if(JSON.stringify(fcMap).length > 2 && Object.keys(fcMap).length > 1){ + let fcColorItemHtml = ''; + for(let f in fcMap){ + if(fcMap[f] == 0){ + fcColorItemHtml += '
'; + } + else{ + fcColorItemHtml += '
'; + } + } + filterFcColorHtml = '
按字体颜色筛选
' + fcColorItemHtml + '
'; + } + // + let content; + if(filterBgColorHtml == '' && filterFcColorHtml == ''){ + content = '
本列仅包含一种颜色
'; + } + else{ + content = filterBgColorHtml + filterFcColorHtml + '
'; + } + //颜色筛选子菜单 + $("#luckysheet-filter-orderby-color-submenu").remove(); + $("body").append('
'+content+'
'); + let $t = $("#luckysheet-filter-orderby-color-submenu").end(); + let $con = $(this).parent(); + let winW = $(window).width(), winH = $(window).height(); + let menuW = $con.width(), + myh = $t.height() + 25, + myw = $t.width() + 5; + let offset = $(this).offset(); + let top = offset.top, left = offset.left + menuW; + + if (left + myw > winW) { + left = offset.left - myw; + } + + if (top + myh > winH) { + top = winH - myh; + } + + $("#luckysheet-filter-orderby-color-submenu").css({ "top": top, "left": left }).show(); + }, + function(){ + submenuhide = setTimeout(function () { $("#luckysheet-filter-orderby-color-submenu").hide(); }, 200); + } + ); + + $(document).on("mouseover mouseleave", "#luckysheet-filter-orderby-color-submenu", function(e){ + if (e.type === "mouseover") { + clearTimeout(submenuhide); + } + else { + $(this).hide(); + } + }); + $(document).on("click", "#luckysheet-filter-orderby-color-submenu .item label", function(){ + $(this).siblings("input[type='checkbox']").click(); + }); + $(document).off("click.orderbyColorConfirm").on("click.orderbyColorConfirm", "#luckysheet-filter-orderby-color-submenu #luckysheet-filter-orderby-color-confirm", function(){ + let bg_colorMap = {}; + let fc_colorMap = {}; + + $("#luckysheet-filter-orderby-color-submenu .item").each(function(i, e){ + if($(e).find("input[type='checkbox']").is(":checked")){ + let color = $(this).find("label").attr("title"); + let $id = $(this).closest(".box").attr("id"); + + if($id == "filterBgColor"){ + bg_colorMap[color] = 0; + } + else if($id == "filterFcColor"){ + fc_colorMap[color] = 0; + } + } + }); + + let bg_filter; + if($("#luckysheet-filter-orderby-color-submenu #filterBgColor").length > 0){ + bg_filter = true; + } + else{ + bg_filter = false; + } + + let fc_filter; + if($("#luckysheet-filter-orderby-color-submenu #filterFcColor").length > 0){ + fc_filter = true; + } + else{ + fc_filter = false; + } + + let $menu = $("#luckysheet-filter-menu"); + let st_r = $menu.data("str"), + ed_r = $menu.data("edr"), + cindex = $menu.data("cindex"), + st_c = $menu.data("stc"), + ed_c = $menu.data("edc"); + + let rowhiddenother = {}; //其它筛选列的隐藏行 + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c).get(0)).each(function () { + let $t = $(this), rh = $t.data("rowhidden"); + + if (rh == "") { + return true; + } + + rh = JSON.parse(rh); + + for (let r in rh) { + rowhiddenother[r] = 0; + } + }); + + let filterdata = {}; + let rowhidden = {}; + let caljs = {}; + + let af_compute = alternateformat.getComputeMap(); + let cf_compute = conditionformat.getComputeMap(); + + for (let r = st_r + 1; r <= ed_r; r++) { + if(r in rowhiddenother){ + continue; + } + + if(Store.flowdata[r] == null){ + continue; + } + + let cell = Store.flowdata[r][cindex]; + + //单元格颜色 + let bg = menuButton.checkstatus(Store.flowdata, r, cindex , "bg"); + + let checksAF = alternateformat.checksAF(r, cindex, af_compute); + if(checksAF != null){//若单元格有交替颜色 + bg = checksAF[1]; + } + + let checksCF = conditionformat.checksCF(r, cindex, cf_compute); + if(checksCF != null && checksCF["cellColor"] != null){//若单元格有条件格式 + bg = checksCF["cellColor"]; + } + + if(bg.indexOf("rgb") > -1){ + bg = rgbTohex(bg); + } + + if(bg.length == 4){ + bg = bg.substr(0, 1) + bg.substr(1, 1).repeat(2) + bg.substr(2, 1).repeat(2) + bg.substr(3, 1).repeat(2); + } + + //文本颜色 + let fc = menuButton.checkstatus(Store.flowdata, r, cindex , "fc"); + + if(checksAF != null){//若单元格有交替颜色 + fc = checksAF[0]; + } + + if(checksCF != null && checksCF["textColor"] != null){//若单元格有条件格式 + fc = checksCF["textColor"]; + } + + if(fc.indexOf("rgb") > -1){ + fc = rgbTohex(fc); + } + + if(fc.length == 4){ + fc = fc.substr(0, 1) + fc.substr(1, 1).repeat(2) + fc.substr(2, 1).repeat(2) + fc.substr(3, 1).repeat(2); + } + + if(bg_filter && fc_filter){ + if(!(bg in bg_colorMap) && (!(fc in fc_colorMap) || cell == null || isRealNull(cell.v))){ + rowhidden[r] = 0; + } + } + else if(bg_filter){ + if(!(bg in bg_colorMap)){ + rowhidden[r] = 0; + } + } + else if(fc_filter){ + if(!(fc in fc_colorMap) || cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + } + } + + let $top = $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c); + + let optionstate = Object.keys(rowhidden).length > 0; + + let rowhiddenall = $.extend(true, rowhiddenother, rowhidden), + rowhidenPre = json.parseJsonParm($top.data("rowhidden")); + + labelFilterOptionState($top, optionstate, rowhidden, caljs, true, st_r, ed_r, cindex, st_c, ed_c); + + let cfg = $.extend(true, {}, Store.config); + cfg["rowhidden"] = rowhiddenall; + + //保存撤销 + if(Store.clearjfundo){ + let redo = {}; + redo["type"] = "datachangeAll_filter"; + redo["sheetIndex"] = Store.currentSheetIndex; + + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = cfg; + + redo["optionstate"] = optionstate; + redo["optionsindex"] = cindex - st_c; + + redo["rowhidden"] = $.extend(true, {}, rowhidden); + redo["rowhidenPre"] = $.extend(true, {}, rowhidenPre); + + if (caljs != null) { + redo["caljs"] = caljs; + } + + Store.jfundo = []; + Store.jfredo.push(redo); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, cfg["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + + $("#luckysheet-filter-menu, #luckysheet-filter-submenu, #luckysheet-filter-orderby-color-submenu").hide(); + cleargridelement(); + }); + + //点击复选框 + $(document).off("click.filterCheckbox1").on("click.filterCheckbox1", "#luckysheet-filter-byvalue-select .textBox",function(){ + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).find("input[type='checkbox']").prop("checked", true); + } + }) + $(document).off("click.filterCheckbox2").on("click.filterCheckbox2", "#luckysheet-filter-byvalue-select .year",function(){ + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).parents(".yearBox").find(".month").attr("data-check", "false"); + $(this).parents(".yearBox").find(".day").attr("data-check", "false"); + $(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).parents(".yearBox").find(".month").attr("data-check", "true"); + $(this).parents(".yearBox").find(".day").attr("data-check", "true"); + $(this).parents(".yearBox").find("input[type='checkbox']").prop("checked", true); + } + }) + $(document).off("click.filterCheckbox3").on("click.filterCheckbox3", "#luckysheet-filter-byvalue-select .month",function(){ + //月份 对应的 天 + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).parents(".monthBox").find(".day").attr("data-check", "false"); + $(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).parents(".monthBox").find(".day").attr("data-check", "true"); + $(this).parents(".monthBox").find("input[type='checkbox']").prop("checked", true); + } + //月份 对应的 年份 + let yearDayAllCheck = true; + let $yearDay = $(this).parents(".yearBox").find(".day"); + $yearDay.each(function(i,e){ + if($(e).attr("data-check") == "true"){ + + } + else{ + yearDayAllCheck = false; + } + }); + if(yearDayAllCheck){ + $(this).parents(".yearBox").find(".year").attr("data-check", "true"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); + } + else{ + $(this).parents(".yearBox").find(".year").attr("data-check", "false"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); + } + }) + $(document).off("click.filterCheckbox4").on("click.filterCheckbox4", "#luckysheet-filter-byvalue-select .day",function(){ + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).find("input[type='checkbox']").prop("checked", true); + } + //天 对应的 月份 + let monthDayAllCheck = true; + let $monthDay = $(this).parents(".monthBox").find(".day"); + $monthDay.each(function(i,e){ + if($(e).attr("data-check") == "true"){ + + } + else{ + monthDayAllCheck = false; + } + }); + if(monthDayAllCheck){ + $(this).parents(".monthBox").find(".month").attr("data-check", "true"); + $(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked", true); + } + else{ + $(this).parents(".monthBox").find(".month").attr("data-check", "false"); + $(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"); + } + //天 对应的 年份 + let yearDayAllCheck = true; + let $yearDay = $(this).parents(".yearBox").find(".day"); + $yearDay.each(function(i,e){ + if($(e).attr("data-check") == "true"){ + + } + else{ + yearDayAllCheck = false; + } + }); + if(yearDayAllCheck){ + $(this).parents(".yearBox").find(".year").attr("data-check", "true"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); + } + else{ + $(this).parents(".yearBox").find(".year").attr("data-check", "false"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); + } + }) + + //日期 三级下拉显示 + $(document).off("click.filterYearDropdown").on("click.filterYearDropdown", "#luckysheet-filter-byvalue-select .yearBox .fa-caret-right",function(event){ + let $p = $(this).parents(".luckysheet-mousedown-cancel"); + if($p.hasClass("year")){ + $(this).parents(".yearBox").find(".monthList").slideToggle(); + } + if($p.hasClass("month")){ + $(this).parents(".monthBox").find(".dayList").slideToggle(); + } + + event.stopPropagation(); + }); + + //全选 + $("#luckysheet-filter-byvalue-btn-all").click(function () { + $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").prop("checked", true); + $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); + }); + + //清除 + $("#luckysheet-filter-byvalue-btn-clear").click(function () { + $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"); + $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); + }); + + //反选 + $("#luckysheet-filter-byvalue-btn-contra").click(function () { + let $input = $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']"); + $input.each(function(i, e){ + if($(e).is(":checked")){ + $(e).removeAttr("checked"); + $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); + } + else{ + $(e).prop("checked", true); + $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); + } + }); + //天 对应的 月份 + let $month = $("#luckysheet-filter-byvalue-select .ListBox .monthBox"); + $month.each(function(index, event){ + let monthDayAllCheck = true; + let $monthDay = $(event).find(".day input[type='checkbox']"); + $monthDay.each(function(i,e){ + if($(e).is(":checked")){ + + } + else{ + monthDayAllCheck = false; + } + }); + if(monthDayAllCheck){ + $(event).find(".month input[type='checkbox']").prop("checked", true); + $(event).attr("data-check", "true"); + } + else{ + $(event).find(".month input[type='checkbox']").removeAttr("checked"); + $(event).attr("data-check", "false"); + } + }); + //天 对应的 年份 + let $year = $("#luckysheet-filter-byvalue-select .ListBox .yearBox"); + $year.each(function(index, event){ + let yearDayAllCheck = true; + let $yearDay = $(event).find(".day input[type='checkbox']"); + $yearDay.each(function(i,e){ + if($(e).is(":checked")){ + + } + else{ + yearDayAllCheck = false; + } + }); + if(yearDayAllCheck){ + $(event).find(".year input[type='checkbox']").prop("checked", true); + $(event).attr("data-check", "true"); + } + else{ + $(event).find(".year input[type='checkbox']").removeAttr("checked"); + $(event).attr("data-check", "false"); + } + }); + }); + + //清除筛选 + $("#luckysheet-filter-initial").click(function () { + $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(); + $("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无"); + + $('#luckysheet-filter-selected-sheet' + Store.currentSheetIndex + ', #luckysheet-filter-options-sheet' + Store.currentSheetIndex).remove(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + + let redo = {}; + redo["type"] = "datachangeAll_filter_clear"; + redo["sheetIndex"] = Store.currentSheetIndex; + + redo["config"] = $.extend(true, {}, Store.config); + Store.config["rowhidden"] = {}; + redo["curconfig"] = $.extend(true, {}, Store.config); + + redo["filter_save"] = $.extend(true, {}, Store.luckysheet_filter_save); + + let optiongroups = []; + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").each(function () { + let $t = $(this); + + let optionstate = $t.hasClass("luckysheet-filter-options-active"); + let rowhidden = json.parseJsonParm($t.data("rowhidden")); + let caljs = json.parseJsonParm($t.data("caljs")); + + optiongroups.push({ + "optionstate":optionstate, + "rowhidden": rowhidden, + "caljs":caljs, + "str": $t.data("str"), + "edr": $t.data("edr"), + "cindex": $t.data("cindex"), + "stc": $t.data("stc"), + "edc": $t.data("edc") + }); + }); + redo["optiongroups"] = optiongroups; + + Store.jfundo = []; + Store.jfredo.push(redo); + + //清除筛选发送给后台 + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].filter = null; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].filter_select = null; + + server.saveParam("fsc", Store.currentSheetIndex, null); + + //config + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, {}, { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + }); + + //按照值进行筛选 + $("#luckysheet-filter-byvalue-input").on('input propertychange', function () { + let v = $(this).val().toString(); + $("#luckysheet-filter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(); + + if(v != ""){ + $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(i, e){ + if($(e).closest(".day").length > 0){ + let day = $(e).siblings("label").text().toString(); + let month = $(e).closest(".monthBox").find(".month label").text().toString(); + let year = $(e).closest(".yearBox").find(".year label").text().toString(); + let itemV = year + "-" + month + "-" + day; + + if(itemV.indexOf(v) == -1){ + $(e).closest(".day").hide(); + + //天 对应的 月份 + let $monthDay = $(e).closest(".dayList").find(".day:visible"); + if($monthDay.length == 0){ + $(e).closest(".monthBox").find(".month").hide(); + } + + //天 对应的 年份 + let $yearDay = $(e).closest(".monthList").find(".day:visible"); + if($yearDay.length == 0){ + $(e).closest(".yearBox").find(".year").hide(); + } + } + } + + if($(e).closest(".textBox").length > 0){ + let itemV = $(e).siblings("label").text().toString(); + + if(itemV.indexOf(v) == -1){ + $(e).parents(".textBox").hide(); + } + } + }); + } + }); + + //筛选取消 + $("#luckysheet-filter-cancel").click(function () { + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + }); + + //筛选 确认 + $("#luckysheet-filter-confirm").click(function () { + let $menu = $("#luckysheet-filter-menu"); + let st_r = $menu.data("str"), + ed_r = $menu.data("edr"), + cindex = $menu.data("cindex"), + st_c = $menu.data("stc"), + ed_c = $menu.data("edc"); + + let rowhiddenother = {}; //其它筛选列的隐藏行 + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c).get(0)).each(function () { + let $t = $(this), rh = $t.data("rowhidden"); + + if (rh == "") { + return true; + } + + rh = JSON.parse(rh.replace(/\'/g, '"')); + + for (let r in rh) { + rowhiddenother[r] = 0; + } + }); + + let filterdata = {}; + let rowhidden = {}; + let caljs = {}; + + if ($("#luckysheet-filter-bycondition").next().is(":visible") && $("#luckysheet-filter-byvalue").next().is(":hidden") && $("#luckysheet-filter-selected span").data("value") != "null") { + let $t = $("#luckysheet-filter-selected span"); + let type = $t.data("type"), value = $t.data("value"); + + caljs["value"] = value; + caljs["text"] = $t.text(); + + if (type == "0") { + caljs["type"] = "0"; + } + else if (type == "2") { + let $input = $("#luckysheet-filter-menu .luckysheet-filter-selected-input2 input"); + caljs["type"] = "2"; + caljs["value1"] = $input.eq(0).val(); + caljs["value2"] = $input.eq(1).val(); + } + else { + caljs["type"] = "1"; + caljs["value1"] = $("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).find("input").val(); + } + + for (let r = st_r + 1; r <= ed_r; r++) { + if(r in rowhiddenother){ + continue; + } + + if(Store.flowdata[r] == null){ + continue; + } + + let cell = Store.flowdata[r][cindex]; + + if (value == "cellnull") { //单元格为空 + if(cell != null && !isRealNull(cell.v)){ + rowhidden[r] = 0; + } + } + else if (value == "cellnonull") { //单元格有数据 + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + } + else if (value == "textinclude") { //文本包含 + let value1 = caljs["value1"]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(cell.m.indexOf(value1) == -1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textnotinclude") { //文本不包含 + let value1 = caljs["value1"]; + + if(cell == null || isRealNull(cell.v)){ + + } + else{ + if(cell.m.indexOf(value1) > -1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textstart") { //文本开头为 + let value1 = caljs["value1"], valuelen = value1.length; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(cell.m.substr(0, valuelen) != value1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textend") { //文本结尾为 + let value1 = caljs["value1"], valuelen = value1.length; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(valuelen > cell.m.length || cell.m.substr(cell.m.length - valuelen, valuelen) != value1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textequal") { //文本等于 + let value1 = caljs["value1"]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(cell.m != value1){ + rowhidden[r] = 0; + } + } + } + else if (value == "dateequal") { //日期等于 + let value1 = genarate(caljs["value1"])[2]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "d"){ + if(parseInt(cell.v) != value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "datelessthan") { //日期早于 + let value1 = genarate(caljs["value1"])[2]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "d"){ + if(parseInt(cell.v) >= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "datemorethan") { //日期晚于 + let value1 = genarate(caljs["value1"])[2]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "d"){ + if(parseInt(cell.v) <= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "morethan") { //大于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v <= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "moreequalthan") { //大于等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v < value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "lessthan") { //小于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v >= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "lessequalthan") { //小于等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v > value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "equal") { //等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v != value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "noequal") { //不等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v == value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "include") { //介于 + let value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); + + let min, max; + if(value1 < value2){ + min = value1; + max = value2; + } + else{ + max = value1; + min = value2; + } + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v < min || cell.v > max){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "noinclude") { //不在其中 + let value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); + + let min, max; + if(value1 < value2){ + min = value1; + max = value2; + } + else{ + max = value1; + min = value2; + } + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v >= min && cell.v <= max){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + } + } + else { + $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(i, e){ + if($(e).is(":visible") && $(e).is(":checked")){ + return true; + } + + if($(e).closest(".day").length > 0){ + let day = $(e).siblings("label").text(); + if(Number(day) < 10){ + day = "0" + Number(day); + } + + let month = $(e).closest(".monthBox").find(".month label").text().replace("月", ""); + if(Number(month) < 10){ + month = "0" + Number(month); + } + + let year = $(e).closest(".yearBox").find(".year label").text().replace("年", ""); + + let itemV = "日期格式#$$$#" + year + "-" + month + "-" + day; + + filterdata[itemV] = "1"; + } + + if($(e).closest(".textBox").length > 0){ + let itemV = $(e).closest(".textBox").data("filter"); + + filterdata[itemV] = "1"; + } + }); + + for (let r = st_r + 1; r <= ed_r; r++) { + if(r in rowhiddenother){ + continue; + } + + if(Store.flowdata[r] == null){ + continue; + } + + let cell = Store.flowdata[r][cindex]; + + let value; + if(cell == null || isRealNull(cell.v)){ + value = "null#$$$#null"; + } + else if(cell.ct != null && cell.ct.t == "d"){ + let fmt = update("YYYY-MM-DD", cell.v); + value = "日期格式#$$$#" + fmt; + } + else{ + value = cell.v + "#$$$#" + cell.m; + } + + if(value in filterdata){ + rowhidden[r] = 0; + } + } + } + + let $top = $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c); + + let optionstate = $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length < $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible").length || $("#luckysheet-filter-byvalue-input").val().length > 0 || ($("#luckysheet-filter-bycondition").next().is(":visible") && $("#luckysheet-filter-byvalue").next().is(":hidden") && $("#luckysheet-filter-selected span").data("value") != "null"); + + let rowhiddenall = $.extend(true, rowhiddenother, rowhidden), + rowhidenPre = json.parseJsonParm($top.data("rowhidden")); + + labelFilterOptionState($top, optionstate, rowhidden, caljs, true, st_r, ed_r, cindex, st_c, ed_c); + + let cfg = $.extend(true, {}, Store.config); + cfg["rowhidden"] = rowhiddenall; + + //保存撤销 + if(Store.clearjfundo){ + let redo = {}; + redo["type"] = "datachangeAll_filter"; + redo["sheetIndex"] = Store.currentSheetIndex; + + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = cfg; + + redo["optionstate"] = optionstate; + redo["optionsindex"] = cindex - st_c; + + redo["rowhidden"] = $.extend(true, {}, rowhidden); + redo["rowhidenPre"] = $.extend(true, {}, rowhidenPre); + + if (caljs != null) { + redo["caljs"] = caljs; + } + + Store.jfundo = []; + Store.jfredo.push(redo); + } + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("cg", Store.currentSheetIndex, cfg["rowhidden"], { "k": "rowhidden" }); + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + cleargridelement(); + }); + + //左上角返回按钮 + $("#luckysheet_info_detail_title").click(function(){ + window.open(luckysheetConfigsetting.myFolderUrl, "_self"); + }); + + $("#luckysheet_info_detail_input").val(server.title).css("width", getByteLen(server.title) * 10).keydown(function(){ + let ctrlKey = event.ctrlKey; + let altKey = event.altKey; + let shiftKey = event.shiftKey; + let kcode = event.keyCode; + let $t = $(this); + if(kcode == keycode.ENTER){ + $t.blur().change(); + } + }).bind('input propertychange', function() { + let $t = $(this); + let inputlen = getByteLen($t.val())*10; + let updatelen = $("#luckysheet_info_detail_update").outerWidth(); + let savelen = $("#luckysheet_info_detail_save").outerWidth(); + let userlen = $("#luckysheet_info_detail_user").parent().outerWidth()+60; + let containerlen = $("#" + Store.container).outerWidth(); + let otherlen = 100; + + let minuslen = containerlen- savelen - updatelen - userlen - otherlen; + if(inputlen > minuslen){ + $("#luckysheet_info_detail_input").css("width", minuslen); + } + else{ + $("#luckysheet_info_detail_input").css("width", inputlen); + } + }).change(function(){ + server.saveParam("na", null, $(this).val()); + }); + + //公式栏处理 + $("#luckysheet-functionbox-cell").focus(function () { + if(isEditMode()){//此模式下禁用公式栏 + return; + } + + if(Store.luckysheet_select_save.length > 0){ + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"], col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + row_index = margeset.row[2]; + col = margeset.column[1]; + col_pre = margeset.column[0]; + col_index = margeset.column[2]; + } + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata, null, true); + formula.rangeResizeTo = $("#luckysheet-functionbox-cell"); + } + }).keydown(function (event) { + if(isEditMode()){//此模式下禁用公式栏 + return; + } + + let ctrlKey = event.ctrlKey; + let altKey = event.altKey; + let shiftKey = event.shiftKey; + let kcode = event.keyCode; + let $inputbox = $("#luckysheet-input-box"); + + if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) { + if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) { + formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); + } + else { + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + Store.luckysheet_select_save = [{ "row": [Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[0]], "column": [Store.luckysheetCellUpdate[1], Store.luckysheetCellUpdate[1]], "row_focus": Store.luckysheetCellUpdate[0], "column_focus": Store.luckysheetCellUpdate[1] }]; + luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); + $("#luckysheet-functionbox-cell").blur(); + } + event.preventDefault(); + } + else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) { + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + event.preventDefault(); + } + else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { + formula.setfreezonFuc(event); + event.preventDefault(); + } + else if (kcode == keycode.UP && parseInt($inputbox.css("top")) > 0) { + if ($("#luckysheet-formula-search-c").is(":visible")) { + let $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev(); + if ($up.length == 0) { + $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last(); + } + $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); + $up.addClass("luckysheet-formula-search-item-active"); + event.preventDefault(); + } + } + else if (kcode == keycode.DOWN && parseInt($inputbox.css("top")) > 0) { + if ($("#luckysheet-formula-search-c").is(":visible")) { + let $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next(); + if ($up.length == 0) { + $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first(); + } + $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); + $up.addClass("luckysheet-formula-search-item-active"); + event.preventDefault(); + } + } + else if (kcode == keycode.LEFT && parseInt($inputbox.css("top")) > 0) { + formula.rangeHightlightselected($("#luckysheet-functionbox-cell")); + } + else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) { + formula.rangeHightlightselected($("#luckysheet-functionbox-cell")); + } + else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) { + formula.functionInputHanddler($("#luckysheet-rich-text-editor"), $("#luckysheet-functionbox-cell"), kcode); + } + }).click(function () { + if(isEditMode()){//此模式下禁用公式栏 + return; + } + + formula.rangeHightlightselected($("#luckysheet-functionbox-cell")); + }); + + //公式栏 取消(X)按钮 + $("#luckysheet-wa-functionbox-cancel").click(function () { + if (!$(this).hasClass("luckysheet-wa-calculate-active")) { + return; + } + //若有参数弹出框,隐藏 + if($("#luckysheet-search-formula-parm").is(":visible")){ + $("#luckysheet-search-formula-parm").hide(); + } + //若有参数选取范围弹出框,隐藏 + if($("#luckysheet-search-formula-parm-select").is(":visible")){ + $("#luckysheet-search-formula-parm-select").hide(); + } + + formula.dontupdate(); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + }); + + //公式栏 确认()按钮 + $("#luckysheet-wa-functionbox-confirm").click(function () { + if (!$(this).hasClass("luckysheet-wa-calculate-active")) { + return; + } + //若有参数弹出框,隐藏 + if($("#luckysheet-search-formula-parm").is(":visible")){ + $("#luckysheet-search-formula-parm").hide(); + } + //若有参数选取范围弹出框,隐藏 + if($("#luckysheet-search-formula-parm-select").is(":visible")){ + $("#luckysheet-search-formula-parm-select").hide(); + } + + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + }); + + //公式栏 fx按钮 + $("#luckysheet-wa-functionbox-fx").click(function () { + //点击函数查找弹出框 + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择单元格插入函数"); + } + else{ + tooltip.info("请选择单元格插入函数",""); + } + + return; + } + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"], col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); + + let cell = Store.flowdata[row_index][col_index]; + if(cell != null && cell.f != null){ + //单元格有计算 + let functionStr = formula.getfunctionParam(cell.f); + if(functionStr.fn != null){ + //有函数公式 + insertFormula.formulaParmDialog(functionStr.fn, functionStr.param); + } + else{ + //无函数公式 + insertFormula.formulaListDialog(); + } + } + else{ + //单元格无计算 + $("#luckysheet-rich-text-editor").html('='); + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + insertFormula.formulaListDialog(); + } + + insertFormula.init(); + }); + + //公式选区操作 + $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-copy", function (event) { + formula.rangeMove = true; + Store.luckysheet_scroll_status = true; + formula.rangeMoveObj = $(this).parent(); + formula.rangeMoveIndex = $(this).parent().attr("rangeindex"); + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + $("#luckysheet-formula-functionrange-highlight-" + formula.rangeMoveIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13); + + let type = $(this).data("type"); + if (type == "top") { + y += 3; + } + else if (type == "right") { + x -= 3; + } + else if (type == "bottom") { + y -= 3; + } + else if (type == "left") { + x += 3; + } + + let row_index = rowLocation(y)[2]; + let col_index = colLocation(x)[2]; + + formula.rangeMovexy = [row_index, col_index]; + $("#luckysheet-sheettable").css("cursor", "move"); + event.stopPropagation(); + }); + + $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (e) { + formula.rangeResize = $(this).data("type");//开始状态resize + formula.rangeResizeIndex = $(this).parent().attr("rangeindex"); + + let mouse = mouseposition(e.pageX, e.pageY), + scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + formula.rangeResizeObj = $(this).parent(); + $("#luckysheet-formula-functionrange-highlight-" + formula.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13); + + if (formula.rangeResize == "lt") { + x += 3; + y += 3; + } + else if (formula.rangeResize == "lb") { + x += 3; + y -= 3; + } + else if (formula.rangeResize == "rt") { + x -= 3; + y += 3; + } + else if (formula.rangeResize == "rb") { + x -= 3; + y -= 3; + } + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let position = formula.rangeResizeObj.position(); + formula.rangeResizexy = [ + col_pre, + row_pre, + formula.rangeResizeObj.width(), + formula.rangeResizeObj.height(), + position.left + scrollLeft, + position.top + scrollTop, col, row + ]; + formula.rangeResizeWinH = $("#luckysheet-cell-main")[0].scrollHeight; + formula.rangeResizeWinW = $("#luckysheet-cell-main")[0].scrollWidth; + Store.luckysheet_scroll_status = true; + event.stopPropagation(); + }); + + //图表选区mousedown + $("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowMove", ".luckysheet-chart-rangeShow-move", function(event){ + Store.chart_selection.rangeMove = true; + Store.luckysheet_scroll_status = true; + + Store.chart_selection.rangeMoveObj = $(this).parent(); + + let chart_id = luckysheet.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id"); + let chart_json = !!window.store && store.state.chartSetting.chartList[chart_id]; + + let $id = $(this).parent().attr("id"); + if($id == "luckysheet-chart-rangeShow-content"){ + let row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.content.row[0]; + let col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.content.column[0]; + + luckysheet.chart_selection.rangeMoveIndex = [row_s, col_s]; + } + else if($id == "luckysheet-chart-rangeShow-rowtitle"){ + let row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.rowtitle.row[0]; + let col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.rowtitle.column[0]; + + luckysheet.chart_selection.rangeMoveIndex = [row_s, col_s]; + } + else if($id == "luckysheet-chart-rangeShow-coltitle"){ + let row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.coltitle.row[0]; + let col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.coltitle.column[0]; + + luckysheet.chart_selection.rangeMoveIndex = [row_s, col_s]; + } + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let type = $(this).data("type"); + if (type == "top") { + y += 3; + } + else if (type == "right") { + x -= 3; + } + else if (type == "bottom") { + y -= 3; + } + else if (type == "left") { + x += 3; + } + + let row_index = rowLocation(y)[2]; + let col_index = colLocation(x)[2]; + + luckysheet.chart_selection.rangeMovexy = [row_index, col_index]; + + event.stopPropagation(); + }); + + $("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowResize", ".luckysheet-chart-rangeShow-resize", function(event){ + luckysheet.chart_selection.rangeResize = $(this).data("type");//开始状态resize + Store.luckysheet_scroll_status = true; + + luckysheet.chart_selection.rangeResizeObj = $(this).parent(); + + let chart_id = luckysheet.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id"); + // let vue = !!window.generator && generator.chartEditorComponent; + let chart_json = !!window.store && store.state.chartSetting.chartList[chart_id]; + + let $id = $(this).parent().attr("id"); + if($id == "luckysheet-chart-rangeShow-content"){ + if(chart_json.rangeRowCheck.exits){ + let row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.content.row[0]; + let row_e = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.content.row[1]; + } + else{ + let row_s = chart_json.rangeSplitArray.content.row[0]; + let row_e = chart_json.rangeSplitArray.content.row[0]; + } + + if(chart_json.rangeColCheck.exits){ + let col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.content.column[0]; + let col_e = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.content.column[1]; + } + else{ + let col_s = chart_json.rangeSplitArray.content.column[0]; + let col_e = chart_json.rangeSplitArray.content.column[1]; + } + + luckysheet.chart_selection.rangeResizeIndex = { "row": [row_s, row_e], "column": [col_s, col_e] }; + } + else if($id == "luckysheet-chart-rangeShow-rowtitle"){ + let row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.rowtitle.row[0]; + let row_e = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.rowtitle.row[1]; + + let col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.rowtitle.column[0]; + let col_e = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.rowtitle.column[1]; + + luckysheet.chart_selection.rangeResizeIndex = { "row": [row_s, row_e], "column": [col_s, col_e] }; + } + else if($id == "luckysheet-chart-rangeShow-coltitle"){ + let row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.coltitle.row[0]; + let row_e = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.coltitle.row[1]; + + let col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.coltitle.column[0]; + let col_e = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.coltitle.column[1]; + + luckysheet.chart_selection.rangeResizeIndex = { "row": [row_s, row_e], "column": [col_s, col_e] }; + } + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + if (luckysheet.chart_selection.rangeResize == "lt") { + x += 3; + y += 3; + } + else if (luckysheet.chart_selection.rangeResize == "lb") { + x += 3; + y -= 3; + } + else if (luckysheet.chart_selection.rangeResize == "rt") { + x -= 3; + y += 3; + } + else if (luckysheet.chart_selection.rangeResize == "rb") { + x -= 3; + y -= 3; + } + + let row_index = rowLocation(y)[2]; + let col_index = colLocation(x)[2]; + + luckysheet.chart_selection.rangeResizexy = [row_index, col_index]; + + event.stopPropagation(); + }) + + $("#luckysheet-wa-calculate-size").mousedown(function(e){ + let y = e.pageY; + formula.functionResizeData.y = y; + formula.functionResizeStatus = true; + formula.functionResizeData.calculatebarHeight = Store.calculatebarHeight; + if(formula.rangetosheet != null){ + formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); + } + }); + + //toolbar菜单 + $("#"+ Store.container +" .luckysheet-wa-editor").on("click", ".luckysheet-toolbar-zoom-combobox", function(e){ + $(e.currentTarget).addClass("luckysheet-toolbar-combo-button-open"); + $(e.currentTarget).find(".luckysheet-toolbar-combo-button-input").focus(); + }); + + $("#"+ Store.container +" .luckysheet-wa-editor").on("blur", ".luckysheet-toolbar-combo-button-input", function(e){ + $(e.currentTarget).closest(".luckysheet-toolbar-zoom-combobox").removeClass("luckysheet-toolbar-combo-button-open"); + }); + + //表格格式处理 + menuButton.initialMenuButton(); + + let dpi_x = document.getElementById('testdpidiv').offsetWidth * Store.devicePixelRatio; + let dpi_y = document.getElementById('testdpidiv').offsetHeight * Store.devicePixelRatio; + + //粘贴事件处理 + $(document).on("paste", function(e){ + if(isEditMode()){//此模式下禁用粘贴 + return; + } + + if(selection.isPasteAction){ + $("#luckysheet-rich-text-editor").blur(); + selection.isPasteAction = false; + + let clipboardData = window.clipboardData; //for IE + if (!clipboardData) { // for chrome + clipboardData = e.originalEvent.clipboardData; + } + + let txtdata = clipboardData.getData("text/html"); + + //如果标示是qksheet复制的内容,判断剪贴板内容是否是当前页面复制的内容 + let isEqual = true; + if(txtdata.indexOf("luckysheet_copy_action_table") >- 1 && Store.luckysheet_copy_save["copyRange"] != null && Store.luckysheet_copy_save["copyRange"].length > 0){ + //剪贴板内容解析 + let cpDataArr = []; + + let reg = new RegExp('(.*?)', 'g'); + let reg2 = new RegExp('(.*?)', 'g'); + + let regArr = txtdata.match(reg); + + for(let i = 0; i < regArr.length; i++){ + let cpRowArr = []; + + let reg2Arr = regArr[i].match(reg2); + + if(reg2Arr != null){ + for(let j = 0; j < reg2Arr.length; j++){ + let cpValue = reg2Arr[j].replace(//g, "").replace(/<\/td>/g, ""); + cpRowArr.push(cpValue); + } + } + + cpDataArr.push(cpRowArr); + } + + //当前页面复制区内容 + let copy_r1 = Store.luckysheet_copy_save["copyRange"][0].row[0], + copy_r2 = Store.luckysheet_copy_save["copyRange"][0].row[1], + copy_c1 = Store.luckysheet_copy_save["copyRange"][0].column[0], + copy_c2 = Store.luckysheet_copy_save["copyRange"][0].column[1]; + + let copy_index = Store.luckysheet_copy_save["dataSheetIndex"]; + + let d; + if(copy_index == Store.currentSheetIndex){ + d = editor.deepCopyFlowData(Store.flowdata); + } + else{ + d = Store.luckysheetfile[getSheetIndex(copy_index)].data; + } + + for(let r = copy_r1; r <= copy_r2; r++){ + if(r - copy_r1 > cpDataArr.length - 1){ + break; + } + + for(let c = copy_c1; c <= copy_c2; c++){ + let cell = d[r][c]; + + let v; + if(cell != null){ + if(cell.ct != null && cell.ct.fa.indexOf("w") > -1){ + v = d[r][c].v; + } + else{ + v = d[r][c].m; + } + } + else{ + v = ""; + } + + if(cpDataArr[r - copy_r1][c - copy_c1] != v){ + isEqual = false; + break; + } + } + } + } + + + const locale_fontjson = locale().fontjson; + + if(txtdata.indexOf("luckysheet_copy_action_table") >- 1 && Store.luckysheet_copy_save["copyRange"] != null && Store.luckysheet_copy_save["copyRange"].length > 0 && isEqual){ + //剪切板内容 和 luckysheet本身复制的内容 一致 + if(Store.luckysheet_paste_iscut){ + Store.luckysheet_paste_iscut = false; + selection.pasteHandlerOfCutPaste(Store.luckysheet_copy_save); + selection.clearcopy(e); + } + else{ + selection.pasteHandlerOfCopyPaste(Store.luckysheet_copy_save); + } + } + else{ + if(txtdata.indexOf("table") > -1){ + $("#luckysheet-copy-content").html(txtdata); + + let data = new Array($("#luckysheet-copy-content").find("table tr").length); + let colLen = 0; + $("#luckysheet-copy-content").find("table tr").eq(0).find("td").each(function(){ + let colspan = parseInt($(this).attr("colspan")); + if(isNaN(colspan)){ + colspan = 1; + } + colLen += colspan; + }); + + for(let i = 0; i < data.length; i++){ + data[i] = new Array(colLen); + } + + let r = 0; + let borderInfo = {}; + $("#luckysheet-copy-content").find("table tr").each(function(){ + let $tr = $(this); + let c = 0; + $tr.find("td").each(function(){ + let $td = $(this); + let cell = {}; + let txt = $td.text(); + + if($.trim(txt).length == 0){ + cell.v = null; + cell.m = ""; + } + else{ + let mask = genarate($td.text()); + cell.v = mask[2]; + cell.ct = mask[1]; + cell.m = mask[0]; + } + + let bg = $td.css("background-color"); + if(bg == "rgba(0, 0, 0, 0)"){ + bg = "rgba(255,255,255)"; + } + + cell.bg = bg; + + let bl = $td.css("font-weight"); + if(bl == 400 || bl == "normal"){ + cell.bl = 0; + } + else{ + cell.bl = 1; + } + + let it = $td.css("font-style"); + if(it == "normal"){ + cell.it = 0; + } + else{ + cell.it = 1; + } + + let ff = $td.css("font-family"); + let ffs = ff.split(","); + for(let i = 0; i < ffs.length; i++){ + let fa = $.trim(ffs[i].toLowerCase()); + fa = locale_fontjson[fa]; + if(fa == null){ + cell.ff = 0; + } + else{ + cell.ff = fa; + break; + } + } + + let fs = Math.floor(parseInt($td.css("font-size")) * 72 / dpi_y) + 1; + cell.fs = fs; + + let fc = $td.css("color"); + cell.fc = fc; + + let ht = $td.css("text-align"); + if(ht == "center"){ + cell.ht = 0; + } + else if(ht == "right"){ + cell.ht = 2; + } + else{ + cell.ht = 1; + } + + let vt = $td.css("vertical-align"); + if(vt == "middle"){ + cell.vt = 0; + } + else if(vt == "top" || vt == "text-top"){ + cell.vt = 1; + } + else{ + cell.vt = 2; + } + + while (c < colLen && data[r][c] != null) { + c++; + } + + if(c == colLen){ + return true; + } + + if(data[r][c] == null){ + data[r][c] = cell; + let rowspan = parseInt($td.attr("rowspan")); + let colspan = parseInt($td.attr("colspan")); + + if(isNaN(rowspan)){ + rowspan = 1; + } + + if(isNaN(colspan)){ + colspan = 1; + } + + let r_ab = Store.luckysheet_select_save[0]["row"][0] + r; + let c_ab = Store.luckysheet_select_save[0]["column"][0] + c; + + for(let rp = 0; rp < rowspan; rp++){ + for(let cp = 0; cp < colspan; cp++){ + if(rp == 0){ + let bt = $td.css("border-top"); + if(bt != null && bt.length > 0 && bt.substr(0, 3).toLowerCase() != "0px"){ + let width = $td.css("border-top-width"); + let type = $td.css("border-top-style"); + let color = $td.css("border-top-color"); + let borderconfig = menuButton.getQKBorder(width, type, color); + + if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ + borderInfo[(r + rp) + "_" + (c + cp)] = {}; + } + + borderInfo[(r + rp) + "_" + (c + cp)].t = { "style": borderconfig[0], "color": borderconfig[1] }; + } + } + + if(rp == rowspan - 1){ + let bb = $td.css("border-bottom"); + if(bb != null && bb.length > 0 && bb.substr(0, 3).toLowerCase() != "0px"){ + let width = $td.css("border-bottom-width"); + let type = $td.css("border-bottom-style"); + let color = $td.css("border-bottom-color"); + let borderconfig = menuButton.getQKBorder(width, type, color); + + if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ + borderInfo[(r + rp) + "_" + (c + cp)] = {}; + } + + borderInfo[(r + rp) + "_" + (c + cp)].b = { "style": borderconfig[0], "color": borderconfig[1] }; + } + } + + if(cp == 0){ + let bl = $td.css("border-left"); + if(bl != null && bl.length > 0 && bl.substr(0, 3).toLowerCase() != "0px"){ + let width = $td.css("border-left-width"); + let type = $td.css("border-left-style"); + let color = $td.css("border-left-color"); + let borderconfig = menuButton.getQKBorder(width, type, color); + + if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ + borderInfo[(r + rp) + "_" + (c + cp)] = {}; + } + + borderInfo[(r + rp) + "_" + (c + cp)].l = { "style": borderconfig[0], "color": borderconfig[1] }; + } + } + + if(cp == colspan - 1){ + let br = $td.css("border-right"); + if(br != null && br.length > 0 && br.substr(0, 3).toLowerCase() != "0px"){ + let width = $td.css("border-right-width"); + let type = $td.css("border-right-style"); + let color = $td.css("border-right-color"); + let borderconfig = menuButton.getQKBorder(width, type, color); + + if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ + borderInfo[(r + rp) + "_" + (c + cp)] = {}; + } + + borderInfo[(r + rp) + "_" + (c + cp)].r = { "style": borderconfig[0], "color": borderconfig[1] }; + } + } + + if(rp == 0 && cp == 0){ + continue; + } + + data[r + rp][c + cp] = { "mc": {"r": r_ab, "c": c_ab} }; + } + } + + if(rowspan > 1 || colspan > 1){ + let first = { "rs": rowspan, "cs": colspan, "r": r_ab, "c": c_ab}; + data[r][c].mc = first; + } + } + + c++; + + if(c == colLen){ + return true; + } + }); + + r++; + }); + + Store.luckysheet_selection_range = []; + selection.pasteHandler(data, borderInfo); + $("#luckysheet-copy-content").empty(); + } + else{ + txtdata = clipboardData.getData("text/plain"); + selection.pasteHandler(txtdata); + } + } + } + }); + + //是否允许加载下一页 + if(luckysheetConfigsetting.enablePage){ + $("#luckysheet-bottom-page-next").click(function(){ + // rptapp + let queryExps = luckysheetConfigsetting.pageInfo.queryExps; + let reportId = luckysheetConfigsetting.pageInfo.reportId; + let fields = luckysheetConfigsetting.pageInfo.fields; + let mobile = luckysheetConfigsetting.pageInfo.mobile; + let frezon = luckysheetConfigsetting.pageInfo.frezon; + let currentPage = luckysheetConfigsetting.pageInfo.currentPage; + let totalPage = luckysheetConfigsetting.pageInfo.totalPage; + let pageUrl = luckysheetConfigsetting.pageInfo.pageUrl; + + // rptapp + method.addDataAjax({ + "queryExps": queryExps, + "reportId": reportId, + "fields": fields, + "mobile": mobile, + "frezon": frezon , + "pageIndex": currentPage, + "currentPage": currentPage + }, Store.currentSheetIndex, pageUrl, function(){ + luckysheetConfigsetting.pageInfo.currentPage++; + if(luckysheetConfigsetting.pageInfo.totalPage == (luckysheetConfigsetting.pageInfo.currentPage)){ + $("#luckysheet-bottom-page-next").hide(); + $("#luckysheet-bottom-page-info").html('共'+luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,'+'已显示全部数据'); + } + else{ + $("#luckysheet-bottom-page-info").html('共'+luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页'); + } + }); + }).mousedown(function(e){ + e.stopPropagation(); + }); + } + + //回到顶部 + $("#luckysheet-bottom-bottom-top").click(function(){ + $("#luckysheet-scrollbar-y").scrollTop(0); + }).mousedown(function(e){ + e.stopPropagation(); + }); +} \ No newline at end of file diff --git a/src/controllers/ifFormulaGenerator.js b/src/controllers/ifFormulaGenerator.js new file mode 100644 index 000000000..c0bf6f39f --- /dev/null +++ b/src/controllers/ifFormulaGenerator.js @@ -0,0 +1,545 @@ +import formula from '../global/formula'; +import editor from '../global/editor'; +import luckysheetupdateCell from './updateCell'; +import { modelHTML } from './constant'; +import { replaceHtml } from '../utils/util'; +import Store from '../store'; + +//if公式生成器 +const ifFormulaGenerator = { + singleRangeFocus: false, + init: function(){ + let _this = this; + + //点击选择单元格 + $(document).off("focus.IFcompareValue").on("focus.IFcompareValue", "#luckysheet-ifFormulaGenerator-dialog #compareValue", function(){ + $("#luckysheet-modal-dialog-mask").hide(); + _this.singleRangeFocus = true; + }); + $(document).off("click.IFsingRange").on("click.IFsingRange", "#luckysheet-ifFormulaGenerator-dialog .singRange", function(){ + let value = $("#luckysheet-ifFormulaGenerator-dialog #compareValue").val().trim(); + + if(formula.iscelldata(value)){ + _this.singleRangeDialog(value); + } + else{ + _this.singleRangeDialog(); + } + }); + $(document).off("click.IFsingRangeConfirm").on("click.IFsingRangeConfirm", "#luckysheet-ifFormulaGenerator-singleRange-confirm", function(){ + $("#luckysheet-formula-functionrange-select").hide(); + + $("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(); + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").show(); + + let value = $(this).parents("#luckysheet-ifFormulaGenerator-singleRange-dialog").find("input").val().trim(); + $("#luckysheet-ifFormulaGenerator-dialog #compareValue").val(value); + + _this.singleRangeFocus = false; + }); + $(document).off("click.IFsingRangeCancel").on("click.IFsingRangeCancel", "#luckysheet-ifFormulaGenerator-singleRange-cancel", function(){ + $("#luckysheet-formula-functionrange-select").hide(); + + $("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(); + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").show(); + + _this.singleRangeFocus = false; + }); + $(document).off("click.IFsingRangeClose").on("click.IFsingRangeClose", "#luckysheet-ifFormulaGenerator-singleRange-dialog .luckysheet-modal-dialog-title-close", function(){ + $("#luckysheet-formula-functionrange-select").hide(); + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").show(); + + _this.singleRangeFocus = false; + }); + + //点击选择范围 + $(document).off("click.IFmultiRange").on("click.IFmultiRange", "#luckysheet-ifFormulaGenerator-dialog .multiRange", function(){ + _this.multiRangeDialog(); + + _this.singleRangeFocus = false; + }); + $(document).off("click.IFmultiRangeConfirm").on("click.IFmultiRangeConfirm", "#luckysheet-ifFormulaGenerator-multiRange-confirm", function(){ + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + + $("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(); + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").show(); + + let value = $(this).parents("#luckysheet-ifFormulaGenerator-multiRange-dialog").find("input").val().trim(); + let cellrange = formula.getcellrange(value); + let str_r = cellrange["row"][0], + end_r = cellrange["row"][1], + str_c = cellrange["column"][0], + end_c = cellrange["column"][1]; + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let arr = []; + + //获取范围内所有数值 + for(let r = str_r; r <= end_r; r++){ + for(let c = str_c; c <= end_c; c++){ + if(d[r] != null && d[r][c] != null && d[r][c]["ct"] != null && d[r][c]["ct"]["t"] == "n"){ + arr.push(d[r][c]["v"]); + } + } + } + + //从大到小排序 + for(let j = 0; j < arr.length; j++){ + for(let k = 0; k < arr.length - 1 - j; k++){ + if(arr[k] < arr[k + 1]){ + let temp = arr[k]; + arr[k] = arr[k + 1]; + arr[k + 1] = temp; + } + } + } + + let largeNum = arr[0]; + let smallNum = arr[arr.length - 1]; + + //赋值 + $("#luckysheet-ifFormulaGenerator-dialog #smallRange").val(smallNum); + $("#luckysheet-ifFormulaGenerator-dialog #largeRange").val(largeNum); + }); + $(document).off("click.IFmultiRangeCancel").on("click.IFmultiRangeCancel", "#luckysheet-ifFormulaGenerator-multiRange-cancel", function(){ + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + + $("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(); + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").show(); + }); + $(document).off("click.IFmultiRangeClose").on("click.IFmultiRangeClose", "#luckysheet-ifFormulaGenerator-multiRange-dialog .luckysheet-modal-dialog-title-close", function(){ + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").show(); + }); + + //选择 划分方式 + $(document).on("change", "#DivisionMethod", function(){ + let value = $(this).find("option:selected").val(); + + if(value == "2"){ + $("#DivisionMethodVal").hide(); + } + else{ + $("#DivisionMethodVal").show(); + } + + $("#luckysheet-ifFormulaGenerator-dialog .ifList").empty(); + }); + + //点击 生成 按钮 + $(document).off("click.IFcreateBtn").on("click.IFcreateBtn", "#luckysheet-ifFormulaGenerator-dialog #createBtn", function(){ + let compareValue = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#compareValue").val().trim(); + if(compareValue == ""){ + _this.info("比较值不能为空!"); + return; + } + + let method = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethod option:selected").val(); + if(method == "2"){ + let itemHtml = '
'+ + ''+ + ''+ + ''+ compareValue +''+ + ''+ + ''+ + '标签:'+ + ''+ + ''+ + '
'; + $("#luckysheet-ifFormulaGenerator-dialog .ifList").append(itemHtml); + } + else{ + let smallRange = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#smallRange").val().trim(); + let largeRange = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#largeRange").val().trim(); + let DivisionMethodVal = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethodVal").val().trim(); + + if(smallRange == "" || largeRange == ""){ + _this.info("范围不能为空!"); + return; + } + else if(DivisionMethodVal == ""){ + _this.info("划分值不能为空!"); + return; + } + + _this.getIfList(compareValue, smallRange, largeRange, method, DivisionMethodVal); + } + }); + + //点击 删除条件 + $(document).on("click", "#luckysheet-ifFormulaGenerator-dialog .item .fa-remove", function(){ + $(this).parents(".item").remove(); + }); + + //点击 确认 按钮 + $(document).off("click.IFconfirmBtn").on("click.IFconfirmBtn", "#luckysheet-ifFormulaGenerator-dialog-confirm", function(){ + let $item = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find(".ifList .item"); + let str = ''; + + $($item.toArray().reverse()).each(function(i, e){ + let smallNum = $(e).find(".smallNum").val().trim(); + let largeNum = $(e).find(".largeNum").val().trim(); + let operator = $(e).find(".operator option:selected").val(); + let operator2 = $(e).find(".operator2 option:selected").val(); + let compareValue = $(e).find(".compareValue").text(); + + let markText = $(e).find(".markText").val().trim(); + if(markText == ""){ + markText = "标签" + (i + 1); + } + + if(smallNum == "" && largeNum == ""){ + return true; + } + + let s; + if(operator == "0"){ + s = compareValue + ">=" + smallNum; + } + else{ + s = compareValue + ">" + smallNum; + } + + let l; + if(operator2 == "0"){ + l = compareValue + "<=" + largeNum; + } + else{ + l = compareValue + "<" + largeNum; + } + + let a; + if(i == 0 && largeNum == ""){ + a = s; + } + else if(i == ($item.length - 1) && smallNum == ""){ + a = l; + } + else{ + a = "and("+s+","+l+")"; + } + + if(i == 0){ + str = 'if('+ a +',"'+ markText +'")'; + } + else{ + str = 'if('+ a +',"'+ markText +'",'+ str +')'; + } + }) + + if(str.length == 0){ + _this.info("没有生成可用的条件!"); + return; + } + + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-ifFormulaGenerator-dialog").hide(); + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let row_index = last["row_focus"], + col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); + + $("#luckysheet-rich-text-editor").html("=" + str); + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + + $("#luckysheet-wa-functionbox-confirm").click(); + }); + + //info + $(document).on("click", "#luckysheet-ifFormulaGenerator-info .luckysheet-model-close-btn", function(){ + $("#luckysheet-modal-dialog-mask").show(); + }); + $(document).on("click", "#luckysheet-ifFormulaGenerator-info .luckysheet-modal-dialog-title-close", function(){ + $("#luckysheet-modal-dialog-mask").show(); + }); + }, + ifFormulaDialog: function(fp){ + let _this = this; + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-dialog").remove(); + + let compareValue = ""; + let ifListHtml = ''; + + if(!!fp){ + let arr = fp.split("if("); + + for(let i = 1; i < arr.length; i++){ + let txt = arr[i].replace("and(","").replace(/\)/g,"").replace(/\"/g,""); + let arr2 = txt.split(","); + arr2 = _this.clearArr(arr2); + + compareValue = _this.splitTxt(arr2[0])[0]; + + let smallNum, largeNum, markText; + if(arr2.length == 3){ + smallNum = _this.splitTxt(arr2[0])[1]; + largeNum = _this.splitTxt(arr2[1])[2]; + markText = arr2[2]; + } + else{ + smallNum = _this.splitTxt(arr2[0])[1]; + largeNum = _this.splitTxt(arr2[0])[2]; + markText = arr2[1]; + } + + let itemHtml = '
'+ + ''+ + ''+ + ''+ compareValue +''+ + ''+ + ''+ + '标签:'+ + ''+ + ''+ + '
'; + ifListHtml += itemHtml; + } + } + + let content = '
'+ + '
'+ + ''+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + '
'+ + ''+ + ''+ + ''+ + ''+ + '
'+ + ' 范围评估 '+ + ''+ + '
'+ + '
'+ + '
'+ + ''+ + ''+ + ''+ + '
生成
'+ + '
'+ + '
'+ + '
'+ifListHtml+'
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-ifFormulaGenerator-dialog", + "addclass": "luckysheet-ifFormulaGenerator-dialog", + "title": "if公式生成器", + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-ifFormulaGenerator-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 590).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-ifFormulaGenerator-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + }, + clearArr: function(arr){ + for(let i = 0; i < arr.length; i++){ + if(arr[i] == "" || arr[i] == null || arr[i] == undefined){ + arr.splice(i, 1); + } + } + + return arr; + }, + splitTxt: function(txt){ + let compareValue, smallNum, largeNum; + + if(txt.indexOf(">=") != -1){ + compareValue = txt.split(">=")[0]; + smallNum = txt.split(">=")[1]; + + return [compareValue, smallNum, largeNum]; + } + else if(txt.indexOf(">") != -1){ + compareValue = txt.split(">")[0]; + smallNum = txt.split(">")[1]; + + return [compareValue, smallNum, largeNum]; + } + else if(txt.indexOf("<=") != -1){ + compareValue = txt.split("<=")[0]; + largeNum = txt.split("<=")[1]; + + return [compareValue, smallNum, largeNum]; + } + else if(txt.indexOf("<") != -1){ + compareValue = txt.split("<")[0]; + largeNum = txt.split("<")[1]; + + return [compareValue, smallNum, largeNum]; + } + }, + singleRangeDialog: function(value){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-ifFormulaGenerator-dialog").hide(); + $("#luckysheet-ifFormulaGenerator-singleRange-dialog").remove(); + + if(value == null){ + value = ""; + } + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-ifFormulaGenerator-singleRange-dialog", + "addclass": "luckysheet-ifFormulaGenerator-singleRange-dialog", + "title": "选择单元格", + "content": '', + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-ifFormulaGenerator-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-ifFormulaGenerator-singleRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + }, + multiRangeDialog: function(){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-ifFormulaGenerator-dialog").hide(); + $("#luckysheet-ifFormulaGenerator-multiRange-dialog").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-ifFormulaGenerator-multiRange-dialog", + "addclass": "luckysheet-ifFormulaGenerator-multiRange-dialog", + "title": "选择范围", + "content": '', + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-ifFormulaGenerator-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-ifFormulaGenerator-multiRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + }, + getIfList: function(compareValue, smallRange, largeRange, method, methodVal){ + $("#luckysheet-ifFormulaGenerator-dialog .ifList").empty(); + + smallRange = parseInt(smallRange); + largeRange = parseInt(largeRange); + methodVal = parseInt(methodVal); + + let arr = []; + + if(method == "0"){ + let len = Math.ceil((largeRange - smallRange) / methodVal); + for(let i = 0; i <= len; i++){ + let num = smallRange + methodVal * i; + if(i == 0 || num >= largeRange){ + arr.push(""); + } + else{ + arr.push(num); + } + } + + } + else if(method == "1"){ + let addnum = Math.ceil((largeRange - smallRange) / methodVal); + for(let i = 0; i <= methodVal; i++){ + let num = smallRange + addnum * i; + if(i == 0 || num >= largeRange){ + arr.push(""); + } + else{ + arr.push(num); + } + } + } + for(let j = 0; j < arr.length - 1; j++){ + let markText; + if(j == 0){ + markText = "小于" + arr[j + 1]; + } + else if(j == arr.length - 2){ + markText = "大于等于" + arr[j]; + } + else{ + markText = arr[j] + "到" + arr[j + 1]; + } + + let itemHtml = '
'+ + ''+ + ''+ + ''+ compareValue +''+ + ''+ + ''+ + '标签:'+ + ''+ + ''+ + '
'; + $("#luckysheet-ifFormulaGenerator-dialog .ifList").append(itemHtml); + } + }, + info: function(title){ + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-ifFormulaGenerator-info").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-ifFormulaGenerator-info", + "addclass": "", + "title": title, + "content": "", + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-ifFormulaGenerator-info").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-ifFormulaGenerator-info").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + } +} + +export default ifFormulaGenerator; \ No newline at end of file diff --git a/src/controllers/insertFormula.js b/src/controllers/insertFormula.js new file mode 100644 index 000000000..862e3e23a --- /dev/null +++ b/src/controllers/insertFormula.js @@ -0,0 +1,467 @@ +import { luckysheet_getcelldata } from '../function/func'; +import functionlist from '../function/functionlist'; +import luckysheet_function from '../function/luckysheet_function'; +import formula from '../global/formula'; +import { isRealNum, isRealNull } from '../global/validate'; +import { modelHTML } from './constant'; +import { luckysheet_count_show } from './select'; +import { replaceHtml, getObjType } from '../utils/util'; +import Store from '../store'; + +//插入函数 +const insertFormula = { + init: function(){ + let _this = this; + + $(document).off("keyup.fxSFLI").on("keyup.fxSFLI", "#searchFormulaListInput", function(){ + $("#formulaTypeList").empty(); + let txt = $(this).val().toUpperCase(); + + if(txt == ""){ + //若没有查找内容则根据类别筛选 + _this.formulaListByType($("#formulaTypeSelect option:selected").val()); + } + else{ + for(let i = 0; i < functionlist.length; i++){ + if(/^[a-zA-Z]+$/.test(txt)){ + if(functionlist[i].n.indexOf(txt) != "-1"){ + $('
'+ functionlist[i].n +''+ functionlist[i].a +'
').appendTo($("#formulaTypeList")); + } + } + else if(functionlist[i].a.indexOf(txt) != "-1"){ + $('
'+ functionlist[i].n +''+ functionlist[i].a +'
').appendTo($("#formulaTypeList")); + } + } + } + + $("#formulaTypeList .listBox:first-child").addClass("on"); //默认公式列表第一个为选中状态 + }); + + $(document).off("change.fxFormulaTS").on("change.fxFormulaTS", "#formulaTypeSelect", function(){ + let type = $("#formulaTypeSelect option:selected").val(); + _this.formulaListByType(type); + }); + + $(document).off("click.fxListbox").on("click.fxListbox", "#formulaTypeList .listBox", function(){ + $(this).addClass("on").siblings().removeClass("on"); + }); + + //选择公式后弹出参数栏弹框 + $(document).off("click.fxFormulaCf").on("click.fxFormulaCf", "#luckysheet-search-formula-confirm", function(){ + let formula = $("#luckysheet-search-formula .listBox.on").attr("name"); + let formulaTxt = '='+ formula.toUpperCase() +'()'; + + $("#luckysheet-rich-text-editor").html(formulaTxt); + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + + _this.formulaParmDialog(formula); + }); + + //公式参数框 + $(document).off("focus.fxParamInput").on("focus.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){ + let parmIndex = $(this).parents(".parmBox").index(); + formula.data_parm_index = parmIndex; + + let formulatxt = $(this).parents("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(); + let parmLen = luckysheet_function[formulatxt].p.length; + + let parmDetail, parmRepeat; + if(parmIndex >= parmLen){ + parmDetail = luckysheet_function[formulatxt].p[parmLen - 1].detail; + parmRepeat = luckysheet_function[formulatxt].p[parmLen - 1].repeat; + } + else{ + parmDetail = luckysheet_function[formulatxt].p[parmIndex].detail; + parmRepeat = luckysheet_function[formulatxt].p[parmIndex].repeat; + } + + //参数选区显示,参数值显示 + _this.parmTxtShow($(this).val()); + + //计算结果 + _this.functionStrCompute(); + + //参数名称和释义切换 + $("#luckysheet-search-formula-parm .parmDetailsBox").empty(); + + let parmName = $(this).parents(".parmBox").find(".name").text(); + $(''+ parmName +':'+ parmDetail +'').appendTo($("#luckysheet-search-formula-parm .parmDetailsBox")); + + //公式参数可自增(参数自增最多5个) + if(parmRepeat == "y"){ + let parmCount = $("#luckysheet-search-formula-parm .parmBox").length; + + if(parmCount < 5 && parmIndex == (parmCount - 1)){ + $('
值'+ (parmCount + 1) +'
=
').appendTo($("#luckysheet-search-formula-parm .parmListBox")); + } + } + }); + + $(document).off("blur.fxParamInput").on("blur.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){ + let txt = $(this).val(); + + if(formula.getfunctionParam(txt).fn == null && !formula.iscelldata(txt)){ + if(!isRealNum(txt) && txt != "" && txt.length <= 2 && txt.indexOf('"') != 0 && txt.lastIndexOf('"') != 0){ + txt = '"' + txt + '"'; + $(this).val(txt); + + _this.parmTxtShow(txt); + _this.functionStrCompute(); + } + } + }); + + $(document).off("keyup.fxParamInput").on("keyup.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){ + //参数选区显示,参数值显示 + _this.parmTxtShow($(this).val()); + + //计算结果 + _this.functionStrCompute(); + }); + + //点击图标选取数据范围 + $(document).off("click.fxParamI").on("click.fxParamI", "#luckysheet-search-formula-parm .parmBox i", function(){ + formula.data_parm_index = $(this).parents(".parmBox").index(); + + //选取范围弹出框 + $("#luckysheet-search-formula-parm").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + + $("#luckysheet-search-formula-parm-select").remove(); + + if($(this).parents(".parmBox").find(".txt input").val() == ""){ + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-search-formula-parm-select", + "addclass": "luckysheet-search-formula-parm-select", + "title": "选取数据范围", + "content": "", + "botton": '', + "style": "z-index:100003" + })); + } + else{ + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-search-formula-parm-select", + "addclass": "luckysheet-search-formula-parm-select", + "title": "选取数据范围", + "content": "", + "botton": '', + "style": "z-index:100003" + })); + } + + let $t = $("#luckysheet-search-formula-parm-select").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-search-formula-parm-select").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + + //参数选区虚线框 + _this.parmTxtShow($(this).parents(".parmBox").find(".txt input").val()); + }); + + //点击确定 + $(document).off("click.fxParamCf").on("click.fxParamCf", "#luckysheet-search-formula-parm-confirm", function(){ + $("#luckysheet-wa-functionbox-confirm").click(); + }); + + //选取范围后传回参数栏弹框 + $(document).off("click.fxParamSelectCf").on("click.fxParamSelectCf", "#luckysheet-search-formula-parm-select-confirm", function(){ + let parmIndex = $("#luckysheet-search-formula-parm-select-input").attr("data_parm_index"); + + $("#luckysheet-search-formula-parm-select").hide(); + $("#luckysheet-search-formula-parm").show(); + $("#luckysheet-search-formula-parm .parmBox").eq(parmIndex).find(".txt input").focus(); + }); + }, + formulaListDialog: function(){ + let _this = this; + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-search-formula").remove(); + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-search-formula", + "addclass": "luckysheet-search-formula", + "title": "", + "content": "
", + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-search-formula").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-search-formula").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3, "user-select": "none" }).show(); + + _this.formulaListByType("0"); //默认公式列表为类型0 + $("#searchFormulaListInput").focus(); + }, + formulaListByType: function(type){ + $("#formulaTypeList").empty(); + + for(let i = 0; i < functionlist.length; i++){ + if((type == "-1" && functionlist[i].t > 14) || functionlist[i].t == type){ + $('
'+ functionlist[i].n +''+ functionlist[i].a +'
').appendTo($("#formulaTypeList")); + } + } + + $("#formulaTypeList .listBox:first-child").addClass("on"); //默认公式列表第一个为选中状态 + }, + formulaParmDialog: function(formulaTxt, parm){ //参数弹出框 + let parm_title = '', + parm_content = '', + parm_list_content = ''; + + for(let i = 0; i < functionlist.length; i++){ + if(functionlist[i].n == formulaTxt.toUpperCase()){ + parm_title = functionlist[i].n; + + for(let j = 0; j < functionlist[i].p.length; j++){ + if(parm == null){ + //无参数 + parm_list_content += '
'+ + '
'+ functionlist[i].p[j].name +'
'+ + '
'+ + '' + + ''+ + '
'+ + '
=
'+ + '
'; + } + else{ + //有参数 + if(parm[j] == null){ + parm[j] = ""; + } + + parm_list_content += '
'+ + '
'+ functionlist[i].p[j].name +'
'+ + '
'+ + ''+ + ''+ + '
'+ + '
=
'+ + '
'; + } + } + + parm_content = '
'+ + '
'+ parm_list_content +'
'+ + '
'+ functionlist[i].d +'
'+ + '
'+ + '
计算结果 =
'+ + '
'; + } + } + + $("#luckysheet-search-formula").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + + $("#luckysheet-search-formula-parm").remove(); + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-search-formula-parm", + "addclass": "luckysheet-search-formula-parm", + "title": parm_title, + "content": parm_content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-search-formula-parm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + + //参数栏第一个参数聚焦,显示选取虚线框 + $("#luckysheet-search-formula-parm .parmBox:eq(0) input").focus(); + + //遍历参数,有参数显示值,无显示空 + $("#luckysheet-search-formula-parm .parmBox").each(function(index,e){ + let parmtxt = $(e).find(".txt input").val(); + + if(formula.getfunctionParam(parmtxt).fn == null){ //参数不是公式 + if(formula.iscelldata(parmtxt)){ //参数是选区 + let txtdata = luckysheet_getcelldata(parmtxt).data; + + if(getObjType(txtdata) == "array"){ //参数为多个单元格选区 + let txtArr = []; + + for(let i = 0; i < txtdata.length; i++){ + for(let j = 0; j < txtdata[i].length; j++){ + let cell = txtdata[i][j]; + + if(cell == null || isRealNull(cell.v)){ + txtArr.push(null); + } + else{ + txtArr.push(cell.v); + } + } + } + + $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ txtArr.join(",") +"}"); + } + else{ //参数为单个单元格选区 + $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ txtdata.v +"}"); + } + } + else{ //参数不是选区 + $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ parmtxt +"}"); + } + } + else{ //参数是公式 + $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ eval($.trim(formula.functionParser("=" + parmtxt))) +"}"); + } + }) + + $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); + formula.data_parm_index = 0; + formula.rangestart = true; + }, + parmTxtShow: function(parmtxt){ + if(formula.getfunctionParam(parmtxt).fn == null){ //参数不是公式 + if(formula.iscelldata(parmtxt)){ //参数是选区 + let cellrange = formula.getcellrange(parmtxt); + let r1 = cellrange.row[0], + r2 = cellrange.row[1], + c1 = cellrange.column[0], + c2 = cellrange.column[1]; + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + $("#luckysheet-formula-help-c").hide(); + + luckysheet_count_show(col_pre, row_pre, col - col_pre - 1, row - row_pre - 1, cellrange.row, cellrange.column); + + let txtdata = luckysheet_getcelldata(parmtxt).data; + if(getObjType(txtdata) == "array"){ //参数为多个单元格选区 + let txtArr = []; + + for(let i = 0; i < txtdata.length; i++){ + for(let j = 0; j < txtdata[i].length; j++){ + let cell = txtdata[i][j]; + + if(cell == null || isRealNull(cell.v)){ + txtArr.push(null); + } + else{ + txtArr.push(cell.v); + } + } + } + + $("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ txtArr.join(",") +"}"); + } + else{ //参数为单个单元格选区 + $("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ txtdata.v +"}"); + } + } + else{ //参数不是选区 + $("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ parmtxt +"}"); + + $("#luckysheet-formula-functionrange-select").hide(); + } + } + else{ + //参数是公式 + let txt; + for(let k = 0; k < formula.getfunctionParam(parmtxt).param.length; k++){ + if(formula.iscelldata(formula.getfunctionParam(parmtxt).param[k])){ + txt = formula.getfunctionParam(parmtxt).param[k]; + break; + } + } + + let cellrange = formula.getcellrange(txt); + let r1 = cellrange.row[0], + r2 = cellrange.row[1], + c1 = cellrange.column[0], + c2 = cellrange.column[1]; + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + $("#luckysheet-formula-help-c").hide(); + + luckysheet_count_show(col_pre, row_pre, col - col_pre - 1, row - row_pre - 1, cellrange.row, cellrange.column); + + $("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ eval($.trim(formula.functionParser("=" + parmtxt))) +"}"); + } + }, + functionStrCompute: function(){ + let isVal = true; //参数不为空 + let parmValArr = []; //参数值集合 + let lvi = -1; //最后一个有值的参数索引 + + let formulatxt = $("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(); + + $("#luckysheet-search-formula-parm .parmBox").each(function(i, e){ + let parmtxt = $(e).find(".txt input").val(); + let parmRequire = luckysheet_function[formulatxt].p[i].require; + + if(parmtxt == "" && parmRequire == "m"){ + isVal = false; + } + + if(parmtxt != ""){ + lvi = i; + } + }); + + //单元格显示 + let functionHtmlTxt; + if(lvi == -1){ + functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "()"; + } + else if(lvi == 0){ + functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + $("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val() + ")"; + } + else{ + for(let j = 0; j <= lvi; j++){ + parmValArr.push($("#luckysheet-search-formula-parm .parmBox").eq(j).find(".txt input").val()); + } + + functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + parmValArr.join(",") + ")"; + } + + let function_str = formula.functionHTMLGenerate(functionHtmlTxt); + $("#luckysheet-rich-text-editor").html(function_str); + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + + if(isVal){ //公式计算 + let fp = $.trim(formula.functionParser($("#luckysheet-rich-text-editor").text())); + + let result = null; + + try { + result = eval(fp); + } + catch (e) { + result = formula.error.n; + } + + $("#luckysheet-search-formula-parm .result span").text(result); + } + } +} + +export default insertFormula; \ No newline at end of file diff --git a/src/controllers/locationCell.js b/src/controllers/locationCell.js new file mode 100644 index 000000000..6bbb91f90 --- /dev/null +++ b/src/controllers/locationCell.js @@ -0,0 +1,489 @@ +import { replaceHtml } from '../utils/util'; +import { getSheetIndex } from '../methods/get'; +import { isRealNull } from '../global/validate'; +import { isEditMode } from '../global/validate'; +import tooltip from '../global/tooltip'; +import { modelHTML } from './constant'; +import { selectHightlightShow } from './select'; +import conditionformat from './conditionformat'; +import Store from '../store'; + +//定位 +const luckysheetLocationCell = { + createDialog: function(){ + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-locationCell-dialog").remove(); + + let content = '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-locationCell-dialog", + "addclass": "luckysheet-locationCell-dialog", + "title": "定位条件", + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-locationCell-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-locationCell-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + }, + init: function(){ + let _this = this; + + $(document).on("click", "#luckysheet-locationCell-dialog .listItem input:radio", function(e){ + $("#luckysheet-locationCell-dialog .listItem input:checkbox").prop("disabled", true); + $("#luckysheet-locationCell-dialog .listItem .subbox label").css("color", "#666"); + + $(this).siblings(".subbox").find("input:checkbox").removeAttr("disabled"); + $(this).siblings(".subbox").find("label").css("color", "#000"); + }); + + $(document).off("click.locationCellConfirm").on("click.locationCellConfirm", "#luckysheet-locationCell-dialog #luckysheet-locationCell-dialog-confirm", function(){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-locationCell-dialog").hide(); + + let $radio = $("#luckysheet-locationCell-dialog .listItem input:radio:checked"); + let id = $radio.attr("id"); + + if(id == "locationConstant" || id == "locationFormula"){ + let $checkbox = $radio.siblings(".subbox").find("input:checkbox:checked"); + + let value; + if($checkbox.length == 0){ + return; + } + else if($checkbox.length == 5){ + value = "all"; + } + else{ + let arr = []; + + for(let i = 0; i < $checkbox.length; i++){ + if($($checkbox[i]).hasClass("date")){ + arr.push("d"); + } + else if($($checkbox[i]).hasClass("number")){ + arr.push("n"); + } + else if($($checkbox[i]).hasClass("string")){ + arr.push("s,g"); + } + else if($($checkbox[i]).hasClass("boolean")){ + arr.push("b"); + } + else if($($checkbox[i]).hasClass("error")){ + arr.push("e"); + } + } + + value = arr.join(","); + } + + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + //单个单元格 + range = [{"row": [0, Store.flowdata.length - 1], "column": [0, Store.flowdata[0].length - 1]}]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + _this.apply(range, id, value); + } + else if(id == "locationStepRow"){ + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1])){ + if(isEditMode()){ + alert("请选择最少两行"); + } + else{ + tooltip.info("提示", "请选择最少两行"); + } + return; + } + + let range = $.extend(true, [], Store.luckysheet_select_save); + + _this.apply(range, "locationStepRow"); + } + else if(id == "locationStepColumn"){ + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + if(isEditMode()){ + alert("请选择最少两列"); + } + else{ + tooltip.info("提示", "请选择最少两列"); + } + return; + } + + let range = $.extend(true, [], Store.luckysheet_select_save); + + _this.apply(range, "locationStepColumn"); + } + else{ + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + //单个单元格 + range = [{"row": [0, Store.flowdata.length - 1], "column": [0, Store.flowdata[0].length - 1]}]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + _this.apply(range, id); + } + }); + }, + apply: function(range, type, value){ + let rangeArr = []; + + if(type == "locationFormula" || type == "locationConstant" || type == "locationNull"){ //公式 常量 空值 + let minR = null, maxR = null, minC = null, maxC = null, cellSave = {}; + + for(let s = 0; s < range.length; s++){ + let st_r = range[s].row[0], + ed_r = range[s].row[1], + st_c = range[s].column[0], + ed_c = range[s].column[1]; + + if(minR == null || minR < st_r){ + minR = st_r; + } + if(maxR == null || maxR > ed_r){ + maxR = ed_r; + } + if(minC == null || minC < st_c){ + minC = st_c; + } + if(maxC == null || maxC > ed_c){ + maxC = ed_c; + } + + for(let r = st_r; r <= ed_r; r++){ + for(let c = st_c; c <= ed_c; c++){ + let cell = Store.flowdata[r][c]; + + if(cell != null && cell.mc != null){ + cell = Store.flowdata[cell.mc.r][cell.mc.c]; + } + + if(type == 'locationFormula' && cell != null && !isRealNull(cell.v) && cell.f != null && (value == 'all' || (cell.ct != null && value.indexOf(cell.ct.t) > -1))){ + cellSave[r + '_' + c] = 0; + } + else if(type == 'locationConstant' && cell != null && !isRealNull(cell.v) && (value == 'all' || (cell.ct != null && value.indexOf(cell.ct.t) > -1))){ + cellSave[r + '_' + c] = 0; + } + else if(type == 'locationNull' && (cell == null || isRealNull(cell.v))){ + cellSave[r + '_' + c] = 0; + } + } + } + } + + rangeArr = this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr); + } + else if(type == "locationCF"){ //条件格式 + let index = getSheetIndex(Store.currentSheetIndex); + let ruleArr = Store.luckysheetfile[index]["luckysheet_conditionformat_save"]; + let data = Store.luckysheetfile[index]["data"]; + + if(ruleArr == null || ruleArr.length == 0){ + if(isEditMode()){ + alert("未找到单元格"); + } + else{ + tooltip.info("提示", "未找到单元格"); + } + + return; + } + + computeMap = conditionformat.compute(ruleArr, data); + + if(Object.keys(computeMap).length == 0){ + if(isEditMode()){ + alert("未找到单元格"); + } + else{ + tooltip.info("提示", "未找到单元格"); + } + + return; + } + + let minR = null, maxR = null, minC = null, maxC = null, cellSave = {}; + + for(let s = 0; s < range.length; s++){ + let st_r = range[s].row[0], + ed_r = range[s].row[1], + st_c = range[s].column[0], + ed_c = range[s].column[1]; + + if(minR == null || minR < st_r){ + minR = st_r; + } + if(maxR == null || maxR > ed_r){ + maxR = ed_r; + } + if(minC == null || minC < st_c){ + minC = st_c; + } + if(maxC == null || maxC > ed_c){ + maxC = ed_c; + } + + for(let r = st_r; r <= ed_r; r++){ + for(let c = st_c; c <= ed_c; c++){ + if((r + '_' + c) in computeMap){ + cellSave[r + '_' + c] = 0; + } + } + } + } + + rangeArr = this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr); + } + else if(type == "locationStepRow"){ //间隔行 + for(let s = 0; s < range.length; s++){ + if(range[s].row[0] == range[s].row[1]){ + continue; + } + + let st_r = range[s].row[0], ed_r = range[s].row[1]; + let st_c = range[s].column[0], ed_c = range[s].column[1]; + + for(let r = st_r; r <= ed_r; r++){ + if((r - st_r) % 2 == 0){ + rangeArr.push({"row": [r, r], "column": [st_c, ed_c]}); + } + } + } + } + else if(type == "locationStepColumn"){ //间隔列 + for(let s = 0; s < range.length; s++){ + if(range[s].column[0] == range[s].column[1]){ + continue; + } + + let st_r = range[s].row[0], ed_r = range[s].row[1]; + let st_c = range[s].column[0], ed_c = range[s].column[1]; + + for(let c = st_c; c <= ed_c; c++){ + if((c - st_c) % 2 == 0){ + rangeArr.push({"row": [st_r, ed_r], "column": [c, c]}); + } + } + } + } + + if(rangeArr.length == 0){ + if(isEditMode()){ + alert("未找到单元格"); + } + else{ + tooltip.info("提示", "未找到单元格"); + } + } + else{ + Store.luckysheet_select_save = rangeArr; + selectHightlightShow(); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), + winW = $("#luckysheet-cell-main").width(); + + let r1 = Store.luckysheet_select_save[0]["row"][0], + r2 = Store.luckysheet_select_save[0]["row"][1], + c1 = Store.luckysheet_select_save[0]["column"][0], + c2 = Store.luckysheet_select_save[0]["column"][1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + if (col - scrollLeft - winW + 20 > 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); + } + else if (col_pre - scrollLeft - 20 < 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); + } + + if (row - scrollTop - winH + 20 > 0) { + $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); + } + else if (row_pre - scrollTop - 20 < 0) { + $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); + } + } + }, + getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr){ + if(Object.keys(cellSave).length == 0){ + return rangeArr; + } + + let _this = this; + + let stack_str = null, + stack_edr = null, + stack_stc = null, + stack_edc = null; + + for(let r = minR; r <= maxR; r++){ + for(let c = minC; c <= maxC; c++){ + let cell = Store.flowdata[r][c]; + + if((r + '_' + c) in cellSave){ + if(cell != null && cell.mc != null){ + if(stack_stc == null){ + let range = { + 'row': [cell.mc.r, cell.mc.r + cell.mc.rs - 1], + 'column': [cell.mc.c, cell.mc.c + cell.mc.cs - 1] + }; + rangeArr.push(range); + cellSave = _this.deleteCellInSave(cellSave, range); + return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr); + } + else if(c < stack_edc){ + let range = { + 'row': [stack_str, stack_edr], + 'column': [stack_stc, stack_edc] + } + rangeArr.push(range); + cellSave = _this.deleteCellInSave(cellSave, range); + return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr); + } + else{ + break; + } + } + else if(stack_stc == null){ + stack_stc = c; + stack_edc = c; + + stack_str = r; + stack_edr = r; + } + else if(c > stack_edc){ + stack_edc = c; + } + } + else if(stack_stc != null){ + if(cell != null && cell.mc != null){ + break; + } + else if(c < stack_stc){ + + } + else if(c <= stack_edc){ + let range = { + 'row': [stack_str, stack_edr], + 'column': [stack_stc, stack_edc] + } + rangeArr.push(range); + cellSave = _this.deleteCellInSave(cellSave, range); + return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr); + } + else{ + stack_edr = r; + } + } + } + } + + if(stack_stc != null){ + let range = { + 'row': [stack_str, stack_edr], + 'column': [stack_stc, stack_edc] + } + rangeArr.push(range); + cellSave = _this.deleteCellInSave(cellSave, range); + return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr); + } + }, + deleteCellInSave(cellSave, range){ + for(let r = range.row[0]; r <= range.row[1]; r++){ + for(let c = range.column[0]; c <= range.column[1]; c++){ + delete cellSave[r + '_' + c]; + } + } + + return cellSave; + } +} + +export default luckysheetLocationCell; \ No newline at end of file diff --git a/src/controllers/luckysheetConfigsetting.js b/src/controllers/luckysheetConfigsetting.js new file mode 100644 index 000000000..9c31666e3 --- /dev/null +++ b/src/controllers/luckysheetConfigsetting.js @@ -0,0 +1,34 @@ +const luckysheetConfigsetting = { + autoFormatw: false, + accuracy: undefined, + total: 0, + + allowCopy: true, + showtoolbar: true, + showinfobar: true, + showsheetbar: true, + showstatisticBar: true, + pointEdit: false, + pointEditUpdate: null, + pointEditZoom: 1, + + userInfo: null, + userMenuItem: [], + myFolderUrl: null, + functionButton: null, + + showConfigWindowResize: true, + enableAddRow: true, + enableAddCol: true, + enablePage: true, + pageInfo: null, + + + editMode: false, + chartConfigChange: null, + beforeCreateDom: null, + fireMousedown: null, + plugins:[] +} + +export default luckysheetConfigsetting; \ No newline at end of file diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js new file mode 100644 index 000000000..1b69e8699 --- /dev/null +++ b/src/controllers/menuButton.js @@ -0,0 +1,4467 @@ +import { selectionCopyShow, selectIsOverlap } from './select'; +import { luckyColor } from './constant'; +import luckysheetMoreFormat from './moreFormat'; +import alternateformat from './alternateformat'; +import conditionformat from './conditionformat'; +import server from './server'; +import { luckysheet_searcharray } from './sheetSearch'; +import luckysheetFreezen from './freezen'; +import luckysheetsizeauto from './resize'; +import { createFilter } from './filter'; +import luckysheetSearchReplace from './searchReplace'; +import luckysheetLocationCell from './locationCell'; +import ifFormulaGenerator from './ifFormulaGenerator'; +import luckysheetupdateCell from './updateCell'; +import insertFormula from './insertFormula'; +import sheetmanage from './sheetmanage'; +import luckysheetPostil from './postil'; +import { isRealNum, isRealNull, isEditMode, hasPartMC } from '../global/validate'; +import tooltip from '../global/tooltip'; +import editor from '../global/editor'; +import { genarate, update, is_date } from '../global/format'; +import { jfrefreshgrid, luckysheetrefreshgrid } from '../global/refresh'; +import { sortSelection } from '../global/sort'; +import luckysheetformula from '../global/formula'; +import { rowLocationByIndex, colLocationByIndex } from '../global/location'; +import { isdatatypemulti } from '../global/datecontroll'; +import { getCellTextSplitArr } from '../global/getRowlen'; +import { setcellvalue } from '../global/setdata'; +import { countfunc } from '../global/count'; +import { getSheetIndex, getRangetxt, getluckysheetfile } from '../methods/get'; +import { setluckysheetfile } from '../methods/set'; +import { replaceHtml, getObjType, rgbTohex, mouseclickposition, luckysheetfontformat } from '../utils/util'; +import Store from '../store'; +import locale from '../locale/locale'; +import { connect } from 'tls'; + +const menuButton = { + "menu": '
${item}
', + "item": '
${name} ${example}
', + "split": '', + "color": '
${resetColor}
${coloritem}
', + "coloritem": '
${name}
', + "subcolor": '
', + "rightclickmenu": null, + "submenuhide": null, + focus: function($obj, value){ + $obj.find(".luckysheet-cols-menuitem").find("span.icon").html(""); + if(value == null){ + $obj.find(".luckysheet-cols-menuitem").eq(0).find("span.icon").html(''); + } + else{ + $obj.find(".luckysheet-cols-menuitem[itemvalue='"+ value +"']").find("span.icon").html(''); + } + }, + createButtonMenu: function(itemdata){ + let itemset = ""; + let _this = this; + + for(let i = 0; i < itemdata.length; i++){ + let item = itemdata[i]; + + if(item.value=="split"){ + itemset += _this.split; + } + else{ + if(item.example=="more"){ + itemset += replaceHtml(_this.item, {"value": item.value, "name": item.text, "example": "►", "sub": "luckysheet-cols-submenu"}); + } + else{ + itemset += replaceHtml(_this.item, {"value": item.value, "name": item.text, "example": item.example, "sub": ""}); + } + } + } + + return itemset; + }, + cancelPaintModel: function(){ + let _this = this; + + $("#luckysheet-sheettable_0").removeClass("luckysheetPaintCursor"); + + if(Store.luckysheet_copy_save["dataSheetIndex"] == Store.currentSheetIndex){ + Store.luckysheet_selection_range = []; + selectionCopyShow(); + } + else{ + Store.luckysheetfile[getSheetIndex(Store.luckysheet_copy_save["dataSheetIndex"])].luckysheet_selection_range = []; + } + + Store.luckysheet_copy_save = {}; + + _this.luckysheetPaintModelOn = false; + $("#luckysheetpopover").fadeOut(200,function(){ + $("#luckysheetpopover").remove(); + }); + }, + luckysheetPaintModelOn:false, + luckysheetPaintSingle: false, + initialMenuButton: function(){ + let _this = this; + + //格式刷 + $("#luckysheet-icon-paintformat").click(function(){ + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择需要复制格式的区域"); + } + else{ + tooltip.info("提示","请选择需要复制格式的区域"); + } + return; + } + else if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("无法对多重选择区域执行此操作"); + } + else{ + tooltip.info("提示","无法对多重选择区域执行此操作"); + } + return; + } + + tooltip.popover(" 格式刷开启", "topCenter", true, null, "ESC键退出",function(){ + _this.cancelPaintModel(); + }); + $("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"); + + Store.luckysheet_selection_range = [{ "row": Store.luckysheet_select_save[0].row, "column": Store.luckysheet_select_save[0].column }]; + selectionCopyShow(); + + let RowlChange = false, HasMC = false; + for(let r = Store.luckysheet_select_save[0].row[0]; r <= Store.luckysheet_select_save[0].row[1]; r++){ + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + if (Store.config["rowlen"] != null && (r in Store.config["rowlen"])){ + RowlChange = true; + } + + for(let c = Store.luckysheet_select_save[0].column[0]; c <= Store.luckysheet_select_save[0].column[1]; c++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell) && cell.mc.rs != null){ + HasMC = true; + } + } + } + Store.luckysheet_copy_save = { "dataSheetIndex": Store.currentSheetIndex, "copyRange": [{ "row": Store.luckysheet_select_save[0].row, "column": Store.luckysheet_select_save[0].column }], "RowlChange": RowlChange, "HasMC": HasMC }; + + _this.luckysheetPaintModelOn = true; + _this.luckysheetPaintSingle = true; + }); + $("#luckysheet-icon-paintformat").dblclick(function(){ + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择需要复制格式的区域"); + } + else{ + tooltip.info("提示","请选择需要复制格式的区域"); + } + return; + } + else if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("无法对多重选择区域执行此操作"); + } + else{ + tooltip.info("提示","无法对多重选择区域执行此操作"); + } + return; + } + + tooltip.popover(" 格式刷开启", "topCenter", true, null, "ESC键退出",function(){ + _this.cancelPaintModel(); + }); + $("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"); + + Store.luckysheet_selection_range = [{ "row": Store.luckysheet_select_save[0].row, "column": Store.luckysheet_select_save[0].column }]; + selectionCopyShow(); + + let RowlChange = false, HasMC = false; + for(let r = Store.luckysheet_select_save[0].row[0]; r <= Store.luckysheet_select_save[0].row[1]; r++){ + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + if (Store.config["rowlen"] != null && (r in Store.config["rowlen"])){ + RowlChange = true; + } + + for(let c = Store.luckysheet_select_save[0].column[0]; c <= Store.luckysheet_select_save[0].column[1]; c++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell) && cell.mc.rs != null){ + HasMC = true; + } + } + } + Store.luckysheet_copy_save = { "dataSheetIndex": Store.currentSheetIndex, "copyRange": [{ "row": Store.luckysheet_select_save[0].row, "column": Store.luckysheet_select_save[0].column }], "RowlChange": RowlChange, "HasMC": HasMC }; + + _this.luckysheetPaintModelOn = true; + _this.luckysheetPaintSingle = false; + }); + + //货币格式 + $("#luckysheet-icon-currency").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + + _this.updateFormat(d, "ct", "¥ #.00"); + }); + + //百分比 + $("#luckysheet-icon-percent").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + + _this.updateFormat(d, "ct", "0.00%"); + }); + + //减少小数位数 + $("#luckysheet-icon-fmt-decimal-decrease").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let row_index = Store.luckysheet_select_save[0]["row_focus"], + col_index = Store.luckysheet_select_save[0]["column_focus"]; + let foucsStatus = _this.checkstatus(d, row_index, col_index, "ct"); + let cell = d[row_index][col_index]; + + if(foucsStatus == null || foucsStatus.t != "n"){ + return; + } + + if(foucsStatus.fa == "General"){ + let mask = genarate(cell.v); + foucsStatus = mask[1]; + } + + //万亿格式 + let reg = /^(w|W)((0?)|(0\.0+))$/; + if(reg.test(foucsStatus.fa)){ + if(foucsStatus.fa.indexOf(".") > -1){ + if(foucsStatus.fa.substr(-2) == ".0"){ + _this.updateFormat(d, "ct", foucsStatus.fa.split(".")[0]); + } + else{ + _this.updateFormat(d, "ct", foucsStatus.fa.substr(0, foucsStatus.fa.length - 1)); + } + } + else{ + _this.updateFormat(d, "ct", foucsStatus.fa); + } + + return; + } + + let prefix = "", main = ""; + if(foucsStatus.fa.indexOf(".")>-1){ + fa = foucsStatus.fa.split("."); + prefix = fa[0]; + main = fa[1]; + } + else{ + return; + } + + let fa = main.split(""); + let tail = ""; + for(let i = fa.length-1; i >= 0; i--){ + let c = fa[i]; + if((c!="#" && c!="0" && c!="," && isNaN(parseInt(c)))) { + tail = c + tail; + } + else{ + break; + } + } + + let fmt = ""; + if(foucsStatus.fa.indexOf(".")>-1){ + let suffix = main; + if(tail.length>0){ + suffix = main.replace(tail, ""); + } + + let pos = suffix.replace(/#/g, "0"); + pos = pos.substr(0, pos.length-1); + if(pos==""){ + fmt = prefix + tail; + } + else{ + fmt = prefix + "." + pos + tail; + } + } + + _this.updateFormat(d, "ct", fmt); + }); + + //增加小数位数 + $("#luckysheet-icon-fmt-decimal-increase").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let row_index = Store.luckysheet_select_save[0]["row_focus"], + col_index = Store.luckysheet_select_save[0]["column_focus"]; + let foucsStatus = _this.checkstatus(d, row_index, col_index, "ct"); + let cell = d[row_index][col_index]; + + if(foucsStatus== null || foucsStatus.t != "n"){ + return; + } + + if(foucsStatus.fa == "General"){ + let mask = genarate(cell.v); + foucsStatus = mask[1]; + } + + if(foucsStatus.fa == "General"){ + _this.updateFormat(d, "ct", "#.0"); + return; + } + + //万亿格式 + let reg = /^(w|W)((0?)|(0\.0+))$/; + if(reg.test(foucsStatus.fa)){ + if(foucsStatus.fa.indexOf(".") > -1){ + _this.updateFormat(d, "ct", foucsStatus.fa + "0"); + } + else{ + if(foucsStatus.fa.substr(-1) == "0"){ + _this.updateFormat(d, "ct", foucsStatus.fa + ".0"); + } + else{ + _this.updateFormat(d, "ct", foucsStatus.fa + "0.0"); + } + } + + return; + } + + let prefix = "", main = ""; + if(foucsStatus.fa.indexOf(".")>-1){ + fa = foucsStatus.fa.split("."); + prefix = fa[0]; + main = fa[1]; + } + else{ + main = foucsStatus.fa; + } + + let fa = main.split(""); + let tail = ""; + for(let i = fa.length - 1; i >= 0; i--){ + let c = fa[i]; + if(( c!="#" && c!="0" && c!="," && isNaN(parseInt(c)))) { + tail = c + tail; + } + else{ + break; + } + } + + let fmt = ""; + if(foucsStatus.fa.indexOf(".")>-1){ + let suffix = main; + if(tail.length>0){ + suffix = main.replace(tail, ""); + } + + let pos = suffix.replace(/#/g, "0"); + pos += "0"; + fmt = prefix + "." + pos + tail; + } + else{ + if(tail.length>0){ + fmt = main.replace(tail, "") + ".0" + tail; + } + else{ + fmt = main + ".0" + tail; + } + } + + + _this.updateFormat(d, "ct", fmt); + }); + + //更多格式 + $("#luckysheet-icon-fmt-other").click(function(){ + const _locale = locale(); + const locale_format = _locale.format; + const locale_defaultFmt = _locale.defaultFmt; + + let menuButtonId = $(this).attr("id")+"-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + let itemdata = locale_defaultFmt; + + let itemset = _this.createButtonMenu(itemdata); + + // luckysheet-menuButton-sub + let menu = replaceHtml(_this.menu, {"id": "fmt-other", "item": itemset, "subclass": "", "sub": ""}); + + let subitemdata = [ + {"text":locale_format.moreCurrency+"...", "value":"morecurrency", "example":""}, + {"text":locale_format.moreDateTime+"...", "value":"moredatetime", "example":""}, + {"text":locale_format.moreNumber+"...", "value":"moredigit", "example":""} + ]; + let subitemset = _this.createButtonMenu(subitemdata); + let submenu = replaceHtml(_this.menu, {"id": "fmtOtherSelf", "item": subitemset, "subclass": "luckysheet-menuButton-sub"}); + + //luckysheet-icon-fmt-other-menuButton_sub + $("body").append(menu+submenu); + $menuButton = $("#" + menuButtonId).width(250); + _this.focus($menuButton); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "fmtOtherSelf"){ + return; + } + + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + _this.focus($menuButton, itemvalue); + + _this.updateFormat(d, "ct", itemvalue); + }); + + //更多格式 + $("#luckysheet-icon-fmtOtherSelf-menuButton").find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#luckysheet-icon-fmtOtherSelf-menuButton").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let itemvalue = $(this).attr("itemvalue"); + + luckysheetMoreFormat.createDialog(itemvalue); + luckysheetMoreFormat.init(); + }) + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top+25, "lefttop"); + }); + + //字体设置 + $("#luckysheet-icon-font-family").click(function(){ + let menuButtonId = $(this).attr("id")+"-menuButton"; + let $menuButton = $("#"+menuButtonId); + if($menuButton.length == 0){ + const locale_fontarray = locale().fontarray; + let itemdata = []; + + for(let a=0;a"+fItem+""; + ret.example = ""; + itemdata.push(ret); + } + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, {"id": "font-family", "item": itemset, "subclass": "", "sub": ""}); + + $("body").append(menu); + $menuButton = $("#"+menuButtonId).width(200); + _this.focus($menuButton); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"), itemname = $t.attr("itemname"); + _this.focus($menuButton, itemvalue); + $("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+ itemname +" "); + + let d = editor.deepCopyFlowData(Store.flowdata); + + _this.updateFormat(d, "ff", itemvalue); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top+25, "lefttop"); + }); + + //字体颜色 + $("#luckysheet-icon-text-color").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata); + let color = $(this).attr("color"); + if(color == null){ + color = "#000000"; + } + _this.updateFormat(d, "fc", color); + }); + + $("#luckysheet-icon-text-color-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#"+menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_toolbar = _locale.toolbar; + const locale_button = _locale.button; + const locale_alternatingColors = _locale.alternatingColors; + let itemdata = [ + {"name":locale_toolbar.alternatingColors+"...", "id":"luckysheet-color-alternate", "example":""} + ]; + + let itemset = _this.createButtonMenu(itemdata); + let subid = "text-color-self"; + let coloritem = replaceHtml(_this.coloritem, {"class": "luckysheet-icon-alternateformat", "name": locale_toolbar.alternatingColors+"..."}); + let menu = replaceHtml(_this.color, {"id":menuButtonId, "coloritem": coloritem, "colorself": subid, "sub": "","resetColor":locale_toolbar.resetColor}); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId); + + $("#" + menuButtonId).find(".luckysheet-color-selected").spectrum({ + showPalette: true, + showPaletteOnly: true, + preferredFormat: "hex", + clickoutFiresChange: false, + showInitial: true, + showInput: true, + flat: true, + hideAfterPaletteSelect: true, + showSelectionPalette: true, + maxPaletteSize: 8, + maxSelectionSize: 8, + cancelText: locale_button.cancel, + chooseText: locale_button.confirm, + togglePaletteMoreText: locale_toolbar.customColor, + togglePaletteLessText: locale_toolbar.collapse, + togglePaletteOnly: true, + clearText: locale_toolbar.clearText, + color:"#000", + noColorSelectedText: locale_toolbar.noColorSelectedText, + localStorageKey: "spectrum.textcolor" + server.gridKey, + palette: [["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"], + ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"], + ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"], + ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"], + ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"], + ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"], + ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"], + ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]], + change: function (color) { + let $input = $(this); + if (color != null) { + color = color.toHexString(); + } + else { + color = "#000"; + } + + let oldcolor = null; + $("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", color); + $("#luckysheet-icon-text-color").attr("color", color); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "fc", color); + + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + }, + }); + + $menuButton.find(".luckysheet-color-reset").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $input = $("#"+ menuButtonId).find(".luckysheet-color-selected"); + $input.val("#000000"); + $("#luckysheet-icon-text-color").attr("color", null); + $input.spectrum("set", "#000000"); + $("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", "#000000"); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "fc", null); + }); + + //交替颜色 + $menuButton.find(".luckysheet-icon-alternateformat").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert(locale_alternatingColors.errorInfo); + } + else{ + tooltip.info(locale_alternatingColors.errorInfo, ""); + } + return; + } + + let range = $.extend(true, {}, Store.luckysheet_select_save[0]); + + let isExists = alternateformat.rangeIsExists(range)[0]; + if(!isExists){ + alternateformat.modelfocusIndex = 0; + alternateformat.new(range); + } + + alternateformat.init(); + alternateformat.perfect(); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + + let offsetTop = $(this).offset().top+26; + setTimeout(function(){ + let $input = $("#" + menuButtonId).find(".luckysheet-color-selected"); + $input.spectrum("set", $input.val()); + mouseclickposition($menuButton, menuleft-28, offsetTop, "lefttop"); + }, 1); + }); + + //背景颜色 + $("#luckysheet-icon-cell-color").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata); + let color = $(this).attr("color"); + if(color == null){ + color = "#ffffff"; + } + _this.updateFormat(d, "bg", color); + }); + + $("#luckysheet-icon-cell-color-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + let subid = "cell-color-self"; + + const _locale = locale(); + const locale_toolbar = _locale.toolbar; + const locale_button = _locale.button; + const locale_alternatingColors = _locale.alternatingColors; + + let coloritem = replaceHtml(_this.coloritem, { "class": "luckysheet-icon-alternateformat", "name": locale_toolbar.alternatingColors+"..." }); + let menu = replaceHtml(_this.color, { "id": menuButtonId, "coloritem": coloritem, "colorself": subid, "sub": "","resetColor":locale_toolbar.resetColor }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId); + + $("#" + menuButtonId).find(".luckysheet-color-selected").spectrum({ + showPalette: true, + showPaletteOnly: true, + preferredFormat: "hex", + clickoutFiresChange: false, + showInitial: true, + showInput: true, + flat: true, + hideAfterPaletteSelect: true, + showSelectionPalette: true, + maxPaletteSize: 8, + maxSelectionSize: 8, + color: "#fff", + cancelText: locale_button.cancel, + chooseText: locale_button.confirm, + togglePaletteMoreText: locale_toolbar.customColor, + togglePaletteLessText: locale_toolbar.collapse, + togglePaletteOnly: true, + clearText: locale_toolbar.clearText, + noColorSelectedText: locale_toolbar.noColorSelectedText, + localStorageKey: "spectrum.bgcolor" + server.gridKey, + palette: [ + ["#000", "#444", "#666", "#999", "#ccc", "#eee", "#f3f3f3", "#fff"], + ["#f00", "#f90", "#ff0", "#0f0", "#0ff", "#00f", "#90f", "#f0f"], + ["#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d0e0e3", "#cfe2f3", "#d9d2e9", "#ead1dc"], + ["#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#9fc5e8", "#b4a7d6", "#d5a6bd"], + ["#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6fa8dc", "#8e7cc3", "#c27ba0"], + ["#c00", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3d85c6", "#674ea7", "#a64d79"], + ["#900", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#0b5394", "#351c75", "#741b47"], + ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] + ], + change: function (color) { + let $input = $(this); + if (color != null) { + color = color.toHexString(); + } + else { + color = "#fff"; + } + + let oldcolor = null; + $("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", color); + + $("#luckysheet-icon-cell-color").attr("color", color); + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "bg", color); + + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + } + }); + + $menuButton.find(".luckysheet-color-reset").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $input = $("#" + menuButtonId).find(".luckysheet-color-selected"); + $input.val("#ffffff"); + $("#luckysheet-icon-cell-color").attr("color", null); + $input.spectrum("set", "#ffffff"); + $("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", "#ffffff"); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "bg", null); + }); + + //交替颜色 + $menuButton.find(".luckysheet-icon-alternateformat").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert(locale_alternatingColors.errorInfo); + } + else{ + tooltip.info(locale_alternatingColors.errorInfo, ""); + } + return; + } + + let range = $.extend(true, {}, Store.luckysheet_select_save[0]); + + let isExists = alternateformat.rangeIsExists(range)[0]; + if(!isExists){ + alternateformat.modelfocusIndex = 0; + alternateformat.new(range); + } + + alternateformat.init(); + alternateformat.perfect(); + }); + + $("#" + menuButtonId).find(".luckysheet-color-selected").val("#fff"); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + + let offsetTop = $(this).offset().top + 26; + setTimeout(function(){ + let $input = $("#"+ menuButtonId).find(".luckysheet-color-selected"); + $input.spectrum("set", $input.val()); + mouseclickposition($menuButton, menuleft - 28, offsetTop, "lefttop"); + }, 1); + }); + + + //字体大小 + let luckysheet_fs_setTimeout = null; + $("#luckysheet-icon-font-size").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + let itemdata = [ + { "text": "9", "value": "9", "example": "" }, + { "text": "10", "value": "10", "example": "" }, + { "text": "11", "value": "11", "example": "" }, + { "text": "12", "value": "12", "example": "" }, + { "text": "14", "value": "14", "example": "" }, + { "text": "16", "value": "16", "example": "" }, + { "text": "18", "value": "18", "example": "" }, + { "text": "20", "value": "20", "example": "" }, + { "text": "22", "value": "22", "example": "" }, + { "text": "24", "value": "24", "example": "" }, + { "text": "26", "value": "26", "example": "" }, + { "text": "28", "value": "28", "example": "" }, + { "text": "36", "value": "36", "example": "" }, + { "text": "48", "value": "48", "example": "" }, + { "text": "72", "value": "72", "example": "" } + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "font-size", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(150); + _this.focus($menuButton, 10); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"), $input = $("#luckysheet-icon-font-size input"); + $("#luckysheet-icon-font-size").attr("itemvalue", itemvalue); + _this.focus($menuButton, itemvalue); + $input.val(itemvalue); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "fs", itemvalue); + + clearTimeout(luckysheet_fs_setTimeout); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let defualtvalue = $("#luckysheet-icon-font-size").attr("itemvalue"); + if(defualtvalue == null){ + defualtvalue = 10; + } + _this.focus($menuButton, defualtvalue); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); + }) + + //边框设置 + $("#luckysheet-icon-border-all").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata); + + let type = $(this).attr("type"); + if(type == null){ + type = "border-all"; + } + + let subcolormenuid = "luckysheet-icon-borderColor-menuButton"; + let color = $("#" + subcolormenuid).find(".luckysheet-color-selected").val(); + let style = $("#luckysheetborderSizepreview").attr("itemvalue"); + + if(color == null || color == ""){ + color = "#000"; + } + + if(style == null || style == ""){ + style = "1"; + } + + let cfg = $.extend(true, {}, Store.config); + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + let borderInfo = { + "rangeType": "range", + "borderType": type, + "color": color, + "style": style, + "range": Store.luckysheet_select_save + } + + cfg["borderInfo"].push(borderInfo); + + if (Store.clearjfundo) { + Store.jfundo = []; + + let redo = []; + + redo["type"] = "borderChange"; + + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = $.extend(true, {}, cfg); + + redo["sheetIndex"] = Store.currentSheetIndex; + + Store.jfredo.push(redo); + } + + server.saveParam("cg", Store.currentSheetIndex, cfg["borderInfo"], { "k": "borderInfo" }); + + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + }); + + $("#luckysheet-icon-border-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + let canvasH = 10, canvasW = 120; + const _locale = locale(); + const locale_border = _locale.border; + const locale_toolbar = _locale.toolbar; + const locale_button = _locale.button; + let itemdata = [ + {"text": locale_border.borderTop, "value": "border-top", "example": '
'}, + {"text": locale_border.borderBottom, "value":"border-bottom", "example": '
'}, + {"text": locale_border.borderLeft, "value":"border-left", "example": '
'}, + {"text": locale_border.borderRight, "value":"border-right", "example": '
'}, + {"text": "", "value": "split", "example":""}, + {"text": locale_border.borderNone, "value": "border-none", "example": '
'}, + {"text": locale_border.borderAll, "value": "border-all", "example": '
'}, + {"text": locale_border.borderOutside, "value": "border-outside", "example": '
'}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_border.borderInside, "value": "border-inside", "example": '
'}, + {"text": locale_border.borderHorizontal, "value": "border-horizontal", "example": '
'}, + {"text": locale_border.borderVertical, "value": "border-vertical", "example": '
'}, + {"text": "", "value": "split", "example": ""}, + {"text": ""+ locale_border.borderColor +"", "value":"borderColor", "example":"more"}, + {"text": ""+ locale_border.borderSize +"", "value":"borderSize", "example":"more"} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "border-menu", "item": itemset, "subclass": "", "sub": "" }); + + let subitemdata = [ + {"text": locale_border.borderNone, "value": "0", "example": ""}, + {"text": "", "value": "1", "example": ""}, + {"text": "", "value": "2", "example": ""}, + {"text": "", "value": "3", "example": ""}, + {"text": "", "value": "4", "example": ""}, + {"text": "", "value": "5", "example": ""}, + {"text": "", "value": "6", "example": ""}, + // {"text":"", "value":"7", "example":""}, + {"text": "", "value": "8", "example": ""}, + {"text": "", "value": "9", "example": ""}, + {"text": "", "value": "10", "example": ""}, + {"text": "", "value": "11", "example": ""}, + // {"text":"", "value":"12", "example":""}, + {"text": "", "value": "13", "example": ""} + ]; + + let subitemset = _this.createButtonMenu(subitemdata); + let submenu = replaceHtml(_this.menu, { "id": "borderSize", "item": subitemset, "subclass": "luckysheet-menuButton-sub" }); + let submenuid = "luckysheet-icon-borderSize-menuButton"; + let subcolormenuid = "luckysheet-icon-borderColor-menuButton"; + let colormenu = replaceHtml(_this.color, { "id": subcolormenuid, "coloritem": "", "colorself": "", "sub": "luckysheet-menuButton-sub",resetColor:locale_toolbar.resetColor }); + + $("body").append(menu + colormenu + submenu); + $menuButton = $("#" + menuButtonId).width(160); + _this.focus($menuButton, "border-all"); + + $("#" + submenuid + " canvas").each(function(i){ + let type = $(this).attr("type"); + let itemvalue = $(this).closest(".luckysheet-cols-menuitem").attr("itemvalue"); + let canvasborder = $(this).addClass("luckysheet-mousedown-cancel").get(0).getContext("2d"); + canvasborder.translate(0.5, 0.5); + + _this.setLineDash(canvasborder, itemvalue, "h", 0, 5, 100, 5); + + canvasborder.strokeStyle = "#000000"; + canvasborder.stroke(); + canvasborder.closePath(); + }); + + $("#" + submenuid + " .luckysheet-cols-menuitem").click(function(){ + $("#"+ submenuid).hide(); + + let $t = $(this), + itemvalue = $t.attr("itemvalue"); + + if(itemvalue == 0){ + $("#luckysheetborderSizepreview").attr("src", "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==").attr("itemvalue", null); + } + else{ + let bg = $t.find("canvas").get(0).toDataURL("image/png"); + $("#luckysheetborderSizepreview").attr("src", bg).attr("itemvalue", itemvalue); + } + + _this.focus($("#" + submenuid), itemvalue); + }); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + if(itemvalue == "borderColor" || itemvalue == "borderSize"){ + return; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + + let color = $("#"+ subcolormenuid).find(".luckysheet-color-selected").val(); + let style = $("#luckysheetborderSizepreview").attr("itemvalue"); + + if(color == null || color == ""){ + color = "#000"; + } + + if(style == null || style == ""){ + style = "1"; + } + + let cfg = $.extend(true, {}, Store.config); + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + let borderInfo = { + "rangeType": "range", + "borderType": itemvalue, + "color": color, + "style": style, + "range": Store.luckysheet_select_save + } + + cfg["borderInfo"].push(borderInfo); + + if (Store.clearjfundo) { + Store.jfundo = []; + + let redo = []; + + redo["type"] = "borderChange"; + + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = $.extend(true, {}, cfg); + + redo["sheetIndex"] = Store.currentSheetIndex; + + Store.jfredo.push(redo); + } + + server.saveParam("cg", Store.currentSheetIndex, cfg["borderInfo"], { "k": "borderInfo" }); + + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + + $("#luckysheet-icon-border-all").attr("type", itemvalue); + + let $icon = $("#luckysheet-icon-border-all").find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-" + itemvalue); + + _this.focus($menuButton, itemvalue); + }); + + $("#" + subcolormenuid).find(".luckysheet-color-selected").spectrum({ + showPalette: true, + showPaletteOnly: true, + preferredFormat: "hex", + clickoutFiresChange: false, + showInitial: true, + showInput: true, + flat: true, + hideAfterPaletteSelect: true, + showSelectionPalette: true, + maxPaletteSize: 8, + maxSelectionSize: 8, + color: "#000", + cancelText: locale_button.cancel, + chooseText: locale_button.confirm, + togglePaletteMoreText: locale_toolbar.customColor, + togglePaletteLessText: locale_toolbar.collapse, + togglePaletteOnly: true, + clearText: locale_toolbar.clearText, + noColorSelectedText:locale_toolbar.noColorSelectedText, + localStorageKey: "spectrum.bordercolor" + server.gridKey, + palette: [ + ["#000", "#444", "#666", "#999", "#ccc", "#eee", "#f3f3f3", "#fff"], + ["#f00", "#f90", "#ff0", "#0f0", "#0ff", "#00f", "#90f", "#f0f"], + ["#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d0e0e3", "#cfe2f3", "#d9d2e9", "#ead1dc"], + ["#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#9fc5e8", "#b4a7d6", "#d5a6bd"], + ["#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6fa8dc", "#8e7cc3", "#c27ba0"], + ["#c00", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3d85c6", "#674ea7", "#a64d79"], + ["#900", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#0b5394", "#351c75", "#741b47"], + ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] + ], + change: function (color) { + let $input = $(this); + if (color != null) { + color = color.toHexString(); + } + else { + color = "#000"; + } + + let oldcolor = null; + $("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color", color); + $("#"+ subcolormenuid).find(".luckysheet-color-selected").val(color); + } + }); + + $("#"+ subcolormenuid).find(".luckysheet-color-reset").click(function(){ + let $input = $("#"+ subcolormenuid).find(".luckysheet-color-selected"); + $input.val("#000"); + $("#luckysheet-icon-cell-color").attr("color", null); + $input.spectrum("set", "#000"); + $("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color", "#000"); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft-28, $(this).offset().top+25, "lefttop"); + }); + + //合并单元格 + $("#luckysheet-icon-merge-button").click(function(){ + if(selectIsOverlap()){ + if(isEditMode()){ + alert("不能合并重叠区域"); + } + else{ + tooltip.info("不能合并重叠区域", ""); + } + return; + } + + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert("无法对部分合并单元格执行此操作"); + } + else{ + tooltip.info("无法对部分合并单元格执行此操作", ""); + } + return; + } + } + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat_mc(d, "mergeAll"); + }); + + $("#luckysheet-icon-merge-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_merge = _locale.merge; + + let itemdata = [ + {"text": locale_merge.mergeAll, "value": "mergeAll", "example": ""}, + {"text": locale_merge.mergeV, "value": "mergeV", "example": ""}, + {"text": locale_merge.mergeH, "value": "mergeH", "example": ""}, + {"text": locale_merge.mergeCancel, "value": "mergeCancel", "example": ""} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "merge-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#"+menuButtonId).width(100); + _this.focus($menuButton); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + if(selectIsOverlap()){ + if(isEditMode()){ + alert(locale_merge.overlappingError); + } + else{ + tooltip.info(locale_merge.overlappingError, ""); + } + return; + } + + if(Store.config["merge"] != null){ + let has_PartMC = false; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let r1 = Store.luckysheet_select_save[s].row[0], + r2 = Store.luckysheet_select_save[s].row[1]; + let c1 = Store.luckysheet_select_save[s].column[0], + c2 = Store.luckysheet_select_save[s].column[1]; + + has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2); + + if(has_PartMC){ + break; + } + } + + if(has_PartMC){ + if(isEditMode()){ + alert(locale_merge.partiallyError); + } + else{ + tooltip.info(locale_merge.partiallyError, ""); + } + return; + } + } + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + _this.focus($menuButton, itemvalue); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat_mc(d, itemvalue); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); + }); + + //水平对齐 + $("#luckysheet-icon-align").click(function(){ + let itemvalue = $("#luckysheet-icon-align").attr("type"); + if(itemvalue == null){ + itemvalue = "left"; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "ht", itemvalue); + }); + + $("#luckysheet-icon-align-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_align = _locale.align; + let itemdata = [ + {"text": locale_align.left, "value": "left", "example": '
'}, + {"text": locale_align.center, "value": "center", "example": '
'}, + {"text": locale_align.right, "value": "right", "example": '
'} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "align-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(120); + _this.focus($menuButton); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-align").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-" + itemvalue); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "ht", itemvalue); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); + }); + + //垂直对齐 + $("#luckysheet-icon-valign").click(function(){ + let itemvalue = $("#luckysheet-icon-valign").attr("type"); + if(itemvalue == null){ + itemvalue = "bottom"; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "vt", itemvalue); + }); + + $("#luckysheet-icon-valign-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + const _locale = locale(); + const locale_align = _locale.align; + if($menuButton.length == 0){ + let itemdata = [ + {"text": locale_align.top, "value": "top", "example": '
'}, + {"text": locale_align.middle, "value": "middle", "example": '
'}, + {"text": locale_align.bottom, "value": "bottom", "example": '
'} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "valign-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(120); + _this.focus($menuButton, "bottom"); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-valign").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-" + itemvalue); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "vt", itemvalue); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); + }); + + //文本换行 + $("#luckysheet-icon-textwrap-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_textWrap = _locale.textWrap; + let itemdata = [ + {"text": locale_textWrap.overflow, "value": "overflow", "example": '
'}, + {"text": locale_textWrap.wrap, "value": "wrap", "example": '
'}, + {"text": locale_textWrap.clip, "value": "clip", "example": '
'} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "textwrap-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(120); + _this.focus($menuButton); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-textwrap").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-" + itemvalue); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "tb", itemvalue); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); + }); + + //文本旋转 + $("#luckysheet-icon-rotation-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_rotation = _locale.rotation; + let itemdata = [ + {"text": locale_rotation.none, "value": "none", "example": '
'}, + {"text": locale_rotation.angleup, "value": "angleup", "example": '
'}, + {"text": locale_rotation.angledown, "value": "angledown", "example": '
'}, + {"text": locale_rotation.vertical, "value": "vertical", "example": '
'}, + {"text": locale_rotation.rotationUp, "value": "rotation-up", "example": '
'}, + {"text": locale_rotation.rotationDown, "value": "rotation-down", "example": '
'}, + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "rotation-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(120); + _this.focus($menuButton); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-rotation").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-" + itemvalue); + + let d = editor.deepCopyFlowData(Store.flowdata); + _this.updateFormat(d, "tr", itemvalue); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); + }); + + //冻结行列 + $("#luckysheet-icon-freezen-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_freezen = _locale.freezen; + let itemdata = [ + {"text": locale_freezen.freezenRow, "value": "freezenRow", "example": ''}, + {"text": locale_freezen.freezenColumn, "value": "freezenColumn", "example": ''}, + {"text": locale_freezen.freezenRC, "value": "freezenRC", "example": ''}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_freezen.freezenRowRange, "value": "freezenRowRange", "example": ''}, + {"text": locale_freezen.freezenColumnRange, "value": "freezenColumnRange", "example": ''}, + {"text": locale_freezen.freezenRCRange, "value": "freezenRCRange", "example": ''}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_freezen.freezenCancel, "value": "freezenCancel", "example": ''} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "freezen-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(160); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + _this.focus($menuButton, itemvalue); + + if(itemvalue == "freezenRow"){ //首行冻结 + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let row_st = luckysheet_searcharray(Store.visibledatarow, scrollTop); + if(row_st == -1){ + row_st = 0; + } + let top = Store.visibledatarow[row_st] - 2 - scrollTop + Store.columeHeaderHeight; + let freezenhorizontaldata = [Store.visibledatarow[row_st], row_st + 1, scrollTop, luckysheetFreezen.cutVolumn(Store.visibledatarow, row_st + 1), top]; + luckysheetFreezen.saveFreezen(freezenhorizontaldata, top, null, null); + + if (luckysheetFreezen.freezenverticaldata != null) { + luckysheetFreezen.cancelFreezenVertical(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + luckysheetFreezen.createFreezenHorizontal(freezenhorizontaldata, top); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + else if(itemvalue == "freezenColumn"){ //首列冻结 + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollLeft); + if(col_st == -1){ + col_st = 0; + } + let left = Store.visibledatacolumn[col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + let freezenverticaldata = [Store.visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_st + 1), left]; + luckysheetFreezen.saveFreezen(null, null, freezenverticaldata, left); + + if (luckysheetFreezen.freezenhorizontaldata != null) { + luckysheetFreezen.cancelFreezenHorizontal(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + luckysheetFreezen.createFreezenVertical(freezenverticaldata, left); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + else if(itemvalue == "freezenRC"){ //首行列冻结 + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let row_st = luckysheet_searcharray(Store.visibledatarow, scrollTop); + if(row_st == -1){ + row_st = 0; + } + let top = Store.visibledatarow[row_st] - 2 - scrollTop + Store.columeHeaderHeight; + let freezenhorizontaldata = [Store.visibledatarow[row_st], row_st + 1, scrollTop, luckysheetFreezen.cutVolumn(Store.visibledatarow, row_st + 1), top]; + luckysheetFreezen.saveFreezen(freezenhorizontaldata, top, null, null); + + luckysheetFreezen.createFreezenHorizontal(freezenhorizontaldata, top); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollLeft); + if(col_st == -1){ + col_st = 0; + } + let left = Store.visibledatacolumn[col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + let freezenverticaldata = [Store.visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_st + 1), left]; + luckysheetFreezen.saveFreezen(null, null, freezenverticaldata, left); + + luckysheetFreezen.createFreezenVertical(freezenverticaldata, left); + + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + else if(itemvalue == "freezenRowRange"){ //选区行冻结 + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert(locale_freezen.noSeletionError); + } + else{ + tooltip.info(locale_freezen.noSeletionError, ""); + } + + return; + } + + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let row_st = luckysheet_searcharray(Store.visibledatarow, scrollTop); + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let row_focus = last["row_focus"] == null ? last["row"][0] : last["row_focus"]; + + if(row_focus > row_st){ + row_st = row_focus; + } + + if(row_st == -1){ + row_st = 0; + } + + let top = Store.visibledatarow[row_st] - 2 - scrollTop + Store.columeHeaderHeight; + let freezenhorizontaldata = [Store.visibledatarow[row_st], row_st + 1, scrollTop, luckysheetFreezen.cutVolumn(Store.visibledatarow, row_st + 1), top]; + luckysheetFreezen.saveFreezen(freezenhorizontaldata, top, null, null); + + if (luckysheetFreezen.freezenverticaldata != null) { + luckysheetFreezen.cancelFreezenVertical(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + luckysheetFreezen.createFreezenHorizontal(freezenhorizontaldata, top); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + else if(itemvalue == "freezenColumnRange"){ //选区列冻结 + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert(locale_freezen.noSeletionError); + } + else{ + tooltip.info(locale_freezen.noSeletionError,""); + } + + return; + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollLeft); + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let column_focus = last["column_focus"] == null ? last["column"][0] : last["column_focus"]; + + if(column_focus > col_st){ + col_st = column_focus; + } + + if(col_st == -1){ + col_st = 0; + } + + let left = Store.visibledatacolumn[col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + let freezenverticaldata = [Store.visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_st + 1), left]; + luckysheetFreezen.saveFreezen(null, null, freezenverticaldata, left); + + if (luckysheetFreezen.freezenhorizontaldata != null) { + luckysheetFreezen.cancelFreezenHorizontal(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + luckysheetFreezen.createFreezenVertical(freezenverticaldata, left); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + else if(itemvalue == "freezenRCRange"){ //选区行列冻结 + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert(locale_freezen.noSeletionError); + } + else{ + tooltip.info(locale_freezen.noSeletionError,""); + } + + return; + } + + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let row_st = luckysheet_searcharray(Store.visibledatarow, scrollTop); + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let row_focus = last["row_focus"] == null ? last["row"][0] : last["row_focus"]; + + if(row_focus > row_st){ + row_st = row_focus; + } + + if(row_st == -1){ + row_st = 0; + } + + let top = Store.visibledatarow[row_st] - 2 - scrollTop + Store.columeHeaderHeight; + let freezenhorizontaldata = [Store.visibledatarow[row_st], row_st + 1, scrollTop, luckysheetFreezen.cutVolumn(Store.visibledatarow, row_st + 1), top]; + luckysheetFreezen.saveFreezen(freezenhorizontaldata, top, null, null); + + luckysheetFreezen.createFreezenHorizontal(freezenhorizontaldata, top); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollLeft); + + let column_focus = last["column_focus"] == null ? last["column"][0] : last["column_focus"]; + + if(column_focus > col_st){ + col_st = column_focus; + } + + if(col_st == -1){ + col_st = 0; + } + + let left = Store.visibledatacolumn[col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + let freezenverticaldata = [Store.visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_st + 1), left]; + luckysheetFreezen.saveFreezen(null, null, freezenverticaldata, left); + + luckysheetFreezen.createFreezenVertical(freezenverticaldata, left); + + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + else if(itemvalue == "freezenCancel"){ //Cancel freezen + if (luckysheetFreezen.freezenverticaldata != null) { + luckysheetFreezen.cancelFreezenVertical(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + if (luckysheetFreezen.freezenhorizontaldata != null) { + luckysheetFreezen.cancelFreezenHorizontal(); + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid(); + } + + luckysheetFreezen.scrollAdapt(); + } + + setTimeout(function(){ + luckysheetsizeauto(); + },0); + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft - 68, $(this).offset().top + 25, "lefttop"); + }); + + //过滤和排序 + $("#luckysheet-icon-autofilter").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + const _locale = locale(); + const locale_sort = _locale.sort; + const locale_filter = _locale.filter; + let itemdata = [ + {"text": locale_sort.asc, "value": "asc", "example": ''}, + {"text": locale_sort.desc, "value": "desc", "example": ''}, + {"text": locale_sort.custom+"...", "value": "diysort", "example": ''}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_filter.filter, "value": "filter", "example": ''}, + {"text": locale_filter.clearFilter, "value": "clearfilter", "example": ''} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, {"id":"autofilter", "item": itemset, "subclass":"", "sub":""}); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(150); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "diysort"){ + $("#luckysheetorderby").click(); + } + else if(itemvalue == "asc"){ + sortSelection(true); + } + else if(itemvalue == "desc"){ + sortSelection(false); + } + else if(itemvalue == "filter"){ + if($('#luckysheet-filter-options-sheet' + Store.currentSheetIndex).length > 0){ + $("#luckysheet-filter-initial").click(); + } + else{ + createFilter(); + } + } + else if(itemvalue == "clearfilter"){ + $("#luckysheet-filter-initial").click(); + } + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); + }); + + //查找和替换 + $("#luckysheet-icon-seachmore").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + const _locale = locale(); + const locale_findAndReplace = _locale.findAndReplace; + if($menuButton.length == 0){ + let itemdata = [ + {"text": locale_findAndReplace.find+" ...", "value": "search", "example": ''}, + {"text": locale_findAndReplace.replace+" ...", "value": "replace", "example": ''}, + {"text": locale_findAndReplace.goto+" ...", "value": "goto", "example": ''}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_findAndReplace.location+" ...", "value": "location", "example": ''}, + {"text": locale_findAndReplace.formula, "value": "locationFormula", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.date, "value": "locationConstantDate", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.number, "value": "locationConstantNumber", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.string, "value": "locationConstantString", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.error, "value": "locationConstantError", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.condition, "value": "locationCF", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.rowSpan, "value": "locationStepRow", "example": locale_findAndReplace.locationExample}, + {"text": locale_findAndReplace.columnSpan, "value": "locationStepColumn", "example": locale_findAndReplace.locationExample} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "seachmore", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(180); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "search" || itemvalue == "replace"){ //查找替换 + if(itemvalue == "search"){ + luckysheetSearchReplace.createDialog(0); + } + else if(itemvalue == "replace"){ + luckysheetSearchReplace.createDialog(1); + } + + luckysheetSearchReplace.init(); + + $("#luckysheet-search-replace #searchInput input").focus(); + } + else if(itemvalue == "location"){ //定位条件 + luckysheetLocationCell.createDialog(); + luckysheetLocationCell.init(); + } + else if(itemvalue == "locationFormula" || itemvalue == "locationConstantDate" || itemvalue == "locationConstantNumber" || itemvalue == "locationConstantString" || itemvalue == "locationConstantError" || itemvalue == "locationCF"){ + let last = Store.luckysheet_select_save[0]; + + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && last.row[0] == last.row[1] && last.column[0] == last.column[1])){ + //单个单元格 + range = [{"row": [0, Store.flowdata.length - 1], "column": [0, Store.flowdata[0].length - 1]}]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + if(itemvalue == "locationFormula"){ //公式 + luckysheetLocationCell.apply(range, "locationFormula", "all"); + } + else if(itemvalue == "locationConstantDate"){ //日期 + luckysheetLocationCell.apply(range, "locationConstant", "d"); + } + else if(itemvalue == "locationConstantNumber"){ //数字 + luckysheetLocationCell.apply(range, "locationConstant", "n"); + } + else if(itemvalue == "locationConstantString"){ //字符 + luckysheetLocationCell.apply(range, "locationConstant", "s,g"); + } + else if(itemvalue == "locationConstantError"){ //错误 + luckysheetLocationCell.apply(range, "locationConstant", "e"); + } + else if(itemvalue == "locationCF"){ //条件格式 + luckysheetLocationCell.apply(range, "locationCF"); + } + } + else if(itemvalue == "locationStepRow"){ //间隔行 + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1])){ + if(isEditMode()){ + alert(locale_findAndReplace.lessTwoRowTip); + } + else{ + tooltip.info("", locale_findAndReplace.lessTwoRowTip); + } + return; + } + + let range = $.extend(true, [], Store.luckysheet_select_save); + + luckysheetLocationCell.apply(range, "locationStepRow"); + } + else if(itemvalue == "locationStepColumn"){ //间隔列 + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + if(isEditMode()){ + alert(locale_findAndReplace.lessTwoColumnTip); + } + else{ + tooltip.info("", locale_findAndReplace.lessTwoColumnTip); + } + return; + } + + let range = $.extend(true, [], Store.luckysheet_select_save); + + luckysheetLocationCell.apply(range, "locationStepColumn"); + } + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); + }); + + //公式 + $("#luckysheet-icon-function").click(function(){ + _this.autoSelectionFormula("SUM"); + }); + + //公式菜单 + $("#luckysheet-icon-function-menu").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + let itemdata = [ + {"text": "求和", "value": "SUM", "example": 'SUM'}, + {"text": "平均值", "value": "AVERAGE", "example": 'AVERAGE'}, + {"text": "计数", "value": "COUNT", "example": 'COUNT'}, + {"text": "最大值", "value": "MAX", "example": 'MAX'}, + {"text": "最小值", "value": "MIN", "example": 'MIN'}, + {"text": "", "value": "split", "example": ""}, + {"text": "if公式生成器", "value": "if", "example": 'IF'}, + {"text": "函数查找 ...", "value": "formula", "example": ""} + ]; + + let itemset = _this.createButtonMenu(itemdata); + + let menu = replaceHtml(_this.menu, { "id": "function-menu", "item": itemset, "subclass": "", "sub": "" }); + + $("body").append(menu); + $menuButton = $("#" + menuButtonId).width(150); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "if"){ + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let r = last["row_focus"] == null ? last["row"][0] : last["row_focus"]; + let c = last["column_focus"] == null ? last["column"][0] : last["column_focus"]; + + if(!!Store.flowdata[r] && !!Store.flowdata[r][c] && !!Store.flowdata[r][c]["f"]){ + let fp = Store.flowdata[r][c]["f"].toString(); + + if(fp.indexOf("=if(") != -1){ + ifFormulaGenerator.ifFormulaDialog(fp); + } + else{ + if(isEditMode()){ + alert("该单元格函数不属于if公式!"); + } + else{ + tooltip.info("该单元格函数不属于if公式!",""); + } + return; + } + } + else{ + ifFormulaGenerator.ifFormulaDialog(); + } + + ifFormulaGenerator.init(); + } + else if(itemvalue == "formula"){ + //点击函数查找弹出框 + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择单元格插入函数"); + } + else{ + tooltip.info("请选择单元格插入函数",""); + } + + return; + } + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"], col_index = last["column_focus"]; + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); + + let cell = Store.flowdata[row_index][col_index]; + if(cell != null && cell.f != null){ + //单元格有计算 + let functionStr = luckysheetformula.getfunctionParam(cell.f); + if(functionStr.fn != null){ + //有函数公式 + insertFormula.formulaParmDialog(functionStr.fn, functionStr.param); + } + else{ + //无函数公式 + insertFormula.formulaListDialog(); + } + } + else{ + //单元格无计算 + $("#luckysheet-rich-text-editor").html('='); + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + insertFormula.formulaListDialog(); + } + + insertFormula.init(); + } + else { + _this.autoSelectionFormula(itemvalue); + } + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft-48, $(this).offset().top+25, "lefttop"); + }); + + //加粗 + $("#luckysheet-icon-bold").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata); + let row_index = Store.luckysheet_select_save[0]["row_focus"], + col_index = Store.luckysheet_select_save[0]["column_focus"]; + let foucsStatus = _this.checkstatus(d, row_index, col_index, "bl"); + + if(foucsStatus == 1){ + foucsStatus = 0; + } + else{ + foucsStatus = 1; + } + + _this.updateFormat(d, "bl", foucsStatus); + _this.menuButtonFocus(d, row_index, col_index); + }); + + //斜体 + $("#luckysheet-icon-italic").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata); + let row_index = Store.luckysheet_select_save[0]["row_focus"], + col_index = Store.luckysheet_select_save[0]["column_focus"]; + let foucsStatus = _this.checkstatus(d, row_index, col_index, "it"); + + if(foucsStatus == 1){ + foucsStatus = 0; + } + else{ + foucsStatus = 1; + } + + _this.updateFormat(d, "it", foucsStatus); + _this.menuButtonFocus(d, row_index, col_index); + }); + + //删除线 + $("#luckysheet-icon-strikethrough").click(function(){ + let d = editor.deepCopyFlowData(Store.flowdata); + let row_index = Store.luckysheet_select_save[0]["row_focus"], + col_index = Store.luckysheet_select_save[0]["column_focus"]; + let foucsStatus = _this.checkstatus(d, row_index, col_index, "cl"); + + if(foucsStatus == 1){ + foucsStatus = 0; + } + else{ + foucsStatus = 1; + } + + _this.updateFormat(d, "cl", foucsStatus); + _this.menuButtonFocus(d, row_index, col_index); + }); + + //条件格式 + $("#luckysheet-icon-conditionformat").click(function(){ + let menuButtonId = $(this).attr("id") + "-menuButton"; + let $menuButton = $("#" + menuButtonId); + + if($menuButton.length == 0){ + let itemdata = [ + {"text": "突出显示单元格规则", "value": "highlightCellRule", "example": "more"}, + {"text": "项目选取规则", "value": "projectSelectRule", "example": "more"}, + {"text": "数据条", "value": "dataBar", "example": "more"}, + {"text": "色阶", "value": "colorGradation", "example": "more"}, + {"text": "图标集", "value": "icons", "example": ""}, + {"text": "", "value": "split", "example": ""}, + {"text": "新建规则", "value": "newRule", "example": ""}, + {"text": "清除规则", "value": "deleteRule", "example": "more"}, + {"text": "管理规则", "value": "administerRule", "example": ""} + ]; + let itemset = _this.createButtonMenu(itemdata); + let menu = replaceHtml(_this.menu, {"id": "conditionformat", "item": itemset, "subclass": "", "sub": ""}); + + //突出显示单元格规则子菜单 + let subitemdata = [ + {"text": "大于", "value": "greaterThan", "example": ">"}, + {"text": "小于", "value": "lessThan", "example": "<"}, + {"text": "介于", "value": "betweenness", "example": "[]"}, + {"text": "等于", "value": "equal", "example": "="}, + {"text": "文本包含", "value": "textContains", "example": "()"}, + {"text": "发生日期", "value": "occurrenceDate", "example": "昨天"}, + {"text": "重复值", "value": "duplicateValue", "example": "##"} + ]; + let subitemset = _this.createButtonMenu(subitemdata); + let submenu = replaceHtml(_this.menu, {"id": "highlightCellRule", "item": subitemset, "subclass": "luckysheet-menuButton-sub"}); + + //项目选取规则子菜单 + let subitemdata2 = [ + {"text": "前 10 项", "value": "top10", "example": "前10项"}, + {"text": "前 10%", "value": "top10%", "example": "前10%"}, + {"text": "最后 10 项", "value": "last10", "example": "后10项"}, + {"text": "最后 10%", "value": "last10%", "example": "后10%"}, + {"text": "高于平均值", "value": "AboveAverage", "example": "高于均值"}, + {"text": "低于平均值", "value": "SubAverage", "example": "低于均值"} + ]; + let subitemset2 = _this.createButtonMenu(subitemdata2); + let submenu2 = replaceHtml(_this.menu, {"id": "projectSelectRule", "item": subitemset2, "subclass": "luckysheet-menuButton-sub"}); + + //数据条子菜单 + let submenu3 = ''; + + //色阶 + let submenu4 = ''; + + //清除规则子菜单 + let subitemdata6 = [ + // {"text":"清除所选单元格的规则", "value":"", "example":""}, + {"text":"清除整个工作表的规则", "value":"delSheet", "example":""} + ]; + let subitemset6 = _this.createButtonMenu(subitemdata6); + let submenu6 = replaceHtml(_this.menu, {"id": "deleteRule", "item": subitemset6, "subclass":"luckysheet-menuButton-sub"}); + + $("body").append(menu + submenu + submenu2 + submenu3 + submenu4 + submenu6); + $menuButton = $("#" + menuButtonId).width(190); + $("#luckysheet-icon-highlightCellRule-menuButton").width(130); + $("#luckysheet-icon-projectSelectRule-menuButton").width(170); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "icons"){ + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择应用范围"); + } + else{ + tooltip.info("请选择应用范围", ""); + } + return; + } + + conditionformat.CFiconsDialog(); + conditionformat.init(); + } + else if(itemvalue == "newRule"){ + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择应用范围"); + } + else{ + tooltip.info("请选择应用范围", ""); + } + return; + } + + conditionformat.newConditionRuleDialog(0); + conditionformat.init(); + } + else if(itemvalue == "administerRule"){ + let loadSheetUrl = server.loadSheetUrl; + let file = getluckysheetfile(); + + if(loadSheetUrl != "" && loadSheetUrl != null){ + let sheetindex = []; + for(let i = 0; i < file.length; i++){ + sheetindex.push(file[i].index); + } + + $.post(loadSheetUrl, {"gridKey" : server.gridKey, "index": sheetindex.join(",")}, function (d) { + let dataset = eval("(" + d + ")"); + + setTimeout(function(){ + $("#luckysheetloadingdata").fadeOut().remove(); + }, 500); + + for(let item in dataset){ + if(item == Store.currentSheetIndex){ + continue; + } + + let otherfile = file[getSheetIndex(item)]; + + otherfile.celldata = dataset[item.toString()]; + otherfile["data"] = sheetmanage.buildGridData(otherfile); + } + + setluckysheetfile(file); + + conditionformat.fileClone = $.extend(true, [], file); + conditionformat.administerRuleDialog(); + conditionformat.init(); + }); + } + else{ + conditionformat.fileClone = $.extend(true, [], file); + conditionformat.administerRuleDialog(); + conditionformat.init(); + } + } + }); + + //突出显示单元格规则子菜单点击事件 + $(document).off("click.CFhighlightCellRule").on("click.CFhighlightCellRule", "#luckysheet-icon-highlightCellRule-menuButton .luckysheet-cols-menuitem", function(){ + $menuButton.hide(); + $("#luckysheet-icon-highlightCellRule-menuButton").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择条件格式的应用范围"); + } + else{ + tooltip.info("请选择条件格式的应用范围", ""); + } + return; + } + else{ + let textCellColorHtml = conditionformat.textCellColorHtml; + + let title, content; + switch(itemvalue){ + case "greaterThan": + title = "条件格式——大于"; + content = '
' + + '
为大于以下值的单元格设置格式:
' + + '
' + + '' + + '' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "lessThan": + title = "条件格式——小于"; + content = '
' + + '
为小于以下值的单元格设置格式:
' + + '
' + + '' + + '' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "betweenness": + title = "条件格式——介于"; + content = '
' + + '
为介于以下值的单元格设置格式:
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "equal": + title = "条件格式——等于"; + content = '
' + + '
为等于以下值的单元格设置格式:
' + + '
' + + '' + + '' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "textContains": + title = "条件格式——文本包含"; + content = '
' + + '
为包含以下文本的单元格设置格式:
' + + '
' + + '' + + '' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "occurrenceDate": + title = "条件格式——发生日期"; + content = '
' + + '
为包含以下日期的单元格设置格式:
' + + '
' + + '' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "duplicateValue": + title = "条件格式——重复值"; + content = '
' + + '
为包含以下类型值的单元格设置格式:
' + + '' + + '' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + } + + conditionformat.conditionformatDialog(title, content); + } + }); + + //项目选取规则子菜单点击事件 + $(document).off("click.CFprojectSelectRule").on("click.CFprojectSelectRule", "#luckysheet-icon-projectSelectRule-menuButton .luckysheet-cols-menuitem", function(){ + $menuButton.hide(); + $("#luckysheet-icon-projectSelectRule-menuButton").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(Store.luckysheet_select_save.length == 0){ + if(isEditMode()){ + alert("请选择条件格式的应用范围"); + } + else{ + tooltip.info("请选择条件格式的应用范围", ""); + } + return; + } + else{ + let textCellColorHtml = conditionformat.textCellColorHtml; + + let title, content; + switch(itemvalue){ + case "top10": + title = "条件格式——前 10 项"; + content = '
' + + '
为值最大的那些单元格设置格式:
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "top10%": + title = "条件格式——前 10%"; + content = '
' + + '
为值最大的那些单元格设置格式:
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
%
' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "last10": + title = "条件格式——最后 10 项"; + content = '
' + + '
为值最小的那些单元格设置格式:
' + + '
' + + '
最后
' + + '
' + + '' + + '
' + + '
' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "last10%": + title = "条件格式——最后 10%"; + content = '
' + + '
为值最小的那些单元格设置格式:
' + + '
' + + '
最后
' + + '
' + + '' + + '
' + + '
%
' + + '
' + + '
设置为:
' + + textCellColorHtml + + '
'; + break; + case "AboveAverage": + title = "条件格式——高于平均值"; + content = '
' + + '
为高于平均值的单元格设置格式:
' + + '
针对选定区域,设置为:
' + + textCellColorHtml + + '
'; + break; + case "SubAverage": + title = "条件格式——低于平均值"; + content = '
' + + '
为低于平均值的单元格设置格式:
' + + '
针对选定区域,设置为:
' + + textCellColorHtml + + '
'; + break; + } + + conditionformat.conditionformatDialog(title,content); + } + }); + + //数据条子菜单点击事件 + $(document).off("click.CFdataBar").on("click.CFdataBar", "#luckysheet-icon-dataBar-menuButton .luckysheet-cols-menuitem", function(){ + $menuButton.hide(); + $("#luckysheet-icon-dataBar-menuButton").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(Store.luckysheet_select_save.length > 0){ + let cellrange = $.extend(true, [], Store.luckysheet_select_save); + let format = conditionformat.dataBarList[itemvalue]["format"]; + + conditionformat.updateItem("dataBar", cellrange, format); + } + }); + + //色阶子菜单点击事件 + $(document).off("click.CFcolorGradation").on("click.CFcolorGradation", "#luckysheet-icon-colorGradation-menuButton .luckysheet-cols-menuitem", function(){ + $menuButton.hide(); + $("#luckysheet-icon-colorGradation-menuButton").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(Store.luckysheet_select_save.length > 0){ + let cellrange = $.extend(true, [], Store.luckysheet_select_save); + let format = conditionformat.colorGradationList[itemvalue]["format"]; + + conditionformat.updateItem("colorGradation", cellrange, format); + } + }); + + //清除规则子菜单点击事件 + $(document).off("click.CFdeleteRule").on("click.CFdeleteRule", "#luckysheet-icon-deleteRule-menuButton .luckysheet-cols-menuitem", function(){ + $menuButton.hide(); + $("#luckysheet-icon-deleteRule-menuButton").hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "delSheet"){ + conditionformat.updateItem("delSheet"); + } + }); + } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); + }); + + //批注 + $("#luckysheet-icon-postil").click(function(){ + let menuButtonId = $(this).attr("id")+"-menuButton"; + let $menuButton = $("#" + menuButtonId); + + const locale_comment = locale().comment; + + $menuButton.remove(); + + // if($menuButton.length == 0){ + luckysheetPostil.removeActivePs(); + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let row_index = last["row_focus"]; + if(row_index == null){ + row_index = last["row"][0]; + } + + let col_index = last["column_focus"]; + if(col_index == null){ + col_index = last["column"][0]; + } + + let itemdata; + if(Store.flowdata[row_index][col_index] != null && Store.flowdata[row_index][col_index].ps != null){ + itemdata = [ + {"text": locale_comment.edit, "value": "editPs", "example": ""}, + {"text": locale_comment.delete, "value": "delPs", "example": ""}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_comment.showOne, "value": "showHidePs", "example": ""}, + {"text": locale_comment.showAll, "value": "showHideAllPs", "example": ""} + ]; + } + else{ + itemdata = [ + {"text": locale_comment.insert, "value": "newPs", "example": ""}, + {"text": "", "value": "split", "example": ""}, + {"text": locale_comment.showAll, "value": "showHideAllPs", "example": ""} + ]; + } + + let itemset = _this.createButtonMenu(itemdata); + let menu = replaceHtml(_this.menu, {"id": "postil", "item": itemset, "subclass": "", "sub": ""}); + + $("body").append(menu); + $menuButton = $("#"+menuButtonId).width(150); + + $menuButton.find(".luckysheet-cols-menuitem").click(function(){ + $menuButton.hide(); + $("#" + Store.container).attr("tabindex", 0).focus(); + + let $t = $(this), itemvalue = $t.attr("itemvalue"); + + if(itemvalue == "newPs"){ + luckysheetPostil.newPs(row_index, col_index); + } + else if(itemvalue == "editPs"){ + luckysheetPostil.editPs(row_index, col_index); + } + else if(itemvalue == "delPs"){ + luckysheetPostil.delPs(row_index, col_index); + } + else if(itemvalue == "showHidePs"){ + luckysheetPostil.showHidePs(row_index, col_index); + } + else if(itemvalue == "showHideAllPs"){ + luckysheetPostil.showHideAllPs(); + } + }); + // } + + let userlen = $(this).outerWidth(); + let tlen = $menuButton.outerWidth(); + + let menuleft = $(this).offset().left; + if(tlen > userlen && (tlen + menuleft) > $("#" + Store.container).width()){ + menuleft = menuleft - tlen + userlen; + } + mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); + }); + + $("body").on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu", function(e){ + let $t = $(this), attrid = $t.attr("itemvalue"), + $attr = $("#luckysheet-icon-" + attrid + "-menuButton"); + + if (e.type === "mouseover") { + let $con = $t.parent(); + let winW = $(window).width(), winH = $(window).height(); + let menuW = $con.width(), attrH = $attr.height() + 25, attrW = $attr.width() + 5; + let offset = $t.offset(); + let top = offset.top, left = offset.left + menuW; + + if (left + attrW > winW) { + left = offset.left - attrW; + } + + if (top + attrH > winH) { + top = winH - attrH; + } + + $attr.css({ "top": top, "left": left }).show(); + _this.rightclickmenu = $t; + } else { + _this.submenuhide = setTimeout(function () { $attr.hide(); }, 200); + } + }).on("mouseover mouseleave",".luckysheet-menuButton-sub", function(e){ + if (e.type === "mouseover") { + _this.rightclickmenu.addClass("luckysheet-cols-menuitem-hover"); + clearTimeout(_this.submenuhide); + } + else { + _this.rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"); + $(this).hide(); + } + }); + }, + getQKBorder: function(width, type, color){ + let bordertype = ""; + if(width.indexOf("pt") > -1){ + let width = parseFloat(width); + if(width < 1){ + + } + else if(width < 1.5){ + bordertype = "Medium"; + } + else{ + bordertype = "Thick"; + } + } + else{ + let width = parseFloat(width); + if(width < 2){ + + } + else if(width < 3){ + bordertype = "Medium"; + } + else{ + bordertype = "Thick"; + } + } + + let style = 0; + type = type.toLowerCase(); + + if(type == "double"){ + style = 2; + } + else if(type == "dotted"){ + if(bordertype == "Medium" || bordertype == "Thick"){ + style = 3; + } + else{ + style = 10; + } + } + else if(type == "dashed"){ + if(bordertype == "Medium" || bordertype == "Thick"){ + style = 4; + } + else{ + style = 9; + } + } + else if(type == "solid"){ + if(bordertype == "Medium"){ + style = 8; + } + else if(bordertype == "Thick"){ + style = 13; + } + else{ + style = 1; + } + } + + return [style, color]; + }, + updateFormat: function(d, attr, foucsStatus){ + let _this = this; + + let canvasElement = document.createElement('canvas'); + let canvas = canvasElement.getContext("2d"); + + let cfg = $.extend(true, {}, Store.config); + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let row_st = Store.luckysheet_select_save[s]["row"][0], + row_ed = Store.luckysheet_select_save[s]["row"][1]; + let col_st = Store.luckysheet_select_save[s]["column"][0], + col_ed = Store.luckysheet_select_save[s]["column"][1]; + + if(attr == "ct"){ + for (let r = row_st; r <= row_ed; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + for (let c = col_st; c <= col_ed; c++) { + let cell = d[r][c], value = null; + + if (getObjType(cell) == "object") { + value = d[r][c]["v"]; + } + else{ + value = d[r][c]; + } + + if(foucsStatus != "@" && isRealNum(value)){ + value = parseFloat(value); + } + + let mask = update(foucsStatus, value); + let type = "n"; + + if(is_date(foucsStatus) || foucsStatus === 14 || foucsStatus === 15 || foucsStatus === 16 || foucsStatus === 17 || foucsStatus === 18 || foucsStatus === 19 || foucsStatus === 20 || foucsStatus === 21 || foucsStatus === 22 || foucsStatus === 45 || foucsStatus === 46 || foucsStatus === 47){ + type = "d"; + } + else if(foucsStatus == "@" || foucsStatus === 49){ + type = "s" + } + else if(foucsStatus == "General" || foucsStatus === 0){ + type = "g"; + } + + if (getObjType(cell) == "object") { + d[r][c]["m"] = mask; + if(d[r][c]["ct"] == null){ + d[r][c]["ct"] = {}; + } + d[r][c]["ct"]["fa"] = foucsStatus; + d[r][c]["ct"]["t"] = type; + } + else{ + d[r][c] = { "ct":{"fa":foucsStatus, "t":type}, "v": value, "m": mask }; + } + } + } + } + else{ + if(attr == "ht"){ + if(foucsStatus == "left"){ + foucsStatus = "1"; + } + else if(foucsStatus == "center"){ + foucsStatus = "0"; + } + else if(foucsStatus == "right"){ + foucsStatus = "2"; + } + } + else if(attr == "vt"){ + if(foucsStatus == "top"){ + foucsStatus = "1"; + } + else if(foucsStatus == "middle"){ + foucsStatus = "0"; + } + else if(foucsStatus == "bottom"){ + foucsStatus = "2"; + } + } + else if(attr == "tb"){ + if(foucsStatus == "overflow"){ + foucsStatus = "1"; + } + else if(foucsStatus == "clip"){ + foucsStatus = "0"; + } + else if(foucsStatus == "wrap"){ + foucsStatus = "2"; + } + } + else if(attr == "tr"){ + if(foucsStatus == "none"){ + foucsStatus = "0"; + } + else if(foucsStatus == "angleup"){ + foucsStatus = "2"; + } + else if(foucsStatus == "angledown"){ + foucsStatus = "1"; + } + else if(foucsStatus == "vertical"){ + foucsStatus = "3"; + } + else if(foucsStatus == "rotation-up"){ + foucsStatus = "5"; + } + else if(foucsStatus == "rotation-down"){ + foucsStatus = "4"; + } + } + + for (let r = row_st; r <= row_ed; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + for (let c = col_st; c <= col_ed; c++) { + let value = d[r][c]; + + if (getObjType(value) == "object") { + d[r][c][attr] = foucsStatus; + } + else{ + d[r][c] = { v: value }; + d[r][c][attr] = foucsStatus; + } + + if(attr == "tr" && d[r][c].tb != null){ + d[r][c].tb = "0"; + } + } + } + } + + if(attr == "tb" && foucsStatus == "2"){ + //自动换行 + for (let r = row_st; r <= row_ed; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + let currentRowLen = Store.defaultrowlen; + if(cfg["rowlen"][r] != null){ + currentRowLen = cfg["rowlen"][r]; + } + + for (let c = col_st; c <= col_ed; c++) { + let cell = d[r][c]; + + if(cell != null && !isRealNull(cell.v)){ + let fontset = luckysheetfontformat(cell); + let oneLineTextHeight = _this.getTextSize("田", fontset)[1]; + canvas.font = fontset; + + let strValue = cell.m.toString(); + let tbWidth = canvas.measureText(strValue).width; + let cellWidth = colLocationByIndex(c)[1] - colLocationByIndex(c)[0] - 8; + + if(tbWidth > cellWidth){ + let strArr = [];//文本截断数组 + strArr = getCellTextSplitArr(strValue, strArr, cellWidth, canvas); + + let computeRowlen = oneLineTextHeight * strArr.length; + //比较计算高度和当前高度取最大高度 + if(computeRowlen > currentRowLen){ + currentRowLen = computeRowlen; + } + } + } + } + + if(currentRowLen != Store.defaultrowlen){ + cfg["rowlen"][r] = currentRowLen; + } + } + } + else if(attr == "tr"){ + //文本旋转 + for (let r = row_st; r <= row_ed; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + let currentRowLen = Store.defaultrowlen; + if(cfg["rowlen"][r] != null){ + currentRowLen = cfg["rowlen"][r]; + } + + for (let c = col_st; c <= col_ed; c++) { + let cell = d[r][c]; + + if(cell != null && !isRealNull(cell.v)){ + let fontset = luckysheetfontformat(cell); + let oneLineTextHeight = _this.getTextSize("田", fontset)[1]; + canvas.font = fontset; + + let value = cell.m.toString(); + let textMetrics = canvas.measureText(value).width; + + let computeRowlen; //计算高度 + if(foucsStatus == "0"){ + //无旋转 + computeRowlen = oneLineTextHeight; + } + else if(foucsStatus == "1" || foucsStatus == "2"){ + //向下倾斜(45 旋转)----向上倾斜(-45 旋转) + computeRowlen = 0.707 * (textMetrics + oneLineTextHeight) + 4; + } + else if(foucsStatus == "3"){ + //竖排文字 + computeRowlen = value.length * oneLineTextHeight + 4; + } + else if(foucsStatus == "4" || foucsStatus == "5"){ + //向下90(90 旋转)----向上90(-90 旋转) + computeRowlen = textMetrics + 4; + } + computeRowlen = Math.round(computeRowlen); + //比较计算高度和当前高度取最大高度 + if(computeRowlen > currentRowLen){ + currentRowLen = computeRowlen; + } + } + } + + if(currentRowLen != Store.defaultrowlen){ + cfg["rowlen"][r] = currentRowLen; + } + } + } + else if(attr == "fs"){ + //字体大小 + for (let r = row_st; r <= row_ed; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + let currentRowLen = Store.defaultrowlen; + if(cfg["rowlen"][r] != null){ + currentRowLen = cfg["rowlen"][r]; + } + + for (let c = col_st; c <= col_ed; c++) { + let cell = d[r][c]; + + if(cell == null){ + continue; + } + + let fontset = luckysheetfontformat(cell); + let oneLineTextHeight = _this.getTextSize("田", fontset)[1]; + canvas.font = fontset; + + //计算高度 + let computeRowlen; + if(isRealNull(cell.v)){ + computeRowlen = oneLineTextHeight; + } + else{ + if(cell.tb == "2"){ + //单元格有自动换行标示 + let strValue = cell.m.toString(); + let tbWidth = canvas.measureText(strValue).width; + let cellWidth = colLocationByIndex(c)[1] - colLocationByIndex(c)[0] - 8; + + if(tbWidth > cellWidth){ + let strArr = [];//文本截断数组 + + for(let strI = 1; strI <= strValue.length; strI++){ + let strV = strValue.substring(strArr.join("").length, strI); + let strtextMetrics = canvas.measureText(strV).width; + + if(strtextMetrics > cellWidth){ + strArr.push(strValue.substring(strArr.join("").length, strI-1)); + strI = strI - 2; + } + else if(strtextMetrics <= cellWidth && strI == strValue.length){ + strArr.push(strV); + } + } + + computeRowlen = oneLineTextHeight * strArr.length; + } + else{ + computeRowlen = oneLineTextHeight; + } + } + else if(cell.tr != null){ + //单元格有旋转标示 + let tr = cell.tr; + let value = cell.m.toString(); + let textMetrics = canvas.measureText(value).width; + + if(tr == "0"){ + //无旋转 + computeRowlen = oneLineTextHeight; + } + else if(tr == "1" || tr == "2"){ + //向下倾斜(45 旋转)----向上倾斜(-45 旋转) + computeRowlen = 0.707 * (textMetrics + oneLineTextHeight) + 4; + } + else if(tr == "3"){ + //竖排文字 + computeRowlen = value.length * oneLineTextHeight + 4; + } + else if(tr == "4" || tr == "5"){ + //向下90(90 旋转)----向上90(-90 旋转) + computeRowlen = textMetrics + 4; + } + + computeRowlen = Math.round(computeRowlen); + } + else{ + computeRowlen = oneLineTextHeight; + } + } + + //比较计算高度和当前高度取最大高度 + if(computeRowlen > currentRowLen){ + currentRowLen = computeRowlen; + } + } + + if(currentRowLen != Store.defaultrowlen){ + cfg["rowlen"][r] = currentRowLen; + } + } + } + } + + if((attr == "tb" && foucsStatus == "2") || attr == "tr" || attr == "fs"){ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, null, true); + } + else{ + jfrefreshgrid(d, Store.luckysheet_select_save); + } + }, + updateFormat_mc: function(d, foucsStatus){ + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + if(foucsStatus == "mergeCancel"){ + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let range = Store.luckysheet_select_save[i]; + let r1 = range["row"][0], r2 = range["row"][1]; + let c1 = range["column"][0], c2 = range["column"][1]; + + if(r1 == r2 && c1 == c2){ + continue; + } + + let fv = {}; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + let cell = d[r][c]; + + if(cell != null && cell.mc != null){ + let mc_r = cell.mc.r, mc_c = cell.mc.c; + + if("rs" in cell.mc){ + delete cell.mc; + delete cfg["merge"][mc_r + "_" + mc_c]; + + fv[mc_r + "_" + mc_c] = $.extend(true, {}, cell); + } + else{ + let cell_clone = fv[mc_r + "_" + mc_c]; + + delete cell_clone.v; + delete cell_clone.m; + delete cell_clone.ct; + delete cell_clone.f; + delete cell_clone.spl; + + d[r][c] = cell_clone; + } + } + } + } + } + } + else{ + let isHasMc = false; //选区是否含有 合并的单元格 + + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let range = Store.luckysheet_select_save[i]; + let r1 = range["row"][0], r2 = range["row"][1]; + let c1 = range["column"][0], c2 = range["column"][1]; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + let cell = d[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + isHasMc = true; + break; + } + } + } + } + + if(isHasMc){//选区有合并单元格(选区都执行 取消合并) + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let range = Store.luckysheet_select_save[i]; + let r1 = range["row"][0], r2 = range["row"][1]; + let c1 = range["column"][0], c2 = range["column"][1]; + + if(r1 == r2 && c1 == c2){ + continue; + } + + let fv = {}; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + let cell = d[r][c]; + + if(cell != null && cell.mc != null){ + let mc_r = cell.mc.r, mc_c = cell.mc.c; + + if("rs" in cell.mc){ + delete cell.mc; + delete cfg["merge"][mc_r + "_" + mc_c]; + + fv[mc_r + "_" + mc_c] = $.extend(true, {}, cell); + } + else{ + let cell_clone = fv[mc_r + "_" + mc_c]; + + delete cell_clone.v; + delete cell_clone.m; + delete cell_clone.ct; + delete cell_clone.f; + delete cell_clone.spl; + + d[r][c] = cell_clone; + } + } + } + } + } + } + else{ + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let range = Store.luckysheet_select_save[i]; + let r1 = range["row"][0], r2 = range["row"][1]; + let c1 = range["column"][0], c2 = range["column"][1]; + + if(r1 == r2 && c1 == c2){ + continue; + } + + if(foucsStatus == "mergeAll"){ + let fv = {}, isfirst = false; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + let cell = d[r][c]; + + if(cell != null && (!isRealNull(cell.v) || cell.f != null) && !isfirst){ + fv = $.extend(true, {}, cell); + isfirst = true; + } + + d[r][c] = { "mc": { "r": r1, "c": c1 } }; + } + } + + d[r1][c1] = fv; + d[r1][c1].mc = { "r": r1, "c": c1, "rs": r2 - r1 + 1, "cs": c2 - c1 + 1 }; + + cfg["merge"][r1 + "_" + c1] = { "r": r1, "c": c1, "rs": r2 - r1 + 1, "cs": c2 - c1 + 1 }; + } + else if(foucsStatus == "mergeV"){ + for(let c = c1; c <= c2; c++){ + let fv = {}, isfirst = false; + + for(let r = r1; r <= r2; r++){ + let cell = d[r][c]; + + if(cell != null && (!isRealNull(cell.v) || cell.f != null) && !isfirst){ + fv = $.extend(true, {}, cell); + isfirst = true; + } + + d[r][c] = { "mc": { "r": r1, "c": c } }; + } + + d[r1][c] = fv; + d[r1][c].mc = { "r": r1, "c": c, "rs": r2 - r1 + 1, "cs": 1 }; + + cfg["merge"][r1 + "_" + c] = { "r": r1, "c": c, "rs": r2 - r1 + 1, "cs": 1 }; + } + } + else if(foucsStatus == "mergeH"){ + for(let r = r1; r <= r2; r++){ + let fv = {}, isfirst = false; + + for(let c = c1; c <= c2; c++){ + let cell = d[r][c]; + + if(cell != null && (!isRealNull(cell.v) || cell.f != null) && !isfirst){ + fv = $.extend(true, {}, cell); + isfirst = true; + } + + d[r][c] = { "mc": { "r": r, "c": c1 } }; + } + + d[r][c1] = fv; + d[r][c1].mc = { "r": r, "c": c1, "rs": 1, "cs": c2 - c1 + 1 }; + + cfg["merge"][r + "_" + c1] = { "r": r, "c": c1, "rs": 1, "cs": c2 - c1 + 1 }; + } + } + } + } + } + + if (Store.clearjfundo) { + Store.jfundo = []; + Store.jfredo.push({ + "type": "mergeChange", + "sheetIndex": Store.currentSheetIndex, + "data": Store.flowdata, + "curData": d, + "range": $.extend(true, [], Store.luckysheet_select_save), + "config": $.extend(true, {}, Store.config), + "curConfig": cfg + }); + } + + Store.clearjfundo = false; + jfrefreshgrid(d, Store.luckysheet_select_save, cfg); + Store.clearjfundo = true; + }, + borderfix: function(d, r, c){ + return [-1, -1, 2, 2]; + + let cell = d[r][c]; + let bg = null; + + if(cell == null){ + return [0, 0, 0, 0]; + } + else if(d[r][c].bg == null || d[r][c].bg == ""){ + return [0, 0, 0, 0]; + } + else { + return [-1, -1, 2, 2]; + } + }, + menuButtonFocus: function(d, r, c){ + let _this = this; + let foucsList = ["bl", "it", "cl", "ff", "ht", "vt", "fs", "tb", "tr"]; + const _locale = locale(); + const locale_fontarray = _locale.fontarray; + const locale_fontjson = _locale.fontjson; + for(let i = 0; i < foucsList.length; i++){ + let attr = foucsList[i]; + let foucsStatus = _this.checkstatus(d, r, c, attr); + + if(attr == "bl"){ + if(foucsStatus != "0"){ + $("#luckysheet-icon-bold").addClass("luckysheet-toolbar-button-hover"); + } + else{ + $("#luckysheet-icon-bold").removeClass("luckysheet-toolbar-button-hover"); + } + } + else if(attr == "it"){ + if(foucsStatus != "0"){ + $("#luckysheet-icon-italic").addClass("luckysheet-toolbar-button-hover"); + } + else{ + $("#luckysheet-icon-italic").removeClass("luckysheet-toolbar-button-hover"); + } + } + else if(attr == "cl"){ + if(foucsStatus != "0"){ + $("#luckysheet-icon-strikethrough").addClass("luckysheet-toolbar-button-hover"); + } + else{ + $("#luckysheet-icon-strikethrough").removeClass("luckysheet-toolbar-button-hover"); + } + } + else if(attr == "ff"){ + let menuButtonId = "luckysheet-icon-font-family-menuButton"; + let $menuButton = $("#" + menuButtonId); + // const locale_fontarray = locale().fontarray; + let itemname = locale_fontarray[0], itemvalue = 0; + if(foucsStatus != null){ + if(isdatatypemulti(foucsStatus)["num"]){ + itemvalue = parseInt(foucsStatus); + itemname = locale_fontarray[itemvalue]; + } + else{ + itemvalue = locale_fontjson[foucsStatus]; + itemname = locale_fontarray[itemvalue]; + } + } + + _this.focus($menuButton, itemvalue); + $("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+ itemname +" "); + } + else if(attr == "fs"){ + let $menuButton = $("#luckysheet-icon-font-size-menuButton"); + let itemvalue = foucsStatus, $input = $("#luckysheet-icon-font-size input"); + _this.focus($menuButton, itemvalue); + $("#luckysheet-icon-font-size").attr("itemvalue", itemvalue); + $input.val(itemvalue); + } + else if(attr == "ht"){ + let $menuButton = $("#luckysheet-icon-align-menu-menuButton"); + let $t = $("luckysheet-icon-align"), itemvalue = "left"; + + if(foucsStatus == "0"){ + itemvalue = "center"; + } + else if(foucsStatus == "2"){ + itemvalue = "right"; + } + + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-align").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-" + itemvalue); + $menuButton.hide(); + } + else if(attr == "vt"){ + let $menuButton = $("#luckysheet-icon-valign-menu-menuButton"); + let $t = $("luckysheet-icon-valign"), itemvalue = "bottom"; + + if(foucsStatus == "1"){ + itemvalue = "top"; + } + else if(foucsStatus == "0"){ + itemvalue = "middle"; + } + + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-valign").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-" + itemvalue); + $menuButton.hide(); + } + else if(attr == "tb"){ + let $menuButton = $("#luckysheet-icon-textwrap-menu-menuButton"); + let $t = $("luckysheet-icon-textwrap"), itemvalue = "clip"; + + if(foucsStatus == "1"){ + itemvalue = "overflow"; + } + else if(foucsStatus == "2"){ + itemvalue = "wrap"; + } + + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-textwrap").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-" + itemvalue); + $menuButton.hide(); + } + else if(attr == "tr"){ + let $menuButton = $("#luckysheet-icon-rotation-menu-menuButton"); + let $t = $("luckysheet-icon-rotation"), itemvalue = "none"; + + if(foucsStatus == "1"){ + itemvalue = "angledown"; + } + else if(foucsStatus == "2"){ + itemvalue = "angleup"; + } + else if(foucsStatus == "3"){ + itemvalue = "vertical"; + } + else if(foucsStatus == "4"){ + itemvalue = "rotation-down"; + } + else if(foucsStatus == "5"){ + itemvalue = "rotation-up"; + } + + _this.focus($menuButton, itemvalue); + + let $icon = $("#luckysheet-icon-rotation").attr("type", itemvalue).find(".luckysheet-icon-img-container"); + $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-" + itemvalue); + $menuButton.hide(); + } + } + }, + checkstatus: function(d, r, c, a){ + let foucsStatus = d[r][c]; + let tf = {"bl":1, "it":1 , "ff":1, "cl":1}; + + if(a in tf){ + if(foucsStatus == null){ + foucsStatus = "0"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "0"; + } + } + } + else if(a == "fc"){ + if(foucsStatus == null){ + foucsStatus = "#000000"; + } + else{ + foucsStatus = foucsStatus[a]; + + if(foucsStatus == null){ + foucsStatus = "#000000"; + } + + if(foucsStatus.indexOf("rgba") > -1){ + foucsStatus = rgbTohex(foucsStatus); + } + } + } + else if(a == "bg"){ + if(foucsStatus == null){ + foucsStatus = "#ffffff"; + } + else{ + foucsStatus = foucsStatus[a]; + + if(foucsStatus == null){ + foucsStatus = "#ffffff"; + } + + if(foucsStatus.toString().indexOf("rgba") > -1){ + foucsStatus = rgbTohex(foucsStatus); + } + } + } + else if(a.substr(0, 2) == "bs"){ + if(foucsStatus == null){ + foucsStatus = "none"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "none"; + } + } + } + else if(a.substr(0, 2) == "bc"){ + if(foucsStatus == null){ + foucsStatus = "#000000"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "#000000"; + } + } + } + else if(a == "ht"){ + if(foucsStatus == null){ + foucsStatus = "1"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "1"; + } + } + + if(["0", "1", "2"].indexOf(foucsStatus.toString()) == -1){ + foucsStatus = "1"; + } + } + else if(a == "vt"){ + if(foucsStatus == null){ + foucsStatus = "2"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "2"; + } + } + + if(["0", "1", "2"].indexOf(foucsStatus.toString()) == -1){ + foucsStatus = "2"; + } + } + else if(a == "ct"){ + if(foucsStatus == null){ + foucsStatus = null; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = null; + } + } + } + else if(a == "fs"){ + if(foucsStatus == null){ + foucsStatus = "10"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "10"; + } + } + } + else if(a == "tb"){ + if(foucsStatus == null){ + foucsStatus = "0"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "0"; + } + } + } + else if(a == "tr"){ + if(foucsStatus == null){ + foucsStatus = "0"; + } + else{ + foucsStatus = foucsStatus[a]; + if(foucsStatus == null){ + foucsStatus = "0"; + } + } + } + + return foucsStatus; + }, + setLineDash: function(canvasborder, type, hv, m_st, m_ed, line_st, line_ed){ + let borderType = { + "0": "none", + "1": "Thin", + "2": "Hair", + "3": "Dotted", + "4": "Dashed", + "5": "DashDot", + "6": "DashDotDot", + "7": "Double", + "8": "Medium", + "9": "MediumDashed", + "10": "MediumDashDot", + "11": "MediumDashDotDot", + "12": "SlantedDashDot", + "13": "Thick" + }; + + type = borderType[type.toString()]; + + canvasborder.save(); + + try { + if(type == "Hair"){ + canvasborder.setLineDash([1, 2]); + } + else if(type.indexOf("DashDotDot") > -1){ + canvasborder.setLineDash([2, 2, 5, 2, 2]); + } + else if(type.indexOf("DashDot") > -1){ + canvasborder.setLineDash([2, 5, 2]); + } + else if(type.indexOf("Dotted") > -1){ + canvasborder.setLineDash([2]); + } + else if(type.indexOf("Dashed") > -1){ + canvasborder.setLineDash([3]); + } + else{ + canvasborder.setLineDash([0]); + } + } + catch(e) { + console.log(e); + } + + canvasborder.beginPath(); + + if(type.indexOf("Medium") > -1){ + if(hv == "h"){ + canvasborder.moveTo(m_st, m_ed - 0.5); + canvasborder.lineTo(line_st, line_ed - 0.5); + } + else{ + canvasborder.moveTo(m_st - 0.5, m_ed); + canvasborder.lineTo(line_st - 0.5, line_ed); + } + + canvasborder.lineWidth = 2 * Store.devicePixelRatio; + } + else if(type == "Thick"){ + canvasborder.moveTo(m_st, m_ed); + canvasborder.lineTo(line_st, line_ed); + canvasborder.lineWidth = 3 * Store.devicePixelRatio; + } + else { + canvasborder.moveTo(m_st, m_ed); + canvasborder.lineTo(line_st, line_ed); + canvasborder.lineWidth = Store.devicePixelRatio; + } + }, + moveMergeData: function(d, offset_r, offset_c){ + if(isRealNull(d)){ + return d; + } + + let deleMC = [], insertMC=[], hasMC = false; + + for(let r = 0; r < d.length; r++){ + for(let c = 0; c < d[0].length; c++){ + let cell = d[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + if(cell.mc.rs != null){ + deleMC.push({ + rs: cell.mc.rs, + cs: cell.mc.cs, + r: cell.mc.r, + c: cell.mc.c + }); + insertMC.push({ + rs: cell.mc.rs, + cs: cell.mc.cs, + r: cell.mc.r + offset_r, + c: cell.mc.c + offset_c + }); + + hasMC= true; + } + + d[r][c].mc.r += offset_r; + d[r][c].mc.c += offset_c; + } + } + } + + return { "deleMC": deleMC, "insertMC": insertMC, "hasMC": hasMC }; + }, + getRangeInMerge: function(st_r, rlen, st_c, clen, sheetIndex){ + let _this = this; + + let mergelist = []; + let cfg = null; + if(sheetIndex != null){ + cfg = $.extend(true, {}, _this.getSheetConfig()); + } + else{ + cfg = $.extend(true, {}, Store.config); + } + + if(cfg != null && cfg["merge"] != null){ + for(let key in cfg["merge"]){ + let mc = cfg["merge"][key]; + if(!((st_r + rlen - 1) < mc.r || st_r > (mc.r + mc.rs - 1)) && !((st_c + clen - 1) < mc.c || st_c > (mc.c + mc.cs - 1))){ + mergelist.push(mc); + } + } + } + + return mergelist; + }, + mergeborer: function(d, row_index, col_index){ + let value = d[row_index][col_index]; + + if(getObjType(value) == "object" && ("mc" in value)){ + let margeMaindata = value["mc"]; + col_index = margeMaindata.c; + row_index = margeMaindata.r; + + let col_rs = d[row_index][col_index].mc.cs; + let row_rs = d[row_index][col_index].mc.rs; + + let margeMain = d[row_index][col_index].mc; + + let start_r, end_r, row, row_pre; + for(let r = row_index; r < margeMain.rs + row_index; r++){ + if (r == 0) { + start_r = - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - 1; + } + + end_r = Store.visibledatarow[r]; + + if(row_pre == null){ + row_pre = start_r; + row = end_r; + } + else{ + row += end_r - start_r - 1; + } + } + + let start_c, end_c, col, col_pre; + for(let c = col_index; c < margeMain.cs + col_index; c++){ + if (c == 0) { + start_c = 0; + } + else { + start_c = Store.visibledatacolumn[c - 1]; + } + + end_c = Store.visibledatacolumn[c]; + + if(col_pre == null){ + col_pre = start_c; + col = end_c; + } + else{ + col += end_c - start_c; + } + } + + return { + "row": [row_pre , row, row_index, row_index + row_rs - 1], + "column": [col_pre, col , col_index, col_index + col_rs - 1] + }; + } + else{ + return null; + } + }, + mergeMoveData: {}, + mergeMoveMain: function(columnseleted, rowseleted, s, top , height, left , width){ + let _this = this; + let mergesetting = sheetmanage.getSheetMerge(); + + if(mergesetting == null){ + return; + } + + let mcset = []; + for(let key in mergesetting){ + mcset.push(key); + } + + if(rowseleted[0] > rowseleted[1]){ + rowseleted[1] = rowseleted[0]; + } + + if(columnseleted[0] > columnseleted[1]){ + columnseleted[1] = columnseleted[0]; + } + + let offloop = true; + _this.mergeMoveData = {}; + + while (offloop) { + offloop = false; + + for(let i = 0; i < mcset.length; i++){ + let key = mcset[i]; + let mc = mergesetting[key]; + + if(key in _this.mergeMoveData){ + continue; + } + + let changeparam = _this.mergeMove(mc, columnseleted, rowseleted, s, top, height, left, width); + + if(changeparam != null){ + _this.mergeMoveData[key] = mc; + + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + + offloop = true; + } + else{ + delete _this.mergeMoveData[key]; + } + } + } + + return [columnseleted, rowseleted, top, height, left, width]; + }, + mergeMove: function(mc, columnseleted, rowseleted, s, top , height, left , width){ + let _this = this; + + let row_st = mc.r, row_ed = mc.r + mc.rs - 1; + let col_st = mc.c, col_ed = mc.c + mc.cs - 1; + let ismatch = false; + + if(columnseleted[1] < columnseleted[0]){ + columnseleted[0] = columnseleted[1]; + } + + if(rowseleted[1] < rowseleted[0]){ + rowseleted[0] = rowseleted[1]; + } + + if( (columnseleted[0] <= col_st && columnseleted[1] >= col_ed && rowseleted[0] <= row_st && rowseleted[1] >= row_ed) || (!(columnseleted[1] < col_st || columnseleted[0] > col_ed) && !(rowseleted[1] < row_st || rowseleted[0] > row_ed))){ + let margeset = _this.mergeborer(Store.flowdata, mc.r, mc.c); + if(!!margeset){ + let row = margeset.row[1], + row_pre = margeset.row[0], + row_index = margeset.row[2], + col = margeset.column[1], + col_pre = margeset.column[0], + col_index = margeset.column[2]; + + if(!(columnseleted[1] < col_st || columnseleted[0] > col_ed)){ + //向上滑动 + if(rowseleted[0] <= row_ed && rowseleted[0] >= row_st){ + height += top - row_pre; + top = row_pre; + rowseleted[0] = row_st; + } + + //向下滑动或者居中时往上滑动的向下补齐 + if(rowseleted[1] >= row_st && rowseleted[1] <= row_ed){ + if(s.row_focus >= row_st && s.row_focus <= row_ed){ + height = row - top; + } + else{ + height = row - top; + } + + rowseleted[1] = row_ed; + } + } + + if(!(rowseleted[1] < row_st || rowseleted[0] > row_ed)){ + if(columnseleted[0] <= col_ed && columnseleted[0] >= col_st){ + width += left - col_pre; + left = col_pre; + columnseleted[0] = col_st; + } + + //向右滑动或者居中时往左滑动的向下补齐 + if(columnseleted[1] >= col_st && columnseleted[1] <= col_ed){ + if(s.column_focus >= col_st && s.column_focus <= col_ed){ + width = col - left; + } + else{ + width = col - left; + } + + columnseleted[1] = col_ed; + } + } + + ismatch = true; + } + } + + if(ismatch){ + return [columnseleted, rowseleted, top , height, left , width]; + } + else{ + return null; + } + }, + getCellRealSize: function(d, cell_r, cell_c){ + let _this = this; + + let width = Store.defaultcollen; + let height = Store.defaultrowlen; + let celldata = d[cell_r][cell_c]; + + if(!!celldata && celldata["mc"] != null){ + let mc = celldata["mc"]; + let margeset = _this.mergeborer(d, mc.r, mc.c); + + if(!!margeset){ + let row = margeset.row[1]; + let row_pre = margeset.row[0]; + let row_index = margeset.row[2]; + let row_index_ed = margeset.row[3]; + + let col = margeset.column[1]; + let col_pre = margeset.column[0]; + let col_index = margeset.column[2]; + let col_index_ed = margeset.column[3]; + + width = col - col_pre - 1; + height = row - row_pre - 1; + } + } + else{ + let config = getluckysheetfile()[getSheetIndex(Store.currentSheetIndex)]["config"]; + + if (config["columlen"] != null && config["columlen"][cell_c] != null) { + width = config["columlen"][cell_c]; + } + + if (config["rowlen"] != null && config["rowlen"][cell_r] != null) { + height = config["rowlen"][cell_r]; + } + } + + return [width, height]; + }, + getTextHeightCache: {}, + getTextSize: function(text, font){ + let fontarray = locale().fontarray; + let f = font || '10pt ' + fontarray[0]; + + let _this = this; + + if (f in _this.getTextHeightCache){ + return _this.getTextHeightCache[f]; + } + + if($("#luckysheetTextSizeTest").length == 0){ + $('').appendTo($('body')); + } + + let o = $("#luckysheetTextSizeTest").text(text).css({'font': f}), + w = o.width(), + h = o.height(); + + _this.getTextHeightCache[f] = [w, h]; + + return [w, h]; + }, + activeFormulaInput: function(row_index, col_index, rowh, columnh, formula, isnull){ + let _this = this; + + if(isnull == null){ + isnull = false; + } + + let row_range = rowLocationByIndex(row_index); + let col_range = colLocationByIndex(col_index); + + luckysheetupdateCell(row_range[1], row_range[0], row_index, col_range[1], col_range[0], col_index, Store.flowdata, true); + + if(isnull){ + let formulaTxt = '='+ formula.toUpperCase() +'()'; + + $("#luckysheet-rich-text-editor").html(formulaTxt); + + let currSelection = window.getSelection(); + let $span = $("#luckysheet-rich-text-editor").find("span"); + luckysheetformula.setCaretPosition($span.get($span.length-2), 0, 1); + + return; + } + + let row_pre = rowLocationByIndex(rowh[0])[0], + row = rowLocationByIndex(rowh[1])[1], + col_pre = colLocationByIndex(columnh[0])[0], + col = colLocationByIndex(columnh[1])[1]; + + let formulaTxt = '='+ formula.toUpperCase() +'('+ getRangetxt(Store.currentSheetIndex, {"row":rowh, "column":columnh }, Store.currentSheetIndex) +')'; + $("#luckysheet-rich-text-editor").html(formulaTxt); + + luckysheetformula.israngeseleciton(); + luckysheetformula.rangestart = true; + luckysheetformula.rangedrag_column_start = false; + luckysheetformula.rangedrag_row_start = false; + luckysheetformula.rangechangeindex = 0; + luckysheetformula.rangeSetValue({ "row": rowh, "column": columnh }); + luckysheetformula.func_selectedrange = { + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index], + "column": [col_index, col_index] + }; + + $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); + + $("#luckysheet-formula-help-c").hide(); + }, + backFormulaInput: function(d, r, c, rowh, columnh, formula){ + let _this = this; + + let f = '='+ formula.toUpperCase() +'('+ getRangetxt(Store.currentSheetIndex, {"row":rowh, "column":columnh }, Store.currentSheetIndex) +')'; + let v = luckysheetformula.execfunction(f, r, c); + let value = { "v": v[1], "f": v[2] }; + setcellvalue(r, c, d, value); + luckysheetformula.execFunctionExist.push({ "r": r, "c": c, "i": Store.currentSheetIndex }); + + server.historyParam(d, Store.currentSheetIndex, {"row": [r, r], "column": [c, c]}); + }, + checkNoNullValue: function(cell){ + let v = cell; + if(getObjType(v) == "object"){ + v = v.v; + } + + if(!isRealNull(v) && isdatatypemulti(v).num && (cell.ct == null || cell.ct.t == null || cell.ct.t == "n" || cell.ct.t == "g") ){ + return true; + } + else{ + return false; + } + }, + checkNoNullValueAll: function(cell){ + let v = cell; + if(getObjType(v) == "object"){ + v = v.v; + } + + if(!isRealNull(v)){ + return true; + } + else{ + return false; + } + }, + getNoNullValue: function(d, st_x, ed, type){ + let _this = this; + let hasValueSum = 0, hasValueStart = null; + let nullNum = 0, nullTime = 0; + + for(let r = ed - 1 ; r >= 0; r--){ + let cell; + if(type == "c"){ + cell = d[st_x][r]; + } + else{ + cell = d[r][st_x]; + } + + if(_this.checkNoNullValue(cell)){ + hasValueSum++; + hasValueStart = r; + } + else if(cell == null || cell.v == null || cell.v == ""){ + nullNum++; + + if(nullNum >= 40){ + if(nullTime <= 0){ + nullTime = 1; + } + else{ + break; + } + } + } + else{ + break; + } + } + + return hasValueStart; + }, + singleFormulaInput: function(d, _index, fix, st_m, ed_m, formula, type, noNum, noNull){ + let _this = this; + + if(type == null){ + type = "r"; + } + + if(noNum == null){ + noNum = true; + } + + if(noNull == null){ + noNull = true; + } + + let isNull = true, isNum= false; + + for(let c = st_m; c <= ed_m; c++){ + let cell = null; + + if(type == "c"){ + cell = d[c][fix]; + } + else{ + cell = d[fix][c]; + } + + if(_this.checkNoNullValue(cell)){ + isNull = false; + isNum= true; + } + else if(_this.checkNoNullValueAll(cell)){ + isNull = false; + } + } + + if(isNull && noNull){ + let st_r_r = _this.getNoNullValue(d, _index, fix, type); + + if(st_r_r == null){ + if(type == "c"){ + _this.activeFormulaInput(_index, fix, null, null, formula, true); + } + else{ + _this.activeFormulaInput(fix, _index, null, null, formula, true); + } + } + else{ + if(_index == st_m){ + for(let c = st_m; c <= ed_m; c++){ + let st_r_r = _this.getNoNullValue(d, c, fix, type); + + if(st_r_r == null){ + break; + } + + if(type == "c"){ + _this.backFormulaInput(d, c, fix, [c, c], [st_r_r, fix-1], formula); + } + else{ + _this.backFormulaInput(d, fix, c, [st_r_r, fix-1], [c, c], formula); + } + } + } + else{ + for(let c = ed_m; c >= st_m; c--){ + let st_r_r = _this.getNoNullValue(d, c, fix, type); + + if(st_r_r == null){ + break; + } + + if(type == "c"){ + _this.backFormulaInput(d, c, fix, [c, c], [st_r_r, fix-1], formula); + } + else{ + _this.backFormulaInput(d, fix, c, [st_r_r, fix-1], [c, c], formula); + } + } + } + } + } + else if(isNum && noNum){ + let cell = null; + + if(type == "c"){ + cell = d[ed_m][fix]; + } + else{ + cell = d[fix][ed_m]; + } + + if(cell != null && cell.v != null && cell.v.toString().length > 0){ + let c = ed_m; + + if(type == "c"){ + cell = d[ed_m][fix]; + } + else{ + cell = d[fix][ed_m]; + } + + while ( cell != null && cell.v != null && cell.v.toString().length > 0) { + c++; + let len = null; + + if(type == "c"){ + len = d.length; + } + else{ + len = d[0].length; + } + + if(c >= len){ + return; + } + + if(type == "c"){ + cell = d[c][fix]; + } + else{ + cell = d[fix][c]; + } + } + + if(type == "c"){ + _this.backFormulaInput(d, c, fix, [st_m, ed_m], [fix ,fix], formula); + } + else{ + _this.backFormulaInput(d, fix, c, [fix ,fix], [st_m, ed_m], formula); + } + } + else{ + if(type == "c"){ + _this.backFormulaInput(d, ed_m, fix, [st_m, ed_m], [fix ,fix], formula); + } + else{ + _this.backFormulaInput(d, fix, ed_m, [fix ,fix], [st_m, ed_m], formula); + } + } + } + else{ + return true; + } + }, + autoSelectionFormula: function(formula){ + let _this = this; + let d = editor.deepCopyFlowData(Store.flowdata); + let nullfindnum = 40; + let isfalse = true; + luckysheetformula.execFunctionExist = []; + + let execFormulaInput_c = function(d, st_r, ed_r, st_c, ed_c, formula){ + let st_c_c = _this.getNoNullValue(d, st_r, ed_c, "c"); + + if(st_c_c == null){ + _this.activeFormulaInput(st_r, st_c, null, null, formula, true); + } + else{ + _this.activeFormulaInput(st_r, st_c, [st_r, ed_r], [st_c_c, ed_c - 1], formula); + } + } + + let execFormulaInput = function(d, st_r, ed_r, st_c, ed_c, formula){ + let st_r_c = _this.getNoNullValue(d, st_c, ed_r, "r"); + + if(st_r_c == null){ + execFormulaInput_c(d, st_r, ed_r, st_c, ed_c, formula); + } + else{ + _this.activeFormulaInput(st_r, st_c, [st_r_c, ed_r - 1], [st_c, ed_c], formula); + } + } + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let st_r = Store.luckysheet_select_save[s].row[0], + ed_r = Store.luckysheet_select_save[s].row[1]; + let st_c = Store.luckysheet_select_save[s].column[0], + ed_c = Store.luckysheet_select_save[s].column[1]; + let row_index = Store.luckysheet_select_save[s].row_focus, + col_index = Store.luckysheet_select_save[s].column_focus; + + if(st_r == ed_r && st_c == ed_c){ + if(ed_r - 1 < 0 && ed_c - 1 < 0){ + _this.activeFormulaInput(st_r, st_c, null, null, formula, true); + return; + } + + if(ed_r - 1 >= 0 && _this.checkNoNullValue(d[ed_r - 1][st_c])){ + execFormulaInput(d, st_r, ed_r, st_c, ed_c, formula); + } + else if(ed_c - 1 >= 0 && _this.checkNoNullValue(d[st_r][ed_c - 1])){ + execFormulaInput_c(d, st_r, ed_r, st_c, ed_c, formula); + } + else{ + execFormulaInput(d, st_r, ed_r, st_c, ed_c, formula); + } + } + else if(st_r == ed_r){ + isfalse = _this.singleFormulaInput(d, col_index, st_r, st_c, ed_c, formula, "r"); + } + else if(st_c == ed_c){ + isfalse = _this.singleFormulaInput(d, row_index, st_c, st_r, ed_r, formula, "c"); + } + else{ + let r_false = true; + for(let r = st_r; r <= ed_r; r++){ + r_false = _this.singleFormulaInput(d, col_index, r, st_c, ed_c, formula, "r", true, false) && r_false; + } + + let c_false = true; + for(let c = st_c; c <= ed_c; c++){ + c_false = _this.singleFormulaInput(d, row_index, c, st_r, ed_r, formula, "c", true, false) && c_false; + } + + isfalse = !!r_false && !!c_false; + } + + isfalse = isfalse && isfalse; + } + + if(!isfalse){ + luckysheetformula.execFunctionExist.reverse(); + luckysheetformula.execFunctionGroup(null, null, null, null, d); + jfrefreshgrid(d, Store.luckysheet_select_save); + + clearTimeout(Store.jfcountfuncTimeout); + Store.jfcountfuncTimeout = setTimeout(function () { countfunc() }, 500); + } + }, + getStyleByCell: function(d, r, c){ + let _this = this; + let style = ""; + + //交替颜色 + let af_compute = alternateformat.getComputeMap(); + let checksAF = alternateformat.checksAF(r, c, af_compute); + + //条件格式 + let cf_compute = conditionformat.getComputeMap(); + let checksCF = conditionformat.checksCF(r, c, cf_compute); + + const locale_fontarray = locale().fontarray; + + let cell = d[r][c]; + for(let key in cell){ + let value = _this.checkstatus(d, r, c , key); + + if(checksAF != null || (checksCF != null && checksCF["cellColor"] != null)){ + if(checksCF != null && checksCF["cellColor"] != null){ + style += "background: " + checksCF["cellColor"] + ";"; + } + else if(checksAF != null){ + style += "background: " + checksAF[1] + ";"; + } + } + + if(getObjType(value) == "object"){ + continue; + } + + if(key == "bg" || checksAF != null || (checksCF != null && checksCF["cellColor"] != null)){ + if(checksCF != null && checksCF["cellColor"] != null){ + style += "background: " + checksCF["cellColor"] + ";"; + } + else if(checksAF != null){ + style += "background: " + checksAF[1] + ";"; + } + else{ + style += "background: " + value + ";"; + } + } + + if(key == "bl" && value != "0"){ + style += "font-weight: bold;"; + } + + if(key == "it" && value != "0"){ + style += "font-style:italic;"; + } + + if(key == "ff" && value != "0"){ + let f = value; + if(!isNaN(parseInt(value))){ + f = locale_fontarray[parseInt(value)]; + } + style += "font-family: " + f + ";"; + } + + if(key == "fs" && value != "10"){ + style += "font-size: "+ value + "pt;"; + } + + if((key == "fc" && value != "#000000") || checksAF != null || (checksCF != null && checksCF["textColor"] != null)){ + if(checksCF != null && checksCF["textColor"] != null){ + style += "color: " + checksCF["textColor"] + ";"; + } + else if(checksAF != null){ + style += "color: " + checksAF[0] + ";"; + } + else{ + style += "color: " + value + ";"; + } + } + + if(key == "ht" && value != "1"){ + if(value == "0"){ + style += "text-align: center;"; + } + else if(value == "2"){ + style += "text-align: right;"; + } + } + + if(key == "vt" && value != "0"){ + if(value == "1"){ + style += "vertical-align: top;"; + } + else if(value == "2"){ + style += "vertical-align: bottom;"; + } + } + } + + return style; + } +} + +export default menuButton; \ No newline at end of file diff --git a/src/controllers/mobile.js b/src/controllers/mobile.js new file mode 100644 index 000000000..6f0c1f608 --- /dev/null +++ b/src/controllers/mobile.js @@ -0,0 +1,178 @@ +import { rowLocation, colLocation, mouseposition } from '../global/location'; +import { selectHightlightShow } from './select'; +import menuButton from './menuButton'; +import luckysheetFreezen from './freezen'; +import Store from '../store'; + +//设备是移动端 +export default function mobileinit(){ + //去除滚动条 + Store.cellMainSrollBarSize = 0; + + //滑动滚动表格 + let luckysheet_touchmove_status = false, + luckysheet_touchmove_startPos = {}, + luckysheet_touchhandle_status = false; + $(document).on("touchstart", "#luckysheet-grid-window-1", function(event){ + luckysheet_touchmove_status = true; + + let touch = event.originalEvent.targetTouches[0]; + luckysheet_touchmove_startPos = { + x: touch.pageX, + y: touch.pageY + } + }) + $(document).on("touchmove", "#luckysheet-grid-window-1", function(event){ + if(event.originalEvent.targetTouches.length > 1 || (event.scale && event.scale !== 1)){ + return; + } + + let touch = event.originalEvent.targetTouches[0]; + + if(luckysheet_touchmove_status){//滚动 + let slideX = touch.pageX - luckysheet_touchmove_startPos.x; + let slideY = touch.pageY - luckysheet_touchmove_startPos.y; + + luckysheet_touchmove_startPos = { + x: touch.pageX, + y: touch.pageY + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + + scrollLeft -= slideX; + scrollTop -= slideY; + + if(scrollLeft < 0){ + scrollLeft = 0; + } + + if(scrollTop < 0){ + scrollTop = 0; + } + + if(Math.abs(slideX) < Math.abs(slideY)){ + $("#luckysheet-scrollbar-y").scrollTop(scrollTop); + } + else{ + $("#luckysheet-scrollbar-x").scrollLeft(scrollLeft); + } + } + else if(luckysheet_touchhandle_status){//选区 + let mouse = mouseposition(touch.pageX, touch.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]); + + let top = 0, height = 0, rowseleted = []; + if (last.top > row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + + if(last.row[1] > last.row_focus){ + last.row[1] = last.row_focus; + } + + rowseleted = [row_index, last.row[1]]; + } + else if (last.top == row_pre) { + top = row_pre; + height = last.top + last.height - row_pre; + rowseleted = [row_index, last.row[0]]; + } + else { + top = last.top; + height = row - last.top - 1; + + if(last.row[0] < last.row_focus){ + last.row[0] = last.row_focus; + } + + rowseleted = [last.row[0], row_index]; + } + + let left = 0, width = 0, columnseleted = []; + if (last.left > col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + + if(last.column[1] > last.column_focus){ + last.column[1] = last.column_focus; + } + + columnseleted = [col_index, last.column[1]]; + } + else if (last.left == col_pre) { + left = col_pre; + width = last.left + last.width - col_pre; + columnseleted = [col_index, last.column[0]]; + } + else { + left = last.left; + width = col - last.left - 1; + + if(last.column[0] < last.column_focus){ + last.column[0] = last.column_focus; + } + + columnseleted = [last.column[0], col_index]; + } + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + last["left_move"] = left; + last["width_move"] = width; + last["top_move"] = top; + last["height_move"] = height; + + Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last; + + selectHightlightShow(); + + luckysheetFreezen.scrollFreezen(); + } + + event.stopPropagation(); + }) + $(document).on("touchend", function(event){ + luckysheet_touchmove_status = false; + luckysheet_touchmove_startPos = {}; + + luckysheet_touchhandle_status = false; + }) + + //滑动选择选区 + $(document).on("touchstart", ".luckysheet-cs-touchhandle", function(event){ + luckysheet_touchhandle_status = true; + event.stopPropagation(); + }) + + //禁止微信下拉拖出微信背景 + document.addEventListener("touchmove", function(event){ + event.preventDefault(); + }, { + passive: false + }) +} \ No newline at end of file diff --git a/src/controllers/moreFormat.js b/src/controllers/moreFormat.js new file mode 100644 index 000000000..dd8bbe6e7 --- /dev/null +++ b/src/controllers/moreFormat.js @@ -0,0 +1,1217 @@ +import { replaceHtml } from '../utils/util'; +import { modelHTML } from './constant'; +import menuButton from './menuButton'; +import editor from '../global/editor'; +import tooltip from '../global/tooltip'; +import { isEditMode } from '../global/validate'; +import Store from '../store'; +import locale from '../locale/locale'; + +//更多格式 +const luckysheetMoreFormat = { + moneyFmtList: [ + { + "name": "人民币", + "pos": "before", + "value": "¥" + }, { + "name": "美元", + "pos": "before", + "value": "$" + }, { + "name": "欧元", + "pos": "before", + "value": "€" + }, { + "name": "英镑", + "pos": "before", + "value": "£" + }, { + "name": "港元", + "pos": "before", + "value": "$" + }, { + "name": "日元", + "pos": "before", + "value": "¥" + }, { + "name": "阿尔巴尼亚列克", + "pos": "before", + "value": "Lek" + }, { + "name": "阿尔及利亚第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "阿富汗尼", + "pos": "after", + "value": "Af" + }, { + "name": "阿根廷比索", + "pos": "before", + "value": "$" + }, { + "name": "阿拉伯联合酋长国迪拉姆", + "pos": "before", + "value": "dh" + }, { + "name": "阿鲁巴弗罗林", + "pos": "before", + "value": "Afl" + }, { + "name": "阿曼里亚尔", + "pos": "before", + "value": "Rial" + }, { + "name": "阿塞拜疆马纳特", + "pos": "before", + "value": "?" + }, { + "name": "埃及镑", + "pos": "before", + "value": "£" + }, { + "name": "埃塞俄比亚比尔", + "pos": "before", + "value": "Birr" + }, { + "name": "安哥拉宽扎", + "pos": "before", + "value": "Kz" + }, { + "name": "澳大利亚元", + "pos": "before", + "value": "$" + }, { + "name": "澳门元", + "pos": "before", + "value": "MOP" + }, { + "name": "巴巴多斯元", + "pos": "before", + "value": "$" + }, { + "name": "巴布亚新几内亚基那", + "pos": "before", + "value": "PGK" + }, { + "name": "巴哈马元", + "pos": "before", + "value": "$" + }, { + "name": "巴基斯坦卢比", + "pos": "before", + "value": "Rs" + }, { + "name": "巴拉圭瓜拉尼", + "pos": "after", + "value": "Gs" + }, { + "name": "巴林第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "巴拿马巴波亚", + "pos": "before", + "value": "B/" + }, { + "name": "巴西里亚伊", + "pos": "before", + "value": "R$" + }, { + "name": "白俄罗斯卢布", + "pos": "after", + "value": "р" + }, { + "name": "百慕大元", + "pos": "before", + "value": "$" + }, { + "name": "保加利亚列弗", + "pos": "before", + "value": "lev" + }, { + "name": "冰岛克朗", + "pos": "before", + "value": "kr" + }, { + "name": "波黑可兑换马克", + "pos": "before", + "value": "KM" + }, { + "name": "波兰兹罗提", + "pos": "after", + "value": "z?" + }, { + "name": "玻利维亚诺", + "pos": "before", + "value": "Bs" + }, { + "name": "伯利兹元", + "pos": "before", + "value": "$" + }, { + "name": "博茨瓦纳普拉", + "pos": "before", + "value": "P" + }, { + "name": "不丹努扎姆", + "pos": "before", + "value": "Nu" + }, { + "name": "布隆迪法郎", + "pos": "before", + "value": "FBu" + }, { + "name": "朝鲜圆", + "pos": "before", + "value": "?KP" + }, { + "name": "丹麦克朗", + "pos": "after", + "value": "kr" + }, { + "name": "东加勒比元", + "pos": "before", + "value": "$" + }, { + "name": "多米尼加比索", + "pos": "before", + "value": "RD$" + }, { + "name": "俄国卢布", + "pos": "after", + "value": "?" + }, { + "name": "厄立特里亚纳克法", + "pos": "before", + "value": "Nfk" + }, { + "name": "非洲金融共同体法郎", + "pos": "before", + "value": "CFA" + }, { + "name": "菲律宾比索", + "pos": "before", + "value": "?" + }, { + "name": "斐济元", + "pos": "before", + "value": "$" + }, { + "name": "佛得角埃斯库多", + "pos": "before", + "value": "CVE" + }, { + "name": "福克兰群岛镑", + "pos": "before", + "value": "£" + }, { + "name": "冈比亚达拉西", + "pos": "before", + "value": "GMD" + }, { + "name": "刚果法郎", + "pos": "before", + "value": "FrCD" + }, { + "name": "哥伦比亚比索", + "pos": "before", + "value": "$" + }, { + "name": "哥斯达黎加科朗", + "pos": "before", + "value": "?" + }, { + "name": "古巴比索", + "pos": "before", + "value": "$" + }, { + "name": "古巴可兑换比索", + "pos": "before", + "value": "$" + }, { + "name": "圭亚那元", + "pos": "before", + "value": "$" + }, { + "name": "哈萨克斯坦坚戈", + "pos": "before", + "value": "?" + }, { + "name": "海地古德", + "pos": "before", + "value": "HTG" + }, { + "name": "韩元", + "pos": "before", + "value": "?" + }, { + "name": "荷属安的列斯盾", + "pos": "before", + "value": "NAf." + }, { + "name": "洪都拉斯拉伦皮拉", + "pos": "before", + "value": "L" + }, { + "name": "吉布提法郎", + "pos": "before", + "value": "Fdj" + }, { + "name": "吉尔吉斯斯坦索姆", + "pos": "before", + "value": "KGS" + }, { + "name": "几内亚法郎", + "pos": "before", + "value": "FG" + }, { + "name": "加拿大元", + "pos": "before", + "value": "$" + }, { + "name": "加纳塞地", + "pos": "before", + "value": "GHS" + }, { + "name": "柬埔寨瑞尔", + "pos": "before", + "value": "Riel" + }, { + "name": "捷克克朗", + "pos": "after", + "value": "K?" + }, { + "name": "津巴布韦元", + "pos": "before", + "value": "$" + }, { + "name": "卡塔尔里亚尔", + "pos": "before", + "value": "Rial" + }, { + "name": "开曼群岛元", + "pos": "before", + "value": "$" + }, { + "name": "科摩罗法郎", + "pos": "before", + "value": "CF" + }, { + "name": "科威特第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "克罗地亚库纳", + "pos": "before", + "value": "kn" + }, { + "name": "肯尼亚先令", + "pos": "before", + "value": "Ksh" + }, { + "name": "莱索托洛蒂", + "pos": "before", + "value": "LSL" + }, { + "name": "老挝基普", + "pos": "before", + "value": "?" + }, { + "name": "黎巴嫩镑", + "pos": "before", + "value": "L£" + }, { + "name": "立陶宛立特", + "pos": "before", + "value": "Lt" + }, { + "name": "利比亚第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "利比亚元", + "pos": "before", + "value": "$" + }, { + "name": "卢旺达法郎", + "pos": "before", + "value": "RF" + }, { + "name": "罗马尼亚列伊", + "pos": "before", + "value": "RON" + }, { + "name": "马达加斯加阿里亚里", + "pos": "before", + "value": "Ar" + }, { + "name": "马尔代夫拉菲亚", + "pos": "before", + "value": "Rf" + }, { + "name": "马拉维克瓦查", + "pos": "before", + "value": "MWK" + }, { + "name": "马来西亚林吉特", + "pos": "before", + "value": "RM" + }, { + "name": "马其顿戴第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "毛里求斯卢比", + "pos": "before", + "value": "MURs" + }, { + "name": "毛里塔尼亚乌吉亚", + "pos": "before", + "value": "MRO" + }, { + "name": "蒙古图格里克", + "pos": "before", + "value": "?" + }, { + "name": "孟加拉塔卡", + "pos": "before", + "value": "?" + }, { + "name": "秘鲁新索尔", + "pos": "before", + "value": "S/" + }, { + "name": "缅甸开亚特", + "pos": "before", + "value": "K" + }, { + "name": "摩尔多瓦列伊", + "pos": "before", + "value": "MDL" + }, { + "name": "摩洛哥迪拉姆", + "pos": "before", + "value": "dh" + }, { + "name": "莫桑比克梅蒂卡尔", + "pos": "before", + "value": "MTn" + }, { + "name": "墨西哥比索", + "pos": "before", + "value": "$" + }, { + "name": "纳米比亚元", + "pos": "before", + "value": "$" + }, { + "name": "南非兰特", + "pos": "before", + "value": "R" + }, { + "name": "南苏丹镑", + "pos": "before", + "value": "£" + }, { + "name": "尼加拉瓜科多巴", + "pos": "before", + "value": "C$" + }, { + "name": "尼泊尔卢比", + "pos": "before", + "value": "Rs" + }, { + "name": "尼日利亚奈拉", + "pos": "before", + "value": "?" + }, { + "name": "挪威克朗", + "pos": "after", + "value": "kr" + }, { + "name": "乔治亚拉瑞", + "pos": "before", + "value": "GEL" + }, { + "name": "人民币(离岸)", + "pos": "before", + "value": "¥" + }, { + "name": "瑞典克朗", + "pos": "after", + "value": "kr" + }, { + "name": "瑞士法郎", + "pos": "before", + "value": "CHF" + }, { + "name": "塞尔维亚第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "塞拉利昂利昂", + "pos": "before", + "value": "SLL" + }, { + "name": "塞舌尔卢比", + "pos": "before", + "value": "SCR" + }, { + "name": "沙特里亚尔", + "pos": "before", + "value": "Rial" + }, { + "name": "圣多美多布拉", + "pos": "before", + "value": "Db" + }, { + "name": "圣赫勒拿群岛磅", + "pos": "before", + "value": "£" + }, { + "name": "斯里兰卡卢比", + "pos": "before", + "value": "Rs" + }, { + "name": "斯威士兰里兰吉尼", + "pos": "before", + "value": "SZL" + }, { + "name": "苏丹镑", + "pos": "before", + "value": "SDG" + }, { + "name": "苏里南元", + "pos": "before", + "value": "$" + }, { + "name": "所罗门群岛元", + "pos": "before", + "value": "$" + }, { + "name": "索马里先令", + "pos": "before", + "value": "SOS" + }, { + "name": "塔吉克斯坦索莫尼", + "pos": "before", + "value": "Som" + }, { + "name": "太平洋法郎", + "pos": "after", + "value": "FCFP" + }, { + "name": "泰国铢", + "pos": "before", + "value": "?" + }, { + "name": "坦桑尼亚先令", + "pos": "before", + "value": "TSh" + }, { + "name": "汤加潘加", + "pos": "before", + "value": "T$" + }, { + "name": "特立尼达和多巴哥元", + "pos": "before", + "value": "$" + }, { + "name": "突尼斯第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "土耳其里拉", + "pos": "before", + "value": "?" + }, { + "name": "瓦努阿图瓦图", + "pos": "before", + "value": "VUV" + }, { + "name": "危地马拉格查尔", + "pos": "before", + "value": "Q" + }, { + "name": "委内瑞拉博利瓦", + "pos": "before", + "value": "Bs" + }, { + "name": "文莱元", + "pos": "before", + "value": "$" + }, { + "name": "乌干达先令", + "pos": "before", + "value": "UGX" + }, { + "name": "乌克兰格里夫尼亚", + "pos": "before", + "value": "грн." + }, { + "name": "乌拉圭比索", + "pos": "before", + "value": "$" + }, { + "name": "乌兹别克斯坦苏姆", + "pos": "before", + "value": "so?m" + }, { + "name": "西萨摩亚塔拉", + "pos": "before", + "value": "WST" + }, { + "name": "新加坡元", + "pos": "before", + "value": "$" + }, { + "name": "新台币", + "pos": "before", + "value": "NT$" + }, { + "name": "新西兰元", + "pos": "before", + "value": "$" + }, { + "name": "匈牙利福林", + "pos": "before", + "value": "Ft" + }, { + "name": "叙利亚镑", + "pos": "before", + "value": "£" + }, { + "name": "牙买加元", + "pos": "before", + "value": "$" + }, { + "name": "亚美尼亚德拉姆", + "pos": "before", + "value": "Dram" + }, { + "name": "也门里亚尔", + "pos": "before", + "value": "Rial" + }, { + "name": "伊拉克第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "伊朗里亚尔", + "pos": "before", + "value": "Rial" + }, { + "name": "以色列新谢克尔", + "pos": "before", + "value": "?" + }, { + "name": "印度卢比", + "pos": "before", + "value": "?" + }, { + "name": "印度尼西亚卢比", + "pos": "before", + "value": "Rp" + }, { + "name": "约旦第纳尔", + "pos": "before", + "value": "din" + }, { + "name": "越南盾", + "pos": "after", + "value": "?" + }, { + "name": "赞比亚克瓦查", + "pos": "before", + "value": "ZMW" + }, { + "name": "直布罗陀镑", + "pos": "before", + "value": "£" + }, { + "name": "智利比索", + "pos": "before", + "value": "$" + }, { + "name": "中非金融合作法郎", + "pos": "before", + "value": "FCFA" + } + ], + dateFmtList: [ + { + "name": "1930-08-05", + "value": "yyyy-MM-dd" + }, + { + "name": "1930/8/5", + "value": "yyyy/MM/dd" + }, + { + "name": "1930年8月5日", + "value": 'yyyy"年"M"月"d"日"' + }, + { + "name": "08-05", + "value": "MM-dd" + }, + { + "name": "8-5", + "value": "M-d" + }, + { + "name": "8月5日", + "value": 'M"月"d"日"' + }, + { + "name": "13:30:30", + "value": "h:mm:ss" + }, + { + "name": "13:30", + "value": "h:mm" + }, + { + "name": "下午01:30", + "value": 'AM/PM hh:mm' + }, + { + "name": "下午1:30", + "value": 'AM/PM h:mm' + }, + { + "name": "下午1:30:30", + "value": 'AM/PM h:mm:ss' + }, + { + "name": "08-05 下午01:30", + "value": "MM-dd AM/PM hh:mm" + }, + // { + // "name": "1930年8月5日星期二", + // "value": '' + // }, + // { + // "name": "1930年8月5日星期二 下午1:30:30", + // "value": '' + // }, + ], + numFmtList: [ + { + "name": "1235", + "value": "0" + }, + { + "name": "1234.56", + "value": "0.00" + }, + { + "name": "1,235", + "value": "#,##0" + }, + { + "name": "1,234.56", + "value": "#,##0.00" + }, + { + "name": "1,235", + "value": "#,##0_);(#,##0)" + }, + { + "name": "1,235", + "value": "#,##0_);[Red](#,##0)" + }, + { + "name": "1,234.56", + "value": "#,##0.00_);(#,##0.00)" + }, + { + "name": "1,234.56", + "value": "#,##0.00_);[Red](#,##0.00)" + }, + { + "name": "$1,235", + "value": "$#,##0_);($#,##0)" + }, + { + "name": "$1,235", + "value": "$#,##0_);[Red]($#,##0)" + }, + { + "name": "$1,234.56", + "value": "$#,##0.00_);($#,##0.00)" + }, + { + "name": "$1,234.56", + "value": "$#,##0.00_);[Red]($#,##0.00)" + }, + { + "name": "1234.56", + "value": "@" + }, + { + "name": "123456%", + "value": "0%" + }, + { + "name": "123456.00%", + "value": "0.00%" + }, + { + "name": "1.23E+03", + "value": "0.00E+00" + }, + { + "name": "1.2E+3", + "value": "##0.0E+0" + }, + { + "name": "1234 5/9", + "value": "# ?/?" + }, + { + "name": "1234 14/25", + "value": "# ??/??" + }, + { + "name": "$ 1,235", + "value": '_($* #,##0_);_(...($* "-"_);_(@_)' + }, + { + "name": "1,235", + "value": '_(* #,##0_);_(*..._(* "-"_);_(@_)' + }, + { + "name": "$ 1,234.56", + // "value": '_($* #,##0.00_)...* "-"??_);_(@_)' + "value": '_($* #,##0.00_);_(...($* "-"_);_(@_)' + }, + { + "name": "1,234.56", + "value": '_(* #,##0.00_);...* "-"??_);_(@_)' + }, + ], + createDialog: function(type){ + let _this = this; + + const currencyDetail = locale().currencyDetail; + const locale_format = locale().format; + const locale_button = locale().button; + + this.moneyFmtList = [ + {'name': currencyDetail.RMB,'pos': 'before','value': '¥'}, + {'name': currencyDetail.USdollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.EUR,'pos': 'before','value': '€'}, + {'name': currencyDetail.GBP,'pos': 'before','value': '£'}, + {'name': currencyDetail.HK,'pos': 'before','value': '$'}, + {'name': currencyDetail.JPY,'pos': 'before','value': '¥'}, + {'name': currencyDetail.AlbanianLek,'pos': 'before','value': 'Lek'}, + {'name': currencyDetail.AlgerianDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.Afghani,'pos': 'after','value': 'Af'}, + {'name': currencyDetail.ArgentinePeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.UnitedArabEmiratesDirham,'pos': 'before','value': 'dh'}, + {'name': currencyDetail.ArubanFlorin,'pos': 'before','value': 'Afl'}, + {'name': currencyDetail.OmaniRial,'pos': 'before','value': 'Rial'}, + {'name': currencyDetail.Azerbaijanimanat,'pos': 'before','value': '?'}, + {'name': currencyDetail.EgyptianPound,'pos': 'before','value': '£'}, + {'name': currencyDetail.EthiopianBirr,'pos': 'before','value': 'Birr'}, + {'name': currencyDetail.AngolaKwanza,'pos': 'before','value': 'Kz'}, + {'name': currencyDetail.AustralianDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.Patacas,'pos': 'before','value': 'MOP'}, + {'name': currencyDetail.BarbadosDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.PapuaNewGuineaKina,'pos': 'before','value': 'PGK'}, + {'name': currencyDetail.BahamianDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.PakistanRupee,'pos': 'before','value': 'Rs'}, + {'name': currencyDetail.ParaguayanGuarani,'pos': 'after','value': 'Gs'}, + {'name': currencyDetail.BahrainiDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.PanamanianBalboa,'pos': 'before','value': 'B/'}, + {'name': currencyDetail.Brazilianreal,'pos': 'before','value': 'R$'}, + {'name': currencyDetail.Belarusianruble,'pos': 'after','value': 'р'}, + {'name': currencyDetail.BermudianDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.BulgarianLev,'pos': 'before','value': 'lev'}, + {'name': currencyDetail.IcelandKrona,'pos': 'before','value': 'kr'}, + {'name': currencyDetail.BosniaHerzegovinaConvertibleMark,'pos': 'before','value': 'KM'}, + {'name': currencyDetail.PolishZloty,'pos': 'after','value': 'z?'}, + {'name': currencyDetail.Boliviano,'pos': 'before','value': 'Bs'}, + {'name': currencyDetail.BelizeDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.BotswanaPula,'pos': 'before','value': 'P'}, + {'name': currencyDetail.NotDannuzhamu,'pos': 'before','value': 'Nu'}, + {'name': currencyDetail.BurundiFranc,'pos': 'before','value': 'FBu'}, + {'name': currencyDetail.NorthKoreanWon,'pos': 'before','value': '?KP'}, + {'name': currencyDetail.DanishKrone,'pos': 'after','value': 'kr'}, + {'name': currencyDetail.EastCaribbeanDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.DominicaPeso,'pos': 'before','value': 'RD$'}, + {'name': currencyDetail.RussianRuble,'pos': 'after','value': '?'}, + {'name': currencyDetail.EritreanNakfa,'pos': 'before','value': 'Nfk'}, + {'name': currencyDetail.CFAfranc,'pos': 'before','value': 'CFA'}, + {'name': currencyDetail.PhilippinePeso,'pos': 'before','value': '?'}, + {'name': currencyDetail.FijiDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.CapeVerdeEscudo,'pos': 'before','value': 'CVE'}, + {'name': currencyDetail.FalklandIslandsPound,'pos': 'before','value': '£'}, + {'name': currencyDetail.GambianDalasi,'pos': 'before','value': 'GMD'}, + {'name': currencyDetail.Congolesefranc,'pos': 'before','value': 'FrCD'}, + {'name': currencyDetail.ColombianPeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.CostaRicanColon,'pos': 'before','value': '?'}, + {'name': currencyDetail.CubanPeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.Cubanconvertiblepeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.GuyanaDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.KazakhstanTenge,'pos': 'before','value': '?'}, + {'name': currencyDetail.Haitiangourde,'pos': 'before','value': 'HTG'}, + {'name': currencyDetail.won,'pos': 'before','value': '?'}, + {'name': currencyDetail.NetherlandsAntillesGuilder,'pos': 'before','value': 'NAf.'}, + {'name': currencyDetail.Honduraslempiras,'pos': 'before','value': 'L'}, + {'name': currencyDetail.DjiboutiFranc,'pos': 'before','value': 'Fdj'}, + {'name': currencyDetail.KyrgyzstanSom,'pos': 'before','value': 'KGS'}, + {'name': currencyDetail.GuineaFranc,'pos': 'before','value': 'FG'}, + {'name': currencyDetail.CanadianDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.GhanaianCedi,'pos': 'before','value': 'GHS'}, + {'name': currencyDetail.Cambodianriel,'pos': 'before','value': 'Riel'}, + {'name': currencyDetail.CzechKoruna,'pos': 'after','value': 'K?'}, + {'name': currencyDetail.ZimbabweDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.QatariRiyal,'pos': 'before','value': 'Rial'}, + {'name': currencyDetail.CaymanIslandsDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.Comorianfranc,'pos': 'before','value': 'CF'}, + {'name': currencyDetail.KuwaitiDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.CroatianKuna,'pos': 'before','value': 'kn'}, + {'name': currencyDetail.KenyanShilling,'pos': 'before','value': 'Ksh'}, + {'name': currencyDetail.LesothoLoti,'pos': 'before','value': 'LSL'}, + {'name': currencyDetail.LaoKip,'pos': 'before','value': '?'}, + {'name': currencyDetail.LebanesePound,'pos': 'before','value': 'L£'}, + {'name': currencyDetail.Lithuanianlitas,'pos': 'before','value': 'Lt'}, + {'name': currencyDetail.LibyanDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.LiberianDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.RwandaFranc,'pos': 'before','value': 'RF'}, + {'name': currencyDetail.RomanianLeu,'pos': 'before','value': 'RON'}, + {'name': currencyDetail.MalagasyAriary,'pos': 'before','value': 'Ar'}, + {'name': currencyDetail.MaldivianRufiyaa,'pos': 'before','value': 'Rf'}, + {'name': currencyDetail.MalawiKwacha,'pos': 'before','value': 'MWK'}, + {'name': currencyDetail.MalaysianRinggit,'pos': 'before','value': 'RM'}, + {'name': currencyDetail.MacedoniawearingDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.MauritiusRupee,'pos': 'before','value': 'MURs'}, + {'name': currencyDetail.MauritanianOuguiya,'pos': 'before','value': 'MRO'}, + {'name': currencyDetail.MongolianTugrik,'pos': 'before','value': '?'}, + {'name': currencyDetail.BangladeshiTaka,'pos': 'before','value': '?'}, + {'name': currencyDetail.PeruvianNuevoSol,'pos': 'before','value': 'S/'}, + {'name': currencyDetail.MyanmarKyat,'pos': 'before','value': 'K'}, + {'name': currencyDetail.MoldovanLeu,'pos': 'before','value': 'MDL'}, + {'name': currencyDetail.MoroccanDirham,'pos': 'before','value': 'dh'}, + {'name': currencyDetail.MozambiqueMetical,'pos': 'before','value': 'MTn'}, + {'name': currencyDetail.MexicanPeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.NamibianDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.SouthAfricanRand,'pos': 'before','value': 'R'}, + {'name': currencyDetail.SouthSudanesePound,'pos': 'before','value': '£'}, + {'name': currencyDetail.NicaraguaCordoba,'pos': 'before','value': 'C$'}, + {'name': currencyDetail.NepaleseRupee,'pos': 'before','value': 'Rs'}, + {'name': currencyDetail.NigerianNaira,'pos': 'before','value': '?'}, + {'name': currencyDetail.NorwegianKrone,'pos': 'after','value': 'kr'}, + {'name': currencyDetail.GeorgianLari,'pos': 'before','value': 'GEL'}, + {'name': currencyDetail.RenminbiOffshore,'pos': 'before','value': '¥'}, + {'name': currencyDetail.SwedishKrona,'pos': 'after','value': 'kr'}, + {'name': currencyDetail.SwissFranc,'pos': 'before','value': 'CHF'}, + {'name': currencyDetail.SerbianDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.SierraLeone,'pos': 'before','value': 'SLL'}, + {'name': currencyDetail.SeychellesRupee,'pos': 'before','value': 'SCR'}, + {'name': currencyDetail.SaudiRiyal,'pos': 'before','value': 'Rial'}, + {'name': currencyDetail.SaoTomeDobra,'pos': 'before','value': 'Db'}, + {'name': currencyDetail.SaintHelenapound,'pos': 'before','value': '£'}, + {'name': currencyDetail.SriLankaRupee,'pos': 'before','value': 'Rs'}, + {'name': currencyDetail.SwazilandLilangeni,'pos': 'before','value': 'SZL'}, + {'name': currencyDetail.SudanesePound,'pos': 'before','value': 'SDG'}, + {'name': currencyDetail.Surinamesedollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.SolomonIslandsDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.SomaliShilling,'pos': 'before','value': 'SOS'}, + {'name': currencyDetail.TajikistanSomoni,'pos': 'before','value': 'Som'}, + {'name': currencyDetail.PacificFranc,'pos': 'after','value': 'FCFP'}, + {'name': currencyDetail.ThaiBaht,'pos': 'before','value': '?'}, + {'name': currencyDetail.TanzanianShilling,'pos': 'before','value': 'TSh'}, + {'name': currencyDetail.TonganPaanga,'pos': 'before','value': 'T$'}, + {'name': currencyDetail.TrinidadandTobagoDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.TunisianDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.TurkishLira,'pos': 'before','value': '?'}, + {'name': currencyDetail.VanuatuVatu,'pos': 'before','value': 'VUV'}, + {'name': currencyDetail.GuatemalanQuetzal,'pos': 'before','value': 'Q'}, + {'name': currencyDetail.CommissionBolivar,'pos': 'before','value': 'Bs'}, + {'name': currencyDetail.BruneiDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.UgandanShilling,'pos': 'before','value': 'UGX'}, + {'name': currencyDetail.UkrainianHryvnia,'pos': 'before','value': 'грн.'}, + {'name': currencyDetail.UruguayanPeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.Uzbekistansom,'pos': 'before','value': 'so?m'}, + {'name': currencyDetail.WesternSamoaTala,'pos': 'before','value': 'WST'}, + {'name': currencyDetail.SingaporeDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.NT,'pos': 'before','value': 'NT$'}, + {'name': currencyDetail.NewZealandDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.HungarianForint,'pos': 'before','value': 'Ft'}, + {'name': currencyDetail.SyrianPound,'pos': 'before','value': '£'}, + {'name': currencyDetail.JamaicanDollar,'pos': 'before','value': '$'}, + {'name': currencyDetail.ArmenianDram,'pos': 'before','value': 'Dram'}, + {'name': currencyDetail.YemeniRial,'pos': 'before','value': 'Rial'}, + {'name': currencyDetail.IraqiDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.IranianRial,'pos': 'before','value': 'Rial'}, + {'name': currencyDetail.NewIsraeliShekel,'pos': 'before','value': '?'}, + {'name': currencyDetail.IndianRupee,'pos': 'before','value': '?'}, + {'name': currencyDetail.IndonesianRupiah,'pos': 'before','value': 'Rp'}, + {'name': currencyDetail.JordanianDinar,'pos': 'before','value': 'din'}, + {'name': currencyDetail.VND,'pos': 'after','value': '?'}, + {'name': currencyDetail.ZambianKwacha,'pos': 'before','value': 'ZMW'}, + {'name': currencyDetail.GibraltarPound,'pos': 'before','value': '£'}, + {'name': currencyDetail.ChileanPeso,'pos': 'before','value': '$'}, + {'name': currencyDetail.CFAFrancBEAC,'pos': 'before','value': 'FCFA'} + ]; + + this.dateFmtList = locale().dateFmtList; + + this.numFmtList = [ + { + "name": "1235", + "value": "0" + }, + { + "name": "1234.56", + "value": "0.00" + }, + { + "name": "1,235", + "value": "#,##0" + }, + { + "name": "1,234.56", + "value": "#,##0.00" + }, + { + "name": "1,235", + "value": "#,##0_);(#,##0)" + }, + { + "name": "1,235", + "value": "#,##0_);[Red](#,##0)" + }, + { + "name": "1,234.56", + "value": "#,##0.00_);(#,##0.00)" + }, + { + "name": "1,234.56", + "value": "#,##0.00_);[Red](#,##0.00)" + }, + { + "name": "$1,235", + "value": "$#,##0_);($#,##0)" + }, + { + "name": "$1,235", + "value": "$#,##0_);[Red]($#,##0)" + }, + { + "name": "$1,234.56", + "value": "$#,##0.00_);($#,##0.00)" + }, + { + "name": "$1,234.56", + "value": "$#,##0.00_);[Red]($#,##0.00)" + }, + { + "name": "1234.56", + "value": "@" + }, + { + "name": "123456%", + "value": "0%" + }, + { + "name": "123456.00%", + "value": "0.00%" + }, + { + "name": "1.23E+03", + "value": "0.00E+00" + }, + { + "name": "1.2E+3", + "value": "##0.0E+0" + }, + { + "name": "1234 5/9", + "value": "# ?/?" + }, + { + "name": "1234 14/25", + "value": "# ??/??" + }, + { + "name": "$ 1,235", + "value": '_($* #,##0_);_(...($* "-"_);_(@_)' + }, + { + "name": "1,235", + "value": '_(* #,##0_);_(*..._(* "-"_);_(@_)' + }, + { + "name": "$ 1,234.56", + // "value": '_($* #,##0.00_)...* "-"??_);_(@_)' + "value": '_($* #,##0.00_);_(...($* "-"_);_(@_)' + }, + { + "name": "1,234.56", + "value": '_(* #,##0.00_);...* "-"??_);_(@_)' + }, + ] + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-moreFormat-dialog").remove(); + + let title = "", content = ''; + + if(type == "morecurrency"){ //货币 + title = locale_format.titleCurrency; + + let listHtml = ''; + + for(let i = 0; i < _this.moneyFmtList.length; i++){ + let name = _this.moneyFmtList[i]["name"]; + let pos = _this.moneyFmtList[i]["pos"]; + let value = _this.moneyFmtList[i]["value"]; + + listHtml += '
'+ + '
'+ name +'
'+ + '
'+ value +'
'+ + ''+ + '
'; + } + + content = '
'+ + '
'+ + ''+ + ''+ + '
'+ + '
'+ listHtml +'
'+ + '
'; + } + else if(type == "moredatetime"){ //日期时间 + title = locale_format.titleDateTime; + + let listHtml = ''; + + for(let i = 0; i < _this.dateFmtList.length; i++){ + let name = _this.dateFmtList[i]["name"]; + let value = _this.dateFmtList[i]["value"]; + + listHtml += '
'+ + '
'+ name +'
'+ + '
'+ value +'
'+ + '
'; + } + + content = '
'+ + '
'+ listHtml +'
'+ + '
'; + } + else if(type == "moredigit"){ //数字 + title = locale_format.titleNumber; + + let listHtml = ''; + + for(let i = 0; i < _this.numFmtList.length; i++){ + let name = _this.numFmtList[i]["name"]; + let value = _this.numFmtList[i]["value"]; + + listHtml += '
'+ + '
'+ name +'
'+ + '
'+ value +'
'+ + '
'; + } + + content = '
'+ + '
'+ listHtml +'
'+ + '
'; + } + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-moreFormat-dialog", + "addclass": "luckysheet-moreFormat-dialog", + "title": title, + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-moreFormat-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-moreFormat-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + + $("#luckysheet-moreFormat-dialog .listbox .listItem").eq(0).addClass("on"); + }, + init: function(){ + let _this = this; + + //选择格式 + $(document).on("click", "#luckysheet-moreFormat-dialog .listbox .listItem", function(){ + $(this).addClass("on").siblings().removeClass("on"); + }); + + //确定 + $(document).off("click.moreFormatConfirm").on("click.moreFormatConfirm", "#luckysheet-moreFormat-dialog #luckysheet-moreFormat-dialog-confirm", function(){ + $("#luckysheet-moreFormat-dialog").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + + let d = editor.deepCopyFlowData(Store.flowdata); + + let value = $("#luckysheet-moreFormat-dialog .listbox .listItem.on .value").text(); + let id = $(this).parents("#luckysheet-moreFormat-dialog").find(".box").attr("id"); + + if(id == "morecurrency"){ //货币 + if(value.indexOf("?") != -1){ + return; + } + + let decimal = parseInt($("#luckysheet-moreFormat-dialog .decimal input").val().trim()); + + if(decimal.toString() == "NaN" || decimal < 0 || decimal > 9){ + if(isEditMode()){ + alert("小数位数必须在0-9之间!"); + } + else{ + tooltip.info("小数位数必须在0-9之间!", ""); + } + + return; + } + + let str = ""; + + if(decimal > 0){ + for(let i = 1; i <= decimal; i++){ + str += "0"; + } + + str = "0." + str; + } + else{ + str = "#"; + } + + let pos = $("#luckysheet-moreFormat-dialog .listbox .listItem.on input:hidden").val(); + + if(pos == "before"){ + str = '"' + value + '" ' + str; + } + else if(pos == "after"){ + str = str + ' "' + value + '"'; + } + + menuButton.updateFormat(d, "ct", str); + } + else if(id == "moredatetime"){ //日期时间 + menuButton.updateFormat(d, "ct", value); + } + else if(id == "moredigit"){ //数字 + menuButton.updateFormat(d, "ct", value); + } + }) + } +} + +export default luckysheetMoreFormat; \ No newline at end of file diff --git a/src/controllers/pivotTable.js b/src/controllers/pivotTable.js new file mode 100644 index 000000000..888e12908 --- /dev/null +++ b/src/controllers/pivotTable.js @@ -0,0 +1,3094 @@ +import { getSheetIndex, getRangetxt } from '../methods/get'; +import { + replaceHtml, + getObjType, + ABCatNum, + numFormat, + numfloatlen, + showrightclickmenu, + mouseclickposition +} from '../utils/util'; +import { getdatabyselectionD, getcellvalue, datagridgrowth } from '../global/getdata'; +import { isdatetime, diff, isdatatypemulti, isdatatype } from '../global/datecontroll'; +import { genarate, update } from '../global/format'; +import { isRealNull, isEditMode } from '../global/validate'; +import { orderbydata1D } from '../global/sort'; +import { jfrefreshgrid, jfrefreshgridall } from '../global/refresh'; +import tooltip from '../global/tooltip'; +import editor from '../global/editor'; +import cleargridelement from '../global/cleargridelement'; +import luckysheetArray from '../global/array'; +import analysis from '../global/analysis'; +import { selectHightlightShow } from './select'; +import { luckysheet_searcharray } from './sheetSearch'; +import { + modelHTML, + filtermenuHTML, + filtersubmenuHTML, + pivottableconfigHTML, + pivottablesumHTML, + luckysheetPivotTableHTML +} from './constant'; +import sheetmanage from './sheetmanage'; +import luckysheetsizeauto from './resize'; +import server from './server'; +import Store from '../store'; + +const pivotTable = { + pivotDatas: null, + pivotSheetIndex: 0, + pivotDataSheetIndex: 0, + celldata: null, + origindata: null, + getCellData: function (cursheetindex, datasheetindex, data_select_save) { + let _this = this; + + let sheetIndex; + if (cursheetindex != null) { + sheetIndex = cursheetindex; + } + else { + sheetIndex = Store.currentSheetIndex; + } + + let realIndex = getSheetIndex(sheetIndex); + + if (getObjType(Store.luckysheetfile[realIndex].pivotTable) != "object"){ + Store.luckysheetfile[realIndex].pivotTable = eval('('+ Store.luckysheetfile[realIndex].pivotTable +')'); + } + + if (Store.luckysheetfile[realIndex].pivotTable != null) { + _this.column = Store.luckysheetfile[realIndex].pivotTable.column; + _this.row = Store.luckysheetfile[realIndex].pivotTable.row; + _this.values = Store.luckysheetfile[realIndex].pivotTable.values; + _this.filter = Store.luckysheetfile[realIndex].pivotTable.filter; + _this.showType = Store.luckysheetfile[realIndex].pivotTable.showType; + + _this.filterparm = Store.luckysheetfile[realIndex].pivotTable.filterparm; + + if (Store.luckysheetfile[realIndex].pivotTable.drawPivotTable != null) { + _this.drawPivotTable = Store.luckysheetfile[realIndex].pivotTable.drawPivotTable; + } + else { + _this.drawPivotTable = true; + } + + if (Store.luckysheetfile[realIndex].pivotTable.pivotTableBoundary != null) { + _this.pivotTableBoundary = Store.luckysheetfile[realIndex].pivotTable.pivotTableBoundary; + } + else { + _this.pivotTableBoundary = [12, 6]; + } + + if (data_select_save != null) { + _this.pivot_select_save = data_select_save; + } + else { + _this.pivot_select_save = Store.luckysheetfile[realIndex].pivotTable.pivot_select_save; + } + + if (datasheetindex != null) { + _this.pivotDataSheetIndex = datasheetindex; + } + else { + _this.pivotDataSheetIndex = Store.luckysheetfile[realIndex].pivotTable.pivotDataSheetIndex; + } + } + else { + _this.column = null; + _this.row = null; + _this.values = null; + _this.filter = null; + _this.showType = null; + + _this.filterparm = null; + + _this.drawPivotTable = true; + _this.pivotTableBoundary = [12, 6]; + + if (data_select_save != null) { + _this.pivot_select_save = data_select_save; + } + else { + _this.pivot_select_save = Store.luckysheet_select_save; + } + + if (datasheetindex != null) { + _this.pivotDataSheetIndex = datasheetindex; + } + else { + _this.pivotDataSheetIndex = sheetIndex; + } + } + + let pivotrealIndex = getSheetIndex(_this.pivotDataSheetIndex); + + let otherfile = Store.luckysheetfile[pivotrealIndex]; + if(otherfile["data"] == null){ + otherfile["data"] = sheetmanage.buildGridData(otherfile); + } + _this.origindata = getdatabyselectionD(otherfile.data, _this.pivot_select_save); + + let rowhidden = {}; + if (_this.filterparm != null) { + for (let f in _this.filterparm) { + for (h in _this.filterparm[f]) { + if (h.rowhidden != null) { + rowhidden = $.extend(true, rowhidden, h.rowhidden); + } + } + } + } + _this.rowhidden = rowhidden; + + _this.pivotSheetIndex = sheetIndex; + + let newdata = []; + for (let i = 0; i < _this.origindata.length; i++) { + if (_this.rowhidden != null && _this.rowhidden[i] != null) { + continue; + } + newdata.push([].concat(_this.origindata[i])); + } + _this.celldata = newdata; + + _this.pivot_data_type = {}; + for (let c = 0; c < _this.celldata[1].length; c++) { + let type = isdatatype(_this.celldata[1][c]); + _this.pivot_data_type[c.toString()] = type; + } + }, + pivot_data_type: {}, + pivot_select_save: null, + column: null, + row: null, + values: null, + filter: null, + showType: null, + rowhidden: null, + selected: null, + caljs: null, + initial: true, + filterparm: null, + luckysheet_pivotTable_select_state: false, + jgridCurrentPivotInput: null, + movestate: false, + moveitemposition: [], + movesave: {}, + showvaluecolrow: function () { + let _this = this; + + if ($("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").length >= 2) { + $("#luckysheetpivottablevaluecolrowshow").show(); + + if (_this.showType == "column") { + $("#luckysheetpivottablevaluecolrow").prop("checked", true); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"); + + $("#luckysheetpivottablevaluecolrow1").prop("checked", false); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active"); + } + else { + $("#luckysheetpivottablevaluecolrow1").prop("checked", true); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"); + + $("#luckysheetpivottablevaluecolrow").prop("checked", false); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active"); + } + } + else { + $("#luckysheetpivottablevaluecolrowshow").hide(); + } + }, + resetOrderby: function (obj) { + let orderby = $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").index(obj); + $("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + if ($(this).data("orderby") == orderby) { + $(this).data("orderby", "self"); + } + }); + }, + luckysheetsliderlistclearfilter: function ($filter) { + let _this = this; + + let $t = $filter.parent(); + let cindex = $t.data("index"); + + let rowhidden = {}, + selected = {}, + d = _this.origindata, + filterdata = {}; + + $t.data("rowhidden", "").find(".luckysheet-slider-list-item-filtered").hide(); + _this.setDatatojsfile("selected", {}, cindex); + _this.setDatatojsfile("rowhidden", null, cindex); + + let newdata = []; + for (let i = 0; i < d.length; i++) { + if (rowhidden[i] != null) { + continue; + } + newdata.push([].concat(d[i])); + } + + _this.celldata = newdata; + _this.refreshPivotTable(); + $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); + }, + luckysheetsliderlistitemfilter: function ($filter) { + let _this = this; + + let $t = $filter.parent(), + toffset = $t.offset(), + $menu = $("#luckysheet-pivotTableFilter-menu"), + winH = $(window).height(), + winW = $(window).width(); + + let cindex = $t.data("index"); + + let rowhidden = $t.data("rowhidden"); + if(rowhidden == null || rowhidden == ""){ + rowhidden = {}; + } + else if(getObjType(rowhidden) == "string"){ + rowhidden = JSON.parse(rowhidden); + } + + $("body .luckysheet-cols-menu").hide(); + $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); + $("#luckysheet-pivotTableFilter-byvalue-input").val(""); + $("#luckysheet-pivotTableFilter-bycondition").next().hide(); + $("#luckysheet-pivotTableFilter-byvalue").next().show(); + + $menu.data("index", cindex); + + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(); + $("#luckysheet-pivotTableFilter-selected span").data("type", "0").data("type", null).text("无"); + + let byconditiontype = $t.data("byconditiontype"); + $("#luckysheet-pivotTableFilter-selected span").data("value", $t.data("byconditionvalue")).data("type", byconditiontype).text($t.data("byconditiontext")); + + if (byconditiontype == "2") { + let $input = $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show().find("input"); + $input.eq(0).val($t.data("byconditionvalue1")); + $input.eq(1).val($t.data("byconditionvalue2")); + } + else if (byconditiontype == "1") { + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show().find("input").val($t.data("byconditionvalue1")); + } + + $("#luckysheet-pivotTableFilter-byvalue-select").empty().html('
数据量大!请稍后
'); + + let rowhiddenother = {}; //其它筛选列的隐藏行 + $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").not($t.get(0)).each(function () { + let $t = $(this), rh = $t.data("rowhidden"); + + if (rh == null || rh == "") { + return true; + } + + if(getObjType(rh) == "string"){ + rh = JSON.parse(rh); + } + + for (let r in rh) { + rowhiddenother[r] = 0; + } + }); + + let data = _this.origindata; + + setTimeout(function () { + //日期值 + let dvmap = {}; + let dvmap_uncheck = {}; + + //除日期以外的值 + let vmap = {}; + let vmap_uncheck = {}; + + for (let r = 1; r < data.length; r++) { + if(r in rowhiddenother){ + continue; + } + + if(data[r] == null){ + continue; + } + + let cell = data[r][cindex]; + + if(cell != null && cell.ct != null && cell.ct.t == "d"){ //单元格是日期 + let v = update("YYYY-MM-DD", cell.v); + + let y = v.split("-")[0]; + let m = v.split("-")[1]; + let d = v.split("-")[2]; + + if(!(y in dvmap)){ + dvmap[y] = {}; + } + + if(!(m in dvmap[y])){ + dvmap[y][m] = {}; + } + + if(!(d in dvmap[y][m])){ + dvmap[y][m][d] = 0; + } + + dvmap[y][m][d]++; + + if(r in rowhidden){ + dvmap_uncheck[y] = 0; + dvmap_uncheck[m] = 0; + dvmap_uncheck[d] = 0; + } + } + else{ + let v, m; + if(cell == null || isRealNull(cell.v)){ + v = null; + m = null; + } + else{ + v = cell.v; + m = cell.m; + } + + if(!(v in vmap)){ + vmap[v] = {}; + } + + if(!(m in vmap[v])){ + vmap[v][m] = 0; + } + + vmap[v][m]++; + + if(r in rowhidden){ + vmap_uncheck[v + "#$$$#" + m] = 0; + } + } + } + + //遍历数据加到页面 + let item = []; + + if(JSON.stringify(dvmap).length > 2){ + for(let y in dvmap){ + let ysum = 0; + let monthHtml = ''; + + for(let m in dvmap[y]){ + let msum = 0; + let dayHtml = ''; + + for(let d in dvmap[y][m]){ + let dayL = dvmap[y][m][d]; + msum += dayL; + + //月 小于 10 + let mT; + if(Number(m) < 10){ + mT = "0" + Number(m); + } + else{ + mT = m; + } + + //日 小于 10 + let dT; + if(Number(d) < 10){ + dT = "0" + Number(d); + } + else{ + dT = d; + } + + //日是否选中状态 + if((y in dvmap_uncheck) && (m in dvmap_uncheck) && (d in dvmap_uncheck)){ + dayHtml += '
' + + '' + + '' + + '( ' + dayL + ' )' + + '
'; + } + else{ + dayHtml += '
' + + '' + + '' + + '( ' + dayL + ' )' + + '
'; + } + } + + ysum += msum; + + //月 小于 10 + let mT2; + if(Number(m) < 10){ + mT2 = "0" + Number(m); + } + else{ + mT2 = m; + } + + //月是否选中状态 + if((y in dvmap_uncheck) && (m in dvmap_uncheck)){ + monthHtml += '
' + + '
' + + '' + + '' + + '' + + '( ' + msum + ' )' + + '
' + + '
' + dayHtml + '
' + + '
'; + } + else{ + monthHtml += '
' + + '
' + + '' + + '' + + '' + + '( ' + msum + ' )' + + '
' + + '
' + dayHtml + '
' + + '
'; + } + } + + //年是否选中状态 + let yearHtml; + if(y in dvmap_uncheck){ + yearHtml = '
' + + '
' + + '' + + '' + + '' + + '( ' + ysum + ' )' + + '
' + + '
' + monthHtml + '
' + + '
'; + } + else{ + yearHtml = '
' + + '
' + + '' + + '' + + '' + + '( ' + ysum + ' )' + + '
' + + '
' + monthHtml + '
' + + '
'; + } + + item.unshift(yearHtml); + } + } + + if(JSON.stringify(vmap).length > 2){ + let vmapKeys = Object.keys(vmap); + vmapKeys = orderbydata1D(vmapKeys, true); + + for(let i = 0; i < vmapKeys.length; i++){ + let v = vmapKeys[i]; + + for(let x in vmap[v]){ + let text; + if((v + "#$$$#" + x) == "null#$$$#null"){ + text = "(空白)"; + } + else{ + text = x; + } + + //是否选中状态 + let dataHtml; + if((v + "#$$$#" + x) in vmap_uncheck){ + dataHtml = '
' + + '' + + '' + + '( ' + vmap[v][x] + ' )' + + '
'; + } + else{ + dataHtml = '
' + + '' + + '' + + '( ' + vmap[v][x] + ' )' + + '
'; + } + + item.push(dataHtml); + } + } + } + + $("#luckysheet-pivotTableFilter-byvalue-select").html("
" + item.join("") + "
"); + }, 1); + + showrightclickmenu($menu, toffset.left - 250, toffset.top); + }, + getSumTypeName: function (type) { + let name = ""; + + if (type == "SUM") { + name = "求和"; + } + else if (type == "COUNT") { + name = "数值计数"; + } + else if (type == "COUNTA") { + name = "计数"; + } + else if (type == "COUNTUNIQUE") { + name = "去重计数"; + } + else if (type == "AVERAGE") { + name = "平均值"; + } + else if (type == "MAX") { + name = "最大值"; + } + else if (type == "MIN") { + name = "最小值"; + } + else if (type == "MEDIAN") { + name = "中位数"; + } + else if (type == "PRODUCT") { + name = "乘积"; + } + else if (type == "STDEV") { + name = "标准差"; + } + else if (type == "STDEVP") { + name = "整体标准差"; + } + else if (type == "let") { + name = "方差"; + } + else if (type == "VARP") { + name = "整体方差"; + } + + return name; + }, + setDatatojsfile: function (attr, value, cindex) { + let _this = this; + + let index = getSheetIndex(_this.pivotSheetIndex); + if (Store.luckysheetfile[index]["pivotTable"] == null) { + Store.luckysheetfile[index]["pivotTable"] = {}; + } + + if (cindex == null) { + Store.luckysheetfile[index]["pivotTable"][attr] = value; + _this[attr] = value; + } + else { + if (Store.luckysheetfile[index]["pivotTable"]["filterparm"] == null) { + Store.luckysheetfile[index]["pivotTable"]["filterparm"] = {}; + } + + if (Store.luckysheetfile[index]["pivotTable"]["filterparm"][cindex.toString()] == null) { + Store.luckysheetfile[index]["pivotTable"]["filterparm"][cindex.toString()] = {}; + } + Store.luckysheetfile[index]["pivotTable"]["filterparm"][cindex.toString()][attr] = value; + + if (_this["filterparm"] == null) { + _this["filterparm"] = {}; + } + + if (_this["filterparm"][cindex.toString()] == null) { + _this["filterparm"][cindex.toString()] = {}; + } + + _this["filterparm"][cindex.toString()][attr] = value; + } + }, + createPivotTable: function (e) { + let _this = this; + + let datasheetindex = Store.currentSheetIndex; + + if(isEditMode()){ + alert("非编辑模式下禁止该操作!"); + return; + } + + if(Store.luckysheet_select_save.length > 1){ + tooltip.info("提示", "不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + return + } + + if (Store.luckysheet_select_save.length == 0 || Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] || Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1]) { + tooltip.info("提示", "请选择新建透视表的区域"); + return; + } + + let select_save = $.extend(true, {}, Store.luckysheet_select_save[0]); + sheetmanage.addNewSheet(e, true); + + _this.getCellData(Store.currentSheetIndex, datasheetindex, select_save); + + _this.setDatatojsfile("pivot_select_save", select_save); + _this.setDatatojsfile("pivotDataSheetIndex", datasheetindex); + + _this.initialPivotManage(); + }, + changePivotTable: function (index) { + let _this = this; + + let pivotDataSheetIndex = Store.luckysheetfile[getSheetIndex(index)].pivotTable.pivotDataSheetIndex; + let real_pivotDataSheetIndex = getSheetIndex(pivotDataSheetIndex); + + if(real_pivotDataSheetIndex == null){ + tooltip.info("此数据透视表的源数据已损坏!", ""); + return; + } + + _this.getCellData(index); + _this.initialPivotManage(true); + }, + refreshPivotTable: function () { + let _this = this; + + let redo = {}; + redo["pivotTable"] = pivotTable; + redo["data"] = editor.deepCopyFlowData(Store.flowdata);//取数据 + + _this.storePivotTableParam(); + let ret = _this.dataHandler(_this.column, _this.row, _this.values, _this.showType, _this.celldata); + _this.setDatatojsfile("pivotDatas", ret); + + let d = $.extend(true, [], sheetmanage.nulldata); + let data = d; + + let addr = 0, addc = 0; + + if (ret.length == 0) { + _this.setDatatojsfile("drawPivotTable", true); + _this.setDatatojsfile("pivotTableBoundary", [12, 6]); + } + else { + _this.setDatatojsfile("drawPivotTable", false); + _this.setDatatojsfile("pivotTableBoundary", [ret.length, ret[0].length]); + + let rlen = ret.length, + clen = ret[0].length; + + addr = rlen - d.length; + addc = clen - d[0].length; + + data = datagridgrowth(d, addr + 20, addc + 10, true); + + for (let r = 0; r < rlen; r++) { + let x = [].concat(data[r]); + for (let c = 0; c < clen; c++) { + let value = ""; + if (ret[r] != null && ret[r][c] != null) { + value = getcellvalue(r, c, ret); + } + x[c] = value; + } + data[r] = x; + } + } + + redo["type"] = "pivotTable_change"; + redo["curdata"] = $.extend(true, [], data); + redo["sheetIndex"] = Store.currentSheetIndex; + + let pivotTable = _this.getPivotTableData(); + redo["pivotTablecur"] = pivotTable; + + if(Store.clearjfundo){ + Store.jfundo = []; + Store.jfredo.push(redo); + } + + cleargridelement(); + Store.clearjfundo = false; + + if (addr > 0 || addc > 0) { + jfrefreshgridall(data[0].length, data.length, data, null, Store.luckysheet_select_save, "datachangeAll"); + } + else { + jfrefreshgrid(data, Store.luckysheet_select_save); + selectHightlightShow(); + } + + Store.clearjfundo = true; + }, + drawPivotTable: true, + pivotTableBoundary: [12, 6], + pivotclick: function (row_index, col_index, index) { + if(index == null){ + index = Store.currentSheetIndex; + } + + let file = Store.luckysheetfile[getSheetIndex(index)]; + + if(!file.isPivotTable){ + return; + } + + let pivotDataSheetIndex = file.pivotTable.pivotDataSheetIndex; + let real_pivotDataSheetIndex = getSheetIndex(pivotDataSheetIndex); + + if(real_pivotDataSheetIndex == null){ + return; + } + + if (this.isPivotRange(row_index, col_index)) { + $("#luckysheet-modal-dialog-slider-pivot").show(); + luckysheetsizeauto(); + $("#luckysheet-sta-content").css("padding-right", 260); + } + else { + $("#luckysheet-modal-dialog-slider-pivot").hide(); + luckysheetsizeauto(); + $("#luckysheet-sta-content").css("padding-right", 10); + } + }, + isPivotRange: function (row_index, col_index) { + let _this = this; + + if (!!Store.luckysheetcurrentisPivotTable) { + if (row_index < _this.pivotTableBoundary[0] && col_index < _this.pivotTableBoundary[1]) { + return true; + } + else { + return false; + } + } + }, + storePivotTableParam: function () { + let _this = this; + let columnarr = [], rowarr = [], filterarr = [], valuesarr = []; + + $("#luckysheet-modal-dialog-config-filter .luckysheet-modal-dialog-slider-config-item").each(function () { + let item = {}; + item["index"] = $(this).data("index"); + item["name"] = $(this).data("name"); + item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); + filterarr.push(item); + }); + + $("#luckysheet-modal-dialog-config-row .luckysheet-modal-dialog-slider-config-item").each(function () { + let item = {}; + item["index"] = $(this).data("index"); + item["name"] = $(this).data("name"); + item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); + item["order"] = $(this).data("order"); + item["orderby"] = $(this).data("orderby"); + item["stastic"] = $(this).data("stastic"); + rowarr.push(item); + }); + + $("#luckysheet-modal-dialog-config-column .luckysheet-modal-dialog-slider-config-item").each(function () { + let item = {}; + item["index"] = $(this).data("index"); + item["name"] = $(this).data("name"); + item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); + item["order"] = $(this).data("order"); + item["orderby"] = $(this).data("orderby"); + item["stastic"] = $(this).data("stastic"); + columnarr.push(item); + }); + + $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function () { + let item = {}; + item["index"] = $(this).data("index"); + item["name"] = $(this).data("name"); + item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); + item["sumtype"] = $(this).data("sumtype"); + item["nameindex"] = $(this).data("nameindex"); + valuesarr.push(item); + }); + + _this.setDatatojsfile("column", columnarr); + _this.setDatatojsfile("row", rowarr); + _this.setDatatojsfile("filter", filterarr); + _this.setDatatojsfile("values", valuesarr); + let showtype = $("#luckysheetpivottablevaluecolrow:checked, #luckysheetpivottablevaluecolrow1:checked").val(); + _this.setDatatojsfile("showType", showtype == "0" ? "row" : "column"); + + let pivotTable = _this.getPivotTableData(); + delete pivotTable.pivotDatas; + server.saveParam("all", _this.pivotSheetIndex, pivotTable, { "k": "pivotTable" }); + }, + getPivotTableData: function(dataindex){ + if(dataindex == null){ + dataindex = this.pivotSheetIndex; + } + + let index = getSheetIndex(dataindex); + let pivotTable = Store.luckysheetfile[index]["pivotTable"]; + + if(getObjType(pivotTable) == "object"){ + pivotTable = $.extend(true, {}, Store.luckysheetfile[index]["pivotTable"]); + } + else{ + pivotTable = eval('('+ pivotTable +')'); + } + + return pivotTable + }, + addValuesToTitle: function (titles, values) { + let rowLen = titles.length * values.length, + colLen = titles[0].length + 1; + + let retdata = []; + if (titles.length == 0 && values.length > 0) { + for (let v = 0; v < values.length; v++) { + retdata.push(values[v].fullname); + } + + return retdata; + } + + if (values.length == 0 && titles.length > 0) { + return titles; + } + + for (let r = 0; r < rowLen; r++) { + retdata[r] = new Array(colLen); + + for (let c = 0; c < colLen - 1; c++) { + retdata[r][c] = titles[Math.floor(r / values.length)][c]; + } + + retdata[r][colLen - 1] = values[r % values.length].fullname; + } + + return retdata; + }, + initialPivotManage: function (restore) { + let _this = this; + + if (_this.initial) { + _this.initial = false; + + $("body").append(luckysheetPivotTableHTML); + $("#luckysheet-modal-dialog-slider-close").click(function () { + $("#luckysheet-modal-dialog-slider-pivot").hide(); + luckysheetsizeauto(); + }); + + $("body").append(replaceHtml(modelHTML, { "id": "luckysheet-data-pivotTable-selection", "addclass": "luckysheet-data-pivotTable-selection", "title": "选取数据范围", "content": '', "botton": '' })); + + $("body").append(replaceHtml(filtermenuHTML(), { "menuid": "pivotTableFilter" })); + $("body").append(replaceHtml(filtersubmenuHTML(), { "menuid": "pivotTableFilter" })); + $("body").append(pivottableconfigHTML); + $("body").append(pivottablesumHTML); + + $("#luckysheet-pivotTableFilter-orderby-asc").remove(); + $("#luckysheet-pivotTableFilter-orderby-desc").next().remove(); + $("#luckysheet-pivotTableFilter-orderby-desc").remove(); + $("#luckysheet-pivotTableFilter-orderby-color").next().remove(); + $("#luckysheet-pivotTableFilter-orderby-color").remove(); + + $("#luckysheetpivottablevaluecolrow, #luckysheetpivottablevaluecolrow1").checkboxradio({ + icon: false + }).change(function () { + _this.refreshPivotTable(); + }); + + let hidefilersubmenu = null; + $("#luckysheet-pivotTableFilter-menu").mouseover(function () { + clearTimeout(hidefilersubmenu); + hidefilersubmenu = setTimeout(function () { + $("#luckysheet-pivotTableFilter-submenu").hide(); + }, 500); + }); + + //点击复选框 + $(document).off("click.ptFilterCheckbox1").on("click.ptFilterCheckbox1", "#luckysheet-pivotTableFilter-byvalue-select .textBox",function(){ + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).find("input[type='checkbox']").prop("checked", true); + } + }) + $(document).off("click.ptFilterCheckbox2").on("click.ptFilterCheckbox2", "#luckysheet-pivotTableFilter-byvalue-select .year",function(){ + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).parents(".yearBox").find(".month").attr("data-check", "false"); + $(this).parents(".yearBox").find(".day").attr("data-check", "false"); + $(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).parents(".yearBox").find(".month").attr("data-check", "true"); + $(this).parents(".yearBox").find(".day").attr("data-check", "true"); + $(this).parents(".yearBox").find("input[type='checkbox']").prop("checked", true); + } + }) + $(document).off("click.ptFilterCheckbox3").on("click.ptFilterCheckbox3", "#luckysheet-pivotTableFilter-byvalue-select .month",function(){ + //月份 对应的 天 + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).parents(".monthBox").find(".day").attr("data-check", "false"); + $(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).parents(".monthBox").find(".day").attr("data-check", "true"); + $(this).parents(".monthBox").find("input[type='checkbox']").prop("checked", true); + } + //月份 对应的 年份 + let yearDayAllCheck = true; + let $yearDay = $(this).parents(".yearBox").find(".day"); + $yearDay.each(function(i,e){ + if($(e).attr("data-check") == "true"){ + + } + else{ + yearDayAllCheck = false; + } + }); + if(yearDayAllCheck){ + $(this).parents(".yearBox").find(".year").attr("data-check", "true"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); + } + else{ + $(this).parents(".yearBox").find(".year").attr("data-check", "false"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); + } + }) + $(document).off("click.ptFilterCheckbox4").on("click.ptFilterCheckbox4", "#luckysheet-pivotTableFilter-byvalue-select .day",function(){ + if($(this).attr("data-check") == "true"){ + $(this).attr("data-check", "false"); + $(this).find("input[type='checkbox']").removeAttr("checked"); + } + else{ + $(this).attr("data-check", "true"); + $(this).find("input[type='checkbox']").prop("checked", true); + } + //天 对应的 月份 + let monthDayAllCheck = true; + let $monthDay = $(this).parents(".monthBox").find(".day"); + $monthDay.each(function(i,e){ + if($(e).attr("data-check") == "true"){ + + } + else{ + monthDayAllCheck = false; + } + }); + if(monthDayAllCheck){ + $(this).parents(".monthBox").find(".month").attr("data-check", "true"); + $(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked", true); + } + else{ + $(this).parents(".monthBox").find(".month").attr("data-check", "false"); + $(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"); + } + //天 对应的 年份 + let yearDayAllCheck = true; + let $yearDay = $(this).parents(".yearBox").find(".day"); + $yearDay.each(function(i,e){ + if($(e).attr("data-check") == "true"){ + + } + else{ + yearDayAllCheck = false; + } + }); + if(yearDayAllCheck){ + $(this).parents(".yearBox").find(".year").attr("data-check", "true"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); + } + else{ + $(this).parents(".yearBox").find(".year").attr("data-check", "false"); + $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); + } + }) + + //日期 三级下拉显示 + $(document).off("click.ptFilterYearDropdown").on("click.ptFilterYearDropdown", "#luckysheet-pivotTableFilter-byvalue-select .yearBox .fa-caret-right",function(){ + let $p = $(this).parents(".luckysheet-mousedown-cancel"); + if($p.hasClass("year")){ + $(this).parents(".yearBox").find(".monthList").slideToggle(); + } + if($p.hasClass("month")){ + $(this).parents(".monthBox").find(".dayList").slideToggle(); + } + }); + + //全选 + $("#luckysheet-pivotTableFilter-byvalue-btn-all").click(function () { + $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").prop("checked", true); + $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); + }); + + //反选 + $("#luckysheet-pivotTableFilter-byvalue-btn-contra").click(function () { + let $input = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']"); + $input.each(function(i, e){ + if($(e).is(":checked")){ + $(e).removeAttr("checked"); + $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); + } + else{ + $(e).prop("checked", true); + $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); + } + }); + //天 对应的 月份 + let $month = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox .monthBox"); + $month.each(function(index, event){ + let monthDayAllCheck = true; + let $monthDay = $(event).find(".day input[type='checkbox']"); + $monthDay.each(function(i,e){ + if($(e).is(":checked")){ + + } + else{ + monthDayAllCheck = false; + } + }); + if(monthDayAllCheck){ + $(event).find(".month input[type='checkbox']").prop("checked", true); + $(event).attr("data-check", "true"); + } + else{ + $(event).find(".month input[type='checkbox']").removeAttr("checked"); + $(event).attr("data-check", "false"); + } + }); + //天 对应的 年份 + let $year = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox .yearBox"); + $year.each(function(index, event){ + let yearDayAllCheck = true; + let $yearDay = $(event).find(".day input[type='checkbox']"); + $yearDay.each(function(i,e){ + if($(e).is(":checked")){ + + } + else{ + yearDayAllCheck = false; + } + }); + if(yearDayAllCheck){ + $(event).find(".year input[type='checkbox']").prop("checked", true); + $(event).attr("data-check", "true"); + } + else{ + $(event).find(".year input[type='checkbox']").removeAttr("checked"); + $(event).attr("data-check", "false"); + } + }); + }); + + //清除 + $("#luckysheet-pivotTableFilter-byvalue-btn-clear").click(function () { + $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"); + $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); + }); + + //按照值进行筛选 + $("#luckysheet-pivotTableFilter-byvalue-input").on('input propertychange', function () { + let v = $(this).val().toString(); + $("#luckysheet-pivotTableFilter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(); + if(v != ""){ + let $check = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']"); + $check.each(function(i, e){ + let $p = $(e).parents(".luckysheet-mousedown-cancel"); + if($p.hasClass("day")){ //日期 + let day = $(e).siblings("label").text().toString(); + let month = $(e).parents(".monthBox").find(".month label").text().toString(); + let year = $(e).parents(".yearBox").find(".year label").text().toString(); + let itemV = year + "-" + month + "-" + day; + + if(itemV.indexOf(v) == -1){ + $(e).parents(".day").hide(); + //天 对应的 月份 + let $monthDay = $(e).parents(".dayList").find(".day:visible"); + if($monthDay.length == 0){ + $(e).parents(".monthBox").find(".month").hide(); + } + //天 对应的 年份 + let $yearDay = $(e).parents(".monthList").find(".day:visible"); + if($yearDay.length == 0){ + $(e).parents(".yearBox").find(".year").hide(); + } + } + } + if($p.hasClass("textBox")){ //其它 + let itemV = $(e).siblings("label").text().toString(); + + if(itemV.indexOf(v) == -1){ + $(e).parents(".textBox").hide(); + } + } + }); + } + }); + + $("#luckysheet-pivotTableFilter-bycondition, #luckysheet-pivotTableFilter-byvalue").click(function () { + let $t = $(this); + $t.next().slideToggle(200); + setTimeout(function () { + if ($t.attr("id") == "luckysheet-pivotTableFilter-bycondition" && $("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")) { + if ($("#luckysheet-pivotTableFilter-selected span").text() != "无") { + $("#luckysheet-pivotTableFilter-byvalue").next().slideUp(200); + } + } + + if ($t.is($("#luckysheet-pivotTableFilter-bycondition"))) { + if ($("#luckysheet-pivotTableFilter-bycondition").next().is(":hidden") && $("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")) { + $("#luckysheet-pivotTableFilter-byvalue").next().slideDown(200); + } + } + }, 300); + + }); + + //取消按钮 + $("#luckysheet-pivotTableFilter-cancel").click(function () { + $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); + }); + + $("#luckysheet-pivotTableFilter-selected").click(function () { + let $t = $(this), toffset = $t.offset(), $menu = $("#luckysheet-pivotTableFilter-submenu"); + $menu.hide(); + let winH = $(window).height(), winW = $(window).width(); + let menuW = $menu.width(), menuH = $menu.height(); + let top = toffset.top, left = toffset.left, mheight = winH - toffset.top - 20; + if (toffset.left + menuW > winW) { + left = toffset.left - menuW; + } + + if (toffset.top > winH / 2) { + top = winH - toffset.top; + if (top < 0) { + top = 0; + } + + mheight = toffset.top - 20; + } + + $menu.css({ "top": top, "left": left, "height": mheight }).show(); + clearTimeout(hidefilersubmenu); + }); + + //按条件过滤 + $("#luckysheet-pivotTableFilter-submenu").mouseover(function () { + clearTimeout(hidefilersubmenu); + }).find(".luckysheet-cols-menuitem").click(function (e) { + $("#luckysheet-pivotTableFilter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value", $(this).data("value")); + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide(); + if ($(this).data("type") == "2") { + $("#luckysheet-pivotTableFilter-selected span").data("type", "2"); + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show(); + } + else if ($(this).data("type") == "0") { + $("#luckysheet-pivotTableFilter-selected span").data("type", "0"); + } + else { + $("#luckysheet-pivotTableFilter-selected span").data("type", "1"); + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show(); + //若是日期 改变input type类型为date + if($(this).attr("data-value") == "dateequal" || $(this).attr("data-value") == "datelessthan" || $(this).attr("data-value") == "datemorethan"){ + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type", "date"); + } + else{ + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type", "text"); + } + } + $("#luckysheet-pivotTableFilter-byvalue").next().slideUp(); + $("#luckysheet-pivotTableFilter-submenu").hide(); + }); + + $("#luckysheet-modal-dialog-pivotTable-list").on("click", " .luckysheet-slider-list-item-filter", function (e) { + _this.luckysheetsliderlistitemfilter($(this)); + e.stopPropagation(); + return false; + }); + + $("#luckysheet-modal-dialog-pivotTable-list").on("click", " .luckysheet-slider-list-item-filtered", function (e) { + _this.luckysheetsliderlistclearfilter($(this).next()); + e.stopPropagation(); + return false; + }); + + $("#luckysheet-dialog-pivotTable-range-seleted").click(function () { + $("#luckysheet-modal-dialog-slider-pivot").hide(); + luckysheetsizeauto(); + let $t = $("#luckysheet-data-pivotTable-selection"), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + + $("#luckysheet-data-pivotTable-selection").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 4 }).show(); + + _this.jgridCurrentPivotInput = $("#luckysheet-dialog-pivotTable-range").html(); + $("#luckysheet-pivotTable-range-selection-input").val(_this.jgridCurrentPivotInput); + _this.luckysheet_pivotTable_select_state = true; + }); + + //清除筛选按钮 + $("#luckysheet-pivotTableFilter-initial").click(function () { + $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-slider-list-item-filtered").hide(); + $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").data("rowhidden", ""); + $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); + $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(); + $("#luckysheet-pivotTableFilter-selected span").data("type", "0").data("type", null).text("无"); + + _this.setDatatojsfile("filterparm", null); + _this.celldata = _this.origindata; + + _this.refreshPivotTable(); + }); + + $("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").on("click", ".luckysheet-modal-dialog-slider-config-item-icon", function (e) { + let $t = $(e.target), + $item = $t.closest(".luckysheet-modal-dialog-slider-config-item"), + cindex = $item.data("index"), + toffset = $item.offset(); + let order = $item.data("order"), + orderby = $item.data("orderby"), + stastic = $item.data("stastic"); + + if (order == null) { + order = "default"; + } + + let option = ''; + + $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function (i) { + option += ''; + }); + $("#luckysheet-pivotTable-config-option-orderby").empty().html(option); + + if (orderby == null) { + orderby = "self"; + } + + if (stastic == null) { + stastic = "1"; + } + + $("#luckysheet-pivotTable-config-option-order").val(order).data("index", cindex); + $("#luckysheet-pivotTable-config-option-orderby").val(orderby).data("index", cindex); + $("#luckysheet-pivotTable-config-option-stastic").val(stastic).data("index", cindex); + + mouseclickposition($("#luckysheet-pivotTable-config-option"), toffset.left + $item.outerWidth(), toffset.top - 13, "rightbottom"); + e.stopPropagation(); + return false; + }); + + $("#luckysheet-pivotTable-config-option-order,#luckysheet-pivotTable-config-option-orderby,#luckysheet-pivotTable-config-option-stastic").change(function () { + let $t = $(this), cindex = $t.data("index"); + + $("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + if ($(this).data("index") == cindex) { + $(this).data($t.attr("id").replace("luckysheet-pivotTable-config-option-", ""), $t.val()); + } + }); + + _this.refreshPivotTable(); + }); + + $("#luckysheet-modal-dialog-config-value").on("click", ".luckysheet-modal-dialog-slider-config-item-icon", function (e) { + let $t = $(e.target), + $item = $t.closest(".luckysheet-modal-dialog-slider-config-item"), + cindex = $item.data("index"), + toffset = $item.offset(), + sumtype = $item.data("sumtype"); + + let type = _this.pivot_data_type[cindex.toString()]; + if (sumtype == null) { + if (type == "num") { + sumtype = "SUM"; + } + else { + sumtype = "COUNTA"; + } + } + + let $menu = $("#luckysheet-pivotTable-config-option-sumtype"); + $menu.find(".luckysheet-submenu-arrow").hide(); + $menu.find(".luckysheet-cols-menuitem[sumtype='" + sumtype + "'] .luckysheet-submenu-arrow").css("display", "inline"); + $menu.data("item", $item); + + mouseclickposition($menu, toffset.left + $item.outerWidth(), toffset.top - 13, "rightbottom"); + e.stopPropagation(); + return false; + }); + + $("#luckysheet-pivotTable-config-option-sumtype .luckysheet-cols-menuitem").click(function () { + let $item = $("#luckysheet-pivotTable-config-option-sumtype").data("item"); + let sumtype = $(this).attr("sumtype"); + $item.data("sumtype", $(this).attr("sumtype")); + let name = _this.getSumTypeName(sumtype) + ":" + $item.data("name"); + $item.attr("title", name).find(".luckysheet-modal-dialog-slider-config-item-txt").html(name); + $("#luckysheet-pivotTable-config-option-sumtype").hide(); + _this.refreshPivotTable(); + }); + + $("#luckysheet-modal-dialog-config-filter").on("click", ".luckysheet-modal-dialog-slider-config-item-icon", function (e) { + let $t = $(e.target), + cindex = $t.closest(".luckysheet-modal-dialog-slider-config-item").data("index"); + _this.luckysheetsliderlistitemfilter($("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(cindex).find(".luckysheet-slider-list-item-filter")); + e.stopPropagation(); + return false; + }); + + //确认按钮 + $("#luckysheet-pivotTableFilter-confirm").click(function () { + let $menu = $("#luckysheet-pivotTableFilter-menu"); + let cindex = $menu.data("index"); + + let rowhiddenother = {}; //其它筛选列的隐藏行 + $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").each(function () { + let $t = $(this), rh = $t.data("rowhidden"); + + if($t.data("index") != cindex){ + if (rh == null || rh == "") { + return true; + } + + if(getObjType(rh) == "string"){ + rh = JSON.parse(rh); + } + + for (let r in rh) { + rowhiddenother[r] = 0; + } + } + }); + + let d = _this.origindata; + + let filterdata = {}; + let rowhidden = {}; + let caljs = {}; + + if ($("#luckysheet-pivotTableFilter-bycondition").next().is(":visible") && $("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden") && $("#luckysheet-pivotTableFilter-selected span").data("value") != "null") { + let $t = $("#luckysheet-pivotTableFilter-selected span"); + let type = $t.data("type"), value = $t.data("value"); + + caljs["value"] = value; + caljs["text"] = $t.text(); + + if (type == "0") { + caljs["type"] = "0"; + } + else if (type == "2") { + let $input = $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2 input"); + caljs["type"] = "2"; + caljs["value1"] = $input.eq(0).val(); + caljs["value2"] = $input.eq(1).val(); + } + else { + caljs["type"] = "1"; + caljs["value1"] = $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).find("input").val(); + } + + for (let r = 1; r < d.length; r++) { + if(r in rowhiddenother){ + continue; + } + + if(d[r] == null){ + continue; + } + + let cell = d[r][cindex]; + + if (value == "cellnull") { //单元格为空 + if(cell != null && !isRealNull(cell.v)){ + rowhidden[r] = 0; + } + } + else if (value == "cellnonull") { //单元格有数据 + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + } + else if (value == "textinclude") { //文本包含 + let value1 = caljs["value1"]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(cell.m.indexOf(value1) == -1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textnotinclude") { //文本不包含 + let value1 = caljs["value1"]; + + if(cell == null || isRealNull(cell.v)){ + + } + else{ + if(cell.m.indexOf(value1) > -1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textstart") { //文本开头为 + let value1 = caljs["value1"], valuelen = value1.length; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(cell.m.substr(0, valuelen) != value1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textend") { //文本结尾为 + let value1 = caljs["value1"], valuelen = value1.length; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(valuelen > cell.m.length || cell.m.substr(cell.m.length - valuelen, valuelen) != value1){ + rowhidden[r] = 0; + } + } + } + else if (value == "textequal") { //文本等于 + let value1 = caljs["value1"]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else{ + if(cell.m != value1){ + rowhidden[r] = 0; + } + } + } + else if (value == "dateequal") { //日期等于 + let value1 = genarate(caljs["value1"])[2]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "d"){ + if(parseInt(cell.v) != value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "datelessthan") { //日期早于 + let value1 = genarate(caljs["value1"])[2]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "d"){ + if(parseInt(cell.v) >= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "datemorethan") { //日期晚于 + let value1 = genarate(caljs["value1"])[2]; + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "d"){ + if(parseInt(cell.v) <= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "morethan") { //大于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v <= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "moreequalthan") { //大于等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v < value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "lessthan") { //小于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v >= value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "lessequalthan") { //小于等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v > value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "equal") { //等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v != value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "noequal") { //不等于 + let value1 = parseFloat(caljs["value1"]); + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v == value1){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "include") { //介于 + let value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); + + let min, max; + if(value1 < value2){ + min = value1; + max = value2; + } + else{ + max = value1; + min = value2; + } + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v < min || cell.v > max){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + else if (value == "noinclude") { //不在其中 + let value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); + + let min, max; + if(value1 < value2){ + min = value1; + max = value2; + } + else{ + max = value1; + min = value2; + } + + if(cell == null || isRealNull(cell.v)){ + rowhidden[r] = 0; + } + else if(cell.ct != null && cell.ct.t == "n"){ + if(cell.v >= min && cell.v <= max){ + rowhidden[r] = 0; + } + } + else{ + rowhidden[r] = 0; + } + } + } + } + else { + $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(i, e){ + if($(e).is(":visible") && $(e).is(":checked")){ + return true; + } + + if($(e).closest(".day").length > 0){ + let day = $(e).siblings("label").text(); + if(Number(day) < 10){ + day = "0" + day; + } + + let month = $(e).closest(".monthBox").find(".month label").text().replace("月", ""); + if(Number(month) < 10){ + month = "0" + month; + } + + let year = $(e).closest(".yearBox").find(".year label").text().replace("年", ""); + + let itemV = "日期格式#$$$#" + year + "-" + month + "-" + day; + + filterdata[itemV] = "1"; + } + + if($(e).closest(".textBox").length > 0){ + let itemV = $(e).closest(".textBox").data("filter"); + + filterdata[itemV] = "1"; + } + }) + + for (let r = 1; r < d.length; r++) { + if(r in rowhiddenother){ + continue; + } + + if(d[r] == null){ + continue; + } + + let cell = d[r][cindex]; + + let value; + if(cell == null || isRealNull(cell.v)){ + value = "null#$$$#null"; + } + else if(cell.ct != null && cell.ct.t == "d"){ + let fmt = update("YYYY-MM-DD", cell.v); + value = "日期格式#$$$#" + fmt; + } + else{ + value = cell.v + "#$$$#" + cell.m; + } + + if(value in filterdata){ + rowhidden[r] = 0; + } + } + } + + let $top = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(cindex); + if ($("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length < $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible").length || $("#luckysheet-pivotTableFilter-byvalue-input").val().length > 0 || ($("#luckysheet-pivotTableFilter-bycondition").next().is(":visible") && $("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden") && $("#luckysheet-pivotTableFilter-selected span").data("value") != "null")) { + $top.data("rowhidden", JSON.stringify(rowhidden)).find(".luckysheet-slider-list-item-filtered").show(); + _this.setDatatojsfile("rowhidden", rowhidden, cindex); + + if (caljs != null) { + $top.data("byconditionvalue", caljs["value"]).data("byconditiontype", caljs["type"]).data("byconditiontext", caljs["text"]); + + if (caljs["value1"] != null) { + $top.data("byconditionvalue1", caljs["value1"]); + } + + if (caljs["value2"] != null) { + $top.data("byconditionvalue2", caljs["value2"]); + } + + _this.setDatatojsfile("caljs", caljs, cindex); + } + } + else { + $top.data("rowhidden", "").find(".luckysheet-slider-list-item-filtered").hide(); + _this.setDatatojsfile("rowhidden", null, cindex); + } + + let newdata = []; + for (let i = 0; i < d.length; i++) { + if(i in rowhidden || i in rowhiddenother){ + continue; + } + + newdata.push([].concat(d[i])); + } + + _this.celldata = newdata; + _this.refreshPivotTable(); + $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); + + cleargridelement(); + }); + + $("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn, #luckysheet-data-pivotTable-selection .luckysheet-modal-dialog-title-close").click(function () { + $("#luckysheet-modal-dialog-slider-pivot").show(); + luckysheetsizeauto(); + $("#luckysheet-cell-main .luckysheet-pivotTable-selection-set div").show(); + + $("#luckysheet-data-pivotTable-selection").hide(); + + sheetmanage.changeSheetExec(_this.pivotSheetIndex); + + _this.luckysheet_pivotTable_select_state = false; + + cleargridelement(); + }); + + $("#luckysheet-pivotTable-selection-confirm").click(function () { + let $input = $("#luckysheet-pivotTable-range-selection-input"), val = $input.val(); + + if ($.trim(val).length == 0 || $.trim(val).toUpperCase() == _this.jgridCurrentPivotInput.toUpperCase()) { + $input.val(_this.jgridCurrentPivotInput); + $("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn").click(); + return; + } + else { + let val1 = val.split("!"); + let sheettxt = "", rangetxt = "", sheetIndex = -1; + + if (val1.length > 1) { + sheettxt = val1[0]; + rangetxt = val1[1]; + + for (let i in Store.luckysheetfile) { + if (sheettxt == Store.luckysheetfile[i].name) { + sheetIndex = Store.luckysheetfile[i].index; + break; + } + } + + if (sheetIndex == -1) { + sheetIndex = 0; + } + } + else { + let index = getSheetIndex(Store.currentSheetIndex); + sheettxt = Store.luckysheetfile[index].name; + sheetIndex = Store.luckysheetfile[index].index; + rangetxt = val1[0]; + } + + if(Store.luckysheetfile[getSheetIndex(sheetIndex)].isPivotTable){ + if(isEditMode()){ + alert("不可选择数据透视表为源数据!"); + } + else{ + tooltip.info("选择失败", "不可选择数据透视表为源数据!"); + } + $input.val(_this.jgridCurrentPivotInput); + return; + } + + if (rangetxt.indexOf(":") == -1) { + if(isEditMode()){ + alert("选择失败, 输入范围错误!"); + } + else{ + tooltip.info("选择失败", "输入范围错误!"); + } + $input.val(_this.jgridCurrentPivotInput); + return; + } + + rangetxt = rangetxt.split(":"); + let row = [], col = []; + + row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; + row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; + + if (row[0] > row[1]) { + if(isEditMode()){ + alert("选择失败, 输入范围错误!"); + } + else{ + tooltip.info("选择失败", "输入范围错误!"); + } + $input.val(_this.jgridCurrentPivotInput); + return; + } + + col[0] = ABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); + col[1] = ABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); + + if (col[0] > col[1]) { + if(isEditMode()){ + alert("选择失败, 输入范围错误!"); + } + else{ + tooltip.info("选择失败", "输入范围错误!"); + } + $input.val(_this.jgridCurrentPivotInput); + return; + } + sheetmanage.changeSheetExec(_this.pivotSheetIndex); + + _this.setDatatojsfile("pivot_select_save", { "row": row, "column": col }); + _this.setDatatojsfile("pivotDataSheetIndex", sheetIndex); + + _this.getCellData(_this.pivotSheetIndex, sheetIndex, { "row": row, "column": col }); + + _this.initialPivotManage(); + + $("#luckysheet-dialog-pivotTable-range").html(val); + + $("#luckysheet-modal-dialog-slider-pivot").show(); + + $("#luckysheet-data-pivotTable-selection").hide(); + + _this.luckysheet_pivotTable_select_state = false; + + _this.refreshPivotTable(); + + luckysheetsizeauto(); + + cleargridelement(); + } + }); + + $("#luckysheet-modal-dialog-slider-pivot").on("mousedown", ".luckysheet-slider-list-item-name, .luckysheet-modal-dialog-slider-config-item-txt", function (e) { + let $cur = $(e.target); + _this.movestate = true; + _this.movesave.obj = $cur.parent(); + _this.movesave.name = $cur.data("name"); + _this.movesave.containerid = $cur.parent().parent().attr("id"); + _this.movesave.index = $cur.data("index"); + + if ($("#luckysheet-modal-dialog-slider-pivot-move").length == 0) { + $("body").append('
' + _this.movesave.name + '
'); + } + + _this.movesave.width = $("#luckysheet-modal-dialog-slider-pivot-move").outerWidth(); + _this.movesave.height = $("#luckysheet-modal-dialog-slider-pivot-move").outerHeight(); + + $("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor", "default"); + }); + + $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").mousemove(function (e) { + if (_this.movestate) { + if (_this.moveitemposition.length == 0) { + _this.moveitemposition = [0]; + + $(this).find(".luckysheet-modal-dialog-slider-config-item").each(function (i) { + let $t = $(this), h = $t.outerHeight(); + _this.moveitemposition.push(_this.moveitemposition[i] + h + 2); + }); + $(this).append('
'); + } + + $("#luckysheet-modal-dialog-slider-pivot-move").css({ "background": "#FD8585", "color": "#fff", "border": "1px solid #FD7070" }); + let x = event.pageX, y = event.pageY, $container = $(this); + let curtop = y - $container.offset().top + $container.scrollTop(); + let position = _this.moveitemposition; + let row_index = luckysheet_searcharray(position, curtop); + + if (row_index == -1) { + $("#luckysheet-modal-dialog-config-order-help").css({ "top": position[position.length - 1] }); + } + else if ((curtop - position[row_index - 1]) > (position[row_index] - position[row_index - 1]) / 2) { + $("#luckysheet-modal-dialog-config-order-help").css({ "top": position[row_index] }); + } + else { + $("#luckysheet-modal-dialog-config-order-help").css({ "top": position[row_index - 1] }); + } + } + }).mouseleave(function () { + if (_this.movestate) { + $("#luckysheet-modal-dialog-slider-pivot-move").css({ "background": "#fff", "color": "#000", "border": "1px dotted #000" }); + _this.moveitemposition = []; + $("#luckysheet-modal-dialog-config-order-help").remove(); + } + }).mouseup(function (e) { + if (_this.movestate) { + let $t = $(this); + let itemHTML; + + if (_this.movesave.containerid == $t.attr("id")) { + itemHTML = _this.movesave.obj.clone(); + } + else { + let name = _this.movesave.name, + sumtype = "", + nameindex = ""; + + if ($t.attr("id") == "luckysheet-modal-dialog-config-value") { + let type = _this.pivot_data_type[_this.movesave.index.toString()]; + + if (type == "num") { + name = "求和:" + name; + sumtype = "data-sumtype='SUM'"; + nameindex = "data-nameindex='0'"; + } + else { + name = "计数:" + name; + sumtype = "data-sumtype='COUNTA'"; + nameindex = "data-nameindex='0'"; + } + + $("#luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + if ($(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text() == name) { + let ni = parseFloat($(this).data("nameindex")) + 1; + name = name + ni.toString(); + $(this).data("nameindex", ni); + return false; + } + }); + } + + itemHTML = '
' + name + '
'; + } + + let x = event.pageX, y = event.pageY, $container = $(this); + let curtop = y - $container.offset().top + $container.scrollTop(); + let position = _this.moveitemposition; + let row_index = luckysheet_searcharray(position, curtop); + + if ((_this.movesave.containerid == "luckysheet-modal-dialog-pivotTable-list") || (_this.movesave.containerid == "luckysheet-modal-dialog-config-value" && _this.movesave.containerid != $t.attr("id"))) { + $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + if ($(this).data("index") == _this.movesave.index) { + $(this).remove(); + } + }); + } + + if (row_index == -1) { + if ($t.find(".luckysheet-modal-dialog-slider-config-item").length == 0) { + $t.append(itemHTML); + } + else { + $t.find(".luckysheet-modal-dialog-slider-config-item").last().after(itemHTML); + } + + } + else if ((curtop - position[row_index - 1]) > (position[row_index] - position[row_index - 1]) / 2) { + $t.find(".luckysheet-modal-dialog-slider-config-item").eq(row_index - 1).after(itemHTML); + } + else { + $t.find(".luckysheet-modal-dialog-slider-config-item").eq(row_index - 1).before(itemHTML); + } + + if (_this.movesave.containerid == "luckysheet-modal-dialog-pivotTable-list") { + + } + else if (_this.movesave.containerid == "luckysheet-modal-dialog-config-value" && _this.movesave.containerid != $t.attr("id")) { + + } + else { + _this.movesave.obj.remove(); + } + + $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { + let $seleted = $(this).find(".luckysheet-slider-list-item-selected"); + if ($(this).data("index") == _this.movesave.index && $seleted.find("i").length == 0) { + $seleted.append(''); + } + }); + + _this.refreshPivotTable(); + + $("#luckysheet-modal-dialog-slider-pivot-move").remove(); + _this.movestate = false; + $("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor", "default"); + _this.moveitemposition = []; + $("#luckysheet-modal-dialog-config-order-help").remove(); + _this.showvaluecolrow(); + e.stopPropagation(); + } + }); + + $("#luckysheet-modal-dialog-pivotTable-list").on("click", ".luckysheet-slider-list-item-selected", function () { + let $t = $(this), + $item = $t.parent(), + index = $item.data("index"), + name = $item.data("name"); + + if ($t.find("i").length == 0) { + $t.append(''); + + let type = _this.pivot_data_type[index.toString()], + itemHTML; + + if (type == "num") { + itemHTML = '
求和:' + name + '
'; + $("#luckysheet-modal-dialog-config-value").append(itemHTML); + } + else { + itemHTML = '
' + name + '
'; + + let $column = $("#luckysheet-modal-dialog-config-column"), + $row = $("#luckysheet-modal-dialog-config-row"); + let columnitem = $column.find(".luckysheet-modal-dialog-slider-config-item"), + rowitem = $row.find(".luckysheet-modal-dialog-slider-config-item"); + + if (columnitem.length < 2) { + $column.append(itemHTML); + } + else if (rowitem.length < 2) { + $row.append(itemHTML); + } + else { + $column.append(itemHTML); + } + } + } + else { + $t.find("i").remove(); + $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + if ($(this).data("index") == index) { + if ($(this).parent().attr("id") == "luckysheet-modal-dialog-config-value") { + _this.resetOrderby($(this)); + } + $(this).remove(); + } + }); + } + + _this.refreshPivotTable(); + _this.showvaluecolrow(); + }); + + $("#luckysheet-dialog-pivotTable-clearitem").click(function () { + $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { + $(this).remove(); + }); + + $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { + $(this).find(".luckysheet-slider-list-item-selected").find("i").remove(); + }); + + _this.refreshPivotTable(); + _this.showvaluecolrow(); + }); + } + + if (restore == null) { + restore = false; + } + + if (_this.celldata.length <= 1 && _this.celldata[0].length <= 1) { + if(isEditMode()){ + alert("请扩大选择的数据范围!"); + } + else{ + tooltip.info("提示", "请扩大选择的数据范围!"); + } + } + + let selecteditem = "", + selecteditemIndex = 1, + selecteditemtest = {}, + selecteditemNullIndex = 1; + + for (let i = 0; i < _this.celldata[0].length; i++) { + let name; + if(!!_this.celldata[0][i] && !!_this.celldata[0][i]["m"]){ + name = _this.celldata[0][i]["m"]; + } + else{ + name = getcellvalue(0, i, _this.celldata); + } + + if(name != null){ + name = name.toString(); + } + + if (name == null || $.trim(name.toString()).length == 0) { + name = "列 " + selecteditemNullIndex; + } + selecteditemNullIndex++ + + if (name in selecteditemtest) { + name = name + selecteditemIndex++; + if (name in selecteditemtest) { + name = name + selecteditemIndex++; + if (name in selecteditemtest) { + name = name + selecteditemIndex++; + } + } + } + selecteditemtest[name] = 1; + + let dataother = "", style = ""; + + if (restore && _this.filterparm != null) { + if (_this.filterparm[i.toString()] != null) { + let itemset = _this.filterparm[i.toString()]; + if (itemset.rowhidden != null) { + dataother += "data-rowhidden='" + JSON.stringify(itemset.rowhidden) + "'"; + } + + if (itemset.selected != null) { + dataother += "data-selected='" + JSON.stringify(itemset.selected) + "'"; + } + + if (itemset.caljs != null) { + let caljsset = itemset.caljs; + if (caljsset.value != null) { + dataother += "data-byconditionvalue='" + caljsset.value + "'"; + } + + if (caljsset.type != null) { + dataother += "data-byconditiontype='" + caljsset.type + "'"; + } + + if (caljsset.text != null) { + dataother += "data-byconditiontext='" + caljsset.text + "'"; + } + + if (caljsset.value1 != null) { + dataother += "data-byconditionvalue1='" + caljsset.value1 + "'"; + } + + if (caljsset.value2 != null) { + dataother += "data-byconditionvalue2='" + caljsset.value2 + "'"; + } + + } + } + } + + if (dataother.length > 0) { + style = "display:block;"; + } + + selecteditem += '
' + name + '
'; + } + $("#luckysheet-modal-dialog-pivotTable-list").html(selecteditem); + + $("#luckysheetpivottablevaluecolrowshow").hide(); + $("#luckysheetpivottablevaluecolrow").prop("checked", true); + $("#luckysheetpivottablevaluecolrow1").prop("checked", false); + + $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").empty(); + + if (restore) { + if (_this.filter != null && _this.filter.length > 0) { + for (let i = 0; i < _this.filter.length; i++) { + let item = _this.filter[i]; + + let itemHTML = '
' + item.name + '
'; + + $("#luckysheet-modal-dialog-config-filter").append(itemHTML); + + let $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); + if ($seleted.find("i").length == 0) { + $seleted.append(''); + } + } + } + + if (_this.row != null && _this.row.length > 0) { + for (let i = 0; i < _this.row.length; i++) { + let item = _this.row[i]; + let otherset = ""; + + if (item.order != null) { + otherset += "data-order = '" + item.order + "'"; + } + + if (item.orderby != null) { + otherset += "data-orderby = '" + item.orderby + "'"; + } + + if (item.order != null) { + otherset += "data-stastic = '" + item.stastic + "'"; + } + + let itemHTML = '
' + item.name + '
'; + + $("#luckysheet-modal-dialog-config-row").append(itemHTML); + + let $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); + if ($seleted.find("i").length == 0) { + $seleted.append(''); + } + } + } + + if (_this.column != null && _this.column.length > 0) { + for (let i = 0; i < _this.column.length; i++) { + let item = _this.column[i]; + let otherset = ""; + + if (item.order != null) { + otherset += "data-order = '" + item.order + "'"; + } + + if (item.orderby != null) { + otherset += "data-orderby = '" + item.orderby + "'"; + } + + if (item.order != null) { + otherset += "data-stastic = '" + item.stastic + "'"; + } + + let itemHTML = '
' + item.name + '
'; + + $("#luckysheet-modal-dialog-config-column").append(itemHTML); + + let $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); + if ($seleted.find("i").length == 0) { + $seleted.append(''); + } + } + } + + if (_this.values != null && _this.values.length > 0) { + for (let i = 0; i < _this.values.length; i++) { + let item = _this.values[i]; + let otherset = ""; + + if (item.sumtype != null) { + otherset += "data-sumtype = '" + item.sumtype + "'"; + } + + if (item.nameindex != null) { + otherset += "data-nameindex = '" + item.nameindex + "'"; + } + + let itemHTML = '
' + _this.getSumTypeName(item.sumtype) + ":" + item.name + '
'; + + $("#luckysheet-modal-dialog-config-value").append(itemHTML); + + let $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); + if ($seleted.find("i").length == 0) { + $seleted.append(''); + } + } + + if (_this.values.length >= 2) { + $("#luckysheetpivottablevaluecolrowshow").show(); + if (_this.showType == "column") { + $("#luckysheetpivottablevaluecolrow").prop("checked", true); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"); + + $("#luckysheetpivottablevaluecolrow1").prop("checked", false); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active"); + } + else { + $("#luckysheetpivottablevaluecolrow1").prop("checked", true); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"); + + $("#luckysheetpivottablevaluecolrow").prop("checked", false); + $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active"); + } + } + } + } + + $("#luckysheet-dialog-pivotTable-range").html(getRangetxt(_this.pivotDataSheetIndex, _this.pivot_select_save)); + $("#luckysheet-modal-dialog-slider-pivot").show(); + luckysheetsizeauto(); + }, + getComposeArray: function (data) { + if (data.length == 0) { + return []; + } + + let ret = []; + for (let i = 0; i < data.length; i++) { + let name = ""; + for (let x = 0; x <= i; x++) { + if(!!data[x] && !!data[x]["m"]){ + name += data[x]["m"]; + } + else{ + name += getcellvalue(x, null, data); + } + } + + ret.push(name); + } + + return ret; + }, + getnameArray: function (data, field) { + if (data.length == 0) { + return []; + } + + if (field.length == 0) { + return []; + } + + let ret = []; + for (let i = 0; i < field.length; i++) { + let c_value; + if(!!data[field[i].index] && !!data[field[i].index]["m"]){ + c_value = data[field[i].index]["m"]; + } + else{ + c_value = getcellvalue(field[i].index, null, data); + } + + ret.push(c_value); + } + + return ret; + }, + getTitleFromGroup: function (group, config, dataposition) { + let _this = this; + let orderbygroup = _this.orderbygroup(group, config, dataposition); + + return _this.generategrouparraymain(orderbygroup, config); + }, + orderbygroup: function (group, config, dataposition) { + let _this = this; + + let stackset = []; + if (group.length == 0) { + return []; + } + stackset = group; + + let d = null, + alllength = stackset.length, + alllengthInital = stackset.length, + a = 0; + + while (alllength != 0) { + d = stackset[a++]; + alllength--; + + if (d.children != null && d.children.length > 0) { + d.children = _this.orderbygroupchildren(d.children, config[d.index].orderby, config[d.index].order, dataposition); + + for (let i = 0; i < d.children.length; i++) { + stackset.push(d.children[i]); + alllength++; + } + } + } + + return group.splice(0, alllengthInital); + }, + orderbygroupchildren: function (childrens, orderby, order, dataposition) { + if (childrens.length == 0) { + return []; + } + + let isAsc = false; + if (order == null || order == "asc") { + isAsc = true; + } + + let a = function (x, y) { + let f = null, s = null; + + if (orderby == "self" || orderby == null) { + if(x.name == null){ + f = "(空白)"; + } + else{ + f = x.name.toString(); + } + + if(y.name == null){ + s = "(空白)"; + } + else{ + s = y.name.toString(); + } + + if (isdatetime(f) && isdatetime(s)) { + return diff(f, s); + } + } + else { + f = parseFloat(dataposition[x.orderby].result); + s = parseFloat(dataposition[y.orderby].result); + } + + if (!isNaN(f) && !isNaN(s)) { + return numeral(f).value() - numeral(s).value(); + } + else if(isNaN(f) && isNaN(s)){ + return f.localeCompare(s); + } + else if (isNaN(f)) { + return 1; + } + else if (isNaN(s)) { + return -1; + } + } + + let d = function (x, y) { + let f = null, s = null; + + if (orderby == "self" || orderby == null) { + if(x.name == null){ + f = "(空白)"; + } + else{ + f = x.name.toString(); + } + + if(y.name == null){ + s = "(空白)"; + } + else{ + s = y.name.toString(); + } + + if (isdatetime(f) && isdatetime(s)) { + return diff(f, s); + } + } + else { + f = parseFloat(dataposition[x.orderby].result); + s = parseFloat(dataposition[y.orderby].result); + } + + if (!isNaN(f) && !isNaN(s)) { + return numeral(s).value() - numeral(f).value(); + } + else if(isNaN(f) && isNaN(s)){ + return s.localeCompare(f); + } + else if (isNaN(f)) { + return -1; + } + else if (isNaN(s)) { + return 1; + } + } + + if (isAsc) { + return childrens.sort(a); + } + else { + return childrens.sort(d); + } + }, + generategroupaddstatic: function (arr, name) { + let stasticarr = []; + + for (let a = 0; a < arr[0].length; a++) { + if (a == 0) { + if (name == "总计") { + stasticarr.push(name); + } + else { + stasticarr.push({ "name": name, "issum": true }); + } + + } + else { + stasticarr.push(""); + } + } + + return stasticarr; + }, + generategrouparraymain: function (group, config) { + let _this = this; + + //生成数组 + let ret = []; + for (let i = 0; i < group.length; i++) { + let name = group[i].name; + let arr = _this.generategrouparray(group[i].children, config, 1); + + if (config[0].stastic == "1" || config[0].stastic == null) { + arr.push(_this.generategroupaddstatic(arr, name)); + } + + ret = ret.concat(arr); + } + + return ret; + }, + generategrouparray: function (group, config, level) { + let _this = this; + + let ret = []; + for (let i = 0; i < group.length; i++) { + let name = group[i].name; + let arr; + + if (group[i].children == 0 || group[i].children.length == 0) { + arr = [name]; + ret.push(arr); + } + else { + arr = _this.generategrouparray(group[i].children, config, level + 1); + + for (let a = 0; a < arr.length; a++) { + arr[a].unshift(name); + } + + if (config[level].stastic == "1" || config[level].stastic == null) { + arr.push(_this.generategroupaddstatic(arr, name)); + } + + ret = ret.concat(arr); + } + } + + return ret; + }, + addStatisticsData: function (dataposition, valueobj, indicator, d_value) { + if (dataposition[indicator] == null) { + dataposition[indicator] = { + "data": [], + "count": 0, + "max": -Infinity, + "min": Infinity, + "counta": 0, + "countunique": 0, + "countuniquedata": {}, + "sum": 0, + "digitaldata": [], + "sumtype": valueobj.sumtype, + "index": valueobj.index, + "name": valueobj.fullname, + "acc": 0 + }; + } + + if (isdatatypemulti(d_value)["num"] === true) { + let num = numFormat(d_value); + dataposition[indicator]["digitaldata"].push(num); + dataposition[indicator]["count"] += 1; + dataposition[indicator]["sum"] += num; + + if (num > dataposition[indicator]["max"]) { + dataposition[indicator]["max"] = num; + } + + if (num < dataposition[indicator]["min"]) { + dataposition[indicator]["min"] = num; + } + + let newAcc = numfloatlen(num); + + if(newAcc > dataposition[indicator]["acc"]){ + dataposition[indicator]["acc"] = newAcc; + } + } + + if (d_value != "") { + dataposition[indicator]["data"].push(d_value); + dataposition[indicator]["counta"] += 1; + if (!(d_value in dataposition[indicator]["countuniquedata"])) { + dataposition[indicator]["countuniquedata"][d_value] = 1; + dataposition[indicator]["countunique"] += 1; + } + } + }, + dataHandler: function (column, row, values, showType, celldata) { + //column:[{"index":1, name:"列1", "order":"asc", "orderby":"self/0/1/2", "stastic":"0/1"}] + //row:[{"index":1, name:"列3", "order":"asc", "orderby":"self/0/1/2", "stastic":"0/1"}] + //values:[{"index":1, "sumtype":"SUM/COUNT/COUNTA/COUNTUNIQUE/AVERAGE/MAX/MIN/MEDIAN/PRODUCT/STDEV/STDEVP/let/VARP", "name":"求和:fyc"}] + let _this = this; + + if (showType == null) { + showType = "column"; + } + + if ((column.length == 0 && row.length == 0 && values.length == 0) || celldata.length == 0) { + _this.pivotDatas = []; + return []; + } + + //生成透视表值及定位 + let dataposition = {}, + data = celldata, + datarowtitle = [], + datarowtitlegroup = [], + datarowposition = {}, + datarowposition_i = 0, + datacoltitle = [], + datacoltitlegroup = [], + datacolposition = {}, + datacolposition_i = 0; + + for (let i = 1; i < data.length; i++) { + let d = data[i]; + let groupbyrowtxt = "", + groupbycoltxt = "", + rowtxt = "", + rowtitle = [], + rowtitlename = [], + coltxt = "", + coltitle = [], + coltitlename = []; + + //["四川", "成都", "邛崃"] 转换为 ["四川", "四川成都", "四川成都邛崃"] + rowtitlename = _this.getnameArray(d, row); + coltitlename = _this.getnameArray(d, column); + + rowtitle = _this.getComposeArray(rowtitlename); + coltitle = _this.getComposeArray(coltitlename); + + if (rowtitle.length > 0) { + rowtitle.unshift("总计"); + } + + if (coltitle.length > 0) { + coltitle.unshift("总计"); + } + + let curentLevelobj_row = datarowposition, + curentLevelarr_row = datarowtitlegroup; + + for (let r = 0; r < rowtitle.length; r++) { + let item = rowtitle[r], name = r == 0 ? "总计" : rowtitlename[r - 1];//修改 + + if (curentLevelobj_row[r.toString()] != null && curentLevelobj_row[r.toString()][item] != null) {//修改 + curentLevelarr_row = curentLevelarr_row[curentLevelobj_row[r.toString()][item]].children; + } + else { + let orderby = r == 0 ? "self" : ((row[r - 1].orderby == "self" || row[r - 1].orderby == null) ? item : (showType == "column" ? item + values[parseInt(row[r - 1].orderby)].fullname : item + "总计")); + + if(name == null){ + name = "(空白)"; + } + + curentLevelarr_row.push({ "name": name, "fullname": item, "index": r, "orderby": orderby, "children": [] }); + + if (curentLevelobj_row[r.toString()] == null) { + curentLevelobj_row[r.toString()] = {}; + } + + if (curentLevelobj_row[r.toString()][item] == null) { + curentLevelobj_row[r.toString()][item] = curentLevelarr_row.length - 1; + } + + curentLevelarr_row = curentLevelarr_row[curentLevelarr_row.length - 1].children; + } + } + + let curentLevelobj_col = datacolposition, + curentLevelarr_col = datacoltitlegroup; + + for (let r = 0; r < coltitle.length; r++) { + let item = coltitle[r], name = r == 0 ? "总计" : coltitlename[r - 1]; + + if (curentLevelobj_col[r.toString()] != null && curentLevelobj_col[r.toString()][item] != null) { + curentLevelarr_col = curentLevelarr_col[curentLevelobj_col[r.toString()][item]].children; + } + else { + let orderby = r == 0 ? "self" : ((column[r - 1].orderby == "self" || column[r - 1].orderby == null) ? item : (showType == "column" ? "总计" + item : values[parseInt(column[r - 1].orderby)].fullname + item)); + + if(name == null){ + name = "(空白)"; + } + + curentLevelarr_col.push({ "name": name, "fullname": item, "index": r, "orderby": orderby, "children": [] }); + + if (curentLevelobj_col[r.toString()] == null) { + curentLevelobj_col[r.toString()] = {}; + } + + if (curentLevelobj_col[r.toString()][item] == null) { + curentLevelobj_col[r.toString()][item] = curentLevelarr_col.length - 1; + } + + curentLevelarr_col = curentLevelarr_col[curentLevelarr_col.length - 1].children; + } + } + + let v_str = ""; + for (let v = 0; v < values.length; v++) { + let d_value = getcellvalue(values[v].index, null, d); + + let coltitle_c = [].concat(coltitle), rowtitle_c = [].concat(rowtitle); + if (showType == "column") { + if (coltitle_c.length > 0) { + coltitle_c.push("") + coltitle_c = coltitle_c.join(values[v].fullname + "|||").split("|||").slice(0, coltitle_c.length - 1); + } + else { + coltitle_c.push(values[v].fullname); + } + } + else { + if (rowtitle_c.length > 0) { + rowtitle_c.push("") + rowtitle_c = rowtitle_c.join(values[v].fullname + "|||").split("|||").slice(0, rowtitle_c.length - 1); + } + else { + rowtitle_c.push(values[v].fullname); + } + } + + if (coltitle_c.length == 0) { + coltitle_c.push(""); + } + + if (rowtitle_c.length == 0) { + rowtitle_c.push(""); + } + + for (let r = 0; r < rowtitle_c.length; r++) { + for (let c = 0; c < coltitle_c.length; c++) { + let indicator = rowtitle_c[r] + coltitle_c[c]; + _this.addStatisticsData(dataposition, values[v], indicator, d_value); + } + } + } + } + + //计算值列 + //SUM/COUNT/COUNTA/COUNTUNIQUE/AVERAGE/MAX/MIN/MEDIAN/PRODUCT/STDEV/STDEVP/let/VARP + for (let indicator in dataposition) { + let json = dataposition[indicator]; + + if (json.sumtype == "SUM") { + json.result = json.sum; + } + else if (json.sumtype == "COUNT") { + json.result = json.count; + } + else if (json.sumtype == "COUNTA") { + json.result = json.counta; + } + else if (json.sumtype == "COUNTUNIQUE") { + json.result = json.countunique; + } + else if (json.sumtype == "AVERAGE") { + json.result = numFormat(json.sum / json.count); + } + else if (json.sumtype == "MAX") { + json.result = json.max; + } + else if (json.sumtype == "MIN") { + json.result = json.min; + } + else if (json.sumtype == "MEDIAN") { + let numArr = json.digitaldata.sort(function(a, b){ return a - b }); + let numLen = numArr.length; + let numindex = parseInt(numLen / 2); + + if(numLen % 2 == 0){ + json.result = (numArr[numindex - 1] + numArr[numindex]) / 2; + } + else{ + json.result = numArr[numindex]; + } + } + else if (json.sumtype == "PRODUCT") { + json.result = eval(json.digitaldata.join("*")); + } + else if (json.sumtype == "STDEV") { + let mean = json.sum / json.count; + json.result = analysis.STDEV(mean, json.digitaldata); + } + else if (json.sumtype == "STDEVP") { + let mean = json.sum / json.count; + json.result = analysis.STDEVP(mean, json.digitaldata); + } + else if (json.sumtype == "let") { + let mean = json.sum / json.count; + json.result = analysis.let(mean, json.digitaldata); + } + else if (json.sumtype == "VARP") { + let mean = json.sum / json.count; + json.result = analysis.VARP(mean, json.digitaldata); + } + + let newAcc = numfloatlen(json.result); + if(newAcc > json.acc){ + json.acc = newAcc; + } + + json.result = numFormat(json.result, json.acc); + } + + datarowtitle = _this.getTitleFromGroup(datarowtitlegroup, row, dataposition); + datacoltitle = _this.getTitleFromGroup(datacoltitlegroup, column, dataposition); + + //加入值到列/行形成新的表头 + if (showType == "column") { + if (datacoltitle.length > 0 && datacoltitle[0].length > 0) { + datacoltitle = _this.addValuesToTitle(datacoltitle, values); + } + else { + for (let v = 0; v < values.length; v++) { + datacoltitle.push([values[v].fullname]); + } + } + } + else { + if (datarowtitle.length > 0 && datarowtitle[0].length > 0) { + datarowtitle = _this.addValuesToTitle(datarowtitle, values); + } + else { + for (let v = 0; v < values.length; v++) { + datarowtitle.push([values[v].fullname]); + } + } + } + + let datacoltitle_index = datacoltitle; + datacoltitle = luckysheetArray.transpose(datacoltitle); + + let valuenslen = values.length == 0 ? 0 : 1; + let rowLen = (datacoltitle.length == 0 ? valuenslen : datacoltitle.length) + (datarowtitle.length == 0 ? valuenslen : datarowtitle.length), colLen = (datacoltitle.length == 0 ? valuenslen : datacoltitle[0].length) + (datarowtitle.length == 0 ? valuenslen : datarowtitle[0].length); + + let rowOver = datacoltitle.length, colOver = datarowtitle.length == 0 ? 0 : datarowtitle[0].length; + + let retdata = []; + for (let r = 0; r < rowLen; r++) { + retdata[r] = new Array(colLen); + + for (let c = 0; c < colLen; c++) { + let drt = datarowtitle[r - rowOver]; + + if (r < rowOver && c < colOver) { + //空白列头 + retdata[r][c] = ""; + } + else if (r < rowOver && c >= colOver) { + //列标题 + if (datacoltitle[r] != null) { + if (getObjType(datacoltitle[r][c - colOver]) == "object") { + retdata[r][c] = datacoltitle[r][c - colOver].name + "总计"; + } + else { + retdata[r][c] = datacoltitle[r][c - colOver]; + } + } + else { + retdata[r][c] = ""; + } + } + else if (r >= rowOver && c < colOver) { + //行标题 + if (drt != null) { + if (getObjType(drt[c]) == "object") { + retdata[r][c] = drt[c].name + "总计"; + } + else { + retdata[r][c] = drt[c]; + } + } + else { + retdata[r][c] = ""; + } + } + else { + //单元格内容 + let prefix = ""; + if (drt != null) { + if (!(drt instanceof Array) || drt.length == 1) { + if (drt instanceof Array) { + prefix = drt[0]; + } + else { + prefix = drt; + } + } + else { + for (let x = 0; x < drt.length; x++) { + if (getObjType(drt[x]) == "object") { + prefix += drt[x].name; + } + else { + prefix += drt[x]; + } + } + } + } + + let suffix = ""; + let dct = datacoltitle_index[c - colOver]; + if (dct != null) { + if (!(dct instanceof Array) || dct.length == 1) { + if (dct instanceof Array) { + suffix = dct[0]; + } + else { + suffix = dct; + } + } + else { + for (let x = 0; x < dct.length; x++) { + if (getObjType(dct[x]) == "object") { + suffix += dct[x].name; + } + else { + suffix += dct[x]; + } + } + } + } + + let indicator = prefix; + + if (prefix != "" && suffix != "") { + indicator = prefix + suffix; + } + else if (prefix == "") { + indicator = suffix; + } + + if (dataposition[indicator] == null) { + retdata[r][c] = ""; + } + else { + retdata[r][c] = dataposition[indicator].result; + } + } + } + } + + if (values.length == 1 && column.length > 0) { + retdata[0][0] = values[0].fullname; + retdata.splice(column.length, 1); + } + + _this.pivotDatas = retdata; + + return retdata; + }, + drillDown: function(row_index, col_index){ + let _this = this; + + let cell = _this.pivotDatas[row_index][col_index]; + let d = $.extend(true, [], sheetmanage.nulldata); + + let selecteditemNullIndex = 1; + for(let i = 0; i < _this.celldata[0].length; i++){ + let name; + if(!!_this.celldata[0][i] && !!_this.celldata[0][i]["m"]){ + name = _this.celldata[0][i]["m"]; + } + else{ + name = getcellvalue(0, i, _this.celldata); + } + + if(name != null){ + name = name.toString(); + } + + if (name == null || $.trim(name.toString()).length == 0) { + name = "列 " + selecteditemNullIndex; + } + selecteditemNullIndex++ + + d[0][i] = name; + } + + let obj = {}; + + //行 + if(_this.row != null && _this.row.length > 0){ + for(let a = 0; a < _this.row.length; a++){ + obj[_this.row[a]["index"]] = _this.pivotDatas[row_index][a]; + } + } + + //列 + if(_this.column != null && _this.column.length > 0){ + for(let b = 0; b < _this.column.length; b++){ + obj[_this.column[b]["index"]] = _this.pivotDatas[b][col_index]; + } + } + + let rowArr = []; + for(let j = 1; j < _this.celldata.length; j++){ + let isEqual = true + + for(let x in obj){ + let value; + if(!!_this.celldata[j][x] && !!_this.celldata[j][x]["m"]){ + value = _this.celldata[j][x]["m"]; + } + else{ + value = getcellvalue(j, x, _this.celldata); + } + + if(value != null){ + value = value.toString(); + } + else{ + value = "(空白)"; + } + + if(value != obj[x]){ + isEqual = false; + break; + } + } + + if(isEqual){ + rowArr.push(j); + } + } + + for(let r = 0; r < rowArr.length; r++){ + for(let c = 0; c < _this.celldata[0].length; c++){ + let value; + if(!!_this.celldata[rowArr[r]][c] && !!_this.celldata[rowArr[r]][c]["m"]){ + value = _this.celldata[rowArr[r]][c]["m"]; + } + else{ + value = getcellvalue(rowArr[r], c, _this.celldata); + } + + if(value != null){ + value = value.toString(); + } + else{ + value = ""; + } + + d[r + 1][c] = value; + } + } + + Store.luckysheet_select_save = [{ "row": [0, rowArr.length], "column": [0, _this.celldata[0].length - 1] }]; + + Store.clearjfundo = false; + jfrefreshgrid(d, Store.luckysheet_select_save); + selectHightlightShow(); + Store.clearjfundo = true; + } +} + +export default pivotTable; \ No newline at end of file diff --git a/src/controllers/postil.js b/src/controllers/postil.js new file mode 100644 index 000000000..d7ab02844 --- /dev/null +++ b/src/controllers/postil.js @@ -0,0 +1,833 @@ +import { rowLocation, colLocation, mouseposition } from '../global/location'; +import editor from '../global/editor'; +import formula from '../global/formula'; +import { luckysheetRangeLast } from '../global/cursorPos'; +import { luckysheetrefreshgrid } from '../global/refresh'; +import { setluckysheet_scroll_status } from '../methods/set'; +import { getSheetIndex } from '../methods/get'; +import { getObjType } from '../utils/util'; +import luckysheetFreezen from './freezen'; +import menuButton from './menuButton'; +import server from './server'; +import Store from '../store'; + +//批注 +const luckysheetPostil = { + defaultWidth: 144, + defaultHeight: 84, + currentObj: null, + currentWinW: null, + currentWinH: null, + resize: null, + resizeXY: null, + move: false, + moveXY: null, + init: function(){ + let _this = this; + + //点击批注框 聚焦 + $("#luckysheet-postil-showBoxs").off("mousedown.showPs").on("mousedown.showPs", ".luckysheet-postil-show", function(event){ + _this.currentObj = $(this).find(".luckysheet-postil-show-main"); + + if($(this).hasClass("luckysheet-postil-show-active")){ + event.stopPropagation(); + return; + } + + _this.removeActivePs(); + + $(this).addClass("luckysheet-postil-show-active"); + $(this).find(".luckysheet-postil-dialog-resize").show(); + $(this).find(".arrowCanvas").css("z-index", 200); + $(this).find(".luckysheet-postil-show-main").css("z-index", 200); + + event.stopPropagation(); + }); + $("#luckysheet-postil-showBoxs").off("mouseup.showPs").on("mouseup.showPs", ".luckysheet-postil-show", function(event){ + if(event.which == "3"){ + event.stopPropagation(); + } + }); + + //批注框 改变大小 + $("#luckysheet-postil-showBoxs").off("mousedown.resize").on("mousedown.resize", ".luckysheet-postil-show .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item", function(event){ + _this.currentObj = $(this).closest(".luckysheet-postil-show-main"); + _this.currentWinW = $("#luckysheet-cell-main")[0].scrollWidth; + _this.currentWinH = $("#luckysheet-cell-main")[0].scrollHeight; + + _this.resize = $(this).data("type"); + + let scrollTop = $("#luckysheet-cell-main").scrollTop(), + scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let position = _this.currentObj.position(); + let width = _this.currentObj.width(); + let height = _this.currentObj.height(); + + _this.resizeXY = [ + x, + y, + width, + height, + position.left + scrollLeft, + position.top + scrollTop, + scrollLeft, + scrollTop + ]; + + setluckysheet_scroll_status(true); + + if($(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){ + event.stopPropagation(); + return; + } + + _this.removeActivePs(); + + $(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"); + $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(); + $(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index", 200); + $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index", 200); + + event.stopPropagation(); + }); + + //批注框 移动 + $("#luckysheet-postil-showBoxs").off("mousedown.move").on("mousedown.move", ".luckysheet-postil-show .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item", function(event){ + _this.currentObj = $(this).closest(".luckysheet-postil-show-main"); + _this.currentWinW = $("#luckysheet-cell-main")[0].scrollWidth; + _this.currentWinH = $("#luckysheet-cell-main")[0].scrollHeight; + + _this.move = true; + + let scrollTop = $("#luckysheet-cell-main").scrollTop(), + scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + + let offset = _this.currentObj.offset(); + let position = _this.currentObj.position(); + + _this.moveXY = [ + event.pageX - offset.left, + event.pageY - offset.top, + position.left, + position.top, + scrollLeft, + scrollTop + ]; + + setluckysheet_scroll_status(true); + + if($(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){ + event.stopPropagation(); + return; + } + + _this.removeActivePs(); + + $(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"); + $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(); + $(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index", 200); + $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index", 200); + + event.stopPropagation(); + }); + }, + overshow: function(event){ + let _this = this; + + $("#luckysheet-postil-overshow").remove(); + + if($(event.target).closest("#luckysheet-cell-main").length == 0){ + return; + } + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + if(luckysheetFreezen.freezenverticaldata != null && mouse[0] < (luckysheetFreezen.freezenverticaldata[0] - luckysheetFreezen.freezenverticaldata[2])){ + return; + } + + if(luckysheetFreezen.freezenhorizontaldata != null && mouse[1] < (luckysheetFreezen.freezenhorizontaldata[0] - luckysheetFreezen.freezenhorizontaldata[2])){ + return; + } + + let row_index = rowLocation(y)[2]; + let col_index = colLocation(x)[2]; + + let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index); + if(!!margeset){ + row_index = margeset.row[2]; + col_index = margeset.column[2]; + } + + if(Store.flowdata[row_index] == null || Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].ps == null){ + return; + } + + let postil = Store.flowdata[row_index][col_index].ps; + + if(postil["isshow"] || $("#luckysheet-postil-show_"+ row_index +"_"+ col_index).length > 0){ + return; + } + + let value = postil["value"] == null ? "" : postil["value"]; + + let row = Store.visibledatarow[row_index], + row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; + let col = Store.visibledatacolumn[col_index], + col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; + + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let fromX = toX + 18; + let fromY = toY - 18; + + if(fromY < 0){ + fromY = 2; + } + + let size = _this.getArrowCanvasSize(fromX, fromY, toX, toY); + + let html = '
' + + '' + + '
'+ value +'
' + + '
'; + + $(html).appendTo($("#luckysheet-cell-main")); + + let ctx = $("#luckysheet-postil-overshow .arrowCanvas").get(0).getContext("2d"); + + _this.drawArrow(ctx, size[4], size[5], size[6], size[7]); + }, + getArrowCanvasSize: function(fromX, fromY, toX, toY){ + let left = toX - 5; + + if(fromX < toX){ + left = fromX - 5; + } + + let top = toY - 5; + + if(fromY < toY){ + top = fromY - 5; + } + + let width = Math.abs(fromX - toX) + 10; + let height = Math.abs(fromY - toY) + 10; + + let x1 = width - 5; + let x2 = 5; + + if(fromX < toX){ + x1 = 5; + x2 = width - 5; + } + + let y1 = height - 5; + let y2 = 5; + + if(fromY < toY){ + y1 = 5; + y2 = height - 5; + } + + return [left, top, width, height, x1, y1, x2, y2]; + }, + drawArrow: function(ctx, fromX, fromY, toX, toY, theta, headlen, width, color){ + theta = getObjType(theta) == "undefined" ? 30 : theta; + headlen = getObjType(headlen) == "undefined" ? 6 : headlen; + width = getObjType(width) == "undefined" ? 1 : width; + color = getObjType(color) == "undefined" ? "#000" : color; + + // 计算各角度和对应的P2,P3坐标 + let angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI, + angle1 = (angle + theta) * Math.PI / 180, + angle2 = (angle - theta) * Math.PI / 180, + topX = headlen * Math.cos(angle1), + topY = headlen * Math.sin(angle1), + botX = headlen * Math.cos(angle2), + botY = headlen * Math.sin(angle2); + + ctx.save(); + ctx.beginPath(); + + let arrowX = fromX - topX, + arrowY = fromY - topY; + + ctx.moveTo(arrowX, arrowY); + ctx.moveTo(fromX, fromY); + ctx.lineTo(toX, toY); + + ctx.lineWidth = width; + ctx.strokeStyle = color; + ctx.stroke(); + + arrowX = toX + topX; + arrowY = toY + topY; + ctx.moveTo(arrowX, arrowY); + ctx.lineTo(toX, toY); + arrowX = toX + botX; + arrowY = toY + botY; + ctx.lineTo(arrowX, arrowY); + + ctx.fillStyle = color; + ctx.fill(); + ctx.restore(); + }, + buildAllPs: function(data){ + let _this = this; + + $("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty(); + + for(let r = 0; r < data.length; r++){ + for(let c = 0; c < data[0].length; c++){ + if(data[r][c] != null && data[r][c].ps != null){ + let postil = data[r][c].ps; + _this.buildPs(r, c, postil); + } + } + } + + _this.init(); + }, + buildPs: function(r, c, postil){ + if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){ + $("#luckysheet-postil-show_"+ r +"_"+ c).remove(); + } + + if(postil == null){ + return; + } + + let _this = this; + let isshow = postil["isshow"] == null ? false : postil["isshow"]; + + if(isshow){ + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let left = postil["left"] == null ? toX + 18 : postil["left"]; + let top = postil["top"] == null ? toY - 18 : postil["top"]; + let width = postil["width"] == null ? _this.defaultWidth : postil["width"]; + let height = postil["height"] == null ? _this.defaultHeight : postil["height"]; + let value = postil["value"] == null ? "" : postil["value"]; + + if(top < 0){ + top = 2; + } + + let size = _this.getArrowCanvasSize(left, top, toX, toY); + + let html = '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + value + + '
' + + '
' + + '
' + + '
'; + + $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); + + let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); + + _this.drawArrow(ctx, size[4], size[5], size[6], size[7]); + } + }, + newPs: function(r, c){ + let _this = this; + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let fromX = toX + 18; + let fromY = toY - 18; + + if(fromY < 0){ + fromY = 2; + } + + let size = _this.getArrowCanvasSize(fromX, fromY, toX, toY); + + let html = '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
'; + + $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); + + let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); + + _this.drawArrow(ctx, size[4], size[5], size[6], size[7]); + + $("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").focus(); + + _this.init(); + + let d = editor.deepCopyFlowData(Store.flowdata); + let rc = []; + + if(d[r][c] == null){ + d[r][c] = {}; + } + + d[r][c].ps = { "left": null, "top": null, "width": null, "height": null, "value": "", "isshow": false }; + rc.push(r + "_" + c); + + _this.ref(d, rc); + }, + editPs: function(r, c){ + let _this = this; + + if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){ + $("#luckysheet-postil-show_"+ r +"_"+ c).show(); + $("#luckysheet-postil-show_"+ r +"_"+ c).addClass("luckysheet-postil-show-active"); + $("#luckysheet-postil-show_"+ r +"_"+ c).find(".luckysheet-postil-dialog-resize").show(); + } + else{ + let postil = Store.flowdata[r][c].ps; + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let left = postil["left"] == null ? toX + 18 : postil["left"]; + let top = postil["top"] == null ? toY - 18 : postil["top"]; + let width = postil["width"] == null ? _this.defaultWidth : postil["width"]; + let height = postil["height"] == null ? _this.defaultHeight : postil["height"]; + let value = postil["value"] == null ? "" : postil["value"]; + + if(top < 0){ + top = 2; + } + + let size = _this.getArrowCanvasSize(left, top, toX, toY); + + let html = '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + value + + '
' + + '
' + + '
' + + '
'; + + $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); + + let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); + + _this.drawArrow(ctx, size[4], size[5], size[6], size[7]); + } + + $("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").focus(); + luckysheetRangeLast($("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").get(0)); + + _this.init(); + }, + delPs: function(r, c){ + if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){ + $("#luckysheet-postil-show_"+ r +"_"+ c).remove(); + } + + let d = editor.deepCopyFlowData(Store.flowdata); + let rc = []; + + delete d[r][c].ps; + rc.push(r + "_" + c); + + this.ref(d, rc); + }, + showHidePs: function(r, c){ + let _this = this; + + let postil = Store.flowdata[r][c].ps; + let isshow = postil["isshow"]; + + let d = editor.deepCopyFlowData(Store.flowdata); + let rc = []; + + if(isshow){ + d[r][c].ps.isshow = false; + + $("#luckysheet-postil-show_"+ r +"_"+ c).remove(); + } + else{ + d[r][c].ps.isshow = true; + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r, c); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let left = postil["left"] == null ? toX + 18 : postil["left"]; + let top = postil["top"] == null ? toY - 18 : postil["top"]; + let width = postil["width"] == null ? _this.defaultWidth : postil["width"]; + let height = postil["height"] == null ? _this.defaultHeight : postil["height"]; + let value = postil["value"] == null ? "" : postil["value"]; + + if(top < 0){ + top = 2; + } + + let size = _this.getArrowCanvasSize(left, top, toX, toY); + + let html = '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + value + + '
' + + '
' + + '
' + + '
'; + + $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); + + let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); + + _this.drawArrow(ctx, size[4], size[5], size[6], size[7]); + + _this.init(); + } + + rc.push(r + "_" + c); + + _this.ref(d, rc); + }, + showHideAllPs: function(){ + let _this = this; + + let d = editor.deepCopyFlowData(Store.flowdata); + + let isAllShow = true; + let allPs = []; + + for(let r = 0; r < d.length; r++){ + for(let c = 0; c < d[0].length; c++){ + if(d[r] != null && d[r][c] != null && d[r][c].ps != null){ + allPs.push(r + "_" + c); + + if(!d[r][c].ps.isshow){ + isAllShow = false; + } + } + } + } + + let rc = []; + if(allPs.length > 0){ + if(isAllShow){ //全部显示,操作为隐藏所有批注 + $("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty(); + + for(let i = 0; i < allPs.length; i++){ + let rowIndex = allPs[i].split("_")[0]; + let colIndex = allPs[i].split("_")[1]; + + let postil = d[rowIndex][colIndex].ps; + + if(postil["isshow"]){ + d[rowIndex][colIndex].ps.isshow = false; + rc.push(allPs[i]); + } + } + } + else{ //部分显示或全部隐藏,操作位显示所有批注 + for(let i = 0; i < allPs.length; i++){ + let rowIndex = allPs[i].split("_")[0]; + let colIndex = allPs[i].split("_")[1]; + + let postil = d[rowIndex][colIndex].ps; + + if(!postil["isshow"]){ + let row = Store.visibledatarow[rowIndex], + row_pre = rowIndex - 1 == -1 ? 0 : Store.visibledatarow[rowIndex - 1]; + let col = Store.visibledatacolumn[colIndex], + col_pre = colIndex - 1 == -1 ? 0 : Store.visibledatacolumn[colIndex - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, rowIndex, colIndex); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + let toX = col; + let toY = row_pre; + + let left = postil["left"] == null ? toX + 18 : postil["left"]; + let top = postil["top"] == null ? toY - 18 : postil["top"]; + let width = postil["width"] == null ? _this.defaultWidth : postil["width"]; + let height = postil["height"] == null ? _this.defaultHeight : postil["height"]; + let value = postil["value"] == null ? "" : postil["value"]; + + if(top < 0){ + top = 2; + } + + let size = _this.getArrowCanvasSize(left, top, toX, toY); + + let html = '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + value + + '
' + + '
' + + '
' + + '
'; + + $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); + + let ctx = $("#luckysheet-postil-show_"+ rowIndex +"_"+ colIndex +" .arrowCanvas").get(0).getContext("2d"); + + _this.drawArrow(ctx, size[4], size[5], size[6], size[7]); + + d[rowIndex][colIndex].ps.isshow = true; + rc.push(allPs[i]); + } + } + } + } + + _this.ref(d, rc); + _this.init(); + }, + removeActivePs: function(){ + if($("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").length > 0){ + let id = $("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").attr("id"); + + $("#" + id).removeClass("luckysheet-postil-show-active"); + $("#" + id).find(".luckysheet-postil-dialog-resize").hide(); + $("#" + id).find(".arrowCanvas").css("z-index", 100); + $("#" + id).find(".luckysheet-postil-show-main").css("z-index", 100); + + let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; + let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; + + let value = $("#" + id).find(".formulaInputFocus").text(); + + let d = editor.deepCopyFlowData(Store.flowdata); + let rc = []; + + d[r][c].ps.value = value; + rc.push(r + "_" + c); + + this.ref(d, rc); + + if(!d[r][c].ps.isshow){ + $("#" + id).remove(); + } + } + }, + ref: function(data, rc){ + if (Store.clearjfundo) { + Store.jfundo = []; + + Store.jfredo.push({ + "type": "postil", + "data": Store.flowdata, + "curdata": data, + "sheetIndex": Store.currentSheetIndex, + "rc": rc + }); + } + + //flowdata + Store.flowdata = data; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata; + formula.execFunctionGroupData = Store.flowdata; + + //共享编辑模式 + if(server.allowUpdate){ + for(let i = 0; i < rc.length; i++){ + let r = rc[i].split("_")[0]; + let c = rc[i].split("_")[1]; + + server.saveParam("v", Store.currentSheetIndex, Store.flowdata[r][c], { "r": r, "c": c }); + } + } + + //刷新表格 + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + }, + positionSync: function(){ + let _this = this; + + $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ + let id = $(e).attr("id"); + + let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; + let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; + + _this.buildPs(r, c, Store.flowdata[r][c].ps); + }); + } +} + +export default luckysheetPostil; \ No newline at end of file diff --git a/src/controllers/resize.js b/src/controllers/resize.js new file mode 100644 index 000000000..5fe25c9bb --- /dev/null +++ b/src/controllers/resize.js @@ -0,0 +1,170 @@ +import luckysheetConfigsetting from './luckysheetConfigsetting'; +import luckysheetFreezen from './freezen'; +import { luckysheetrefreshgrid } from '../global/refresh'; +import Store from '../store'; +import locale from '../locale/locale'; + +let gridW = 0, + gridH = 0; + +export default function luckysheetsizeauto() { + if (!luckysheetConfigsetting.showinfobar) { + Store.infobarHeight = 0; + $("#luckysheet_info_detail").hide(); + } + else { + Store.infobarHeight = 30; + $("#luckysheet_info_detail").show(); + } + + if (!luckysheetConfigsetting.showtoolbar) { + $("#" + Store.container).find(".luckysheet-wa-editor, .luckysheet-share-logo").hide(); + Store.toolbarHeight = 0; + } + else { + $("#" + Store.container).find(".luckysheet-wa-editor, .luckysheet-share-logo").show(); + Store.toolbarHeight = 35; + } + + if (!luckysheetConfigsetting.showsheetbar) { + $("#" + Store.container).find("#luckysheet-sheet-area").hide(); + Store.sheetBarHeight = 0; + } + else { + $("#" + Store.container).find("#luckysheet-sheet-area").show(); + Store.sheetBarHeight = 27; + } + + if (!luckysheetConfigsetting.showstatisticBar) { + $("#" + Store.container).find(".luckysheet-stat-area").hide(); + Store.statisticBarHeight = 0; + } + else { + $("#" + Store.container).find(".luckysheet-stat-area").show(); + Store.statisticBarHeight = 23; + } + + $("#" + Store.container).find(".luckysheet-grid-container").css("top", Store.toolbarHeight + Store.infobarHeight + Store.calculatebarHeight); + + gridW = $("#" + Store.container).width(), gridH = $("#" + Store.container).height(); + + if(luckysheetConfigsetting.showConfigWindowResize){//数据透视表 图表 交替颜色 + if($("#luckysheet-modal-dialog-slider-pivot").is(":visible")){ + gridW -= $("#luckysheet-modal-dialog-slider-pivot").outerWidth(); + } + else if($("#luckysheet-data-visualization").is(":visible")){ + gridW -= $("#luckysheet-data-visualization").outerWidth(); + } + else if($("#luckysheet-modal-dialog-slider-alternateformat").is(":visible")){ + gridW -= $("#luckysheet-modal-dialog-slider-alternateformat").outerWidth(); + } + } + + $("#" + Store.container).find(".luckysheet").height(gridH - 2).width(gridW - 2); + + Store.cellmainHeight = gridH - (Store.infobarHeight + Store.toolbarHeight + Store.calculatebarHeight + Store.columeHeaderHeight + Store.sheetBarHeight + Store.statisticBarHeight); + Store.cellmainWidth = gridW - Store.rowHeaderWidth; + + $("#luckysheet-cols-h-c, #luckysheet-cell-main, #luckysheet-scrollbar-x").width(Store.cellmainWidth); + $("#luckysheet-cell-main").height(Store.cellmainHeight); + $("#luckysheet-rows-h").height(Store.cellmainHeight - Store.cellMainSrollBarSize); + + $("#luckysheet-scrollbar-y").height(Store.cellmainHeight + 6); + $("#luckysheet-scrollbar-x").height(Store.cellMainSrollBarSize); + $("#luckysheet-scrollbar-y").width(Store.cellMainSrollBarSize); + + Store.luckysheetTableContentHW = [ + Store.cellmainWidth + Store.rowHeaderWidth - Store.cellMainSrollBarSize, + Store.cellmainHeight + Store.columeHeaderHeight - Store.cellMainSrollBarSize + ]; + + $("#luckysheetTableContent, #luckysheetTableContentF").attr({ + width: Math.ceil(Store.luckysheetTableContentHW[0] * Store.devicePixelRatio), + height: Math.ceil(Store.luckysheetTableContentHW[1] * Store.devicePixelRatio) + }) + .css({ width: Store.luckysheetTableContentHW[0], height: Store.luckysheetTableContentHW[1] }); + + $("#" + Store.container).find("#luckysheet-grid-window-1").css("bottom", Store.sheetBarHeight); + $("#" + Store.container).find(".luckysheet-grid-window").css("bottom", Store.statisticBarHeight); + + let gridwidth = $("#luckysheet-grid-window-1").width(); + $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle") + .css({ "width": gridwidth - 10 }) + .end() + .find(".luckysheet-freezebar-horizontal-drop") + .css({ "width": gridwidth - 10 }); + + let gridheight = $("#luckysheet-grid-window-1").height(); + $("#luckysheet-freezebar-vertical") + .find(".luckysheet-freezebar-vertical-handle") + .css({ "height": gridheight - 10 }) + .end() + .find(".luckysheet-freezebar-vertical-drop") + .css({ "height": gridheight - 10 }); + + luckysheetFreezen.createAssistCanvas(); + luckysheetrefreshgrid($("#luckysheet-cell-main").scrollLeft(), $("#luckysheet-cell-main").scrollTop()); + const _locale = locale(); + const locale_toolbar = _locale.toolbar; + let ismore = false, + toolbarW = 0, + morebtn = '
'+ locale_toolbar.toolMore +'...
', + morediv = '
'; + + if($("#luckysheet-icon-morebtn-div").length == 0){ + $("body").append(morediv); + } + + $("#luckysheet-icon-morebtn-div").hide(); + $("#luckysheet-icon-morebtn-div > div").appendTo($("#luckysheet-wa-editor")); + // $("#luckysheet-wa-editor > div").trigger("create"); + // $("#luckysheet-icon-morebtn-div > div").trigger("create"); + $("#luckysheet-icon-morebtn").prev().remove().end().remove(); + + $("#luckysheet-wa-editor > div").each(function(){ + let $t = $(this); + toolbarW += $t.outerWidth(); + + if(!ismore && toolbarW > gridW - 140){ + ismore = true; + } + + if(ismore){ + $("#luckysheet-icon-morebtn-div").append($(this)); + } + }); + + if(ismore){ + + $("#luckysheet-wa-editor").append(morebtn); + $("#luckysheet-icon-morebtn").click(function(){ + let right = $(window).width() - $("#luckysheet-icon-morebtn").offset().left - $("#luckysheet-icon-morebtn").width()+ $("body").scrollLeft(); + $("#luckysheet-icon-morebtn-div").toggle().css("right", right < 0 ? 0 : right); + + let $txt = $(this).find(".luckysheet-toolbar-menu-button-caption"); + if($txt.text().indexOf(locale_toolbar.toolMore) > -1){ + $(this).find(".luckysheet-toolbar-menu-button-caption").html(' '+ locale_toolbar.toolClose +'... '); + } + else{ + $(this).find(".luckysheet-toolbar-menu-button-caption").html(' '+ locale_toolbar.toolMore +'... '); + } + + }); + //$("#luckysheet-wa-editor div").trigger("create"); + + $("#luckysheet-icon-morebtn-div .luckysheet-toolbar-menu-button").css("margin-right", -1); + $("#luckysheet-icon-morebtn-div .luckysheet-toolbar-button-split-left").css("margin-right", -3); + } + + $("#"+ Store.container + " .luckysheet-wa-editor .luckysheet-toolbar-button-split-left").off("hover").hover(function(){ + $(this).next(".luckysheet-toolbar-button-split-right").addClass("luckysheet-toolbar-button-split-right-hover"); + }, function(){ + $(this).next(".luckysheet-toolbar-button-split-right").removeClass("luckysheet-toolbar-button-split-right-hover"); + }); + + $("#"+ Store.container + " .luckysheet-wa-editor .luckysheet-toolbar-button-split-right").off("hover").hover(function(){ + $(this).prev(".luckysheet-toolbar-button-split-left").addClass("luckysheet-toolbar-button-hover"); + }, function(){ + $(this).prev(".luckysheet-toolbar-button-split-left").removeClass("luckysheet-toolbar-button-hover"); + }); +} \ No newline at end of file diff --git a/src/controllers/searchReplace.js b/src/controllers/searchReplace.js new file mode 100644 index 000000000..da3ac20e8 --- /dev/null +++ b/src/controllers/searchReplace.js @@ -0,0 +1,741 @@ +import { replaceHtml, chatatABC } from '../utils/util'; +import { getSheetIndex } from '../methods/get'; +import { modelHTML, keycode } from './constant'; +import { selectHightlightShow } from './select'; +import sheetmanage from './sheetmanage'; +import { isEditMode } from '../global/validate'; +import { valueShowEs } from '../global/format'; +import { setcellvalue } from '../global/setdata'; +import { jfrefreshgrid } from '../global/refresh'; +import editor from '../global/editor'; +import tooltip from '../global/tooltip'; +import func_methods from '../global/func_methods'; +import Store from '../store'; +import locale from '../locale/locale'; + +//查找替换 +const luckysheetSearchReplace = { + createDialog: function(source){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-search-replace").remove(); + + const _locale = locale(); + const locale_findAndReplace = _locale.findAndReplace; + + let content = '
' + + ''+ locale_findAndReplace.find +'' + + ''+ locale_findAndReplace.replace +'' + + '
' + + '
' + + '
' + + '
'+ locale_findAndReplace.findTextbox +':
' + + '
'+ locale_findAndReplace.replaceTextbox +':
' + + '
' + + '
' + + '' + + ''+ locale_findAndReplace.regexTextbox +'' + + '
' + + '
' + + '' + + ''+ locale_findAndReplace.wholeTextbox +'' + + '
' + + '
' + + '' + + ''+ locale_findAndReplace.distinguishTextbox +'' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + '' + + '' + + '
' + + '
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-search-replace", + "addclass": "luckysheet-search-replace", + "title": "", + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-search-replace").find(".luckysheet-modal-dialog-content").css("min-width", 500).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-search-replace").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + + if(source == "0"){ + $("#luckysheet-search-replace #searchTab").addClass("on").siblings().removeClass("on"); + $("#luckysheet-search-replace #replaceInput").hide(); + $("#luckysheet-search-replace #replaceAllBtn").hide(); + $("#luckysheet-search-replace #replaceBtn").hide(); + } + else if(source == "1"){ + $("#luckysheet-search-replace #replaceTab").addClass("on").siblings().removeClass("on"); + $("#luckysheet-search-replace #replaceInput").show(); + $("#luckysheet-search-replace #replaceAllBtn").show(); + $("#luckysheet-search-replace #replaceBtn").show(); + } + }, + init: function(){ + let _this = this; + + //查找替换 切换 + $(document).off("click.SRtabBoxspan").on("click.SRtabBoxspan", "#luckysheet-search-replace .tabBox span", function(){ + $(this).addClass("on").siblings().removeClass("on"); + + let $id = $(this).attr("id"); + if($id == "searchTab"){ + $("#luckysheet-search-replace #replaceInput").hide(); + $("#luckysheet-search-replace #replaceAllBtn").hide(); + $("#luckysheet-search-replace #replaceBtn").hide(); + + $("#luckysheet-search-replace #searchInput input").focus(); + } + else if($id == "replaceTab"){ + $("#luckysheet-search-replace #replaceInput").show(); + $("#luckysheet-search-replace #replaceAllBtn").show(); + $("#luckysheet-search-replace #replaceBtn").show(); + + $("#luckysheet-search-replace #replaceInput input").focus(); + } + }); + + //查找下一个 + $(document).off("keyup.SRsearchInput").on("keyup.SRsearchInput", "#luckysheet-search-replace #searchInput input", function(event){ + let kcode = event.keyCode; + if(kcode == keycode.ENTER){ + _this.searchNext(); + } + }); + $(document).off("click.SRsearchNextBtn").on("click.SRsearchNextBtn", "#luckysheet-search-replace #searchNextBtn", function(){ + _this.searchNext(); + }); + + //查找全部 + $(document).off("click.SRsearchAllBtn").on("click.SRsearchAllBtn", "#luckysheet-search-replace #searchAllBtn", function(){ + _this.searchAll(); + }); + $(document).off("click.SRsearchAllboxItem").on("click.SRsearchAllboxItem", "#luckysheet-search-replace #searchAllbox .boxItem", function(){ + $(this).addClass("on").siblings().removeClass("on"); + + let r = $(this).attr("data-row"); + let c = $(this).attr("data-col"); + let sheetIndex = $(this).attr("data-sheetIndex"); + + if(sheetIndex != Store.currentSheetIndex){ + sheetmanage.changeSheetExec(sheetIndex); + } + + Store.luckysheet_select_save = [ + { "row": [r, r], "column": [c, c] } + ]; + + selectHightlightShow(); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), + winW = $("#luckysheet-cell-main").width(); + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + if (col - scrollLeft - winW + 20 > 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); + } + else if (col_pre - scrollLeft - 20 < 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); + } + + if (row - scrollTop - winH + 20 > 0) { + $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); + } + else if (row_pre - scrollTop - 20 < 0) { + $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); + } + }); + + //替换 + $(document).off("click.SRreplaceBtn").on("click.SRreplaceBtn", "#luckysheet-search-replace #replaceBtn", function(){ + _this.replace(); + }); + + //全部替换 + $(document).off("click.SRreplaceAllBtn").on("click.SRreplaceAllBtn", "#luckysheet-search-replace #replaceAllBtn", function(){ + _this.replaceAll(); + }); + }, + searchNext: function(){ + let _this = this; + + let searchText = $("#luckysheet-search-replace #searchInput input").val(); + if(searchText == "" || searchText == null){ + return; + } + const _locale = locale(); + const locale_findAndReplace = _locale.findAndReplace; + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + range = [{ + "row": [0, Store.flowdata.length - 1], + "column": [0, Store.flowdata[0].length - 1] + }]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + let searchIndexArr = _this.getSearchIndexArr(searchText, range); + + if(searchIndexArr.length == 0){ + if(isEditMode()){ + alert(locale_findAndReplace.noFindTip); + } + else{ + tooltip.info(locale_findAndReplace.noFindTip, ""); + } + + return; + } + + let count = 0; + + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + if(Store.luckysheet_select_save.length == 0){ + count = 0; + } + else{ + for(let i = 0; i < searchIndexArr.length; i++){ + if(searchIndexArr[i].r == Store.luckysheet_select_save[0].row[0] && searchIndexArr[i].c == Store.luckysheet_select_save[0].column[0]){ + if(i == searchIndexArr.length - 1){ + count = 0; + } + else{ + count = i + 1; + } + + break; + } + } + } + + Store.luckysheet_select_save = [{ + "row": [searchIndexArr[count].r, searchIndexArr[count].r], + "column": [searchIndexArr[count].c, searchIndexArr[count].c] + }]; + } + else{ + let rf = range[range.length - 1].row_focus; + let cf = range[range.length - 1].column_focus; + + for(let i = 0; i < searchIndexArr.length; i++){ + if(searchIndexArr[i].r == rf && searchIndexArr[i].c == cf){ + if(i == searchIndexArr.length - 1){ + count = 0; + } + else{ + count = i + 1; + } + + break; + } + } + + for(let s = 0; s < range.length; s++){ + let r1 = range[s].row[0], r2 = range[s].row[1]; + let c1 = range[s].column[0], c2 = range[s].column[1]; + + if(searchIndexArr[count].r >= r1 && searchIndexArr[count].r <= r2 && searchIndexArr[count].c >= c1 && searchIndexArr[count].c <= c2){ + let obj = range[s]; + obj["row_focus"] = searchIndexArr[count].r; + obj["column_focus"] = searchIndexArr[count].c; + range.splice(s, 1); + range.push(obj); + + break; + } + } + + Store.luckysheet_select_save = range; + } + + selectHightlightShow(); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), + winW = $("#luckysheet-cell-main").width(); + + let row = Store.visibledatarow[searchIndexArr[count].r], + row_pre = searchIndexArr[count].r - 1 == -1 ? 0 : Store.visibledatarow[searchIndexArr[count].r - 1]; + let col = Store.visibledatacolumn[searchIndexArr[count].c], + col_pre = searchIndexArr[count].c - 1 == -1 ? 0 : Store.visibledatacolumn[searchIndexArr[count].c - 1]; + + if (col - scrollLeft - winW + 20 > 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); + } + else if (col_pre - scrollLeft - 20 < 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); + } + + if (row - scrollTop - winH + 20 > 0) { + $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); + } + else if (row_pre - scrollTop - 20 < 0) { + $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); + } + + if($("#searchAllbox").is(":visible")){ + $("#luckysheet-search-replace #searchAllbox .boxItem").removeClass("on"); + } + }, + searchAll: function(){ + let _this = this; + + const _locale = locale(); + const locale_findAndReplace = _locale.findAndReplace; + + $("#luckysheet-search-replace #searchAllbox").remove(); + + let searchText = $("#luckysheet-search-replace #searchInput input").val(); + if(searchText == "" || searchText == null){ + return; + } + + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + range = [{ + "row": [0, Store.flowdata.length - 1], + "column": [0, Store.flowdata[0].length - 1] + }]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + let searchIndexArr = _this.getSearchIndexArr(searchText, range); + + if(searchIndexArr.length == 0){ + if(isEditMode()){ + alert(locale_findAndReplace.noFindTip); + } + else{ + tooltip.info(locale_findAndReplace.noFindTip, ""); + } + + return; + } + + let searchAllHtml = ''; + + for(let i = 0; i < searchIndexArr.length; i++){ + let value_ShowEs = valueShowEs(searchIndexArr[i].r, searchIndexArr[i].c, Store.flowdata).toString(); + + if(value_ShowEs.indexOf(" -1 && value_ShowEs.indexOf(">") > -1){ + searchAllHtml += '
' + + '' + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].name + '' + + '' + chatatABC(searchIndexArr[i].c) + (searchIndexArr[i].r + 1) + '' + + '' + value_ShowEs + '' + + '
'; + } + else{ + searchAllHtml += '
' + + '' + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].name + '' + + '' + chatatABC(searchIndexArr[i].c) + (searchIndexArr[i].r + 1) + '' + + '' + value_ShowEs + '' + + '
'; + } + } + + $('
'+ locale_findAndReplace.searchTargetSheet +''+locale_findAndReplace.searchTargetCell+''+locale_findAndReplace.searchTargetValue+'
' + searchAllHtml + '
').appendTo($("#luckysheet-search-replace")); + + $("#luckysheet-search-replace #searchAllbox .boxItem").eq(0).addClass("on").siblings().removeClass("on"); + + Store.luckysheet_select_save = [{ + "row": [searchIndexArr[0].r, searchIndexArr[0].r], + "column": [searchIndexArr[0].c, searchIndexArr[0].c] + }]; + + selectHightlightShow(); + }, + getSearchIndexArr: function(searchText, range){ + let arr = []; + let obj = {}; + + //正则表达式匹配 + let regCheck = false; + if($("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")){ + regCheck = true; + } + + //整词匹配 + let wordCheck = false; + if($("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")){ + wordCheck = true; + } + + //区分大小写匹配 + let caseCheck = false; + if($("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")){ + caseCheck = true; + } + + for(let s = 0; s < range.length; s++){ + let r1 = range[s].row[0], r2 = range[s].row[1]; + let c1 = range[s].column[0], c2 = range[s].column[1]; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + let cell = Store.flowdata[r][c]; + + if(cell != null){ + let value = valueShowEs(r, c, Store.flowdata); + + if(value == 0){ + value = value.toString(); + } + + if(value != null && value != ""){ + value = value.toString(); + + if(wordCheck){ //整词 + if(caseCheck){ + if(searchText == value){ + if(!((r + "_" + c) in obj)){ + obj[r + "_" + c] = 0; + arr.push({"r": r, "c": c}); + } + } + } + else{ + let txt = searchText.toLowerCase(); + if(txt == value.toLowerCase()){ + if(!((r + "_" + c) in obj)){ + obj[r + "_" + c] = 0; + arr.push({"r": r, "c": c}); + } + } + } + } + else if(regCheck){ //正则表达式 + let reg; + if(caseCheck){ + reg = new RegExp(func_methods.getRegExpStr(searchText), "g"); + } + else{ + reg = new RegExp(func_methods.getRegExpStr(searchText), "ig"); + } + + if(reg.test(value)){ + if(!((r + "_" + c) in obj)){ + obj[r + "_" + c] = 0; + arr.push({"r": r, "c": c}); + } + } + } + else if(caseCheck){ //区分大小写 + let reg = new RegExp(func_methods.getRegExpStr(searchText), "g"); + + if(reg.test(value)){ + if(!((r + "_" + c) in obj)){ + obj[r + "_" + c] = 0; + arr.push({"r": r, "c": c}); + } + } + } + else{ + let reg = new RegExp(func_methods.getRegExpStr(searchText), "ig"); + + if(reg.test(value)){ + if(!((r + "_" + c) in obj)){ + obj[r + "_" + c] = 0; + arr.push({"r": r, "c": c}); + } + } + } + } + } + } + } + } + + return arr; + }, + replace: function(){ + let _this = this; + + const _locale = locale(); + const locale_findAndReplace = _locale.findAndReplace; + + let searchText = $("#luckysheet-search-replace #searchInput input").val(); + if(searchText == "" || searchText == null){ + if(isEditMode()){ + alert(locale_findAndReplace.searchInputTip); + } + else{ + tooltip.info(locale_findAndReplace.searchInputTip, ""); + } + + return; + } + + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + range = [{ + "row": [0, Store.flowdata.length - 1], + "column": [0, Store.flowdata[0].length - 1] + }]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + let searchIndexArr = _this.getSearchIndexArr(searchText, range); + + if(searchIndexArr.length == 0){ + if(isEditMode()){ + alert(locale_findAndReplace.noReplceTip); + } + else{ + tooltip.info(locale_findAndReplace.noReplceTip, ""); + } + + return; + } + + let count = null; + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let rf = last.row_focus; + let cf = last.column_focus; + + for(let i = 0; i < searchIndexArr.length; i++){ + if(searchIndexArr[i].r == rf && searchIndexArr[i].c == cf){ + count = i; + break; + } + } + + if(count == null){ + if(searchIndexArr.length == 0){ + if(isEditMode()){ + alert(locale_findAndReplace.noMatchTip); + } + else{ + tooltip.info(locale_findAndReplace.noMatchTip, ""); + } + + return; + } + else{ + count = 0; + } + } + + //正则表达式匹配 + let regCheck = false; + if($("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")){ + regCheck = true; + } + + //整词匹配 + let wordCheck = false; + if($("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")){ + wordCheck = true; + } + + //区分大小写匹配 + let caseCheck = false; + if($("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")){ + caseCheck = true; + } + + let replaceText = $("#luckysheet-search-replace #replaceInput input").val(); + + let d = editor.deepCopyFlowData(Store.flowdata); + + let r, c; + if(wordCheck){ + r = searchIndexArr[count].r; + c = searchIndexArr[count].c; + + let v = replaceText; + + setcellvalue(r, c, d, v); + } + else{ + let reg; + if(caseCheck){ + reg = new RegExp(func_methods.getRegExpStr(searchText), "g"); + } + else{ + reg = new RegExp(func_methods.getRegExpStr(searchText), "ig"); + } + + r = searchIndexArr[count].r; + c = searchIndexArr[count].c; + + let v = valueShowEs(r, c, d).toString().replace(reg, replaceText); + + setcellvalue(r, c, d, v); + } + + Store.luckysheet_select_save = [{ "row": [r, r], "column": [c, c] }]; + + if($("#luckysheet-search-replace #searchAllbox").is(":visible")){ + $("#luckysheet-search-replace #searchAllbox").hide(); + } + + jfrefreshgrid(d, Store.luckysheet_select_save); + selectHightlightShow(); + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), + winW = $("#luckysheet-cell-main").width(); + + let row = Store.visibledatarow[r], + row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1]; + let col = Store.visibledatacolumn[c], + col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1]; + + if (col - scrollLeft - winW + 20 > 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); + } + else if (col_pre - scrollLeft - 20 < 0) { + $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); + } + + if (row - scrollTop - winH + 20 > 0) { + $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); + } + else if (row_pre - scrollTop - 20 < 0) { + $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); + } + }, + replaceAll: function(){ + let _this = this; + + const _locale = locale(); + const locale_findAndReplace = _locale.findAndReplace; + + let searchText = $("#luckysheet-search-replace #searchInput input").val(); + if(searchText == "" || searchText == null){ + if(isEditMode()){ + alert(locale_findAndReplace.searchInputTip); + } + else{ + tooltip.info(locale_findAndReplace.searchInputTip, ""); + } + + return; + } + + let range; + if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){ + range = [{ + "row": [0, Store.flowdata.length - 1], + "column": [0, Store.flowdata[0].length - 1] + }]; + } + else{ + range = $.extend(true, [], Store.luckysheet_select_save); + } + + let searchIndexArr = _this.getSearchIndexArr(searchText, range); + + if(searchIndexArr.length == 0){ + if(isEditMode()){ + alert(locale_findAndReplace.noReplceTip); + } + else{ + tooltip.info(locale_findAndReplace.noReplceTip, ""); + } + + return; + } + + //正则表达式匹配 + let regCheck = false; + if($("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")){ + regCheck = true; + } + + //整词匹配 + let wordCheck = false; + if($("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")){ + wordCheck = true; + } + + //区分大小写匹配 + let caseCheck = false; + if($("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")){ + caseCheck = true; + } + + let replaceText = $("#luckysheet-search-replace #replaceInput input").val(); + + let d = editor.deepCopyFlowData(Store.flowdata); + + if(wordCheck){ + for(let i = 0; i < searchIndexArr.length; i++){ + let r = searchIndexArr[i].r; + let c = searchIndexArr[i].c; + + let v = replaceText; + + setcellvalue(r, c, d, v); + + range.push({ "row": [r, r], "column": [c, c] }); + } + } + else{ + let reg; + if(caseCheck){ + reg = new RegExp(func_methods.getRegExpStr(searchText), "g"); + } + else{ + reg = new RegExp(func_methods.getRegExpStr(searchText), "ig"); + } + + for(let i = 0; i < searchIndexArr.length; i++){ + let r = searchIndexArr[i].r; + let c = searchIndexArr[i].c; + + let v = valueShowEs(r, c, d).toString().replace(reg, replaceText); + + setcellvalue(r, c, d, v); + + range.push({ "row": [r, r], "column": [c, c] }); + } + } + + if($("#luckysheet-search-replace #searchAllbox").is(":visible")){ + $("#luckysheet-search-replace #searchAllbox").hide(); + } + + jfrefreshgrid(d, range); + + Store.luckysheet_select_save = $.extend(true, [], range); + selectHightlightShow(); + + let succeedInfo = replaceHtml(locale_findAndReplace.successTip, { + "xlength": searchIndexArr.length + }); + if(isEditMode()){ + alert(succeedInfo); + } + else{ + tooltip.info(succeedInfo, ""); + } + } +} + +export default luckysheetSearchReplace; \ No newline at end of file diff --git a/src/controllers/select.js b/src/controllers/select.js new file mode 100644 index 000000000..006f3ec72 --- /dev/null +++ b/src/controllers/select.js @@ -0,0 +1,399 @@ +import menuButton from './menuButton'; +import formula from '../global/formula'; +import { dynamicArrayHightShow } from '../global/dynamicArray'; +import { rowLocationByIndex, colLocationByIndex } from '../global/location'; +import browser from '../global/browser'; +import { getSheetIndex, getRangetxt } from '../methods/get'; +import Store from '../store'; + +//公式函数 选区实体框 +function seletedHighlistByindex(id, r1, r2, c1, c2) { + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + $('#' + id).css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }); +} + +//选区 +function selectHightlightShow() { + $("#luckysheet-cell-selected-boxs").show(); + $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").siblings(".luckysheet-cell-selected").remove(); + + if(Store.luckysheet_select_save.length > 0){ + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + let r1 = Store.luckysheet_select_save[i].row[0], + r2 = Store.luckysheet_select_save[i].row[1]; + let c1 = Store.luckysheet_select_save[i].column[0], + c2 = Store.luckysheet_select_save[i].column[1]; + + let rf, cf; + if(Store.luckysheet_select_save[i].row_focus == null){ + rf = r1; + } + else{ + rf = Store.luckysheet_select_save[i].row_focus; + } + + if(Store.luckysheet_select_save[i].column_focus == null){ + cf = c1; + } + else{ + cf = Store.luckysheet_select_save[i].column_focus; + } + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let row_f = Store.visibledatarow[rf], + row_pre_f = rf - 1 == -1 ? 0 : Store.visibledatarow[rf - 1]; + let col_f = Store.visibledatacolumn[cf], + col_pre_f = cf - 1 == -1 ? 0 : Store.visibledatacolumn[cf - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, rf, cf); + if(!!margeset){ + row_f = margeset.row[1]; + row_pre_f = margeset.row[0]; + + col_f = margeset.column[1]; + col_pre_f = margeset.column[0]; + } + + Store.luckysheet_select_save[i]["row"] = [r1, r2]; + Store.luckysheet_select_save[i]["column"] = [c1, c2]; + + Store.luckysheet_select_save[i]["row_focus"] = rf; + Store.luckysheet_select_save[i]["column_focus"] = cf; + + Store.luckysheet_select_save[i]["left"] = col_pre_f; + Store.luckysheet_select_save[i]["width"] = col_f - col_pre_f - 1; + Store.luckysheet_select_save[i]["top"] = row_pre_f; + Store.luckysheet_select_save[i]["height"] = row_f - row_pre_f - 1; + + Store.luckysheet_select_save[i]["left_move"] = col_pre; + Store.luckysheet_select_save[i]["width_move"] = col - col_pre - 1; + Store.luckysheet_select_save[i]["top_move"] = row_pre; + Store.luckysheet_select_save[i]["height_move"] = row - row_pre - 1; + + if(i == 0){ + if(Store.luckysheet_select_save.length == 1){ + if(browser.mobilecheck()){//移动端 + $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({ + "left": Store.luckysheet_select_save[i]["left_move"], + "width": Store.luckysheet_select_save[i]["width_move"], + "top": Store.luckysheet_select_save[i]["top_move"], + "height": Store.luckysheet_select_save[i]["height_move"], + "display": "block", + "border": "1px solid #0188fb" + }) + .find(".luckysheet-cs-draghandle") + .css("display", "block") + .end() + .find(".luckysheet-cs-fillhandle") + .css("display", "none") + .end() + .find(".luckysheet-cs-touchhandle") + .css("display", "block"); + } + else{ + $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({ + "left": Store.luckysheet_select_save[i]["left_move"], + "width": Store.luckysheet_select_save[i]["width_move"], + "top": Store.luckysheet_select_save[i]["top_move"], + "height": Store.luckysheet_select_save[i]["height_move"], + "display": "block", + "border": "1px solid #0188fb" + }) + .find(".luckysheet-cs-draghandle") + .css("display", "block") + .end() + .find(".luckysheet-cs-fillhandle") + .css("display", "block") + .end() + .find(".luckysheet-cs-touchhandle") + .css("display", "none"); + } + } + else{ + $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({ + "left": Store.luckysheet_select_save[i]["left_move"], + "width": Store.luckysheet_select_save[i]["width_move"], + "top": Store.luckysheet_select_save[i]["top_move"], + "height": Store.luckysheet_select_save[i]["height_move"], + "display": "block", + "border": "1px solid rgba(1, 136, 251, 0.15)" + }) + .find(".luckysheet-cs-draghandle") + .css("display", "none") + .end() + .find(".luckysheet-cs-fillhandle") + .css("display", "none"); + } + } + else{ + $("#luckysheet-cell-selected-boxs").append('
'); + } + + if(i == Store.luckysheet_select_save.length - 1){ + //focus 取选区数组最后一个 + $("#luckysheet-cell-selected-focus").css({ + "left": Store.luckysheet_select_save[i]["left"], + "width": Store.luckysheet_select_save[i]["width"], + "top": Store.luckysheet_select_save[i]["top"], + "height": Store.luckysheet_select_save[i]["height"], + "display": "block" + }); + //行列数 + luckysheet_count_show( + Store.luckysheet_select_save[i]["left_move"], + Store.luckysheet_select_save[i]["top_move"], + Store.luckysheet_select_save[i]["width_move"], + Store.luckysheet_select_save[i]["height_move"], + [r1, r2], + [c1, c2] + ); + //左上角选择区域框 + formula.fucntionboxshow(rf, cf); + } + } + + //行列标题栏 + selectTitlesShow(Store.luckysheet_select_save); + + //左上角范围显示 + $("#luckysheet-helpbox-cell").text(getRangetxt(Store.currentSheetIndex, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1])); + + //动态数组显示 + if(Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1]){ + dynamicArrayHightShow(Store.luckysheet_select_save[0].row[0], Store.luckysheet_select_save[0].column[0]); + } + } + + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].luckysheet_select_save = Store.luckysheet_select_save; +} + +//选区标题栏 +function selectTitlesShow(rangeArr) { + let s = $.extend(true, [], rangeArr); + + let rowTitleMap = {}, columnTitleMap = {}; + for(let i = 0; i < s.length; i++){ + let r1 = s[i]["row"][0], r2 = s[i]["row"][1], c1 = s[i]["column"][0], c2 = s[i]["column"][1]; + + //行、列标题栏 + rowTitleMap = selectTitlesMap(rowTitleMap, r1, r2); + columnTitleMap = selectTitlesMap(columnTitleMap, c1, c2); + } + + //行标题 + $("#luckysheet-rows-h-selected").empty(); + + let rowTitleRange = selectTitlesRange(rowTitleMap); + for(let i = 0; i < rowTitleRange.length; i++){ + let r1 = rowTitleRange[i][0], r2 = rowTitleRange[i][rowTitleRange[i].length - 1]; + let row = rowLocationByIndex(r2)[1], row_pre = rowLocationByIndex(r1)[0]; + + $("#luckysheet-rows-h-selected").append('
'); + } + + //列标题 + $("#luckysheet-cols-h-selected").empty(); + + let columnTitleRange = selectTitlesRange(columnTitleMap); + for(let j = 0; j < columnTitleRange.length; j++){ + let c1 = columnTitleRange[j][0], c2 = columnTitleRange[j][columnTitleRange[j].length - 1]; + let col = colLocationByIndex(c2)[1], col_pre = colLocationByIndex(c1)[0]; + + $("#luckysheet-cols-h-selected").append('
'); + } +} +function selectTitlesMap(rangeMap, range1, range2) { + let map = $.extend(true, {}, rangeMap); + + for(let i = range1; i <= range2; i++){ + if(i in map){ + continue; + } + + map[i] = 0; + } + + return map; +} +function selectTitlesRange(map) { + let mapArr = []; + + for(let i in map){ + mapArr.push(i); + } + + mapArr.sort(function(a, b){ return a - b; }); + + let rangeArr = []; + let item = []; + + if(mapArr.length > 1){ + for(let j = 1; j < mapArr.length; j++){ + if(mapArr[j] - mapArr[j - 1] == 1){ + item.push(mapArr[j - 1]); + + if(j == mapArr.length - 1){ + item.push(mapArr[j]); + rangeArr.push(item); + } + } + else{ + if(j == 1){ + if(j == mapArr.length - 1){ + item.push(mapArr[j - 1]); + rangeArr.push(item); + rangeArr.push([mapArr[j]]); + } + else{ + rangeArr.push(mapArr[0]); + } + } + else if(j == mapArr.length - 1){ + item.push(mapArr[j - 1]); + rangeArr.push(item); + rangeArr.push([mapArr[j]]); + } + else{ + item.push(mapArr[j - 1]); + rangeArr.push(item); + item = []; + } + } + } + } + else{ + rangeArr.push([mapArr[0]]); + } + + return rangeArr; +} + +//选区是否重叠 +function selectIsOverlap() { + let overlap = false; + let map = {}; + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let str_r = Store.luckysheet_select_save[s].row[0], + end_r = Store.luckysheet_select_save[s].row[1]; + let str_c = Store.luckysheet_select_save[s].column[0], + end_c = Store.luckysheet_select_save[s].column[1]; + + for(let r = str_r; r <= end_r; r++){ + for(let c = str_c; c <= end_c; c++){ + if((r + "_" + c) in map){ + overlap = true; + break; + } + else{ + map[r + "_" + c] = 0; + } + } + } + } + + return overlap; +} + +//复制选区虚线框 +function selectionCopyShow(range) { + $("#luckysheet-selection-copy").empty(); + + if(range == null){ + range = Store.luckysheet_selection_range; + } + + if(range.length > 0){ + for(let s = 0; s < range.length; s++){ + let r1 = range[s].row[0], r2 = range[s].row[1]; + let c1 = range[s].column[0], c2 = range[s].column[1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let copyDomHtml = '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'; + $("#luckysheet-selection-copy").append(copyDomHtml); + } + } +} + +//选区行列数显示 +function luckysheet_count_show(left, top, width, height, rowseleted, columnseleted) { + let rowl = rowseleted[1] - rowseleted[0] + 1, + coll = columnseleted[1] - columnseleted[0] + 1; + let drawWidth = Store.luckysheetTableContentHW[0], + drawHeight = Store.luckysheetTableContentHW[1]; + let scrollWidth = $("#luckysheet-cell-main").scrollLeft(), + scrollHeight = $("#luckysheet-cell-main").scrollTop(); + + if (rowl >= 4) { + let leftv = left - 25; + if (leftv < 0) { + leftv = left + 5; + } + + if (leftv < scrollWidth) { + leftv = scrollWidth + 10; + } + + let topv = top + height / 2; + if (height > drawHeight) { + topv = scrollHeight + drawHeight / 2; + } + + $("#luckysheet-row-count-show").css({ "left": leftv, "top": topv, "display": "block" }).html("
" + rowl.toString().split("").join("
") + "
"); + } + else { + $("#luckysheet-row-count-show").hide(); + } + + if (coll >= 4) { + let topv = top - 25; + if (topv < 0) { + topv = top + 5; + } + + if (topv < scrollHeight) { + topv = scrollHeight + 10; + } + + let leftv = left + width / 2; + if (width > drawWidth) { + leftv = scrollWidth + drawWidth / 2; + } + + $("#luckysheet-column-count-show").css({ "left": leftv, "top": topv, "display": "block" }).text(coll + "列"); + } + else { + $("#luckysheet-column-count-show").hide(); + } +} + +export { + seletedHighlistByindex, + selectHightlightShow, + selectIsOverlap, + selectionCopyShow, + luckysheet_count_show, +} \ No newline at end of file diff --git a/src/controllers/selection.js b/src/controllers/selection.js new file mode 100644 index 000000000..ecef6954c --- /dev/null +++ b/src/controllers/selection.js @@ -0,0 +1,1739 @@ +import { selectHightlightShow, selectionCopyShow } from './select'; +import menuButton from './menuButton'; +import conditionformat from './conditionformat'; +import editor from '../global/editor'; +import tooltip from '../global/tooltip'; +import formula from '../global/formula'; +import { getBorderInfoCompute } from '../global/border'; +import { getdatabyselection, getcellvalue, datagridgrowth } from '../global/getdata'; +import { rowlenByRange } from '../global/getRowlen'; +import { isEditMode, hasPartMC } from '../global/validate'; +import { jfrefreshgrid, jfrefreshgrid_pastcut } from '../global/refresh'; +import { genarate, update } from '../global/format'; +import { getSheetIndex } from '../methods/get'; +import { replaceHtml, getObjType, luckysheetfontformat } from '../utils/util'; +import Store from '../store'; + +const selection = { + clearcopy: function (e) { + let clipboardData = window.clipboardData; //for IE + if (!clipboardData) { // for chrome + if (!!e) { + clipboardData = e.originalEvent.clipboardData; + } + } + let cpdata = " "; + + Store.luckysheet_selection_range = []; + selectionCopyShow(); + Store.luckysheet_copy_save = {}; + + if (!clipboardData) { + let textarea = $("#luckysheet-copy-content").css("visibility", "hidden"); + textarea.val(cpdata); + textarea.focus(); + textarea.select(); + // 等50毫秒,keyPress事件发生了再去处理数据 + setTimeout(function () { textarea.blur().css("visibility", "visible"); }, 10); + } + else { + clipboardData.setData('Text', cpdata); + return false;//否则设不生效 + } + }, + getHtmlBorderStyle: function(type, color){ + let style = ""; + let borderType = { + "0": "none", + "1": "Thin", + "2": "Hair", + "3": "Dotted", + "4": "Dashed", + "5": "DashDot", + "6": "DashDotDot", + "7": "Double", + "8": "Medium", + "9": "MediumDashed", + "10": "MediumDashDot", + "11": "MediumDashDotDot", + "12": "SlantedDashDot", + "13": "Thick" + }; + type = borderType[type.toString()]; + + if(type.indexOf("Medium") > -1){ + style += "1pt "; + } + else if(type == "Thick"){ + style += "1.5pt "; + } + else { + style += "0.5pt "; + } + + if(type == "Hair"){ + style += "double "; + } + else if(type.indexOf("DashDotDot") > -1){ + style += "dotted "; + } + else if(type.indexOf("DashDot") > -1){ + style += "dashed "; + } + else if(type.indexOf("Dotted") > -1){ + style += "dotted "; + } + else if(type.indexOf("Dashed") > -1){ + style += "dashed "; + } + else{ + style += "solid "; + } + + return style + color + ";"; + }, + copy: function (e) {//copy事件 + let clipboardData = window.clipboardData; //for IE + if (!clipboardData) { // for chrome + clipboardData = e.originalEvent.clipboardData; + } + + Store.luckysheet_selection_range = []; + //copy范围 + let minR = Store.luckysheet_select_save[0].row[0], + maxR = Store.luckysheet_select_save[0].row[1]; + let minC = Store.luckysheet_select_save[0].column[0], + maxC = Store.luckysheet_select_save[0].column[1]; + + let copyRange = [], RowlChange = false, HasMC = false; + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let range = Store.luckysheet_select_save[s]; + + if(range.row[0] < minR){ + minR = range.row[0]; + } + + if(range.row[1] > maxR){ + maxR = range.row[1]; + } + + if(range.column[0] < minC){ + minC = range.column[0]; + } + + if(range.column[1] > maxC){ + maxC = range.column[1]; + } + + for(let copyR = range.row[0]; copyR <= range.row[1]; copyR++){ + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][copyR] != null) { + continue; + } + + if (Store.config["rowlen"] != null && (copyR in Store.config["rowlen"])){ + RowlChange = true; + } + + for(let copyC = range.column[0]; copyC <= range.column[1]; copyC++){ + let cell = Store.flowdata[copyR][copyC]; + + if(getObjType(cell) == "object" && ("mc" in cell) && cell.mc.rs != null){ + HasMC = true; + } + } + } + + Store.luckysheet_selection_range.push({ "row": range.row, "column": range.column }); + copyRange.push({ "row": range.row, "column": range.column }); + } + + selectionCopyShow(); + + //qksheet内copy保存 + Store.luckysheet_copy_save = { + "dataSheetIndex": Store.currentSheetIndex, + "copyRange": copyRange, + "RowlChange": RowlChange, + "HasMC": HasMC + }; + + //copy范围数据拼接成table 赋给剪贴板 + let _this = this; + + let borderInfoCompute; + if(Store.config["borderInfo"] && Store.config["borderInfo"].length > 0){ //边框 + borderInfoCompute = getBorderInfoCompute(); + } + + let cpdata = "", + d = editor.deepCopyFlowData(Store.flowdata); + let colgroup = ""; + + for (let r = minR; r <= maxR; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + cpdata += ''; + + for (let c = minC; c <= maxC; c++) { + let column = ''; + + if (d[r] != null && d[r][c] != null) { + let style = "", span = ""; + + if(r == minR){ + if(Store.config == null || Store.config["columlen"] == null || Store.config["columlen"][c.toString()] == null){ + colgroup += ''; + } + else { + colgroup += ''; + } + } + + if(c == minC){ + if(Store.config == null || Store.config["rowlen"] == null || Store.config["rowlen"][r.toString()] == null){ + style += 'height:19px;'; + } + else { + style += 'height:'+ Store.config["rowlen"][r.toString()] + 'px;'; + } + } + + let reg = /^(w|W)((0?)|(0\.0+))$/; + let c_value; + if(d[r][c].ct != null && d[r][c].ct.fa != null && d[r][c].ct.fa.match(reg)){ + c_value = getcellvalue(r, c, d); + } + else{ + c_value = getcellvalue(r, c, d, "m"); + } + + style += menuButton.getStyleByCell(d, r, c); + + if(getObjType(d[r][c]) == "object" && ("mc" in d[r][c])){ + if("rs" in d[r][c]["mc"]){ + span = 'rowspan="'+ d[r][c]["mc"].rs +'" colspan="'+ d[r][c]["mc"].cs +'"'; + + //边框 + if(borderInfoCompute && borderInfoCompute[r + "_" + c]){ + let bl_obj = { "color": {}, "style": {} }, + br_obj = { "color": {}, "style": {} }, + bt_obj = { "color": {}, "style": {} }, + bb_obj = { "color": {}, "style": {} }; + + for(let bd_r = r; bd_r < (r + d[r][c]["mc"].rs); bd_r++){ + for(let bd_c = c; bd_c < (c + d[r][c]["mc"].cs); bd_c++){ + if(bd_r == r && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].t){ + let linetype = borderInfoCompute[bd_r + "_" + bd_c].t.style; + let bcolor = borderInfoCompute[bd_r + "_" + bd_c].t.color; + + if(bt_obj["style"][linetype] == null){ + bt_obj["style"][linetype] = 1; + } + else{ + bt_obj["style"][linetype] = bt_obj["style"][linetype] + 1; + } + + if(bt_obj["color"][bcolor] == null){ + bt_obj["color"][bcolor] = 1; + } + else{ + bt_obj["color"][bcolor] = bt_obj["color"][bcolor] + 1; + } + } + + if(bd_r == (r + d[r][c]["mc"].rs - 1) && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].b){ + let linetype = borderInfoCompute[bd_r + "_" + bd_c].b.style; + let bcolor = borderInfoCompute[bd_r + "_" + bd_c].b.color; + + if(bb_obj["style"][linetype] == null){ + bb_obj["style"][linetype] = 1; + } + else{ + bb_obj["style"][linetype] = bb_obj["style"][linetype] + 1; + } + + if(bb_obj["color"][bcolor] == null){ + bb_obj["color"][bcolor] = 1; + } + else{ + bb_obj["color"][bcolor] = bb_obj["color"][bcolor] + 1; + } + } + + if(bd_c == c && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].l){ + let linetype = borderInfoCompute[r + "_" + c].l.style; + let bcolor = borderInfoCompute[bd_r + "_" + bd_c].l.color; + + if(bl_obj["style"][linetype] == null){ + bl_obj["style"][linetype] = 1; + } + else{ + bl_obj["style"][linetype] = bl_obj["style"][linetype] + 1; + } + + if(bl_obj["color"][bcolor] == null){ + bl_obj["color"][bcolor] = 1; + } + else{ + bl_obj["color"][bcolor] = bl_obj["color"][bcolor] + 1; + } + } + + if(bd_c == (c + d[r][c]["mc"].cs - 1) && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].r){ + let linetype = borderInfoCompute[bd_r + "_" + bd_c].r.style; + let bcolor = borderInfoCompute[bd_r + "_" + bd_c].r.color; + + if(br_obj["style"][linetype] == null){ + br_obj["style"][linetype] = 1; + } + else{ + br_obj["style"][linetype] = br_obj["style"][linetype] + 1; + } + + if(br_obj["color"][bcolor] == null){ + br_obj["color"][bcolor] = 1; + } + else{ + br_obj["color"][bcolor] = br_obj["color"][bcolor] + 1; + } + } + } + } + + let rowlen = d[r][c]["mc"].rs, collen = d[r][c]["mc"].cs; + + if(JSON.stringify(bl_obj).length > 23){ + let bl_color = null, bl_style = null; + + for(let x in bl_obj.color){ + if(bl_obj.color[x] >= (rowlen / 2)){ + bl_color = x; + } + } + + for(let x in bl_obj.style){ + if(bl_obj.style[x] >= (rowlen / 2)){ + bl_style = x; + } + } + + if(bl_color != null && bl_style != null){ + style += "border-left:" + _this.getHtmlBorderStyle(bl_style, bl_color); + } + } + + if(JSON.stringify(br_obj).length > 23){ + let br_color = null, br_style = null; + + for(let x in br_obj.color){ + if(br_obj.color[x] >= (rowlen / 2)){ + br_color = x; + } + } + + for(let x in br_obj.style){ + if(br_obj.style[x] >= (rowlen / 2)){ + br_style = x; + } + } + + if(br_color != null && br_style != null){ + style += "border-right:" + _this.getHtmlBorderStyle(br_style, br_color); + } + } + + if(JSON.stringify(bt_obj).length > 23){ + let bt_color = null, bt_style = null; + + for(let x in bt_obj.color){ + if(bt_obj.color[x] >= (collen / 2)){ + bt_color = x; + } + } + + for(let x in bt_obj.style){ + if(bt_obj.style[x] >= (collen / 2)){ + bt_style = x; + } + } + + if(bt_color != null && bt_style != null){ + style += "border-top:" + _this.getHtmlBorderStyle(bt_style, bt_color); + } + } + + if(JSON.stringify(bb_obj).length > 23){ + let bb_color = null, bb_style = null; + + for(let x in bb_obj.color){ + if(bb_obj.color[x] >= (collen / 2)){ + bb_color = x; + } + } + + for(let x in bb_obj.style){ + if(bb_obj.style[x] >= (collen / 2)){ + bb_style = x; + } + } + + if(bb_color != null && bb_style != null){ + style += "border-bottom:" + _this.getHtmlBorderStyle(bb_style, bb_color); + } + } + } + } + else{ + continue; + } + } + else{ + //边框 + if(borderInfoCompute && borderInfoCompute[r + "_" + c]){ + //左边框 + if(borderInfoCompute[r + "_" + c].l){ + let linetype = borderInfoCompute[r + "_" + c].l.style; + let bcolor = borderInfoCompute[r + "_" + c].l.color; + style += "border-left:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + + //右边框 + if(borderInfoCompute[r + "_" + c].r){ + let linetype = borderInfoCompute[r + "_" + c].r.style; + let bcolor = borderInfoCompute[r + "_" + c].r.color; + style += "border-right:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + + //下边框 + if(borderInfoCompute[r + "_" + c].b){ + let linetype = borderInfoCompute[r + "_" + c].b.style; + let bcolor = borderInfoCompute[r + "_" + c].b.color; + style += "border-bottom:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + + //上边框 + if(borderInfoCompute[r + "_" + c].t){ + let linetype = borderInfoCompute[r + "_" + c].t.style; + let bcolor = borderInfoCompute[r + "_" + c].t.color; + style += "border-top:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + } + } + + column = replaceHtml(column, {"style": style, "span": span}); + + if(c_value == null){ + c_value = getcellvalue(r, c, d); + } + + if(c_value == null){ + c_value = ""; + } + + column += c_value; + } + else { + let style = ""; + + //边框 + if(borderInfoCompute && borderInfoCompute[r + "_" + c]){ + //左边框 + if(borderInfoCompute[r + "_" + c].l){ + let linetype = borderInfoCompute[r + "_" + c].l.style; + let bcolor = borderInfoCompute[r + "_" + c].l.color; + style += "border-left:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + + //右边框 + if(borderInfoCompute[r + "_" + c].r){ + let linetype = borderInfoCompute[r + "_" + c].r.style; + let bcolor = borderInfoCompute[r + "_" + c].r.color; + style += "border-right:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + + //下边框 + if(borderInfoCompute[r + "_" + c].b){ + let linetype = borderInfoCompute[r + "_" + c].b.style; + let bcolor = borderInfoCompute[r + "_" + c].b.color; + style += "border-bottom:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + + //上边框 + if(borderInfoCompute[r + "_" + c].t){ + let linetype = borderInfoCompute[r + "_" + c].t.style; + let bcolor = borderInfoCompute[r + "_" + c].t.color; + style += "border-top:" + _this.getHtmlBorderStyle(linetype, bcolor); + } + } + + column += ""; + + if(r == minR){ + if(Store.config == null || Store.config["columlen"] == null || Store.config["columlen"][c.toString()] == null){ + colgroup += ''; + } + else { + colgroup += ''; + } + } + + if(c == minC){ + if(Store.config == null || Store.config["rowlen"] == null || Store.config["rowlen"][r.toString()] == null){ + style += 'height:19px;'; + } + else { + style += 'height:'+ Store.config["rowlen"][r.toString()] + 'px;'; + } + } + + column = replaceHtml(column, {"style":style, "span":""}); + } + + column += ''; + cpdata += column; + } + + cpdata += ""; + } + cpdata = '' + colgroup + cpdata + '
'; + + Store.iscopyself = true; + + if (!clipboardData) { + let textarea = $("#luckysheet-copy-content"); + textarea.html(cpdata); + textarea.focus(); + textarea.select(); + document.execCommand("selectAll"); + document.execCommand("Copy"); + // 等50毫秒,keyPress事件发生了再去处理数据 + setTimeout(function () { + $("#luckysheet-copy-content").blur(); + }, 10); + } + else { + clipboardData.setData('Text', cpdata); + return false;//否则设不生效 + } + }, + copybyformat: function (e, txt) {//copy事件 + let clipboardData = window.clipboardData; //for IE + if (!clipboardData) { // for chrome + clipboardData = e.originalEvent.clipboardData; + } + + Store.luckysheet_selection_range = [{ "row": Store.luckysheet_select_save[0].row, "column": Store.luckysheet_select_save[0].column }]; + selectionCopyShow(); + + let cpdata = txt; + Store.iscopyself = true; + + if (!clipboardData) { + let textarea = $("#luckysheet-copy-content"); + textarea.text(cpdata); + textarea.focus(); + textarea.select(); + document.execCommand("selectAll"); + document.execCommand("Copy"); + // 等50毫秒,keyPress事件发生了再去处理数据 + setTimeout(function () { textarea.blur(); }, 10); + } + else { + clipboardData.setData('Text', cpdata); + return false;//否则设不生效 + } + }, + isPasteAction: false, + paste: function (e, triggerType) {//paste事件 + let _this = this; + + let textarea = $("#luckysheet-copy-content"); + textarea.focus(); + textarea.select(); + + // 等50毫秒,keyPress事件发生了再去处理数据 + setTimeout(function () { + let data = textarea.html(); + + if (data.indexOf("luckysheet_copy_action_table") >- 1 && Store.luckysheet_copy_save["copyRange"] != null && Store.luckysheet_copy_save["copyRange"].length > 0) { + if(Store.luckysheet_paste_iscut){ + Store.luckysheet_paste_iscut = false; + _this.pasteHandlerOfCutPaste(Store.luckysheet_copy_save); + _this.clearcopy(e); + } + else{ + _this.pasteHandlerOfCopyPaste(Store.luckysheet_copy_save); + } + } + else if (triggerType != "btn") { + _this.pasteHandler(data); + } + else { + if(isEditMode()){ + alert("在表格中进行复制粘贴: Ctrl + C 进行复制, Ctrl + V 进行粘贴, Ctrl + X 进行剪切"); + } + else{ + tooltip.info("在表格中进行复制粘贴", "Ctrl + C  进行复制
Ctrl + V  进行粘贴
Ctrl + X  进行剪切"); + } + } + }, 10); + }, + pasteHandler: function (data, borderInfo) { + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info('提示', "不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + } + + if (typeof data == "object") { + if (data.length == 0) { return; }; + + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + if(JSON.stringify(borderInfo).length > 2 && cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + let copyh = data.length, copyc = data[0].length; + + let minh = Store.luckysheet_select_save[0].row[0], //应用范围首尾行 + maxh = minh + copyh - 1; + let minc = Store.luckysheet_select_save[0].column[0], //应用范围首尾列 + maxc = minc + copyc - 1; + + //应用范围包含部分合并单元格,则return提示 + let has_PartMC = false; + if(cfg["merge"] != null){ + has_PartMC = hasPartMC(cfg, minh, maxh, minc, maxc); + } + + if(has_PartMC){ + if(isEditMode()){ + alert("不能对合并单元格做部分更改"); + } + else{ + tooltip.info('提示', "不能对合并单元格做部分更改"); + } + + return; + } + + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let rowMaxLength = d.length; + let cellMaxLength = d[0].length; + + //若应用范围超过最大行或最大列,增加行列 + let addr = maxh - rowMaxLength + 1, addc = maxc - cellMaxLength + 1; + if(addr > 0 || addc > 0){ + d = datagridgrowth([].concat(d), addr, addc, true); + } + + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + let RowlChange = false; + let offsetMC = {}; + for (let h = minh; h <= maxh; h++) { + let x = [].concat(d[h]); + + let currentRowLen = Store.defaultrowlen; + if(cfg["rowlen"][h] != null){ + currentRowLen = cfg["rowlen"][h]; + } + + for (let c = minc; c <= maxc; c++) { + if(getObjType(x[c]) == "object" && ("mc" in x[c])){ + if("rs" in x[c].mc){ + delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; + } + + delete x[c].mc; + } + + let value = null; + if (data[h - minh] != null && data[h - minh][c - minc] != null) { + value = data[h - minh][c - minc]; + } + + x[c] = $.extend(true, {}, value); + + if(value != null && "mc" in x[c]){ + if(x[c]["mc"].rs != null){ + x[c]["mc"].r = h; + x[c]["mc"].c = c; + + cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; + + offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; + } + else{ + x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } + } + } + + if(borderInfo[(h - minh) + "_" + (c - minc)]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": borderInfo[(h - minh) + "_" + (c - minc)].l, + "r": borderInfo[(h - minh) + "_" + (c - minc)].r, + "t": borderInfo[(h - minh) + "_" + (c - minc)].t, + "b": borderInfo[(h - minh) + "_" + (c - minc)].b + } + } + + cfg["borderInfo"].push(bd_obj); + } + + let fontset = luckysheetfontformat(x[c]); + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + //比较计算高度和当前高度取最大高度 + if(oneLineTextHeight > currentRowLen){ + currentRowLen = oneLineTextHeight; + RowlChange = true; + } + } + d[h] = x; + + if(currentRowLen != Store.defaultrowlen){ + cfg["rowlen"][h] = currentRowLen; + } + } + + Store.luckysheet_select_save = [{ "row": [minh, maxh], "column": [minc, maxc] }]; + + if(addr > 0 || addc > 0 || RowlChange){ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, null, true); + } + else{ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg); + selectHightlightShow(); + } + } + else { + data = data.replace(/\r/g, ""); + let dataChe = []; + let che = data.split("\n"), + colchelen = che[0].split("\t").length; + + for (let i = 0; i < che.length; i++) { + if (che[i].split("\t").length < colchelen) { + continue; + } + + dataChe.push(che[i].split("\t")); + } + + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let curR = last["row"] == null ? 0 : last["row"][0]; + let curC = last["column"] == null ? 0 : last["column"][0]; + let rlen = dataChe.length, clen = dataChe[0].length; + + //应用范围包含部分合并单元格,则return提示 + let has_PartMC = false; + if(Store.config["merge"] != null){ + has_PartMC = hasPartMC(Store.config, curR, curR + rlen - 1, curC, curC + clen - 1); + } + + if(has_PartMC){ + if(isEditMode()){ + alert("不能对合并单元格做部分更改"); + } + else{ + tooltip.info('提示',"不能对合并单元格做部分更改"); + } + return; + } + + let addr = curR + rlen - d.length, addc = curC + clen - d[0].length; + if(addr > 0 || addc > 0){ + d = datagridgrowth([].concat(d), addr, addc, true); + } + + for (let r = 0; r < rlen; r++) { + let x = [].concat(d[r + curR]); + for (let c = 0; c < clen; c++) { + let cell = {}; + + let mask = genarate(dataChe[r][c]); + cell.v = mask[2]; + cell.ct = mask[1]; + cell.m = mask[0]; + + x[c + curC] = cell; + } + d[r + curR] = x; + } + + last["row"] = [curR, curR + rlen - 1]; + last["column"] = [curC, curC + clen - 1]; + + if (addr > 0 || addc > 0) { + jfrefreshgrid(d, Store.luckysheet_select_save, null, null, true); + } + else { + jfrefreshgrid(d, Store.luckysheet_select_save); + selectHightlightShow(); + } + } + }, + pasteHandlerOfCutPaste: function(copyRange){ + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + //复制范围 + let copyHasMC = copyRange["HasMC"]; + let copyRowlChange = copyRange["RowlChange"]; + + let copySheetIndex = copyRange["dataSheetIndex"]; + let copyData = $.extend(true, [], getdatabyselection({"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, copySheetIndex)); + + let copyh = copyData.length, copyc = copyData[0].length; + + //应用范围 + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let minh = last["row_focus"], maxh = minh + copyh - 1; //应用范围首尾行 + let minc = last["column_focus"], maxc = minc + copyc - 1; //应用范围首尾列 + + //应用范围包含部分合并单元格,则提示 + let has_PartMC = false; + if(cfg["merge"] != null){ + has_PartMC = hasPartMC(cfg, minh, maxh, minc, maxc); + } + + if(has_PartMC){ + if(isEditMode()){ + alert("不能对合并单元格做部分更改"); + } + else{ + tooltip.info('提示',"不能对合并单元格做部分更改"); + } + return; + } + + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let rowMaxLength = d.length; + let cellMaxLength = d[0].length; + + let addr = copyh + minh - rowMaxLength, addc = copyc + minc - cellMaxLength; + if(addr > 0 || addc > 0){ + d = datagridgrowth([].concat(d), addr, addc, true); + } + + let borderInfoCompute = getBorderInfoCompute(copySheetIndex); + + //剪切粘贴在当前表操作,删除剪切范围内数据和合并单元格 + if(Store.currentSheetIndex == copySheetIndex){ + for(let i = copyRange["copyRange"][0].row[0]; i <= copyRange["copyRange"][0].row[1]; i++){ + for(let j = copyRange["copyRange"][0].column[0]; j <= copyRange["copyRange"][0].column[1]; j++){ + let cell = d[i][j]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + if("rs" in cell["mc"]){ + delete cfg["merge"][cell["mc"].r + "_" + cell["mc"].c]; + } + delete cell["mc"]; + } + + d[i][j] = null; + } + } + + //边框 + if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ + let source_borderInfo = []; + + for(let i = 0; i < cfg["borderInfo"].length; i++){ + let bd_rangeType = cfg["borderInfo"][i].rangeType; + + if(bd_rangeType == "range"){ + let bd_range = cfg["borderInfo"][i].range; + let bd_emptyRange = []; + + for(let j = 0; j < bd_range.length; j++){ + bd_emptyRange = bd_emptyRange.concat(conditionformat.CFSplitRange(bd_range[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "restPart")); + } + + cfg["borderInfo"][i].range = bd_emptyRange; + + source_borderInfo.push(cfg["borderInfo"][i]); + } + else if(bd_rangeType == "cell"){ + let bd_r = cfg["borderInfo"][i].value.row_index; + let bd_c = cfg["borderInfo"][i].value.col_index; + + if(!(bd_r >= copyRange["copyRange"][0].row[0] && bd_r <= copyRange["copyRange"][0].row[1] && bd_c >= copyRange["copyRange"][0].column[0] && bd_c <= copyRange["copyRange"][0].column[1])){ + source_borderInfo.push(cfg["borderInfo"][i]); + } + } + } + + cfg["borderInfo"] = source_borderInfo; + } + } + + let offsetMC = {}; + for (let h = minh; h <= maxh; h++) { + let x = [].concat(d[h]); + + for (let c = minc; c <= maxc; c++) { + if(borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].l, + "r": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].r, + "t": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].t, + "b": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].b + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[h + "_" + c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + + if(getObjType(x[c]) == "object" && ("mc" in x[c])){ + if("rs" in x[c].mc){ + delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; + } + delete x[c].mc; + } + + let value = null; + if (copyData[h - minh] != null && copyData[h - minh][c - minc] != null) { + value = copyData[h - minh][c - minc]; + } + + x[c] = $.extend(true, {}, value); + + if(value != null && copyHasMC && ("mc" in x[c])){ + if(x[c]["mc"].rs != null){ + x[c]["mc"].r = h; + x[c]["mc"].c = c; + + cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; + + offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; + } + else{ + x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } + } + } + } + + d[h] = x; + } + + last["row"] = [minh, maxh]; + last["column"] = [minc, maxc]; + + //若有行高改变,重新计算行高改变 + if(copyRowlChange){ + if(Store.currentSheetIndex != copySheetIndex){ + cfg = rowlenByRange(d, minh, maxh, cfg); + } + else{ + cfg = rowlenByRange(d, copyRange["copyRange"][0].row[0], copyRange["copyRange"][0].row[1], cfg); + cfg = rowlenByRange(d, minh, maxh, cfg); + } + } + + let source, target; + if(Store.currentSheetIndex != copySheetIndex){ + //跨表操作 + let sourceData = $.extend(true, [], Store.luckysheetfile[getSheetIndex(copySheetIndex)]["data"]); + let sourceConfig = $.extend(true, {}, Store.luckysheetfile[getSheetIndex(copySheetIndex)]["config"]); + + let sourceCurData = $.extend(true, [], sourceData); + let sourceCurConfig = $.extend(true, {}, sourceConfig); + if(sourceCurConfig["merge"] == null){ + sourceCurConfig["merge"] = {}; + } + + let source_r1 = copyRange["copyRange"][0].row[0], + source_r2 = copyRange["copyRange"][0].row[1]; + let source_c1 = copyRange["copyRange"][0].column[0], + source_c2 = copyRange["copyRange"][0].column[1]; + + for(let source_r = source_r1; source_r <= source_r2; source_r++){ + for(let source_c = source_c1; source_c <= source_c2; source_c++){ + let cell = sourceCurData[source_r][source_c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + if("rs" in cell["mc"]){ + delete sourceCurConfig["merge"][cell["mc"].r + "_" + cell["mc"].c]; + } + delete cell["mc"]; + } + sourceCurData[source_r][source_c] = null; + } + } + + if(copyRowlChange){ + sourceCurConfig = rowlenByRange(sourceCurData, source_r1, source_r2, sourceCurConfig); + } + + //边框 + if(sourceCurConfig["borderInfo"] && sourceCurConfig["borderInfo"].length > 0){ + let source_borderInfo = []; + + for(let i = 0; i < sourceCurConfig["borderInfo"].length; i++){ + let bd_rangeType = sourceCurConfig["borderInfo"][i].rangeType; + + if(bd_rangeType == "range"){ + let bd_range = sourceCurConfig["borderInfo"][i].range; + let bd_emptyRange = []; + + for(let j = 0; j < bd_range.length; j++){ + bd_emptyRange = bd_emptyRange.concat(conditionformat.CFSplitRange(bd_range[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "restPart")); + } + + sourceCurConfig["borderInfo"][i].range = bd_emptyRange; + + source_borderInfo.push(sourceCurConfig["borderInfo"][i]); + } + else if(bd_rangeType == "cell"){ + let bd_r = sourceCurConfig["borderInfo"][i].value.row_index; + let bd_c = sourceCurConfig["borderInfo"][i].value.col_index; + + if(!(bd_r >= copyRange["copyRange"][0].row[0] && bd_r <= copyRange["copyRange"][0].row[1] && bd_c >= copyRange["copyRange"][0].column[0] && bd_c <= copyRange["copyRange"][0].column[1])){ + source_borderInfo.push(sourceCurConfig["borderInfo"][i]); + } + } + } + + sourceCurConfig["borderInfo"] = source_borderInfo; + } + + //条件格式 + let source_cdformat = $.extend(true, [], Store.luckysheetfile[getSheetIndex(copySheetIndex)]["luckysheet_conditionformat_save"]); + let source_curCdformat = $.extend(true, [], source_cdformat); + let ruleArr = []; + if(source_curCdformat != null && source_curCdformat.length > 0){ + for(let i = 0; i < source_curCdformat.length; i++){ + let source_curCdformat_cellrange = source_curCdformat[i].cellrange; + let emptyRange = []; + let emptyRange2 = []; + + for(let j = 0; j < source_curCdformat_cellrange.length; j++){ + let range = conditionformat.CFSplitRange(source_curCdformat_cellrange[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "restPart"); + emptyRange = emptyRange.concat(range); + + let range2 = conditionformat.CFSplitRange(source_curCdformat_cellrange[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "operatePart"); + if(range2.length > 0){ + emptyRange2 = emptyRange2.concat(range2); + } + } + + source_curCdformat[i].cellrange = emptyRange; + + if(emptyRange2.length > 0){ + let ruleObj = $.extend(true, {}, source_curCdformat[i]); + ruleObj.cellrange = emptyRange2; + ruleArr.push(ruleObj); + } + } + } + + let target_cdformat = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]); + let target_curCdformat = $.extend(true, [], target_cdformat); + if(ruleArr.length > 0){ + target_curCdformat = target_curCdformat.concat(ruleArr); + } + + source = { + "sheetIndex": copySheetIndex, + "data": sourceData, + "curData": sourceCurData, + "config": sourceConfig, + "curConfig": sourceCurConfig, + "cdformat": source_cdformat, + "curCdformat": source_curCdformat, + "range": { + "row": copyRange["copyRange"][0].row, + "column": copyRange["copyRange"][0].column + } + } + target = { + "sheetIndex": Store.currentSheetIndex, + "data": Store.flowdata, + "curData": d, + "config": $.extend(true, {}, Store.config), + "curConfig": cfg, + "cdformat": target_cdformat, + "curCdformat": target_curCdformat, + "range": { + "row": [minh, maxh], + "column": [minc, maxc] + } + } + } + else{ + //条件格式 + let cdformat = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]); + let curCdformat = $.extend(true, [], cdformat); + if(curCdformat != null && curCdformat.length > 0){ + for(let i = 0; i < curCdformat.length; i++){ + let cellrange = curCdformat[i].cellrange; + let emptyRange = []; + + for(let j = 0; j < cellrange.length; j++){ + let range = conditionformat.CFSplitRange(cellrange[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "allPart"); + emptyRange = emptyRange.concat(range); + } + + curCdformat[i].cellrange = emptyRange; + } + } + + //当前表操作 + source = { + "sheetIndex": Store.currentSheetIndex, + "data": Store.flowdata, + "curData": d, + "config": $.extend(true, {}, Store.config), + "curConfig": cfg, + "cdformat": cdformat, + "curCdformat": curCdformat, + "range": { + "row": copyRange["copyRange"][0].row, + "column": copyRange["copyRange"][0].column + } + } + target = { + "sheetIndex": Store.currentSheetIndex, + "data": Store.flowdata, + "curData": d, + "config": $.extend(true, {}, Store.config), + "curConfig": cfg, + "cdformat": cdformat, + "curCdformat": curCdformat, + "range": { + "row": [minh, maxh], + "column": [minc, maxc] + } + } + } + + if(addr > 0 || addc > 0){ + jfrefreshgrid_pastcut(source, target, true); + } + else{ + jfrefreshgrid_pastcut(source, target, copyRowlChange); + } + }, + pasteHandlerOfCopyPaste: function(copyRange){ + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + //复制范围 + let copyHasMC = copyRange["HasMC"]; + let copyRowlChange = copyRange["RowlChange"]; + let copySheetIndex = copyRange["dataSheetIndex"]; + + let arr = [], isSameRow = false; + for(let i = 0; i < copyRange["copyRange"].length; i++){ + let arrData = getdatabyselection({"row": copyRange["copyRange"][i].row, "column": copyRange["copyRange"][i].column}, copySheetIndex); + if(copyRange["copyRange"].length > 1){ + if(copyRange["copyRange"][0].row[0] == copyRange["copyRange"][1].row[0] && copyRange["copyRange"][0].row[1] == copyRange["copyRange"][1].row[1]){ + arrData = arrData[0].map(function(col, a){ + return arrData.map(function(row){ + return row[a]; + }); + }); + + arr = arr.concat(arrData); + + isSameRow = true; + } + else if(copyRange["copyRange"][0].column[0] == copyRange["copyRange"][1].column[0] && copyRange["copyRange"][0].column[1] == copyRange["copyRange"][1].column[1]){ + arr = arr.concat(arrData); + } + } + else{ + arr = arrData; + } + } + + if(isSameRow){ + arr = arr[0].map(function(col, b){ + return arr.map(function(row){ + return row[b]; + }) + }) + } + + let copyData = $.extend(true, [], arr); + + //多重选择选择区域 单元格如果有函数 则只取值 不取函数 + if(copyRange["copyRange"].length > 1){ + for(let i = 0; i < copyData.length; i++){ + for(let j = 0; j < copyData[i].length; j++){ + if(copyData[i][j] != null && copyData[i][j].f != null){ + delete copyData[i][j].f; + delete copyData[i][j].spl; + } + } + } + } + + let copyh = copyData.length, copyc = copyData[0].length; + + //应用范围 + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let minh = last["row"][0], maxh = last["row"][1]; //应用范围首尾行 + let minc = last["column"][0], maxc = last["column"][1]; //应用范围首尾列 + + let mh = (maxh - minh + 1) % copyh; + let mc = (maxc - minc + 1) % copyc; + + if(mh != 0 || mc != 0){ //若应用范围不是copydata行列数的整数倍,则取copydata的行列数 + maxh = minh + copyh - 1; + maxc = minc + copyc - 1; + } + + //应用范围包含部分合并单元格,则提示 + let has_PartMC = false; + if(cfg["merge"] != null){ + has_PartMC = hasPartMC(cfg, minh, maxh, minc, maxc); + } + + if(has_PartMC){ + if(isEditMode()){ + alert("不能对合并单元格做部分更改"); + } + else{ + tooltip.info('提示',"不能对合并单元格做部分更改"); + } + return; + } + + let timesH = (maxh - minh + 1) / copyh; + let timesC = (maxc - minc + 1) / copyc; + + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let rowMaxLength = d.length; + let cellMaxLength = d[0].length; + + //若应用范围超过最大行或最大列,增加行列 + let addr = copyh + minh - rowMaxLength, addc = copyc + minc - cellMaxLength; + if(addr > 0 || addc > 0){ + d = datagridgrowth([].concat(d), addr, addc, true); + } + + let borderInfoCompute = getBorderInfoCompute(copySheetIndex); + + let mth = 0, mtc = 0, maxcellCahe = 0, maxrowCache = 0; + for(let th = 1; th <= timesH; th++){ + for(let tc = 1; tc <= timesC; tc++){ + mth = minh + (th - 1) * copyh; + mtc = minc + (tc - 1) * copyc; + maxrowCache = minh + th * copyh; + maxcellCahe = minc + tc * copyc; + + //行列位移值 用于单元格有函数 + let offsetRow = mth - copyRange["copyRange"][0].row[0]; + let offsetCol = mtc - copyRange["copyRange"][0].column[0]; + + let offsetMC = {}; + for (let h = mth; h < maxrowCache; h++) { + let x = [].concat(d[h]); + + for (let c = mtc; c < maxcellCahe; c++) { + if(borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].l, + "r": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].r, + "t": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].t, + "b": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].b + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[h + "_" + c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + + if(getObjType(x[c]) == "object" && "mc" in x[c]){ + if("rs" in x[c].mc){ + delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; + } + delete x[c].mc; + } + + let value = null; + if (copyData[h - mth] != null && copyData[h - mth][c - mtc] != null) { + value = $.extend(true, {}, copyData[h - mth][c - mtc]); + } + + if(value != null && value.f != null){ + let func = value.f; + + if(offsetRow > 0){ + func = "=" + formula.functionCopy(func, "down", offsetRow); + } + + if(offsetRow < 0){ + func = "=" + formula.functionCopy(func, "up", Math.abs(offsetRow)); + } + + if(offsetCol > 0){ + func = "=" + formula.functionCopy(func, "right", offsetCol); + } + + if(offsetCol < 0){ + func = "=" + formula.functionCopy(func, "left", Math.abs(offsetCol)); + } + + let funcV = formula.execfunction(func, h, c, true); + + if(value.spl != null){ + value.f = funcV[2]; + value.v = funcV[1]; + value.spl = funcV[3].data; + } + else{ + value.f = funcV[2]; + value.v = funcV[1]; + + if(value.ct != null && value.ct["fa"] != null){ + value.m = update(value.ct["fa"], funcV[1]); + } + } + } + + x[c] = $.extend(true, {}, value); + + if(value != null && copyHasMC && ("mc" in x[c])){ + if(x[c]["mc"].rs != null){ + x[c]["mc"].r = h; + x[c]["mc"].c = c; + + cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; + + offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; + } + else{ + x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } + } + } + } + + d[h] = x; + } + } + } + + //复制范围 是否有 条件格式 + let ruleArr_cf = [], cdformat = []; + if(copyRange["copyRange"].length == 1){ + let c_file = Store.luckysheetfile[getSheetIndex(copySheetIndex)]; + let a_file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + let c_r1 = copyRange["copyRange"][0].row[0], + c_r2 = copyRange["copyRange"][0].row[1], + c_c1 = copyRange["copyRange"][0].column[0], + c_c2 = copyRange["copyRange"][0].column[1]; + + ruleArr_cf = $.extend(true, [], c_file["luckysheet_conditionformat_save"]); + cdformat = $.extend(true, [], a_file["luckysheet_conditionformat_save"]); + + if(ruleArr_cf != null && ruleArr_cf.length > 0){ + for(let i = 0; i < ruleArr_cf.length; i++){ + let cf_range = ruleArr_cf[i].cellrange; + + let emptyRange = []; + + for(let th = 1; th <= timesH; th++){ + for(let tc = 1; tc <= timesC; tc++){ + mth = minh + (th - 1) * copyh; + mtc = minc + (tc - 1) * copyc; + maxrowCache = minh + th * copyh; + maxcellCahe = minc + tc * copyc; + + for(let j = 0; j < cf_range.length; j++){ + let range = conditionformat.CFSplitRange(cf_range[j], {"row": [c_r1, c_r2], "column": [c_c1, c_c2]}, {"row": [mth, maxrowCache - 1], "column": [mtc, maxcellCahe - 1]}, "operatePart"); + if(range.length > 0){ + emptyRange = emptyRange.concat(range); + } + } + } + } + + if(emptyRange.length > 0){ + ruleArr_cf[i].cellrange = emptyRange; + cdformat.push(ruleArr_cf[i]); + } + } + } + } + + last["row"] = [minh, maxh]; + last["column"] = [minc, maxc]; + + if(copyRowlChange || addr > 0 || addc > 0){ + cfg = rowlenByRange(d, minh, maxh, cfg); + + if(copyRange["copyRange"].length == 1 && ruleArr_cf != null && ruleArr_cf.length > 0){ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, cdformat, true); + } + else{ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, null, true); + } + } + else{ + if(copyRange["copyRange"].length == 1 && ruleArr_cf != null && ruleArr_cf.length > 0){ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, cdformat); + } + else{ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg); + } + + selectHightlightShow(); + } + }, + pasteHandlerOfPaintModel: function(copyRange){ + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + //复制范围 + let copyHasMC = copyRange["HasMC"]; + let copyRowlChange = copyRange["RowlChange"]; + + let copySheetIndex = copyRange["dataSheetIndex"]; + let copyData = $.extend(true, [], getdatabyselection({"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, copySheetIndex)); + + //应用范围 + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let minh = last["row"][0], maxh = last["row"][1]; //应用范围首尾行 + let minc = last["column"][0], maxc = last["column"][1]; //应用范围首尾列 + + let copyh = copyData.length, copyc = copyData[0].length; + + if(minh == maxh && minc == maxc){ + //应用范围是一个单元格,自动增加到复制范围大小 (若自动增加的范围包含部分合并单元格,则提示) + let has_PartMC = false; + if(cfg["merge"] != null){ + has_PartMC = hasPartMC(cfg, minh, minh + copyh - 1, minc, minc + copyc - 1); + } + + if(has_PartMC){ + if(isEditMode()){ + alert("不能对合并单元格做部分更改"); + } + else{ + tooltip.info('提示',"不能对合并单元格做部分更改"); + } + return; + } + + maxh = minh + copyh - 1; + maxc = minc + copyc - 1; + } + + let timesH = Math.ceil((maxh - minh + 1) / copyh); //复制行 组数 + let timesC = Math.ceil((maxc - minc + 1) / copyc); //复制列 组数 + + let d = editor.deepCopyFlowData(Store.flowdata);//取数据 + let cellMaxLength = d[0].length; + let rowMaxLength = d.length; + + let borderInfoCompute = getBorderInfoCompute(copySheetIndex); + + let mth = 0, mtc = 0, maxcellCahe = 0, maxrowCache = 0; + for (let th = 1; th <= timesH; th++) { + for (let tc = 1; tc <= timesC; tc++) { + mth = minh + (th - 1) * copyh; + mtc = minc + (tc - 1) * copyc; + + maxrowCache = minh + th * copyh > rowMaxLength ? rowMaxLength : minh + th * copyh; + if(maxrowCache > (maxh + 1)){ + maxrowCache = maxh + 1; + } + + maxcellCahe = minc + tc * copyc > cellMaxLength ? cellMaxLength : minc + tc * copyc; + if(maxcellCahe > (maxc + 1)){ + maxcellCahe = maxc + 1; + } + + let offsetMC = {}; + for (let h = mth; h < maxrowCache; h++) { + let x = [].concat(d[h]); + + for (let c = mtc; c < maxcellCahe; c++) { + if(borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].l, + "r": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].r, + "t": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].t, + "b": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].b + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + else if(borderInfoCompute[h + "_" + c]){ + let bd_obj = { + "rangeType": "cell", + "value": { + "row_index": h, + "col_index": c, + "l": null, + "r": null, + "t": null, + "b": null + } + } + + if(cfg["borderInfo"] == null){ + cfg["borderInfo"] = []; + } + + cfg["borderInfo"].push(bd_obj); + } + + if(getObjType(x[c]) == "object" && ("mc" in x[c])){ + if("rs" in x[c].mc){ + delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; + } + delete x[c].mc; + } + + let value = null; + if (copyData[h - mth] != null && copyData[h - mth][c - mtc] != null) { + value = copyData[h - mth][c - mtc]; + } + + if(value != null){ + delete value["v"]; + delete value["m"]; + delete value["f"]; + delete value["spl"]; + + if(getObjType(x[c]) == "object"){ + + } + else{ + x[c] = {"v": x[c] }; + } + + x[c] = $.extend(true, x[c], value); + + if(copyHasMC && ("mc" in x[c])){ + if(x[c]["mc"].rs != null){ + x[c]["mc"].r = h; + if(x[c]["mc"].rs + h >= maxrowCache){ + x[c]["mc"].rs = maxrowCache - h; + } + + x[c]["mc"].c = c; + if(x[c]["mc"].cs + c >= maxcellCahe){ + x[c]["mc"].cs = maxcellCahe - c; + } + + cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; + + offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; + } + else{ + x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } + } + } + + if(x[c].v != null){ + if(value["ct"] != null && value["ct"]["fa"] != null){ + let mask = update(value["ct"]["fa"], x[c].v); + x[c].m = mask; + } + } + } + } + + d[h] = x; + } + } + } + + //复制范围 是否有 条件格式 + let ruleArr = $.extend(true, [], Store.luckysheetfile[getSheetIndex(copySheetIndex)]["luckysheet_conditionformat_save"]); + let cdformat = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]); + + if(ruleArr != null && ruleArr.length > 0){ + for(let i = 0; i < ruleArr.length; i++){ + let cdformat_cellrange = ruleArr[i].cellrange; + let emptyRange = []; + + for(let j = 0; j < cdformat_cellrange.length; j++){ + let range = conditionformat.CFSplitRange(cdformat_cellrange[j], {"row": copyRange["copyRange"][0]["row"], "column": copyRange["copyRange"][0]["column"]}, {"row": [minh, maxh], "column": [minc, maxc]}, "operatePart"); + if(range.length > 0){ + emptyRange = emptyRange.concat(range); + } + } + + if(emptyRange.length > 0){ + ruleArr[i].cellrange = [{"row": [minh, maxh], "column": [minc, maxc]}]; + cdformat.push(ruleArr[i]); + } + } + } + + last["row"] = [minh, maxh]; + last["column"] = [minc, maxc]; + + if(copyRowlChange){ + cfg = rowlenByRange(d, minh, maxh, cfg); + + if(ruleArr != null && ruleArr.length > 0){ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, cdformat, true); + } + else{ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, null, true); + } + } + else{ + if(ruleArr != null && ruleArr.length > 0){ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg, cdformat); + } + else{ + jfrefreshgrid(d, Store.luckysheet_select_save, cfg); + } + + selectHightlightShow(); + } + }, + matchcopy: function (data1, data2) { + let data1cache = [], data2cache = [], data1len, data2len; + if (typeof data1 == "object") { + data1cache = data1; + } + else { + data1cache = data1.split("\n"); + for (let i = 0; i < data1cache.length; i++) { + data1cache[i] = data1cache[i].split("\t"); + } + } + + data1len = data1cache.length; + + if (typeof data2 == "object") { + data2cache = data2; + } + else { + data2cache = data2.split("\n"); + for (let i = 0; i < data2cache.length; i++) { + data2cache[i] = data2cache[i].split("\t"); + } + } + + data2len = data2cache.length; + + if (data1len != data2len) { + return false; + } + + + for (let r1 = 0; r1 < data1len; r1++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r1] != null) { + continue; + } + + for (let r2 = 0; r2 < data2len; r2++) { + if (data1cache[r1].length != data2cache[r2].length) { + return false; + } + } + } + + for (let r = 0; r < data1len; r++) { + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + for (let c = 0; c < data1cache[0].length; c++) { + if (getcellvalue(r, c, data1cache) != getcellvalue(r, c, data2cache)) { + return false; + } + } + } + + return true; + } +}; + +export default selection; \ No newline at end of file diff --git a/src/controllers/server.js b/src/controllers/server.js new file mode 100644 index 000000000..9caa47467 --- /dev/null +++ b/src/controllers/server.js @@ -0,0 +1,1072 @@ +import { showloading, hideloading } from '../global/loading'; +import { luckysheetrefreshgrid, jfrefreshgrid_rhcw } from '../global/refresh'; +import { sheetHTML, luckyColor } from './constant'; +import sheetmanage from './sheetmanage'; +import menuButton from './menuButton'; +import { createFilterOptions } from './filter'; +import luckysheetFreezen from './freezen'; +import luckysheetPostil from './postil'; +import { getObjType, replaceHtml, getByteLen } from '../utils/util'; +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; +import locale from '../locale/locale'; + +const server = { + gridKey: null, + loadUrl: null, + updateUrl: null, + updateImageUrl: null, + title: null, + loadSheetUrl: null, + allowUpdate: false, //共享编辑模式 + historyParam: function(data, sheetIndex, range) { + let _this = this; + + let r1 = range.row[0], r2 = range.row[1]; + let c1 = range.column[0], c2 = range.column[1]; + + if(r1 == r2 && c1 == c2){ //单个单元格更新 + let v = data[r1][c1]; + _this.saveParam("v", sheetIndex, v, { "r": r1, "c": c1 }); + } + else{ //范围单元格更新 + let rowlen = r2 - r1 + 1; + let collen = c2 - c1 + 1; + + let timeR = Math.floor(1000 / collen); + let n = Math.ceil(rowlen / timeR); //分批次更新,一次最多1000个单元格 + + for(let i = 0; i < n; i++){ + let str = r1 + timeR * i; + + let edr; + if(i == n - 1){ + edr = r2; + } + else{ + edr = r1 + timeR * (i + 1) - 1; + } + + let v = []; + + for(let r = str; r <= edr; r++){ + let v_row = []; + + for(let c = c1; c <= c2; c++){ + v_row.push(data[r][c]); + } + + v.push(v_row); + } + + _this.saveParam("rv", sheetIndex, v, { "range": { "row": [str, edr], "column": [c1, c2] } }); + + if(i == n - 1){ + _this.saveParam("rv_end", sheetIndex, null); + } + } + } + }, + saveParam: function (type, index, value, params) { + let _this = this; + + if(!_this.allowUpdate){ + return; + } + + if(value == undefined){ + value = null; + } + + let d = {}; + d.t = type; + d.i = index; + d.v = value; + + if (type == "rv") { //单元格批量更新 + d.range = params.range; + } + else if (type == "v" || type == "fu" || type == "fm") { + d.r = params.r; + d.c = params.c; + } + else if (type == "fc") { + d.op = params.op; + d.pos = params.pos; + } + else if (type == "drc" || type == "arc" || type == "h" || type == "wh") { + d.rc = params.rc; + } + else if (type == "c") { + d.cid = params.cid; + d.op = params.op; + } + else if (type == "f") { + d.op = params.op; + d.pos = params.pos; + } + else if (type == "s") { + + } + else if (type == "sh") { + d.op = params.op; + if(params.cur != null){ + d.cur = params.cur; + } + } + else if (type == "cg") { + d.k = params.k; + } + else if (type == "all") { + d.k = params.k; + // d.s = params.s; + } + + let msg = pako.gzip(encodeURIComponent(JSON.stringify(d)), { to: "string" }); + + _this.websocket.send(msg); + }, + websocket: null, + wxErrorCount: 0, + openWebSocket: function(){ + let _this = this; + + if('WebSocket' in window){ + _this.websocket = new WebSocket(_this.updateUrl + "?t=111&g=" + encodeURIComponent(_this.gridKey)); + + //连接建立时触发 + _this.websocket.onopen = function() { + console.info('WebSocket连接成功'); + hideloading(); + _this.wxErrorCount = 0; + + //防止websocket长时间不发送消息导致断连 + setInterval(function(){ + _this.websocket.send("rub"); + }, 60000); + } + + //客户端接收服务端数据时触发 + _this.websocket.onmessage = function(result){ + let data = eval('(' + result.data + ')'); + console.info(data); + let type = data.type; + + if(type == 1){ //send 成功或失败 + + } + else if(type == 2){ //更新数据 + let item = JSON.parse(data.data); + _this.wsUpdateMsg(item); + } + else if(type == 3){ //多人操作不同选区("t": "mv")(用不同颜色显示其他人所操作的选区) + let id = data.id; + let username = data.username; + let item = JSON.parse(data.data); + + let type = item.t, + index = item.i, + value = item.v; + + if(getObjType(value) != "array"){ + value = JSON.parse(value); + } + + if(index == Store.currentSheetIndex){//发送消息者在当前页面 + let r = value[value.length - 1].row[0]; + let c = value[value.length - 1].column[0]; + + _this.multipleRangeShow(id, username, r, c); + } + } + else if(type == 4){ //批量指令更新 + let items = JSON.parse(data.data); + + for(let i = 0; i < items.length; i++){ + _this.wsUpdateMsg(item[i]); + } + } + } + + //通信发生错误时触发 + _this.websocket.onerror = function(){ + _this.wxErrorCount++; + + if(_this.wxErrorCount > 3){ + showloading("WebSocket连接发生错误, 请刷新页面!"); + } + else{ + showloading("WebSocket连接发生错误, 请耐心等待!"); + _this.openWebSocket(); + } + } + + //连接关闭时触发 + _this.websocket.onclose = function(){ + console.info('WebSocket连接关闭'); + alert("服务器通信发生错误,请刷新页面后再试,如若不行请联系管理员!"); + } + } + else{ + alert('当前浏览器 Not Support WebSocket'); + } + }, + wsUpdateMsg: function(item) { + let type = item.t, + index = item.i, + value = item.v; + + let file = Store.luckysheetfile[getSheetIndex(index)]; + + if(file == null){ + return; + } + + if(type == "v"){ //单个单元格数据更新 + if(file.data == null || file.data.length == 0){ + return; + } + + let r = item.r, c = item.c; + file.data[r][c] = value; + + if(index == Store.currentSheetIndex){//更新数据为当前表格数据 + Store.flowdata = file.data; + + //如果更新的单元格有批注 + if(value != null && value.ps != null){ + luckysheetPostil.buildPs(r, c, value.ps); + } + else{ + luckysheetPostil.buildPs(r, c, null); + } + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(type == "rv"){ //范围单元格数据更新 + if(file.data == null || file.data.length == 0){ + return; + } + + let r1 = item.range.row[0], r2 = item.range.row[1]; + let c1 = item.range.column[0], c2 = item.range.column[1]; + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + file.data[r][c] = value[r - r1][c - c1]; + } + } + + if(index == Store.currentSheetIndex){//更新数据为当前表格数据 + Store.flowdata = file.data; + + //如果更新的单元格有批注 + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + if(value[r - r1][c - c1] != null && value[r - r1][c - c1].ps != null){ + luckysheetPostil.buildPs(r, c, value[r - r1][c - c1].ps); + } + else{ + luckysheetPostil.buildPs(r, c, null); + } + } + } + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(type == "cg"){ //config更新(rowhidden,rowlen,columlen,merge,borderInfo) + let k = item.k; + + if(k == "borderInfo"){ + file["config"]["borderInfo"] = value; + } + else{ + if(!(k in file["config"])){ + file["config"][k] = {}; + } + + for(let key in value){ + file["config"][k][key] = value[key]; + } + } + + if(index == Store.currentSheetIndex){//更新数据为当前表格数据 + Store.config = file["config"]; + + if(k == "rowlen" || k == "columlen" || k == "rowhidden"){ + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(type == "all"){ //通用保存更新 + let k = item.k; + file[k] = value; + + if(k == "name"){ //表格名 + $("#luckysheet-sheet-container-c #luckysheet-sheets-item" + index).find("span.luckysheet-sheets-item-name").html(value); + } + else if(k == "color"){ //表格颜色 + let currentSheetItem = $("#luckysheet-sheet-container-c #luckysheet-sheets-item" + index); + currentSheetItem.find(".luckysheet-sheets-item-color").remove(); + + if(value != null || value != ""){ + currentSheetItem.append('
'); + } + } + else if(k == "pivotTable"){ //PivotTable + // luckysheet.pivotTable.changePivotTable(index); + } + else if(k == "freezen"){ //freezen row and column + if(index == Store.currentSheetIndex){ + const _locale = locale(); + const locale_freezen = _locale.freezen; + if(file["freezen"].horizontal == null){ + $("#luckysheet-freezen-btn-horizontal").html(' '+locale_freezen.freezenRow); + luckysheetFreezen.freezenhorizontaldata = null; + $("#luckysheet-freezebar-horizontal").hide(); + } + else{ + luckysheetFreezen.createFreezenHorizontal(file["freezen"].horizontal.freezenhorizontaldata, file["freezen"].horizontal.top); + } + + if(file["freezen"].vertical == null){ + $("#luckysheet-freezen-btn-vertical").html(' '+locale_freezen.freezenColumn); + luckysheetFreezen.freezenverticaldata = null; + $("#luckysheet-freezebar-vertical").hide(); + } + else{ + luckysheetFreezen.createFreezenVertical(file["freezen"].vertical.freezenverticaldata, file["freezen"].vertical.left); + } + + luckysheetFreezen.createAssistCanvas(); + } + } + else if(k == "filter_select"){ //筛选范围 + if(index == Store.currentSheetIndex){ + createFilterOptions(value); + } + } + else if(k == "filter"){ //筛选保存 + if(index == Store.currentSheetIndex){ + createFilterOptions(file.filter_select, value); + } + } + else if(k == "luckysheet_conditionformat_save"){ //条件格式 + if(index == Store.currentSheetIndex){ + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(k == "luckysheet_alternateformat_save"){ //交替颜色 + if(index == Store.currentSheetIndex){ + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(k == "config"){ //config + if(index == Store.currentSheetIndex){ + Store.config = value; + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + } + else if(k == "dynamicArray"){ //动态数组 + if(index == Store.currentSheetIndex){ + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + } + else if(type == "fc"){ //函数链calc + let op = item.op, pos = item.pos; + + if(getObjType(value) != "object"){ + value = eval('('+ value +')'); + } + + let r = value.r, c = value.c; + let func = value.func; + + let calcChain = file["calcChain"] == null ? [] : file["calcChain"]; + + if(op == "add"){ + calcChain.push(value); + } + else if(op == "del"){ + for(let a = 0; a < calcChain.length; a++){ + if(r == calcChain[a].r && c == calcChain[a].c && index == calcChain[a].index){ + calcChain.splice(a, 1); + } + } + } + else if(op == "update"){ + for(let a = 0; a < calcChain.length; a++){ + if(r == calcChain[a].r && c == calcChain[a].c && index == calcChain[a].index){ + calcChain[a].func = func; + } + } + } + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + else if(type == "drc"){ //删除行列 + if(file.data == null || file.data.length == 0){ + return; + } + + let rc = item.rc, + st_i = value.index, + len = value.len, + mc = value.mc, + borderInfo = value.borderInfo; + let data = file.data; + + if(rc == "r"){ + file["row"] -= len; + + data.splice(st_i, len); + + //空白行模板 + let row = []; + for (let c = 0; c < data[0].length; c++) { + row.push(null); + } + + //删除多少行,增加多少行空白行 + for (let r = 0; r < len; r++) { + data.push(row); + } + } + else{ + file["column"] -= len; + + //空白列模板 + let addcol = []; + for (let r = 0; r < len; r++) { + addcol.push(null); + } + + for(let i = 0; i < data.length; i++){ + data[i].splice(st_i, len); + + data[i] = data[i].concat(addcol); + } + } + + for(let x in mc){ + let r = mc[x].r, c = mc[x].c; + data[r][c].mc = mc[x]; + } + + file["config"].merge = mc; + file["config"].borderInfo = borderInfo; + + if(index == Store.currentSheetIndex){ + Store.flowdata = data; + + Store.config["merge"] = mc; + Store.config["borderInfo"] = borderInfo; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(type == "arc"){ //增加行列 + if(file.data == null || file.data.length == 0){ + return; + } + + let rc = item.rc, + st_i = value.index, + len = value.len, + addData = value.data, + mc = value.mc, + borderInfo = value.borderInfo; + let data = file.data; + + if(rc == "r"){ + file["row"] += len; + + let arr = []; + for(let i = 0; i < len; i++){ + arr.push(JSON.stringify(addData[i])); + } + + eval('data.splice(' + st_i + ', 0, ' + arr.join(",") + ')'); + } + else{ + file["column"] += len; + + for(let i = 0; i < data.length; i++){ + data[i].splice(st_i, 0, addData[i]); + } + } + + for(let x in mc){ + let r = mc[x].r, c = mc[x].c; + data[r][c].mc = mc[x]; + } + + file["config"].merge = mc; + file["config"].borderInfo = borderInfo; + + if(index == Store.currentSheetIndex){ + Store.flowdata = data; + + Store.config["merge"] = mc; + Store.config["borderInfo"] = borderInfo; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + } + } + else if(type == "f"){ //筛选 + let op = item.op, pos = item.pos; + + let filter = file.filter; + + if(filter == null){ + filter = {}; + } + + if(op == "upOrAdd"){ + filter[pos] = value; + } + else if(op == "del"){ + delete filter[pos]; + } + + if(index == Store.currentSheetIndex){ + createFilterOptions(file.filter_select, filter); + } + } + else if(type == "fsc"){ //清除筛选 + file.filter = null; + file.filter_select = null; + + if(index == Store.currentSheetIndex){ + $('#luckysheet-filter-selected-sheet' + Store.currentSheetIndex + ', #luckysheet-filter-options-sheet' + Store.currentSheetIndex).remove(); + $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); + } + } + else if(type == "fsr"){ //恢复筛选 + file.filter = value.filter; + file.filter_select = value.filter_select; + + if(index == Store.currentSheetIndex){ + createFilterOptions(file.filter_select, file.filter); + } + } + else if(type == "sha"){ //新建sheet + Store.luckysheetfile.push(value); + + let colorset = ''; + if(value.color != null){ + colorset = '
'; + } + + $("#luckysheet-sheet-container-c").append(replaceHtml(sheetHTML, { "index": value.index, "active": "", "name": value.name, "style": "", "colorset": colorset })); + $("#luckysheet-cell-main").append('
'); + } + else if(type == "shc"){ //复制sheet + let copyindex = value.copyindex, name = value.name; + + let copyarrindex = getSheetIndex(copyindex); + let copyjson = $.extend(true, {}, Store.luckysheetfile[copyarrindex]); + + copyjson.index = index; + copyjson.name = name; + + Store.luckysheetfile.splice(copyarrindex + 1, 0, copyjson); + + let copyobject = $("#luckysheet-sheets-item" + copyindex); + $("#luckysheet-sheet-container-c").append(replaceHtml(sheetHTML, { "index": copyjson.index, "active": "", "name": copyjson.name, "style": "", "colorset": "" })); + $("#luckysheet-sheets-item" + copyjson.index).insertAfter(copyobject); + $("#luckysheet-cell-main").append('
'); + } + else if(type == "shd"){ //删除sheet + for(let i = 0; i < Store.luckysheetfile.length; i++){ + if(Store.luckysheetfile[i].index == value.deleIndex){ + server.sheetDeleSave.push(Store.luckysheetfile[i]); + + Store.luckysheetfile.splice(i, 1); + break; + } + } + + $("#luckysheet-sheets-item" + value.deleIndex).remove(); + $("#luckysheet-datavisual-selection-set-" + value.deleIndex).remove(); + } + else if(type == "shr"){ //sheet位置 + for(let x in value){ + Store.luckysheetfile[getSheetIndex(x)].order = value[x]; + } + } + else if(type == "shre"){ //删除sheet恢复操作 + for(let i = 0; i < server.sheetDeleSave.length; i++){ + if(server.sheetDeleSave[i].index == value.reIndex){ + let datav = server.sheetDeleSave[i]; + + Store.luckysheetfile.push(datav); + + let colorset = ''; + if(value.color != null){ + colorset = '
'; + } + + $("#luckysheet-sheet-container-c").append(replaceHtml(sheetHTML, { "index": datav.index, "active": "", "name": datav.name, "style": "", "colorset": colorset })); + $("#luckysheet-cell-main").append('
'); + break; + } + } + } + else if(type == "sh"){ //隐藏sheet + let op = item.op, cur = item.cur; + + if(op == "hide"){ + file.hide = 1; + $("#luckysheet-sheets-item" + index).hide(); + + if(index == Store.currentSheetIndex){ + $("#luckysheet-sheets-item" + cur).addClass("luckysheet-sheets-item-active"); + sheetmanage.changeSheetExec(cur); + } + } + else if(op == "show"){ + file.hide = 0; + $("#luckysheet-sheets-item" + index).show(); + } + } + else if(type == "c"){ //图表操作 + let op = item.op, cid = item.cid; + + if(op == "add"){ //插入 + file.chart.push(value); + + luckysheet.insertChartTosheet(value.sheetIndex, value.dataSheetIndex, value.option, value.chartType, value.selfOption, value.defaultOption, value.row, value.column, value.chart_selection_color, value.chart_id, value.chart_selection_id, value.chartStyle, value.rangeConfigCheck, value.rangeRowCheck, value.rangeColCheck, value.chartMarkConfig, value.chartTitleConfig, value.winWidth, value.winHeight, value.scrollLeft1, value.scrollTop1, value.chartTheme, value.myWidth, value.myHeight, value.myLeft, value.myTop, value.myindexrank1, true); + } + else if(op == "xy" || op == "wh" || op == "update"){ //移动 缩放 更新 + for(let i = 0; i < file.chart.length; i++){ + let chartjson = file.chart[i]; + + if(chartjson.chart_id == cid){ + for(let item in chartjson){ + for(let vitem in value){ + if(item == vitem){ + chartjson[item] = value[vitem]; + } + } + } + + sheetmanage.saveChart(chartjson); + + return; + } + } + } + else if(op == "del"){ //删除 + for(let i = 0; i < file.chart.length; i++){ + let chartjson = file.chart[i]; + + if(chartjson.chart_id == cid){ + file.chart.splice(i, 1); + + $("#" + cid).remove(); + sheetmanage.delChart($("#" + cid).attr("chart_id"), $("#" + cid).attr("sheetIndex")); + + return; + } + } + } + } + else if(type == "na"){ //表格名称 + $("#luckysheet_info_detail_input").val(value).css("width", getByteLen(value) * 10); + } + }, + multipleIndex: 0, + multipleRangeShow: function(id, name, r, c) { + let _this = this; + + let r1 = r2 = r; + let c1 = c2 = c; + + let row = visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1], + col = visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; + + let margeset = menuButton.mergeborer(Store.flowdata, r1, c1); + if(!!margeset){ + row = margeset.row[1]; + row_pre = margeset.row[0]; + + col = margeset.column[1]; + col_pre = margeset.column[0]; + } + + if($("#luckysheet-multipleRange-show-" + id).length > 0){ + $("#luckysheet-multipleRange-show-" + id).css({ "position": "absolute", "left": col_pre - 1, "width": col - col_pre - 1, "top": row_pre - 1, "height": row - row_pre - 1 }); + } + else{ + let itemHtml = '
'+ + '
'+ + '
'; + + $(itemHtml).appendTo($("#luckysheet-cell-main #luckysheet-multipleRange-show")); + + _this.multipleIndex++; + } + }, + sheetDeleSave: [], //共享编辑模式下 删除的sheet保存下来,方便恢复时取值 + submitInterval: 1000, + imagesubmitInterval: 5000, + submitdatalimit: 50, + submitcompresslimit: 1000, + checksubmit: function(data){ + let _this = this; + //clearTimeout(_this.requestTimeOut); + + _this.submitTimeout(); + + clearTimeout(_this.imageRequestTimeout); + _this.imageRequestTimeout = setTimeout(function(){ + _this.imageRequest(); + }, _this.imagesubmitInterval); + }, + submitTimeout: function(){ + let _this = this; + clearTimeout(_this.requestTimeOut); + + //console.log(_this.requestlast, moment(), (_this.requestlast!=null && _this.requestlast.add(10, 'seconds').isBefore(moment()) ) ); + if(!_this.requestLock && (_this.requestlast!=null && _this.requestlast.clone().add(1, 'seconds').isBefore(moment()) ) ){ + _this.request(); + } + + // if(!_this.imageRequestLock && (_this.imageRequestLast==null || _this.imageRequestLast.clone().add(30, 'seconds').isBefore(moment()) ) ){ + + // } + + _this.requestTimeOut = setTimeout(function(){ + _this.submitTimeout(); + }, _this.submitInterval); + }, + requestLock: false, + requestlast: null, + firstchange: true, + requestTimeOut: null, + request: function () { + let _this = this; + let key = this.gridKey; + let cahce_key = key + "__qkcache"; + + _this.cachelocaldata(function(cahce_key, params){ + if(params.length==0){ + return; + } + console.log(params); + + params = encodeURIComponent(JSON.stringify(params)); + let compressBeginLen = params.length; + let iscommpress = false; + // if (compressBeginLen > _this.submitcompresslimit) { + // params = pako.gzip(params, { to: "string" }); + // iscommpress = true; + // } + _this.requestLock = true; + //console.log(params); + console.log("request"); + if(_this.updateUrl != ""){ + $.post(_this.updateUrl, { compress: iscommpress, gridKey: _this.gridKey, data: params }, function (data) { + let re = eval('('+ data +')') + if(re.status){ + $("#jfgrid_info_detail_update").html("最近存档时间:"+ moment().format("M-D H:m:s")); + $("#jfgrid_info_detail_save").html("同步成功"); + _this.clearcachelocaldata(); + } + else{ + $("#jfgrid_info_detail_save").html("同步失败"); + _this.restorecachelocaldata(); + } + _this.requestlast = moment(); + _this.requestLock = false; + }); + } + }); + }, + imageRequestLast: null, + imageRequestLock: false, + imageRequestTimeout: null, + imageRequest: function(){ + let _this = this; + + html2canvas($("#" + container).find(".jfgrid-grid-window").get(0), { + onrendered: function(canvas) { + //let imgcut = $("#jfgrid-cell-main").find(".jfgrid-grid-window"); + //document.body.appendChild(canvas); + let old = $(canvas).appendTo("body"); + old.hide(); + let newwidth = old.width(); + let newheight = old.height(); + let imageData = old.get(0).getContext("2d").getImageData(0, 0, newwidth, newheight); + + let cutW = newwidth, cutH = newheight; + if(cutW*0.54 > cutH){ + cutW = cutH / 0.54; + } + else{ + cutH = cutW * 0.54; + } + let newCanvas = $("").attr("width", cutW).attr("height", cutH)[0]; + + newCanvas.getContext("2d").putImageData(imageData, 0, 0); + + old.attr("width", 350); + old.attr("height", 189); + old.get(0).getContext("2d").drawImage(newCanvas, 0, 0, 350, 189); + let base64 = old.get(0).toDataURL('image/jpeg', 0.9); + + //console.log(base64); + //console.log("压缩:", pako.gzip(base64, { to: "string" })); + //console.log("imageRequest"); + let curindex = jfgrid.sheetmanage.getCurSheetnoset(); + _this.imageRequestLock =true; + // let data1 = pako.gzip(encodeURIComponent(JSON.stringify({"t":"thumb", "img": base64, "curindex":curindex })), { to: "string" }); + let data1 = encodeURIComponent(JSON.stringify({"t":"thumb", "img": base64, "curindex":curindex })); + old.remove(); + //console.log("缩略图", _this.imageRequestLast,base64); + if(_this.updateImageUrl != ""){ + // $.post(_this.updateImageUrl, { compress: true, gridKey: _this.gridKey, data:data1 }, function (data) { + $.post(_this.updateImageUrl, { compress: false, gridKey: _this.gridKey, data:data1 }, function (data) { + let re = eval('('+ data +')') + if(re.status){ + imageRequestLast = moment(); + } + else{ + $("#jfgrid_info_detail_save").html("网络不稳定"); + } + _this.imageRequestLock =true; + }); + } + + } + }); + }, + localdata: [], + matchOpt: function(v, d){ + for(let vitem in v){ + if(vitem == "t" && v["t"] in {"drc":1, "arc":1,"sha":1,"shc":1,"shd":1 } ){ + return false; + } + + if(vitem=="v"){ + continue; + } + + if(!(vitem in d)){ + return false; + } + + if(d[vitem] != v[vitem]){ + return false; + } + } + + return true; + }, + deleteRepeatOpt: function(data, value){ + //let d = $.extend(true, [], data); //原来 + let d = data; + let _this = this; + + if(value instanceof Array){ + for(let i = 0; i < value.length; i++){ + let vitem = value[i]; + + for(let a = 0; a < d.length; a++){ + let ditem = data[i]; //let ditem = data[a];? + + if(_this.matchOpt(vitem, ditem)){ + delete d[a]; + } + } + } + } + else{ + for(let a = 0; a < d.length; a++){ + let ditem = d[a]; + + if(_this.matchOpt(value, ditem)){ + delete d[a]; + } + } + } + + let ret = []; + for(let i = 0; i < d.length; i++){ + if(d[i] != null){ + ret.push(d[i]); + } + } + + return ret; + }, + setlocaldata: function (value, func) { + let key = this.gridKey; + //store.push(key, data); + let _this = this; + _this.getlocaldata(function(data){ + if(data==null){ + data = []; + } + + //此处不去重,在request同步后台时统一循环一次去重 + //let data = _this.deleteRepeatOpt(data, value); + + if(value instanceof Array){ + data = data.concat(value); + } + else{ + data.push(value); + } + + _this.localdata = data; + func(_this.localdata); + + //console.log(value); + // localforage.setItem(key, data).then(function () { + // console.log(data); + // func(data); + // }).catch(function (err) { + + // }); + }); + }, + getlocaldata: function (func) { + let key = this.gridKey; + //return store.get(key); + func(this.localdata); + // localforage.getItem(key).then(function(readValue) { + // func(readValue); + // }); + }, + clearlocaldata: function (func) { + let key = this.gridKey; + //store.remove(key); + this.localdata = []; + func(); + // localforage.removeItem(key, function(err,value) { + // func(); + // }); + }, + cachelocaldata: function (func) { + let key = this.gridKey; + let _this = this; + let cahce_key = key + "__qkcache"; + //store.remove(key); + //console.log(key, cahce_key); + + + //处理localdata去重 + let updatedata = _this.localdata; + let uLen = updatedata.length; + if(uLen > 1){ + let prevData = []; + prevData[0] = updatedata[0]; + for(let i = 1; i < uLen; i++){ + let value = updatedata[i]; + let flag = true; + for(let a=0;a startR) { + curR = last["row"] == null ? 0 : last["row"][0]; + } + else if (p_endR == endR && p_startR == startR) { + if (postion == "down") { + curR = last["row"] == null ? 0 : last["row"][1]; + } + else { + curR = last["row"] == null ? 0 : last["row"][0]; + } + } + } + else if (postion == "right" || postion == "left") { + if (p_endC < endC) { + curC = last["column"] == null ? 0 : last["column"][1]; + } + else if (p_startC > startC) { + curC = last["column"] == null ? 0 : last["column"][0]; + } + else if (p_endC == endC && p_startC == startC) { + if (postion == "right") { + curC = last["column"] == null ? 0 : last["column"][1]; + } + else { + curC = last["column"] == null ? 0 : last["column"][0]; + } + } + } + } + + let datarowlen = Store.flowdata.length, + datacolumnlen = Store.flowdata[0].length; + + let data = Store.flowdata, moveP = "", moveV = 0; + + if (postion == "up") { + if (curR == 0) { + return; + } + else { + let stvalue = [], p = null, i = 0, p_pre = null; + for (let c = startC; c <= endC; c++) { + stvalue = []; + i = 0; + + for (let r = curR - 1; r >= 0; r--) { + let cell = data[r][c]; + + if (getObjType(cell) == "object" && isRealNull(cell.v)) { + stvalue.push(false); + } + else if (isRealNull(cell)) { + stvalue.push(false); + } + else { + stvalue.push(true); + } + + if (stvalue.length > 1) { + if (stvalue[i] == true && stvalue[i - 1] == false) { + p = r; + break + } + else if (stvalue[i] == false && stvalue[i - 1] == true) { + p = r + 1; + break + } + } + + i++; + } + + if(p == null){ + p = 0; + } + + if (p_pre == null || p < p_pre) { + p_pre = p; + } + } + + moveP = "down"; + moveV = p_pre - curR; + } + } + else if (postion == "down") { + if (curR == datarowlen - 1) { + return; + } + else { + let stvalue = [], p = null, i = 0, p_pre = null; + for (let c = startC; c <= endC; c++) { + stvalue = []; + i = 0; + + for (let r = curR + 1; r < data.length; r++) { + let cell = data[r][c]; + + if (getObjType(cell) == "object" && isRealNull(cell.v)) { + stvalue.push(false); + } + else if (isRealNull(cell)) { + stvalue.push(false); + } + else { + stvalue.push(true); + } + + if (stvalue.length > 1) { + if (stvalue[i] == true && stvalue[i - 1] == false) { + p = r; + break + } + else if (stvalue[i] == false && stvalue[i - 1] == true) { + p = r - 1; + break + } + } + + i++; + } + + if(p == null){ + p = data.length - 1; + } + + if (p_pre == null || p > p_pre) { + p_pre = p; + } + } + + moveP = "down"; + moveV = p_pre - curR; + } + } + else if (postion == "left") { + if (curC == 0) { + return; + } + else { + let stvalue = [], p = null, i = 0, p_pre = null; + for (let r = startR; r <= endR; r++) { + stvalue = []; + i = 0; + for (let c = curC - 1; c >= 0; c--) { + let cell = data[r][c]; + + if (getObjType(cell) == "object" && isRealNull(cell.v)) { + stvalue.push(false); + } + else if (isRealNull(cell)) { + stvalue.push(false); + } + else { + stvalue.push(true); + } + + if (stvalue.length > 1) { + if (stvalue[i] == true && stvalue[i - 1] == false) { + p = c; + break + } + else if (stvalue[i] == false && stvalue[i - 1] == true) { + p = c + 1; + break + } + } + + i++; + } + + if(p == null){ + p = 0; + } + + if (p_pre == null || p < p_pre) { + p_pre = p; + } + } + + moveP = "right"; + moveV = p_pre - curC; + } + } + else if (postion == "right") { + if (curC == datacolumnlen - 1) { + return; + } + else { + let stvalue = [], p = null, i = 0, p_pre = null; + for (let r = startR; r <= endR; r++) { + stvalue = []; + i = 0; + + for (let c = curC + 1; c < data[0].length; c++) { + let cell = data[r][c]; + + if (getObjType(cell) == "object" && isRealNull(cell.v)) { + stvalue.push(false); + } + else if (isRealNull(cell)) { + stvalue.push(false); + } + else { + stvalue.push(true); + } + + if (stvalue.length > 1) { + if (stvalue[i] == true && stvalue[i - 1] == false) { + p = c; + break + } + else if (stvalue[i] == false && stvalue[i - 1] == true) { + p = c - 1; + break + } + } + + i++; + } + + if(p == null){ + p = data[0].length - 1; + } + + if (p_pre == null || p > p_pre) { + p_pre = p; + } + } + + moveP = "right"; + moveV = p_pre - curC; + } + } + + if (type == "range") { + if (postion == "up") { + if (p_endR < endR) { + if (moveV + curR < p_endR) { + moveV = p_endR - curR; + } + } + } + else if (postion == "down") { + if (p_startR > startR) { + if (moveV + curR > p_startR) { + moveV = p_startR - curR; + } + } + } + else if (postion == "left") { + if (p_endC < endC) { + if (moveV + curC < p_endC) { + moveV = p_endC - curC; + } + } + } + else if (postion == "right") { + if (p_startC > startC) { + if (moveV + curC > p_startC) { + moveV = p_startC - curC; + } + } + } + + if (terminal != null && Math.abs(moveV) > Math.abs(terminal)) { + moveV = terminal; + } + } + + if (!onlyvalue) { + if (type == "cell") { + luckysheetMoveHighlightCell(moveP, moveV, "rangeOfSelect", isScroll); + } + else if (type == "range") { + luckysheetMoveHighlightRange(moveP, moveV, "rangeOfSelect", isScroll); + } + } + else { + return moveV; + } +} + +//方向键 调整单元格 +function luckysheetMoveHighlightCell(postion, index, type, isScroll) { + if (isScroll == null) { + isScroll = true; + } + + if (!postion) { + postion == "down"; + } + + let datarowlen = Store.flowdata.length, + datacolumnlen = Store.flowdata[0].length; + + let row, row_pre, row_index, row_index_ed; + let col, col_pre, col_index, col_index_ed; + + if(type == "rangeOfSelect"){ + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let curR; + if(last["row_focus"] == null){ + curR = last["row"][0]; + } + else{ + curR = last["row_focus"]; + } + + let curC; + if(last["column_focus"] == null){ + curC = last["column"][0]; + } + else{ + curC = last["column_focus"]; + } + + //focus单元格 是否是合并单元格 + let margeset = menuButton.mergeborer(Store.flowdata, curR, curC); + if(!!margeset){ + let str_r = margeset.row[2]; + let end_r = margeset.row[3]; + + let str_c = margeset.column[2]; + let end_c = margeset.column[3]; + + if(index > 0){ + if(postion == "down"){ + curR = end_r; + curC = str_c; + } + else if(postion == "right"){ + curR = str_r; + curC = end_c; + } + } + else{ + curR = str_r; + curC = str_c; + } + } + + let moveX = last["moveXY"] == null ? curR : last["moveXY"].x; + let moveY = last["moveXY"] == null ? curC : last["moveXY"].y; + + if (postion == "down") { + curR += index; + moveX = curR; + } + else if (postion == "right") { + curC += index; + moveY = curC; + } + + if (curR >= datarowlen) { + curR = datarowlen - 1; + moveX = curR; + } + + if (curR < 0) { + curR = 0; + moveX = curR; + } + + if (curC >= datacolumnlen) { + curC = datacolumnlen - 1; + moveY = curC; + } + + if (curC < 0) { + curC = 0; + moveY = curC; + } + + //移动的下一个单元格是否是合并的单元格 + let margeset2 = menuButton.mergeborer(Store.flowdata, curR, curC); + if(!!margeset2){ + row = margeset2.row[1]; + row_pre = margeset2.row[0]; + row_index = margeset2.row[2]; + row_index_ed = margeset2.row[3]; + + col = margeset2.column[1]; + col_pre = margeset2.column[0]; + col_index = margeset2.column[2]; + col_index_ed = margeset2.column[3]; + } + else{ + row = Store.visibledatarow[moveX]; + row_pre = moveX - 1 == -1 ? 0 : Store.visibledatarow[moveX - 1]; + row_index = moveX; + row_index_ed = moveX; + + col = Store.visibledatacolumn[moveY]; + col_pre = moveY - 1 == -1 ? 0 : Store.visibledatacolumn[moveY - 1]; + col_index = moveY; + col_index_ed = moveY; + } + + last["row"] = [row_index, row_index_ed]; + last["column"] = [col_index, col_index_ed]; + last["row_focus"] = row_index; + last["column_focus"] = col_index; + last["moveXY"] = {"x": moveX,"y": moveY}; + + selectHightlightShow(); + pivotTable.pivotclick(row_index, col_index); + formula.fucntionboxshow(row_index, col_index); + } + else if(type == "rangeOfFormula"){ + let last = formula.func_selectedrange; + + let curR; + if(last["row_focus"] == null){ + curR = last["row"][0]; + } + else{ + curR = last["row_focus"]; + } + + let curC; + if(last["column_focus"] == null){ + curC = last["column"][0]; + } + else{ + curC = last["column_focus"]; + } + + //focus单元格 是否是合并单元格 + let margeset = menuButton.mergeborer(Store.flowdata, curR, curC); + if(!!margeset){ + let str_r = margeset.row[2]; + let end_r = margeset.row[3]; + + let str_c = margeset.column[2]; + let end_c = margeset.column[3]; + + if(index > 0){ + if(postion == "down"){ + curR = end_r; + curC = str_c; + } + else if(postion == "right"){ + curR = str_r; + curC = end_c; + } + } + else{ + curR = str_r; + curC = str_c; + } + } + + let moveX = last["moveXY"] == null ? curR : last["moveXY"].x; + let moveY = last["moveXY"] == null ? curC : last["moveXY"].y; + + if (postion == "down") { + curR += index; + moveX = curR; + } + else if (postion == "right") { + curC += index; + moveY = curC; + } + + if (curR >= datarowlen) { + curR = datarowlen - 1; + moveX = curR; + } + + if (curR < 0) { + curR = 0; + moveX = curR; + } + + if (curC >= datacolumnlen) { + curC = datacolumnlen - 1; + moveY = curC; + } + + if (curC < 0) { + curC = 0; + moveY = curC; + } + + //移动的下一个单元格是否是合并的单元格 + let margeset2 = menuButton.mergeborer(Store.flowdata, curR, curC); + if(!!margeset2){ + row = margeset2.row[1]; + row_pre = margeset2.row[0]; + row_index = margeset2.row[2]; + row_index_ed = margeset2.row[3]; + + col = margeset2.column[1]; + col_pre = margeset2.column[0]; + col_index = margeset2.column[2]; + col_index_ed = margeset2.column[3]; + } + else{ + row = Store.visibledatarow[moveX]; + row_pre = moveX - 1 == -1 ? 0 : Store.visibledatarow[moveX - 1]; + row_index = moveX; + row_index_ed = moveX; + + col = Store.visibledatacolumn[moveY]; + col_pre = moveY - 1 == -1 ? 0 : Store.visibledatacolumn[moveY - 1]; + col_index = moveY; + col_index_ed = moveY; + } + + formula.func_selectedrange = { + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "left_move": col_pre, + "width_move": col - col_pre - 1, + "top_move": row_pre, + "height_move": row - row_pre - 1, + "row": [row_index, row_index_ed], + "column": [col_index, col_index_ed], + "row_focus": row_index, + "column_focus": col_index, + "moveXY": {"x": moveX, "y": moveY} + }; + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + + formula.rangeSetValue({ + "row": [row_index, row_index_ed], + "column": [col_index, col_index_ed] + }); + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); + + let sleft = 0, stop = 0; + if (col - scrollLeft - winW + 20 > 0) { + sleft = col - winW + 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + else if (col_pre - scrollLeft - 20 < 0) { + sleft = col_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + + if (row - scrollTop - winH + 20 > 0) { + stop = row - winH + 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + else if (row_pre - scrollTop - 20 < 0) { + stop = row_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + + clearTimeout(Store.countfuncTimeout); + countfunc(); +} + +//ctrl + 方向键 调整单元格 +function luckysheetMoveHighlightCell2(postion, type, isScroll) { + if(!isScroll){ + isScroll = true; + } + + let row, row_pre; + let col, col_pre; + + if(type == "rangeOfSelect"){ + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let rf = last["row_focus"], cf = last["column_focus"]; + + let focusIsMerge = false, mc = {}; + if(Store.config["merge"] != null && (rf + "_" + cf) in Store.config["merge"]){ + focusIsMerge = true; + mc = Store.config["merge"][rf + "_" + cf]; + } + + if(postion == "down"){ + if(rf == Store.flowdata.length - 1){ + return; + } + + if(focusIsMerge){ + rf = getNextIndex("down", cf, mc.r + mc.rs - 1, Store.flowdata.length - 1); + } + else{ + rf = getNextIndex("down", cf, rf, Store.flowdata.length - 1); + } + } + else if(postion == "up"){ + if(rf == 0){ + return; + } + + if(focusIsMerge){ + rf = getNextIndex("up", cf, 0, mc.r); + } + else{ + rf = getNextIndex("up", cf, 0, rf); + } + } + else if(postion == "right"){ + if(cf == Store.flowdata[0].length - 1){ + return; + } + + if(focusIsMerge){ + cf = getNextIndex("right", rf, mc.c + mc.cs - 1, Store.flowdata[0].length - 1); + } + else{ + cf = getNextIndex("right", rf, cf, Store.flowdata[0].length - 1); + } + } + else if(postion == "left"){ + if(cf == 0){ + return; + } + + if(focusIsMerge){ + cf = getNextIndex("left", rf, 0, mc.c); + } + else{ + cf = getNextIndex("left", rf, 0, cf); + } + } + + let rowseleted = [rf, rf]; + let columnseleted = [cf, cf]; + + row = Store.visibledatarow[rf]; + row_pre = rf - 1 == -1 ? 0 : Store.visibledatarow[rf - 1]; + col = Store.visibledatacolumn[cf]; + col_pre = cf - 1 == -1 ? 0 : Store.visibledatacolumn[cf - 1]; + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, row_pre, row - row_pre - 1, col_pre, col - col_pre - 1); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + // top = changeparam[2]; + // height = changeparam[3]; + // left = changeparam[4]; + // width = changeparam[5]; + } + + Store.luckysheet_select_save = [{"row": rowseleted, "column": columnseleted}]; + selectHightlightShow(); + pivotTable.pivotclick(rf, cf); + formula.fucntionboxshow(rf, cf); + } + else if(type == "rangeOfFormula"){ + let last = formula.func_selectedrange; + let rf = last["row_focus"], cf = last["column_focus"]; + + let focusIsMerge = false, mc = {}; + if(Store.config["merge"] != null && (rf + "_" + cf) in Store.config["merge"]){ + focusIsMerge = true; + mc = Store.config["merge"][rf + "_" + cf]; + } + + if(postion == "down"){ + if(rf == Store.flowdata.length - 1){ + return; + } + + if(focusIsMerge){ + rf = getNextIndex("down", cf, mc.r + mc.rs - 1, Store.flowdata.length - 1); + } + else{ + rf = getNextIndex("down", cf, rf, Store.flowdata.length - 1); + } + } + else if(postion == "up"){ + if(rf == 0){ + return; + } + + if(focusIsMerge){ + rf = getNextIndex("up", cf, 0, mc.r); + } + else{ + rf = getNextIndex("up", cf, 0, rf); + } + } + else if(postion == "right"){ + if(cf == Store.flowdata[0].length - 1){ + return; + } + + if(focusIsMerge){ + cf = getNextIndex("right", rf, mc.c + mc.cs - 1, Store.flowdata[0].length - 1); + } + else{ + cf = getNextIndex("right", rf, cf, Store.flowdata[0].length - 1); + } + } + else if(postion == "left"){ + if(cf == 0){ + return; + } + + if(focusIsMerge){ + cf = getNextIndex("left", rf, 0, mc.c); + } + else{ + cf = getNextIndex("left", rf, 0, cf); + } + } + + let rowseleted = [rf, rf]; + let columnseleted = [cf, cf]; + + row = Store.visibledatarow[rf]; + row_pre = rf - 1 == -1 ? 0 : Store.visibledatarow[rf - 1]; + col = Store.visibledatacolumn[cf]; + col_pre = cf - 1 == -1 ? 0 : Store.visibledatacolumn[cf - 1]; + + let top = row_pre, height = row - row_pre - 1; + let left = col_pre, width = col - col_pre - 1; + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + formula.func_selectedrange = { + "left": left, + "width": width, + "top": top, + "height": height, + "left_move": left, + "width_move": width, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": columnseleted, + "row_focus": rf, + "column_focus": cf + }; + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": top, + "height": height + }).show(); + + formula.rangeSetValue({ + "row": rowseleted, + "column": columnseleted + }); + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); + + let sleft = 0, stop = 0; + if (col - scrollLeft - winW + 20 > 0) { + sleft = col - winW + 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + else if (col_pre - scrollLeft - 20 < 0) { + sleft = col_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + + if (row - scrollTop - winH + 20 > 0) { + stop = row - winH + 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + else if (row_pre - scrollTop - 20 < 0) { + stop = row_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + + clearTimeout(Store.countfuncTimeout); + countfunc(); +} + +//shift + 方向键 调整选区 +function luckysheetMoveHighlightRange(postion, index, type, isScroll) { + if (isScroll == null) { + isScroll = true; + } + + if (!postion) { + postion == "down"; + } + + let row, row_pre; + let col, col_pre; + + if(type == "rangeOfSelect"){ + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + + let curR = last["row"][0], endR = last["row"][1]; + let curC = last["column"][0], endC = last["column"][1]; + let rf = last["row_focus"], cf = last["column_focus"]; + + let datarowlen = Store.flowdata.length, + datacolumnlen = Store.flowdata[0].length; + + if(postion == "down"){ //选区上下变动 + if(rowHasMerge(rf, curC, endC)){ //focus单元格所在行有合并单元格 + let rfMerge = getRowMerge(rf, curC, endC); + let rf_str = rfMerge[0], rf_end = rfMerge[1]; + + if(rf_str > curR && rf_end == endR){ + if(index > 0 && rowHasMerge(curR, curC, endC)){ + curR = getRowMerge(curR, curC, endC)[1]; + } + + curR += index; + } + else if(rf_end < endR && rf_str == curR){ + if(index < 0 && rowHasMerge(endR, curC, endC)){ + endR = getRowMerge(endR, curC, endC)[0]; + } + + endR += index; + } + else{ + if(index > 0){ + endR += index; + } + else{ + curR += index; + } + } + } + else{ + if(rf > curR && rf == endR){ + if(index > 0 && rowHasMerge(curR, curC, endC)){ + curR = getRowMerge(curR, curC, endC)[1]; + } + + curR += index; + } + else if(rf < endR && rf == curR){ + if(index < 0 && rowHasMerge(endR, curC, endC)){ + endR = getRowMerge(endR, curC, endC)[0]; + } + + endR += index; + } + else if(rf == curR && rf == endR){ + if(index > 0){ + endR += index; + } + else{ + curR += index; + } + } + } + + if (endR >= datarowlen) { + endR = datarowlen - 1; + } + + if (endR < 0) { + endR = 0; + } + + if (curR >= datarowlen) { + curR = datarowlen - 1; + } + + if (curR < 0) { + curR = 0; + } + } + else{ + if(colHasMerge(cf, curR, endR)){ //focus单元格所在列有合并单元格 + let cfMerge = getColMerge(cf, curR, endR); + let cf_str = cfMerge[0], cf_end = cfMerge[1]; + + if(cf_str > curC && cf_end == endC){ + if(index > 0 && colHasMerge(curC, curR, endR)){ + curC = getColMerge(curC, curR, endR)[1]; + } + + curC += index; + } + else if(cf_end < endC && cf_str == curC){ + if(index < 0 && colHasMerge(endC, curR, endR)){ + endC = getColMerge(endC, curR, endR)[0]; + } + + endC += index; + } + else{ + if(index > 0){ + endC += index; + } + else{ + curC += index; + } + } + } + else{ + if(cf > curC && cf == endC){ + if(index > 0 && colHasMerge(curC, curR, endR)){ + curC = getColMerge(curC, curR, endR)[1]; + } + + curC += index; + } + else if(cf < endC && cf == curC){ + if(index < 0 && colHasMerge(endC, curR, endR)){ + endC = getColMerge(endC, curR, endR)[0]; + } + + endC += index; + } + else if(cf == curC && cf == endC){ + if(index > 0){ + endC += index; + } + else{ + curC += index; + } + } + } + + if (endC >= datacolumnlen) { + endC = datacolumnlen - 1; + } + + if (endC < 0) { + endC = 0; + } + + if (curC >= datacolumnlen) { + curC = datacolumnlen - 1; + } + + if (curC < 0) { + curC = 0; + } + } + + let rowseleted = [curR, endR]; + let columnseleted = [curC, endC]; + + row = Store.visibledatarow[endR]; + row_pre = curR - 1 == -1 ? 0 : Store.visibledatarow[curR - 1]; + col = Store.visibledatacolumn[endC]; + col_pre = curC - 1 == -1 ? 0 : Store.visibledatacolumn[curC - 1]; + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, row_pre, row - row_pre - 1, col_pre, col - col_pre - 1); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + // top = changeparam[2]; + // height = changeparam[3]; + // left = changeparam[4]; + // width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + selectHightlightShow(); + } + else if(type == "rangeOfFormula"){ + let last = formula.func_selectedrange; + + let curR = last["row"][0], endR = last["row"][1]; + let curC = last["column"][0], endC = last["column"][1]; + let rf = last["row_focus"], cf = last["column_focus"]; + + let datarowlen = Store.flowdata.length, + datacolumnlen = Store.flowdata[0].length; + + if(postion == "down"){ //选区上下变动 + if(rowHasMerge(rf, curC, endC)){ //focus单元格所在行有合并单元格 + let rfMerge = getRowMerge(rf, curC, endC); + let rf_str = rfMerge[0], rf_end = rfMerge[1]; + + if(rf_str > curR && rf_end == endR){ + if(index > 0 && rowHasMerge(curR, curC, endC)){ + curR = getRowMerge(curR, curC, endC)[1]; + } + + curR += index; + } + else if(rf_end < endR && rf_str == curR){ + if(index < 0 && rowHasMerge(endR, curC, endC)){ + endR = getRowMerge(endR, curC, endC)[0]; + } + + endR += index; + } + else{ + if(index > 0){ + endR += index; + } + else{ + curR += index; + } + } + } + else{ + if(rf > curR && rf == endR){ + if(index > 0 && rowHasMerge(curR, curC, endC)){ + curR = getRowMerge(curR, curC, endC)[1]; + } + + curR += index; + } + else if(rf < endR && rf == curR){ + if(index < 0 && rowHasMerge(endR, curC, endC)){ + endR = getRowMerge(endR, curC, endC)[0]; + } + + endR += index; + } + else if(rf == curR && rf == endR){ + if(index > 0){ + endR += index; + } + else{ + curR += index; + } + } + } + + if (endR >= datarowlen) { + endR = datarowlen - 1; + } + + if (endR < 0) { + endR = 0; + } + + if (curR >= datarowlen) { + curR = datarowlen - 1; + } + + if (curR < 0) { + curR = 0; + } + } + else{ + if(colHasMerge(cf, curR, endR)){ //focus单元格所在列有合并单元格 + let cfMerge = getColMerge(cf, curR, endR); + let cf_str = cfMerge[0], cf_end = cfMerge[1]; + + if(cf_str > curC && cf_end == endC){ + if(index > 0 && colHasMerge(curC, curR, endR)){ + curC = getColMerge(curC, curR, endR)[1]; + } + + curC += index; + } + else if(cf_end < endC && cf_str == curC){ + if(index < 0 && colHasMerge(endC, curR, endR)){ + endC = getColMerge(endC, curR, endR)[0]; + } + + endC += index; + } + else{ + if(index > 0){ + endC += index; + } + else{ + curC += index; + } + } + } + else{ + if(cf > curC && cf == endC){ + if(index > 0 && colHasMerge(curC, curR, endR)){ + curC = getColMerge(curC, curR, endR)[1]; + } + + curC += index; + } + else if(cf < endC && cf == curC){ + if(index < 0 && colHasMerge(endC, curR, endR)){ + endC = getColMerge(endC, curR, endR)[0]; + } + + endC += index; + } + else if(cf == curC && cf == endC){ + if(index > 0){ + endC += index; + } + else{ + curC += index; + } + } + } + + if (endC >= datacolumnlen) { + endC = datacolumnlen - 1; + } + + if (endC < 0) { + endC = 0; + } + + if (curC >= datacolumnlen) { + curC = datacolumnlen - 1; + } + + if (curC < 0) { + curC = 0; + } + } + + let rowseleted = [curR, endR]; + let columnseleted = [curC, endC]; + + row = Store.visibledatarow[endR]; + row_pre = curR - 1 == -1 ? 0 : Store.visibledatarow[curR - 1]; + col = Store.visibledatacolumn[endC]; + col_pre = curC - 1 == -1 ? 0 : Store.visibledatacolumn[curC - 1]; + + let top = row_pre, height = row - row_pre - 1; + let left = col_pre, width = col - col_pre - 1; + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + formula.func_selectedrange = { + "left": left, + "width": width, + "top": top, + "height": height, + "left_move": left, + "width_move": width, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": columnseleted, + "row_focus": rf, + "column_focus": cf + }; + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": top, + "height": height + }).show(); + + formula.rangeSetValue({ + "row": rowseleted, + "column": columnseleted + }); + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); + + let sleft = 0, stop = 0; + if (col - scrollLeft - winW + 20 > 0) { + sleft = col - winW + 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + else if (col_pre - scrollLeft - 20 < 0) { + sleft = col_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + + if (row - scrollTop - winH + 20 > 0) { + stop = row - winH + 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + else if (row_pre - scrollTop - 20 < 0) { + stop = row_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + + clearTimeout(Store.countfuncTimeout); + countfunc(); +} + +//ctrl + shift + 方向键 调整选区 +function luckysheetMoveHighlightRange2(postion, type, isScroll) { + if(!isScroll){ + isScroll = true; + } + + let row, row_pre; + let col, col_pre; + + if(type == "rangeOfSelect"){ + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let rf = last["row_focus"], cf = last["column_focus"]; + + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + + if(postion == "down"){ + if(r2 == Store.flowdata.length - 1){ + return; + } + + if(rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 + let rfMerge = getRowMerge(rf, c1, c2); + let rf_str = rfMerge[0], rf_end = rfMerge[1]; + + if(rf_str > r1 && rf_end == r2){ + r1 = getNextIndex("down", cf, r1, r2); + } + else{ + r2 = getNextIndex("down", cf, r2, Store.flowdata.length - 1); + } + } + else{ + if(rf > r1 && rf == r2){ + r1 = getNextIndex("down", cf, r1, r2); + } + else{ + r2 = getNextIndex("down", cf, r2, Store.flowdata.length - 1); + } + } + } + else if(postion == "up"){ + if(r1 == 0){ + return; + } + + if(rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 + let rfMerge = getRowMerge(rf, c1, c2); + let rf_str = rfMerge[0], rf_end = rfMerge[1]; + + if(rf_end < r2 && rf_str == r1){ + r2 = getNextIndex("up", cf, r1, r2); + } + else{ + r1 = getNextIndex("up", cf, 0, r1); + } + } + else{ + if(rf < r2 && rf == r1){ + r2 = getNextIndex("up", cf, r1, r2); + } + else{ + r1 = getNextIndex("up", cf, 0, r1); + } + } + } + else if(postion == "right"){ + if(c2 == Store.flowdata[0].length - 1){ + return; + } + + if(colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 + let cfMerge = getColMerge(cf, r1, r2); + let cf_str = cfMerge[0], cf_end = cfMerge[1]; + + if(cf_str > c1 && cf_end == c2){ + c1 = getNextIndex("right", rf, c1, c2); + } + else{ + c2 = getNextIndex("right", rf, c2, Store.flowdata[0].length - 1); + } + } + else{ + if(cf > c1 && cf == c2){ + c1 = getNextIndex("right", rf, c1, c2); + } + else{ + c2 = getNextIndex("right", rf, c2, Store.flowdata[0].length - 1); + } + } + } + else if(postion == "left"){ + if(c1 == 0){ + return; + } + + if(colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 + let cfMerge = getColMerge(cf, r1, r2); + let cf_str = cfMerge[0], cf_end = cfMerge[1]; + + if(cf_end < c2 && cf_str == c1){ + c2 = getNextIndex("left", rf, c1, c2); + } + else{ + c1 = getNextIndex("left", rf, 0, c1); + } + } + else{ + if(cf < c2 && cf == c1){ + c2 = getNextIndex("left", rf, c1, c2); + } + else{ + c1 = getNextIndex("left", rf, 0, c1); + } + } + } + + let rowseleted = [r1, r2]; + let columnseleted = [c1, c2]; + + row = Store.visibledatarow[r2]; + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + col = Store.visibledatacolumn[c2]; + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, row_pre, row - row_pre - 1, col_pre, col - col_pre - 1); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + // top = changeparam[2]; + // height = changeparam[3]; + // left = changeparam[4]; + // width = changeparam[5]; + } + + last["row"] = rowseleted; + last["column"] = columnseleted; + + selectHightlightShow(); + } + else if(type == "rangeOfFormula"){ + let last = formula.func_selectedrange; + let rf = last["row_focus"], cf = last["column_focus"]; + + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + + if(postion == "down"){ + if(r2 == Store.flowdata.length - 1){ + return; + } + + if(rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 + let rfMerge = getRowMerge(rf, c1, c2); + let rf_str = rfMerge[0], rf_end = rfMerge[1]; + + if(rf_str > r1 && rf_end == r2){ + r1 = getNextIndex("down", cf, r1, r2); + } + else{ + r2 = getNextIndex("down", cf, r2, Store.flowdata.length - 1); + } + } + else{ + if(rf > r1 && rf == r2){ + r1 = getNextIndex("down", cf, r1, r2); + } + else{ + r2 = getNextIndex("down", cf, r2, Store.flowdata.length - 1); + } + } + } + else if(postion == "up"){ + if(r1 == 0){ + return; + } + + if(rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 + let rfMerge = getRowMerge(rf, c1, c2); + let rf_str = rfMerge[0], rf_end = rfMerge[1]; + + if(rf_end < r2 && rf_str == r1){ + r2 = getNextIndex("up", cf, r1, r2); + } + else{ + r1 = getNextIndex("up", cf, 0, r1); + } + } + else{ + if(rf < r2 && rf == r1){ + r2 = getNextIndex("up", cf, r1, r2); + } + else{ + r1 = getNextIndex("up", cf, 0, r1); + } + } + } + else if(postion == "right"){ + if(c2 == Store.flowdata[0].length - 1){ + return; + } + + if(colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 + let cfMerge = getColMerge(cf, r1, r2); + let cf_str = cfMerge[0], cf_end = cfMerge[1]; + + if(cf_str > c1 && cf_end == c2){ + c1 = getNextIndex("right", rf, c1, c2); + } + else{ + c2 = getNextIndex("right", rf, c2, Store.flowdata[0].length - 1); + } + } + else{ + if(cf > c1 && cf == c2){ + c1 = getNextIndex("right", rf, c1, c2); + } + else{ + c2 = getNextIndex("right", rf, c2, Store.flowdata[0].length - 1); + } + } + } + else if(postion == "left"){ + if(c1 == 0){ + return; + } + + if(colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 + let cfMerge = getColMerge(cf, r1, r2); + let cf_str = cfMerge[0], cf_end = cfMerge[1]; + + if(cf_end < c2 && cf_str == c1){ + c2 = getNextIndex("left", rf, c1, c2); + } + else{ + c1 = getNextIndex("left", rf, 0, c1); + } + } + else{ + if(cf < c2 && cf == c1){ + c2 = getNextIndex("left", rf, c1, c2); + } + else{ + c1 = getNextIndex("left", rf, 0, c1); + } + } + } + + let rowseleted = [r1, r2]; + let columnseleted = [c1, c2]; + + row = Store.visibledatarow[r2]; + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + col = Store.visibledatacolumn[c2]; + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + let top = row_pre, height = row - row_pre - 1; + let left = col_pre, width = col - col_pre - 1; + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + formula.func_selectedrange = { + "left": left, + "width": width, + "top": top, + "height": height, + "left_move": left, + "width_move": width, + "top_move": top, + "height_move": height, + "row": rowseleted, + "column": columnseleted, + "row_focus": rf, + "column_focus": cf + }; + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": top, + "height": height + }).show(); + + formula.rangeSetValue({ + "row": rowseleted, + "column": columnseleted + }); + } + + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); + + let sleft = 0, stop = 0; + if (col - scrollLeft - winW + 20 > 0) { + sleft = col - winW + 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + else if (col_pre - scrollLeft - 20 < 0) { + sleft = col_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-x").scrollLeft(sleft); + } + } + + if (row - scrollTop - winH + 20 > 0) { + stop = row - winH + 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + else if (row_pre - scrollTop - 20 < 0) { + stop = row_pre - 20; + if (isScroll) { + $("#luckysheet-scrollbar-y").scrollTop(stop); + } + } + + clearTimeout(Store.countfuncTimeout); + countfunc(); +} + +//shift + 方向键 / ctrl + shift + 方向键 功能 +function rowHasMerge(r, c1, c2){ + let rowHasMerge = false; + + for(let c = c1; c <= c2; c++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + rowHasMerge = true; + break; + } + } + + return rowHasMerge; +} +function colHasMerge(c, r1, r2){ + let colHasMerge = false; + + for(let r = r1; r <= r2; r++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + colHasMerge = true; + break; + } + } + + return colHasMerge; +} +function getRowMerge(rIndex, c1, c2){ + let r1 = 0, r2 = Store.flowdata.length - 1; + + let str = null; + if(rIndex > r1){ + for(let r = rIndex; r >= r1; r--){ + for(let c = c1; c <= c2; c++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + let mc = Store.config["merge"][cell["mc"].r + "_" + cell["mc"].c]; + + if(str == null || mc.r < str){ + str = mc.r; + } + } + } + + if(rowHasMerge(str - 1, c1, c2) && str > r1){ + r = str - 1; + } + else{ + break; + } + } + } + else{ + str = r1; + } + + let end = null; + if(rIndex < r2){ + for(let r = rIndex; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + let mc = Store.config["merge"][cell["mc"].r + "_" + cell["mc"].c]; + + if(end == null || (mc.r + mc.rs - 1) > end){ + end = mc.r + mc.rs - 1; + } + } + } + + if(rowHasMerge(end + 1, c1, c2) && end < r2){ + r = end + 1; + } + else{ + break; + } + } + } + else{ + end = r2; + } + + return [str, end]; +} +function getColMerge(cIndex, r1, r2){ + let c1 = 0, c2 = Store.flowdata[0].length - 1; + + let str = null; + if(cIndex > c1){ + for(let c = cIndex; c >= c1; c--){ + for(let r = r1; r <= r2; r++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + let mc = Store.config["merge"][cell["mc"].r + "_" + cell["mc"].c]; + + if(str == null || mc.c < str){ + str = mc.c; + } + } + } + + if(colHasMerge(str - 1, r1, r2) && str > c1){ + c = str - 1; + } + else{ + break; + } + } + } + else{ + str = c1; + } + + let end = null; + if(cIndex < c2){ + for(let c = cIndex; c <= c2; c++){ + for(let r = r1; r <= r2; r++){ + let cell = Store.flowdata[r][c]; + + if(getObjType(cell) == "object" && ("mc" in cell)){ + let mc = Store.config["merge"][cell["mc"].r + "_" + cell["mc"].c]; + + if(end == null || (mc.c + mc.cs - 1) > end){ + end = mc.c + mc.cs - 1; + } + } + } + + if(colHasMerge(end + 1, r1, r2) && end < c2){ + c = end + 1; + } + else{ + break; + } + } + } + else{ + end = c2; + } + + return [str, end]; +} +function getNextIndex(direction, focusIndex, strIndex, endIndex) { + let index = null; + + let stNull; + if(direction == "down"){ + let stValue = Store.flowdata[strIndex][focusIndex]; + + if(getObjType(stValue) == "object" && isRealNull(stValue.v)){ + stNull = false; + } + else if(isRealNull(stValue)){ + stNull = false; + } + else{ + stNull = true; + } + + let cellNull = [], i = 0; + for(let r = strIndex + 1; r <= endIndex; r++){ + let cell = Store.flowdata[r][focusIndex]; + + if(getObjType(cell) == "object" && isRealNull(cell.v)){ + cellNull.push(false); + } + else if(isRealNull(cell)){ + cellNull.push(false); + } + else{ + cellNull.push(true); + } + + if(cellNull.length == 1 && stNull && cellNull[i] == false){ + index = strIndex + i + 1; + break; + } + else if(cellNull.length > 1){ + if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 + index = strIndex + i + 1; + break; + } + else if(!stNull){ //起始有值,找一个有值的位置 + if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 + index = strIndex + i + 1; + break; + } + else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 + index = strIndex + i; + break; + } + } + } + + if(r == endIndex){ + index = endIndex; + } + + i++; + } + } + else if(direction == "up"){ + let stValue = Store.flowdata[endIndex][focusIndex]; + + if(getObjType(stValue) == "object" && isRealNull(stValue.v)){ + stNull = false; + } + else if(isRealNull(stValue)){ + stNull = false; + } + else{ + stNull = true; + } + + let cellNull = [], i = 0; + for(let r = endIndex - 1; r >= strIndex; r--){ + let cell = Store.flowdata[r][focusIndex]; + + if(getObjType(cell) == "object" && isRealNull(cell.v)){ + cellNull.push(false); + } + else if(isRealNull(cell)){ + cellNull.push(false); + } + else{ + cellNull.push(true); + } + + if(cellNull.length == 1 && stNull && cellNull[i] == false){ + index = endIndex - (i + 1); + break; + } + else if(cellNull.length > 1){ + if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 + index = endIndex - (i + 1); + break; + } + else if(!stNull){ //起始有值,找一个有值的位置 + if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 + index = endIndex - (i + 1); + break; + } + else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 + index = endIndex - i; + break; + } + } + } + + if(r == strIndex){ + index = strIndex; + } + + i++; + } + } + else if(direction == "right"){ + let stValue = Store.flowdata[focusIndex][strIndex]; + + if(getObjType(stValue) == "object" && isRealNull(stValue.v)){ + stNull = false; + } + else if(isRealNull(stValue)){ + stNull = false; + } + else{ + stNull = true; + } + + let cellNull = [], i = 0; + for(let c = strIndex + 1; c <= endIndex; c++){ + let cell = Store.flowdata[focusIndex][c]; + + if(getObjType(cell) == "object" && isRealNull(cell.v)){ + cellNull.push(false); + } + else if(isRealNull(cell)){ + cellNull.push(false); + } + else{ + cellNull.push(true); + } + + if(cellNull.length == 1 && stNull && cellNull[i] == false){ + index = strIndex + i + 1; + break; + } + else if(cellNull.length > 1){ + if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 + index = strIndex + i + 1; + break; + } + else if(!stNull){ //起始有值,找一个有值的位置 + if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 + index = strIndex + i + 1; + break; + } + else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 + index = strIndex + i; + break; + } + } + } + + if(c == endIndex){ + index = endIndex; + } + + i++; + } + } + else if(direction == "left"){ + let stValue = Store.flowdata[focusIndex][endIndex]; + + if(getObjType(stValue) == "object" && isRealNull(stValue.v)){ + stNull = false; + } + else if(isRealNull(stValue)){ + stNull = false; + } + else{ + stNull = true; + } + + let cellNull = [], i = 0; + for(let c = endIndex - 1; c >= strIndex; c--){ + let cell = Store.flowdata[focusIndex][c]; + + if(getObjType(cell) == "object" && isRealNull(cell.v)){ + cellNull.push(false); + } + else if(isRealNull(cell)){ + cellNull.push(false); + } + else{ + cellNull.push(true); + } + + if(cellNull.length == 1 && stNull && cellNull[i] == false){ + index = endIndex - (i + 1); + break; + } + else if(cellNull.length > 1){ + if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 + index = endIndex - (i + 1); + break; + } + else if(!stNull){ //起始有值,找一个有值的位置 + if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 + index = endIndex - (i + 1); + break; + } + else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 + index = endIndex - i; + break; + } + } + } + + if(c == strIndex){ + index = strIndex; + } + + i++; + } + } + + return index; +} + +export { + luckysheetMoveEndCell, + luckysheetMoveHighlightCell, + luckysheetMoveHighlightCell2, + luckysheetMoveHighlightRange, + luckysheetMoveHighlightRange2, +} \ No newline at end of file diff --git a/src/controllers/sheetSearch.js b/src/controllers/sheetSearch.js new file mode 100644 index 000000000..70a215fe9 --- /dev/null +++ b/src/controllers/sheetSearch.js @@ -0,0 +1,80 @@ +function luckysheetbinary_search(arr, key) { + let low = 0, high = arr.length - 1; + + while (low <= high) { + let mid = parseInt((high + low) / 2); + + if (key < arr[mid] && (mid == 0 || key >= arr[mid - 1])) { + return mid; + } + else if (key >= arr[mid]) { + low = mid + 1; + } + else if (key < arr[mid]) { + high = mid - 1; + } + else { + return -1; + } + } +} + +function luckysheetorder_search(arr, y) { + let i = 0, + row = 0, + row_pre = 0, + row_index = -1, + i_ed = arr.length - 1; + + while (i < arr.length && i_ed >= 0 && i_ed >= i) { + row = arr[i_ed]; + + if (i_ed == 0) { + row_pre = 0; + } + else { + row_pre = arr[i_ed - 1]; + } + + if (y >= row_pre && y < row) { + row_index = i_ed; + break; + } + + row = arr[i]; + + if (i == 0) { + row_pre = 0; + } + else { + row_pre = arr[i - 1]; + } + + if (y >= row_pre && y < row) { + row_index = i; + break; + } + + i++; + i_ed--; + } + + return row_index; +} + +function luckysheet_searcharray(arr, y) { + let index = arr.length - 1; + + if (arr.length < 40 || y <= arr[20] || y >= arr[index - 20]) { + index = luckysheetorder_search(arr, y); + } + else { + index = luckysheetbinary_search(arr, y); + } + + return index; +} + +export { + luckysheet_searcharray, +} \ No newline at end of file diff --git a/src/controllers/sheetmanage.js b/src/controllers/sheetmanage.js new file mode 100644 index 000000000..1d38a16b1 --- /dev/null +++ b/src/controllers/sheetmanage.js @@ -0,0 +1,1507 @@ +import { isEditMode } from '../global/validate'; +import cleargridelement from '../global/cleargridelement'; +import { getcellvalue, datagridgrowth } from '../global/getdata'; +import { setcellvalue } from '../global/setdata'; +import luckysheetcreatedom from '../global/createdom'; +import tooltip from '../global/tooltip'; +import formula from '../global/formula'; +import { luckysheetrefreshgrid, jfrefreshgrid_rhcw } from '../global/refresh'; +import editor from '../global/editor'; +import { luckysheetextendtable, luckysheetdeletetable } from '../global/extend'; +import { isRealNum } from '../global/validate'; +import { replaceHtml, getObjType, chatatABC } from '../utils/util'; +import { sheetHTML } from './constant'; +import server from './server'; +import luckysheetConfigsetting from './luckysheetConfigsetting'; +import pivotTable from './pivotTable'; +import luckysheetsizeauto from './resize'; +import luckysheetPostil from './postil'; +import luckysheetFreezen from './freezen'; +import { createFilterOptions, labelFilterOptionState } from './filter'; +import { selectHightlightShow, selectionCopyShow } from './select'; +import Store from '../store'; + +const sheetmanage = { + generateRandomSheetIndex: function(prefix) { + if(prefix == null){ + prefix = "Sheet"; + } + + let userAgent = window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g, "").split(""); + + let mid = ""; + + for(let i = 0; i < 12; i++){ + mid += userAgent[Math.round(Math.random() * (userAgent.length - 1))]; + } + + let time = new Date().getTime(); + + return prefix + "_" + mid + "_" + time; + }, + generateRandomSheetName: function(file, isPivotTable) { + let index = file.length; + + for(let i = 0; i < file.length; i++){ + if(file[i].name.indexOf("Sheet") > -1 || file[i].name.indexOf("数据透视表") > -1){ + let suffix = parseFloat(file[i].name.replace("Sheet", "").replace("数据透视表", "")); + + if(suffix != "NaN" && Math.ceil(suffix) > index){ + index = Math.ceil(suffix); + } + } + } + + if(isPivotTable){ + return "数据透视表" + (index + 1); + } + else{ + return "Sheet" + (index + 1); + } + }, + generateCopySheetName: function(file, name) { + let copySheetName = ""; + + if(name.toString().indexOf("(副本") > -1){ + let copy_i = name.toString().indexOf("(副本"); + let name2 = name.toString().substring(0, copy_i) + "(副本"; + let index = null; + + for(let i = 0; i < file.length; i++){ + let fileName = file[i].name.toString(); + let st_i = fileName.indexOf(name2); + + if(st_i > -1){ + let ed_i = fileName.indexOf(")", st_i + name2.length); + let num = fileName.substring(st_i + name2.length, ed_i); + + if(isRealNum(num)){ + if(index == null || parseInt(num) > index){ + index = parseInt(num); + } + } + } + } + + if(index == null){ + copySheetName = name2 + "2)"; + } + else{ + index++; + copySheetName = name2 + index + ")"; + } + } + else{ + let index = null; + let hascopy = false; + let name2 = name + "(副本"; + + for(let i = 0; i < file.length; i++){ + let fileName = file[i].name.toString(); + let st_i = fileName.indexOf(name2); + + if(st_i > -1){ + hascopy = true; + let ed_i = fileName.indexOf(")", st_i + name2.length); + let num = fileName.substring(st_i + name2.length, ed_i); + + if(isRealNum(num)){ + if(index == null || parseInt(num) > index){ + index = parseInt(num); + } + } + } + } + + if(hascopy){ + if(index == null){ + copySheetName = name + "(副本2)"; + } + else{ + index++; + copySheetName = name + "(副本" + index + ")"; + } + } + else{ + copySheetName = name + "(副本)"; + } + } + + return copySheetName; + }, + getSheetByIndex: function(index) { + let _this = this; + + if(index == null){ + index = _this.getSheetIndex(Store.currentSheetIndex); + } + + let i = _this.getSheetIndex(index); + + return Store.luckysheetfile[i]; + }, + getCurSheetnoset: function() { + let curindex = 0; + + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i].status == 1) { + curindex = Store.luckysheetfile[i].index; + break; + } + } + + return curindex; + }, + getCurSheet: function() { + Store.currentSheetIndex = Store.luckysheetfile[0].index; + + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i].status == 1) { + Store.currentSheetIndex = Store.luckysheetfile[i].index; + break; + } + } + + return Store.currentSheetIndex; + }, + addNewSheet: function(e, isPivotTable) { + if(isEditMode()){ + // alert("非编辑模式下不允许该操作!"); + return; + } + + let _this = this; + + let order = Store.luckysheetfile.length; + let index = _this.generateRandomSheetIndex(); + + let sheetname = _this.generateRandomSheetName(Store.luckysheetfile, isPivotTable); + + $("#luckysheet-sheet-container-c").append(replaceHtml(sheetHTML, { "index": index, "active": "", "name": sheetname, "style": "","colorset":"" })); + + let sheetconfig = { + "name": sheetname, + "color": "", + "status": "0", + "order": order, + "index": index, + "celldata": [], + "row": Store.defaultrowNum, + "column": Store.defaultcolumnNum, + "config": {}, + "pivotTable": null, + "isPivotTable": !!isPivotTable + }; + Store.luckysheetfile.push(sheetconfig); + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); + $("#luckysheet-sheets-item" + index).addClass("luckysheet-sheets-item-active"); + $("#luckysheet-cell-main").append('
'); + cleargridelement(e); + + server.saveParam("sha", null, $.extend(true, {}, sheetconfig)); + + if (Store.clearjfundo) { + Store.jfundo = []; + let redo = {}; + redo["type"] = "addSheet"; + redo["sheetconfig"] = $.extend(true, {}, sheetconfig); + redo["index"] = index; + redo["Store.currentSheetIndex"] = Store.currentSheetIndex; + Store.jfredo.push(redo); + } + + _this.changeSheetExec(index, isPivotTable, true); + }, + setSheetHide: function(index) { + let _this = this; + + Store.luckysheetfile[_this.getSheetIndex(index)].hide = 1; + + let luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + index); + luckysheetcurrentSheetitem.hide(); + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); + + let indicator = luckysheetcurrentSheetitem.nextAll(":visible"); + if (luckysheetcurrentSheetitem.nextAll(":visible").length > 0) { + indicator = indicator.eq(0).data("index"); + } + else { + indicator = luckysheetcurrentSheetitem.preval(":visible").eq(0).data("index"); + } + $("#luckysheet-sheets-item" + indicator).addClass("luckysheet-sheets-item-active"); + + _this.changeSheetExec(indicator); + + server.saveParam("sh", luckysheetcurrentSheetitem.data("index"), 1, { "op": "hide", "cur": indicator }); + }, + setSheetShow: function(index) { + let _this = this; + + Store.luckysheetfile[_this.getSheetIndex(index)].hide = 0; + _this.changeSheetExec(index); + + server.saveParam("sh", index, 0, {"op": "show", "cur": null}); + }, + sheetMaxIndex: 0, + ordersheet: function(property) { + return function (a, b) { + let value1 = a[property]; + let value2 = b[property]; + return value1 - value2; + } + }, + getCurrentOrder: function() { + let orders = {}; + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function (a) { + let index = $(this).data("index"); + + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i].index == index) { + orders[index.toString()] = a; + break; + } + } + }); + + return orders; + }, + reOrderAllSheet: function() { + let orders = {}; + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function (a) { + let index = $(this).data("index"); + + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i].index == index) { + Store.luckysheetfile[i].order = a; + orders[index.toString()] = a; + break; + } + } + }); + + server.saveParam("shr", null, orders); + }, + createSheet: function() { //修复拖动sheet更新后台后,重新打开显示错误 + let _this = this; + + let btn = []; + Store.luckysheetfile.sort(_this.ordersheet('order')); + + for (let i = 0; i < Store.luckysheetfile.length; i++) { + let display = ""; + let sheetIndex = Store.luckysheetfile[i].index; + + let colorset = ''; + if(Store.luckysheetfile[i].color != null){ + colorset = '
'; + } + + if (Store.currentSheetIndex == sheetIndex) { //使用Store.luckysheetfile中的index比较,而不是order + btn.push(replaceHtml(sheetHTML, { "index": sheetIndex, "active": "luckysheet-sheets-item-active", "name": Store.luckysheetfile[i].name, "style": "","colorset":colorset })); + } + else { + if (Store.luckysheetfile[i].hide == 1) { + btn.push(replaceHtml(sheetHTML, { "index": sheetIndex, "active": "", "name": Store.luckysheetfile[i].name, "style": "display:none;","colorset":colorset })); + } + else { + btn.push(replaceHtml(sheetHTML, { "index": sheetIndex, "active": "", "name": Store.luckysheetfile[i].name, "style": "","colorset":colorset })); + } + display = "style='display:none;'"; + } + //Store.luckysheetfile[i].index = i; //index即为默认 + // if(sheetIndex > this.sheetMaxIndex){ + // this.sheetMaxIndex = sheetIndex; + // } + + $("#luckysheet-cell-main").append('
'); + } + + $("#luckysheet-sheet-container-c").append(btn.join("")); + + _this.locationSheet(); + }, + locationSheet: function() { + let $c = $("#luckysheet-sheet-container-c"), winW = $("#"+Store.container).width(); + let $cursheet = $("#luckysheet-sheet-container-c > div.luckysheet-sheets-item-active").eq(0); + + let scrollLeftpx = 0; + let c_width = 0; + + $("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){ + if($(this).hasClass("luckysheet-sheets-item-active")){ + scrollLeftpx = c_width; + } + c_width += $(this).outerWidth(); + }); + + setTimeout(function(){ + $c.scrollLeft(scrollLeftpx - 10); + + if (c_width >= winW * 0.7) { + $("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display", "inline-block"); + $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); + } + }, 1) + }, + copySheet: function(copyindex, e) { + if(isEditMode()){ + // alert("非编辑模式下不允许该操作!"); + return; + } + + let _this = this; + + let order = Store.luckysheetfile.length; + let index = _this.generateRandomSheetIndex(); + + let copyarrindex = _this.getSheetIndex(copyindex); + let copyjson = $.extend(true, {}, Store.luckysheetfile[copyarrindex]); + copyjson.order = order; + copyjson.index = index; + copyjson.name = _this.generateCopySheetName(Store.luckysheetfile, copyjson.name); + + let colorset = ''; + if(copyjson.color != null){ + colorset = '
'; + } + + let copyobject = $("#luckysheet-sheets-item" + copyindex); + $("#luckysheet-sheet-container-c").append(replaceHtml(sheetHTML, { "index": copyjson.index, "active": "", "name": copyjson.name, "order": copyjson.order, "style": "", "colorset": colorset })); + $("#luckysheet-sheets-item" + copyjson.index).insertAfter(copyobject); + Store.luckysheetfile.splice(copyindex + 1, 0, copyjson); + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); + $("#luckysheet-sheets-item" + index).addClass("luckysheet-sheets-item-active"); + $("#luckysheet-cell-main").append('
'); + cleargridelement(e); + + server.saveParam("shc", index, { "copyindex": copyindex, "name": copyjson.name }); + + _this.changeSheetExec(index); + _this.reOrderAllSheet(); + + if (Store.clearjfundo) { + Store.jfredo.push({ + "type": "copySheet", + "copyindex": copyindex, + "index": copyjson.index, + "sheetIndex": copyjson.index + }); + } + else if (Store.jfredo.length > 0) { + let jfredostr = Store.jfredo[Store.jfredo.length - 1]; + + if (jfredostr.type == "copySheet") { + jfredostr.index = copyjson.index; + jfredostr.sheetIndex = copyjson.index; + } + } + }, + hasSheet: function(index) { + if (index == null) { + return false; + } + + index = this.getSheetIndex(index); + + if (index == null) { + return false; + } + else { + return true; + } + }, + createSheetbydata: function(data, isrenew) { + let _this = this; + + let colorset = ''; + if(data.color != null){ + colorset = '
'; + } + + $("#luckysheet-sheet-container-c").append(replaceHtml(sheetHTML, { "index": data.index, "active": "", "name": data.name, "order": data.order, "style": "", "colorset": colorset })); + + let previndex = data.order; + if(previndex >= Store.luckysheetfile.length){ + previndex = Store.luckysheetfile.length - 1; + $("#luckysheet-sheets-item" + data.index).insertAfter($("#luckysheet-sheets-item" + Store.luckysheetfile[previndex].index)); + } + else{ + $("#luckysheet-sheets-item" + data.index).insertBefore($("#luckysheet-sheets-item" + Store.luckysheetfile[previndex].index)); + } + + Store.luckysheetfile.push(data); + + $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); + $("#luckysheet-sheets-item" + data.index).addClass("luckysheet-sheets-item-active"); + $("#luckysheet-cell-main").append('
'); + cleargridelement(); + + if(isrenew != null){ + server.saveParam("shre", null, { "reIndex": data.index }); + data.hide = 0; + server.saveParam("sh", data.index, 0, {"op": "show", "cur": null}); + } + else{ + server.saveParam("sha", null, data); + } + + _this.changeSheetExec(data.index, data.isPivotTable, true); + _this.reOrderAllSheet(); + }, + deleteSheet: function(index) { + let _this = this; + + let arrIndex = _this.getSheetIndex(index); + _this.setSheetHide(index); + + $("#luckysheet-sheets-item" + index).remove(); + $("#luckysheet-datavisual-selection-set-" + index).remove(); + + let removedsheet = Store.luckysheetfile.splice(arrIndex, 1); + _this.reOrderAllSheet(); + + server.saveParam("shd", null, {"deleIndex": index }); + + if (Store.clearjfundo) { + removedsheet[0].type = "deleteSheet"; + Store.jfredo.push(removedsheet[0]); + } + }, + nulldata: null, + getGridData: function(d) { + let ret = []; + + for(let r = 0; r < d.length; r++){ + for(let c = 0; c < d[0].length; c++){ + if(d[r][c] == null){ + continue; + } + + ret.push({r:r, c:c, v:d[r][c]}); + } + } + + return ret; + }, + buildGridData: function(file) { + let row = file.row == null ? Store.defaultrowNum : file.row, + column = file.column == null ? Store.defaultcolumnNum : file.column; + let data = datagridgrowth([], row, column); + + let celldata = file.celldata; + if(celldata != null){ + for(let i = 0; i < celldata.length; i++){ + let item = celldata[i]; + let r = item.r; + let c = item.c; + let v = item.v; + + if(r >= data.length){ + data = datagridgrowth(data, r - data.length + 1, 0); + } + if(c >= data[0].length){ + data = datagridgrowth(data, 0, c - data[0].length + 1); + } + + setcellvalue(r, c, data, v); + } + } + + //亿万格式+精确度 恢复全局初始化 + luckysheetConfigsetting.autoFormatw = false; + luckysheetConfigsetting.accuracy = undefined; + + return data; + }, + cutGridData: function(d) { + let rowindex = 0; + + for(let r = d.length - 1; r >= 0; r--){ + let isnull = true; + + for(let c = 0; c < d[0].length; c++){ + let value = getcellvalue(r, c); + + if(value != null && $.trim(value).length > 0){ + isnull = false; + break; + } + } + + if(!isnull){ + break; + } + else{ + rowindex = r; + } + } + + return d.slice(0, rowindex); + }, + addGridData: function(celldata, row, column) { + let data = datagridgrowth([], row, column); + + if(celldata != null){ + for(let i = 0; i < celldata.length; i++){ + let item = celldata[i]; + let r = item.r; + let c = item.c; + let v = item.v; + + if(r >= data.length){ + data = datagridgrowth(data, r - data.length + 1, 0); + } + + if(c >= data[0].length){ + data = datagridgrowth(data, 0, c - data[0].length + 1); + } + + setcellvalue(r, c, data, v) + } + } + + return data; + }, + initialjfFile: function(menu, title) { + let _this = this; + + _this.getCurSheet(); + let file = Store.luckysheetfile[_this.getSheetIndex(Store.currentSheetIndex)]; + _this.nulldata = datagridgrowth([], Store.defaultrowNum, Store.defaultcolumnNum); + let data = _this.buildGridData(file); + + Store.luckysheet_select_save = file["luckysheet_select_save"]; + if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ + if(data[0] != null && data[0][0] != null && data[0][0].mc != null){ + Store.luckysheet_select_save = [{ "row": [0, data[0][0].mc.rs - 1], "column": [0, data[0][0].mc.cs - 1] }]; + } + else{ + Store.luckysheet_select_save = [{ "row": [0, 0], "column": [0, 0] }]; + } + } + + Store.luckysheet_selection_range = file["luckysheet_selection_range"] == null ? [] : file["luckysheet_selection_range"]; + Store.config = file["config"] == null ? {} : file["config"]; + + let r2 = Store.luckysheet_select_save[0].row[1], + c2 = Store.luckysheet_select_save[0].column[1]; + + if(Store.luckysheet_select_save.length > 1){ + for(let i = 0; i < Store.luckysheet_select_save.length; i++){ + if(Store.luckysheet_select_save[i].row[1] > r2){ + r2 = Store.luckysheet_select_save[i].row[1]; + } + + if(Store.luckysheet_select_save[i].column[1] > c2){ + c2 = Store.luckysheet_select_save[i].column[1]; + } + } + } + + file.data = data; + + let rowheight = data.length; + if(r2 > rowheight - 1){ + rowheight = r2 + 1; + } + + let colwidth = data[0].length; + if(c2 > colwidth - 1){ + colwidth = c2 + 1; + } + + luckysheetcreatedom(colwidth, rowheight, data, menu, title); + + setTimeout(function () { + tooltip.createHoverTip("#luckysheet_info_detail" ,".luckysheet_info_detail_title, .luckysheet_info_detail_input, .luckysheet_info_detail_update"); + tooltip.createHoverTip("#luckysheet-wa-editor" ,".luckysheet-toolbar-menu-button, .luckysheet-toolbar-button, .luckysheet-toolbar-combo-button"); + + Store.luckysheetTableContentHW = [ + $("#luckysheet-cell-main").width() + Store.rowHeaderWidth - Store.cellMainSrollBarSize, + $("#luckysheet-cell-main").height() + Store.columeHeaderHeight - Store.cellMainSrollBarSize + ]; + $("#luckysheetTableContent, #luckysheetTableContentF").attr({ + width: Math.ceil(Store.luckysheetTableContentHW[0] * Store.devicePixelRatio), + height: Math.ceil(Store.luckysheetTableContentHW[1] * Store.devicePixelRatio) + }).css({ + width: Store.luckysheetTableContentHW[0], + height: Store.luckysheetTableContentHW[1] + }).get(0).getContext("2d"); + + let key = server.gridKey; + let cahce_key = key + "__qkcache"; + + let ini = function(){ + file["load"] = "1"; + + _this.createSheet(); + + let sheetindexset = _this.checkLoadSheetIndex(file); + let sheetindex = []; + + for(let i = 0; i < sheetindexset.length; i++){ + let item = sheetindexset[i]; + + if(item == file["index"]){ + continue; + } + + sheetindex.push(item); + } + + let execF = function(){ + _this.storeSheetParam(); + _this.restoreselect(); + _this.CacheNotLoadControll = []; + _this.restoreCache(); + formula.execFunctionGroup(); + _this.restoreSheetAll(Store.currentSheetIndex); + + luckysheetrefreshgrid(0, 0); + $("#luckysheet_info_detail_save").html("已恢复本地缓存"); + + if (!!file.isPivotTable) { + Store.luckysheetcurrentisPivotTable = true; + pivotTable.changePivotTable(Store.currentSheetIndex); + } + else { + Store.luckysheetcurrentisPivotTable = false; + $("#luckysheet-modal-dialog-slider-pivot").hide(); + luckysheetsizeauto(); + } + + if(typeof luckysheetConfigsetting.beforeCreateDom == "function" ){ + luckysheetConfigsetting.beforeCreateDom(luckysheet); + } + + if(luckysheetConfigsetting.pointEdit){ + setTimeout(function(){ + $("#luckysheetloadingdata").remove(); + }, 0); + } + else{ + setTimeout(function(){ + $("#luckysheetloadingdata").fadeOut().remove(); + }, 500); + } + } + + let loadSheetUrl = server.loadSheetUrl; + + if(sheetindex.length == 0 || loadSheetUrl == ""){ + execF(); + } + else{ + $.post(loadSheetUrl, {"gridKey" : server.gridKey, "index": sheetindex.join(",")}, function (d) { + let dataset = eval("(" + d + ")"); + + for(let item in dataset){ + if(item == file["index"]){ + continue; + } + + let otherfile = Store.luckysheetfile[_this.getSheetIndex(item)]; + + if(otherfile["load"] == null || otherfile["load"] == "0"){ + otherfile.celldata = dataset[item.toString()]; + otherfile["data"] = _this.buildGridData(otherfile); + otherfile["load"] = "1"; + } + } + + execF(); + }); + } + } + + try { + localforage.getItem(cahce_key).then(function(readValue) { + if(readValue != null){ + _this.CacheNotLoadControll = readValue; + } + server.clearcachelocaldata(function(){ + ini(); + }); + }); + } catch(e) { + ini(); + console.log("缓存操作失败"); + } + }, 1); + }, + storeSheetParam: function() { + let index = this.getSheetIndex(Store.currentSheetIndex); + let file = Store.luckysheetfile[index]; + file["visibledatarow"] = Store.visibledatarow; + file["visibledatacolumn"] = Store.visibledatacolumn; + file["ch_width"] = Store.ch_width; + file["rh_height"] = Store.rh_height; + file["luckysheet_select_save"] = $.extend(true, [], Store.luckysheet_select_save); + file["luckysheet_selection_range"] = $.extend(true, [], Store.luckysheet_selection_range); + + file["scrollLeft"] = $("#luckysheet-cell-main").scrollLeft();//列标题 + file["scrollTop"] = $("#luckysheet-cell-main").scrollTop();//行标题 + }, + setSheetParam: function(isload) { + let index = this.getSheetIndex(Store.currentSheetIndex); + let file = Store.luckysheetfile[index]; + + Store.flowdata = file["data"]; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + formula.execFunctionGroupData = null; + window.luckysheet_getcelldata_cache = null; + + luckysheetPostil.buildAllPs(Store.flowdata); + + Store.config = file["config"]; + + Store.luckysheet_select_save = file["luckysheet_select_save"] == null ? [] : file["luckysheet_select_save"]; + Store.luckysheet_selection_range = file["luckysheet_selection_range"] == null ? [] : file["luckysheet_selection_range"]; + + if(file["freezen"] == null){ + luckysheetFreezen.freezenhorizontaldata = null; + luckysheetFreezen.freezenverticaldata = null; + } + else{ + luckysheetFreezen.freezenhorizontaldata = file["freezen"].horizontal == null ? null : file["freezen"].horizontal.freezenhorizontaldata; + luckysheetFreezen.freezenverticaldata = file["freezen"].vertical == null ? null : file["freezen"].vertical.freezenverticaldata; + } + + createFilterOptions(file["filter_select"], file["filter"]); + + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + }, + restoreselect: function() { + let index = this.getSheetIndex(Store.currentSheetIndex); + let file = Store.luckysheetfile[index]; + + //选区 + selectHightlightShow(); + + //复制选区虚线框 + selectionCopyShow(); + + if (file["scrollLeft"] != null && file["scrollLeft"] > 0) { + $("#luckysheet-scrollbar-x").scrollLeft(file["scrollLeft"]); //列标题 + } + else { + $("#luckysheet-scrollbar-x").scrollLeft(0); + } + + if (file["scrollTop"] != null && file["scrollTop"] > 0) { + $("#luckysheet-scrollbar-y").scrollTop(file["scrollTop"]); //列标题 + } + else { + $("#luckysheet-scrollbar-y").scrollTop(0); + } + }, + storeSheetParamALL: function() { + let _this = this; + + _this.storeSheetParam(); + let index = _this.getSheetIndex(Store.currentSheetIndex); + Store.luckysheetfile[index]["data"] = Store.flowdata; + Store.luckysheetfile[index]["config"] = $.extend(true, {}, Store.config); + }, + changeSheet: function(index, isPivotInitial, isNewSheet) { + if(isEditMode()){ + // alert("非编辑模式下不允许该操作!"); + return; + } + + let _this = this; + + if(server.allowUpdate){ + $("#luckysheet-cell-main #luckysheet-multipleRange-show").empty(); + server.multipleIndex = 0; + } + + $('#luckysheet-filter-selected-sheet' + Store.currentSheetIndex + ', #luckysheet-filter-options-sheet' + Store.currentSheetIndex).hide(); + $('#luckysheet-filter-selected-sheet' + index + ', #luckysheet-filter-options-sheet' + index).show(); + + _this.storeSheetParamALL(); + _this.setCurSheet(index); + + let file = Store.luckysheetfile[_this.getSheetIndex(index)], + data = file.data, + cfg = file.config; + if (!!file.isPivotTable) { + Store.luckysheetcurrentisPivotTable = true; + if (!isPivotInitial) { + pivotTable.changePivotTable(index); + } + } + else { + Store.luckysheetcurrentisPivotTable = false; + $("#luckysheet-modal-dialog-slider-pivot").hide(); + luckysheetsizeauto(); + } + + let load = file["load"]; + if (load != null) { + _this.setSheetParam(true); + _this.showSheet(); + + setTimeout(function () { + formula.execFunctionGroup(); + luckysheetrefreshgrid(); + server.saveParam("shs", null, Store.currentSheetIndex); + }, 1); + } + else { + let loadSheetUrl = server.loadSheetUrl; + if(loadSheetUrl == "" || Store.luckysheetcurrentisPivotTable || !!isNewSheet){ + let data = _this.buildGridData(file); + + file["data"] = data; + file["load"] = "1"; + + _this.setSheetParam(); + _this.showSheet(); + + setTimeout(function () { + _this.restoreCache(); + formula.execFunctionGroup(); + _this.restoreSheetAll(Store.currentSheetIndex); + luckysheetrefreshgrid(); + }, 1); + + server.saveParam("shs", null, Store.currentSheetIndex); + } + else{ + $("#luckysheet-grid-window-1").append('
渲染中...
'); + + let sheetindex = _this.checkLoadSheetIndex(file); + + $.post(loadSheetUrl, {"gridKey" : server.gridKey, "index": sheetindex.join(",")}, function (d) { + let dataset = eval("(" + d + ")"); + file.celldata = dataset[index.toString()]; + let data = _this.buildGridData(file); + + setTimeout(function(){ + $("#luckysheetloadingdata").fadeOut().remove(); + }, 500); + + for(let item in dataset){ + if(item == index){ + continue; + } + + let otherfile = Store.luckysheetfile[_this.getSheetIndex(item)]; + + if(otherfile["load"] == null || otherfile["load"] == "0"){ + otherfile.celldata = dataset[item.toString()]; + otherfile["data"] = _this.buildGridData(otherfile); + otherfile["load"] = "1"; + } + } + + file["data"] = data; + file["load"] = "1"; + + _this.setSheetParam(); + _this.showSheet(); + + setTimeout(function () { + _this.restoreCache(); + formula.execFunctionGroup(); + _this.restoreSheetAll(Store.currentSheetIndex); + luckysheetrefreshgrid(); + }, 1); + + server.saveParam("shs", null, Store.currentSheetIndex); + }); + } + } + + $("#luckysheet-cell-main .luckysheet-datavisual-selection-set").hide(); + $("#luckysheet-datavisual-selection-set-" + index).show(); + + //隐藏其他sheet的图表,显示当前sheet的图表 chartMix + !!window.generator && generator.renderChartShow(index); + + luckysheetFreezen.initialFreezen(index); + _this.restoreselect(); + }, + checkLoadSheetIndex: function(file) { + let calchain = file.calcChain; //index + let chart = file.chart; //dataSheetIndex + let pivotTable = file.pivotTable; //pivotDataSheetIndex + + let ret= [], cache = {}; + ret.push(file.index); + cache[file.index.toString()] = 1; + + if(calchain != null){ + for(let i = 0; i < calchain.length; i++){ + let func = calchain[i]; + let dataindex = func.index; + + if(dataindex == null){ + continue; + } + + if(cache[dataindex.toString()] == null){ + ret.push(dataindex); + cache[dataindex.toString()] = 1; + } + } + } + + if(chart != null){ + for(let i = 0; i < chart.length; i++){ + let cc = chart[i]; + let dataindex = cc.dataSheetIndex; + + if(dataindex == null){ + continue; + } + + if(cache[dataindex.toString()] == null){ + ret.push(dataindex); + cache[dataindex.toString()] = 1; + } + } + } + + if(pivotTable != null){ + let dataindex = pivotTable.pivotDataSheetIndex; + + if(dataindex != null && cache[dataindex.toString()] == null){ + ret.push(dataindex); + cache[dataindex.toString()] = 1; + } + } + + return ret; + }, + showSheet: function() { + $("#luckysheet-cell-flow_0").css({ "width": Store.ch_width, "top": "-1px" }); //width更新 + $("#luckysheet-sheettable_0").css({ "width": Store.ch_width - 1, "height": Store.rh_height }); + $("#luckysheetrowHeader_0").css("height", Store.rh_height); + $("#luckysheet-cols-h-cells_0").css("width", Store.ch_width); //width更新 + + $("#luckysheet-scrollbar-x div").width(Store.ch_width); + $("#luckysheet-scrollbar-y div").height(Store.rh_height - 30); + }, + setCurSheet: function(index) { + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i]["index"] == index) { + Store.luckysheetfile[i].status = 1; + } + else { + Store.luckysheetfile[i].status = 0; + } + } + + Store.currentSheetIndex = index; + }, + getSheetIndex: function(index) { + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i]["index"] == index) { + return i; + } + } + + return null; + }, + changeSheetExec: function(index, isPivotInitial, isNewSheet) { + let $sheet = $("#luckysheet-sheets-item" + index); + + window.luckysheet_getcelldata_cache = null; + $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); + $sheet.addClass("luckysheet-sheets-item-active").show(); + + cleargridelement(); + this.changeSheet(index, isPivotInitial, isNewSheet); + + $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); + + if (formula.rangestart) { + formula.createRangeHightlight(); + } + + let $c = $("#luckysheet-sheet-container-c"); + $c.scrollLeft($sheet.offset().left); + + let c_width = $c.width(), c_srollwidth = $c[0].scrollWidth, scrollLeft = $c.scrollLeft(); + + if (scrollLeft <= 0) { + $("#luckysheet-sheet-container .docs-sheet-fade-left").hide(); + } + else { + $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); + } + + if (c_width + scrollLeft >= c_srollwidth) { + $("#luckysheet-sheet-container .docs-sheet-fade-right").hide(); + } + else { + $("#luckysheet-sheet-container .docs-sheet-fade-right").show(); + } + }, + delChart: function(chart_id, sheetIndex) { + let index = this.getSheetIndex(sheetIndex); + let file = Store.luckysheetfile[index]; + + if (file.chart == null) { + file.chart = []; + } + else { + for (let i = 0; i < file.chart.length; i++) { + if (file.chart[i].chart_id == chart_id) { + Store.luckysheetfile[index].chart.splice(i, 1); + break; + } + } + } + }, + saveChart: function(json) {//采用chartMix store存储,弃用Store.luckysheetfile存储,防止重复存储 + let index = this.getSheetIndex(json.sheetIndex); + let file = Store.luckysheetfile[index]; + + if (file.chart == null) { + file.chart = []; + file.chart.push(json); + } + else { + for (let i = 0; i < file.chart.length; i++) { + if (file.chart[i].chart_id == json.chart_id) { + let old = $.extend(true, {}, file.chart[i]); + file.chart[i] = $.extend(true, {}, old, json); + return; + } + } + + file.chart.push(json); + } + }, + getChart: function(sheetIndex, chart_id) { + let index = this.getSheetIndex(sheetIndex); + let file = Store.luckysheetfile[index]; + + if (file.chart == null) { + return null; + } + else { + for (let i = 0; i < file.chart.length; i++) { + if (file.chart[i].chart_id == chart_id) { + return file.chart[i]; + } + } + + return null; + } + }, + getRangetxt: function(sheetIndex, range, currentIndex) { + let sheettxt = ""; + + if (currentIndex == null) { + currentIndex = Store.currentSheetIndex; + } + + if (sheetIndex != currentIndex) { + sheettxt = Store.luckysheetfile[this.getSheetIndex(sheetIndex)].name + "!"; + } + + let row0 = range["row"][0], row1 = range["row"][1]; + let column0 = range["column"][0], column1 = range["column"][1]; + + if (row0 == null && row1 == null) { + return sheettxt + chatatABC(column0) + ":" + chatatABC(column1); + } + else if (column0 == null && column1 == null) { + return sheettxt + (row0 + 1) + ":" + (row1 + 1); + } + else { + if (column0 == column1 && row0 == row1) { + return sheettxt + chatatABC(column0) + (row0 + 1); + } + else { + return sheettxt + chatatABC(column0) + (row0 + 1) + ":" + chatatABC(column1) + (row1 + 1); + } + } + }, + getSheetName: function(sheetIndex) { + if (sheetIndex == null) { + sheetIndex = Store.currentSheetIndex; + } + + return Store.luckysheetfile[this.getSheetIndex(sheetIndex)].name; + }, + getSheetMerge: function() { + if(Store.config.merge == null){ + return null; + } + + return Store.config.merge; + }, + getSheetData: function(sheetIndex) { + if (sheetIndex == null) { + sheetIndex = Store.currentSheetIndex; + } + + return Store.luckysheetfile[this.getSheetIndex(sheetIndex)].data; + }, + getSheetConfig: function(sheetIndex) { + let _this = this; + + if (sheetIndex == null) { + sheetIndex = Store.currentSheetIndex; + } + + let config = Store.luckysheetfile[_this.getSheetIndex(sheetIndex)].config; + + if(config == null){ + Store.luckysheetfile[_this.getSheetIndex(sheetIndex)].config = {}; + } + + return Store.luckysheetfile[_this.getSheetIndex(sheetIndex)].config; + }, + restoreFilter: function(sheetIndex) { + let index = this.getSheetIndex(sheetIndex); + let file = Store.luckysheetfile[index]; + + if($('#luckysheet-filter-selected-sheet' + sheetIndex).length > 0 || file.filter_select == null || JSON.stringify(file.filter_select) == "{}"){ + if(file.config != null && file.config.rowhidden != null){ + file.config.rowhidden = {}; + Store.config = file.config; + + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + + return; + } + + if(getObjType(file.filter_select) != "object"){ + file.filter_select = JSON.parse(file.filter_select); + } + + if(file.filter_select == null || file.filter_select.row == null || file.filter_select.column == null){ + return; + } + + createFilterOptions(file.filter_select); + + if(getObjType(file.filter) != "object"){ + if(file.filter != null && getObjType(file.filter) == "string"){ + file.filter = JSON.parse(file.filter); + } + } + + let rowhidden = {}; + if(file.config != null && file.config.rowhidden != null){ + rowhidden = file.config.rowhidden; + } + + $("#luckysheet-filter-options-sheet" + sheetIndex + " .luckysheet-filter-options").each(function(i){ + if(file.filter == null){ + return false; + } + + let $top = $(this); + let item = file.filter[i]; + + if(item == null){ + return true; + } + + if(getObjType(item) != "object"){ + item = JSON.parse(item); + } + + labelFilterOptionState($top, item.optionstate, item.rowhidden, item.caljs, false, item.st_r, item.ed_r, item.cindex, item.st_c, item.ed_c); + + rowhidden = $.extend(true, rowhidden, item.rowhidden); + }); + + if(file.config == null){ + file.config = {}; + } + + file.config["rowhidden"] = rowhidden; + Store.config = file.config; + + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + }, + restorePivot: function(sheetIndex) { + let index = this.getSheetIndex(sheetIndex); + let file = Store.luckysheetfile[index]; + + if (!file.isPivotTable) { + return; + } + + pivotTable.getCellData(sheetIndex); + pivotTable.initialPivotManage(true); + pivotTable.refreshPivotTable(); + }, + restoreSheetAll: function(sheetIndex) { + let _this= this; + _this.restorePivot(sheetIndex); + _this.restoreFilter(sheetIndex); + _this.restoreFreezen(sheetIndex); + }, + restoreFreezen: function(sheetIndex) { + luckysheetFreezen.initialFreezen(sheetIndex); + }, + restoreCache: function() { + let _this = this; + + let data = _this.CacheNotLoadControll; + _this.CacheNotLoadControll = []; + + if(data.length == 0){ + return; + } + + for(let i = 0; i < data.length; i++){ + let item = data[i]; + _this.execCache(item); + } + }, + CacheNotLoadControll:[], + execCache: function(item) { + let _this = this; + + let type = item.t; + let index = item.i; + let value = item.v; + let file = Store.luckysheetfile[_this.getSheetIndex(index)]; + + if(type == "sha"){ + Store.luckysheetfile.push(value); + } + else if(type == "shc"){ + let copyjson = $.extend(true, {}, Store.luckysheetfile[_this.getSheetIndex(value.copyindex)]); + copyjson.index = index; + Store.luckysheetfile.push(copyjson); + } + else if(type == "shd"){ + Store.luckysheetfile.splice(value.deleIndex, 1); + } + else if(type == "shr"){ + for(let pos in value){ + Store.luckysheetfile[_this.getSheetIndex(pos)].order = value[pos]; + } + } + + if((file == null || file.load != "1") && !(type in {"sha":0, "shc":0, "shd":0, "shr":0}) ){ + _this.CacheNotLoadControll.push(item); + return; + } + + if(type == "v"){ + let r = item.r, c = item.c, v = item.v; + let data = _this.getSheetData(index); + file.data[r][c] = v; + } + else if(type == "fc"){ + let op = item.op, pos = item.pos; + + if(getObjType(value) != "object"){ + value = eval('('+ value +')'); + } + + let r = value.r, c = value.c; + let func = value.func; + + if(op == "del" ){ + formula.delFunctionGroup(r, c, index); + } + else { + formula.insertUpdateFunctionGroup(r, c, func, index); + } + } + else if(type == "cg"){ + let v = value, k = item.k; + let config1 = _this.getSheetConfig(index);; + + if(!(k in config1)){ + config1[k] = {}; + } + + for(let key in v){ + config1[k][key] = v[key]; + } + + Store.config = config1; + } + else if(type == "f"){ + let v = value, op = item.op, pos = item.pos; + let filter = file.filter; + + if(filter == null){ + filter = {}; + } + + if(op == "upOrAdd"){ + filter[pos] = v; + } + else if(op == "del"){ + delete filter[pos]; + } + } + else if(type == "fsc"){ + file.filter = null; + file.filter_select = null; + } + else if(type == "fsr"){ + let v = value; + file.filter = v.filter; + file.filter_select = v.filter_select; + } + else if(type == "sh"){ + let op = item.op, cur = item.cur, v = value; + if(op == "hide"){ + file.status = 0; + Store.luckysheetfile[_this.getSheetIndex(cur)].status = 1; + } + else if(op == "show"){ + for(let i = 0; i < Store.luckysheetfile.length; i++){ + Store.luckysheetfile[i].status = 0; + } + file.status = 1; + } + } + else if(type == "all"){ + let k = item.k, s = item.s; + if(s && getObjType(value) != "object"){ + file[k] = JSON.stringify(value); + } + else{ + file[k] = value; + } + } + else if(type == "c"){ + let op = item.op, cid = item.cid; + + if(op == "add"){ + file.chart.push(value); + } + else if(op == "xy" || op == "wh" || op == "update"){ + for(let i = 0; i < file.chart.length; i++){ + if(file.chart[i].chart_id == cid){ + for(let item in file.chart[i]){ + for(let vitem in value){ + if(item == vitem){ + file.chart[i][item] = value[vitem]; + } + } + } + return; + } + } + } + else if(op == "del"){ + for(let i = 0; i < file.chart.length; i++){ + if(file.chart[i].chart_id == cid){ + file.chart.splice(i, 1); + return; + } + } + } + } + else if(type == "drc"){ + let rc = item.rc, index = value.index, len = value.len; + let celldata = file.celldata; + + if(rc == "r"){ + for(let i = 0; celldata.length == 0; i++){ + let cell = celldata[i]; + if(cell.r >= index && cell.r < index + len){ + delete celldata[i]; + } + else if(cell.r >= index + len){ + cell.r -= len; + } + } + + file.row -= len; + } + else{ + for(let i = 0; celldata.length == 0; i++){ + let cell = celldata[i]; + if(cell.c >= index && cell.c < index + len){ + delete celldata[i]; + } + else if(cell.c >= index + len){ + cell.c -= len; + } + } + + file.column -= len; + } + + let ret = []; + for(let i = 0; i < celldata.length; i++){ + if(celldata[i] != null){ + ret.push(celldata[i]); + } + } + file.celldata = ret; + + let mtype, mst, med; + if(rc == "r"){ + mtype = "row"; + } + else{ + mtype = "column"; + } + mst = index; + med = index + len - 1; + + luckysheetdeletetable(mtype, mst, med, true); + } + else if(type=="arc"){ + let rc = item.rc, index = value.index, len = value.len; + let celldata = file.celldata; + + if(rc == "r"){ + for(let i = 0; i < celldata.length; i++){ + let cell = celldata[i]; + if(cell.r > index){ + cell.r += len; + } + } + + file.row += len; + } + else{ + for(let i = 0; i < celldata.length; i++){ + let cell = celldata[i]; + if(cell.c > index){ + cell.c += len; + } + } + + file.column += len; + } + + let mtype; + if(rc == "r"){ + mtype = "row"; + } + else{ + mtype = "column"; + } + + luckysheetextendtable(mtype, index, len, true); + } + else if(type == "na"){ + server.saveParam("na", null, value); + } + else if(type == "thumb"){ + setTimeout(function(){ + _this.imageRequest(); + }, 2000); + } + } +} + +export default sheetmanage; \ No newline at end of file diff --git a/src/controllers/sparkline.js b/src/controllers/sparkline.js new file mode 100644 index 000000000..978d2d527 --- /dev/null +++ b/src/controllers/sparkline.js @@ -0,0 +1,2254 @@ +//sparkline设置 +let createClass = function (/* [baseclass, [mixin, ...]], definition */) { + let Class, args; + Class = function () { + this.init.apply(this, arguments); + }; + if (arguments.length > 1) { + if (arguments[0]) { + Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]); + Class._super = arguments[0].prototype; + } else { + Class.prototype = arguments[arguments.length - 1]; + } + if (arguments.length > 2) { + args = Array.prototype.slice.call(arguments, 1, -1); + args.unshift(Class.prototype); + $.extend.apply($, args); + } + } else { + Class.prototype = arguments[0]; + } + Class.prototype.cls = Class; + return Class; +}; + +/** + * Wraps a format string for tooltips + * {{x}} + * {{x.2} + * {{x:months}} + */ +let SPFormat = createClass({ + fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g, + precre: /(\w+)\.(\d+)/, + + init: function (format, fclass) { + this.format = format; + this.fclass = fclass; + }, + + render: function (fieldset, lookups, options) { + let self = this, + fields = fieldset, + match, token, lookupkey, fieldvalue, prec; + return this.format.replace(this.fre, function () { + let lookup; + token = arguments[1]; + lookupkey = arguments[3]; + match = self.precre.exec(token); + if (match) { + prec = match[2]; + token = match[1]; + } else { + prec = false; + } + fieldvalue = fields[token]; + if (fieldvalue === undefined) { + return ''; + } + if (lookupkey && lookups && lookups[lookupkey]) { + lookup = lookups[lookupkey]; + if (lookup.get) { // RangeMap + return lookups[lookupkey].get(fieldvalue) || fieldvalue; + } else { + return lookups[lookupkey][fieldvalue] || fieldvalue; + } + } + if (isNumber(fieldvalue)) { + if (options.get('numberFormatter')) { + fieldvalue = options.get('numberFormatter')(fieldvalue); + } else { + fieldvalue = formatNumber(fieldvalue, prec, + options.get('numberDigitGroupCount'), + options.get('numberDigitGroupSep'), + options.get('numberDecimalMark')); + } + } + return fieldvalue; + }); + } +}); + +// convience method to avoid needing the new operator +$.spformat = function(format, fclass) { + return new SPFormat(format, fclass); +}; + +let clipval = function (val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +}; + +let quartile = function (values, q) { + let vl; + if (q === 2) { + vl = Math.floor(values.length / 2); + return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2; + } else { + if (values.length % 2 ) { // odd + vl = (values.length * q + q) / 4; + return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1]; + } else { //even + vl = (values.length * q + 2) / 4; + return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1]; + + } + } +}; + +let normalizeValue = function (val) { + let nf; + switch (val) { + case 'undefined': + val = undefined; + break; + case 'null': + val = null; + break; + case 'true': + val = true; + break; + case 'false': + val = false; + break; + default: + nf = parseFloat(val); + if (val == nf) { + val = nf; + } + } + return val; +}; + +let normalizeValues = function (vals) { + let i, result = []; + for (i = vals.length; i--;) { + result[i] = normalizeValue(vals[i]); + } + return result; +}; + + +let all = function (val, arr, ignoreNull) { + let i; + for (i = arr.length; i--; ) { + if (ignoreNull && arr[i] === null) continue; + if (arr[i] !== val) { + return false; + } + } + return true; +}; + +// sums the numeric values in an array, ignoring other values +let sum = function (vals) { + let total = 0, i; + for (i = vals.length; i--;) { + total += typeof vals[i] === 'number' ? vals[i] : 0; + } + return total; +}; + +let remove = function (vals, filter) { + let i, vl, result = []; + for (i = 0, vl = vals.length; i < vl; i++) { + if (vals[i] !== filter) { + result.push(vals[i]); + } + } + return result; +}; + +let isNumber = function (num) { + return !isNaN(parseFloat(num)) && isFinite(num); +}; + +let formatNumber = function (num, prec, groupsize, groupsep, decsep) { + let p, i; + num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split(''); + p = (p = $.inArray('.', num)) < 0 ? num.length : p; + if (p < num.length) { + num[p] = decsep; + } + for (i = p - groupsize; i > 0; i -= groupsize) { + num.splice(i, 0, groupsep); + } + return num.join(''); +}; + + +let RangeMap = createClass({ + init: function (map) { + let key, range, rangelist = []; + for (key in map) { + if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) { + range = key.split(':'); + range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]); + range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]); + range[2] = map[key]; + rangelist.push(range); + } + } + this.map = map; + this.rangelist = rangelist || false; + }, + + get: function (value) { + let rangelist = this.rangelist, + i, range, result; + if ((result = this.map[value]) !== undefined) { + return result; + } + if (rangelist) { + for (i = rangelist.length; i--;) { + range = rangelist[i]; + if (range[0] <= value && range[1] >= value) { + return range[2]; + } + } + } + return undefined; + } +}); + +// Convenience function +$.range_map = function(map) { + return new RangeMap(map); +}; + +const luckysheetSparkline = { + defaultOption:{ + // Settings common to most/all chart types + common: { + type: 'line', + lineColor: '#2ec7c9', + fillColor: '#CCF3F4', + defaultPixelsPerValue: 3, + width: 'auto', + height: 'auto', + composite: false, + tagValuesAttribute: 'values', + tagOptionsPrefix: 'spark', + enableTagOptions: false, + enableHighlight: true, + highlightLighten: 1.4, + tooltipSkipNull: true, + tooltipPrefix: '', + tooltipSuffix: '', + disableHiddenCheck: false, + numberFormatter: false, + numberDigitGroupCount: 3, + numberDigitGroupSep: ',', + numberDecimalMark: '.', + disableTooltips: true, + disableInteraction: true, + offsetX:0, + offsetY:0 + }, + // Defaults for line charts + //=LINESPL + line: { + spotColor: 0, + highlightSpotColor: '#5f5', + highlightLineColor: '#f22', + spotRadius: 1.5, + minSpotColor: 0, + maxSpotColor: 0, + lineWidth: 1, + normalRangeMin: undefined, + normalRangeMax: undefined, + normalRangeColor: '#ccc', + drawNormalOnTop: true, + chartRangeMin: undefined, + chartRangeMax: undefined, + chartRangeMinX: undefined, + chartRangeMaxX: undefined, + // tooltipFormat: new SPFormat(' {{prefix}}{{y}}{{suffix}}') + }, + // Defaults for bar charts + bar: { + barColor: '#fc5c5c', + negBarColor: '#97b552', + stackedBarColor: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], + zeroColor: undefined, + nullColor: undefined, + zeroAxis: true, + barWidth: 4, + barSpacing: 1, + chartRangeMax: undefined, + chartRangeMin: undefined, + chartRangeClip: false, + colorMap: undefined, + // tooltipFormat: new SPFormat(' {{prefix}}{{value}}{{suffix}}') + }, + column: { + barColor: '#fc5c5c', + negBarColor: '#97b552', + stackedBarColor: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], + zeroColor: undefined, + nullColor: undefined, + zeroAxis: true, + barWidth: 4, + barSpacing: 1, + chartRangeMax: undefined, + chartRangeMin: undefined, + chartRangeClip: false, + colorMap: undefined, + // tooltipFormat: new SPFormat(' {{prefix}}{{value}}{{suffix}}') + }, + // Defaults for tristate charts + tristate: { + barWidth: 4, + barSpacing: 1, + posBarColor: '#fc5c5c', + negBarColor: '#97b552', + zeroBarColor: '#999', + colorMap: {}, + // tooltipFormat: new SPFormat(' {{value:map}}'), + // tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } } + }, + // Defaults for discrete charts + discrete: { + lineHeight: 'auto', + thresholdColor: "#fc5c5c", + thresholdValue: 0, + chartRangeMax: undefined, + chartRangeMin: undefined, + chartRangeClip: false, + // tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}') + }, + // Defaults for bullet charts + bullet: { + targetColor: '#f33', + targetWidth: 3, // width of the target bar in pixels + performanceColor: '#33f', + rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff','#6D87FF','#5876FF','#4465FF','#2F54FF','#1A43FF','#0532FF'], + base: undefined, // set this to a number to change the base start number + // tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'), + // tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} } + }, + // Defaults for pie charts + pie: { + offset: 0, + sliceColors: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], + borderWidth: 0, + borderColor: '#000', + // tooltipFormat: new SPFormat(' {{value}} ({{percent.1}}%)') + }, + // Defaults for box plots + box: { + raw: false, + boxLineColor: '#000', + boxFillColor: '#cdf', + whiskerColor: '#000', + outlierLineColor: '#5E5E5E', + outlierFillColor: '#fff', + medianColor: '#f00', + showOutliers: true, + outlierIQR: 1.5, + spotRadius: 1.5, + target: undefined, + targetColor: '#4a2', + chartRangeMax: undefined, + chartRangeMin: undefined, + // tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'), + // tooltipFormatFieldlistKey: 'field', + // tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median', + // uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier', + // lw: 'Left Whisker', rw: 'Right Whisker'} } + } + }, + line:{ + type: 'line', + init: function (el, values, options, width, height) { + //line._super.init.call(this, el, values, options, width, height); + this.vertices = []; + this.regionMap = []; + this.xvalues = []; + this.yvalues = []; + this.yminmax = []; + this.hightlightSpotId = null; + this.lastShapeId = null; + //this.initTarget(); + }, + getRegion: function (el, x, y) { + let i, + regionMap = this.regionMap; // maps regions to value positions + for (i = regionMap.length; i--;) { + if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) { + return regionMap[i][2]; + } + } + return undefined; + }, + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion; + return { + isNull: this.yvalues[currentRegion] === null, + x: this.xvalues[currentRegion], + y: this.yvalues[currentRegion], + color: this.options.get('lineColor'), + fillColor: this.options.get('fillColor'), + offset: currentRegion + }; + }, + renderHighlight: function () { + let currentRegion = this.currentRegion, + target = this.target, + vertex = this.vertices[currentRegion], + options = this.options, + spotRadius = options.get('spotRadius'), + highlightSpotColor = options.get('highlightSpotColor'), + highlightLineColor = options.get('highlightLineColor'), + highlightSpot, highlightLine; + + if (!vertex) { + return; + } + if (spotRadius && highlightSpotColor) { + highlightSpot = target.drawCircle(vertex[0], vertex[1], + spotRadius, undefined, highlightSpotColor); + this.highlightSpotId = highlightSpot.id; + target.insertAfterShape(this.lastShapeId, highlightSpot); + } + if (highlightLineColor) { + highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0], + this.canvasTop + this.canvasHeight, highlightLineColor); + this.highlightLineId = highlightLine.id; + target.insertAfterShape(this.lastShapeId, highlightLine); + } + }, + removeHighlight: function () { + let target = this.target; + if (this.highlightSpotId) { + target.removeShapeId(this.highlightSpotId); + this.highlightSpotId = null; + } + if (this.highlightLineId) { + target.removeShapeId(this.highlightLineId); + this.highlightLineId = null; + } + }, + scanValues: function () { + let values = this.values, + valcount = values.length, + xvalues = this.xvalues, + yvalues = this.yvalues, + yminmax = this.yminmax, + i, val, isStr, isArray, sp; + for (i = 0; i < valcount; i++) { + val = values[i]; + isStr = typeof(values[i]) === 'string'; + isArray = typeof(values[i]) === 'object' && values[i] instanceof Array; + sp = isStr && values[i].split(':'); + if (isStr && sp.length === 2) { // x:y + xvalues.push(Number(sp[0])); + yvalues.push(Number(sp[1])); + yminmax.push(Number(sp[1])); + } else if (isArray) { + xvalues.push(val[0]); + yvalues.push(val[1]); + yminmax.push(val[1]); + } else { + xvalues.push(i); + if (values[i] === null || values[i] === 'null') { + yvalues.push(null); + } else { + yvalues.push(Number(val)); + yminmax.push(Number(val)); + } + } + } + if (this.options.get('xvalues')) { + xvalues = this.options.get('xvalues'); + } + + this.maxy = this.maxyorg = Math.max.apply(Math, yminmax); + this.miny = this.minyorg = Math.min.apply(Math, yminmax); + + this.maxx = Math.max.apply(Math, xvalues); + this.minx = Math.min.apply(Math, xvalues); + + this.xvalues = xvalues; + this.yvalues = yvalues; + this.yminmax = yminmax; + + }, + processRangeOptions: function () { + let options = this.options, + normalRangeMin = options.get('normalRangeMin'), + normalRangeMax = options.get('normalRangeMax'); + + if (normalRangeMin !== undefined) { + if (normalRangeMin < this.miny) { + this.miny = normalRangeMin; + } + if (normalRangeMax > this.maxy) { + this.maxy = normalRangeMax; + } + } + if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) { + this.miny = options.get('chartRangeMin'); + } + if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) { + this.maxy = options.get('chartRangeMax'); + } + if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) { + this.minx = options.get('chartRangeMinX'); + } + if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) { + this.maxx = options.get('chartRangeMaxX'); + } + + }, + drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) { + let normalRangeMin = this.options.get('normalRangeMin'), + normalRangeMax = this.options.get('normalRangeMax'), + ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))), + height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey); + //(x1, y1, x2, y2, lineColor, lineWidth) + if(height==0 && normalRangeMin==normalRangeMax){ + height=1; + } + this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append(); + }, + render: function (el,userValues) { + this.vertices = []; + this.regionMap = []; + this.xvalues = []; + this.yvalues = []; + this.yminmax = []; + this.hightlightSpotId = null; + this.lastShapeId = null; + + this.values = userValues; + + let options = this.options, + target = this.target, + + canvasWidth = el.mergedOptions.width, + canvasHeight = el.mergedOptions.height, + + vertices = this.vertices, + spotRadius = options.get('spotRadius'), + regionMap = this.regionMap, + rangex, rangey, yvallast, + canvasTop, canvasLeft, + vertex, path, paths, x, y, xnext, xpos, xposnext, + last, next, yvalcount, lineShapes, fillShapes, plen, + valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i; + + // if (!line._super.render.call(this)) { + // return; + // } + + this.scanValues(); + this.processRangeOptions(); + + xvalues = this.xvalues; + yvalues = this.yvalues; + + if (!this.yminmax.length || this.yvalues.length < 2) { + // empty or all null valuess + return; + } + + canvasTop = canvasLeft = 0; + + rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx; + rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny; + yvallast = this.yvalues.length - 1; + + if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) { + spotRadius = 0; + } + if (spotRadius) { + // adjust the canvas size as required so that spots will fit + hlSpotsEnabled = options.get('highlightSpotColor') && !options.get('disableInteraction'); + if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) { + canvasHeight -= Math.ceil(spotRadius); + } + if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) { + canvasHeight -= Math.ceil(spotRadius); + canvasTop += Math.ceil(spotRadius); + } + if (hlSpotsEnabled || + ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) { + canvasLeft += Math.ceil(spotRadius); + canvasWidth -= Math.ceil(spotRadius); + } + if (hlSpotsEnabled || options.get('spotColor') || + (options.get('minSpotColor') || options.get('maxSpotColor') && + (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) { + canvasWidth -= Math.ceil(spotRadius); + } + } + + + canvasHeight--; + + if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) { + this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey); + } + + path = []; + paths = [path]; + last = next = null; + yvalcount = yvalues.length; + for (i = 0; i < yvalcount; i++) { + x = xvalues[i]; + xnext = xvalues[i + 1]; + y = yvalues[i]; + xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)); + xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth; + next = xpos + ((xposnext - xpos) / 2); + regionMap[i] = [last || 0, next, i]; + last = next; + if (y === null) { + if (i) { + if (yvalues[i - 1] !== null) { + path = []; + paths.push(path); + } + vertices.push(null); + } + } else { + if (y < this.miny) { + y = this.miny; + } + if (y > this.maxy) { + y = this.maxy; + } + if (!path.length) { + // previous value was null + path.push([xpos, canvasTop + canvasHeight]); + } + vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))]; + path.push(vertex); + vertices.push(vertex); + } + } + + lineShapes = []; + fillShapes = []; + plen = paths.length; + for (i = 0; i < plen; i++) { + path = paths[i]; + if (path.length) { + if (options.get('fillColor')) { + path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]); + fillShapes.push(path.slice(0)); + path.pop(); + } + // if there's only a single point in this path, then we want to display it + // as a vertical line which means we keep path[0] as is + if (path.length > 2) { + // else we want the first value + path[0] = [path[0][0], path[1][1]]; + } + lineShapes.push(path); + } + } + + // draw the fill first, then optionally the normal range, then the line on top of that + plen = fillShapes.length; + for (i = 0; i < plen; i++) { + target.drawShape(fillShapes[i], + options.get('fillColor'), options.get('fillColor')).append(); + } + + + + plen = lineShapes.length; + for (i = 0; i < plen; i++) { + target.drawShape(lineShapes[i], options.get('lineColor'), undefined, + options.get('lineWidth')).append(); + } + + if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) { + this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey); + } + + if (spotRadius && options.get('valueSpots')) { + valueSpots = options.get('valueSpots'); + if (valueSpots.get === undefined) { + valueSpots = new RangeMap(valueSpots); + } + for (i = 0; i < yvalcount; i++) { + color = valueSpots.get(yvalues[i]); + if (color) { + target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)), + canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))), + spotRadius, undefined, + color).append(); + } + } + + } + if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) { + target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)), + canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))), + spotRadius, undefined, + options.get('spotColor')).append(); + } + if (this.maxy !== this.minyorg) { + if (spotRadius && options.get('minSpotColor')) { + x = xvalues[$.inArray(this.minyorg, yvalues)]; + target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)), + canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))), + spotRadius, undefined, + options.get('minSpotColor')).append(); + } + if (spotRadius && options.get('maxSpotColor')) { + x = xvalues[$.inArray(this.maxyorg, yvalues)]; + target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)), + canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))), + spotRadius, undefined, + options.get('maxSpotColor')).append(); + } + } + + // this.lastShapeId = target.getLastShapeId(); + // this.canvasTop = canvasTop; + // target.render(); + + } + }, + bar:{ + type: 'bar', + + init: function (el, values) { + let options = this.options; + let width = el.mergedOptions.height; + let height = el.mergedOptions.width; + + this.canvasWidth = el.mergedOptions.height; + this.canvasHeight = el.mergedOptions.width; + + let barWidth = parseInt(options.get('barWidth'), 10), + barSpacing = parseInt(options.get('barSpacing'), 10), + chartRangeMin = options.get('chartRangeMin'), + chartRangeMax = options.get('chartRangeMax'), + chartRangeClip = options.get('chartRangeClip'), + stackMin = Infinity, + stackMax = -Infinity, + isStackString, groupMin, groupMax, stackRanges, + numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax, + stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf; + //bar._super.init.call(this, el, values, options, width, height); + + this.values = values; + + // scan values to determine whether to stack bars + for (i = 0, vlen = values.length; i < vlen; i++) { + val = values[i]; + isStackString = typeof(val) === 'string' && val.indexOf(':') > -1; + if (isStackString || $.isArray(val)) { + stacked = true; + if (isStackString) { + val = values[i] = normalizeValues(val.split(':')); + } + val = remove(val, null); // min/max will treat null as zero + groupMin = Math.min.apply(Math, val); + groupMax = Math.max.apply(Math, val); + if (groupMin < stackMin) { + stackMin = groupMin; + } + if (groupMax > stackMax) { + stackMax = groupMax; + } + } + } + + this.stacked = stacked; + this.regionShapes = {}; + this.barWidth = Math.floor(width/values.length)-barSpacing; + this.barSpacing = barSpacing; + this.totalBarWidth = this.barWidth + barSpacing; + //this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); + this.width = width; + //this.initTarget(); + + if (chartRangeClip) { + clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin; + clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax; + } + + numValues = []; + stackRanges = stacked ? [] : numValues; + let stackTotals = []; + let stackRangesNeg = []; + for (i = 0, vlen = values.length; i < vlen; i++) { + if (stacked) { + vlist = values[i]; + values[i] = svals = []; + stackTotals[i] = 0; + stackRanges[i] = stackRangesNeg[i] = 0; + for (j = 0, slen = vlist.length; j < slen; j++) { + val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j]; + if (val !== null) { + if (val > 0) { + stackTotals[i] += val; + } + if (stackMin < 0 && stackMax > 0) { + if (val < 0) { + stackRangesNeg[i] += Math.abs(val); + } else { + stackRanges[i] += val; + } + } else { + stackRanges[i] += Math.abs(val); + // stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin)); + } + numValues.push(val); + } + } + } else { + val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i]; + val = values[i] = normalizeValue(val); + if (val !== null) { + numValues.push(val); + } + } + } + this.max = max = Math.max.apply(Math, numValues); + this.min = min = Math.min.apply(Math, numValues); + this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max; + this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min; + + if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) { + min = options.get('chartRangeMin'); + } + if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) { + max = options.get('chartRangeMax'); + } + + this.zeroAxis = zeroAxis = options.get('zeroAxis', true); + if (min <= 0 && max >= 0 && zeroAxis) { + xaxisOffset = 0; + } else if (zeroAxis == false) { + xaxisOffset = min; + } else if (min > 0) { + xaxisOffset = 0; + } else { + xaxisOffset = max; + } + this.xaxisOffset = xaxisOffset; + + range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - xaxisOffset; + + // as we plot zero/min values a single pixel line, we add a pixel to all other + // values - Reduce the effective canvas size to suit + this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1; + this.isNeg = false; + if (min < xaxisOffset) { + // yMaxCalc = (stacked && max >= 0) ? stackMax : max; + // yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight; + yoffset = Math.floor(this.canvasHeight/2); + this.isNeg = true; + if (yoffset !== Math.ceil(yoffset)) { + this.canvasHeightEf -= 2; + yoffset = Math.ceil(yoffset); + } + } else { + yoffset = 0; + } + this.yoffset = yoffset; + + if ($.isArray(options.get('colorMap'))) { + this.colorMapByIndex = options.get('colorMap'); + this.colorMapByValue = null; + } else { + this.colorMapByIndex = null; + this.colorMapByValue = options.get('colorMap'); + if (this.colorMapByValue && this.colorMapByValue.get === undefined) { + this.colorMapByValue = new RangeMap(this.colorMapByValue); + } + } + + this.range = range; + }, + + getRegion: function (el, x, y) { + let result = Math.floor(x / this.totalBarWidth); + return (result < 0 || result >= this.values.length) ? undefined : result; + }, + + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion, + values = ensureArray(this.values[currentRegion]), + result = [], + value, i; + for (i = values.length; i--;) { + value = values[i]; + result.push({ + isNull: value === null, + value: value, + color: this.calcColor(i, value, currentRegion), + offset: currentRegion + }); + } + return result; + }, + + calcColor: function (stacknum, value, valuenum) { + let colorMapByIndex = this.colorMapByIndex, + colorMapByValue = this.colorMapByValue, + options = this.options, + color, newColor; + if (this.stacked) { + color = options.get('stackedBarColor'); + } else { + color = (value < 0) ? options.get('negBarColor') : options.get('barColor'); + } + if (value === 0 && options.get('zeroColor') !== undefined) { + color = options.get('zeroColor'); + } + if (colorMapByValue && (newColor = colorMapByValue.get(value))) { + color = newColor; + } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { + color = colorMapByIndex[valuenum]; + } + return $.isArray(color) ? color[stacknum % color.length] : color; + }, + + /** + * Render bar(s) for a region + */ + renderRegion: function (valuenum, highlight) { + let vals = this.values[valuenum], + options = this.options, + xaxisOffset = this.xaxisOffset, + result = [], + range = this.range, + stacked = this.stacked, + target = this.target, + x = valuenum * this.totalBarWidth, + canvasHeightEf = this.canvasHeightEf, + yoffset = this.yoffset, + y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin; + + vals = $.isArray(vals) ? vals : [vals]; + valcount = vals.length; + val = vals[0]; + isNull = all(null, vals); + allMin = all(xaxisOffset, vals, true); + + if (isNull) { + if (options.get('nullColor')) { + color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options); + y = (yoffset > 0) ? yoffset - 1 : yoffset; + return target.drawRect(y, x, 0, this.barWidth - 1, color, color); + } else { + return undefined; + } + } + yoffsetNeg = yoffset; + if(this.isNeg){ + canvasHeightEf = Math.floor(canvasHeightEf/2); + } + for (i = 0; i < valcount; i++) { + val = vals[i]; + + if (stacked && val === xaxisOffset) { + if (!allMin || minPlotted) { + continue; + } + minPlotted = true; + } + + if (range > 0) { + height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))); + } else { + height = canvasHeightEf; + } + + if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) { + y = yoffsetNeg - height; + yoffsetNeg += height; + } else { + if(stacked){ + y = yoffset; + yoffset += height; + } + else{ + y = yoffset; + yoffset -= height; + } + + } + color = this.calcColor(i, val, valuenum); + if (highlight) { + color = this.calcHighlightColor(color, options); + } + result.push(target.drawRect(y, x, height - 1, this.barWidth - 1,color, color)); + } + if (result.length === 1) { + return result[0]; + } + return result; + } + }, + column:{ + type: 'column', + + init: function (el, values) { + let options = this.options; + let width = el.mergedOptions.width; + let height = el.mergedOptions.height; + + this.canvasWidth = el.mergedOptions.width; + this.canvasHeight = el.mergedOptions.height; + + let barWidth = parseInt(options.get('barWidth'), 10), + barSpacing = parseInt(options.get('barSpacing'), 10), + chartRangeMin = options.get('chartRangeMin'), + chartRangeMax = options.get('chartRangeMax'), + chartRangeClip = options.get('chartRangeClip'), + stackMin = Infinity, + stackMax = -Infinity, + isStackString, groupMin, groupMax, stackRanges, + numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax, + stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf; + //bar._super.init.call(this, el, values, options, width, height); + + this.values = values; + + // scan values to determine whether to stack bars + for (i = 0, vlen = values.length; i < vlen; i++) { + val = values[i]; + isStackString = typeof(val) === 'string' && val.indexOf(':') > -1; + if (isStackString || $.isArray(val)) { + stacked = true; + if (isStackString) { + val = values[i] = normalizeValues(val.split(':')); + } + val = remove(val, null); // min/max will treat null as zero + groupMin = Math.min.apply(Math, val); + groupMax = Math.max.apply(Math, val); + if (groupMin < stackMin) { + stackMin = groupMin; + } + if (groupMax > stackMax) { + stackMax = groupMax; + } + } + } + + this.stacked = stacked; + this.regionShapes = {}; + this.barWidth = Math.floor(width/values.length)-barSpacing; + this.barSpacing = barSpacing; + this.totalBarWidth = this.barWidth + barSpacing; + //this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); + this.width = width; + //this.initTarget(); + + if (chartRangeClip) { + clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin; + clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax; + } + + numValues = []; + stackRanges = stacked ? [] : numValues; + let stackTotals = []; + let stackRangesNeg = []; + for (i = 0, vlen = values.length; i < vlen; i++) { + if (stacked) { + vlist = values[i]; + values[i] = svals = []; + stackTotals[i] = 0; + stackRanges[i] = stackRangesNeg[i] = 0; + for (j = 0, slen = vlist.length; j < slen; j++) { + val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j]; + if (val !== null) { + if (val > 0) { + stackTotals[i] += val; + } + if (stackMin < 0 && stackMax > 0) { + if (val < 0) { + stackRangesNeg[i] += Math.abs(val); + } else { + stackRanges[i] += val; + } + } else { + stackRanges[i] += Math.abs(val); + // stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin)); + } + numValues.push(val); + } + } + } else { + val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i]; + val = values[i] = normalizeValue(val); + if (val !== null) { + numValues.push(val); + } + } + } + this.max = max = Math.max.apply(Math, numValues); + this.min = min = Math.min.apply(Math, numValues); + this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max; + this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min; + + if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) { + min = options.get('chartRangeMin'); + } + if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) { + max = options.get('chartRangeMax'); + } + + this.zeroAxis = zeroAxis = options.get('zeroAxis', true); + if (min <= 0 && max >= 0 && zeroAxis) { + xaxisOffset = 0; + } else if (zeroAxis == false) { + xaxisOffset = min; + } else if (min > 0) { + xaxisOffset = 0; + } else { + xaxisOffset = max; + } + this.xaxisOffset = xaxisOffset; + + range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - xaxisOffset; + + // as we plot zero/min values a single pixel line, we add a pixel to all other + // values - Reduce the effective canvas size to suit + this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1; + this.isNeg = false; + if (min < xaxisOffset) { + // yMaxCalc = (stacked && max >= 0) ? stackMax : max; + // yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight; + yoffset = Math.floor(this.canvasHeight/2); + this.isNeg = true; + if (yoffset !== Math.ceil(yoffset)) { + this.canvasHeightEf -= 2; + yoffset = Math.ceil(yoffset); + } + } else { + yoffset = this.canvasHeight; + } + this.yoffset = yoffset; + + if ($.isArray(options.get('colorMap'))) { + this.colorMapByIndex = options.get('colorMap'); + this.colorMapByValue = null; + } else { + this.colorMapByIndex = null; + this.colorMapByValue = options.get('colorMap'); + if (this.colorMapByValue && this.colorMapByValue.get === undefined) { + this.colorMapByValue = new RangeMap(this.colorMapByValue); + } + } + + this.range = range; + }, + + getRegion: function (el, x, y) { + let result = Math.floor(x / this.totalBarWidth); + return (result < 0 || result >= this.values.length) ? undefined : result; + }, + + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion, + values = ensureArray(this.values[currentRegion]), + result = [], + value, i; + for (i = values.length; i--;) { + value = values[i]; + result.push({ + isNull: value === null, + value: value, + color: this.calcColor(i, value, currentRegion), + offset: currentRegion + }); + } + return result; + }, + + calcColor: function (stacknum, value, valuenum) { + let colorMapByIndex = this.colorMapByIndex, + colorMapByValue = this.colorMapByValue, + options = this.options, + color, newColor; + if (this.stacked) { + color = options.get('stackedBarColor'); + } else { + color = (value < 0) ? options.get('negBarColor') : options.get('barColor'); + } + if (value === 0 && options.get('zeroColor') !== undefined) { + color = options.get('zeroColor'); + } + if (colorMapByValue && (newColor = colorMapByValue.get(value))) { + color = newColor; + } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { + color = colorMapByIndex[valuenum]; + } + return $.isArray(color) ? color[stacknum % color.length] : color; + }, + + /** + * Render bar(s) for a region + */ + renderRegion: function (valuenum, highlight) { + let vals = this.values[valuenum], + options = this.options, + xaxisOffset = this.xaxisOffset, + result = [], + range = this.range, + stacked = this.stacked, + target = this.target, + x = valuenum * this.totalBarWidth, + canvasHeightEf = this.canvasHeightEf, + yoffset = this.yoffset, + y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin; + + vals = $.isArray(vals) ? vals : [vals]; + valcount = vals.length; + val = vals[0]; + isNull = all(null, vals); + allMin = all(xaxisOffset, vals, true); + + if (isNull) { + if (options.get('nullColor')) { + color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options); + y = (yoffset > 0) ? yoffset - 1 : yoffset; + return target.drawRect(x, y, this.barWidth - 1, 0, color, color); + } else { + return undefined; + } + } + yoffsetNeg = yoffset; + if(this.isNeg){ + canvasHeightEf = Math.floor(canvasHeightEf/2); + } + for (i = 0; i < valcount; i++) { + val = vals[i]; + + if (stacked && val === xaxisOffset) { + if (!allMin || minPlotted) { + continue; + } + minPlotted = true; + } + + if (range > 0) { + height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))); + } else { + height = canvasHeightEf; + } + + if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) { + y = yoffsetNeg; + yoffsetNeg += height; + } else { + y = yoffset - height; + yoffset -= height; + } + color = this.calcColor(i, val, valuenum); + if (highlight) { + color = this.calcHighlightColor(color, options); + } + result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color)); + } + if (result.length === 1) { + return result[0]; + } + return result; + } + }, + tristate:{ + type: 'tristate', + init: function(el, values) { + let options = this.options; + let width = el.mergedOptions.width; + let height = el.mergedOptions.height; + + this.canvasWidth = el.mergedOptions.width; + this.canvasHeight = el.mergedOptions.height; + + let barWidth = parseInt(options.get('barWidth'), 10), + barSpacing = parseInt(options.get('barSpacing'), 10); + //tristate._super.init.call(this, el, values, options, width, height); + + this.regionShapes = {}; + this.barWidth = barWidth; + this.barSpacing = barSpacing; + this.totalBarWidth = barWidth + barSpacing; + this.values = $.map(values, Number); + this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); + + if ($.isArray(options.get('colorMap'))) { + this.colorMapByIndex = options.get('colorMap'); + this.colorMapByValue = null; + } else { + this.colorMapByIndex = null; + this.colorMapByValue = options.get('colorMap'); + if (this.colorMapByValue && this.colorMapByValue.get === undefined) { + this.colorMapByValue = new RangeMap(this.colorMapByValue); + } + } + //this.initTarget(); + }, + + getRegion: function (el, x, y) { + return Math.floor(x / this.totalBarWidth); + }, + + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion; + return { + isNull: this.values[currentRegion] === undefined, + value: this.values[currentRegion], + color: this.calcColor(this.values[currentRegion], currentRegion), + offset: currentRegion + }; + }, + + calcColor: function (value, valuenum) { + let values = this.values, + options = this.options, + colorMapByIndex = this.colorMapByIndex, + colorMapByValue = this.colorMapByValue, + color, newColor; + + if (colorMapByValue && (newColor = colorMapByValue.get(value))) { + color = newColor; + } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { + color = colorMapByIndex[valuenum]; + } else if (values[valuenum] < 0) { + color = options.get('negBarColor'); + } else if (values[valuenum] > 0) { + color = options.get('posBarColor'); + } else { + color = options.get('zeroBarColor'); + } + return color; + }, + + renderRegion: function (valuenum, highlight) { + let values = this.values, + options = this.options, + target = this.target, + canvasHeight, height, halfHeight, + x, y, color; + + canvasHeight = this.canvasHeight; + halfHeight = Math.round(canvasHeight / 2); + + x = valuenum * this.totalBarWidth; + if (values[valuenum] < 0) { + y = halfHeight; + height = halfHeight - 1; + } else if (values[valuenum] > 0) { + y = 0; + height = halfHeight - 1; + } else { + y = halfHeight - 1; + height = 2; + } + color = this.calcColor(values[valuenum], valuenum); + if (color === null) { + return; + } + if (highlight) { + color = this.calcHighlightColor(color, options); + } + return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color); + } + }, + discrete:{ + type: 'discrete', + + init: function(el, values) { + let options = this.options; + let width = el.mergedOptions.width; + let height = el.mergedOptions.height; + + this.canvasWidth = el.mergedOptions.width; + this.canvasHeight = el.mergedOptions.height; + + this.regionShapes = {}; + this.values = values = $.map(values, Number); + this.min = Math.min.apply(Math, values); + this.max = Math.max.apply(Math, values); + this.range = this.max - this.min; + this.width = width; + this.interval = Math.floor(width / values.length); + this.itemWidth = width / values.length; + if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) { + this.min = options.get('chartRangeMin'); + } + if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) { + this.max = options.get('chartRangeMax'); + } + //this.initTarget(); + if (this.target) { + this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight'); + } + }, + + getRegion: function (el, x, y) { + return Math.floor(x / this.itemWidth); + }, + + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion; + return { + isNull: this.values[currentRegion] === undefined, + value: this.values[currentRegion], + offset: currentRegion + }; + }, + + renderRegion: function (valuenum, highlight) { + let values = this.values, + options = this.options, + min = this.min, + max = this.max, + range = this.range, + interval = this.interval, + target = this.target, + canvasHeight = this.canvasHeight, + lineHeight = this.lineHeight, + pheight = canvasHeight - lineHeight, + ytop, val, color, x; + + val = clipval(values[valuenum], min, max); + x = valuenum * interval; + ytop = Math.round(pheight - pheight * ((val - min) / range)); + color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor'); + if (highlight) { + color = this.calcHighlightColor(color, options); + } + //return target.drawLine(x, ytop, x, ytop + lineHeight, color); + + return this.target.drawRect(x, ytop, interval<=2?1:interval-2, lineHeight, color, color); + } + }, + bullet:{ + type: 'bullet', + init: function(el, values) { + + let options = this.options; + let width = el.mergedOptions.width; + let height = el.mergedOptions.height; + + this.canvasWidth = el.mergedOptions.width; + this.canvasHeight = el.mergedOptions.height; + + let min, max, vals; + //bullet._super.init.call(this, el, values, options, width, height); + + // values: target, performance, range1, range2, range3 + this.values = values = normalizeValues(values); + // target or performance could be null + vals = values.slice(); + vals[0] = vals[0] === null ? vals[2] : vals[0]; + vals[1] = values[1] === null ? vals[2] : vals[1]; + min = Math.min.apply(Math, values); + max = Math.max.apply(Math, values); + if (options.get('base') === undefined) { + min = min < 0 ? min : 0; + } else { + min = options.get('base'); + } + this.min = min; + this.max = max; + this.range = max - min; + this.shapes = {}; + this.valueShapes = {}; + this.regiondata = {}; + this.width = width; + //this.target = this.$el.simpledraw(width, height, options.get('composite')); + if (!values.length) { + this.disabled = true; + } + //this.initTarget(); + }, + + getRegion: function (el, x, y) { + let shapeid = this.target.getShapeAt(el, x, y); + return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined; + }, + + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion; + return { + fieldkey: currentRegion.substr(0, 1), + value: this.values[currentRegion.substr(1)], + region: currentRegion + }; + }, + + changeHighlight: function (highlight) { + let currentRegion = this.currentRegion, + shapeid = this.valueShapes[currentRegion], + shape; + delete this.shapes[shapeid]; + switch (currentRegion.substr(0, 1)) { + case 'r': + shape = this.renderRange(currentRegion.substr(1), highlight); + break; + case 'p': + shape = this.renderPerformance(highlight); + break; + case 't': + shape = this.renderTarget(highlight); + break; + } + this.valueShapes[currentRegion] = shape.id; + this.shapes[shape.id] = currentRegion; + this.target.replaceWithShape(shapeid, shape); + }, + + renderRange: function (rn, highlight) { + let rangeval = this.values[rn], + rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)), + color = this.options.get('rangeColors')[rn - 2]; + if (highlight) { + color = this.calcHighlightColor(color, this.options); + } + return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color); + }, + + renderPerformance: function (highlight) { + let perfval = this.values[1], + perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)), + color = this.options.get('performanceColor'); + if (highlight) { + color = this.calcHighlightColor(color, this.options); + } + return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1, + Math.round(this.canvasHeight * 0.4) - 1, color, color); + }, + + renderTarget: function (highlight) { + let targetval = this.values[0], + x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)), + targettop = Math.round(this.canvasHeight * 0.10), + targetheight = this.canvasHeight - (targettop * 2), + color = this.options.get('targetColor'); + if (highlight) { + color = this.calcHighlightColor(color, this.options); + } + return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color); + }, + + render: function (el,userValues) { + this.init(el,userValues); + let vlen = this.values.length, + target = this.target, + i, shape; + // if (!bullet._super.render.call(this)) { + // return; + // } + for (i = 2; i < vlen; i++) { + shape = this.renderRange(i).append(); + this.shapes[shape.id] = 'r' + i; + this.valueShapes['r' + i] = shape.id; + } + if (this.values[1] !== null) { + shape = this.renderPerformance().append(); + this.shapes[shape.id] = 'p1'; + this.valueShapes.p1 = shape.id; + } + if (this.values[0] !== null) { + shape = this.renderTarget().append(); + this.shapes[shape.id] = 't0'; + this.valueShapes.t0 = shape.id; + } + //target.render(); + } + }, + pie:{ + type: 'pie', + + init: function(el, values) { + + let options = this.options; + let width = el.mergedOptions.width; + let height = el.mergedOptions.height; + + this.canvasWidth = el.mergedOptions.width; + this.canvasHeight = el.mergedOptions.height; + + let total = 0, i; + + //pie._super.init.call(this, el, values, options, width, height); + + this.shapes = {}; // map shape ids to value offsets + this.valueShapes = {}; // maps value offsets to shape ids + this.values = values = $.map(values, Number); + + if (options.get('width') === 'auto') { + this.width = this.height; + } + + if (values.length > 0) { + for (i = values.length; i--;) { + total += values[i]; + } + } + this.total = total; + //this.initTarget(); + this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2); + }, + + getRegion: function (el, x, y) { + let shapeid = this.target.getShapeAt(el, x, y); + return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined; + }, + + getCurrentRegionFields: function () { + let currentRegion = this.currentRegion; + return { + isNull: this.values[currentRegion] === undefined, + value: this.values[currentRegion], + percent: this.values[currentRegion] / this.total * 100, + color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length], + offset: currentRegion + }; + }, + + changeHighlight: function (highlight) { + let currentRegion = this.currentRegion, + newslice = this.renderSlice(currentRegion, highlight), + shapeid = this.valueShapes[currentRegion]; + delete this.shapes[shapeid]; + this.target.replaceWithShape(shapeid, newslice); + this.valueShapes[currentRegion] = newslice.id; + this.shapes[newslice.id] = currentRegion; + }, + + renderSlice: function (valuenum, highlight) { + let target = this.target, + options = this.options, + radius = this.radius, + borderWidth = options.get('borderWidth'), + offset = options.get('offset'), + circle = 2 * Math.PI, + values = this.values, + total = this.total, + next = offset ? (2*Math.PI)*(offset/360) : 0, + start, end, i, vlen, color; + + vlen = values.length; + for (i = 0; i < vlen; i++) { + start = next; + end = next; + if (total > 0) { // avoid divide by zero + end = next + (circle * (values[i] / total)); + } + if (valuenum === i) { + color = options.get('sliceColors')[i % options.get('sliceColors').length]; + if (highlight) { + color = this.calcHighlightColor(color, options); + } + + return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color); + } + next = end; + } + }, + + render: function (el,userValues) { + this.init(el,userValues); + let target = this.target, + values = this.values, + options = this.options, + radius = this.radius, + borderWidth = options.get('borderWidth'), + shape, i; + + // if (!pie._super.render.call(this)) { + // return; + // } + if (borderWidth) { + target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)), + options.get('borderColor'), undefined, borderWidth).append(); + } + for (i = values.length; i--;) { + if (values[i]) { // don't render zero values + shape = this.renderSlice(i).append(); + this.valueShapes[i] = shape.id; // store just the shapeid + this.shapes[shape.id] = i; + } + } + //target.render(); + } + }, + box:{ + type: 'box', + + init: function(el, values) { + + let options = this.options; + let width = el.mergedOptions.width; + let height = el.mergedOptions.height; + + this.canvasWidth = el.mergedOptions.width; + this.canvasHeight = el.mergedOptions.height; + + //box._super.init.call(this, el, values, options, width, height); + this.values = $.map(values, Number); + this.width = options.get('width') === 'auto' ? '4.0em' : width; + //this.initTarget(); + if (!this.values.length) { + this.disabled = 1; + } + }, + + /** + * Simulate a single region + */ + getRegion: function () { + return 1; + }, + + getCurrentRegionFields: function () { + let result = [ + { field: 'lq', value: this.quartiles[0] }, + { field: 'med', value: this.quartiles[1] }, + { field: 'uq', value: this.quartiles[2] } + ]; + if (this.loutlier !== undefined) { + result.push({ field: 'lo', value: this.loutlier}); + } + if (this.routlier !== undefined) { + result.push({ field: 'ro', value: this.routlier}); + } + if (this.lwhisker !== undefined) { + result.push({ field: 'lw', value: this.lwhisker}); + } + if (this.rwhisker !== undefined) { + result.push({ field: 'rw', value: this.rwhisker}); + } + return result; + }, + + render: function (el,userValues) { + this.init(el,userValues); + + let target = this.target, + values = this.values, + vlen = values.length, + options = this.options, + canvasWidth = this.canvasWidth, + canvasHeight = this.canvasHeight, + minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'), + maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'), + canvasLeft = 0, + lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i, + size, unitSize; + + // if (!box._super.render.call(this)) { + // return; + // } + + if (options.get('raw')) { + if (options.get('showOutliers') && values.length > 5) { + loutlier = values[0]; + lwhisker = values[1]; + q1 = values[2]; + q2 = values[3]; + q3 = values[4]; + rwhisker = values[5]; + routlier = values[6]; + } else { + lwhisker = values[0]; + q1 = values[1]; + q2 = values[2]; + q3 = values[3]; + rwhisker = values[4]; + } + } else { + values.sort(function (a, b) { return a - b; }); + q1 = quartile(values, 1); + q2 = quartile(values, 2); + q3 = quartile(values, 3); + iqr = q3 - q1; + if (options.get('showOutliers')) { + lwhisker = rwhisker = undefined; + for (i = 0; i < vlen; i++) { + if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) { + lwhisker = values[i]; + } + if (values[i] < q3 + (iqr * options.get('outlierIQR'))) { + rwhisker = values[i]; + } + } + loutlier = values[0]; + routlier = values[vlen - 1]; + } else { + lwhisker = values[0]; + rwhisker = values[vlen - 1]; + } + } + this.quartiles = [q1, q2, q3]; + this.lwhisker = lwhisker; + this.rwhisker = rwhisker; + this.loutlier = loutlier; + this.routlier = routlier; + + unitSize = canvasWidth / (maxValue - minValue + 1); + if (options.get('showOutliers')) { + canvasLeft = Math.ceil(options.get('spotRadius')); + canvasWidth -= 2 * Math.ceil(options.get('spotRadius')); + unitSize = canvasWidth / (maxValue - minValue + 1); + if (loutlier < lwhisker) { + target.drawCircle((loutlier - minValue) * unitSize + canvasLeft, + canvasHeight / 2, + options.get('spotRadius'), + options.get('outlierLineColor'), + options.get('outlierFillColor')).append(); + } + if (routlier > rwhisker) { + target.drawCircle((routlier - minValue) * unitSize + canvasLeft, + canvasHeight / 2, + options.get('spotRadius'), + options.get('outlierLineColor'), + options.get('outlierFillColor')).append(); + } + } + + // box + target.drawRect( + Math.round((q1 - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight * 0.1), + Math.round((q3 - q1) * unitSize), + Math.round(canvasHeight * 0.8), + options.get('boxLineColor'), + options.get('boxFillColor')).append(); + // left whisker + target.drawLine( + Math.round((lwhisker - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight / 2), + Math.round((q1 - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight / 2), + options.get('lineColor')).append(); + target.drawLine( + Math.round((lwhisker - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight / 4), + Math.round((lwhisker - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight - canvasHeight / 4), + options.get('whiskerColor')).append(); + // right whisker + target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight / 2), + Math.round((q3 - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight / 2), + options.get('lineColor')).append(); + target.drawLine( + Math.round((rwhisker - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight / 4), + Math.round((rwhisker - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight - canvasHeight / 4), + options.get('whiskerColor')).append(); + // median line + target.drawLine( + Math.round((q2 - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight * 0.1), + Math.round((q2 - minValue) * unitSize + canvasLeft), + Math.round(canvasHeight * 0.9), + options.get('medianColor')).append(); + if (options.get('target')) { + size = Math.ceil(options.get('spotRadius')); + target.drawLine( + Math.round((options.get('target') - minValue) * unitSize + canvasLeft), + Math.round((canvasHeight / 2) - size), + Math.round((options.get('target') - minValue) * unitSize + canvasLeft), + Math.round((canvasHeight / 2) + size), + options.get('targetColor')).append(); + target.drawLine( + Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size), + Math.round(canvasHeight / 2), + Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size), + Math.round(canvasHeight / 2), + options.get('targetColor')).append(); + } + //target.render(); + } + }, + shapeCount:0, + shapes:{}, + shapeseq:[], + lastShapeId:null, + mergedOptions:null, + init:function(userValues, userOptions){ + let extendedOptions, defaults, base; + userOptions = userOptions || {}; + let _this = this; + defaults = this.defaultOption; + base = defaults.common; + extendedOptions = defaults[userOptions.type || base.type]; + + _this.shapeCount = 0; + _this.shapes = {}; + _this.shapeseq = []; + _this.lastShapeId = null; + + _this.mergedOptions = $.extend({}, base, extendedOptions, userOptions); + _this.mergedOptions.width = devicePixelRatio * _this.mergedOptions.width; + _this.mergedOptions.height = devicePixelRatio * _this.mergedOptions.height; + _this[_this.mergedOptions.type].render(_this, userValues); + + return { shapes:_this.shapes, shapeseq:_this.shapeseq, offsetX:_this.mergedOptions.offsetX, offsetY:_this.mergedOptions.offsetY, pixelWidth:_this.mergedOptions.width, pixelHeight:_this.mergedOptions.height}; + + }, + _getContext: function (lineColor, fillColor, lineWidth) { + let context; + if(this.ctx != null){ + context = this.ctx; + } + else{ + context = $("#" + this._canvasID ).get(0).getContext('2d'); + } + + if (lineColor !== undefined) { + context.strokeStyle = lineColor; + } + context.lineWidth = lineWidth === undefined ? 1 : lineWidth; + if (fillColor !== undefined) { + context.fillStyle = fillColor; + } + return context; + }, + + reset: function () { + let context = this._getContext(); + context.clearRect(0, 0, this.pixelWidth, this.pixelHeight); + this.shapes = {}; + this.shapeseq = []; + this.currentTargetShapeId = undefined; + }, + + _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) { + let context = this._getContext(lineColor, fillColor, lineWidth), + i, plen; + context.beginPath(); + context.moveTo(path[0][0] + 0.5 + this.offsetX, path[0][1] + 0.5 + this.offsetY); + + for (i = 1, plen = path.length; i < plen; i++) { + context.lineTo(path[i][0] + 0.5 + this.offsetX, path[i][1] + 0.5 + this.offsetY); // the 0.5 offset gives us crisp pixel-width lines + } + if (lineColor !== undefined) { + context.stroke(); + } + if (fillColor !== undefined) { + context.fill(); + } + if (this.targetX !== undefined && this.targetY !== undefined && + context.isPointInPath(this.targetX + this.offsetX, this.targetY + this.offsetY)) { + this.currentTargetShapeId = shapeid; + } + }, + + _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) { + let context = this._getContext(lineColor, fillColor, lineWidth); + context.beginPath(); + x+=this.offsetX; + y+=this.offsetY; + context.arc(x, y, radius, 0, 2 * Math.PI, false); + if (this.targetX !== undefined && this.targetY !== undefined && + context.isPointInPath(this.targetX+this.offsetX, this.targetY+this.offsetY)) { + this.currentTargetShapeId = shapeid; + } + if (lineColor !== undefined) { + context.stroke(); + } + if (fillColor !== undefined) { + context.fill(); + } + }, + + _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) { + let context = this._getContext(lineColor, fillColor); + x+=this.offsetX; + y+=this.offsetY; + context.beginPath(); + context.moveTo(x, y); + context.arc(x, y, radius, startAngle, endAngle, false); + context.lineTo(x, y); + context.closePath(); + if (lineColor !== undefined) { + context.stroke(); + } + if (fillColor) { + context.fill(); + } + if (this.targetX !== undefined && this.targetY !== undefined && + context.isPointInPath(this.targetX+this.offsetX, this.targetY+this.offsetY)) { + this.currentTargetShapeId = shapeid; + } + }, + + _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) { + // x+=this.offsetX; + // y+=this.offsetY; + return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor); + }, + + appendShape: function (shape) { + this.shapes[shape.id] = shape; + this.shapeseq.push(shape.id); + this.lastShapeId = shape.id; + return shape.id; + }, + + replaceWithShape: function (shapeid, shape) { + let shapeseq = this.shapeseq, + i; + this.shapes[shape.id] = shape; + for (i = shapeseq.length; i--;) { + if (shapeseq[i] == shapeid) { + shapeseq[i] = shape.id; + } + } + delete this.shapes[shapeid]; + }, + + replaceWithShapes: function (shapeids, shapes) { + let shapeseq = this.shapeseq, + shapemap = {}, + sid, i, first; + + for (i = shapeids.length; i--;) { + shapemap[shapeids[i]] = true; + } + for (i = shapeseq.length; i--;) { + sid = shapeseq[i]; + if (shapemap[sid]) { + shapeseq.splice(i, 1); + delete this.shapes[sid]; + first = i; + } + } + for (i = shapes.length; i--;) { + shapeseq.splice(first, 0, shapes[i].id); + this.shapes[shapes[i].id] = shapes[i]; + } + + }, + + insertAfterShape: function (shapeid, shape) { + let shapeseq = this.shapeseq, + i; + for (i = shapeseq.length; i--;) { + if (shapeseq[i] === shapeid) { + shapeseq.splice(i + 1, 0, shape.id); + this.shapes[shape.id] = shape; + return; + } + } + }, + + removeShapeId: function (shapeid) { + let shapeseq = this.shapeseq, + i; + for (i = shapeseq.length; i--;) { + if (shapeseq[i] === shapeid) { + shapeseq.splice(i, 1); + break; + } + } + delete this.shapes[shapeid]; + }, + + getShapeAt: function (el, x, y) { + this.targetX = x; + this.targetY = y; + this.render(); + return this.currentTargetShapeId; + }, + _canvasID:"luckysheetTableContent", + render: function (shapeseq, shapes, offsetX, offsetY, pixelWidth, pixelHeight,canvasid,ctx) { + if(canvasid==null){ + canvasid = "luckysheetTableContent"; + } + this._canvasID = canvasid; + + if(ctx != null){ + this.ctx = ctx; + } + + let shapeCount = shapeseq.length, + context = this._getContext(), + shapeid, shape, i; + this.offsetX = offsetX; + this.offsetY = offsetY; + this.pixelWidth = pixelWidth; + this.pixelHeight = pixelHeight; + //context.clearRect(this.offsetX, this.offsetY, this.pixelWidth, this.pixelHeight); + + // qkSparkSetting.currentSparkVlaue = { + // shapeseq : shapeseq, + // shapes:shapes, + // shapeCount:shapeCount, + // el:this + // } + + for (i = 0; i < shapeCount; i++) { + shapeid = shapeseq[i]; + shape = shapes[shapeid]; + this['_draw' + shape.type].apply(this, shape.args); + } + // if (!this.interact) { + // // not interactive so no need to keep the shapes array + // this.shapes = {}; + // this.shapeseq = []; + // } + }, + drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) { + return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth); + }, + + drawShape: function (path, lineColor, fillColor, lineWidth) { + return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]); + }, + + drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) { + return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]); + }, + + drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) { + return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]); + }, + + drawRect: function (x, y, width, height, lineColor, fillColor) { + return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]); + }, + _genShape: function (shapetype, shapeargs) { + let id = this.shapeCount++; + shapeargs.unshift(id); + // return new VShape(this, id, shapetype, shapeargs); + // this.target = target; + // this.id = id; + // this.type = type; + // this.args = args; + let shape = { id:id, type:shapetype, args:shapeargs }; + this.shapes[id] = shape; + this.shapeseq.push(id); + this.lastShapeId = id; + return { + append:function(){ + return shape; + }, + get:function(){ + return id; + } + }; + } + +} + +let barHighlightMixin = { + changeHighlight: function (highlight) { + let currentRegion = this.currentRegion, + target = this.target, + shapeids = this.regionShapes[currentRegion], + newShapes; + // will be null if the region value was null + if (shapeids) { + newShapes = this.renderRegion(currentRegion, highlight); + if ($.isArray(newShapes) || $.isArray(shapeids)) { + target.replaceWithShapes(shapeids, newShapes); + this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) { + return newShape.id; + }); + } else { + target.replaceWithShape(shapeids, newShapes); + this.regionShapes[currentRegion] = newShapes.id; + } + } + }, + render: function (el,userValues) { + this.init(el, userValues); + let values = this.values, + target = this.target, + regionShapes = this.regionShapes, + shapes, ids, i, j; + + // if (!this.cls._super.render.call(this)) { + // return; + // } + for (i = values.length; i--;) { + shapes = this.renderRegion(i); + if (shapes) { + if ($.isArray(shapes)) { + ids = []; + for (j = shapes.length; j--;) { + shapes[j].append(); + ids.push(shapes[j].id); + } + regionShapes[i] = ids; + } else { + shapes.append(); + regionShapes[i] = shapes.id; // store just the shapeid + } + } else { + // null value + regionShapes[i] = null; + } + } + //target.render(); + } +}; + +let _luckysheetSparkLineOptions = { + get:function(type){ + return luckysheetSparkline.mergedOptions[type]; + } +} + +let _luckysheetSparkLineTarget = { + drawLine:function(x1, y1, x2, y2, lineColor, lineWidth){ + return luckysheetSparkline.drawLine(x1, y1, x2, y2, lineColor, lineWidth); + }, + + drawShape:function(path, lineColor, fillColor, lineWidth){ + return luckysheetSparkline.drawShape(path, lineColor, fillColor, lineWidth); + }, + + drawCircle:function(x, y, radius, lineColor, fillColor, lineWidth){ + return luckysheetSparkline.drawCircle(x, y, radius, lineColor, fillColor, lineWidth); + }, + + drawPieSlice:function(x, y, radius, startAngle, endAngle, lineColor, fillColor){ + return luckysheetSparkline.drawPieSlice(x, y, radius, startAngle, endAngle, lineColor, fillColor); + }, + + drawRect:function(x, y, width, height, lineColor, fillColor){ + return luckysheetSparkline.drawRect(x, y, width, height, lineColor, fillColor); + } +} + +for(let item in luckysheetSparkline){ + if(item in {"line":null, "bar":null, "column":null, "tristate":null, "discrete":null, "bullet":null, "pie":null, "box":null}){ + luckysheetSparkline[item].options = _luckysheetSparkLineOptions; + luckysheetSparkline[item].target = _luckysheetSparkLineTarget; + } + + if(item in {"bar":null, "column":null, "tristate":null, "discrete":null}){ + luckysheetSparkline[item].changeHighlight = barHighlightMixin.changeHighlight; + luckysheetSparkline[item].render = barHighlightMixin.render; + } +} + +export default luckysheetSparkline; diff --git a/src/controllers/splitColumn.js b/src/controllers/splitColumn.js new file mode 100644 index 000000000..7eb53b477 --- /dev/null +++ b/src/controllers/splitColumn.js @@ -0,0 +1,315 @@ +import { replaceHtml } from '../utils/util'; +import { modelHTML } from './constant'; +import { selectHightlightShow } from './select'; +import tooltip from '../global/tooltip'; +import editor from '../global/editor'; +import { setcellvalue } from '../global/setdata'; +import { getcellvalue } from '../global/getdata'; +import { jfrefreshgrid } from '../global/refresh'; +import Store from '../store'; +import locale from '../locale/locale'; + +//分列 +const luckysheetSplitColumn = { + createDialog: function(){ + let _this = this; + + const _locale = locale(); + const locale_splitText = _locale.splitText; + const locale_punctuation = _locale.punctuation; + const locale_button = _locale.button; + + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-splitColumn-dialog").remove(); + + let content = '
' + + '
'+locale_splitText.splitDelimiters+'
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
'+ locale_splitText.splitDataPreview +'
' + + '
' + + + '
' + + '
'; + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-splitColumn-dialog", + "addclass": "luckysheet-splitColumn-dialog", + "title": locale_splitText.splitTextTitle, + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-splitColumn-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-splitColumn-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + + let dataArr = _this.getDataArr(); + _this.dataPreview(dataArr); + }, + init: function(){ + let _this = this; + const _locale = locale(); + const locale_splitText = _locale.splitText; + + //数据预览 + $(document).off("change.SPCinpcheckbox").on("change.SPCcheckbox", "#luckysheet-splitColumn-dialog .box input[type='checkbox']", function(){ + let regStr = _this.getRegStr(); + let dataArr = _this.getDataArr(regStr); + _this.dataPreview(dataArr); + }); + $(document).off("keyup.SPCinptext").on("keyup.SPCinptext", "#luckysheet-splitColumn-dialog .box input[type='text']", function(){ + if($(this).siblings("input[type='checkbox']").is(":checked")){ + let regStr = _this.getRegStr(); + let dataArr = _this.getDataArr(regStr); + _this.dataPreview(dataArr); + } + }) + + //确定按钮 + $(document).off("click.SPCconfirm").on("click.SPCconfirm", "#luckysheet-splitColumn-dialog #luckysheet-splitColumn-dialog-confirm", function(){ + $("#luckysheet-modal-dialog-mask").hide(); + $("#luckysheet-splitColumn-dialog").hide(); + + let regStr = _this.getRegStr(); + let dataArr = _this.getDataArr(regStr); + + let r = Store.luckysheet_select_save[0].row[0]; + let c = Store.luckysheet_select_save[0].column[0]; + + if(dataArr[0].length == 1){ + return; + } + + let dataCover = false; + for(let i = 0; i < dataArr.length; i++){ + for(let j = 1; j < dataArr[0].length; j++){ + let cell = Store.flowdata[r + i][c + j]; + + if(cell != null && cell.v != null){ + dataCover = true; + break; + } + } + } + + if(dataCover){ + let func1 = function(){ + _this.update(r, c, dataArr); + } + + tooltip.confirm("", locale_splitText.splitConfirmToExe, func1); + } + else{ + _this.update(r, c, dataArr); + } + }); + }, + update: function(r, c, dataArr){ + let d = editor.deepCopyFlowData(Store.flowdata); + + for(let i = 0; i < dataArr.length; i++){ + for(let j = 0; j < dataArr[0].length; j++){ + let v = dataArr[i][j]; + setcellvalue(r + i, c + j, d, v); + } + } + + let st_r = Store.luckysheet_select_save[0].row[0], + st_c = Store.luckysheet_select_save[0].column[0]; + + let range = [{ "row": [st_r, st_r + dataArr.length - 1], "column": [st_c, st_c + dataArr[0].length - 1] }] + + jfrefreshgrid(d, range); + selectHightlightShow(); + }, + dataPreview: function(dataArr){ + $("#luckysheet-splitColumn-dialog #splitColumnData").empty(); + + let trHtml = ''; + + for(let i = 0; i < dataArr.length; i++){ + let tdHtml = ''; + + for(let j = 0; j < dataArr[0].length; j++){ + tdHtml += '' + dataArr[i][j] + ''; + } + + trHtml += '' + tdHtml + ''; + } + + let tableHtml = '' + trHtml + '
'; + + $("#luckysheet-splitColumn-dialog #splitColumnData").append(tableHtml); + }, + getRegStr: function(){ + let regStr = '', mark = 0; + + $("#luckysheet-splitColumn-dialog .box input[type='checkbox']:checked").each(function(i, e){ + let $id = $(e).attr("id"); + + if($id == "splitColumn_type_01"){ //Tab键 + regStr += "\\t"; + mark++; + } + else if($id == "splitColumn_type_02"){ //分号 + if(mark > 0){ + regStr += "|"; + } + + regStr += ";"; + mark++; + } + else if($id == "splitColumn_type_03"){ //逗号 + if(mark > 0){ + regStr += "|"; + } + + regStr += ","; + mark++; + } + else if($id == "splitColumn_type_04"){ //空格 + if(mark > 0){ + regStr += "|"; + } + + regStr += "\\s"; + mark++; + } + else if($id == "splitColumn_type_05"){ //其它 + let txt = $(e).siblings("input[type='text']").val().trim(); + + if(txt != ""){ + if(mark > 0){ + regStr += "|"; + } + + regStr += txt; + } + } + else if($id == "splitColumn_type_06"){ //连续分隔符号视为单个处理 + regStr = "[" + regStr + "]+"; + } + }) + + return regStr; + }, + getDataArr: function(regStr){ + let _this = this; + + let arr = []; + + let r1 = Store.luckysheet_select_save[0].row[0]; + let r2 = Store.luckysheet_select_save[0].row[1]; + let c = Store.luckysheet_select_save[0].column[0]; + + if(regStr != null && regStr != ""){ + let reg = new RegExp(regStr, "g"); + + let dataArr = []; + + for(let r = r1; r <= r2; r++){ + let rowArr = []; + + let cell = Store.flowdata[r][c]; + + let value; + if(cell != null && cell["m"] != null){ + value = cell["m"]; + } + else{ + value = getcellvalue(r, c, Store.flowdata); + } + + rowArr = value.toString().split(reg); + + dataArr.push(rowArr); + } + + let rlen = dataArr.length; + let clen = 0; + + for(let i = 0; i < rlen; i++){ + if(dataArr[i].length > clen){ + clen = dataArr[i].length; + } + } + + arr = _this.getNullData(rlen, clen); + + for(let i = 0; i < arr.length; i++){ + for(let j = 0; j < arr[0].length; j++){ + if(dataArr[i][j] != null){ + arr[i][j] = dataArr[i][j]; + } + } + } + } + else{ + for(let r = r1; r <= r2; r++){ + let rowArr = []; + + let cell = Store.flowdata[r][c]; + + let value; + if(cell != null && cell["m"] != null){ + value = cell["m"]; + } + else{ + value = getcellvalue(r, c, Store.flowdata); + } + + rowArr.push(value); + + arr.push(rowArr); + } + } + + return arr; + }, + getNullData: function(rlen, clen){ + let arr = []; + + for(let r = 0; r < rlen; r++){ + let rowArr = []; + + for(let c = 0; c < clen; c++){ + rowArr.push(""); + } + + arr.push(rowArr); + } + + return arr; + } +} + +export default luckysheetSplitColumn; \ No newline at end of file diff --git a/src/controllers/updateCell.js b/src/controllers/updateCell.js new file mode 100644 index 000000000..6e3808621 --- /dev/null +++ b/src/controllers/updateCell.js @@ -0,0 +1,115 @@ +import pivotTable from './pivotTable'; +import luckysheetFreezen from './freezen'; +import menuButton from './menuButton'; +import conditionformat from './conditionformat'; +import alternateformat from './alternateformat'; +import { chatatABC } from '../utils/util'; +import { isEditMode } from '../global/validate'; +import { getcellvalue } from '../global/getdata'; +import { valueShowEs } from '../global/format'; +import formula from '../global/formula'; +import { luckysheetRangeLast } from '../global/cursorPos'; +import cleargridelement from '../global/cleargridelement'; +import Store from '../store'; + +export default function luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, d, cover, isnotfocus) { + if(isEditMode()){//此模式下禁用单元格编辑 + return; + } + + if($("#luckysheet-dropCell-icon").is(":visible")){ + $("#luckysheet-dropCell-icon").remove(); + } + + let winH = $(window).height(), winW = $(window).width(); + let container_offset = $("#" + Store.container).offset(); + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(); + let scrollTop = $("#luckysheet-cell-main").scrollTop(); + + let left = col_pre + container_offset.left + Store.rowHeaderWidth - scrollLeft, + top = row_pre + container_offset.top + Store.infobarHeight + Store.toolbarHeight + Store.calculatebarHeight + Store.columeHeaderHeight - scrollTop; + + if (pivotTable.isPivotRange(row_index, col_index)) { + return; + } + + Store.luckysheetCellUpdate = [row_index, col_index]; + if (!isnotfocus) { + $("#luckysheet-rich-text-editor").focus().select(); + } + + $("#luckysheet-input-box").removeAttr("style").css({ + "background-color": "rgb(255, 255, 255)", + "padding": "0px 2px", + "font-size": "13px", + "max-width": winW + scrollLeft - col_pre - 20 - Store.rowHeaderWidth, + "max-height": winH + scrollTop - row_pre - 20 - 15 - Store.toolbarHeight - Store.infobarHeight - Store.calculatebarHeight - Store.sheetBarHeight - Store.statisticBarHeight, + "min-width": col - col_pre + 1 - 8, + "min-height": row - row_pre + 1 - 4, + "left": left - 2, + "top": top - 2, + "right": "auto", + "overflow-y": "auto", + "box-sizing": "initial" + }); + + if(luckysheetFreezen.freezenverticaldata != null || luckysheetFreezen.freezenhorizontaldata != null){ + $("#luckysheet-input-box").css("z-index", 10002); + } + + $("#luckysheet-input-box-index").html(chatatABC(col_index) + (row_index + 1)).hide(); + $("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").addClass("luckysheet-wa-calculate-active"); + + let value = ""; + + if (d[row_index] != null && d[row_index][col_index] != null) { + let cell = d[row_index][col_index]; + + if (!cover) { + if(cell.f!=null){ + value = getcellvalue(row_index, col_index, d, "f"); + } + else{ + value = valueShowEs(row_index, col_index, d); + } + } + + let style = menuButton.getStyleByCell(d, row_index, col_index); + style = $("#luckysheet-input-box").get(0).style.cssText + style; + + $("#luckysheet-input-box").get(0).style.cssText = style; + if($("#luckysheet-input-box").get(0).style.backgroundColor == "rgba(0, 0, 0, 0)"){ + $("#luckysheet-input-box").get(0).style.background = "rgb(255,255,255)"; + } + } + else{ + //交替颜色 + let af_compute = alternateformat.getComputeMap(); + var checksAF = alternateformat.checksAF(row_index, col_index, af_compute); + + //条件格式 + var cf_compute = conditionformat.getComputeMap(); + var checksCF = conditionformat.checksCF(row_index, col_index, cf_compute); + + if(checksCF != null && checksCF["cellColor"] != null){ + $("#luckysheet-input-box").get(0).style.background = checksCF["cellColor"]; + } + else if(checksAF != null){ + $("#luckysheet-input-box").get(0).style.background = checksAF[1]; + } + } + + if((value == null || value.toString() == "") && !cover){ + value = "
"; + } + + $("#luckysheet-rich-text-editor").html(value); + if (!isnotfocus) { + luckysheetRangeLast($("#luckysheet-rich-text-editor")[0]); + } + + formula.rangetosheet = Store.currentSheetIndex; + formula.createRangeHightlight(); + formula.rangeResizeTo = $("#luckysheet-rich-text-editor"); + cleargridelement(); +} diff --git a/src/core.js b/src/core.js new file mode 100644 index 000000000..d80a7552e --- /dev/null +++ b/src/core.js @@ -0,0 +1,141 @@ + +import defaultSetting from './config.js'; +import { common_extend } from './utils/util'; +import Store from './store'; +import server from './controllers/server'; +import luckysheetConfigsetting from './controllers/luckysheetConfigsetting'; +import sheetmanage from './controllers/sheetmanage'; +import luckysheetsizeauto from './controllers/resize'; +import luckysheetHandler from './controllers/handler'; +import {initPlugins} from './controllers/expendPlugins'; +import { + getluckysheetfile, + getluckysheet_select_save, + getconfig, +} from './methods/get'; +import { + setluckysheetfile, + setluckysheet_select_save, + setconfig, +} from './methods/set'; +import { luckysheetrefreshgrid } from './global/refresh'; + +let luckysheet = {}; + +//创建luckysheet表格 +luckysheet.create = function (setting) { + let extendsetting = common_extend(defaultSetting, setting); + + let loadurl = extendsetting.loadUrl, + menu = extendsetting.menu, + title = extendsetting.title; + + let container = extendsetting.container; + Store.container = container; + Store.luckysheetfile = extendsetting.data; + Store.defaultcolumnNum = extendsetting.column; + Store.defaultrowNum = extendsetting.row; + Store.fullscreenmode = extendsetting.fullscreenmode; + Store.lang = extendsetting.lang; //language + Store.allowEdit = extendsetting.allowEdit; + + server.gridKey = extendsetting.gridKey; + server.loadUrl = extendsetting.loadUrl; + server.updateUrl = extendsetting.updateUrl; + server.updateImageUrl = extendsetting.updateImageUrl; + server.title = extendsetting.title; + server.loadSheetUrl = extendsetting.loadSheetUrl; + server.allowUpdate = extendsetting.allowUpdate; + + luckysheetConfigsetting.autoFormatw = extendsetting.autoFormatw; + luckysheetConfigsetting.accuracy = extendsetting.accuracy; + luckysheetConfigsetting.total = extendsetting.data[0].total; + + luckysheetConfigsetting.allowCopy = extendsetting.allowCopy; + luckysheetConfigsetting.showtoolbar = extendsetting.showtoolbar; + luckysheetConfigsetting.showinfobar = extendsetting.showinfobar; + luckysheetConfigsetting.showsheetbar = extendsetting.showsheetbar; + luckysheetConfigsetting.showstatisticBar = extendsetting.showstatisticBar; + luckysheetConfigsetting.pointEdit = extendsetting.pointEdit; + luckysheetConfigsetting.pointEditUpdate = extendsetting.pointEditUpdate; + luckysheetConfigsetting.pointEditZoom = extendsetting.pointEditZoom; + + luckysheetConfigsetting.userInfo = extendsetting.userInfo; + luckysheetConfigsetting.userMenuItem = extendsetting.userMenuItem; + luckysheetConfigsetting.myFolderUrl = extendsetting.myFolderUrl; + luckysheetConfigsetting.functionButton = extendsetting.functionButton; + + luckysheetConfigsetting.showConfigWindowResize = extendsetting.showConfigWindowResize; + luckysheetConfigsetting.enableAddRow = extendsetting.enableAddRow; + luckysheetConfigsetting.enableAddCol = extendsetting.enableAddCol; + luckysheetConfigsetting.enablePage = extendsetting.enablePage; + luckysheetConfigsetting.pageInfo = extendsetting.pageInfo; + + luckysheetConfigsetting.editMode = extendsetting.editMode; + luckysheetConfigsetting.chartConfigChange = extendsetting.chartConfigChange; + luckysheetConfigsetting.beforeCreateDom = extendsetting.beforeCreateDom; + + luckysheetConfigsetting.fireMousedown = extendsetting.fireMousedown; + luckysheetConfigsetting.plugins = extendsetting.plugins; + + // Register plugins + initPlugins(extendsetting.plugins); + + let devicePixelRatio = extendsetting.devicePixelRatio; + if(devicePixelRatio == null){ + devicePixelRatio = 1; + } + Store.devicePixelRatio = Math.ceil(devicePixelRatio); + + //loading + $("#" + container).append('
渲染中...
'); + + let data = []; + if (loadurl == "") { + sheetmanage.initialjfFile(menu, title); + luckysheetsizeauto(); + luckysheetHandler(); + } + else { + $.post(loadurl, {"gridKey" : server.gridKey}, function (d) { + let data = eval("(" + d + ")"); + Store.luckysheetfile = data; + + sheetmanage.initialjfFile(menu, title); + luckysheetsizeauto(); + luckysheetHandler(); + + //需要更新数据给后台时,建立WebSocket连接 + if(server.allowUpdate){ + server.openWebSocket(); + } + }); + } +} + +//获取所有表格数据 +luckysheet.getluckysheetfile = getluckysheetfile; + +//获取当前表格 选区 +luckysheet.getluckysheet_select_save = getluckysheet_select_save; + +//设置当前表格 选区 +luckysheet.setluckysheet_select_save = setluckysheet_select_save; + +//获取当前表格 config配置 +luckysheet.getconfig = getconfig; + +//设置当前表格 config配置 +luckysheet.setconfig = setconfig; + +//二维数组数据 转化成 {r, c, v}格式 一维数组 (传入参数为二维数据data) +luckysheet.getGridData = sheetmanage.getGridData; + +//生成表格所需二维数组 (传入参数为表格数据对象file) +luckysheet.buildGridData = sheetmanage.buildGridData; + +luckysheet.luckysheetrefreshgrid = luckysheetrefreshgrid; + +export { + luckysheet +} \ No newline at end of file diff --git a/src/css/luckysheet-core.css b/src/css/luckysheet-core.css index e02d0c351..1aaebe5d5 100644 --- a/src/css/luckysheet-core.css +++ b/src/css/luckysheet-core.css @@ -2452,10 +2452,10 @@ body:not(.ewa-ipad) .luckysheet-cols-h-cell-nosel:hover, body:not(.ewa-ipad) .lu padding-left: 999999px; } -#luckysheet-copy-btn { +/* #luckysheet-copy-btn { position: absolute; visibility: hidden; -} +} */ .btn { @@ -6136,4 +6136,239 @@ fieldset[disabled] a.btn { /*图表样式新增样式: 设置界面overflow滚动*/ .luckysheet-datavisual-left .el-tabs__content{ overflow: auto; -} \ No newline at end of file +} + + +.jfgrid-modal-dialog { + -webkit-box-shadow: 0 4px 16px rgba(0,0,0,.2); + -moz-box-shadow: 0 4px 16px rgba(0,0,0,.2); + box-shadow: 0 4px 16px rgba(0,0,0,.2); + background: #fff; + background-clip: padding-box; + border: 1px solid #acacac; + border: 1px solid rgba(0,0,0,.333); + outline: 0; + position: absolute; + color: #000; + padding: 30px 42px; + z-index: 100002; +} + +.jfgrid-modal-dialog-mask { + position: absolute; + height: 100%; + width: 100%; + background: #fff; + opacity: 0.6; + display: none; + left: 0px; + top: 0px; + z-index: 1004; +} + + + +.jfgrid-modal-dialog-title { + background-color: #fff; + color: #000; + cursor: default; + font-size: 16px; + font-weight: normal; + line-height: 24px; + margin: 0 0 16px; +} + +.jfgrid-modal-dialog-title-close { + height: 11px; + opacity: 0.7; + padding: 17px; + position: absolute; + right: 0px; + top: 0px; + width: 11px; + color: #d4d4d4; + outline: 0; +} + +.jfgrid-modal-dialog-chart { + padding: 20px 10px; + webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +/* .jfgrid-modal-dialog-chart .jfgrid-modal-dialog-title{ + line-height:0px; + margin: 0px; + font-size: 12px; + } + + .jfgrid-modal-dialog-chart .jfgrid-modal-dialog-title-close,.jfgrid-modal-dialog-chart .jfgrid-modal-dialog-title-max,.jfgrid-modal-dialog-chart .jfgrid-modal-dialog-title-min,.jfgrid-modal-dialog-chart .jfgrid-modal-dialog-title-restore, .jfgrid-modal-dialog-chart .jfgrid-modal-dialog-title-update { + height: 5px; + opacity: 0.7; + padding: 12px; + } + + .jfgrid-modal-dialog-title-update { + right: 105px; + color:#FC6666; + font-size:14px; + padding-top: 9px; + } + + .jfgrid-modal-dialog-title-min { + right: 70px; + padding-top: 9px; + } + + .jfgrid-modal-dialog-title-max, .jfgrid-modal-dialog-title-restore { + right: 35px; + } + + .jfgrid-modal-dialog-title-restore{ + display: none; + }*/ + +.jfgrid-modal-dialog-resize { + position: absolute; + border: 2px solid #FC6666; + margin: 0px; + padding: 0px; + top: -2px; + left: -2px; + bottom: -2px; + right: -2px; + pointer-events: none; +} + +.jfgrid-modal-dialog-resize-item { + position: absolute; + height: 6px; + width: 6px; + background: #ffffff; + border: 2px solid #FC6666; + pointer-events: all; + border-radius: 6px; +} + +.jfgrid-modal-dialog-resize-item-lt { + left: -6px; + top: -6px; + cursor: se-resize; +} + +.jfgrid-modal-dialog-resize-item-mt { + left: 50%; + top: -6px; + margin-left: -4px; + cursor: s-resize; +} + +.jfgrid-modal-dialog-resize-item-rt { + right: -6px; + top: -6px; + cursor: ne-resize; +} + +.jfgrid-modal-dialog-resize-item-lm { + top: 50%; + left: -6px; + margin-top: -4px; + cursor: w-resize; +} + +.jfgrid-modal-dialog-resize-item-rm { + top: 50%; + right: -6px; + margin-top: -4px; + cursor: w-resize; +} + +.jfgrid-modal-dialog-resize-item-lb { + left: -6px; + bottom: -6px; + cursor: ne-resize; +} + +.jfgrid-modal-dialog-resize-item-mb { + left: 50%; + bottom: -6px; + margin-left: -4px; + cursor: s-resize; +} + +.jfgrid-modal-dialog-resize-item-rb { + right: -6px; + bottom: -6px; + cursor: se-resize; +} + + +.jfgrid-modal-dialog-controll { + position: absolute; + margin: 0px; + padding: 0px; + right: -35px; + /* width: 60px; */ + font-size: 14px; + top: 0px; +} + +.jfgrid-modal-controll-btn { + height: 13px; + /* opacity: 0.7; */ + padding: 8px; + /* position: relative; */ + /* right: 0px; */ + /* top: 0px; */ + width: 13px; + color: #d4d4d4; + outline: 0; + border: 1px solid #B6B6B6; + display: block; + background: #fff; + margin-bottom: 3px; + cursor: pointer; + transition: all 0.2s; + -moz-transition: all 0.2s; + -webkit-transition: all 0.2s; + -o-transition: all 0.2s; +} + + .jfgrid-modal-controll-btn:hover { + border: 1px solid #A1A1A1; + color: #FC6666; + } + + .jfgrid-modal-controll-btn:active { + border: 1px solid #BBBBBB; + background: #EFEFEF; + color: #FC6666; + } + +.jfgrid-modal-controll-del { + font-size: 16px; +} + +.jfgrid-modal-controll-max-close { + font-size: 22px; + width: 42px; + height: 42px; + line-height: 42px; + background: #383838; + opacity: 0.7; + -moz-border-radius: 20px; + -webkit-border-radius: 20px; + border-radius: 20px; + color: #fff; + position: absolute; + right: 0px; + top: 0px; + z-index: 100000; + text-align: center; +} + +.jfgrid-modal-controll-max-close:hover { + background: #FC6666; + cursor: pointer; +} diff --git a/src/data/chartJson.js b/src/data/chartJson.js new file mode 100644 index 000000000..9773647b9 --- /dev/null +++ b/src/data/chartJson.js @@ -0,0 +1,605 @@ +/** + * 图表的样式结构: 为chartOptions.defaultOption下的所有属性,应该是所有图表类型的并集 + * DOM的结构与此对应: DOM操作后修改此处参数,直接存储后台, 渲染图表时候经过一层引擎转换才能使用各个图表插件渲染; 后台拿到此参数,可对应绑定到DOM上 + * + * 设计细节: + * 1. 各个图表类型之间的设置项不同,有交集和并集,此处设置统一存储并集参数 + * 2. 切换图表类型时,亦应保留所具有的设置参数,为切换回上一个图表类型保留设置 + */ +import { deepCopy } from '../utils/chartUtil'; +const baseComponent = { + label: { + fontSize: 12, //字体大小 //fontSize为'custom'时,取cusFontSize的值 + color: '#333', //颜色 + fontFamily: 'sans-serif', //字体 + fontGroup: [], //字体, 加粗:选中:'bold',无:'normal'; 斜体: 选中:'italic',无:'normal';方向:选中:'vertical',无:'horizen' + cusFontSize: 12, //自定义文字大小 + }, + formatter: { + prefix: '', //前缀 + suffix: '', //后缀 + ratio: 1, //数值比例 + digit: 'auto', //小数位数 + }, +}; +const chartComponent = { + //标题设置 + title: { + show: false, //是否显示 + text: '默认标题', //标题内容 + label: deepCopy(baseComponent.label), + position: { + value: 'left-top', //custom:自定义 //left-top 为custom的时候,取offsetX, offsetY + offsetX: 40, //自定义的X位置,单位百分比 + offsetY: 50, //自定义的Y位置,单位百分比 + }, + }, + //副标题 + subtitle: { + show: false, //是否显示 + text: '', //标题内容 + label: deepCopy(baseComponent.label), + distance: { + value: 'auto', //'auto': 默认, 'far': 远 // 'normal': 一般 'close':近 custom :取cusGap作为距离 + cusGap: 40, //自定义距离 + }, + }, + // 图表设置 + config: { + color: 'transparent', //默认颜色//'#333' + fontFamily: 'Sans-serif', + grid: { + value: 'normal', //''normal':正常 'wide':宽 // 'narrow':窄 // 'slender':瘦长 'flat':扁平 + top: 5, + left: 10, + right: 20, + bottom: 10, + }, + }, + //图例设置 + legend: { + show: true, + selectMode: 'multiple', //'single':单选 //'多选':multiple //'禁用':'disable' + selected: [ + //图例显示选择 //动态数据渲染 //分:初始化图表+后台加载使用数据结构中数据 /编辑时根据系列实时变化 + { + seriesName: '衣服', // + isShow: true, + }, + { + seriesName: '食材', // + isShow: true, + }, + { + seriesName: '图书', // + isShow: true, + }, + ], + label: deepCopy(baseComponent.label), //图例文字样式 + position: { + value: 'left-top', //custom:自定义 //left-top 为custom的时候,取offsetX, offsetY + offsetX: 40, //自定义的X位置,单位百分比 + offsetY: 50, //自定义的Y位置,单位百分比 + direction: 'horizontal', //图例位置水平或者垂直 horizontal(水平)/vertical(垂直) + }, + width: { + //图例图标大小 + value: 'auto', //'auto':默认/ 'big':大/'medium':中/'small':小/'custom':自定义 + cusSize: 25, //图例自定义宽度 ,单位px + }, + height: { + //图例图标大小 + value: 'auto', //'auto':默认/ 'big':大/'medium':中/'small':小/'custom':自定义 + cusSize: 14, //图例自定义宽度 ,单位px + }, + distance: { + value: 'auto', //'auto':默认 /far':远 / 'general':一般 / 'near':近 /'custom':自定义 + cusGap: 10, //自定义距离 + }, + itemGap: 10, + }, + //提示设置 + tooltip: { + show: true, //鼠标提示显示 + label: deepCopy(baseComponent.label), //文字样式 + backgroundColor: 'rgba(50,50,50,0.7)', // 鼠标提示框背景色 + triggerOn: 'mousemove', // 'mousemove':鼠标滑过 click':单击 触发条件 + triggerType: 'item', //触发类型 //'axis':坐标轴触发 'item':数据项图形触发 + axisPointer: { + // 指示器配置 + type: 'line', // 'line':默认直线指示器 //'cross': 十字指示器配置 //'shadow': 阴影指示器配置 + style: { + // 指示器样式 + color: '#555', + width: 'normal', //宽度:'normal':正常 'bold': 粗 'bolder':加粗 + type: 'solid', //'solid': 实线 'dash': 虚线 'dot':点线 + }, + }, + format: [ + //鼠标提示后缀 + { + seriesName: '衣服', + prefix: '', //前缀 + suffix: '', //后缀 (自定义单位) + ratio: 1, //除以的数 // 1为默认, 0.1 /0.001 /... + digit: 'auto', //小数位数 'auto' :不处理 // 数值:0 , 1 ,2 ... + }, + { + seriesName: '食材', + prefix: '', //前缀 + suffix: '', //后缀 + ratio: 1, + digit: 'auto', + }, + { + seriesName: '图书', + prefix: '', //前缀 + suffix: '', //后缀 + ratio: 1, + digit: 'auto', + }, + ], + position: 'auto', // 鼠标提示位置 //'inside':中心位置 //'left'/'top'/'right'/'top' + }, + // XY轴 + axis: { + axisType: 'xAxisDown', //要显示的坐标轴类型 + xAxisUp: { + show: false, //显示X轴 + title: { + showTitle: false, //显示X轴 + text: '', //标题内容 + nameGap: 15, //标题与轴线距离 + rotate: 0, //标题倾斜角度 + label: deepCopy(baseComponent.label), + fzPosition: 'end', //标题对齐方式,end: 尾部, middle: 中间 + }, + name: '显示X轴', + inverse: false, //反向坐标轴 (echarts有) + //刻度线 + tickLine: { + show: true, //显示刻度线 + width: 1, //刻度线宽度 + color: 'auto', //刻度线颜色 + }, + //刻度 + tick: { + show: true, //显示刻度 + position: 'outside', //刻度位置,默认: outside朝外 / inside: 朝内 + length: 5, //刻度长度 + width: 1, //刻度宽度 + color: 'auto', //刻度颜色 + }, + //标签 + tickLabel: { + show: true, //显示刻度标签 + label: deepCopy(baseComponent.label), + rotate: 0, //倾斜标签角度 + prefix: '', //标签前缀 + suffix: '', //标签后缀 + optimize: 0, + distance: 0, //标签与轴线距离 + min: 'auto', //最小值 + max: 'auto', //最大值 + ratio: 1, + digit: 'auto', + }, + //网格线 + netLine: { + show: false, //显示网格线 + width: 1, //网格线宽度 + type: 'solid', //网格线类型 + color: 'auto', //网格线颜色 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + }, + //网格区域 + netArea: { + show: false, //显示网格区域 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + colorOne: 'auto', //网格第一颜色 + colorTwo: 'auto', //网格第二颜色 + }, + axisLine: { + //第二根X轴必需 + onZero: false, + }, + }, + xAxisDown: { + show: true, //显示X轴 + title: { + showTitle: false, //显示X轴 + text: '', //标题内容 + nameGap: 15, //标题与轴线距离 + rotate: 0, //标题倾斜角度 + label: deepCopy(baseComponent.label), + fzPosition: 'end', //标题对齐方式,end: 尾部, middle: 中间 + }, + name: '显示X轴', + inverse: false, //反向坐标轴 (echarts有) + //刻度线 + tickLine: { + show: true, //显示刻度线 + width: 1, //刻度线宽度 + color: 'auto', //刻度线颜色 + }, + //刻度 + tick: { + show: true, //显示刻度 + position: 'outside', //刻度位置,默认: outside朝外 / inside: 朝内 + length: 5, //刻度长度 + width: 1, //刻度宽度 + color: 'auto', //刻度颜色 + }, + //标签 + tickLabel: { + show: true, //显示刻度标签 + label: deepCopy(baseComponent.label), + rotate: 0, //倾斜标签角度 + prefix: '', //标签前缀 + suffix: '', //标签后缀 + optimize: 0, //标签间隔个数 + distance: 0, //标签与轴线距离 + min: null, //最小值 + max: null, //最大值 + ratio: 1, + digit: 'auto', + }, + //网格线 + netLine: { + show: false, //显示网格线 + width: 1, //网格线宽度 + type: 'solid', //网格线类型 + color: 'auto', //网格线颜色 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + }, + //网格区域 + netArea: { + show: false, //显示网格区域 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + colorOne: 'auto', //网格第一颜色 + colorTwo: 'auto', //网格第二颜色 + }, + }, + yAxisLeft: { + show: true, //显示X轴 + title: { + showTitle: false, //显示X轴 + text: '', //标题内容 + nameGap: 15, //标题与轴线距离 + rotate: 0, //标题倾斜角度 + label: deepCopy(baseComponent.label), + fzPosition: 'end', //标题对齐方式,end: 尾部, middle: 中间 + }, + name: '显示Y轴', + inverse: false, //反向坐标轴 (echarts有) + //刻度线 + tickLine: { + show: true, //显示刻度线 + width: 1, //刻度线宽度 + color: 'auto', //刻度线颜色 + }, + //刻度 + tick: { + show: true, //显示刻度 + position: 'outside', //刻度位置,默认: outside朝外 / inside: 朝内 + length: 5, //刻度长度 + width: 1, //刻度宽度 + color: 'auto', //刻度颜色 + }, + //标签 + tickLabel: { + show: true, //显示刻度标签 + label: deepCopy(baseComponent.label), + rotate: 0, //倾斜标签角度 + formatter: deepCopy(baseComponent.formatter), + split: 5, //分割段数 + min: null, //最小值 + max: null, //最大值 + prefix: '', //标签前缀 + suffix: '', //标签后缀 + ratio: 1, + digit: 'auto', + distance: 0, //标签与轴线距离 + }, + //网格线 + netLine: { + show: false, //显示网格线 + width: 1, //网格线宽度 + type: 'solid', //网格线类型 + color: 'auto', //网格线颜色 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + }, + //网格区域 + netArea: { + show: false, //显示网格区域 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + colorOne: 'auto', //网格第一颜色 + colorTwo: 'auto', //网格第二颜色 + }, + }, + yAxisRight: { + show: false, //显示X轴 + title: { + showTitle: false, //显示X轴 + text: '', //标题内容 + nameGap: 15, //标题与轴线距离 + rotate: 0, //标题倾斜角度 + label: deepCopy(baseComponent.label), + fzPosition: 'end', //标题对齐方式,end: 尾部, middle: 中间 + }, + name: '显示Y轴', + inverse: false, //反向坐标轴 (echarts有) + //刻度线 + tickLine: { + show: true, //显示刻度线 + width: 1, //刻度线宽度 + color: 'auto', //刻度线颜色 + }, + //刻度 + tick: { + show: true, //显示刻度 + position: 'outside', //刻度位置,默认: outside朝外 / inside: 朝内 + length: 5, //刻度长度 + width: 1, //刻度宽度 + color: 'auto', //刻度颜色 + }, + //标签 + tickLabel: { + show: true, //显示刻度标签 + label: deepCopy(baseComponent.label), + rotate: 0, //倾斜标签角度 + formatter: deepCopy(baseComponent.formatter), + split: 5, //分割段数 + min: null, //最小值 + max: null, //最大值 + prefix: '', //标签前缀 + suffix: '', //标签后缀 + ratio: 1, + digit: 'auto', + distance: 0, //标签与轴线距离 + }, + //网格线 + netLine: { + show: false, //显示网格线 + width: 1, //网格线宽度 + type: 'solid', //网格线类型 + color: 'auto', //网格线颜色 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + }, + //网格区域 + netArea: { + show: false, //显示网格区域 + interval: { + //网格分割间隔数 + value: 'auto', + cusNumber: 0, + }, + colorOne: 'auto', //网格第一颜色 + colorTwo: 'auto', //网格第二颜色 + }, + }, + }, +}; + +//此类数据抽出来作为模板数据,每次使用deepCopy一份即可 +//注: 若页面展示的是语义化的参数,则此处也只定义语义化的参数,具体数值在引擎里做转换 +//若界面选择的直接是用户期望的数值,则直接采用数值即可 +/** + * 位置信息 + * + */ +const positionOption = [ + { value: 'left-top', label: '左上' }, + { value: 'left-middle', label: '左中' }, + { value: 'left-bottom', label: '左下' }, + { value: 'right-top', label: '右上' }, + { value: 'right-middle', label: '右中' }, + { value: 'right-bottom', label: '右下' }, + { value: 'center-top', label: '中上' }, + { value: 'center-middle', label: '居中' }, + { value: 'center-bottom', label: '中下' }, + { value: 'custom', label: '自定义' }, +]; + +//距离 +const distanceOption = [ + { value: 'auto', label: '默认' }, + { value: 'far', label: '远' }, + { value: 'normal', label: '一般' }, + { value: 'close', label: '近' }, + { value: 'custom', label: '自定义' }, +]; + +// 字体大小集合 +const fontSizeOption = [ + { value: 6, label: '6px' }, + { value: 8, label: '8px' }, + { value: 10, label: '10px' }, + { value: 12, label: '12px' }, + { value: 14, label: '14px' }, + { value: 16, label: '16px' }, + { value: 18, label: '18px' }, + { value: 20, label: '20px' }, + { value: 22, label: '22px' }, + { value: 24, label: '24px' }, + { value: 30, label: '30x' }, + { value: 36, label: '36px' }, + { value: 'custom', label: '自定义' }, +]; + +// 线样式 +const lineStyleOption = [ + { value: 'solid', label: '实线' }, + { value: 'dashed', label: '虚线' }, + { value: 'dotted', label: '点线' }, +]; + +// 线宽度 +const lineWeightOption = [ + { value: 'normal', label: '正常' }, + { value: 'bold', label: '粗' }, + { value: 'bolder', label: '加粗' }, +]; + +// 普通位置集合 +const posOption = [ + { value: 'auto', label: '默认' }, + { value: 'inside', label: '中心位置' }, + { value: 'top', label: '上侧' }, + { value: 'left', label: '左侧' }, + { value: 'right', label: '右侧' }, + { value: 'bottom', label: '底侧' }, +]; + +// 数值比例集合 +const ratioOption = [ + { value: 100, label: '乘以100' }, + { value: 10, label: '乘以10' }, + { value: 1, label: '默认' }, + { value: 0.1, label: '除以10' }, + { value: 0.01, label: '除以100' }, + { value: 0.001, label: '除以1000' }, + { value: 0.0001, label: '除以一万' }, + { value: 0.00001, label: '除以10万' }, + { value: 0.000001, label: '除以一百万' }, + { value: 0.0000001, label: '除以一千万' }, + { value: 0.00000001, label: '除以一亿' }, + { value: 0.000000001, label: '除以十亿' }, +]; + +// 数值位数集合 +const digitOption = [ + { value: 'auto', label: '自动显示' }, + { value: 0, label: '整数' }, + { value: 1, label: '1位小数' }, + { value: 2, label: '2位小数' }, + { value: 3, label: '3位小数' }, + { value: 4, label: '4位小数' }, + { value: 5, label: '5位小数' }, + { value: 6, label: '6位小数' }, + { value: 7, label: '7位小数' }, + { value: 8, label: '8位小数' }, +]; + +// (图例)大小集合 +const sizeOption = [ + { value: 'auto', label: '默认' }, + { value: 'big', label: '大' }, + { value: 'medium', label: '中' }, + { value: 'small', label: '小' }, + { value: 'custom', label: '自定义' }, +]; + +// 间隔集合 +const intervalOption = [ + { value: 'auto', label: '默认' }, + { value: 0, label: '每个刻度' }, + { value: 1, label: '间隔1个' }, + { value: 2, label: '间隔2个' }, + { value: 3, label: '间隔3个' }, + { value: 'custom', label: '自定义' }, +]; + +//字体大小 +const fontSizeList = [ + { label: '默认', value: 'auto' }, + { label: '6px', value: 6 }, + { label: '8px', value: 8 }, + { label: '10px', value: 10 }, + { label: '12px', value: 12 }, + { label: '14px', value: 14 }, + { label: '16px', value: 16 }, + { label: '18px', value: 18 }, + { label: '24px', value: 24 }, + { label: '28px', value: 28 }, + { label: '36px', value: 36 }, + { label: '自定义', value: 'custom' }, +]; + +//label字体样式 1 // 'bold','italic','vertical' +const fontStyleIBV = { + bold: { + des: '加粗', + text: 'B', + }, + italic: { + des: '斜体', + text: 'I', + }, + vertical: { + des: '文字方向', + text: '垂直', + }, +}; +//label字体样式 2 // 'italic','bold' +const fontStyleIB = { + bold: { + des: '加粗', + text: 'B', + }, + italic: { + des: '斜体', + text: 'I', + }, +}; + +// model data +const chartModelData = [["地区", "衣服", "食材", "图书"], ["上海", 134, 345, 51], ["北京", 345, 421, 234], ["广州", 453, 224, 156], ["杭州", 321, 634, 213], ["南京", 654, 542, 231]]; + +// base chart option +const chartOptions = { + //图表类型设置集合 + chartAllType: 'echarts|line|default', + + //图表配置 + defaultOption: deepCopy(chartComponent), + + //图表数据 + chartData: deepCopy(chartModelData), +} //图表设置项 + +export { + chartComponent, + positionOption, + distanceOption, + fontSizeOption, + lineStyleOption, + lineWeightOption, + posOption, + ratioOption, + digitOption, + sizeOption, + fontSizeList, + intervalOption, + fontStyleIBV, + fontStyleIB, + chartOptions +}; diff --git a/src/demoData/sheetCell.js b/src/demoData/sheetCell.js new file mode 100644 index 000000000..16f7c5d11 --- /dev/null +++ b/src/demoData/sheetCell.js @@ -0,0 +1,5599 @@ +const sheetCell = { + "name": "Cell", + "color": "", + "config": { + "merge": { + "13_5": { + "r": 13, + "c": 5, + "rs": 3, + "cs": 1 + }, + "13_7": { + "r": 13, + "c": 7, + "rs": 3, + "cs": 2 + }, + "14_2": { + "r": 14, + "c": 2, + "rs": 1, + "cs": 2 + } + }, + "borderInfo": [{ + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 3, + "l": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 10, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 4, + "l": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 10, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 10, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 5, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 6, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 7, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 3, + "col_index": 8, + "l": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 1, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 2, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 3, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 4, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 5, + "l": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 6, + "l": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 1, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 7, + "l": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 1, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 1, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 5, + "col_index": 8, + "l": { + "style": 2, + "color": "rgb(255, 0, 0)" + }, + "r": { + "style": 2, + "color": "rgb(255, 0, 0)" + }, + "t": { + "style": 2, + "color": "rgb(255, 0, 0)" + }, + "b": { + "style": 2, + "color": "rgb(255, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 2, + "l": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "r": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "t": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "b": { + "style": 9, + "color": "rgb(0, 0, 255)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 3, + "l": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "r": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "t": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "b": { + "style": 9, + "color": "rgb(0, 0, 255)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 5, + "l": { + "style": 2, + "color": "rgb(154, 205, 50)" + }, + "t": { + "style": 2, + "color": "rgb(154, 205, 50)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 6, + "r": { + "style": 2, + "color": "rgb(154, 205, 50)" + }, + "t": { + "style": 2, + "color": "rgb(154, 205, 50)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 8, + "r": { + "style": 9, + "color": "rgb(0, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 9, + "l": { + "style": 9, + "color": "rgb(0, 0, 0)" + }, + "b": { + "style": 9, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 8, + "col_index": 2, + "l": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "r": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "t": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "b": { + "style": 9, + "color": "rgb(0, 0, 255)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 8, + "col_index": 3, + "l": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "r": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "t": { + "style": 9, + "color": "rgb(0, 0, 255)" + }, + "b": { + "style": 9, + "color": "rgb(0, 0, 255)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 8, + "col_index": 5, + "l": { + "style": 2, + "color": "rgb(154, 205, 50)" + }, + "b": { + "style": 2, + "color": "rgb(154, 205, 50)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 8, + "col_index": 6, + "r": { + "style": 2, + "color": "rgb(154, 205, 50)" + }, + "b": { + "style": 2, + "color": "rgb(154, 205, 50)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 8, + "col_index": 8, + "r": { + "style": 9, + "color": "rgb(0, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 8, + "col_index": 9, + "l": { + "style": 9, + "color": "rgb(0, 0, 0)" + }, + "t": { + "style": 9, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 2, + "l": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "t": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "b": { + "style": 1, + "color": "rgb(144, 238, 144)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 3, + "r": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "t": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "b": { + "style": 1, + "color": "rgb(144, 238, 144)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 5, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "t": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 6, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "t": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 7, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "t": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 11, + "col_index": 2, + "l": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "t": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "b": { + "style": 1, + "color": "rgb(144, 238, 144)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 11, + "col_index": 3, + "r": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "t": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "b": { + "style": 1, + "color": "rgb(144, 238, 144)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 11, + "col_index": 5, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 11, + "col_index": 6, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 11, + "col_index": 7, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 12, + "col_index": 2, + "l": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "t": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "b": { + "style": 1, + "color": "rgb(144, 238, 144)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 12, + "col_index": 3, + "r": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "t": { + "style": 1, + "color": "rgb(144, 238, 144)" + }, + "b": { + "style": 1, + "color": "rgb(144, 238, 144)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 12, + "col_index": 5, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "b": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 12, + "col_index": 6, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "b": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 12, + "col_index": 7, + "l": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "r": { + "style": 1, + "color": "rgb(205, 205, 0)" + }, + "b": { + "style": 1, + "color": "rgb(205, 205, 0)" + } + } + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "2", + "color": "#000", + "range": [{ + "row": [3, 3], + "column": [3, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [3, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "4", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [4, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "3", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [4, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "3", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [3, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [3, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [5, 5] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [8, 8] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [3, 8] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "4", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [7, 7] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "1", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [8, 8] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "5", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [6, 6] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "6", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [5, 5] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "3", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [4, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "3", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [4, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [3, 3], + "column": [3, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "2", + "color": "#ff0000", + "range": [{ + "row": [5, 5], + "column": [2, 9] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "9", + "color": "#ff0000", + "range": [{ + "row": [5, 5], + "column": [5, 5] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "8", + "color": "#ff0000", + "range": [{ + "row": [5, 5], + "column": [6, 6] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "13", + "color": "#ff0000", + "range": [{ + "row": [5, 5], + "column": [7, 7] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "13", + "color": "#ff0000", + "range": [{ + "row": [6, 6], + "column": [11, 11] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "10", + "color": "#ff0000", + "range": [{ + "row": [5, 5], + "column": [4, 4] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "11", + "color": "#ff0000", + "range": [{ + "row": [5, 5], + "column": [3, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "11", + "color": "#ff0000", + "range": [{ + "row": [7, 8], + "column": [2, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-all", + "style": "3", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [2, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-inside", + "style": "3", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [8, 9] + }] + }, { + "rangeType": "range", + "borderType": "border-inside", + "style": "9", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [8, 9] + }] + }, { + "rangeType": "range", + "borderType": "border-inside", + "style": "2", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [8, 9] + }] + }, { + "rangeType": "range", + "borderType": "border-inside", + "style": "9", + "color": "#0000ff", + "range": [{ + "row": [7, 8], + "column": [8, 9] + }] + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 10, + "l": { + "color": "#ff0000", + "style": "13" + }, + "r": { + "color": "#ff0000", + "style": "13" + }, + "t": { + "color": "#ff0000", + "style": "13" + }, + "b": { + "color": "#ff0000", + "style": "13" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 6, + "col_index": 11, + "l": null, + "r": null, + "t": null, + "b": null + } + }, { + "rangeType": "cell", + "value": { + "row_index": 10, + "col_index": 10, + "l": null, + "r": null, + "t": null, + "b": null + } + }, { + "rangeType": "range", + "borderType": "border-outside", + "style": "13", + "color": "#00ff00", + "range": [{ + "row": [10, 12], + "column": [2, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-horizontal", + "style": "13", + "color": "#00ff00", + "range": [{ + "row": [10, 12], + "column": [2, 3] + }] + }, { + "rangeType": "range", + "borderType": "border-vertical", + "style": "13", + "color": "#ff9900", + "range": [{ + "row": [10, 12], + "column": [5, 7] + }] + }, { + "rangeType": "range", + "borderType": "border-outside", + "style": "13", + "color": "#ff9900", + "range": [{ + "row": [10, 12], + "column": [5, 7] + }] + }, { + "rangeType": "range", + "borderType": "border-none", + "style": "1", + "color": "#ff9900", + "range": [{ + "row": [19, 19], + "column": [6, 6] + }] + }], + "rowlen": { + "0": 20, + "1": 20, + "2": 20, + "3": 20, + "4": 20, + "5": 20, + "6": 20, + "7": 20, + "8": 20, + "9": 20, + "10": 20, + "11": 20, + "12": 20, + "13": 20, + "14": 20, + "15": 20, + "16": 20, + "17": 31, + "18": 20, + "19": 20, + "20": 20, + "21": 20, + "22": 20, + "23": 20, + "24": 20, + "25": 79, + "26": 20, + "27": 20, + "28": 80 + }, + "columlen": { + "0": 97, + "2": 115, + "3": 128, + "4": 136, + "5": 122, + "6": 138, + "7": 131, + "8": 128, + "9": 140, + "10": 144 + }, + "rowhidden": { + "30": 0, + "31": 0 + } + }, + "index": "0", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": "1", + "order": "0", + "column": 18, + "row": 36, + "celldata": [{ + "r": 0, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 0, + "v": { + "v": "Background", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Background", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 2, + "v": { + "bg": "rgb(30, 144, 255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 4, + "v": { + "bg": "rgb(0, 255, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 0, + "v": { + "v": "Border", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Border", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 13, + "c": 5, + "rs": 3, + "cs": 1 + } + } + }, { + "r": 13, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 13, + "c": 7, + "rs": 3, + "cs": 2 + } + } + }, { + "r": 13, + "c": 8, + "v": { + "mc": { + "r": 13, + "c": 7 + } + } + }, { + "r": 13, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 0, + "v": { + "v": "Span", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Span", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 14, + "c": 2, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 14, + "c": 3, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 14, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 5, + "v": { + "mc": { + "r": 13, + "c": 5 + } + } + }, { + "r": 14, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 7, + "v": { + "mc": { + "r": 13, + "c": 7 + } + } + }, { + "r": 14, + "c": 8, + "v": { + "mc": { + "r": 13, + "c": 7 + } + } + }, { + "r": 14, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 5, + "v": { + "mc": { + "r": 13, + "c": 5 + } + } + }, { + "r": 15, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 7, + "v": { + "mc": { + "r": 13, + "c": 7 + } + } + }, { + "r": 15, + "c": 8, + "v": { + "mc": { + "r": 13, + "c": 7 + } + } + }, { + "r": 15, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 0, + "v": { + "v": "Font", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Font", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 2, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "11", + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 17, + "c": 3, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 13, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 17, + "c": 4, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 17, + "c": 5, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 13, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 17, + "c": 6, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgb(255, 215, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 17, + "c": 7, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(67, 110, 238)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 17, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 2, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgb(67, 110, 238)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 215, 0)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 19, + "c": 3, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 19, + "c": 4, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 1, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "Luckysheet" + } + }, { + "r": 19, + "c": 5, + "v": { + "v": "Luckysheet", + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "cl": 1, + "m": "Luckysheet" + } + }, { + "r": 19, + "c": 6, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0", + "cl": 1 + } + }, { + "r": 19, + "c": 7, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 0, + "v": { + "v": "Format", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Format", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 2, + "v": { + "ct": { + "fa": "##0.00", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "0.25", + "v": 0.25 + } + }, { + "r": 21, + "c": 3, + "v": { + "ct": { + "fa": "$#,##0.00_);($#,##0.00)", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$0.25 ", + "v": 0.25 + } + }, { + "r": 21, + "c": 4, + "v": { + "ct": { + "fa": "\"$\" 0.00", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 0.25", + "v": 0.25 + } + }, { + "r": 21, + "c": 5, + "v": { + "ct": { + "fa": "0%", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "25%", + "v": 0.25 + } + }, { + "r": 21, + "c": 6, + "v": { + "ct": { + "fa": "# ?/?", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": " 1/4", + "v": 0.25 + } + }, { + "r": 21, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 2, + "v": { + "ct": { + "fa": "0.00E+00", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2.50E-01", + "v": 0.25 + } + }, { + "r": 23, + "c": 3, + "v": { + "v": 0.25, + "ct": { + "fa": "0.00", + "t": "n" + }, + "m": "0.25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 4, + "v": { + "ct": { + "fa": "AM/PM h:mm:ss", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "v": 44032, + "m": "AM 12:00:00" + } + }, { + "r": 23, + "c": 5, + "v": { + "ct": { + "fa": "yyyy/MM/dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "v": 44032, + "m": "2020/07/20" + } + }, { + "r": 23, + "c": 6, + "v": { + "ct": { + "fa": "yyyy\"年\"M\"月\"d\"日\"", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "v": 44032, + "m": "2020年7月20日" + } + }, { + "r": 23, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 0, + "v": { + "v": "Alignment", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Alignment", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 2, + "v": { + "v": "Top Left", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Top Left", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "1" + } + }, { + "r": 25, + "c": 3, + "v": { + "v": "Top Center", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Top Center", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "1" + } + }, { + "r": 25, + "c": 4, + "v": { + "v": "Top Right", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Top Right", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "1" + } + }, { + "r": 25, + "c": 5, + "v": { + "v": "Center Left", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Center Left", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 25, + "c": 6, + "v": { + "v": "Center Center", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Center Center", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0" + } + }, { + "r": 25, + "c": 7, + "v": { + "v": "Center Right", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Center Right", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 8, + "v": { + "v": "Bottom Left", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Bottom Left", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "2" + } + }, { + "r": 25, + "c": 9, + "v": { + "v": "Bottom Center", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Bottom Center", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "2" + } + }, { + "r": 25, + "c": 10, + "v": { + "v": "Bottom Right", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Bottom Right", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "2" + } + }, { + "r": 26, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 0, + "v": { + "v": "WordWrap", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "WordWrap", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 2, + "v": { + "v": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "tb": "2" + } + }, { + "r": 28, + "c": 3, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "tb": "1" + } + }, { + "r": 28, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 30, + "c": 0, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "hidden1", + "m": "hidden1" + } + }, { + "r": 31, + "c": 0, + "v": { + "m": "hidden2", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "hidden2" + } + }], + "visibledatarow": [21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, 315, 336, 357, 389, 410, 431, 452, 473, 494, 515, 536, 616, 637, 658, 739, 759, 759, 759, 779, 799, 819, 839], + "visibledatacolumn": [98, 172, 288, 417, 554, 677, 816, 948, 1077, 1218, 1363, 1437, 1511, 1585, 1659, 1733, 1807, 1881, 1955, 2029, 2103, 2177], + "ch_width": 2322, + "rh_height": 949, + "luckysheet_select_save": [{ + "left": 0, + "width": 97, + "top": 759, + "height": -1, + "left_move": 0, + "width_move": 97, + "top_move": 759, + "height_move": -1, + "row": [30, 31], + "column": [0, 0], + "row_focus": 30, + "column_focus": 0 + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 315 +} +export default sheetCell \ No newline at end of file diff --git a/src/demoData/sheetComment.js b/src/demoData/sheetComment.js new file mode 100644 index 000000000..395c031c7 --- /dev/null +++ b/src/demoData/sheetComment.js @@ -0,0 +1,80 @@ +const sheetComment = { + "name": "Comment", + "color": "", + "config": { + "columlen": { + "2": 102 + } + }, + "index": "5", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": "0", + "order": "5", + "column": 18, + "row": 36, + "celldata": [{ + "r": 2, + "c": 2, + "v": { + "m": "HoverShown", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "HoverShown", + "bl": 1, + "ps": { + "left": null, + "top": null, + "width": null, + "height": null, + "value": "Hello world!", + "isshow": false + } + } + }, { + "r": 7, + "c": 2, + "v": { + "m": "Size", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Size", + "bl": 1, + "ps": { + "left": null, + "top": null, + "width": null, + "height": null, + "value": "Hello,world!", + "isshow": true + } + } + }], + "visibledatarow": [], + "visibledatacolumn": [], + "ch_width": 4748, + "rh_height": 1790, + "luckysheet_select_save": [{ + "row": [0, 0], + "column": [0, 0] + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 0 +} + +export default sheetComment; \ No newline at end of file diff --git a/src/demoData/sheetConditionFormat.js b/src/demoData/sheetConditionFormat.js new file mode 100644 index 000000000..c7a2978ef --- /dev/null +++ b/src/demoData/sheetConditionFormat.js @@ -0,0 +1,6553 @@ +const sheetConditionFormat = { + "name": "Conditional Format", + "color": "", + "config": { + "merge": { + "8_10": { + "rs": 1, + "cs": 2, + "r": 8, + "c": 10 + }, + "18_2": { + "rs": 1, + "cs": 10, + "r": 18, + "c": 2 + }, + "24_2": { + "rs": 1, + "cs": 10, + "r": 24, + "c": 2 + }, + "2_10": { + "rs": 1, + "cs": 2, + "r": 2, + "c": 10 + }, + "3_10": { + "rs": 1, + "cs": 2, + "r": 3, + "c": 10 + }, + "6_10": { + "rs": 1, + "cs": 2, + "r": 6, + "c": 10 + }, + "7_10": { + "rs": 1, + "cs": 2, + "r": 7, + "c": 10 + }, + "4_10": { + "rs": 1, + "cs": 2, + "r": 4, + "c": 10 + }, + "5_10": { + "rs": 1, + "cs": 2, + "r": 5, + "c": 10 + }, + "9_10": { + "rs": 1, + "cs": 2, + "r": 9, + "c": 10 + }, + "10_10": { + "rs": 1, + "cs": 2, + "r": 10, + "c": 10 + }, + "11_10": { + "rs": 1, + "cs": 2, + "r": 11, + "c": 10 + }, + "12_10": { + "rs": 1, + "cs": 2, + "r": 12, + "c": 10 + }, + "13_10": { + "rs": 1, + "cs": 2, + "r": 13, + "c": 10 + }, + "14_10": { + "rs": 1, + "cs": 2, + "r": 14, + "c": 10 + }, + "15_10": { + "rs": 1, + "cs": 2, + "r": 15, + "c": 10 + }, + "1_10": { + "r": 1, + "c": 10, + "rs": 1, + "cs": 2 + } + }, + "rowlen": { + "0": 20, + "1": 20, + "2": 20, + "3": 20, + "4": 20, + "5": 20, + "6": 20, + "7": 20, + "8": 20, + "9": 20, + "10": 20, + "11": 20, + "12": 20, + "13": 20, + "14": 20, + "15": 20, + "16": 20, + "17": 20, + "18": 20, + "19": 20, + "20": 20, + "21": 20, + "22": 20, + "23": 20, + "24": 20, + "25": 20, + "26": 20, + "27": 20, + "28": 20, + "29": 20 + }, + "columlen": { + "0": 30, + "1": 30, + "2": 86, + "3": 85, + "4": 92, + "5": 93, + "6": 100, + "7": 100, + "8": 99, + "9": 90, + "10": 96, + "11": 96 + } + }, + "index": "2", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": "0", + "order": "2", + "column": 18, + "row": 36, + "celldata": [{ + "r": 0, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 2, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 4, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 6, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 8, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 10, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 0, + "c": 11, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 2, + "v": { + "v": "Cell Value", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Cell Value", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": 1 + } + }, { + "r": 1, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 4, + "v": { + "v": "Specific Text", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Specific Text", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 6, + "v": { + "v": "Unique", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Unique", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 8, + "v": { + "v": "Duplicate", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Duplicate", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 1, + "c": 10, + "v": { + "v": "Date Occurring", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Date Occurring", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0", + "mc": { + "r": 1, + "c": 10, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 1, + "c": 11, + "v": { + "mc": { + "r": 1, + "c": 10 + } + } + }, { + "r": 2, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 2, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 2, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 4, + "v": { + "v": "test", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "test", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 2, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 6, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 2, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 8, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 2, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 10, + "v": { + "v": 44033.77921296296, + "ct": { + "fa": "yyyy-MM-dd hh:mm", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 2, + "c": 10 + }, + "m": "2020-07-21 18:42" + } + }, { + "r": 2, + "c": 11, + "v": { + "mc": { + "r": 2, + "c": 10 + }, + "ht": "0", + "vt": "0", + "fs": "10" + } + }, { + "r": 3, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 2, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 3, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 4, + "v": { + "v": "bad", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "bad", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 3, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 6, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 3, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 8, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 3, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 10, + "v": { + "v": 44034.77921296296, + "ct": { + "fa": "yyyy-MM-dd hh:mm", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 3, + "c": 10 + }, + "m": "2020-07-22 18:42" + } + }, { + "r": 3, + "c": 11, + "v": { + "mc": { + "r": 3, + "c": 10 + }, + "ht": "0", + "vt": "0", + "fs": "10" + } + }, { + "r": 4, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 2, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 4, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 4, + "v": { + "v": "good", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "good", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 4, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 6, + "v": { + "v": 11, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "11", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 4, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 8, + "v": { + "v": 11, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "11", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 4, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 10, + "v": { + "v": 44039.77921296296, + "ct": { + "fa": "yyyy-MM-dd hh:mm", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0", + "m": "2020-07-27 18:42", + "mc": { + "rs": 1, + "cs": 2, + "r": 4, + "c": 10 + } + } + }, { + "r": 4, + "c": 11, + "v": { + "mc": { + "r": 4, + "c": 10 + } + } + }, { + "r": 5, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 2, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 5, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 4, + "v": { + "v": "testing", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "testing", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 5, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 6, + "v": { + "v": 5, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "5", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 5, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 8, + "v": { + "v": 5, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "5", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 5, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 5, + "c": 10, + "v": { + "v": 44040.77921296296, + "ct": { + "fa": "yyyy-MM-dd hh:mm", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0", + "m": "2020-07-28 18:42", + "mc": { + "rs": 1, + "cs": 2, + "r": 5, + "c": 10 + } + } + }, { + "r": 5, + "c": 11, + "v": { + "mc": { + "r": 5, + "c": 10 + } + } + }, { + "r": 6, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 2, + "v": { + "v": 4, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "4", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 6, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 4, + "v": { + "v": "tested", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "tested", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 6, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 6, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 6, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 8, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 6, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 6, + "c": 10, + "v": { + "v": 44047.77921296296, + "ct": { + "fa": "yyyy-MM-dd hh:mm", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 6, + "c": 10 + }, + "m": "2020-08-04 18:42" + } + }, { + "r": 6, + "c": 11, + "v": { + "mc": { + "r": 6, + "c": 10 + }, + "ht": "0", + "vt": "0", + "fs": "10" + } + }, { + "r": 7, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 2, + "v": { + "v": 5, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "5", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 7, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 4, + "v": { + "v": "general", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "general", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 7, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 6, + "v": { + "v": 120, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "120", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 7, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 8, + "v": { + "v": 120, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "120", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 7, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 10, + "v": { + "v": 44055.77921296296, + "ct": { + "fa": "yyyy-MM-dd hh:mm", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "0", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 7, + "c": 10 + }, + "m": "2020-08-12 18:42" + } + }, { + "r": 7, + "c": 11, + "v": { + "mc": { + "r": 7, + "c": 10 + }, + "ht": "0", + "vt": "0", + "fs": "10" + } + }, { + "r": 8, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 2, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": 1 + } + }, { + "r": 8, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 4, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 6, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "ct": { + "fa": "General", + "t": "n" + } + } + }, { + "r": 8, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 8, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 10, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "rs": 1, + "cs": 2, + "r": 8, + "c": 10 + } + } + }, { + "r": 8, + "c": 11, + "v": { + "mc": { + "r": 8, + "c": 10 + } + } + }, { + "r": 9, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 2, + "v": { + "v": "Top/Bottom", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Top/Bottom", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 9, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 4, + "v": { + "v": "Average", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Average", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 9, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 6, + "v": { + "v": "2-Color Scale", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "2-Color Scale", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 9, + "c": 8, + "v": { + "v": "3-Color Scale", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "3-Color Scale", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0" + } + }, { + "r": 9, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 10, + "v": { + "v": "Data Bar", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Data Bar", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 9, + "c": 10 + } + } + }, { + "r": 9, + "c": 11, + "v": { + "mc": { + "r": 9, + "c": 10 + } + } + }, { + "r": 10, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 2, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 10, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 4, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 10, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 6, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 10, + "c": 8, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 10, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 10, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 10, + "c": 10 + } + } + }, { + "r": 10, + "c": 11, + "v": { + "mc": { + "r": 10, + "c": 10 + } + } + }, { + "r": 11, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 2, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 11, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 4, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 11, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 6, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 11, + "c": 8, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 11, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 11, + "c": 10, + "v": { + "v": 15, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "15", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 11, + "c": 10 + } + } + }, { + "r": 11, + "c": 11, + "v": { + "mc": { + "r": 11, + "c": 10 + } + } + }, { + "r": 12, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 2, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 12, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 4, + "v": { + "v": 100, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "100", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 12, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 6, + "v": { + "v": 100, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "100", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 12, + "c": 8, + "v": { + "v": 100, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "100", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 12, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 12, + "c": 10, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 12, + "c": 10 + } + } + }, { + "r": 12, + "c": 11, + "v": { + "mc": { + "r": 12, + "c": 10 + } + } + }, { + "r": 13, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 2, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 13, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 4, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 13, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 6, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 13, + "c": 8, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 13, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 13, + "c": 10, + "v": { + "v": -1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 13, + "c": 10 + } + } + }, { + "r": 13, + "c": 11, + "v": { + "mc": { + "r": 13, + "c": 10 + } + } + }, { + "r": 14, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 2, + "v": { + "v": 4, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "4", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 14, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 4, + "v": { + "v": 60, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "60", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 14, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 6, + "v": { + "v": 60, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "60", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 14, + "c": 8, + "v": { + "v": 60, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "60", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 14, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 10, + "v": { + "v": -15, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-15", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 14, + "c": 10 + } + } + }, { + "r": 14, + "c": 11, + "v": { + "mc": { + "r": 14, + "c": 10 + } + } + }, { + "r": 15, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 2, + "v": { + "v": 5, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "5", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 15, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 4, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 15, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 6, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 15, + "c": 8, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": null, + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 15, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 10, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "mc": { + "rs": 1, + "cs": 2, + "r": 15, + "c": 10 + } + } + }, { + "r": 15, + "c": 11, + "v": { + "mc": { + "r": 15, + "c": 10 + } + } + }, { + "r": 16, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 2, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 4, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0", + "ct": { + "fa": "General", + "t": "n" + } + } + }, { + "r": 16, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 6, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 8, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 10, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 11, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 2, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 4, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 5, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 6, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 7, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 8, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 10, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 11, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 2, + "v": { + "v": "Icon Set", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Icon Set", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "1", + "vt": "0", + "mc": { + "rs": 1, + "cs": 10, + "r": 18, + "c": 2 + } + } + }, { + "r": 18, + "c": 3, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 4, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 5, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 6, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 7, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 8, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 9, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 10, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 18, + "c": 11, + "v": { + "mc": { + "r": 18, + "c": 2 + }, + "ht": "1", + "vt": "0", + "fs": "10" + } + }, { + "r": 19, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 2, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 3, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 4, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 5, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 6, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 7, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 8, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 9, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 10, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 19, + "c": 11, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 2, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 3, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 4, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 5, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 6, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 7, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 8, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 9, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 10, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 20, + "c": 11, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 2, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 3, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 4, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 5, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 6, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 7, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 8, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 9, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 10, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 21, + "c": 11, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 2, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 3, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 4, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 5, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 6, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 7, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 8, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 9, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 10, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 22, + "c": 11, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 2, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 3, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 4, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 5, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 6, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 7, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 8, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 9, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 10, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 23, + "c": 11, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 24, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 2, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "rs": 1, + "cs": 10, + "r": 24, + "c": 2 + } + } + }, { + "r": 24, + "c": 3, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 4, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 5, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 6, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 7, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 8, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 9, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 10, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 24, + "c": 11, + "v": { + "mc": { + "r": 24, + "c": 2 + }, + "fs": "10" + } + }, { + "r": 25, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 2, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 3, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 4, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 5, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 6, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 7, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 8, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 9, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 10, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 25, + "c": 11, + "v": { + "v": -50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 26, + "c": 2, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 3, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 4, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 5, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 6, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 7, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 8, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 9, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 10, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 26, + "c": 11, + "v": { + "v": -25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 2, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 3, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 4, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 5, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 6, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 7, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 8, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 9, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 10, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 27, + "c": 11, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 28, + "c": 2, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 3, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 4, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 5, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 6, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 7, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 8, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 9, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 10, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 28, + "c": 11, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 29, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 29, + "c": 2, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 3, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 4, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 5, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 6, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 7, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 8, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 9, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 10, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }, { + "r": 29, + "c": 11, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(51, 51, 51)", + "ht": "2", + "vt": "0" + } + }], + "visibledatarow": [], + "visibledatacolumn": [], + "ch_width": 4748, + "rh_height": 1790, + "luckysheet_select_save": [{ + "row": [0, 0], + "column": [0, 0] + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 0, + "luckysheet_conditionformat_save": [{ + "type": "default", + "cellrange": [{ + "row": [2, 7], + "column": [2, 2] + }], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "betweenness", + "conditionRange": [{ + "row": [4, 4], + "column": [2, 2] + }, { + "row": [6, 6], + "column": [2, 2] + }], + "conditionValue": [2, 4] + }, { + "type": "default", + "cellrange": [{ + "row": [2, 7], + "column": [4, 4] + }], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "textContains", + "conditionRange": [{ + "row": [2, 2], + "column": [4, 4] + }], + "conditionValue": ["test"] + }, { + "type": "default", + "cellrange": [{ + "row": [2, 7], + "column": [6, 6] + }], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "duplicateValue", + "conditionRange": [], + "conditionValue": ["1"] + }, { + "type": "default", + "cellrange": [{ + "row": [2, 7], + "column": [8, 8] + }], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "duplicateValue", + "conditionRange": [], + "conditionValue": ["0"] + }, { + "type": "default", + "cellrange": [{ + "row": [10, 15], + "column": [2, 2] + }], + "format": { + "textColor": "#000000", + "cellColor": "#ff0000" + }, + "conditionName": "greaterThan", + "conditionRange": [{ + "row": [11, 11], + "column": [2, 2] + }], + "conditionValue": [1] + }, { + "type": "default", + "cellrange": [{ + "row": [10, 15], + "column": [4, 4] + }], + "format": { + "textColor": null, + "cellColor": "#ff0000" + }, + "conditionName": "AboveAverage", + "conditionRange": [], + "conditionValue": ["AboveAverage"] + }, { + "type": "dataBar", + "cellrange": [{ + "row": [10, 15], + "column": [10, 11] + }], + "format": ["#6aa84f", "#ffffff"] + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [2, 2] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "0" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [3, 3] + }], + "format": { + "len": "3", + "leftMin": "5", + "top": "0" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [4, 4] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "1" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [5, 5] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "9" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [6, 6] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "8" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [7, 7] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "4" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [8, 8] + }], + "format": { + "len": "3", + "leftMin": "5", + "top": "4" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [9, 9] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "5" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [10, 10] + }], + "format": { + "len": "3", + "leftMin": "0", + "top": "7" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [19, 23], + "column": [11, 11] + }], + "format": { + "len": "3", + "leftMin": "5", + "top": "7" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [2, 2] + }], + "format": { + "len": "4", + "leftMin": "0", + "top": "2" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [3, 3] + }], + "format": { + "len": "4", + "leftMin": "5", + "top": "1" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [4, 4] + }], + "format": { + "len": "4", + "leftMin": "0", + "top": "6" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [5, 5] + }], + "format": { + "len": "4", + "leftMin": "5", + "top": "9" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [6, 6] + }], + "format": { + "len": "4", + "leftMin": "0", + "top": "6" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [6, 6] + }], + "format": { + "len": "4", + "leftMin": "5", + "top": "5" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [7, 7] + }], + "format": { + "len": "5", + "leftMin": "0", + "top": "3" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [8, 8] + }], + "format": { + "len": "5", + "leftMin": "5", + "top": "2" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [9, 9] + }], + "format": { + "len": "5", + "leftMin": "5", + "top": "10" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [10, 10] + }], + "format": { + "len": "5", + "leftMin": "0", + "top": "10" + } + }, { + "type": "icons", + "cellrange": [{ + "row": [25, 29], + "column": [11, 11] + }], + "format": { + "len": "5", + "leftMin": "0", + "top": "11" + } + }, { + "type": "default", + "cellrange": [{ + "row": [2, 7], + "column": [10, 11] + }], + "format": { + "textColor": null, + "cellColor": "#ff0000" + }, + "conditionName": "occurrenceDate", + "conditionRange": [], + "conditionValue": ["2020/07/23 - 2020/07/29"] + }, { + "type": "colorGradation", + "cellrange": [{ + "left": 422, + "width": 100, + "top": 210, + "height": 20, + "left_move": 422, + "width_move": 100, + "top_move": 210, + "height_move": 125, + "row": [10, 15], + "column": [6, 6], + "row_focus": 10, + "column_focus": 6 + }], + "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)", "rgb(248, 105, 107)"] + }, { + "type": "colorGradation", + "cellrange": [{ + "left": 422, + "width": 100, + "top": 210, + "height": 20, + "left_move": 422, + "width_move": 100, + "top_move": 210, + "height_move": 125, + "row": [10, 15], + "column": [6, 6], + "row_focus": 10, + "column_focus": 6 + }], + "format": ["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] + }, { + "type": "colorGradation", + "cellrange": [{ + "left": 422, + "width": 100, + "top": 210, + "height": 20, + "left_move": 422, + "width_move": 100, + "top_move": 210, + "height_move": 125, + "row": [10, 15], + "column": [6, 6], + "row_focus": 10, + "column_focus": 6 + }], + "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)", "rgb(248, 105, 107)"] + }, { + "type": "colorGradation", + "cellrange": [{ + "left": 422, + "width": 100, + "top": 210, + "height": 20, + "left_move": 422, + "width_move": 100, + "top_move": 210, + "height_move": 125, + "row": [10, 15], + "column": [6, 6], + "row_focus": 10, + "column_focus": 6 + }], + "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)"] + }, { + "type": "colorGradation", + "cellrange": [{ + "left": 624, + "width": 99, + "top": 210, + "height": 20, + "left_move": 624, + "width_move": 99, + "top_move": 210, + "height_move": 125, + "row": [10, 15], + "column": [8, 8], + "row_focus": 10, + "column_focus": 8 + }], + "format": ["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] + }] +} + +export default sheetConditionFormat; \ No newline at end of file diff --git a/src/demoData/sheetFormula.js b/src/demoData/sheetFormula.js new file mode 100644 index 000000000..4ac8e4439 --- /dev/null +++ b/src/demoData/sheetFormula.js @@ -0,0 +1,6613 @@ +const sheetFormula = { + "name": "Formula", + "color": "", + "config": { + "merge": { + "12_2": { + "rs": 1, + "cs": 6, + "r": 12, + "c": 2 + }, + "19_2": { + "rs": 1, + "cs": 6, + "r": 19, + "c": 2 + }, + "20_6": { + "rs": 1, + "cs": 5, + "r": 20, + "c": 6 + }, + "22_6": { + "rs": 1, + "cs": 2, + "r": 22, + "c": 6 + }, + "23_6": { + "rs": 1, + "cs": 2, + "r": 23, + "c": 6 + }, + "28_2": { + "rs": 1, + "cs": 6, + "r": 28, + "c": 2 + }, + "31_6": { + "rs": 1, + "cs": 3, + "r": 31, + "c": 6 + }, + "33_6": { + "rs": 1, + "cs": 3, + "r": 33, + "c": 6 + }, + "35_6": { + "rs": 1, + "cs": 3, + "r": 35, + "c": 6 + }, + "37_6": { + "rs": 1, + "cs": 3, + "r": 37, + "c": 6 + }, + "29_6": { + "r": 29, + "c": 6, + "rs": 1, + "cs": 3 + } + }, + "rowlen": {}, + "columlen": { + "0": 111, + "2": 105, + "3": 82, + "4": 71, + "5": 84, + "6": 123, + "7": 48, + "8": 192, + "9": 56, + "10": 56 + } + }, + "index": "1", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": 1, + "order": "1", + "column": 18, + "row": 45, + "celldata": [{ + "r": 0, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 0, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 0, + "v": { + "v": "Basic Function", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Basic Function", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 2, + "v": { + "v": "Name", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Name", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 3, + "v": { + "v": "Age", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Age", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 6, + "v": { + "v": "Indirect Function", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Indirect Function", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 8, + "v": { + "v": "J2", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "J2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 9, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 1, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 2, + "v": { + "v": "Jack", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Jack", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 3, + "v": { + "v": 17, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "17", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 8, + "v": { + "v": "I", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "I", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 9, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 2, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 2, + "v": { + "v": "Lily", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Lily", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 3, + "v": { + "v": 23, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "23", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 8, + "v": { + "v": "J", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "J", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 9, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 3, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 2, + "v": { + "v": "Bob", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Bob", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 3, + "v": { + "v": 30, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "30", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 4, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 2, + "v": { + "v": "Mary", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Mary", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 3, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 8, + "v": { + "v": "=INDIRECT(\"I2\")", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "=INDIRECT(\"I2\")", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 5, + "c": 9, + "v": { + "v": "J2", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "J2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=INDIRECT(\"I2\")" + } + }, { + "r": 5, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 2, + "v": { + "v": "Average Age:", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Average Age:", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 3, + "v": { + "v": 23.75, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "23.75", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=AVERAGE(D3:D6)" + } + }, { + "r": 6, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 8, + "v": { + "v": "=INDIRECT(I2)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "=INDIRECT(I2)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 6, + "c": 9, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=INDIRECT(I2)" + } + }, { + "r": 6, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 2, + "v": { + "v": "Max Age:", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Max Age:", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 3, + "v": { + "v": 30, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "30", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=MAX(D3:D6)" + } + }, { + "r": 7, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 8, + "v": { + "v": "=INDIRECT(\"I\"&(1+2))", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "=INDIRECT(\"I\"&(1+2))", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 7, + "c": 9, + "v": { + "v": "I", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "I", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=INDIRECT(\"I\"&(1+2))" + } + }, { + "r": 7, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 2, + "v": { + "v": "Min Age:", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Min Age:", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 3, + "v": { + "v": 17, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "17", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=MIN(D3:D6)" + } + }, { + "r": 8, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 8, + "v": { + "v": "=INDIRECT(I4&J3)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "=INDIRECT(I4&J3)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 8, + "c": 9, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=INDIRECT(I4&J3)" + } + }, { + "r": 8, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 8, + "v": { + "v": "=INDIRECT(\"Formula!\"&I2)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "=INDIRECT(\"Formula!\"&I2)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 9, + "c": 9, + "v": { + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "v": 1, + "m": "1", + "f": "=INDIRECT(\"Formula!\"&I2)" + } + }, { + "r": 9, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 8, + "v": { + "v": "=INDIRECT(\"Formula!I2\")", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "=INDIRECT(\"Formula!I2\")", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 10, + "c": 9, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "m": "J2", + "v": "J2", + "f": "=INDIRECT(\"Formula!I2\")" + } + }, { + "r": 10, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 11, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 12, + "c": 0, + "v": { + "v": "Array Formula", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Array Formula", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 12, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 12, + "c": 2, + "v": { + "v": "Calculation", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Calculation", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 6, + "r": 12, + "c": 2 + } + } + }, { + "r": 12, + "c": 3, + "v": { + "mc": { + "r": 12, + "c": 2 + } + } + }, { + "r": 12, + "c": 4, + "v": { + "mc": { + "r": 12, + "c": 2 + } + } + }, { + "r": 12, + "c": 5, + "v": { + "mc": { + "r": 12, + "c": 2 + } + } + }, { + "r": 12, + "c": 6, + "v": { + "mc": { + "r": 12, + "c": 2 + } + } + }, { + "r": 12, + "c": 7, + "v": { + "mc": { + "r": 12, + "c": 2 + } + } + }, { + "r": 12, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 12, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 12, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 3, + "v": { + "v": "Match", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Match", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 4, + "v": { + "v": "Physical", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Physical", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 5, + "v": { + "v": "Chemistry", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Chemistry", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 6, + "v": { + "v": "Alex", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Alex", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 7, + "v": { + "v": "Sum", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Sum", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 13, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 2, + "v": { + "v": "Alice", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Alice", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 3, + "v": { + "v": 97, + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "m": "97" + } + }, { + "r": 14, + "c": 4, + "v": { + "v": 61, + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "m": "61" + } + }, { + "r": 14, + "c": 5, + "v": { + "v": 53, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "53", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 6, + "v": { + "v": 43, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "43", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 7, + "v": { + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "v": 207, + "m": "207", + "f": "=SUBTOTAL(9,OFFSET($D$15,ROW($D$15:$D$18)-ROW($D$15),1,3))" + } + }, { + "r": 14, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 14, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 2, + "v": { + "v": "John", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "John", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 3, + "v": { + "v": 65, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "65", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 4, + "v": { + "v": 76, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "76", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 5, + "v": { + "v": 65, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "65", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 6, + "v": { + "v": 55, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "55", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 7, + "v": { + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "v": 182, + "m": "182", + "f": "=SUBTOTAL(9,OFFSET(E15,ROW(E15:E18)-ROW(E15),1,3))" + } + }, { + "r": 15, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "ct": { + "fa": "General", + "t": "n" + } + } + }, { + "r": 15, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 15, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 2, + "v": { + "v": "Bob", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Bob", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 3, + "v": { + "v": 55, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "55", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 4, + "v": { + "v": 70, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "70", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 5, + "v": { + "v": 64, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "64", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 6, + "v": { + "v": 54, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "54", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 7, + "v": { + "v": 152, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "152", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUBTOTAL(9,OFFSET(F15,ROW(F15:F18)-ROW(F15),1,3))" + } + }, { + "r": 16, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 16, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 2, + "v": { + "v": "Jack", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Jack", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 3, + "v": { + "v": 89, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "89", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 4, + "v": { + "v": 77, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "77", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 5, + "v": { + "v": 73, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "73", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 6, + "v": { + "v": 73, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "73", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 7, + "v": { + "v": 541, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "541", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUBTOTAL(9,OFFSET(G15,ROW(G15:G18)-ROW(G15),1,3))" + } + }, { + "r": 17, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 17, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 18, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 19, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 19, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 19, + "c": 2, + "v": { + "v": "Search", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Search", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 6, + "r": 19, + "c": 2 + } + } + }, { + "r": 19, + "c": 3, + "v": { + "mc": { + "r": 19, + "c": 2 + } + } + }, { + "r": 19, + "c": 4, + "v": { + "mc": { + "r": 19, + "c": 2 + } + } + }, { + "r": 19, + "c": 5, + "v": { + "mc": { + "r": 19, + "c": 2 + } + } + }, { + "r": 19, + "c": 6, + "v": { + "mc": { + "r": 19, + "c": 2 + } + } + }, { + "r": 19, + "c": 7, + "v": { + "mc": { + "r": 19, + "c": 2 + } + } + }, { + "r": 19, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 19, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 19, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 2, + "v": { + "v": "apple", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "apple", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 3, + "v": { + "v": "apple", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "apple", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 20, + "c": 6, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 5, + "r": 20, + "c": 6 + } + } + }, { + "r": 20, + "c": 7, + "v": { + "mc": { + "r": 20, + "c": 6 + } + } + }, { + "r": 20, + "c": 8, + "v": { + "mc": { + "r": 20, + "c": 6 + } + } + }, { + "r": 20, + "c": 9, + "v": { + "mc": { + "r": 20, + "c": 6 + } + } + }, { + "r": 20, + "c": 10, + "v": { + "mc": { + "r": 20, + "c": 6 + } + } + }, { + "r": 21, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 2, + "v": { + "v": "banana", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "banana", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 3, + "v": { + "v": "pear", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "pear", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 21, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 2, + "v": { + "v": "pear", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "pear", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 3, + "v": { + "v": "potato", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "potato", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 22, + "c": 6, + "v": { + "v": "ArrayFormula Result:", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "ArrayFormula Result:", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 2, + "r": 22, + "c": 6 + } + } + }, { + "r": 22, + "c": 7, + "v": { + "mc": { + "r": 22, + "c": 6 + } + } + }, { + "r": 22, + "c": 8, + "v": { + "v": "dumpling", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "dumpling", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=INDEX(D21:D25,MATCH(\"dumpling\",D21:D25),1)" + } + }, { + "r": 22, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "ct": { + "fa": "General", + "t": "b" + } + } + }, { + "r": 22, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "ct": { + "fa": "General", + "t": "n" + } + } + }, { + "r": 23, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 23, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 23, + "c": 2, + "v": { + "v": "tomato", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "tomato", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 23, + "c": 3, + "v": { + "v": "potato", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "potato", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 23, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 23, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 23, + "c": 6, + "v": { + "v": "NomalFormula Result:", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "NomalFormula Result:", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 2, + "r": 23, + "c": 6 + } + } + }, { + "r": 23, + "c": 7, + "v": { + "mc": { + "r": 23, + "c": 6 + } + } + }, { + "r": 23, + "c": 8, + "v": { + "ct": { + "fa": "General", + "t": "b" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "m": "FALSE", + "v": false, + "f": "=ISNA(MATCH(D21:D25,C21:C27,0))" + } + }, { + "r": 23, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "ct": { + "fa": "General", + "t": "b" + } + } + }, { + "r": 23, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 2, + "v": { + "v": "potato", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "potato", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 3, + "v": { + "v": "dumpling", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "dumpling", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "ct": { + "fa": "General", + "t": "e" + } + } + }, { + "r": 24, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 24, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 2, + "v": { + "v": "cake", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "cake", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 25, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 2, + "v": { + "v": "noodel", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "noodel", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 26, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 3, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 4, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 6, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 27, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 28, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 28, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 28, + "c": 2, + "v": { + "v": "Statistics", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Statistics", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 6, + "r": 28, + "c": 2 + } + } + }, { + "r": 28, + "c": 3, + "v": { + "mc": { + "r": 28, + "c": 2 + } + } + }, { + "r": 28, + "c": 4, + "v": { + "mc": { + "r": 28, + "c": 2 + } + } + }, { + "r": 28, + "c": 5, + "v": { + "mc": { + "r": 28, + "c": 2 + } + } + }, { + "r": 28, + "c": 6, + "v": { + "mc": { + "r": 28, + "c": 2 + } + } + }, { + "r": 28, + "c": 7, + "v": { + "mc": { + "r": 28, + "c": 2 + } + } + }, { + "r": 28, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 28, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 28, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 2, + "v": { + "v": "Product", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Product", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 3, + "v": { + "v": "Salesman", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Salesman", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 4, + "v": { + "v": "Units Sold", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Units Sold", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 6, + "v": { + "v": "Summing Sales: Faxes Sold By Brown", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Summing Sales: Faxes Sold By Brown", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "r": 29, + "c": 6, + "rs": 1, + "cs": 3 + } + } + }, { + "r": 29, + "c": 7, + "v": { + "mc": { + "r": 29, + "c": 6 + } + } + }, { + "r": 29, + "c": 8, + "v": { + "mc": { + "r": 29, + "c": 6 + } + } + }, { + "r": 29, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 29, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 2, + "v": { + "v": "Fax", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Fax", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 3, + "v": { + "v": "Brown", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Brown", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 4, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 6, + "v": { + "v": 61, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "61", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUM((C31:C39=\"Fax\")*(D31:D39=\"Brown\")*(E31:E39))" + } + }, { + "r": 30, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 30, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 2, + "v": { + "v": "Phone", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Phone", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 3, + "v": { + "v": "Smith", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Smith", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 4, + "v": { + "v": 10, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "10", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 6, + "v": { + "v": "Logical AND (Faxes And Brown)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Logical AND (Faxes And Brown)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 3, + "r": 31, + "c": 6 + } + } + }, { + "r": 31, + "c": 7, + "v": { + "mc": { + "r": 31, + "c": 6 + } + } + }, { + "r": 31, + "c": 8, + "v": { + "mc": { + "r": 31, + "c": 6 + } + } + }, { + "r": 31, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 31, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 2, + "v": { + "v": "Fax", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Fax", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 3, + "v": { + "v": "Jones", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Jones", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 4, + "v": { + "v": 20, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "20", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 6, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUM((C31:C39=\"Fax\")*(D31:D39=\"Brown\"))" + } + }, { + "r": 32, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 32, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 2, + "v": { + "v": "Fax", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Fax", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 3, + "v": { + "v": "Smith", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Smith", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 4, + "v": { + "v": 30, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "30", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 6, + "v": { + "v": "Logical OR (Faxes Or Jones)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Logical OR (Faxes Or Jones)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 3, + "r": 33, + "c": 6 + } + } + }, { + "r": 33, + "c": 7, + "v": { + "mc": { + "r": 33, + "c": 6 + } + } + }, { + "r": 33, + "c": 8, + "v": { + "mc": { + "r": 33, + "c": 6 + } + } + }, { + "r": 33, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 33, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 2, + "v": { + "v": "Phone", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Phone", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 3, + "v": { + "v": "Jones", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Jones", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 4, + "v": { + "v": 40, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "40", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 6, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUM(IF((C31:C39=\"Fax\")+(D31:D39=\"Jones\"),1,0))" + } + }, { + "r": 34, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 34, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 2, + "v": { + "v": "PC", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "PC", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 3, + "v": { + "v": "Smith", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Smith", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 4, + "v": { + "v": 50, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "50", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 6, + "v": { + "v": "Logical XOR (Fax Or Jones but not both)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Logical XOR (Fax Or Jones but not both)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 3, + "r": 35, + "c": 6 + } + } + }, { + "r": 35, + "c": 7, + "v": { + "mc": { + "r": 35, + "c": 6 + } + } + }, { + "r": 35, + "c": 8, + "v": { + "mc": { + "r": 35, + "c": 6 + } + } + }, { + "r": 35, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 35, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 2, + "v": { + "v": "Fax", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Fax", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 3, + "v": { + "v": "Brown", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Brown", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 4, + "v": { + "v": 60, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "60", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 6, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUM(IF(MOD((C31:C39=\"Fax\")+(D31:D39=\"Jones\"),2),1,0))" + } + }, { + "r": 36, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 8, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 36, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 0, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 1, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 2, + "v": { + "v": "Phone", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Phone", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 3, + "v": { + "v": "Davis", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Davis", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 4, + "v": { + "v": 70, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "70", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 5, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 6, + "v": { + "v": "Logical NAND (All Sales Except Fax And Jones)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Logical NAND (All Sales Except Fax And Jones)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "mc": { + "rs": 1, + "cs": 3, + "r": 37, + "c": 6 + } + } + }, { + "r": 37, + "c": 7, + "v": { + "mc": { + "r": 37, + "c": 6 + } + } + }, { + "r": 37, + "c": 8, + "v": { + "mc": { + "r": 37, + "c": 6 + } + } + }, { + "r": 37, + "c": 9, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 37, + "c": 10, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 0, + "v": { + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 1, + "v": { + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 2, + "v": { + "v": "PC", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "PC", + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 3, + "v": { + "v": "Jones", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Jones", + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 4, + "v": { + "v": 80, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "80", + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 5, + "v": { + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 6, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0, + "f": "=SUM(IF((C31:C39=\"Fax\")+(D31:D39=\"Jones\")<>2,1,0))" + } + }, { + "r": 38, + "c": 7, + "v": { + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 8, + "v": { + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 9, + "v": { + "bg": "rgb(255, 255, 255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 10, + "fc": "rgb(0, 0, 0)", + "ht": 1, + "vt": 0 + } + }, { + "r": 38, + "c": 10, + "v": {} + }], + "calcChain": [{ + "r": 6, + "c": 3, + "index": 1, + "func": [true, 23.75, "=AVERAGE(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 7, + "c": 3, + "index": 1, + "func": [true, 30, "=MAX(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 8, + "c": 3, + "index": 1, + "func": [true, 17, "=MIN(D3:D6)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 5, + "c": 9, + "index": 1, + "func": [true, "J2", "=INDIRECT(\"I2\")"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 6, + "c": 9, + "index": 1, + "func": [true, 1, "=INDIRECT(I2)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 7, + "c": 9, + "index": 1, + "func": [true, "I", "=INDIRECT(\"I\"&(1+2))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 8, + "c": 9, + "index": 1, + "func": [true, 1, "=INDIRECT(I4&J3)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 16, + "c": 7, + "index": 1, + "func": [true, 152, "=SUBTOTAL(9,OFFSET(F15,ROW(F15:F18)-ROW(F15),1,3))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 17, + "c": 7, + "index": 1, + "func": [true, 541, "=SUBTOTAL(9,OFFSET(G15,ROW(G15:G18)-ROW(G15),1,3))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 22, + "c": 8, + "index": 1, + "func": [true, "dumpling", "=INDEX(D21:D25,MATCH(\"dumpling\",D21:D25),1)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 38, + "c": 6, + "index": 1, + "func": [true, 1, "=SUM(IF((C31:C39=\"Fax\")+(D31:D39=\"Jones\")<>2,1,0))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 30, + "c": 6, + "index": 1, + "func": [true, "#NAME?", "=SUM((C31:C39=\"Fax\")*(D31:D39=\"Brown\")*(E31:E39))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 32, + "c": 6, + "index": 1, + "func": [true, "#NAME?", "=SUM((C31:C39=\"Fax\")*(D31:D39=\"Brown\"))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 34, + "c": 6, + "index": 1, + "func": [true, 1, "=SUM(IF((C31:C39=\"Fax\")+(D31:D39=\"Jones\"),1,0))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 36, + "c": 6, + "index": 1, + "func": [true, 1, "=SUM(IF(MOD((C31:C39=\"Fax\")+(D31:D39=\"Jones\"),2),1,0))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 9, + "c": 9, + "index": 1, + "func": [true, 1, "=INDIRECT(\"Formula!\"&I2)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 10, + "c": 9, + "index": 1, + "func": [true, "J2", "=INDIRECT(\"Formula!I2\")"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 14, + "c": 7, + "index": 1, + "func": [true, 207, "=SUBTOTAL(9,OFFSET($D$15,ROW($D$15:$D$18)-ROW($D$15),1,3))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 15, + "c": 7, + "index": 1, + "func": [true, 182, "=SUBTOTAL(9,OFFSET(E15,ROW(E15:E18)-ROW(E15),1,3))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 23, + "c": 8, + "index": 1, + "func": [true, false, "=ISNA(MATCH(D21:D25,C21:C27,0))"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }], + "visibledatarow": [20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900], + "visibledatacolumn": [112, 186, 292, 375, 447, 532, 656, 705, 898, 955, 1012, 1086, 1160, 1234, 1308, 1382, 1456, 1530], + "ch_width": 1723, + "rh_height": 1010, + "luckysheet_select_save": [{ + "left": 532, + "width": 123, + "top": 780, + "height": 19, + "left_move": 532, + "width_move": 123, + "top_move": 780, + "height_move": 19, + "row": [39, 39], + "column": [6, 6], + "row_focus": 39, + "column_focus": 6 + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 0 +} + +export default sheetFormula \ No newline at end of file diff --git a/src/demoData/sheetPivotTable.js b/src/demoData/sheetPivotTable.js new file mode 100644 index 000000000..20fbf2c2a --- /dev/null +++ b/src/demoData/sheetPivotTable.js @@ -0,0 +1,202 @@ +const sheetPivotTable = { + "name": "PivotTable", + "color": "", + "config": {}, + "index": "7", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": "0", + "order": "7", + "column": 18, + "row": 36, + "celldata": [{ + "r": 0, + "c": 0, + "v": "count:score" + }, { + "r": 0, + "c": 1, + "v": "science" + }, { + "r": 0, + "c": 2, + "v": "mathematics" + }, { + "r": 0, + "c": 3, + "v": "foreign language" + }, { + "r": 0, + "c": 4, + "v": "English" + }, { + "r": 0, + "c": 5, + "v": "total" + }, { + "r": 1, + "c": 0, + "v": "Alex" + }, { + "r": 1, + "c": 1, + "v": 1 + }, { + "r": 1, + "c": 2, + "v": 1 + }, { + "r": 1, + "c": 3, + "v": 1 + }, { + "r": 1, + "c": 4, + "v": 1 + }, { + "r": 1, + "c": 5, + "v": 4 + }, { + "r": 2, + "c": 0, + "v": "Joy" + }, { + "r": 2, + "c": 1, + "v": 1 + }, { + "r": 2, + "c": 2, + "v": 1 + }, { + "r": 2, + "c": 3, + "v": 1 + }, { + "r": 2, + "c": 4, + "v": 1 + }, { + "r": 2, + "c": 5, + "v": 4 + }, { + "r": 3, + "c": 0, + "v": "Tim" + }, { + "r": 3, + "c": 1, + "v": 1 + }, { + "r": 3, + "c": 2, + "v": 1 + }, { + "r": 3, + "c": 3, + "v": 1 + }, { + "r": 3, + "c": 4, + "v": 1 + }, { + "r": 3, + "c": 5, + "v": 4 + }, { + "r": 4, + "c": 0, + "v": "total" + }, { + "r": 4, + "c": 1, + "v": 3 + }, { + "r": 4, + "c": 2, + "v": 3 + }, { + "r": 4, + "c": 3, + "v": 3 + }, { + "r": 4, + "c": 4, + "v": 3 + }, { + "r": 4, + "c": 5, + "v": 12 + }], + "visibledatarow": [], + "visibledatacolumn": [], + "ch_width": 4748, + "rh_height": 1790, + "luckysheet_select_save": [{ + "row": [0, 0], + "column": [0, 0] + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 0, + "isPivotTable": true, + "pivotTable": { + "pivot_select_save": { + "left": 0, + "width": 73, + "top": 0, + "height": 19, + "left_move": 0, + "width_move": 369, + "top_move": 0, + "height_move": 259, + "row": [0, 12], + "column": [0, 4], + "row_focus": 0, + "column_focus": 0 + }, + "pivotDataSheetIndex": 6, //The sheet index where the source data is located + "column": [{ + "index": 3, + "name": "subject", + "fullname": "subject" + }], + "row": [{ + "index": 1, + "name": "student", + "fullname": "student" + }], + "filter": [], + "values": [{ + "index": 4, + "name": "score", + "fullname": "count:score", + "sumtype": "COUNTA", + "nameindex": 0 + }], + "showType": "column", + "pivotDatas": [ + ["count:score", "science", "mathematics", "foreign language", "English", "total"], + ["Alex", 1, 1, 1, 1, 4], + ["Joy", 1, 1, 1, 1, 4], + ["Tim", 1, 1, 1, 1, 4], + ["total", 3, 3, 3, 3, 12] + ], + "drawPivotTable": false, + "pivotTableBoundary": [5, 6] + } +} + +export default sheetPivotTable; \ No newline at end of file diff --git a/src/demoData/sheetPivotTableData.js b/src/demoData/sheetPivotTableData.js new file mode 100644 index 000000000..b1fdd7fc7 --- /dev/null +++ b/src/demoData/sheetPivotTableData.js @@ -0,0 +1,754 @@ +const sheetPivotTableData = { + "name": "PivotTableData", + "color": "", + "config": { + "merge": {} + }, + "index": "6", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": "0", + "order": "6", + "hide": 0, + "column": 18, + "row": 36, + "celldata": [{ + "r": 0, + "c": 0, + "v": { + "m": "Mock test", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Mock test" + } + }, { + "r": 0, + "c": 1, + "v": { + "m": "student", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "student" + } + }, { + "r": 0, + "c": 2, + "v": { + "m": "class", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "class" + } + }, { + "r": 0, + "c": 3, + "v": { + "m": "subject", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "subject" + } + }, { + "r": 0, + "c": 4, + "v": { + "m": "score", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "score" + } + }, { + "r": 1, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 1, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Joy", + "m": "Joy" + } + }, { + "r": 1, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 1, + "c": 3, + "v": { + "m": "English", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "English" + } + }, { + "r": 1, + "c": 4, + "v": { + "v": 96, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "96" + } + }, { + "r": 2, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 2, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Joy", + "m": "Joy" + } + }, { + "r": 2, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 2, + "c": 3, + "v": { + "m": "mathematics", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "mathematics" + } + }, { + "r": 2, + "c": 4, + "v": { + "v": 110, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "110" + } + }, { + "r": 3, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 3, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Joy", + "m": "Joy" + } + }, { + "r": 3, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 3, + "c": 3, + "v": { + "m": "foreign language", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "foreign language" + } + }, { + "r": 3, + "c": 4, + "v": { + "v": 87, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "87" + } + }, { + "r": 4, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 4, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Joy", + "m": "Joy" + } + }, { + "r": 4, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 4, + "c": 3, + "v": { + "m": "science", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "science" + } + }, { + "r": 4, + "c": 4, + "v": { + "v": 266, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "266" + } + }, { + "r": 5, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 5, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Tim", + "m": "Tim" + } + }, { + "r": 5, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 5, + "c": 3, + "v": { + "m": "English", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "English" + } + }, { + "r": 5, + "c": 4, + "v": { + "v": 92, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "92" + } + }, { + "r": 6, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 6, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Tim", + "m": "Tim" + } + }, { + "r": 6, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 6, + "c": 3, + "v": { + "m": "mathematics", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "mathematics" + } + }, { + "r": 6, + "c": 4, + "v": { + "v": 100, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "100" + } + }, { + "r": 7, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 7, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Tim", + "m": "Tim" + } + }, { + "r": 7, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 7, + "c": 3, + "v": { + "m": "foreign language", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "foreign language" + } + }, { + "r": 7, + "c": 4, + "v": { + "v": 90, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "90" + } + }, { + "r": 8, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 8, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Tim", + "m": "Tim" + } + }, { + "r": 8, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 8, + "c": 3, + "v": { + "m": "science", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "science" + } + }, { + "r": 8, + "c": 4, + "v": { + "v": 255, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "255" + } + }, { + "r": 9, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 9, + "c": 1, + "v": { + "m": "Alex", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Alex" + } + }, { + "r": 9, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 9, + "c": 3, + "v": { + "m": "English", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "English" + } + }, { + "r": 9, + "c": 4, + "v": { + "v": 108, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "108" + } + }, { + "r": 10, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 10, + "c": 1, + "v": { + "m": "Alex", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Alex" + } + }, { + "r": 10, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 10, + "c": 3, + "v": { + "m": "mathematics", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "mathematics" + } + }, { + "r": 10, + "c": 4, + "v": { + "v": 117, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "117" + } + }, { + "r": 11, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 11, + "c": 1, + "v": { + "m": "Alex", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Alex" + } + }, { + "r": 11, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 11, + "c": 3, + "v": { + "m": "foreign language", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "foreign language" + } + }, { + "r": 11, + "c": 4, + "v": { + "v": 88, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "88" + } + }, { + "r": 12, + "c": 0, + "v": { + "m": "first round", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "first round" + } + }, { + "r": 12, + "c": 1, + "v": { + "m": "Alex", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Alex" + } + }, { + "r": 12, + "c": 2, + "v": { + "m": "Class one", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Class one" + } + }, { + "r": 12, + "c": 3, + "v": { + "m": "science", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "science" + } + }, { + "r": 12, + "c": 4, + "v": { + "v": 278, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "278" + } + }], + "visibledatarow": [], + "visibledatacolumn": [], + "ch_width": 4748, + "rh_height": 1790, + "luckysheet_select_save": [{ + "row": [0, 0], + "column": [0, 0] + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 0 +} + +export default sheetPivotTableData; \ No newline at end of file diff --git a/src/demoData/sheetSparkline.js b/src/demoData/sheetSparkline.js new file mode 100644 index 000000000..2123fad9c --- /dev/null +++ b/src/demoData/sheetSparkline.js @@ -0,0 +1,7079 @@ +const sheetSparkline = { + "name": "Sparkline", + "color": "", + "config": { + "merge": { + "1_2": { + "r": 1, + "c": 2, + "rs": 1, + "cs": 2 + }, + "1_4": { + "r": 1, + "c": 4, + "rs": 1, + "cs": 2 + }, + "0_0": { + "r": 0, + "c": 0, + "rs": 1, + "cs": 6 + }, + "2_2": { + "r": 2, + "c": 2, + "rs": 3, + "cs": 2 + }, + "2_4": { + "r": 2, + "c": 4, + "rs": 3, + "cs": 2 + }, + "6_0": { + "r": 6, + "c": 0, + "rs": 1, + "cs": 5 + }, + "7_2": { + "r": 7, + "c": 2, + "rs": 1, + "cs": 2 + }, + "8_2": { + "r": 8, + "c": 2, + "rs": 3, + "cs": 2 + }, + "12_0": { + "r": 12, + "c": 0, + "rs": 1, + "cs": 5 + }, + "13_2": { + "r": 13, + "c": 2, + "rs": 1, + "cs": 3 + }, + "14_2": { + "r": 14, + "c": 2, + "rs": 4, + "cs": 3 + }, + "19_0": { + "r": 19, + "c": 0, + "rs": 1, + "cs": 5 + }, + "0_9": { + "r": 0, + "c": 9, + "rs": 1, + "cs": 5 + }, + "1_12": { + "r": 1, + "c": 12, + "rs": 1, + "cs": 2 + }, + "2_12": { + "r": 2, + "c": 12, + "rs": 1, + "cs": 2 + }, + "3_12": { + "r": 3, + "c": 12, + "rs": 1, + "cs": 2 + }, + "4_12": { + "r": 4, + "c": 12, + "rs": 1, + "cs": 2 + }, + "6_6": { + "r": 6, + "c": 6, + "rs": 1, + "cs": 8 + }, + "7_6": { + "r": 7, + "c": 6, + "rs": 1, + "cs": 2 + }, + "7_11": { + "r": 7, + "c": 11, + "rs": 1, + "cs": 3 + }, + "8_6": { + "r": 8, + "c": 6, + "rs": 1, + "cs": 2 + }, + "9_6": { + "r": 9, + "c": 6, + "rs": 1, + "cs": 2 + }, + "10_6": { + "r": 10, + "c": 6, + "rs": 1, + "cs": 2 + }, + "8_11": { + "r": 8, + "c": 11, + "rs": 3, + "cs": 3 + }, + "13_6": { + "r": 13, + "c": 6, + "rs": 1, + "cs": 7 + }, + "14_7": { + "r": 14, + "c": 7, + "rs": 1, + "cs": 2 + }, + "14_9": { + "r": 14, + "c": 9, + "rs": 1, + "cs": 2 + }, + "14_11": { + "r": 14, + "c": 11, + "rs": 1, + "cs": 2 + }, + "15_6": { + "r": 15, + "c": 6, + "rs": 2, + "cs": 1 + }, + "17_7": { + "r": 17, + "c": 7, + "rs": 1, + "cs": 2 + }, + "17_9": { + "r": 17, + "c": 9, + "rs": 1, + "cs": 2 + }, + "17_11": { + "r": 17, + "c": 11, + "rs": 1, + "cs": 2 + }, + "18_7": { + "r": 18, + "c": 7, + "rs": 1, + "cs": 2 + }, + "18_9": { + "r": 18, + "c": 9, + "rs": 1, + "cs": 2 + }, + "18_11": { + "r": 18, + "c": 11, + "rs": 1, + "cs": 2 + }, + "19_7": { + "r": 19, + "c": 7, + "rs": 1, + "cs": 2 + }, + "19_9": { + "r": 19, + "c": 9, + "rs": 1, + "cs": 2 + }, + "19_11": { + "r": 19, + "c": 11, + "rs": 1, + "cs": 2 + }, + "20_7": { + "r": 20, + "c": 7, + "rs": 1, + "cs": 2 + }, + "20_9": { + "r": 20, + "c": 9, + "rs": 1, + "cs": 2 + }, + "20_11": { + "r": 20, + "c": 11, + "rs": 1, + "cs": 2 + }, + "21_7": { + "r": 21, + "c": 7, + "rs": 1, + "cs": 2 + }, + "21_9": { + "r": 21, + "c": 9, + "rs": 1, + "cs": 2 + }, + "21_11": { + "r": 21, + "c": 11, + "rs": 1, + "cs": 2 + }, + "15_7": { + "r": 15, + "c": 7, + "rs": 2, + "cs": 7 + }, + "20_0": { + "r": 20, + "c": 0, + "rs": 1, + "cs": 5 + }, + "21_3": { + "r": 21, + "c": 3, + "rs": 1, + "cs": 2 + }, + "22_3": { + "r": 22, + "c": 3, + "rs": 3, + "cs": 2 + }, + "27_2": { + "r": 27, + "c": 2, + "rs": 1, + "cs": 3 + } + }, + "rowlen": { + "0": 29, + "1": 20, + "2": 20, + "3": 20, + "4": 20, + "6": 29, + "7": 20, + "8": 20, + "9": 20, + "10": 20, + "12": 29, + "13": 29, + "14": 20, + "15": 20, + "16": 26, + "17": 20, + "18": 20, + "19": 29, + "20": 29, + "21": 20, + "22": 20, + "23": 20, + "24": 20, + "25": 20, + "27": 100, + "28": 20, + "29": 20, + "30": 20, + "31": 20, + "32": 20, + "33": 20, + "34": 26, + "35": 20, + "36": 20, + "37": 20, + "38": 20, + "39": 20, + "40": 20, + "41": 20, + "42": 20, + "43": 20, + "44": 20, + "45": 20, + "46": 20, + "47": 20, + "48": 20, + "49": 20, + "50": 20, + "51": 20, + "52": 20, + "53": 20, + "54": 20, + "55": 20, + "56": 20, + "57": 20 + }, + "columlen": { + "0": 101, + "2": 131, + "3": 30, + "4": 90 + }, + "borderInfo": [{ + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 6, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 7, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 8, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 9, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 10, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 11, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 12, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }, { + "rangeType": "cell", + "value": { + "row_index": 7, + "col_index": 13, + "b": { + "style": 13, + "color": "rgb(0, 0, 0)" + } + } + }] + }, + "index": "4", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": 1, + "order": "4", + "column": 18, + "row": 36, + "celldata": [{ + "r": 0, + "c": 0, + "v": { + "v": "The company revenue in 2014", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "The company revenue in 2014", + "mc": { + "r": 0, + "c": 0, + "rs": 1, + "cs": 6 + }, + "fs": "14", + "ht": "0", + "vt": "0" + } + }, { + "r": 0, + "c": 1, + "v": { + "mc": { + "r": 0, + "c": 0 + }, + "fs": "14", + "ht": "0", + "vt": "0" + } + }, { + "r": 0, + "c": 2, + "v": { + "mc": { + "r": 0, + "c": 0 + }, + "fs": "14", + "ht": "0", + "vt": "0" + } + }, { + "r": 0, + "c": 3, + "v": { + "mc": { + "r": 0, + "c": 0 + }, + "fs": "14", + "ht": "0", + "vt": "0" + } + }, { + "r": 0, + "c": 4, + "v": { + "mc": { + "r": 0, + "c": 0 + }, + "fs": "14", + "ht": "0", + "vt": "0" + } + }, { + "r": 0, + "c": 5, + "v": { + "mc": { + "r": 0, + "c": 0 + }, + "fs": "14", + "ht": "0", + "vt": "0" + } + }, { + "r": 0, + "c": 9, + "v": { + "v": "Mobile Phone Contrast", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Mobile Phone Contrast", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 16, + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 0, + "c": 9, + "rs": 1, + "cs": 5 + } + } + }, { + "r": 0, + "c": 10, + "v": { + "mc": { + "r": 0, + "c": 9 + } + } + }, { + "r": 0, + "c": 11, + "v": { + "mc": { + "r": 0, + "c": 9 + } + } + }, { + "r": 0, + "c": 12, + "v": { + "mc": { + "r": 0, + "c": 9 + } + } + }, { + "r": 0, + "c": 13, + "v": { + "mc": { + "r": 0, + "c": 9 + } + } + }, { + "r": 1, + "c": 0, + "v": { + "m": "Month", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Month", + "bg": "#f1c232", + "fc": "#ffffff", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 1, + "v": { + "m": "Revenue", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Revenue", + "bg": "#f1c232", + "fc": "#ffffff", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 2, + "v": { + "m": "Diagram 1", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Diagram 1", + "mc": { + "r": 1, + "c": 2, + "rs": 1, + "cs": 2 + }, + "bg": "#f1c232", + "fc": "#ffffff", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 3, + "v": { + "mc": { + "r": 1, + "c": 2 + }, + "bg": "#f1c232", + "fc": "#ffffff", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 4, + "v": { + "m": "Diagram 2", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Diagram 2", + "mc": { + "r": 1, + "c": 4, + "rs": 1, + "cs": 2 + }, + "bg": "#f1c232", + "fc": "#ffffff", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 5, + "v": { + "mc": { + "r": 1, + "c": 4 + }, + "bg": "#f1c232", + "fc": "#ffffff", + "ht": "1", + "vt": "0" + } + }, { + "r": 1, + "c": 9, + "v": { + "v": null, + "m": "", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 1, + "c": 10, + "v": { + "v": "Phone I", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Phone I", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 1, + "c": 11, + "v": { + "v": "Phone II", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Phone II", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 1, + "c": 12, + "v": { + "v": "Diagram", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Diagram", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0, + "mc": { + "r": 1, + "c": 12, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 1, + "c": 13, + "v": { + "mc": { + "r": 1, + "c": 12 + } + } + }, { + "r": 2, + "c": 0, + "v": { + "m": "2014-02-01", + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "v": 41671 + } + }, { + "r": 2, + "c": 1, + "v": { + "v": 30, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "30", + "ht": "0", + "vt": "0" + } + }, { + "r": 2, + "c": 2, + "v": { + "mc": { + "r": 2, + "c": 2, + "rs": 3, + "cs": 2 + }, + "f": "=LINESPLINES(B3:B5,'pink',4,'avg','yellow','red','green',3)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Shape", + "args": [0, [ + [0, 21], + [0, 21], + [80, 54], + [159, 3] + ], "pink", null, 4] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, null, 159, null, null, "yellow"] + }, + "2": { + "id": 2, + "type": "Circle", + "args": [2, 80, 54, 3, null, "green", null] + }, + "3": { + "id": 3, + "type": "Circle", + "args": [3, 159, 3, 3, null, "red", null] + } + }, + "shapeseq": [0, 1, 2, 3], + "offsetX": 0, + "offsetY": 5, + "pixelWidth": 162, + "pixelHeight": 58 + } + } + }, { + "r": 2, + "c": 3, + "v": { + "mc": { + "r": 2, + "c": 2 + } + } + }, { + "r": 2, + "c": 4, + "v": { + "mc": { + "r": 2, + "c": 4, + "rs": 3, + "cs": 2 + }, + "f": "=COLUMNSPLINES(B3:B5,35,'red','green','auto','brown')", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 108, 1, 18, 29, "red", "red"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 54, 31, 18, 21, "green", "green"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 0, 20, 18, 10, "brown", "brown"] + } + }, + "shapeseq": [0, 1, 2], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 164, + "pixelHeight": 63 + } + } + }, { + "r": 2, + "c": 5, + "v": { + "mc": { + "r": 2, + "c": 4 + } + } + }, { + "r": 2, + "c": 9, + "v": { + "v": "Size(inch)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Size(inch)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 10, + "v": { + "v": 5, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "5", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 2, + "c": 11, + "v": { + "v": 3.7, + "ct": { + "fa": "0.0", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "3.7" + } + }, { + "r": 2, + "c": 12, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 2, + "c": 12, + "rs": 1, + "cs": 2 + }, + "f": "=STACKBARSPLINES(K3:L3)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 10, 107, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 0, 145, 8, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 147, + "pixelHeight": 21 + }, + "ct": { + "fa": "General", + "t": "n" + } + } + }, { + "r": 2, + "c": 13, + "v": { + "mc": { + "r": 2, + "c": 12 + } + } + }, { + "r": 3, + "c": 0, + "v": { + "m": "2014-03-01", + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "v": 41699 + } + }, { + "r": 3, + "c": 1, + "v": { + "v": -60, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "-60", + "ht": "0", + "vt": "0" + } + }, { + "r": 3, + "c": 2, + "v": { + "mc": { + "r": 2, + "c": 2 + } + } + }, { + "r": 3, + "c": 3, + "v": { + "mc": { + "r": 2, + "c": 2 + } + } + }, { + "r": 3, + "c": 4, + "v": { + "mc": { + "r": 2, + "c": 4 + } + } + }, { + "r": 3, + "c": 5, + "v": { + "mc": { + "r": 2, + "c": 4 + } + } + }, { + "r": 3, + "c": 9, + "v": { + "v": "RAM(G)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "RAM(G)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 10, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 11, + "v": { + "v": 1, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 3, + "c": 12, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 3, + "c": 12, + "rs": 1, + "cs": 2 + }, + "f": "=STACKBARSPLINES(K4:L4)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 10, 47, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 0, 145, 8, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 147, + "pixelHeight": 21 + } + } + }, { + "r": 3, + "c": 13, + "v": { + "mc": { + "r": 3, + "c": 12 + } + } + }, { + "r": 4, + "c": 0, + "v": { + "m": "2014-04-01", + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "v": 41730 + } + }, { + "r": 4, + "c": 1, + "v": { + "v": 80, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "80", + "ht": "0", + "vt": "0" + } + }, { + "r": 4, + "c": 2, + "v": { + "mc": { + "r": 2, + "c": 2 + } + } + }, { + "r": 4, + "c": 3, + "v": { + "mc": { + "r": 2, + "c": 2 + } + } + }, { + "r": 4, + "c": 4, + "v": { + "mc": { + "r": 2, + "c": 4 + } + } + }, { + "r": 4, + "c": 5, + "v": { + "mc": { + "r": 2, + "c": 4 + } + } + }, { + "r": 4, + "c": 9, + "v": { + "v": "Weight(g)", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Weight(g)", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 10, + "v": { + "v": 149, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "149", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 11, + "v": { + "v": 129, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "129", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 4, + "c": 12, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 4, + "c": 12, + "rs": 1, + "cs": 2 + }, + "f": "=STACKBARSPLINES(K5:L5)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 10, 125, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 0, 145, 8, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 147, + "pixelHeight": 21 + } + } + }, { + "r": 4, + "c": 13, + "v": { + "mc": { + "r": 4, + "c": 12 + } + } + }, { + "r": 6, + "c": 0, + "v": { + "v": "My Assets", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "My Assets", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": "14", + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 6, + "c": 0, + "rs": 1, + "cs": 5 + } + } + }, { + "r": 6, + "c": 1, + "v": { + "mc": { + "r": 6, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 6, + "c": 2, + "v": { + "mc": { + "r": 6, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 6, + "c": 3, + "v": { + "mc": { + "r": 6, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 6, + "c": 4, + "v": { + "mc": { + "r": 6, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 6, + "c": 6, + "v": { + "v": "Checkbook Register", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Checkbook Register", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 16, + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 6, + "c": 6, + "rs": 1, + "cs": 8 + } + } + }, { + "r": 6, + "c": 7, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 6, + "c": 8, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 6, + "c": 9, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 6, + "c": 10, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 6, + "c": 11, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 6, + "c": 12, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 6, + "c": 13, + "v": { + "mc": { + "r": 6, + "c": 6 + } + } + }, { + "r": 7, + "c": 0, + "v": { + "v": "Asset Type", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Asset Type", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": "0" + } + }, { + "r": 7, + "c": 1, + "v": { + "v": "Amount", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Amount", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": "0" + } + }, { + "r": 7, + "c": 2, + "v": { + "v": "Diagram", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Diagram", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": "0", + "mc": { + "r": 7, + "c": 2, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 7, + "c": 3, + "v": { + "mc": { + "r": 7, + "c": 2 + }, + "fs": "10", + "ht": "1", + "vt": "0" + } + }, { + "r": 7, + "c": 4, + "v": { + "v": "Note", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Note", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": "10", + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": "0" + } + }, { + "r": 7, + "c": 6, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 7, + "c": 6, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 7, + "c": 7, + "v": { + "mc": { + "r": 7, + "c": 6 + } + } + }, { + "r": 7, + "c": 8, + "v": { + "v": "InitialValue", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "InitialValue", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 9, + "v": { + "v": 815.25, + "ct": { + "fa": "0.00", + "t": "n" + }, + "m": "815.25", + "bg": "rgba(255,255,255)", + "bl": 1, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 7, + "c": 10, + "v": { + "v": "Σ", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Σ", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 1 + } + }, { + "r": 7, + "c": 11, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 7, + "c": 11, + "rs": 1, + "cs": 3 + } + } + }, { + "r": 7, + "c": 12, + "v": { + "mc": { + "r": 7, + "c": 11 + } + } + }, { + "r": 7, + "c": 13, + "v": { + "mc": { + "r": 7, + "c": 11 + } + } + }, { + "r": 8, + "c": 0, + "v": { + "v": "Savings", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Savings", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 1, + "v": { + "v": 25000, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 25000" + } + }, { + "r": 8, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 8, + "c": 2, + "rs": 3, + "cs": 2 + }, + "f": "=PIESPLINES(B9:B11)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "PieSlice", + "args": [0, 31, 31, 31, 5.291103416572283, 6.283185307179586, null, "#5ab1ef"] + }, + "1": { + "id": 1, + "type": "PieSlice", + "args": [1, 31, 31, 31, 1.6534698176788385, 5.291103416572283, null, "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "PieSlice", + "args": [2, 31, 31, 31, 0, 1.6534698176788385, null, "#2ec7c9"] + } + }, + "shapeseq": [0, 1, 2], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 162, + "pixelHeight": 63 + } + } + }, { + "r": 8, + "c": 3, + "v": { + "mc": { + "r": 8, + "c": 2 + } + } + }, { + "r": 8, + "c": 4, + "v": { + "v": 0.2631578947368421, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0.263157895", + "bg": "rgb(145, 159, 129)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "f": "=B9/SUM(B9:B11)" + } + }, { + "r": 8, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 8, + "c": 6, + "v": { + "v": "12/11/2012", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "12/11/2012", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 8, + "c": 6, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 8, + "c": 7, + "v": { + "mc": { + "r": 8, + "c": 6 + } + } + }, { + "r": 8, + "c": 8, + "v": { + "v": "CVS", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "CVS", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 9, + "v": { + "v": -200, + "ct": { + "fa": "0.00", + "t": "n" + }, + "m": "-200.00", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 10, + "v": { + "v": 615.25, + "ct": { + "fa": "0.00", + "t": "n" + }, + "m": "615.25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 8, + "c": 11, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "f": "=BARSPLINES(J9:J11)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 56, 42, 53, 19, "#97b552", "#97b552"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 110, 21, 108, 19, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 89, 0, 20, 19, "#97b552", "#97b552"] + } + }, + "shapeseq": [0, 1, 2], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 221, + "pixelHeight": 63 + }, + "mc": { + "r": 8, + "c": 11, + "rs": 3, + "cs": 3 + } + } + }, { + "r": 8, + "c": 12, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 8, + "c": 13, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 9, + "c": 0, + "v": { + "v": "401k", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "401k", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 1, + "v": { + "v": 55000, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 55000" + } + }, { + "r": 9, + "c": 2, + "v": { + "mc": { + "r": 8, + "c": 2 + } + } + }, { + "r": 9, + "c": 3, + "v": { + "mc": { + "r": 8, + "c": 2 + } + } + }, { + "r": 9, + "c": 4, + "v": { + "v": 0.5789473684210527, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0.578947368", + "bg": "rgb(215, 145, 62)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "f": "=B10/SUM(B9:B11)" + } + }, { + "r": 9, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 9, + "c": 6, + "v": { + "v": "12/12/2012", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "12/12/2012", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 9, + "c": 6, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 9, + "c": 7, + "v": { + "mc": { + "r": 9, + "c": 6 + } + } + }, { + "r": 9, + "c": 8, + "v": { + "v": "Bank", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Bank", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 9, + "v": { + "v": 1000.12, + "ct": { + "fa": "#,##0.00", + "t": "n" + }, + "m": "1,000.12", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 10, + "v": { + "v": 1615.37, + "ct": { + "fa": "#,##0.00", + "t": "n" + }, + "m": "1,615.37", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 9, + "c": 11, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 9, + "c": 12, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 9, + "c": 13, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 10, + "c": 0, + "v": { + "v": "Stocks", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Stocks", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 1, + "v": { + "v": 15000, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 15000" + } + }, { + "r": 10, + "c": 2, + "v": { + "mc": { + "r": 8, + "c": 2 + } + } + }, { + "r": 10, + "c": 3, + "v": { + "mc": { + "r": 8, + "c": 2 + } + } + }, { + "r": 10, + "c": 4, + "v": { + "v": 0.15789473684210525, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0.157894737", + "bg": "rgb(206, 167, 34)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "f": "=B11/SUM(B9:B11)" + } + }, { + "r": 10, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 10, + "c": 6, + "v": { + "v": "12/13/2012", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "12/13/2012", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 10, + "c": 6, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 10, + "c": 7, + "v": { + "mc": { + "r": 10, + "c": 6 + } + } + }, { + "r": 10, + "c": 8, + "v": { + "v": "Starbucks", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Starbucks", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 9, + "v": { + "v": -500.43, + "ct": { + "fa": "0.00", + "t": "n" + }, + "m": "-500.43", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 10, + "v": { + "v": 1114.94, + "ct": { + "fa": "#,##0.00", + "t": "n" + }, + "m": "1,114.94", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 10, + "c": 11, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 10, + "c": 12, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 10, + "c": 13, + "v": { + "mc": { + "r": 8, + "c": 11 + } + } + }, { + "r": 12, + "c": 0, + "v": { + "v": "Sales by State", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Sales by State", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": "14", + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 12, + "c": 0, + "rs": 1, + "cs": 5 + } + } + }, { + "r": 12, + "c": 1, + "v": { + "mc": { + "r": 12, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 12, + "c": 2, + "v": { + "mc": { + "r": 12, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 12, + "c": 3, + "v": { + "mc": { + "r": 12, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 12, + "c": 4, + "v": { + "mc": { + "r": 12, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 13, + "c": 0, + "v": { + "v": "State", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "State", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": 1 + } + }, { + "r": 13, + "c": 1, + "v": { + "v": "Sales", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Sales", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": 1 + } + }, { + "r": 13, + "c": 2, + "v": { + "v": "Diagram", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Diagram", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": "1", + "vt": 1, + "mc": { + "r": 13, + "c": 2, + "rs": 1, + "cs": 3 + } + } + }, { + "r": 13, + "c": 3, + "v": { + "mc": { + "r": 13, + "c": 2 + }, + "ht": "1" + } + }, { + "r": 13, + "c": 4, + "v": { + "mc": { + "r": 13, + "c": 2 + }, + "ht": "1" + } + }, { + "r": 13, + "c": 6, + "v": { + "v": "Student Grade Statistics", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Student Grade Statistics", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 16, + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 13, + "c": 6, + "rs": 1, + "cs": 7 + } + } + }, { + "r": 13, + "c": 7, + "v": { + "mc": { + "r": 13, + "c": 6 + } + } + }, { + "r": 13, + "c": 8, + "v": { + "mc": { + "r": 13, + "c": 6 + } + } + }, { + "r": 13, + "c": 9, + "v": { + "mc": { + "r": 13, + "c": 6 + } + } + }, { + "r": 13, + "c": 10, + "v": { + "mc": { + "r": 13, + "c": 6 + } + } + }, { + "r": 13, + "c": 11, + "v": { + "mc": { + "r": 13, + "c": 6 + } + } + }, { + "r": 13, + "c": 12, + "v": { + "mc": { + "r": 13, + "c": 6 + } + } + }, { + "r": 13, + "c": 13, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 0, + "v": { + "v": "Idaho", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Idaho", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 14, + "c": 1, + "v": { + "v": 3500, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 3500" + } + }, { + "r": 14, + "c": 2, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 14, + "c": 2, + "rs": 4, + "cs": 3 + }, + "f": "=AREASPLINES(B15:B18)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Shape", + "args": [0, [ + [0, 87], + [0, 61], + [84, 0], + [169, 87], + [253, 35], + [253, 87] + ], "#CCF3F4", "#CCF3F4", null] + }, + "1": { + "id": 1, + "type": "Shape", + "args": [1, [ + [0, 61], + [0, 61], + [84, 0], + [169, 87], + [253, 35] + ], "#2ec7c9", null, 1] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 2, + "pixelWidth": 253, + "pixelHeight": 88 + } + } + }, { + "r": 14, + "c": 3, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 14, + "c": 4, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 14, + "c": 6, + "v": { + "v": "Name", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Name", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 14, + "c": 7, + "v": { + "v": "Chinese", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Chinese", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0, + "mc": { + "r": 14, + "c": 7, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 14, + "c": 8, + "v": { + "mc": { + "r": 14, + "c": 7 + } + } + }, { + "r": 14, + "c": 9, + "v": { + "v": "Math", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Math", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0, + "mc": { + "r": 14, + "c": 9, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 14, + "c": 10, + "v": { + "mc": { + "r": 14, + "c": 9 + } + } + }, { + "r": 14, + "c": 11, + "v": { + "v": "English", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "English", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0, + "mc": { + "r": 14, + "c": 11, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 14, + "c": 12, + "v": { + "mc": { + "r": 14, + "c": 11 + } + } + }, { + "r": 14, + "c": 13, + "v": { + "v": "Total", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Total", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 15, + "c": 0, + "v": { + "v": "Montana", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Montana", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 15, + "c": 1, + "v": { + "v": 7000, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 7000" + } + }, { + "r": 15, + "c": 2, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 15, + "c": 3, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 15, + "c": 4, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 15, + "c": 6, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 15, + "c": 6, + "rs": 2, + "cs": 1 + } + } + }, { + "r": 15, + "c": 7, + "v": { + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "ct": { + "fa": "General", + "t": "g" + }, + "f": "=TRISTATESPLINES(H18:N22,10)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 476, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 462, 23, 3, 1, "#999", "#999"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 448, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 434, 23, 3, 1, "#999", "#999"] + }, + "4": { + "id": 4, + "type": "Rect", + "args": [4, 420, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "5": { + "id": 5, + "type": "Rect", + "args": [5, 406, 23, 3, 1, "#999", "#999"] + }, + "6": { + "id": 6, + "type": "Rect", + "args": [6, 392, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "7": { + "id": 7, + "type": "Rect", + "args": [7, 378, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "8": { + "id": 8, + "type": "Rect", + "args": [8, 364, 23, 3, 1, "#999", "#999"] + }, + "9": { + "id": 9, + "type": "Rect", + "args": [9, 350, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "10": { + "id": 10, + "type": "Rect", + "args": [10, 336, 23, 3, 1, "#999", "#999"] + }, + "11": { + "id": 11, + "type": "Rect", + "args": [11, 322, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "12": { + "id": 12, + "type": "Rect", + "args": [12, 308, 23, 3, 1, "#999", "#999"] + }, + "13": { + "id": 13, + "type": "Rect", + "args": [13, 294, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "14": { + "id": 14, + "type": "Rect", + "args": [14, 280, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "15": { + "id": 15, + "type": "Rect", + "args": [15, 266, 23, 3, 1, "#999", "#999"] + }, + "16": { + "id": 16, + "type": "Rect", + "args": [16, 252, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "17": { + "id": 17, + "type": "Rect", + "args": [17, 238, 23, 3, 1, "#999", "#999"] + }, + "18": { + "id": 18, + "type": "Rect", + "args": [18, 224, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "19": { + "id": 19, + "type": "Rect", + "args": [19, 210, 23, 3, 1, "#999", "#999"] + }, + "20": { + "id": 20, + "type": "Rect", + "args": [20, 196, 24, 3, 22, "#97b552", "#97b552"] + }, + "21": { + "id": 21, + "type": "Rect", + "args": [21, 182, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "22": { + "id": 22, + "type": "Rect", + "args": [22, 168, 23, 3, 1, "#999", "#999"] + }, + "23": { + "id": 23, + "type": "Rect", + "args": [23, 154, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "24": { + "id": 24, + "type": "Rect", + "args": [24, 140, 23, 3, 1, "#999", "#999"] + }, + "25": { + "id": 25, + "type": "Rect", + "args": [25, 126, 24, 3, 22, "#97b552", "#97b552"] + }, + "26": { + "id": 26, + "type": "Rect", + "args": [26, 112, 23, 3, 1, "#999", "#999"] + }, + "27": { + "id": 27, + "type": "Rect", + "args": [27, 98, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "28": { + "id": 28, + "type": "Rect", + "args": [28, 84, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "29": { + "id": 29, + "type": "Rect", + "args": [29, 70, 23, 3, 1, "#999", "#999"] + }, + "30": { + "id": 30, + "type": "Rect", + "args": [30, 56, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "31": { + "id": 31, + "type": "Rect", + "args": [31, 42, 23, 3, 1, "#999", "#999"] + }, + "32": { + "id": 32, + "type": "Rect", + "args": [32, 28, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "33": { + "id": 33, + "type": "Rect", + "args": [33, 14, 23, 3, 1, "#999", "#999"] + }, + "34": { + "id": 34, + "type": "Rect", + "args": [34, 0, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 517, + "pixelHeight": 48 + }, + "mc": { + "r": 15, + "c": 7, + "rs": 2, + "cs": 7 + } + } + }, { + "r": 15, + "c": 8, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 15, + "c": 9, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 15, + "c": 10, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 15, + "c": 11, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 15, + "c": 12, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 15, + "c": 13, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 0, + "v": { + "v": "Oregon", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Oregon", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 16, + "c": 1, + "v": { + "v": 2000, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 2000" + } + }, { + "r": 16, + "c": 2, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 16, + "c": 3, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 16, + "c": 4, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 16, + "c": 6, + "v": { + "mc": { + "r": 15, + "c": 6 + } + } + }, { + "r": 16, + "c": 7, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 8, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 9, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 10, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 11, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 12, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 16, + "c": 13, + "v": { + "mc": { + "r": 15, + "c": 7 + } + } + }, { + "r": 17, + "c": 0, + "v": { + "v": "Washington", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Washington", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 1, + "v": { + "v": 5000, + "ct": { + "fa": "\"$\" #", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "$ 5000" + } + }, { + "r": 17, + "c": 2, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 17, + "c": 3, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 17, + "c": 4, + "v": { + "mc": { + "r": 14, + "c": 2 + } + } + }, { + "r": 17, + "c": 6, + "v": { + "v": "Student 1", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Student 1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 17, + "c": 7, + "v": { + "v": 70, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "70", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 17, + "c": 7, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 17, + "c": 8, + "v": { + "mc": { + "r": 17, + "c": 7 + } + } + }, { + "r": 17, + "c": 9, + "v": { + "v": 90, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "90", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 17, + "c": 9, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 17, + "c": 10, + "v": { + "mc": { + "r": 17, + "c": 9 + } + } + }, { + "r": 17, + "c": 11, + "v": { + "v": 51, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "51", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 17, + "c": 11, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 17, + "c": 12, + "v": { + "mc": { + "r": 17, + "c": 11 + } + } + }, { + "r": 17, + "c": 13, + "v": { + "v": 211, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "211", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 6, + "v": { + "v": "Student 2", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Student 2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 18, + "c": 7, + "v": { + "v": 99, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "99", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 18, + "c": 7, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 18, + "c": 8, + "v": { + "mc": { + "r": 18, + "c": 7 + } + } + }, { + "r": 18, + "c": 9, + "v": { + "v": -59, + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 18, + "c": 9, + "rs": 1, + "cs": 2 + }, + "m": "-59" + } + }, { + "r": 18, + "c": 10, + "v": { + "mc": { + "r": 18, + "c": 9 + } + } + }, { + "r": 18, + "c": 11, + "v": { + "v": 63, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "63", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 18, + "c": 11, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 18, + "c": 12, + "v": { + "mc": { + "r": 18, + "c": 11 + } + } + }, { + "r": 18, + "c": 13, + "v": { + "v": 221, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "221", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 0, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": "14", + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 19, + "c": 0, + "rs": 1, + "cs": 5 + } + } + }, { + "r": 19, + "c": 1, + "v": { + "mc": { + "r": 19, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 19, + "c": 2, + "v": { + "mc": { + "r": 19, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 19, + "c": 3, + "v": { + "mc": { + "r": 19, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 19, + "c": 4, + "v": { + "mc": { + "r": 19, + "c": 0 + }, + "fs": "14" + } + }, { + "r": 19, + "c": 6, + "v": { + "v": "Student 3", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Student 3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 19, + "c": 7, + "v": { + "v": -90, + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 19, + "c": 7, + "rs": 1, + "cs": 2 + }, + "m": "-90" + } + }, { + "r": 19, + "c": 8, + "v": { + "mc": { + "r": 19, + "c": 7 + } + } + }, { + "r": 19, + "c": 9, + "v": { + "v": 128, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "128", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 19, + "c": 9, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 19, + "c": 10, + "v": { + "mc": { + "r": 19, + "c": 9 + } + } + }, { + "r": 19, + "c": 11, + "v": { + "v": 74, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "74", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 19, + "c": 11, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 19, + "c": 12, + "v": { + "mc": { + "r": 19, + "c": 11 + } + } + }, { + "r": 19, + "c": 13, + "v": { + "v": 291, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "291", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 0, + "v": { + "v": "Employee KPI", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Employee KPI", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 9, + "fs": 16, + "fc": "rgb(51, 51, 51)", + "ht": 0, + "vt": 0, + "mc": { + "r": 20, + "c": 0, + "rs": 1, + "cs": 5 + } + } + }, { + "r": 20, + "c": 1, + "v": { + "mc": { + "r": 20, + "c": 0 + } + } + }, { + "r": 20, + "c": 2, + "v": { + "mc": { + "r": 20, + "c": 0 + } + } + }, { + "r": 20, + "c": 3, + "v": { + "mc": { + "r": 20, + "c": 0 + } + } + }, { + "r": 20, + "c": 4, + "v": { + "mc": { + "r": 20, + "c": 0 + } + } + }, { + "r": 20, + "c": 6, + "v": { + "v": "Student 4", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Student 4", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 20, + "c": 7, + "v": { + "v": 93, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "93", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 20, + "c": 7, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 20, + "c": 8, + "v": { + "mc": { + "r": 20, + "c": 7 + } + } + }, { + "r": 20, + "c": 9, + "v": { + "v": 61, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "61", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 20, + "c": 9, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 20, + "c": 10, + "v": { + "mc": { + "r": 20, + "c": 9 + } + } + }, { + "r": 20, + "c": 11, + "v": { + "v": 53, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "53", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 20, + "c": 11, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 20, + "c": 12, + "v": { + "mc": { + "r": 20, + "c": 11 + } + } + }, { + "r": 20, + "c": 13, + "v": { + "v": 207, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "207", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 0, + "v": { + "v": "Name", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Name", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 21, + "c": 1, + "v": { + "v": "Forecast", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Forecast", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 21, + "c": 2, + "v": { + "v": "Actuality", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Actuality", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0 + } + }, { + "r": 21, + "c": 3, + "v": { + "v": "Diagram", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Diagram", + "bg": "rgb(255, 192, 0)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(255, 255, 255)", + "ht": 0, + "vt": 0, + "mc": { + "r": 21, + "c": 3, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 21, + "c": 4, + "v": { + "mc": { + "r": 21, + "c": 3 + } + } + }, { + "r": 21, + "c": 6, + "v": { + "v": "Student 5", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Student 5", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 21, + "c": 7, + "v": { + "v": 106, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "106", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 21, + "c": 7, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 21, + "c": 8, + "v": { + "mc": { + "r": 21, + "c": 7 + } + } + }, { + "r": 21, + "c": 9, + "v": { + "v": 82, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "82", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 21, + "c": 9, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 21, + "c": 10, + "v": { + "mc": { + "r": 21, + "c": 9 + } + } + }, { + "r": 21, + "c": 11, + "v": { + "v": 80, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "80", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "mc": { + "r": 21, + "c": 11, + "rs": 1, + "cs": 2 + } + } + }, { + "r": 21, + "c": 12, + "v": { + "mc": { + "r": 21, + "c": 11 + } + } + }, { + "r": 21, + "c": 13, + "v": { + "v": 268, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "268", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 0, + "v": { + "v": "Employee 1", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Employee 1", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 1, + "v": { + "v": 6, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "6", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 22, + "c": 2, + "v": { + "v": 2, + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2" + } + }, { + "r": 22, + "c": 3, + "v": { + "mc": { + "r": 22, + "c": 3, + "rs": 3, + "cs": 2 + }, + "f": "=STACKCOLUMNSPLINES(B23:C25)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 60, 57, 58, 5, "#2ec7c9", "#2ec7c9"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 60, 36, 58, 20, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 60, 27, 58, 8, "#5ab1ef", "#5ab1ef"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 0, 45, 58, 17, "#2ec7c9", "#2ec7c9"] + }, + "4": { + "id": 4, + "type": "Rect", + "args": [4, 0, 21, 58, 23, "#fc5c5c", "#fc5c5c"] + }, + "5": { + "id": 5, + "type": "Rect", + "args": [5, 0, 3, 58, 17, "#5ab1ef", "#5ab1ef"] + } + }, + "shapeseq": [0, 1, 2, 3, 4, 5], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 121, + "pixelHeight": 63 + } + } + }, { + "r": 22, + "c": 4, + "v": { + "mc": { + "r": 22, + "c": 3 + } + } + }, { + "r": 23, + "c": 0, + "v": { + "v": "Employee 2", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Employee 2", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 1, + "v": { + "v": 8, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "8", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 2, + "v": { + "v": 7, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "7", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 23, + "c": 3, + "v": { + "mc": { + "r": 22, + "c": 3 + } + } + }, { + "r": 23, + "c": 4, + "v": { + "mc": { + "r": 22, + "c": 3 + } + } + }, { + "r": 23, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 24, + "c": 0, + "v": { + "v": "Employee 3", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Employee 3", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 1, + "v": { + "v": 6, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "6", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 24, + "c": 2, + "v": { + "v": 3, + "ct": { + "fa": "General", + "t": "n" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "3" + } + }, { + "r": 24, + "c": 3, + "v": { + "mc": { + "r": 22, + "c": 3 + } + } + }, { + "r": 24, + "c": 4, + "v": { + "mc": { + "r": 22, + "c": 3 + } + } + }, { + "r": 25, + "c": 0, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 1, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 2, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 3, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 25, + "c": 4, + "v": { + "v": null, + "m": "", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 0, + "v": { + "v": 42370, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-01" + } + }, { + "r": 27, + "c": 1, + "v": { + "v": 12, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "12", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 27, + "c": 2, + "v": { + "f": "=DISCRETESPLINES(B28:B58,30)", + "spl": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 240, 14, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 232, 55, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 224, 57, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 216, 49, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "4": { + "id": 4, + "type": "Rect", + "args": [4, 208, 68, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "5": { + "id": 5, + "type": "Rect", + "args": [5, 200, 71, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "6": { + "id": 6, + "type": "Rect", + "args": [6, 192, 45, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "7": { + "id": 7, + "type": "Rect", + "args": [7, 184, 64, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "8": { + "id": 8, + "type": "Rect", + "args": [8, 176, 30, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "9": { + "id": 9, + "type": "Rect", + "args": [9, 168, 32, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "10": { + "id": 10, + "type": "Rect", + "args": [10, 160, 14, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "11": { + "id": 11, + "type": "Rect", + "args": [11, 152, 12, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "12": { + "id": 12, + "type": "Rect", + "args": [12, 144, 0, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "13": { + "id": 13, + "type": "Rect", + "args": [13, 136, 65, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "14": { + "id": 14, + "type": "Rect", + "args": [14, 128, 7, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "15": { + "id": 15, + "type": "Rect", + "args": [15, 120, 9, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "16": { + "id": 16, + "type": "Rect", + "args": [16, 112, 54, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "17": { + "id": 17, + "type": "Rect", + "args": [17, 104, 3, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "18": { + "id": 18, + "type": "Rect", + "args": [18, 96, 33, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "19": { + "id": 19, + "type": "Rect", + "args": [19, 88, 1, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "20": { + "id": 20, + "type": "Rect", + "args": [20, 80, 53, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "21": { + "id": 21, + "type": "Rect", + "args": [21, 72, 7, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "22": { + "id": 22, + "type": "Rect", + "args": [22, 64, 25, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "23": { + "id": 23, + "type": "Rect", + "args": [23, 56, 8, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "24": { + "id": 24, + "type": "Rect", + "args": [24, 48, 59, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "25": { + "id": 25, + "type": "Rect", + "args": [25, 40, 22, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "26": { + "id": 26, + "type": "Rect", + "args": [26, 32, 46, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "27": { + "id": 27, + "type": "Rect", + "args": [27, 24, 60, 6, 30, "#fc5c5c", "#fc5c5c"] + }, + "28": { + "id": 28, + "type": "Rect", + "args": [28, 16, 32, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "29": { + "id": 29, + "type": "Rect", + "args": [29, 8, 25, 6, 30, "#2ec7c9", "#2ec7c9"] + }, + "30": { + "id": 30, + "type": "Rect", + "args": [30, 0, 62, 6, 30, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 253, + "pixelHeight": 101 + }, + "mc": { + "r": 27, + "c": 2, + "rs": 1, + "cs": 3 + } + } + }, { + "r": 27, + "c": 3, + "v": { + "mc": { + "r": 27, + "c": 2 + } + } + }, { + "r": 27, + "c": 4, + "v": { + "mc": { + "r": 27, + "c": 2 + } + } + }, { + "r": 28, + "c": 0, + "v": { + "v": 42371, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-02" + } + }, { + "r": 28, + "c": 1, + "v": { + "v": 64, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "64", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 29, + "c": 0, + "v": { + "v": 42372, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-03" + } + }, { + "r": 29, + "c": 1, + "v": { + "v": 54, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "54", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 30, + "c": 0, + "v": { + "v": 42373, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-04" + } + }, { + "r": 30, + "c": 1, + "v": { + "v": 15, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "15", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 31, + "c": 0, + "v": { + "v": 42374, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-05" + } + }, { + "r": 31, + "c": 1, + "v": { + "v": 35, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "35", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 31, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 32, + "c": 0, + "v": { + "v": 42375, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-06" + } + }, { + "r": 32, + "c": 1, + "v": { + "v": 67, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "67", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 32, + "c": 2, + "v": { + "f": "=BARSPLINES(B22:B25)" + } + }, { + "r": 32, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 33, + "c": 0, + "v": { + "v": 42376, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-07" + } + }, { + "r": 33, + "c": 1, + "v": { + "v": 16, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "16", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 33, + "c": 2, + "v": { + "f": "=STACKBARSPLINES(B22:B25)" + } + }, { + "r": 33, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 34, + "c": 0, + "v": { + "v": 42377, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-08" + } + }, { + "r": 34, + "c": 1, + "v": { + "v": 87, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "87", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 34, + "c": 2, + "v": { + "f": "=DISCRETESPLINES(B22:B25)" + } + }, { + "r": 34, + "c": 5, + "v": { + "ct": { + "fa": "General", + "t": "g" + } + } + }, { + "r": 34, + "c": 7, + "v": { + "ct": { + "fa": "General", + "t": "n" + } + } + }, { + "r": 35, + "c": 0, + "v": { + "v": 42378, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-09" + } + }, { + "r": 35, + "c": 1, + "v": { + "v": 64, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "64", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 35, + "c": 2, + "v": { + "f": "=TRISTATESPLINES(B22:B25)" + } + }, { + "r": 36, + "c": 0, + "v": { + "v": 42379, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-10" + } + }, { + "r": 36, + "c": 1, + "v": { + "v": 88, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "88", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 36, + "c": 2, + "v": { + "ct": { + "fa": "General", + "t": "e" + } + } + }, { + "r": 37, + "c": 0, + "v": { + "v": 42380, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-11" + } + }, { + "r": 37, + "c": 1, + "v": { + "v": 25, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "25", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 38, + "c": 0, + "v": { + "v": 42381, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-12" + } + }, { + "r": 38, + "c": 1, + "v": { + "v": 96, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "96", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 39, + "c": 0, + "v": { + "v": 42382, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-13" + } + }, { + "r": 39, + "c": 1, + "v": { + "v": 53, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "53", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 40, + "c": 0, + "v": { + "v": 42383, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-14" + } + }, { + "r": 40, + "c": 1, + "v": { + "v": 94, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "94", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 41, + "c": 0, + "v": { + "v": 42384, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-15" + } + }, { + "r": 41, + "c": 1, + "v": { + "v": 23, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "23", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 42, + "c": 0, + "v": { + "v": 42385, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-16" + } + }, { + "r": 42, + "c": 1, + "v": { + "v": 85, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "85", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 43, + "c": 0, + "v": { + "v": 42386, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-17" + } + }, { + "r": 43, + "c": 1, + "v": { + "v": 89, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "89", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 44, + "c": 0, + "v": { + "v": 42387, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-18" + } + }, { + "r": 44, + "c": 1, + "v": { + "v": 8, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "8", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 45, + "c": 0, + "v": { + "v": 42388, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-19" + } + }, { + "r": 45, + "c": 1, + "v": { + "v": 98, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "98", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 46, + "c": 0, + "v": { + "v": 42389, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-20" + } + }, { + "r": 46, + "c": 1, + "v": { + "v": 82, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "82", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 47, + "c": 0, + "v": { + "v": 42390, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-21" + } + }, { + "r": 47, + "c": 1, + "v": { + "v": 79, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "79", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 48, + "c": 0, + "v": { + "v": 42391, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-22" + } + }, { + "r": 48, + "c": 1, + "v": { + "v": 54, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "54", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 49, + "c": 0, + "v": { + "v": 42392, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-23" + } + }, { + "r": 49, + "c": 1, + "v": { + "v": 56, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "56", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 50, + "c": 0, + "v": { + "v": 42393, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-24" + } + }, { + "r": 50, + "c": 1, + "v": { + "v": 10, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "10", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 51, + "c": 0, + "v": { + "v": 42394, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-25" + } + }, { + "r": 51, + "c": 1, + "v": { + "v": 36, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "36", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 52, + "c": 0, + "v": { + "v": 42395, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-26" + } + }, { + "r": 52, + "c": 1, + "v": { + "v": 0, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "0", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 53, + "c": 0, + "v": { + "v": 42396, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-27" + } + }, { + "r": 53, + "c": 1, + "v": { + "v": 4, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "4", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 54, + "c": 0, + "v": { + "v": 42397, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-28" + } + }, { + "r": 54, + "c": 1, + "v": { + "v": 31, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "31", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 55, + "c": 0, + "v": { + "v": 42398, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-29" + } + }, { + "r": 55, + "c": 1, + "v": { + "v": 19, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "19", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 56, + "c": 0, + "v": { + "v": 42399, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-30" + } + }, { + "r": 56, + "c": 1, + "v": { + "v": 22, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "22", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }, { + "r": 57, + "c": 0, + "v": { + "v": 42400, + "ct": { + "fa": "yyyy-MM-dd", + "t": "d" + }, + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1, + "m": "2016-01-31" + } + }, { + "r": 57, + "c": 1, + "v": { + "v": 78, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "78", + "bg": "rgba(255,255,255)", + "bl": 0, + "it": 0, + "ff": 0, + "fs": 11, + "fc": "rgb(51, 51, 51)", + "ht": 1, + "vt": 1 + } + }], + "visibledatarow": [30, 51, 72, 93, 114, 134, 164, 185, 206, 227, 248, 268, 298, 328, 349, 370, 397, 418, 439, 469, 499, 520, 541, 562, 583, 604, 624, 725, 746, 767, 788, 809, 830, 851, 878, 899, 920, 941, 962, 983, 1004, 1025, 1046, 1067, 1088, 1109, 1130, 1151, 1172, 1193, 1214, 1235, 1256, 1277, 1298, 1319, 1340, 1361, 1381, 1401, 1421, 1441, 1461], + "visibledatacolumn": [102, 176, 308, 339, 430, 504, 578, 652, 726, 800, 874, 948, 1022, 1096, 1170, 1244, 1318, 1392], + "ch_width": 1524, + "rh_height": 1571, + "luckysheet_select_save": [{ + "left": 504, + "width": 73, + "top": 746, + "height": 20, + "left_move": 504, + "width_move": 73, + "top_move": 746, + "height_move": 20, + "row": [29, 29], + "column": [6, 6], + "row_focus": 29, + "column_focus": 6 + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 562, + "calcChain": [{ + "r": 2, + "c": 2, + "index": "4", + "func": [true, "", "=LINESPLINES(B3:B5,'pink',4,'avg','yellow','red','green',3)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Shape", + "args": [0, [ + [0, 21], + [0, 21], + [80, 54], + [159, 3] + ], "pink", null, 4] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, null, 159, null, null, "yellow"] + }, + "2": { + "id": 2, + "type": "Circle", + "args": [2, 80, 54, 3, null, "green", null] + }, + "3": { + "id": 3, + "type": "Circle", + "args": [3, 159, 3, 3, null, "red", null] + } + }, + "shapeseq": [0, 1, 2, 3], + "offsetX": 0, + "offsetY": 5, + "pixelWidth": 162, + "pixelHeight": 58 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 2, + "c": 4, + "index": "4", + "func": [true, "", "=COLUMNSPLINES(B3:B5,35,'red','green','auto','brown')", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 108, 1, 18, 29, "red", "red"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 54, 31, 18, 21, "green", "green"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 0, 20, 18, 10, "brown", "brown"] + } + }, + "shapeseq": [0, 1, 2], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 164, + "pixelHeight": 63 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 8, + "c": 4, + "index": 4, + "func": [true, 0.2631578947368421, "=B9/SUM(B9:B11)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 9, + "c": 4, + "index": 4, + "func": [true, 0.5789473684210527, "=B10/SUM(B9:B11)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 10, + "c": 4, + "index": 4, + "func": [true, 0.15789473684210525, "=B11/SUM(B9:B11)"], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 8, + "c": 2, + "index": 4, + "func": [true, "", "=PIESPLINES(B9:B11)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "PieSlice", + "args": [0, 31, 31, 31, 5.291103416572283, 6.283185307179586, null, "#5ab1ef"] + }, + "1": { + "id": 1, + "type": "PieSlice", + "args": [1, 31, 31, 31, 1.6534698176788385, 5.291103416572283, null, "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "PieSlice", + "args": [2, 31, 31, 31, 0, 1.6534698176788385, null, "#2ec7c9"] + } + }, + "shapeseq": [0, 1, 2], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 162, + "pixelHeight": 63 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 14, + "c": 2, + "index": 4, + "func": [true, "", "=AREASPLINES(B15:B18)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Shape", + "args": [0, [ + [0, 87], + [0, 61], + [84, 0], + [169, 87], + [253, 35], + [253, 87] + ], "#CCF3F4", "#CCF3F4", null] + }, + "1": { + "id": 1, + "type": "Shape", + "args": [1, [ + [0, 61], + [0, 61], + [84, 0], + [169, 87], + [253, 35] + ], "#2ec7c9", null, 1] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 2, + "pixelWidth": 253, + "pixelHeight": 88 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 32, + "c": 2, + "index": 4, + "func": [true, "", "=BARSPLINES(B22:B25)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 15, 129, 3, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 10, 129, 3, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 0, 5, 129, 3, "#fc5c5c", "#fc5c5c"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 0, 0, 129, 3, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1, 2, 3], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 131, + "pixelHeight": 20 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 33, + "c": 2, + "index": 4, + "func": [true, "", "=STACKBARSPLINES(B22:B25)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 0, 129, 18, "#2ec7c9", "#2ec7c9"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 130, 0, 129, 18, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 260, 0, 129, 18, "#5ab1ef", "#5ab1ef"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 390, 0, 129, 18, "#ffb980", "#ffb980"] + } + }, + "shapeseq": [0, 1, 2, 3], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 131, + "pixelHeight": 20 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 34, + "c": 2, + "index": 4, + "func": [true, "", "=DISCRETESPLINES(B22:B25)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 96, null, 30, 6, "#2ec7c9", "#2ec7c9"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 64, null, 30, 6, "#2ec7c9", "#2ec7c9"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 32, null, 30, 6, "#2ec7c9", "#2ec7c9"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 0, null, 30, 6, "#2ec7c9", "#2ec7c9"] + } + }, + "shapeseq": [0, 1, 2, 3], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 131, + "pixelHeight": 20 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 35, + "c": 2, + "index": 4, + "func": [true, "", "=TRISTATESPLINES(B22:B25)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 15, 0, 3, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 10, 0, 3, 8, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 5, 0, 3, 8, "#fc5c5c", "#fc5c5c"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 0, 9, 3, 1, "#999", "#999"] + } + }, + "shapeseq": [0, 1, 2, 3], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 131, + "pixelHeight": 20 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 2, + "c": 12, + "index": 4, + "func": [true, "", "=STACKBARSPLINES(K3:L3)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 10, 107, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 0, 145, 8, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 147, + "pixelHeight": 21 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 27, + "c": 2, + "index": 4, + "func": [true, "", "=DISCRETESPLINES(B28:B58,30)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 120, 3, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 116, 10, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 112, 10, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 108, 9, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "4": { + "id": 4, + "type": "Rect", + "args": [4, 104, 12, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "5": { + "id": 5, + "type": "Rect", + "args": [5, 100, 13, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "6": { + "id": 6, + "type": "Rect", + "args": [6, 96, 8, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "7": { + "id": 7, + "type": "Rect", + "args": [7, 92, 12, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "8": { + "id": 8, + "type": "Rect", + "args": [8, 88, 6, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "9": { + "id": 9, + "type": "Rect", + "args": [9, 84, 6, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "10": { + "id": 10, + "type": "Rect", + "args": [10, 80, 3, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "11": { + "id": 11, + "type": "Rect", + "args": [11, 76, 2, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "12": { + "id": 12, + "type": "Rect", + "args": [12, 72, 0, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "13": { + "id": 13, + "type": "Rect", + "args": [13, 68, 12, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "14": { + "id": 14, + "type": "Rect", + "args": [14, 64, 1, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "15": { + "id": 15, + "type": "Rect", + "args": [15, 60, 2, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "16": { + "id": 16, + "type": "Rect", + "args": [16, 56, 10, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "17": { + "id": 17, + "type": "Rect", + "args": [17, 52, 1, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "18": { + "id": 18, + "type": "Rect", + "args": [18, 48, 6, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "19": { + "id": 19, + "type": "Rect", + "args": [19, 44, 0, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "20": { + "id": 20, + "type": "Rect", + "args": [20, 40, 10, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "21": { + "id": 21, + "type": "Rect", + "args": [21, 36, 1, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "22": { + "id": 22, + "type": "Rect", + "args": [22, 32, 5, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "23": { + "id": 23, + "type": "Rect", + "args": [23, 28, 1, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "24": { + "id": 24, + "type": "Rect", + "args": [24, 24, 11, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "25": { + "id": 25, + "type": "Rect", + "args": [25, 20, 4, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "26": { + "id": 26, + "type": "Rect", + "args": [26, 16, 8, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "27": { + "id": 27, + "type": "Rect", + "args": [27, 12, 11, 2, 6, "#fc5c5c", "#fc5c5c"] + }, + "28": { + "id": 28, + "type": "Rect", + "args": [28, 8, 6, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "29": { + "id": 29, + "type": "Rect", + "args": [29, 4, 5, 2, 6, "#2ec7c9", "#2ec7c9"] + }, + "30": { + "id": 30, + "type": "Rect", + "args": [30, 0, 11, 2, 6, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 131, + "pixelHeight": 19 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 3, + "c": 12, + "index": 4, + "func": [true, "", "=STACKBARSPLINES(K4:L4)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 10, 47, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 0, 145, 8, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 147, + "pixelHeight": 21 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 4, + "c": 12, + "index": 4, + "func": [true, "", "=STACKBARSPLINES(K5:L5)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 0, 10, 125, 8, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 0, 0, 145, 8, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 147, + "pixelHeight": 21 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 8, + "c": 11, + "index": 4, + "func": [true, "", "=BARSPLINES(J9:J11)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 56, 42, 53, 19, "#97b552", "#97b552"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 110, 21, 108, 19, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 89, 0, 20, 19, "#97b552", "#97b552"] + } + }, + "shapeseq": [0, 1, 2], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 221, + "pixelHeight": 63 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 15, + "c": 7, + "index": 4, + "func": [true, "", "=TRISTATESPLINES(H18:N22,10)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 476, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 462, 23, 3, 1, "#999", "#999"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 448, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 434, 23, 3, 1, "#999", "#999"] + }, + "4": { + "id": 4, + "type": "Rect", + "args": [4, 420, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "5": { + "id": 5, + "type": "Rect", + "args": [5, 406, 23, 3, 1, "#999", "#999"] + }, + "6": { + "id": 6, + "type": "Rect", + "args": [6, 392, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "7": { + "id": 7, + "type": "Rect", + "args": [7, 378, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "8": { + "id": 8, + "type": "Rect", + "args": [8, 364, 23, 3, 1, "#999", "#999"] + }, + "9": { + "id": 9, + "type": "Rect", + "args": [9, 350, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "10": { + "id": 10, + "type": "Rect", + "args": [10, 336, 23, 3, 1, "#999", "#999"] + }, + "11": { + "id": 11, + "type": "Rect", + "args": [11, 322, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "12": { + "id": 12, + "type": "Rect", + "args": [12, 308, 23, 3, 1, "#999", "#999"] + }, + "13": { + "id": 13, + "type": "Rect", + "args": [13, 294, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "14": { + "id": 14, + "type": "Rect", + "args": [14, 280, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "15": { + "id": 15, + "type": "Rect", + "args": [15, 266, 23, 3, 1, "#999", "#999"] + }, + "16": { + "id": 16, + "type": "Rect", + "args": [16, 252, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "17": { + "id": 17, + "type": "Rect", + "args": [17, 238, 23, 3, 1, "#999", "#999"] + }, + "18": { + "id": 18, + "type": "Rect", + "args": [18, 224, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "19": { + "id": 19, + "type": "Rect", + "args": [19, 210, 23, 3, 1, "#999", "#999"] + }, + "20": { + "id": 20, + "type": "Rect", + "args": [20, 196, 24, 3, 22, "#97b552", "#97b552"] + }, + "21": { + "id": 21, + "type": "Rect", + "args": [21, 182, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "22": { + "id": 22, + "type": "Rect", + "args": [22, 168, 23, 3, 1, "#999", "#999"] + }, + "23": { + "id": 23, + "type": "Rect", + "args": [23, 154, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "24": { + "id": 24, + "type": "Rect", + "args": [24, 140, 23, 3, 1, "#999", "#999"] + }, + "25": { + "id": 25, + "type": "Rect", + "args": [25, 126, 24, 3, 22, "#97b552", "#97b552"] + }, + "26": { + "id": 26, + "type": "Rect", + "args": [26, 112, 23, 3, 1, "#999", "#999"] + }, + "27": { + "id": 27, + "type": "Rect", + "args": [27, 98, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "28": { + "id": 28, + "type": "Rect", + "args": [28, 84, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "29": { + "id": 29, + "type": "Rect", + "args": [29, 70, 23, 3, 1, "#999", "#999"] + }, + "30": { + "id": 30, + "type": "Rect", + "args": [30, 56, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "31": { + "id": 31, + "type": "Rect", + "args": [31, 42, 23, 3, 1, "#999", "#999"] + }, + "32": { + "id": 32, + "type": "Rect", + "args": [32, 28, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + }, + "33": { + "id": 33, + "type": "Rect", + "args": [33, 14, 23, 3, 1, "#999", "#999"] + }, + "34": { + "id": 34, + "type": "Rect", + "args": [34, 0, 0, 3, 22, "#fc5c5c", "#fc5c5c"] + } + }, + "shapeseq": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 517, + "pixelHeight": 48 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }, { + "r": 22, + "c": 3, + "index": 4, + "func": [true, "", "=STACKCOLUMNSPLINES(B23:C25)", { + "type": "sparklines", + "data": { + "shapes": { + "0": { + "id": 0, + "type": "Rect", + "args": [0, 60, 57, 58, 5, "#2ec7c9", "#2ec7c9"] + }, + "1": { + "id": 1, + "type": "Rect", + "args": [1, 60, 36, 58, 20, "#fc5c5c", "#fc5c5c"] + }, + "2": { + "id": 2, + "type": "Rect", + "args": [2, 60, 27, 58, 8, "#5ab1ef", "#5ab1ef"] + }, + "3": { + "id": 3, + "type": "Rect", + "args": [3, 0, 45, 58, 17, "#2ec7c9", "#2ec7c9"] + }, + "4": { + "id": 4, + "type": "Rect", + "args": [4, 0, 21, 58, 23, "#fc5c5c", "#fc5c5c"] + }, + "5": { + "id": 5, + "type": "Rect", + "args": [5, 0, 3, 58, 17, "#5ab1ef", "#5ab1ef"] + } + }, + "shapeseq": [0, 1, 2, 3, 4, 5], + "offsetX": 0, + "offsetY": 0, + "pixelWidth": 121, + "pixelHeight": 63 + } + }], + "color": "w", + "parent": null, + "chidren": {}, + "times": 0 + }], + "luckysheet_conditionformat_save": [], + "filter_select": null, + "filter": null, + "luckysheet_alternateformat_save": [] +} + +export default sheetSparkline; \ No newline at end of file diff --git a/src/demoData/sheetTable.js b/src/demoData/sheetTable.js new file mode 100644 index 000000000..e398bf1c9 --- /dev/null +++ b/src/demoData/sheetTable.js @@ -0,0 +1,1081 @@ +const sheetTable = { + "name": "Table", + "color": "", + "config": { + "merge": { + "0_1": { + "r": 0, + "c": 1, + "rs": 1, + "cs": 5 + }, + "0_8": { + "r": 0, + "c": 8, + "rs": 1, + "cs": 5 + }, + "8_1": { + "r": 8, + "c": 1, + "rs": 1, + "cs": 5 + }, + "16_1": { + "r": 16, + "c": 1, + "rs": 1, + "cs": 5 + }, + "8_8": { + "r": 8, + "c": 8, + "rs": 1, + "cs": 5 + }, + "16_8": { + "r": 16, + "c": 8, + "rs": 1, + "cs": 5 + } + } + }, + "index": "3", + "chart": [{ + "sheetIndex": "0", + "dataSheetIndex": "0", + "chartType": "column", + "row": "[1,3]", + "column": "[3,3]", + "chartStyle": "default", + "myWidth": "480", + "myHeight": "288", + "myLeft": "67", + "myTop": "11" + }], + "status": "0", + "order": "3", + "column": 18, + "row": 36, + "celldata": [{ + "r": 0, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Table Style - light3, Filter", + "mc": { + "r": 0, + "c": 1, + "rs": 1, + "cs": 5 + }, + "bl": 1, + "m": "Table Style - light3, Filter" + } + }, { + "r": 0, + "c": 2, + "v": { + "mc": { + "r": 0, + "c": 1 + }, + "bl": 1 + } + }, { + "r": 0, + "c": 3, + "v": { + "mc": { + "r": 0, + "c": 1 + }, + "bl": 1 + } + }, { + "r": 0, + "c": 4, + "v": { + "mc": { + "r": 0, + "c": 1 + }, + "bl": 1 + } + }, { + "r": 0, + "c": 5, + "v": { + "mc": { + "r": 0, + "c": 1 + }, + "bl": 1 + } + }, { + "r": 0, + "c": 8, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "mc": { + "r": 0, + "c": 8, + "rs": 1, + "cs": 5 + }, + "bl": 1, + "m": "Table Style - light6", + "v": "Table Style - light6" + } + }, { + "r": 0, + "c": 9, + "v": { + "mc": { + "r": 0, + "c": 8 + } + } + }, { + "r": 0, + "c": 10, + "v": { + "mc": { + "r": 0, + "c": 8 + } + } + }, { + "r": 0, + "c": 11, + "v": { + "mc": { + "r": 0, + "c": 8 + } + } + }, { + "r": 0, + "c": 12, + "v": { + "mc": { + "r": 0, + "c": 8 + } + } + }, { + "r": 1, + "c": 1, + "v": { + "v": "Column1", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column1" + } + }, { + "r": 1, + "c": 2, + "v": { + "v": "Column2", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column2" + } + }, { + "r": 1, + "c": 3, + "v": { + "v": "Column3", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column3" + } + }, { + "r": 1, + "c": 4, + "v": { + "v": "Column4", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column4" + } + }, { + "r": 1, + "c": 5, + "v": { + "v": "Column5", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column5" + } + }, { + "r": 8, + "c": 1, + "v": { + "v": "Table Style - medium3,Header", + "ct": { + "fa": "General", + "t": "g" + }, + "mc": { + "r": 8, + "c": 1, + "rs": 1, + "cs": 5 + }, + "bl": 1, + "m": "Table Style - medium3,Header" + } + }, { + "r": 8, + "c": 2, + "v": { + "mc": { + "r": 8, + "c": 1 + } + } + }, { + "r": 8, + "c": 3, + "v": { + "mc": { + "r": 8, + "c": 1 + } + } + }, { + "r": 8, + "c": 4, + "v": { + "mc": { + "r": 8, + "c": 1 + } + } + }, { + "r": 8, + "c": 5, + "v": { + "mc": { + "r": 8, + "c": 1 + } + } + }, { + "r": 8, + "c": 8, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Table Style - medium8,Footer", + "mc": { + "r": 8, + "c": 8, + "rs": 1, + "cs": 5 + }, + "bl": 1, + "m": "Table Style - medium8,Footer" + } + }, { + "r": 8, + "c": 9, + "v": { + "mc": { + "r": 8, + "c": 8 + } + } + }, { + "r": 8, + "c": 10, + "v": { + "mc": { + "r": 8, + "c": 8 + } + } + }, { + "r": 8, + "c": 11, + "v": { + "mc": { + "r": 8, + "c": 8 + } + } + }, { + "r": 8, + "c": 12, + "v": { + "mc": { + "r": 8, + "c": 8 + } + } + }, { + "r": 9, + "c": 1, + "v": { + "v": "Column1", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column1" + } + }, { + "r": 9, + "c": 2, + "v": { + "v": "Column2", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column2" + } + }, { + "r": 9, + "c": 3, + "v": { + "v": "Column3", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column3" + } + }, { + "r": 9, + "c": 4, + "v": { + "v": "Column4", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column4" + } + }, { + "r": 9, + "c": 5, + "v": { + "v": "Column5", + "ct": { + "fa": "General", + "t": "g" + }, + "m": "Column5" + } + }, { + "r": 16, + "c": 1, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Table Style - medium6,Header,Footer", + "mc": { + "r": 16, + "c": 1, + "rs": 1, + "cs": 5 + }, + "bl": 1, + "m": "Table Style - medium6,Header,Footer" + } + }, { + "r": 16, + "c": 2, + "v": { + "mc": { + "r": 16, + "c": 1 + } + } + }, { + "r": 16, + "c": 3, + "v": { + "mc": { + "r": 16, + "c": 1 + } + } + }, { + "r": 16, + "c": 4, + "v": { + "mc": { + "r": 16, + "c": 1 + } + } + }, { + "r": 16, + "c": 5, + "v": { + "mc": { + "r": 16, + "c": 1 + } + } + }, { + "r": 16, + "c": 8, + "v": { + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Table Style - medium10,Header,Footer", + "mc": { + "r": 16, + "c": 8, + "rs": 1, + "cs": 5 + }, + "bl": 1, + "m": "Table Style - medium10,Header,Footer" + } + }, { + "r": 16, + "c": 9, + "v": { + "mc": { + "r": 16, + "c": 8 + } + } + }, { + "r": 16, + "c": 10, + "v": { + "mc": { + "r": 16, + "c": 8 + } + } + }, { + "r": 16, + "c": 11, + "v": { + "mc": { + "r": 16, + "c": 8 + } + } + }, { + "r": 16, + "c": 12, + "v": { + "mc": { + "r": 16, + "c": 8 + } + } + }, { + "r": 17, + "c": 1, + "v": { + "m": "Column1", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Column1" + } + }, { + "r": 17, + "c": 2, + "v": { + "m": "Column2", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Column2" + } + }, { + "r": 17, + "c": 3, + "v": { + "m": "Column3", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Column3" + } + }, { + "r": 17, + "c": 4, + "v": { + "m": "Column4", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Column4" + } + }, { + "r": 17, + "c": 5, + "v": { + "m": "Column5", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Column5" + } + }, { + "r": 17, + "c": 8, + "v": { + "m": "Name", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Name" + } + }, { + "r": 17, + "c": 9, + "v": { + "m": "Age", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Age" + } + }, { + "r": 17, + "c": 10, + "v": { + "m": "Sex", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Sex" + } + }, { + "r": 17, + "c": 11, + "v": { + "m": "Address", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Address" + } + }, { + "r": 17, + "c": 12, + "v": { + "m": "Score", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Score" + } + }, { + "r": 18, + "c": 8, + "v": { + "m": "bob", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "bob" + } + }, { + "r": 18, + "c": 9, + "v": { + "v": 36, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "36" + } + }, { + "r": 18, + "c": 10, + "v": { + "m": "man", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "man" + } + }, { + "r": 18, + "c": 11, + "v": { + "m": "Beijing", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Beijing" + } + }, { + "r": 18, + "c": 12, + "v": { + "v": 80, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "80" + } + }, { + "r": 19, + "c": 8, + "v": { + "m": "Betty", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Betty" + } + }, { + "r": 19, + "c": 9, + "v": { + "v": 28, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "28" + } + }, { + "r": 19, + "c": 10, + "v": { + "m": "woman", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "woman" + } + }, { + "r": 19, + "c": 11, + "v": { + "m": "Xi'an", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Xi'an" + } + }, { + "r": 19, + "c": 12, + "v": { + "v": 52, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "52" + } + }, { + "r": 20, + "c": 8, + "v": { + "m": "Gary", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Gary" + } + }, { + "r": 20, + "c": 9, + "v": { + "v": 23, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "23" + } + }, { + "r": 20, + "c": 10, + "v": { + "m": "man", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "man" + } + }, { + "r": 20, + "c": 11, + "v": { + "m": "NewYork", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "NewYork" + } + }, { + "r": 20, + "c": 12, + "v": { + "v": 63, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "63" + } + }, { + "r": 21, + "c": 8, + "v": { + "m": "Hunk", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Hunk" + } + }, { + "r": 21, + "c": 9, + "v": { + "v": 45, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "45" + } + }, { + "r": 21, + "c": 10, + "v": { + "m": "man", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "man" + } + }, { + "r": 21, + "c": 11, + "v": { + "m": "Beijing", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Beijing" + } + }, { + "r": 21, + "c": 12, + "v": { + "v": 80, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "80" + } + }, { + "r": 22, + "c": 8, + "v": { + "m": "Cherry", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Cherry" + } + }, { + "r": 22, + "c": 9, + "v": { + "v": 37, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "37" + } + }, { + "r": 22, + "c": 10, + "v": { + "m": "woman", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "woman" + } + }, { + "r": 22, + "c": 11, + "v": { + "m": "Shanghai", + "ct": { + "fa": "General", + "t": "g" + }, + "v": "Shanghai" + } + }, { + "r": 22, + "c": 12, + "v": { + "v": 58, + "ct": { + "fa": "General", + "t": "n" + }, + "m": "58" + } + }], + "visibledatarow": [], + "visibledatacolumn": [], + "ch_width": 4748, + "rh_height": 1790, + "luckysheet_select_save": [{ + "row": [0, 0], + "column": [0, 0] + }], + "luckysheet_selection_range": [], + "scrollLeft": 0, + "scrollTop": 0, + "filter_select": { + "left": 74, + "width": 73, + "top": 20, + "height": 19, + "left_move": 74, + "width_move": 369, + "top_move": 20, + "height_move": 119, + "row": [1, 6], + "column": [1, 5], + "row_focus": 1, + "column_focus": 1 + }, + "luckysheet_alternateformat_save": [{ + "cellrange": { + "row": [1, 6], + "column": [1, 5] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5ed593" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }, + "hasRowHeader": false, + "hasRowFooter": false + }, { + "cellrange": { + "row": [1, 6], + "column": [8, 12] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5599fc" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#ecf2fe" + }, + "foot": { + "fc": "#000", + "bc": "#afcbfa" + } + }, + "hasRowHeader": false, + "hasRowFooter": false + }, { + "cellrange": { + "row": [9, 14], + "column": [1, 5] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5ed593" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }, + "hasRowHeader": true, + "hasRowFooter": false + }, { + "cellrange": { + "row": [17, 22], + "column": [1, 5] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#5599fc" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#ecf2fe" + }, + "foot": { + "fc": "#000", + "bc": "#afcbfa" + } + }, + "hasRowHeader": true, + "hasRowFooter": true + }, { + "cellrange": { + "row": [9, 14], + "column": [8, 12] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#7a939a" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#f0eff7" + }, + "foot": { + "fc": "#000", + "bc": "#bdcad0" + } + }, + "hasRowHeader": false, + "hasRowFooter": true + }, { + "cellrange": { + "row": [17, 22], + "column": [8, 12] + }, + "format": { + "head": { + "fc": "#000", + "bc": "#89c54b" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#f1f7e9" + }, + "foot": { + "fc": "#000", + "bc": "#c5e3a7" + } + }, + "hasRowHeader": true, + "hasRowFooter": true + }], + "luckysheet_alternateformat_save_modelCustom": [{ + "head": { + "fc": "#6aa84f", + "bc": "#ffffff" + }, + "one": { + "fc": "#000", + "bc": "#ffffff" + }, + "two": { + "fc": "#000", + "bc": "#e5fbee" + }, + "foot": { + "fc": "#000", + "bc": "#a5efcc" + } + }] +} + +export default sheetTable; \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.0.js b/src/expendPlugins/chart/chartmix.common.0.js new file mode 100644 index 000000000..950ee01ee --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.0.js @@ -0,0 +1,1034 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[0],{ + +/***/ "2f62": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export Store */ +/* unused harmony export createNamespacedHelpers */ +/* unused harmony export install */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mapActions; }); +/* unused harmony export mapGetters */ +/* unused harmony export mapMutations */ +/* unused harmony export mapState */ +/*! + * vuex v3.4.0 + * (c) 2020 Evan You + * @license MIT + */ +function applyMixin (Vue) { + var version = Number(Vue.version.split('.')[0]); + + if (version >= 2) { + Vue.mixin({ beforeCreate: vuexInit }); + } else { + // override init and inject vuex init procedure + // for 1.x backwards compatibility. + var _init = Vue.prototype._init; + Vue.prototype._init = function (options) { + if ( options === void 0 ) options = {}; + + options.init = options.init + ? [vuexInit].concat(options.init) + : vuexInit; + _init.call(this, options); + }; + } + + /** + * Vuex init hook, injected into each instances init hooks list. + */ + + function vuexInit () { + var options = this.$options; + // store injection + if (options.store) { + this.$store = typeof options.store === 'function' + ? options.store() + : options.store; + } else if (options.parent && options.parent.$store) { + this.$store = options.parent.$store; + } + } +} + +var target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +function devtoolPlugin (store) { + if (!devtoolHook) { return } + + store._devtoolHook = devtoolHook; + + devtoolHook.emit('vuex:init', store); + + devtoolHook.on('vuex:travel-to-state', function (targetState) { + store.replaceState(targetState); + }); + + store.subscribe(function (mutation, state) { + devtoolHook.emit('vuex:mutation', mutation, state); + }, { prepend: true }); + + store.subscribeAction(function (action, state) { + devtoolHook.emit('vuex:action', action, state); + }, { prepend: true }); +} + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ + +/** + * forEach for object + */ +function forEachValue (obj, fn) { + Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); +} + +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} + +function isPromise (val) { + return val && typeof val.then === 'function' +} + +function assert (condition, msg) { + if (!condition) { throw new Error(("[vuex] " + msg)) } +} + +function partial (fn, arg) { + return function () { + return fn(arg) + } +} + +// Base data struct for store's module, package with some attribute and method +var Module = function Module (rawModule, runtime) { + this.runtime = runtime; + // Store some children item + this._children = Object.create(null); + // Store the origin module object which passed by programmer + this._rawModule = rawModule; + var rawState = rawModule.state; + + // Store the origin module's state + this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; +}; + +var prototypeAccessors = { namespaced: { configurable: true } }; + +prototypeAccessors.namespaced.get = function () { + return !!this._rawModule.namespaced +}; + +Module.prototype.addChild = function addChild (key, module) { + this._children[key] = module; +}; + +Module.prototype.removeChild = function removeChild (key) { + delete this._children[key]; +}; + +Module.prototype.getChild = function getChild (key) { + return this._children[key] +}; + +Module.prototype.hasChild = function hasChild (key) { + return key in this._children +}; + +Module.prototype.update = function update (rawModule) { + this._rawModule.namespaced = rawModule.namespaced; + if (rawModule.actions) { + this._rawModule.actions = rawModule.actions; + } + if (rawModule.mutations) { + this._rawModule.mutations = rawModule.mutations; + } + if (rawModule.getters) { + this._rawModule.getters = rawModule.getters; + } +}; + +Module.prototype.forEachChild = function forEachChild (fn) { + forEachValue(this._children, fn); +}; + +Module.prototype.forEachGetter = function forEachGetter (fn) { + if (this._rawModule.getters) { + forEachValue(this._rawModule.getters, fn); + } +}; + +Module.prototype.forEachAction = function forEachAction (fn) { + if (this._rawModule.actions) { + forEachValue(this._rawModule.actions, fn); + } +}; + +Module.prototype.forEachMutation = function forEachMutation (fn) { + if (this._rawModule.mutations) { + forEachValue(this._rawModule.mutations, fn); + } +}; + +Object.defineProperties( Module.prototype, prototypeAccessors ); + +var ModuleCollection = function ModuleCollection (rawRootModule) { + // register root module (Vuex.Store options) + this.register([], rawRootModule, false); +}; + +ModuleCollection.prototype.get = function get (path) { + return path.reduce(function (module, key) { + return module.getChild(key) + }, this.root) +}; + +ModuleCollection.prototype.getNamespace = function getNamespace (path) { + var module = this.root; + return path.reduce(function (namespace, key) { + module = module.getChild(key); + return namespace + (module.namespaced ? key + '/' : '') + }, '') +}; + +ModuleCollection.prototype.update = function update$1 (rawRootModule) { + update([], this.root, rawRootModule); +}; + +ModuleCollection.prototype.register = function register (path, rawModule, runtime) { + var this$1 = this; + if ( runtime === void 0 ) runtime = true; + + if ((false)) {} + + var newModule = new Module(rawModule, runtime); + if (path.length === 0) { + this.root = newModule; + } else { + var parent = this.get(path.slice(0, -1)); + parent.addChild(path[path.length - 1], newModule); + } + + // register nested modules + if (rawModule.modules) { + forEachValue(rawModule.modules, function (rawChildModule, key) { + this$1.register(path.concat(key), rawChildModule, runtime); + }); + } +}; + +ModuleCollection.prototype.unregister = function unregister (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + if (!parent.getChild(key).runtime) { return } + + parent.removeChild(key); +}; + +ModuleCollection.prototype.isRegistered = function isRegistered (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + + return parent.hasChild(key) +}; + +function update (path, targetModule, newModule) { + if ((false)) {} + + // update target module + targetModule.update(newModule); + + // update nested modules + if (newModule.modules) { + for (var key in newModule.modules) { + if (!targetModule.getChild(key)) { + if ((false)) {} + return + } + update( + path.concat(key), + targetModule.getChild(key), + newModule.modules[key] + ); + } + } +} + +var functionAssert = { + assert: function (value) { return typeof value === 'function'; }, + expected: 'function' +}; + +var objectAssert = { + assert: function (value) { return typeof value === 'function' || + (typeof value === 'object' && typeof value.handler === 'function'); }, + expected: 'function or object with "handler" function' +}; + +var assertTypes = { + getters: functionAssert, + mutations: functionAssert, + actions: objectAssert +}; + +function assertRawModule (path, rawModule) { + Object.keys(assertTypes).forEach(function (key) { + if (!rawModule[key]) { return } + + var assertOptions = assertTypes[key]; + + forEachValue(rawModule[key], function (value, type) { + assert( + assertOptions.assert(value), + makeAssertionMessage(path, key, type, value, assertOptions.expected) + ); + }); + }); +} + +function makeAssertionMessage (path, key, type, value, expected) { + var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; + if (path.length > 0) { + buf += " in module \"" + (path.join('.')) + "\""; + } + buf += " is " + (JSON.stringify(value)) + "."; + return buf +} + +var Vue; // bind on install + +var Store = function Store (options) { + var this$1 = this; + if ( options === void 0 ) options = {}; + + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #731 + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + if ((false)) {} + + var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; + var strict = options.strict; if ( strict === void 0 ) strict = false; + + // store internal state + this._committing = false; + this._actions = Object.create(null); + this._actionSubscribers = []; + this._mutations = Object.create(null); + this._wrappedGetters = Object.create(null); + this._modules = new ModuleCollection(options); + this._modulesNamespaceMap = Object.create(null); + this._subscribers = []; + this._watcherVM = new Vue(); + this._makeLocalGettersCache = Object.create(null); + + // bind commit and dispatch to self + var store = this; + var ref = this; + var dispatch = ref.dispatch; + var commit = ref.commit; + this.dispatch = function boundDispatch (type, payload) { + return dispatch.call(store, type, payload) + }; + this.commit = function boundCommit (type, payload, options) { + return commit.call(store, type, payload, options) + }; + + // strict mode + this.strict = strict; + + var state = this._modules.root.state; + + // init root module. + // this also recursively registers all sub-modules + // and collects all module getters inside this._wrappedGetters + installModule(this, state, [], this._modules.root); + + // initialize the store vm, which is responsible for the reactivity + // (also registers _wrappedGetters as computed properties) + resetStoreVM(this, state); + + // apply plugins + plugins.forEach(function (plugin) { return plugin(this$1); }); + + var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools; + if (useDevtools) { + devtoolPlugin(this); + } +}; + +var prototypeAccessors$1 = { state: { configurable: true } }; + +prototypeAccessors$1.state.get = function () { + return this._vm._data.$$state +}; + +prototypeAccessors$1.state.set = function (v) { + if ((false)) {} +}; + +Store.prototype.commit = function commit (_type, _payload, _options) { + var this$1 = this; + + // check object-style commit + var ref = unifyObjectStyle(_type, _payload, _options); + var type = ref.type; + var payload = ref.payload; + var options = ref.options; + + var mutation = { type: type, payload: payload }; + var entry = this._mutations[type]; + if (!entry) { + if ((false)) {} + return + } + this._withCommit(function () { + entry.forEach(function commitIterator (handler) { + handler(payload); + }); + }); + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(function (sub) { return sub(mutation, this$1.state); }); + + if ( + false + ) {} +}; + +Store.prototype.dispatch = function dispatch (_type, _payload) { + var this$1 = this; + + // check object-style dispatch + var ref = unifyObjectStyle(_type, _payload); + var type = ref.type; + var payload = ref.payload; + + var action = { type: type, payload: payload }; + var entry = this._actions[type]; + if (!entry) { + if ((false)) {} + return + } + + try { + this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .filter(function (sub) { return sub.before; }) + .forEach(function (sub) { return sub.before(action, this$1.state); }); + } catch (e) { + if ((false)) {} + } + + var result = entry.length > 1 + ? Promise.all(entry.map(function (handler) { return handler(payload); })) + : entry[0](payload); + + return new Promise(function (resolve, reject) { + result.then(function (res) { + try { + this$1._actionSubscribers + .filter(function (sub) { return sub.after; }) + .forEach(function (sub) { return sub.after(action, this$1.state); }); + } catch (e) { + if ((false)) {} + } + resolve(res); + }, function (error) { + try { + this$1._actionSubscribers + .filter(function (sub) { return sub.error; }) + .forEach(function (sub) { return sub.error(action, this$1.state, error); }); + } catch (e) { + if ((false)) {} + } + reject(error); + }); + }) +}; + +Store.prototype.subscribe = function subscribe (fn, options) { + return genericSubscribe(fn, this._subscribers, options) +}; + +Store.prototype.subscribeAction = function subscribeAction (fn, options) { + var subs = typeof fn === 'function' ? { before: fn } : fn; + return genericSubscribe(subs, this._actionSubscribers, options) +}; + +Store.prototype.watch = function watch (getter, cb, options) { + var this$1 = this; + + if ((false)) {} + return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) +}; + +Store.prototype.replaceState = function replaceState (state) { + var this$1 = this; + + this._withCommit(function () { + this$1._vm._data.$$state = state; + }); +}; + +Store.prototype.registerModule = function registerModule (path, rawModule, options) { + if ( options === void 0 ) options = {}; + + if (typeof path === 'string') { path = [path]; } + + if ((false)) {} + + this._modules.register(path, rawModule); + installModule(this, this.state, path, this._modules.get(path), options.preserveState); + // reset store to update getters... + resetStoreVM(this, this.state); +}; + +Store.prototype.unregisterModule = function unregisterModule (path) { + var this$1 = this; + + if (typeof path === 'string') { path = [path]; } + + if ((false)) {} + + this._modules.unregister(path); + this._withCommit(function () { + var parentState = getNestedState(this$1.state, path.slice(0, -1)); + Vue.delete(parentState, path[path.length - 1]); + }); + resetStore(this); +}; + +Store.prototype.hasModule = function hasModule (path) { + if (typeof path === 'string') { path = [path]; } + + if ((false)) {} + + return this._modules.isRegistered(path) +}; + +Store.prototype.hotUpdate = function hotUpdate (newOptions) { + this._modules.update(newOptions); + resetStore(this, true); +}; + +Store.prototype._withCommit = function _withCommit (fn) { + var committing = this._committing; + this._committing = true; + fn(); + this._committing = committing; +}; + +Object.defineProperties( Store.prototype, prototypeAccessors$1 ); + +function genericSubscribe (fn, subs, options) { + if (subs.indexOf(fn) < 0) { + options && options.prepend + ? subs.unshift(fn) + : subs.push(fn); + } + return function () { + var i = subs.indexOf(fn); + if (i > -1) { + subs.splice(i, 1); + } + } +} + +function resetStore (store, hot) { + store._actions = Object.create(null); + store._mutations = Object.create(null); + store._wrappedGetters = Object.create(null); + store._modulesNamespaceMap = Object.create(null); + var state = store.state; + // init all modules + installModule(store, state, [], store._modules.root, true); + // reset vm + resetStoreVM(store, state, hot); +} + +function resetStoreVM (store, state, hot) { + var oldVm = store._vm; + + // bind store public getters + store.getters = {}; + // reset local getters cache + store._makeLocalGettersCache = Object.create(null); + var wrappedGetters = store._wrappedGetters; + var computed = {}; + forEachValue(wrappedGetters, function (fn, key) { + // use computed to leverage its lazy-caching mechanism + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure environment. + computed[key] = partial(fn, store); + Object.defineProperty(store.getters, key, { + get: function () { return store._vm[key]; }, + enumerable: true // for local getters + }); + }); + + // use a Vue instance to store the state tree + // suppress warnings just in case the user has added + // some funky global mixins + var silent = Vue.config.silent; + Vue.config.silent = true; + store._vm = new Vue({ + data: { + $$state: state + }, + computed: computed + }); + Vue.config.silent = silent; + + // enable strict mode for new vm + if (store.strict) { + enableStrictMode(store); + } + + if (oldVm) { + if (hot) { + // dispatch changes in all subscribed watchers + // to force getter re-evaluation for hot reloading. + store._withCommit(function () { + oldVm._data.$$state = null; + }); + } + Vue.nextTick(function () { return oldVm.$destroy(); }); + } +} + +function installModule (store, rootState, path, module, hot) { + var isRoot = !path.length; + var namespace = store._modules.getNamespace(path); + + // register in namespace map + if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && ("production" !== 'production')) { + console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); + } + store._modulesNamespaceMap[namespace] = module; + } + + // set state + if (!isRoot && !hot) { + var parentState = getNestedState(rootState, path.slice(0, -1)); + var moduleName = path[path.length - 1]; + store._withCommit(function () { + if ((false)) {} + Vue.set(parentState, moduleName, module.state); + }); + } + + var local = module.context = makeLocalContext(store, namespace, path); + + module.forEachMutation(function (mutation, key) { + var namespacedType = namespace + key; + registerMutation(store, namespacedType, mutation, local); + }); + + module.forEachAction(function (action, key) { + var type = action.root ? key : namespace + key; + var handler = action.handler || action; + registerAction(store, type, handler, local); + }); + + module.forEachGetter(function (getter, key) { + var namespacedType = namespace + key; + registerGetter(store, namespacedType, getter, local); + }); + + module.forEachChild(function (child, key) { + installModule(store, rootState, path.concat(key), child, hot); + }); +} + +/** + * make localized dispatch, commit, getters and state + * if there is no namespace, just use root ones + */ +function makeLocalContext (store, namespace, path) { + var noNamespace = namespace === ''; + + var local = { + dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (false) {} + } + + return store.dispatch(type, payload) + }, + + commit: noNamespace ? store.commit : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (false) {} + } + + store.commit(type, payload, options); + } + }; + + // getters and state object must be gotten lazily + // because they will be changed by vm update + Object.defineProperties(local, { + getters: { + get: noNamespace + ? function () { return store.getters; } + : function () { return makeLocalGetters(store, namespace); } + }, + state: { + get: function () { return getNestedState(store.state, path); } + } + }); + + return local +} + +function makeLocalGetters (store, namespace) { + if (!store._makeLocalGettersCache[namespace]) { + var gettersProxy = {}; + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); + }); + store._makeLocalGettersCache[namespace] = gettersProxy; + } + + return store._makeLocalGettersCache[namespace] +} + +function registerMutation (store, type, handler, local) { + var entry = store._mutations[type] || (store._mutations[type] = []); + entry.push(function wrappedMutationHandler (payload) { + handler.call(store, local.state, payload); + }); +} + +function registerAction (store, type, handler, local) { + var entry = store._actions[type] || (store._actions[type] = []); + entry.push(function wrappedActionHandler (payload) { + var res = handler.call(store, { + dispatch: local.dispatch, + commit: local.commit, + getters: local.getters, + state: local.state, + rootGetters: store.getters, + rootState: store.state + }, payload); + if (!isPromise(res)) { + res = Promise.resolve(res); + } + if (store._devtoolHook) { + return res.catch(function (err) { + store._devtoolHook.emit('vuex:error', err); + throw err + }) + } else { + return res + } + }); +} + +function registerGetter (store, type, rawGetter, local) { + if (store._wrappedGetters[type]) { + if ((false)) {} + return + } + store._wrappedGetters[type] = function wrappedGetter (store) { + return rawGetter( + local.state, // local state + local.getters, // local getters + store.state, // root state + store.getters // root getters + ) + }; +} + +function enableStrictMode (store) { + store._vm.$watch(function () { return this._data.$$state }, function () { + if ((false)) {} + }, { deep: true, sync: true }); +} + +function getNestedState (state, path) { + return path.reduce(function (state, key) { return state[key]; }, state) +} + +function unifyObjectStyle (type, payload, options) { + if (isObject(type) && type.type) { + options = payload; + payload = type; + type = type.type; + } + + if ((false)) {} + + return { type: type, payload: payload, options: options } +} + +function install (_Vue) { + if (Vue && _Vue === Vue) { + if ((false)) {} + return + } + Vue = _Vue; + applyMixin(Vue); +} + +/** + * Reduce the code which written in Vue.js for getting the state. + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it. + * @param {Object} + */ +var mapState = normalizeNamespace(function (namespace, states) { + var res = {}; + if (false) {} + normalizeMap(states).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedState () { + var state = this.$store.state; + var getters = this.$store.getters; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapState', namespace); + if (!module) { + return + } + state = module.context.state; + getters = module.context.getters; + } + return typeof val === 'function' + ? val.call(this, state, getters) + : state[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for committing the mutation + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function. + * @return {Object} + */ +var mapMutations = normalizeNamespace(function (namespace, mutations) { + var res = {}; + if (false) {} + normalizeMap(mutations).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedMutation () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + // Get the commit method from store + var commit = this.$store.commit; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); + if (!module) { + return + } + commit = module.context.commit; + } + return typeof val === 'function' + ? val.apply(this, [commit].concat(args)) + : commit.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for getting the getters + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} getters + * @return {Object} + */ +var mapGetters = normalizeNamespace(function (namespace, getters) { + var res = {}; + if (false) {} + normalizeMap(getters).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + // The namespace has been mutated by normalizeNamespace + val = namespace + val; + res[key] = function mappedGetter () { + if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { + return + } + if (false) {} + return this.$store.getters[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for dispatch the action + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function. + * @return {Object} + */ +var mapActions = normalizeNamespace(function (namespace, actions) { + var res = {}; + if (false) {} + normalizeMap(actions).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedAction () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + // get dispatch function from store + var dispatch = this.$store.dispatch; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapActions', namespace); + if (!module) { + return + } + dispatch = module.context.dispatch; + } + return typeof val === 'function' + ? val.apply(this, [dispatch].concat(args)) + : dispatch.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +/** + * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object + * @param {String} namespace + * @return {Object} + */ +var createNamespacedHelpers = function (namespace) { return ({ + mapState: mapState.bind(null, namespace), + mapGetters: mapGetters.bind(null, namespace), + mapMutations: mapMutations.bind(null, namespace), + mapActions: mapActions.bind(null, namespace) +}); }; + +/** + * Normalize the map + * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ] + * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ] + * @param {Array|Object} map + * @return {Object} + */ +function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } + return Array.isArray(map) + ? map.map(function (key) { return ({ key: key, val: key }); }) + : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) +} + +/** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ +function isValidMap (map) { + return Array.isArray(map) || isObject(map) +} + +/** + * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. + * @param {Function} fn + * @return {Function} + */ +function normalizeNamespace (fn) { + return function (namespace, map) { + if (typeof namespace !== 'string') { + map = namespace; + namespace = ''; + } else if (namespace.charAt(namespace.length - 1) !== '/') { + namespace += '/'; + } + return fn(namespace, map) + } +} + +/** + * Search a special module from store by namespace. if module not exist, print error message. + * @param {Object} store + * @param {String} helper + * @param {String} namespace + * @return {Object} + */ +function getModuleByNamespace (store, helper, namespace) { + var module = store._modulesNamespaceMap[namespace]; + if (false) {} + return module +} + +var index = { + Store: Store, + install: install, + version: '3.4.0', + mapState: mapState, + mapMutations: mapMutations, + mapGetters: mapGetters, + mapActions: mapActions, + createNamespacedHelpers: createNamespacedHelpers +}; + +/* unused harmony default export */ var _unused_webpack_default_export = (index); + + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.0.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.0.js.map b/src/expendPlugins/chart/chartmix.common.0.js.map new file mode 100644 index 000000000..fd332a748 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.0.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./node_modules/vuex/dist/vuex.esm.js"],"names":[],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,yBAAyB;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;;AAErB;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG,GAAG,gBAAgB;;AAEtB;AACA;AACA,GAAG,GAAG,gBAAgB;AACtB;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B,EAAE;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B,cAAc,qBAAqB;;AAE7D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,OAAO,KAAqC,GAAG,EAE5C;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO,KAAqC,GAAG,EAE5C;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAqC,GAAG,EAK5C;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,oCAAoC,EAAE;AAClE;AACA;;AAEA;AACA,4BAA4B;AAC5B,uEAAuE,EAAE;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ;;AAER;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAqC,GAAG,EAI5C;;AAEH,gCAAgC;AAChC,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,uBAAuB,EAAE;;AAE9D;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,SAAS,qBAAqB;;AAE1D;AACA;AACA;;AAEA;AACA,OAAO,KAAqC,GAAG,EAE5C;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA,SAAS,KAAqC,GAAG,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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB,EAAE;AACjD;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,8BAA8B,yBAAyB,EAAE;AACzD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kDAAkD,YAAoB;AACtE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAqC,GAAG,EAM5C;AACP;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,KAAgE,EAAE,EAGrE;AACT;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,KAAkE,EAAE,EAGvE;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C,uBAAuB,2CAA2C;AAClE,KAAK;AACL;AACA,wBAAwB,0CAA0C;AAClE;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,SAAS,KAAqC,GAAG,EAE5C;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,4BAA4B;AAC5D,SAAS,KAAqC,GAAG,EAE5C;AACL,GAAG,GAAG,yBAAyB;AAC/B;;AAEA;AACA,4CAA4C,mBAAmB,EAAE;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAqC,GAAG,EAE5C;;AAEH,UAAU;AACV;;AAEA;AACA;AACA,SAAS,KAAqC,GAAG,EAI5C;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW;AACX;AACA;AACA;AACA,MAAM,KAA8D,EAAE,EAEnE;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAAiE,EAAE,EAEtE;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAA+D,EAAE,EAEpE;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,KAAwE,EAAE,EAG7E;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAA+D,EAAE,EAEpE;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,CAAC,EAAE;;AAEH;AACA;AACA,iCAAiC,iBAAiB,GAAG,iBAAiB,GAAG,iBAAiB;AAC1F,iBAAiB,iBAAiB,QAAQ,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB;AACzG,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU,qBAAqB,EAAE,EAAE;AACjE,2CAA2C,UAAU,0BAA0B,EAAE,EAAE;AACnF;;AAEA;AACA;AACA,WAAW,EAAE;AACb,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAAkD,EAAE,EAEvD;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,+EAAK,EAAC;AAC8E","file":"chartmix.common.0.js","sourcesContent":["/*!\n * vuex v3.4.0\n * (c) 2020 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.hasChild = function hasChild (key) {\n return key in this._children\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nModuleCollection.prototype.isRegistered = function isRegistered (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n\n return parent.hasChild(key)\n};\n\nfunction update (path, targetModule, newModule) {\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n this._makeLocalGettersCache = Object.create(null);\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n\n this._subscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n (process.env.NODE_ENV !== 'production') &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return new Promise(function (resolve, reject) {\n result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n resolve(res);\n }, function (error) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.error; })\n .forEach(function (sub) { return sub.error(action, this$1.state, error); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in error action subscribers: \");\n console.error(e);\n }\n }\n reject(error);\n });\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn, options) {\n return genericSubscribe(fn, this._subscribers, options)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn, options) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers, options)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hasModule = function hasModule (path) {\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n return this._modules.isRegistered(path)\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs, options) {\n if (subs.indexOf(fn) < 0) {\n options && options.prepend\n ? subs.unshift(fn)\n : subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n // reset local getters cache\n store._makeLocalGettersCache = Object.create(null);\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldVm.\n // using partial to return function with only arguments preserved in closure environment.\n computed[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n if (store._modulesNamespaceMap[namespace] && (process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate namespace \" + namespace + \" for the namespaced module \" + (path.join('/'))));\n }\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n if ((process.env.NODE_ENV !== 'production')) {\n if (moduleName in parentState) {\n console.warn(\n (\"[vuex] state field \\\"\" + moduleName + \"\\\" was overridden by a module with the same name at \\\"\" + (path.join('.')) + \"\\\"\")\n );\n }\n }\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n if (!store._makeLocalGettersCache[namespace]) {\n var gettersProxy = {};\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n store._makeLocalGettersCache[namespace] = gettersProxy;\n }\n\n return store._makeLocalGettersCache[namespace]\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.reduce(function (state, key) { return state[key]; }, state)\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(states)) {\n console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(mutations)) {\n console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(getters)) {\n console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if ((process.env.NODE_ENV !== 'production') && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(actions)) {\n console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n if (!isValidMap(map)) {\n return []\n }\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Validate whether given map is valid or not\n * @param {*} map\n * @return {Boolean}\n */\nfunction isValidMap (map) {\n return Array.isArray(map) || isObject(map)\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if ((process.env.NODE_ENV !== 'production') && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index = {\n Store: Store,\n install: install,\n version: '3.4.0',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\nexport default index;\nexport { Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState };\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.1.js b/src/expendPlugins/chart/chartmix.common.1.js new file mode 100644 index 000000000..06687628d --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.1.js @@ -0,0 +1,161 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[1],{ + +/***/ "1847": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a9e3"); +/* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ __webpack_exports__["a"] = ({ + name: "chart-base-slider", + props: { + baseSliderOption: Number, + unit: String, + // % or px + min: { + type: Number, + default: 0 + }, + max: { + type: Number, + default: 100 + }, + content: { + type: String, + default: "滑动修改值大小" + }, + hideCol: false, + format: [Function, String] + }, + data: function data() { + return { + baseSliderData: 12 + }; + }, + mounted: function mounted() { + this.baseSliderData = this.baseSliderOption; + }, + methods: { + handlerChange: function handlerChange(value) { + this.$emit("update:baseSliderOption", value); + }, + formatter: function formatter(val) { + eval(this.format); + } + } +}); + +/***/ }), + +/***/ "6999": +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "9470": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6999"); +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); + +/***/ }), + +/***/ "b57e": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=template&id=609b7952& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticClass:"chart-base-slider",staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":22}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":_vm.content,"placement":"top"}},[_c('el-slider',{staticStyle:{"padding-left":"12px"},attrs:{"show-input-controls":false,"min":_vm.min,"max":_vm.max,"input-size":"mini","show-input":"","format-tooltip":_vm.format?_vm.formatter:null},on:{"change":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:"baseSliderData"}})],1)],1),_c('el-col',{staticClass:"input_content",attrs:{"span":1}},[_vm._v(_vm._s(_vm.unit))])],1):_c('el-row',{staticClass:"chart-base-slider",staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":17}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":_vm.content,"placement":"top"}},[_c('el-slider',{staticStyle:{"padding-left":"12px"},attrs:{"show-input-controls":false,"min":_vm.min,"max":_vm.max,"input-size":"mini","show-input":"","format-tooltip":_vm.format?_vm.formatter:null},on:{"change":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:"baseSliderData"}})],1)],1),_c('el-col',{staticClass:"input_content",attrs:{"span":1}},[_vm._v(_vm._s(_vm.unit))])],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=template&id=609b7952& + +// EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=script&lang=js& +var ChartBaseSlidervue_type_script_lang_js_ = __webpack_require__("1847"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSlidervue_type_script_lang_js_ = (ChartBaseSlidervue_type_script_lang_js_["a" /* default */]); +// EXTERNAL MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=style&index=0&lang=css& +var ChartBaseSlidervue_type_style_index_0_lang_css_ = __webpack_require__("9470"); + +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue + + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSlidervue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSlider = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.1.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.1.js.map b/src/expendPlugins/chart/chartmix.common.1.js.map new file mode 100644 index 000000000..9fd78ff14 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.1.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?8675","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?135a","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?4399","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?dbc7","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA;AACA,2BADA;AAEA;AACA,4BADA;AAEA,gBAFA;AAEA;AACA;AACA,kBADA;AAEA;AAFA,KAHA;AAOA;AACA,kBADA;AAEA;AAFA,KAPA;AAWA;AACA,kBADA;AAEA;AAFA,KAXA;AAeA,kBAfA;AAgBA;AAhBA,GAFA;AAoBA,MApBA,kBAoBA;AACA;AACA;AADA;AAGA,GAxBA;AAyBA,SAzBA,qBAyBA;AACA;AACA,GA3BA;AA4BA;AACA,iBADA,yBACA,KADA,EACA;AACA;AACA,KAHA;AAIA,aAJA,qBAIA,GAJA,EAIA;AACA;AACA;AANA;AA5BA,G;;;;;;;AC3CA,uC;;;;;;;;ACAA;AAAA;AAAA;AAA4f,CAAgB,ofAAG,EAAC,C;;;;;;;;;;;;ACAhhB,0BAA0B,aAAa,0BAA0B,wBAAwB,6CAA6C,6CAA6C,qBAAqB,eAAe,OAAO,WAAW,mBAAmB,OAAO,0DAA0D,kBAAkB,aAAa,sBAAsB,QAAQ,2IAA2I,KAAK,2BAA2B,QAAQ,oDAAoD,uBAAuB,8BAA8B,uBAAuB,mCAAmC,UAAU,8CAA8C,6CAA6C,qBAAqB,eAAe,OAAO,UAAU,mCAAmC,OAAO,WAAW,mBAAmB,OAAO,0DAA0D,kBAAkB,aAAa,sBAAsB,QAAQ,2IAA2I,KAAK,2BAA2B,QAAQ,oDAAoD,uBAAuB,8BAA8B,uBAAuB,mCAAmC,UAAU;AACh5C;;;;;;;;;ACDsX,CAAgB,2IAAG,EAAC,C;;;;;;;;ACA5S;AAC3B;AACL;AACa;;;AAG3E;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.common.1.js","sourcesContent":["\r\n\r\n\r\n\r\n\r\n\r\n","// extracted by mini-css-extract-plugin","import mod from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticClass:\"chart-base-slider\",staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":_vm.content,\"placement\":\"top\"}},[_c('el-slider',{staticStyle:{\"padding-left\":\"12px\"},attrs:{\"show-input-controls\":false,\"min\":_vm.min,\"max\":_vm.max,\"input-size\":\"mini\",\"show-input\":\"\",\"format-tooltip\":_vm.format?_vm.formatter:null},on:{\"change\":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:\"baseSliderData\"}})],1)],1),_c('el-col',{staticClass:\"input_content\",attrs:{\"span\":1}},[_vm._v(_vm._s(_vm.unit))])],1):_c('el-row',{staticClass:\"chart-base-slider\",staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":17}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":_vm.content,\"placement\":\"top\"}},[_c('el-slider',{staticStyle:{\"padding-left\":\"12px\"},attrs:{\"show-input-controls\":false,\"min\":_vm.min,\"max\":_vm.max,\"input-size\":\"mini\",\"show-input\":\"\",\"format-tooltip\":_vm.format?_vm.formatter:null},on:{\"change\":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:\"baseSliderData\"}})],1)],1),_c('el-col',{staticClass:\"input_content\",attrs:{\"span\":1}},[_vm._v(_vm._s(_vm.unit))])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSlider.vue?vue&type=template&id=609b7952&\"\nimport script from \"./ChartBaseSlider.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSlider.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.10.js b/src/expendPlugins/chart/chartmix.common.10.js new file mode 100644 index 000000000..93493f9ba --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.10.js @@ -0,0 +1,91 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[10],{ + +/***/ "138b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=template&id=6331a3cc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.hideCol)?_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("select")],2),_c('el-col',{attrs:{"span":16}},[_c('el-tooltip',{attrs:{"disabled":!_vm.tooltip,"open-delay":500,"content":_vm.tooltip,"effect":"dark","placement":"bottom"}},[_c('el-select',{attrs:{"size":"mini"},on:{"change":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:"select"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.label,"value":item.value}})}),1)],1)],1)],1):_c('el-tooltip',{attrs:{"disabled":!_vm.tooltip,"open-delay":500,"content":_vm.tooltip,"effect":"dark","placement":"bottom"}},[_c('el-select',{attrs:{"size":"mini"},on:{"change":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:"select"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.label,"value":item.value}})}),1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=template&id=6331a3cc& + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js +var es_number_constructor = __webpack_require__("a9e3"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseSelectvue_type_script_lang_js_ = ({ + props: { + selectOption: Array, + tooltip: String, + selectValue: [String, Number, Array], + hideCol: Boolean + }, + data: function data() { + return { + select: '' + }; + }, + mounted: function mounted() { + this.select = this.selectValue; + }, + methods: { + changeSelect: function changeSelect(val) { + this.$emit('update:selectValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSelectvue_type_script_lang_js_ = (ChartBaseSelectvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSelectvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSelect = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.10.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.10.js.map b/src/expendPlugins/chart/chartmix.common.10.js.map new file mode 100644 index 000000000..4dcbeee0a --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.10.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?57e3","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?da35","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,mCAAmC,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,oCAAoC,OAAO,WAAW,mBAAmB,OAAO,qGAAqG,kBAAkB,OAAO,cAAc,KAAK,0BAA0B,QAAQ,4CAA4C,eAAe,sBAAsB,4CAA4C,uBAAuB,aAAa,uCAAuC,EAAE,kCAAkC,OAAO,qGAAqG,kBAAkB,OAAO,cAAc,KAAK,0BAA0B,QAAQ,4CAA4C,eAAe,sBAAsB,4CAA4C,uBAAuB,aAAa,uCAAuC,EAAE;AACrkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmBA;AACA;AACA,uBADA;AAEA,mBAFA;AAGA,wCAHA;AAIA;AAJA,GADA;AAOA,MAPA,kBAOA;AACA;AACA;AADA;AAGA,GAXA;AAYA,SAZA,qBAYA;AACA;AACA,GAdA;AAeA;AACA,gBADA,wBACA,GADA,EACA;AACA;AACA;AAHA;AAfA,G;;ACpBsX,CAAgB,wHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG9D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.common.10.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.hideCol)?_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"select\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-tooltip',{attrs:{\"disabled\":!_vm.tooltip,\"open-delay\":500,\"content\":_vm.tooltip,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-select',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:\"select\"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{\"label\":item.label,\"value\":item.value}})}),1)],1)],1)],1):_c('el-tooltip',{attrs:{\"disabled\":!_vm.tooltip,\"open-delay\":500,\"content\":_vm.tooltip,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-select',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:\"select\"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{\"label\":item.label,\"value\":item.value}})}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSelect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSelect.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSelect.vue?vue&type=template&id=6331a3cc&\"\nimport script from \"./ChartBaseSelect.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSelect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.11.js b/src/expendPlugins/chart/chartmix.common.11.js new file mode 100644 index 000000000..20f52ae52 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.11.js @@ -0,0 +1,82 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[11],{ + +/***/ "9e1a": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":16}},[_c('el-switch',{attrs:{"active-color":"#13ce66","inactive-color":"#d8d8d8"},on:{"change":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:"switchData"}})],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseSwitchvue_type_script_lang_js_ = ({ + name: "chart-base-switch", + props: { + switchValue: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + switchData: false + }; + }, + mounted: function mounted() { + this.switchData = this.switchValue ? this.switchValue : false; + }, + methods: { + changeSwitch: function changeSwitch(val) { + this.$emit('update:switchValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSwitchvue_type_script_lang_js_ = (ChartBaseSwitchvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSwitchvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSwitch = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.11.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.11.js.map b/src/expendPlugins/chart/chartmix.common.11.js.map new file mode 100644 index 000000000..a31e2cbb9 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.11.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?d947","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?b3a8","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,oBAAoB,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,kBAAkB,OAAO,oDAAoD,KAAK,0BAA0B,QAAQ,gDAAgD,mBAAmB,0BAA0B;AACzc;;;;;;;;;;;;;;;;;;;ACaA;AACA,2BADA;AAEA;AACA;AACA,mBADA;AAEA;AAFA;AADA,GAFA;AAQA,MARA,kBAQA;AACA;AACA;AADA;AAGA,GAZA;AAaA,SAbA,qBAaA;AACA;AACA,GAfA;AAgBA;AACA,gBADA,wBACA,GADA,EACA;AACA;AACA;AAHA;AAhBA,G;;ACdsX,CAAgB,wHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG9D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.common.11.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-switch',{attrs:{\"active-color\":\"#13ce66\",\"inactive-color\":\"#d8d8d8\"},on:{\"change\":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:\"switchData\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSwitch.vue?vue&type=template&id=c152a4dc&\"\nimport script from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.12.js b/src/expendPlugins/chart/chartmix.common.12.js new file mode 100644 index 000000000..9798ffe63 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.12.js @@ -0,0 +1,82 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[12],{ + +/***/ "9e1a": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":16}},[_c('el-switch',{attrs:{"active-color":"#13ce66","inactive-color":"#d8d8d8"},on:{"change":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:"switchData"}})],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseSwitchvue_type_script_lang_js_ = ({ + name: "chart-base-switch", + props: { + switchValue: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + switchData: false + }; + }, + mounted: function mounted() { + this.switchData = this.switchValue ? this.switchValue : false; + }, + methods: { + changeSwitch: function changeSwitch(val) { + this.$emit('update:switchValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSwitchvue_type_script_lang_js_ = (ChartBaseSwitchvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSwitchvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSwitch = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.12.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.12.js.map b/src/expendPlugins/chart/chartmix.common.12.js.map new file mode 100644 index 000000000..36c76be3e --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.12.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?d947","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?b3a8","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,oBAAoB,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,kBAAkB,OAAO,oDAAoD,KAAK,0BAA0B,QAAQ,gDAAgD,mBAAmB,0BAA0B;AACzc;;;;;;;;;;;;;;;;;;;ACaA;AACA,2BADA;AAEA;AACA;AACA,mBADA;AAEA;AAFA;AADA,GAFA;AAQA,MARA,kBAQA;AACA;AACA;AADA;AAGA,GAZA;AAaA,SAbA,qBAaA;AACA;AACA,GAfA;AAgBA;AACA,gBADA,wBACA,GADA,EACA;AACA;AACA;AAHA;AAhBA,G;;ACdsX,CAAgB,wHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG9D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.common.12.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-switch',{attrs:{\"active-color\":\"#13ce66\",\"inactive-color\":\"#d8d8d8\"},on:{\"change\":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:\"switchData\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSwitch.vue?vue&type=template&id=c152a4dc&\"\nimport script from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.2.js b/src/expendPlugins/chart/chartmix.common.2.js new file mode 100644 index 000000000..b9d4e5b92 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.2.js @@ -0,0 +1,212 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[2],{ + +/***/ "02ce": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=template&id=e2628114& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":16}},[_c('chart-base-box',{attrs:{"boxData":_vm.baseLabelOptionData.fontGroup,"checkboxOption":_vm.fontStyleObj},on:{"update:boxData":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontGroup", $event)},"update:box-data":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontGroup", $event)}}}),_c('el-row',{staticStyle:{"margin-top":"5px"}},[_c('el-col',{attrs:{"span":12}},[_c('chart-base-select',{attrs:{"hideCol":true,"tooltip":'选择字体大小',"selectOption":_vm.fontSizeList,"selectValue":_vm.baseLabelOptionData.fontSize},on:{"update:selectValue":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontSize", $event)},"update:select-value":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontSize", $event)}}})],1),_c('el-col',{attrs:{"span":8,"offset":2}},[_c('el-color-picker',{attrs:{"size":"mini"},on:{"change":_vm.changeStyle},model:{value:(_vm.baseLabelOptionData.color),callback:function ($$v) {_vm.$set(_vm.baseLabelOptionData, "color", $$v)},expression:"baseLabelOptionData.color"}})],1)],1)],1)],1),(_vm.baseLabelOptionData.fontSize === 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.baseLabelOptionData.cusFontSize,"unit":'px',"content":'滑动修改字体大小'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.baseLabelOptionData, "cusFontSize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.baseLabelOptionData, "cusFontSize", $event)}}}):_vm._e()],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=template&id=e2628114& + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js +var es_array_includes = __webpack_require__("caad"); + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js +var es_string_includes = __webpack_require__("2532"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=script&lang=js& + + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartBaseLabelvue_type_script_lang_js_ = ({ + name: 'chart-base-label', + props: { + router: String, + baseLabelOption: Object + }, + components: { + 'chart-base-slider': importUtil["ChartBaseSlider"], + 'chart-base-select': importUtil["ChartBaseSelect"], + 'chart-base-box': importUtil["ChartBaseBox"] + }, + data: function data() { + return { + baseLabelOptionData: {}, + //整个label设置 + fontSizeList: importUtil["deepCopy"](chartJson["e" /* fontSizeList */]), + //位置选择数组 + fontStyleObj: {} //字体样式:数据=>DOM转换 + + }; + }, + watch: { + baseLabelOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.baseLabelOptionData, newVal)) { + return; + } + + this.baseLabelOptionData = importUtil["deepCopy"](newVal); //传过来的值需要深拷贝防止数据流向父组件传递 + //根据在不同的组件内渲染不同的结构 + + if (this.router.includes('title')) { + //在主标题/副标题组件内 + this.fontStyleObj = importUtil["deepCopy"](chartJson["h" /* fontStyleIBV */]); + } else { + //鼠标提示组件内 + this.fontStyleObj = importUtil["deepCopy"](chartJson["g" /* fontStyleIB */]); + } + }, + immediate: true, + deep: true + }, + baseLabelOptionData: { + handler: function handler(newVal, oldVal) { + if (oldVal) { + this.changeStyle(); + } + }, + immediate: true, + deep: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeStyle: function changeStyle() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.baseLabelOptionData), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseLabelvue_type_script_lang_js_ = (ChartBaseLabelvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseLabelvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseLabel = __webpack_exports__["default"] = (component.exports); + +/***/ }), + +/***/ "2532": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__("23e7"); +var notARegExp = __webpack_require__("5a34"); +var requireObjectCoercible = __webpack_require__("1d80"); +var correctIsRegExpLogic = __webpack_require__("ab13"); + +// `String.prototype.includes` method +// https://tc39.github.io/ecma262/#sec-string.prototype.includes +$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { + includes: function includes(searchString /* , position = 0 */) { + return !!~String(requireObjectCoercible(this)) + .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "5a34": +/***/ (function(module, exports, __webpack_require__) { + +var isRegExp = __webpack_require__("44e7"); + +module.exports = function (it) { + if (isRegExp(it)) { + throw TypeError("The method doesn't accept regular expressions"); + } return it; +}; + + +/***/ }), + +/***/ "ab13": +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__("b622"); + +var MATCH = wellKnownSymbol('match'); + +module.exports = function (METHOD_NAME) { + var regexp = /./; + try { + '/./'[METHOD_NAME](regexp); + } catch (e) { + try { + regexp[MATCH] = false; + return '/./'[METHOD_NAME](regexp); + } catch (f) { /* empty */ } + } return false; +}; + + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.2.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.2.js.map b/src/expendPlugins/chart/chartmix.common.2.js.map new file mode 100644 index 000000000..0a56ab747 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?eeeb","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?3060","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue","webpack://chartmix/./node_modules/core-js/modules/es.string.includes.js","webpack://chartmix/./node_modules/core-js/internals/not-a-regexp.js","webpack://chartmix/./node_modules/core-js/internals/correct-is-regexp-logic.js"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,8BAA8B,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OA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AC,MAAsC;;AAEzE;AACA;AACA,GAAG,2EAA2E;AAC9E;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACbD,eAAe,mBAAO,CAAC,MAAwB;;AAE/C;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACNA,sBAAsB,mBAAO,CAAC,MAAgC;;AAE9D;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK,YAAY;AACjB,GAAG;AACH","file":"chartmix.common.2.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('chart-base-box',{attrs:{\"boxData\":_vm.baseLabelOptionData.fontGroup,\"checkboxOption\":_vm.fontStyleObj},on:{\"update:boxData\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontGroup\", $event)},\"update:box-data\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontGroup\", $event)}}}),_c('el-row',{staticStyle:{\"margin-top\":\"5px\"}},[_c('el-col',{attrs:{\"span\":12}},[_c('chart-base-select',{attrs:{\"hideCol\":true,\"tooltip\":'选择字体大小',\"selectOption\":_vm.fontSizeList,\"selectValue\":_vm.baseLabelOptionData.fontSize},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontSize\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontSize\", $event)}}})],1),_c('el-col',{attrs:{\"span\":8,\"offset\":2}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeStyle},model:{value:(_vm.baseLabelOptionData.color),callback:function ($$v) {_vm.$set(_vm.baseLabelOptionData, \"color\", $$v)},expression:\"baseLabelOptionData.color\"}})],1)],1)],1)],1),(_vm.baseLabelOptionData.fontSize === 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.baseLabelOptionData.cusFontSize,\"unit\":'px',\"content\":'滑动修改字体大小'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"cusFontSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"cusFontSize\", $event)}}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseLabel.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseLabel.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseLabel.vue?vue&type=template&id=e2628114&\"\nimport script from \"./ChartBaseLabel.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseLabel.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.3.js b/src/expendPlugins/chart/chartmix.common.3.js new file mode 100644 index 000000000..fc3b0288c --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.3.js @@ -0,0 +1,476 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[3],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "e078": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=template&id=728665dc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"6","title":"XY轴设置"}},[_c('chart-base-select',{attrs:{"selectOption":_vm.axisGroup,"selectValue":_vm.axis.axisType},on:{"update:selectValue":function($event){return _vm.$set(_vm.axis, "axisType", $event)},"update:select-value":function($event){return _vm.$set(_vm.axis, "axisType", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("选择坐标轴")])]),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v(_vm._s(_vm.series.name))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.show),expression:"series.show"}]},[_c('chart-base-input',{attrs:{"inputValue":_vm.series.title.text,"placeholder":'请输入标题内容'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.title, "text", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.title, "text", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("标题内容")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.title.text),expression:"series.title.text"}],staticStyle:{"margin-top":"15px"}},[_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.series.title.label},on:{"update:baseLabelOption":function($event){return _vm.$set(_vm.series.title, "label", $event)},"update:base-label-option":function($event){return _vm.$set(_vm.series.title, "label", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("文本样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.fzPosOption,"selectValue":_vm.series.title.fzPosition},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.title, "fzPosition", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.title, "fzPosition", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("文本对齐方式")])])],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.inverse},on:{"update:switchValue":function($event){return _vm.$set(_vm.series, "inverse", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series, "inverse", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("反向坐标轴")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"max":10,"baseSliderOption":_vm.series.tickLabel.optimize,"unit":'个',"content":'滑动修改坐标轴间隔个数'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tickLabel, "optimize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tickLabel, "optimize", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("坐标轴间隔个数")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.title.text),expression:"series.title.text"}]},[_c('chart-base-slider',{attrs:{"hideCol":true,"baseSliderOption":_vm.series.title.nameGap,"unit":'px',"content":'滑动修改标题与轴线距离'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.title, "nameGap", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.title, "nameGap", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("标题与轴线距离")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"format":_vm.formatRotation+'',"max":180,"min":-180,"baseSliderOption":_vm.series.title.rotate,"unit":'°',"content":'滑动修改标题与轴线距离'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.title, "rotate", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.title, "rotate", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("倾斜轴标题")])])],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.tickLine.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.tickLine, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.tickLine, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示刻度线")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"min":1,"baseSliderOption":_vm.series.tickLine.width,"unit":'px',"content":'滑动修改刻度线宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tickLine, "width", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tickLine, "width", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("刻度线宽度")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":7}},[_vm._v("刻度线颜色")]),_c('el-col',{attrs:{"push":14,"span":3}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":"刻度线颜色","effect":"dark","placement":"bottom"}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.tickLine.color),callback:function ($$v) {_vm.$set(_vm.series.tickLine, "color", $$v)},expression:"series.tickLine.color"}})],1)],1)],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.tick.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.tick, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.tick, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示刻度")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.orient,"selectValue":_vm.series.tick.position},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.tick, "position", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.tick, "position", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("刻度位置")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"min":1,"baseSliderOption":_vm.series.tick.length,"unit":'px',"content":'滑动修改刻度长度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tick, "length", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tick, "length", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("刻度长度")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"max":20,"min":1,"baseSliderOption":_vm.series.tick.width,"unit":'px',"content":'滑动修改刻度宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tick, "width", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tick, "width", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("刻度宽度")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":6}},[_vm._v("刻度颜色")]),_c('el-col',{attrs:{"push":14,"span":4}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":"刻度颜色","effect":"dark","placement":"bottom"}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.tick.color),callback:function ($$v) {_vm.$set(_vm.series.tick, "color", $$v)},expression:"series.tick.color"}})],1)],1)],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.tickLabel.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.tickLabel, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.tickLabel, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示刻度标签")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"format":_vm.formatRotation,"max":180,"min":-180,"baseSliderOption":_vm.series.tickLabel.rotate,"unit":'°',"content":'滑动修改标签倾斜角度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tickLabel, "rotate", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tickLabel, "rotate", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("倾斜标签")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showLabel),expression:"showLabel"}]},[_c('chart-base-input',{attrs:{"type":'text',"inputValue":_vm.series.tickLabel.min,"placeholder":'请输入刻度最小值'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "min", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "min", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("刻度最小值")])]),_c('chart-base-input',{attrs:{"type":'text',"inputValue":_vm.series.tickLabel.max,"placeholder":'请输入刻度最大值且最大值不能小于最小值'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "max", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "max", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("刻度最大值")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.ratioOption,"selectValue":_vm.series.tickLabel.ratio},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.tickLabel, "ratio", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.tickLabel, "ratio", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("数值缩放比例")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.digitOption,"selectValue":_vm.series.tickLabel.digit},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.tickLabel, "digit", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.tickLabel, "digit", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("小数位数")])])],1),_c('chart-base-input',{attrs:{"inputValue":_vm.series.tickLabel.prefix,"placeholder":'请输入标签前缀'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "prefix", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "prefix", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("标签前缀")])]),_c('chart-base-input',{attrs:{"inputValue":_vm.series.tickLabel.suffix,"placeholder":'请输入标签后缀'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "suffix", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "suffix", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("标签后缀")])]),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.netLine.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.netLine, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.netLine, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示网格线")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.netLine.show),expression:"series.netLine.show"}]},[_c('chart-base-slider',{attrs:{"hideCol":true,"max":20,"min":1,"baseSliderOption":_vm.series.netLine.width,"unit":'px',"content":'滑动修改网格线宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.netLine, "width", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.netLine, "width", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("网格线宽度")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.lineStyleOption,"selectValue":_vm.series.netLine.type},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.netLine, "type", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.netLine, "type", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("网格线类型")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._v("网格线颜色")]),_c('el-col',{attrs:{"push":13,"span":3}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":"网格线颜色","effect":"dark","placement":"bottom"}},[_c('el-color-picker',{attrs:{"label":true,"size":"mini"},model:{value:(_vm.series.netLine.color),callback:function ($$v) {_vm.$set(_vm.series.netLine, "color", $$v)},expression:"series.netLine.color"}})],1)],1)],1),_c('chart-base-select',{attrs:{"selectOption":_vm.intervalOption,"selectValue":_vm.series.netLine.interval.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.netLine.interval, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.netLine.interval, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("网格线分割间隔数")])]),(_vm.series.netLine.interval.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.series.netLine.interval.cusNumber,"unit":'个',"content":'滑动修改间隔数'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.netLine.interval, "cusNumber", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.netLine.interval, "cusNumber", $event)}}}):_vm._e()],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.netArea.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.netArea, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.netArea, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示网格区域")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.netArea.show),expression:"series.netArea.show"}]},[_c('chart-base-select',{attrs:{"selectOption":_vm.intervalOption,"selectValue":_vm.series.netArea.interval.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.netArea.interval, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.netArea.interval, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("网格区域分割间隔数")])]),(_vm.series.netArea.interval.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.series.netArea.interval.cusNumber,"unit":'个',"content":'滑动修改间隔数'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.netArea.interval, "cusNumber", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.netArea.interval, "cusNumber", $event)}}}):_vm._e(),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v("网格区域第一颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.netArea.colorOne),callback:function ($$v) {_vm.$set(_vm.series.netArea, "colorOne", $$v)},expression:"series.netArea.colorOne"}})],1),_c('el-col',{attrs:{"span":6}},[_vm._v("网格区域第二颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.netArea.colorTwo),callback:function ($$v) {_vm.$set(_vm.series.netArea, "colorTwo", $$v)},expression:"series.netArea.colorTwo"}})],1)],1)],1)],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=template&id=728665dc& + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js +var es_array_slice = __webpack_require__("fb6a"); + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js +var es_regexp_exec = __webpack_require__("ac1f"); + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js +var es_string_split = __webpack_require__("1276"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=script&lang=js& + + + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartAxisvue_type_script_lang_js_ = ({ + name: 'ChartXaxis', + props: { + chartAllType: String, + axisOption: Object, + router: String + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + data: function data() { + return { + axis: {}, + series: {}, + //具体坐标轴配置 + fontSizeOption: '', + lineStyleOption: '', + ratioOption: '', + digitOption: '', + fzPosOption: [{ + value: 'middle', + label: '居中' + }, { + value: 'start', + label: '头部' + }, { + value: 'end', + label: '尾部' + }, { + value: 'hidden', + label: '隐藏' + }], + orient: [{ + label: '朝内', + value: 'inside' + }, { + label: '朝外', + value: 'outside' + }], + formatRotation: function formatRotation(val) { + return val + ' °'; + } + }; + }, + watch: { + axisOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.axis, this.axisOption)) { + return; + } + + this.axis = importUtil["deepCopy"](this.axisOption); + this.series = this.axis[newVal.axisType]; + this.fontSizeOption = importUtil["deepCopy"](chartJson["f" /* fontSizeOption */]); + this.lineStyleOption = importUtil["deepCopy"](chartJson["j" /* lineStyleOption */]); + this.intervalOption = importUtil["deepCopy"](chartJson["i" /* intervalOption */]); + this.ratioOption = importUtil["deepCopy"](chartJson["n" /* ratioOption */]); + this.digitOption = importUtil["deepCopy"](chartJson["c" /* digitOption */]); + }, + immediate: true, + deep: true + }, + series: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeAxis(); + } + }, + deep: true, + immediate: true + } + }, + computed: { + chartType: function chartType() { + return this.chartAllType.split('|')[1]; + }, + chartStyle: function chartStyle() { + return this.chartAllType.split('|')[2]; + }, + axisGroup: function axisGroup() { + if (this.chartType == 'bar' && this.chartStyle != 'compare') { + return [{ + value: 'xAxisDown', + label: 'Y轴(左侧垂直)' + }, { + value: 'xAxisUp', + label: 'Y轴(左侧垂直)' + }, { + value: 'yAxisLeft', + label: 'X轴(下方水平)' + }, { + value: 'yAxisRight', + label: 'X轴(上方水平)' + }]; + } else if (this.chartStyle == 'compare') { + return [{ + value: 'xAxisDown', + label: 'Y轴(右侧坐标轴)' + }, { + value: 'xAxisUp', + label: 'Y轴(左侧坐标轴)' + }, { + value: 'yAxisLeft', + label: 'X轴(右侧坐标轴)' + }, { + value: 'yAxisRight', + label: 'X轴(左侧坐标轴)' + }]; + } else { + return [{ + value: 'xAxisDown', + label: 'X轴(下方水平)' + }, { + value: 'xAxisUp', + label: 'X轴(上方水平)' + }, { + value: 'yAxisLeft', + label: 'Y轴(左侧垂直)' + }, { + value: 'yAxisRight', + label: 'Y轴(右侧垂直)' + }]; + } + }, + showLabel: function showLabel() { + if (this.chartType == 'bar' && this.axis.axisType.slice(0, 1) == 'x' || this.chartType != 'bar' && this.axis.axisType.slice(0, 1) == 'y') { + return true; + } + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeAxis: function changeAxis() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.series), + router: this.router + '/' + this.axis.axisType + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartAxisvue_type_script_lang_js_ = (ChartAxisvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartAxis.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartAxisvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartAxis = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.3.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.3.js.map b/src/expendPlugins/chart/chartmix.common.3.js.map new file mode 100644 index 000000000..fcfbcb4d6 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?76b7","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartAxis.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?5c0a","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBase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A;AAaA,eACA;AAAA;AAAA;AAAA,OADA,EAEA;AAAA;AAAA;AAAA,OAFA,CAbA;AAiBA;AACA;AACA;AAnBA;AAqBA,GAhCA;AAiCA;AACA;AACA,aADA,mBACA,MADA,EACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAZA;AAaA,qBAbA;AAcA;AAdA,KADA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAjBA,GAjCA;AA6DA;AACA,aADA,uBACA;AACA;AACA,KAHA;AAIA,cAJA,wBAIA;AACA;AACA,KANA;AAOA,aAPA,uBAOA;AACA;AACA,gBACA;AAAA;AAAA;AAAA,SADA,EAEA;AAAA;AAAA;AAAA,SAFA,EAGA;AAAA;AAAA;AAAA,SAHA,EAIA;AAAA;AAAA;AAAA,SAJA;AAMA,OAPA,MAOA;AACA,gBACA;AAAA;AAAA;AAAA,SADA,EAEA;AAAA;AAAA;AAAA,SAFA,EAGA;AAAA;AAAA;AAAA,SAHA,EAIA;AAAA;AAAA;AAAA,SAJA;AAMA,OAPA,MAOA;AACA,gBACA;AAAA;AAAA;AAAA,SADA,EAEA;AAAA;AAAA;AAAA,SAFA,EAGA;AAAA;AAAA;AAAA,SAHA,EAIA;AAAA;AAAA;AAAA,SAJA;AAMA;AACA,KA9BA;AA+BA,aA/BA,uBA+BA;AACA;AACA;AACA;AACA;AAnCA,GA7DA;AAkGA,iGACA,6DADA;AAEA,cAFA,wBAEA;AACA;AACA,sDADA;AAEA;AAFA;AAIA;AACA;AARA;AAlGA,G;;ACrMgX,CAAgB,6GAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAGxD;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,uCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,gG","file":"chartmix.common.3.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"6\",\"title\":\"XY轴设置\"}},[_c('chart-base-select',{attrs:{\"selectOption\":_vm.axisGroup,\"selectValue\":_vm.axis.axisType},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.axis, \"axisType\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.axis, \"axisType\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"选择坐标轴\")])]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(_vm._s(_vm.series.name))])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.show),expression:\"series.show\"}]},[_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.title.text,\"placeholder\":'请输入标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.title, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.title, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标题内容\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.title.text),expression:\"series.title.text\"}],staticStyle:{\"margin-top\":\"15px\"}},[_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.series.title.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.series.title, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.series.title, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.fzPosOption,\"selectValue\":_vm.series.title.fzPosition},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.title, \"fzPosition\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.title, \"fzPosition\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"文本对齐方式\")])])],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.inverse},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series, \"inverse\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series, \"inverse\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"反向坐标轴\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":10,\"baseSliderOption\":_vm.series.tickLabel.optimize,\"unit\":'个',\"content\":'滑动修改坐标轴间隔个数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLabel, \"optimize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLabel, \"optimize\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"坐标轴间隔个数\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.title.text),expression:\"series.title.text\"}]},[_c('chart-base-slider',{attrs:{\"hideCol\":true,\"baseSliderOption\":_vm.series.title.nameGap,\"unit\":'px',\"content\":'滑动修改标题与轴线距离'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.title, \"nameGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.title, \"nameGap\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"标题与轴线距离\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"format\":_vm.formatRotation+'',\"max\":180,\"min\":-180,\"baseSliderOption\":_vm.series.title.rotate,\"unit\":'°',\"content\":'滑动修改标题与轴线距离'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.title, \"rotate\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.title, \"rotate\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"倾斜轴标题\")])])],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tickLine.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tickLine, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tickLine, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度线\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"min\":1,\"baseSliderOption\":_vm.series.tickLine.width,\"unit\":'px',\"content\":'滑动修改刻度线宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLine, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLine, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度线宽度\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":7}},[_vm._v(\"刻度线颜色\")]),_c('el-col',{attrs:{\"push\":14,\"span\":3}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"刻度线颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.tickLine.color),callback:function ($$v) {_vm.$set(_vm.series.tickLine, \"color\", $$v)},expression:\"series.tickLine.color\"}})],1)],1)],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tick.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tick, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tick, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.orient,\"selectValue\":_vm.series.tick.position},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tick, \"position\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tick, \"position\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"刻度位置\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"min\":1,\"baseSliderOption\":_vm.series.tick.length,\"unit\":'px',\"content\":'滑动修改刻度长度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tick, \"length\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tick, \"length\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度长度\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":20,\"min\":1,\"baseSliderOption\":_vm.series.tick.width,\"unit\":'px',\"content\":'滑动修改刻度宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tick, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tick, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度宽度\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":6}},[_vm._v(\"刻度颜色\")]),_c('el-col',{attrs:{\"push\":14,\"span\":4}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"刻度颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.tick.color),callback:function ($$v) {_vm.$set(_vm.series.tick, \"color\", $$v)},expression:\"series.tick.color\"}})],1)],1)],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tickLabel.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度标签\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"format\":_vm.formatRotation,\"max\":180,\"min\":-180,\"baseSliderOption\":_vm.series.tickLabel.rotate,\"unit\":'°',\"content\":'滑动修改标签倾斜角度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLabel, \"rotate\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLabel, \"rotate\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"倾斜标签\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showLabel),expression:\"showLabel\"}]},[_c('chart-base-input',{attrs:{\"type\":'text',\"inputValue\":_vm.series.tickLabel.min,\"placeholder\":'请输入刻度最小值'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"min\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"min\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"刻度最小值\")])]),_c('chart-base-input',{attrs:{\"type\":'text',\"inputValue\":_vm.series.tickLabel.max,\"placeholder\":'请输入刻度最大值且最大值不能小于最小值'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"max\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"max\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"刻度最大值\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.ratioOption,\"selectValue\":_vm.series.tickLabel.ratio},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"ratio\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"ratio\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"数值缩放比例\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.digitOption,\"selectValue\":_vm.series.tickLabel.digit},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"digit\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"digit\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"小数位数\")])])],1),_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.tickLabel.prefix,\"placeholder\":'请输入标签前缀'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"prefix\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"prefix\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标签前缀\")])]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.tickLabel.suffix,\"placeholder\":'请输入标签后缀'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"suffix\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"suffix\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标签后缀\")])]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.netLine.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.netLine, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.netLine, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示网格线\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.netLine.show),expression:\"series.netLine.show\"}]},[_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":20,\"min\":1,\"baseSliderOption\":_vm.series.netLine.width,\"unit\":'px',\"content\":'滑动修改网格线宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netLine, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netLine, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"网格线宽度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineStyleOption,\"selectValue\":_vm.series.netLine.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netLine, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netLine, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格线类型\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._v(\"网格线颜色\")]),_c('el-col',{attrs:{\"push\":13,\"span\":3}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"网格线颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"label\":true,\"size\":\"mini\"},model:{value:(_vm.series.netLine.color),callback:function ($$v) {_vm.$set(_vm.series.netLine, \"color\", $$v)},expression:\"series.netLine.color\"}})],1)],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.intervalOption,\"selectValue\":_vm.series.netLine.interval.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netLine.interval, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netLine.interval, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格线分割间隔数\")])]),(_vm.series.netLine.interval.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.series.netLine.interval.cusNumber,\"unit\":'个',\"content\":'滑动修改间隔数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netLine.interval, \"cusNumber\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netLine.interval, \"cusNumber\", $event)}}}):_vm._e()],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.netArea.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.netArea, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.netArea, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示网格区域\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.netArea.show),expression:\"series.netArea.show\"}]},[_c('chart-base-select',{attrs:{\"selectOption\":_vm.intervalOption,\"selectValue\":_vm.series.netArea.interval.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netArea.interval, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netArea.interval, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格区域分割间隔数\")])]),(_vm.series.netArea.interval.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.series.netArea.interval.cusNumber,\"unit\":'个',\"content\":'滑动修改间隔数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netArea.interval, \"cusNumber\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netArea.interval, \"cusNumber\", $event)}}}):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"网格区域第一颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.netArea.colorOne),callback:function ($$v) {_vm.$set(_vm.series.netArea, \"colorOne\", $$v)},expression:\"series.netArea.colorOne\"}})],1),_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"网格区域第二颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.netArea.colorTwo),callback:function ($$v) {_vm.$set(_vm.series.netArea, \"colorTwo\", $$v)},expression:\"series.netArea.colorTwo\"}})],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartAxis.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartAxis.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartAxis.vue?vue&type=template&id=728665dc&\"\nimport script from \"./ChartAxis.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartAxis.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.4.js b/src/expendPlugins/chart/chartmix.common.4.js new file mode 100644 index 000000000..30030aabd --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.4.js @@ -0,0 +1,299 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[4],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "9b10": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=template&id=1ee52ff0& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"4","title":"鼠标提示"}},[_c('chart-base-switch',{attrs:{"switchValue":_vm.cursor.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.cursor, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.cursor, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示提示框")])]),_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.cursor.label}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("鼠标提示样式")])]),_c('el-row',{staticStyle:{"margin-top":"10px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v("背景颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.cursor.backgroundColor),callback:function ($$v) {_vm.$set(_vm.cursor, "backgroundColor", $$v)},expression:"cursor.backgroundColor"}})],1)],1),_c('chart-base-select',{attrs:{"selectOption":_vm.triggerMethodArr,"selectValue":_vm.cursor.triggerOn},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor, "triggerOn", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor, "triggerOn", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("提示触发条件")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.triggerTypeArr,"selectValue":_vm.cursor.triggerType},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor, "triggerType", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor, "triggerType", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("提示触发类型")])]),(_vm.cursor.triggerType != 'item')?_c('div',[_c('chart-base-select',{attrs:{"selectOption":_vm.lineStyleOption,"selectValue":_vm.cursor.axisPointer.style.type},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "type", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "type", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("指示器线类型")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.lineWeightOption,"selectValue":_vm.cursor.axisPointer.style.width},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "width", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "width", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("指示器线宽")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v("线条颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.cursor.axisPointer.style.color),callback:function ($$v) {_vm.$set(_vm.cursor.axisPointer.style, "color", $$v)},expression:"cursor.axisPointer.style.color"}})],1)],1),_c('chart-base-select',{attrs:{"selectOption":_vm.axisPointerArr,"selectValue":_vm.cursor.axisPointer.type},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.axisPointer, "type", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.axisPointer, "type", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("指示器类型")])])],1):_vm._e(),(_vm.cursor.triggerType == 'item')?_c('chart-base-select',{attrs:{"selectOption":_vm.posOption,"selectValue":_vm.cursor.position},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor, "position", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor, "position", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("提示框浮层位置")])]):_vm._e(),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":2}},[_c('i',{staticClass:"el-icon-menu"})]),_c('el-col',{attrs:{"span":8}},[_vm._v("鼠标提示后缀")])],1),_vm._l((_vm.seriesOption),function(item,i){return _c('el-row',{key:i,staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v(_vm._s(item))]),_c('el-col',{attrs:{"span":4}},[_c('chart-base-input',{attrs:{"hideCol":true,"placeholder":'后缀'}})],1),_c('el-col',{attrs:{"span":6}},[_c('chart-base-select',{attrs:{"tooltip":'数值比例',"selectOption":_vm.ratioOption,"selectValue":_vm.cursor.format[i].ratio,"hideCol":true},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.format[i], "ratio", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.format[i], "ratio", $event)}}})],1),_c('el-col',{attrs:{"span":6}},[_c('chart-base-select',{attrs:{"tooltip":'小数位数',"selectOption":_vm.digitOption,"selectValue":_vm.cursor.format[i].digit,"hideCol":true},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.format[i], "digit", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.format[i], "digit", $event)}}})],1)],1)})],2)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=template&id=1ee52ff0& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartCursorvue_type_script_lang_js_ = ({ + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + props: { + router: String, + chartAllType: String, + cursorOption: Object + }, + data: function data() { + return { + cursor: {}, + //鼠标提示设置 + fontSizeOption: importUtil["deepCopy"](chartJson["f" /* fontSizeOption */]), + lineStyleOption: importUtil["deepCopy"](chartJson["j" /* lineStyleOption */]), + lineWeightOption: importUtil["deepCopy"](chartJson["k" /* lineWeightOption */]), + posOption: importUtil["deepCopy"](chartJson["l" /* posOption */]), + ratioOption: importUtil["deepCopy"](chartJson["n" /* ratioOption */]), + digitOption: importUtil["deepCopy"](chartJson["c" /* digitOption */]), + triggerTypeArr: [{ + value: 'item', + label: '数据项图形触发' + }, { + value: 'axis', + label: '坐标轴触发' + }], + axisPointerArr: [{ + value: 'line', + label: '直线指示器' + }, { + value: 'shadow', + label: '阴影指示器' + }, { + value: 'cross', + label: '十字准星指示器' + }], + triggerMethodArr: [{ + value: 'mousemove', + label: '鼠标移动' + }, { + value: 'click', + label: '单击左键/鼠标划过' + }, { + value: 'mousemove|click', + label: '同时触发' + }] + }; + }, + watch: { + cursorOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.cursor, newVal)) { + return; + } + + this.cursor = importUtil["deepCopy"](newVal); + }, + immediate: true, + deep: true + }, + cursor: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeCursor(); + } + }, + deep: true, + immediate: true + } + }, + computed: { + seriesOption: function seriesOption() { + var arr = []; + + for (var i = 0; i < this.cursor.format.length; i++) { + arr.push(this.cursor.format[i].seriesName); + } + + return arr; + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeCursor: function changeCursor() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.cursor), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartCursorvue_type_script_lang_js_ = (ChartCursorvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartCursor.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartCursorvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartCursor = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.4.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.4.js.map b/src/expendPlugins/chart/chartmix.common.4.js.map new file mode 100644 index 000000000..aeb629408 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.4.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?713b","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartCursor.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?9f7b","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartCursor.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,oFAAN;AAAA,CAAxB;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAM,oFAAN;AAAA,CAArB;;AACA;AACA;CAEA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAASC,CAAT,EAAW;AAC1B,SAAO;AACH,wBAAoBA,CAAC,CAACP,cADnB;AAEH,wBAAoBO,CAAC,CAACL,cAFnB;AAGH,yBAAqBK,CAAC,CAACN,eAHpB;AAIH,yBAAqBM,CAAC,CAACH,eAJpB;AAKH,yBAAqBG,CAAC,CAACJ;AALpB,GAAP;AAOH,CARD;;;;;;;;;;;;;;ACXA,0BAA0B,aAAa,0BAA0B,wBAAwB,8BAA8B,OAAO,2BAA2B,0BAA0B,OAAO,8BAA8B,KAAK,sCAAsC,4CAA4C,wCAAwC,8CAA8C,YAAY,OAAO,eAAe,cAAc,6CAA6C,OAAO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;;;;;;;;;;;;;;;;;;;;;;;AC8EA;AACA;AAEA;AACA,2DACA,oCADA,CADA;AAIA;AACA,kBADA;AAEA,wBAFA;AAGA;AAHA,GAJA;AASA,MATA,kBASA;AACA;AACA,gBADA;AACA;AACA,iFAFA;AAGA,mFAHA;AAIA,qFAJA;AAKA,uEALA;AAMA,2EANA;AAOA,2EAPA;AAQA,uBACA;AAAA;AAAA;AAAA,OADA,EAEA;AAAA;AAAA;AAAA,OAFA,CARA;AAYA,uBACA;AAAA;AAAA;AAAA,OADA,EAEA;AAAA;AAAA;AAAA,OAFA,EAGA;AAAA;AAAA;AAAA,OAHA,CAZA;AAiBA,yBACA;AAAA;AAAA;AAAA,OADA,EAEA;AAAA;AAAA;AAAA,OAFA,EAGA;AAAA;AAAA;AAAA,OAHA;AAjBA;AAuBA,GAjCA;AAkCA;AACA;AACA,aADA,mBACA,MADA,EACA;AACA;AACA;AACA;;AACA;AACA,OANA;AAOA,qBAPA;AAQA;AARA,KADA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAXA,GAlCA;AAwDA;AACA,gBADA,0BACA;AACA;;AACA;AACA;AACA;;AACA;AACA;AAPA,GAxDA;AAiEA,iGACA,6DADA;AAEA,gBAFA,0BAEA;AACA;AACA,sDADA;AAEA;AAFA;AAIA;AACA;AARA;AAjEA,G;;AClFkX,CAAgB,iHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG1D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,kG","file":"chartmix.common.4.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"4\",\"title\":\"鼠标提示\"}},[_c('chart-base-switch',{attrs:{\"switchValue\":_vm.cursor.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.cursor, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.cursor, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示提示框\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.cursor.label}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"鼠标提示样式\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"10px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"背景颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.cursor.backgroundColor),callback:function ($$v) {_vm.$set(_vm.cursor, \"backgroundColor\", $$v)},expression:\"cursor.backgroundColor\"}})],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.triggerMethodArr,\"selectValue\":_vm.cursor.triggerOn},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"triggerOn\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"triggerOn\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示触发条件\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.triggerTypeArr,\"selectValue\":_vm.cursor.triggerType},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"triggerType\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"triggerType\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示触发类型\")])]),(_vm.cursor.triggerType != 'item')?_c('div',[_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineStyleOption,\"selectValue\":_vm.cursor.axisPointer.style.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器线类型\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineWeightOption,\"selectValue\":_vm.cursor.axisPointer.style.width},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"width\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器线宽\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"线条颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.cursor.axisPointer.style.color),callback:function ($$v) {_vm.$set(_vm.cursor.axisPointer.style, \"color\", $$v)},expression:\"cursor.axisPointer.style.color\"}})],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.axisPointerArr,\"selectValue\":_vm.cursor.axisPointer.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器类型\")])])],1):_vm._e(),(_vm.cursor.triggerType == 'item')?_c('chart-base-select',{attrs:{\"selectOption\":_vm.posOption,\"selectValue\":_vm.cursor.position},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"position\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"position\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示框浮层位置\")])]):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":2}},[_c('i',{staticClass:\"el-icon-menu\"})]),_c('el-col',{attrs:{\"span\":8}},[_vm._v(\"鼠标提示后缀\")])],1),_vm._l((_vm.seriesOption),function(item,i){return _c('el-row',{key:i,staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(_vm._s(item))]),_c('el-col',{attrs:{\"span\":4}},[_c('chart-base-input',{attrs:{\"hideCol\":true,\"placeholder\":'后缀'}})],1),_c('el-col',{attrs:{\"span\":6}},[_c('chart-base-select',{attrs:{\"tooltip\":'数值比例',\"selectOption\":_vm.ratioOption,\"selectValue\":_vm.cursor.format[i].ratio,\"hideCol\":true},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.format[i], \"ratio\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.format[i], \"ratio\", $event)}}})],1),_c('el-col',{attrs:{\"span\":6}},[_c('chart-base-select',{attrs:{\"tooltip\":'小数位数',\"selectOption\":_vm.digitOption,\"selectValue\":_vm.cursor.format[i].digit,\"hideCol\":true},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.format[i], \"digit\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.format[i], \"digit\", $event)}}})],1)],1)})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartCursor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartCursor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartCursor.vue?vue&type=template&id=1ee52ff0&\"\nimport script from \"./ChartCursor.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartCursor.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.5.js b/src/expendPlugins/chart/chartmix.common.5.js new file mode 100644 index 000000000..438a11393 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.5.js @@ -0,0 +1,243 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[5],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "954f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=template&id=9e7569a0& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"3","title":"图例设置"}},[_c('chart-base-switch',{attrs:{"switchValue":_vm.legend.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.legend, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.legend, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示图例")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.legend.show),expression:"legend.show"}]},[_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.legend.label},on:{"update:baseLabelOption":function($event){return _vm.$set(_vm.legend, "label", $event)},"update:base-label-option":function($event){return _vm.$set(_vm.legend, "label", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("图例样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.positionOption,"selectValue":_vm.legend.position.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.position, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.position, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例位置")])]),(_vm.legend.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.position.offsetX,"unit":'%',"content":'滑动修改水平偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.position, "offsetX", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.position, "offsetX", $event)}}}),_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.position.offsetY,"unit":'%',"content":'滑动修改垂直偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.position, "offsetY", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.position, "offsetY", $event)}}})],1):_vm._e(),_c('chart-base-select',{attrs:{"selectOption":_vm.dirOptions,"selectValue":_vm.legend.position.direction},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.position, "direction", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.position, "direction", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例朝向")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.sizeOption,"selectValue":_vm.legend.width.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.width, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.width, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例宽度")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.sizeOption,"selectValue":_vm.legend.height.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.height, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.height, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例高度")])]),(_vm.legend.width.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.width.cusSize,"unit":'px',"content":'滑动修改图例宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.width, "cusSize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.width, "cusSize", $event)}}}):_vm._e(),(_vm.legend.height.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.height.cusSize,"unit":'px',"content":'滑动修改图例高度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.height, "cusSize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.height, "cusSize", $event)}}}):_vm._e(),_c('chart-base-select',{attrs:{"selectOption":_vm.distanceOption,"selectValue":_vm.legend.distance.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.distance, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.distance, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例间距")])]),(_vm.legend.distance.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.distance.cusGap,"unit":'px',"content":'滑动修改图例间距'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.distance, "cusGap", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.distance, "cusGap", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("图例样式")])]):_vm._e()],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=template&id=9e7569a0& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartLegendvue_type_script_lang_js_ = ({ + props: { + legendOption: Object, + chartAllType: String, + router: String + }, + data: function data() { + return { + legend: {}, + //图例设置 + positionOption: importUtil["deepCopy"](chartJson["m" /* positionOption */]), + sizeOption: importUtil["deepCopy"](chartJson["o" /* sizeOption */]), + distanceOption: importUtil["deepCopy"](chartJson["d" /* distanceOption */]), + dirOptions: [{ + value: "horizontal", + label: "水平" + }, { + value: "vertical", + label: "垂直" + }] + }; + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + watch: { + legendOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.legend, newVal)) { + return; + } + + this.legend = importUtil["deepCopy"](newVal); + }, + immediate: true, + deep: true + }, + legend: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeLegend(); + } + }, + deep: true, + immediate: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeLegend: function changeLegend() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.legend), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartLegendvue_type_script_lang_js_ = (ChartLegendvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartLegend.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartLegendvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartLegend = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.5.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.5.js.map b/src/expendPlugins/chart/chartmix.common.5.js.map new file mode 100644 index 000000000..95652eaea --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.5.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?b74c","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartLegend.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?3100","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,oFAAN;AAAA,CAAxB;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAM,oFAAN;AAAA,CAArB;;AACA;AACA;CAEA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAASC,CAAT,EAAW;AAC1B,SAAO;AACH,wBAAoBA,CAAC,CAACP,cADnB;AAEH,wBAAoBO,CAAC,CAACL,cAFnB;AAGH,yBAAqBK,CAAC,CAACN,eAHpB;AAIH,yBAAqBM,CAAC,CAACH,eAJpB;AAKH,yBAAqBG,CAAC,CAACJ;AALpB,GAAP;AAOH,CARD;;;;;;;;;;;;;;ACXA,0BAA0B,aAAa,0BAA0B,wBAAwB,8BAA8B,OAAO,2BAA2B,0BAA0B,OAAO,8BAA8B,KAAK,sCAAsC,4CAA4C,wCAAwC,8CAA8C,YAAY,OAAO,eAAe,cAAc,+BAA+B,aAAa,8EAA8E,EAAE,yBAAyB,OAAO,kEAAkE,KAAK,0CAA0C,6CAA6C,6CAA6C,+CAA+C,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AQA;AARA,KADA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAXA,GArBA;AA2CA,iGACA,6DADA;AAEA,gBAFA,0BAEA;AACA;AACA,sDADA;AAEA;AAFA;AAIA;AACA;AARA;AA3CA,G;;AC5DkX,CAAgB,iHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG1D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,kG","file":"chartmix.common.5.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"3\",\"title\":\"图例设置\"}},[_c('chart-base-switch',{attrs:{\"switchValue\":_vm.legend.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.legend, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.legend, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示图例\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.legend.show),expression:\"legend.show\"}]},[_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.legend.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.legend, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.legend, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"图例样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.positionOption,\"selectValue\":_vm.legend.position.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.position, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.position, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例位置\")])]),(_vm.legend.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.position.offsetX,\"unit\":'%',\"content\":'滑动修改水平偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.position, \"offsetX\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.position, \"offsetX\", $event)}}}),_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.position.offsetY,\"unit\":'%',\"content\":'滑动修改垂直偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.position, \"offsetY\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.position, \"offsetY\", $event)}}})],1):_vm._e(),_c('chart-base-select',{attrs:{\"selectOption\":_vm.dirOptions,\"selectValue\":_vm.legend.position.direction},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.position, \"direction\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.position, \"direction\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例朝向\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.sizeOption,\"selectValue\":_vm.legend.width.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.width, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.width, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例宽度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.sizeOption,\"selectValue\":_vm.legend.height.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.height, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.height, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例高度\")])]),(_vm.legend.width.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.width.cusSize,\"unit\":'px',\"content\":'滑动修改图例宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.width, \"cusSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.width, \"cusSize\", $event)}}}):_vm._e(),(_vm.legend.height.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.height.cusSize,\"unit\":'px',\"content\":'滑动修改图例高度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.height, \"cusSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.height, \"cusSize\", $event)}}}):_vm._e(),_c('chart-base-select',{attrs:{\"selectOption\":_vm.distanceOption,\"selectValue\":_vm.legend.distance.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.distance, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.distance, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例间距\")])]),(_vm.legend.distance.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.distance.cusGap,\"unit\":'px',\"content\":'滑动修改图例间距'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.distance, \"cusGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.distance, \"cusGap\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"图例样式\")])]):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartLegend.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartLegend.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartLegend.vue?vue&type=template&id=9e7569a0&\"\nimport script from \"./ChartLegend.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartLegend.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.6.js b/src/expendPlugins/chart/chartmix.common.6.js new file mode 100644 index 000000000..49e696956 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.6.js @@ -0,0 +1,208 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[6],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "969a": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=template&id=60e525b6& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"2"}},[_c('template',{slot:"title"},[_vm._v(" 副标题设置 "),_c('i',{staticClass:"iconfont icon-biaoti"})]),_c('chart-base-input',{attrs:{"inputValue":_vm.subTitle.text,"placeholder":'请输入副标题内容'},on:{"update:inputValue":function($event){return _vm.$set(_vm.subTitle, "text", $event)},"update:input-value":function($event){return _vm.$set(_vm.subTitle, "text", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("副标题内容")])]),_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.subTitle.label}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("文本样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.distanceOption,"selectValue":_vm.subTitle.distance.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.subTitle.distance, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.subTitle.distance, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("主副标题间距")])]),(_vm.subTitle.distance.value === 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.subTitle.distance.cusGap,"unit":'px',"content":'滑动修改间距'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.subTitle.distance, "cusGap", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.subTitle.distance, "cusGap", $event)}}}):_vm._e()],2)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=template&id=60e525b6& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartSubTitlevue_type_script_lang_js_ = ({ + name: 'ChartSubTitle', + props: { + router: String, + chartAllType: String, + subTitleOption: Object + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + data: function data() { + return { + subTitle: {}, + //整个title设置 + distanceOption: importUtil["deepCopy"](chartJson["d" /* distanceOption */]) //位置选择数组 + + }; + }, + watch: { + subTitleOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.subTitle, newVal)) { + return; + } + + this.subTitle = importUtil["deepCopy"](newVal); //传过来的值需要深拷贝防止数据流向父组件传递 + }, + immediate: true, + deep: true + }, + subTitle: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeTitle(); + } + }, + deep: true, + immediate: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeTitle: function changeTitle() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.subTitle), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartSubTitlevue_type_script_lang_js_ = (ChartSubTitlevue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartSubTitlevue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartSubTitle = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.6.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.6.js.map b/src/expendPlugins/chart/chartmix.common.6.js.map new file mode 100644 index 000000000..76abbbaec --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.6.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?5555","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?bf82","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAA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ARA;AASA;AATA,KADA;AAYA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAZA,GAhBA;AAuCA,iGACA,6DADA;AAEA,eAFA,yBAEA;AACA;AACA,wDADA;AAEA;AAFA;AAIA;AACA;AARA;AAvCA,G;;AChCoX,CAAgB,qHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG5D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,2CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,oG","file":"chartmix.common.6.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"2\"}},[_c('template',{slot:\"title\"},[_vm._v(\" 副标题设置 \"),_c('i',{staticClass:\"iconfont icon-biaoti\"})]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.subTitle.text,\"placeholder\":'请输入副标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.subTitle, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.subTitle, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"副标题内容\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.subTitle.label}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.distanceOption,\"selectValue\":_vm.subTitle.distance.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.subTitle.distance, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.subTitle.distance, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"主副标题间距\")])]),(_vm.subTitle.distance.value === 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.subTitle.distance.cusGap,\"unit\":'px',\"content\":'滑动修改间距'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.subTitle.distance, \"cusGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.subTitle.distance, \"cusGap\", $event)}}}):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSubTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSubTitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartSubTitle.vue?vue&type=template&id=60e525b6&\"\nimport script from \"./ChartSubTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartSubTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.7.js b/src/expendPlugins/chart/chartmix.common.7.js new file mode 100644 index 000000000..eab0c61f6 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.7.js @@ -0,0 +1,218 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[7],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "450b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=template&id=3cf11da3& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"1"}},[_c('template',{slot:"title"},[_vm._v(" 标题设置 "),_c('i',{staticClass:"iconfont icon-biaoti"})]),_c('chart-base-switch',{attrs:{"switchValue":_vm.title.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.title, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.title, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示主标题")])]),_c('chart-base-input',{attrs:{"inputValue":_vm.title.text,"placeholder":'请输入标题内容'},on:{"update:inputValue":function($event){return _vm.$set(_vm.title, "text", $event)},"update:input-value":function($event){return _vm.$set(_vm.title, "text", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("主标题内容")])]),_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.title.label},on:{"update:baseLabelOption":function($event){return _vm.$set(_vm.title, "label", $event)},"update:base-label-option":function($event){return _vm.$set(_vm.title, "label", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("文本样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.positionData,"selectValue":_vm.title.position.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.title.position, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.title.position, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("主标题位置")])]),(_vm.title.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.title.position.offsetX,"unit":'%',"content":'滑动修改左边距偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.title.position, "offsetX", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.title.position, "offsetX", $event)}}}),_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.title.position.offsetY,"unit":'%',"content":'滑动修改上边距偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.title.position, "offsetY", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.title.position, "offsetY", $event)}}})],1):_vm._e()],2)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=template&id=3cf11da3& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartTitlevue_type_script_lang_js_ = ({ + name: 'ChartTitle', + props: { + router: String, + chartAllType: String, + titleOption: Object + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + data: function data() { + return { + title: '', + //整个title设置, + positionData: chartJson["m" /* positionOption */] + }; + }, + watch: { + titleOption: { + handler: function handler(newVal, oldVal) { + if (importUtil["isEqual"](this.title, newVal)) { + return; + } + + this.title = importUtil["deepCopy"](newVal); + }, + deep: true, + immediate: true + }, + title: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeTitle(); + } + }, + deep: true, + immediate: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeTitle: function changeTitle() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.title), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartTitlevue_type_script_lang_js_ = (ChartTitlevue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartTitle.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartTitlevue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartTitle = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.7.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.7.js.map b/src/expendPlugins/chart/chartmix.common.7.js.map new file mode 100644 index 000000000..64a50bdf5 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.7.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?a624","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartTitle.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?3ba4","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,oFAAN;AAAA,CAAxB;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAM,oFAAN;AAAA,CAArB;;AACA;AACA;CAEA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAASC,CAAT,EAAW;AAC1B,SAAO;AACH,wBAAoBA,CAAC,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AAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAGzD;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,wCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,iG","file":"chartmix.common.7.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"1\"}},[_c('template',{slot:\"title\"},[_vm._v(\" 标题设置 \"),_c('i',{staticClass:\"iconfont icon-biaoti\"})]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.title.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.title, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.title, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示主标题\")])]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.title.text,\"placeholder\":'请输入标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.title, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.title, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"主标题内容\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.title.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.title, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.title, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.positionData,\"selectValue\":_vm.title.position.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.title.position, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.title.position, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"主标题位置\")])]),(_vm.title.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.title.position.offsetX,\"unit\":'%',\"content\":'滑动修改左边距偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.title.position, \"offsetX\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.title.position, \"offsetX\", $event)}}}),_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.title.position.offsetY,\"unit\":'%',\"content\":'滑动修改上边距偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.title.position, \"offsetY\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.title.position, \"offsetY\", $event)}}})],1):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartTitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartTitle.vue?vue&type=template&id=3cf11da3&\"\nimport script from \"./ChartTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.8.js b/src/expendPlugins/chart/chartmix.common.8.js new file mode 100644 index 000000000..6bca6230d --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.8.js @@ -0,0 +1,83 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[8],{ + +/***/ "3f9f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=template&id=78fe7fa8& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',[_c('el-checkbox-group',{attrs:{"size":"mini"},on:{"change":_vm.changeStyle},model:{value:(_vm.boxValue),callback:function ($$v) {_vm.boxValue=$$v},expression:"boxValue"}},_vm._l((_vm.checkboxOption),function(value,name){return _c('el-tooltip',{key:name,attrs:{"open-delay":500,"content":value.des,"effect":"dark","placement":"bottom"}},[_c('el-checkbox-button',{attrs:{"label":name}},[_vm._v(" "+_vm._s(value.text)+" ")])],1)}),1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=template&id=78fe7fa8& + +// EXTERNAL MODULE: ./src/utils/util.js + 4 modules +var util = __webpack_require__("ca00"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ var ChartBaseBoxvue_type_script_lang_js_ = ({ + props: { + checkboxOption: [Object, Array], + boxData: { + type: Array, + default: [] + } + }, + data: function data() { + return { + boxValue: '' + }; + }, + mounted: function mounted() { + this.boxValue = this.boxData ? Object(util["b" /* deepCopy */])(this.boxData) : []; + }, + methods: { + changeStyle: function changeStyle(val) { + this.$emit('update:boxData', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseBoxvue_type_script_lang_js_ = (ChartBaseBoxvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseBoxvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseBox = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.8.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.8.js.map b/src/expendPlugins/chart/chartmix.common.8.js.map new file mode 100644 index 000000000..83e0b7179 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.8.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?6065","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseBox.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?5317","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,4CAA4C,OAAO,cAAc,KAAK,yBAAyB,QAAQ,8CAA8C,iBAAiB,wBAAwB,kDAAkD,wBAAwB,gBAAgB,2EAA2E,2BAA2B,OAAO,cAAc,2CAA2C;AACvhB;;;;;;;;;;;;;;;;;;;ACUA;AACA;AACA;AACA,mCADA;AAEA;AACA,iBADA;AAEA;AAFA;AAFA,GADA;AAQA,MARA,kBAQA;AACA;AACA;AADA;AAGA,GAZA;AAaA,SAbA,qBAaA;AACA;AACA,GAfA;AAgBA;AACA,eADA,uBACA,GADA,EACA;AACA;AACA;AAHA;AAhBA,G;;ACZmX,CAAgB,kHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG3D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,mG","file":"chartmix.common.8.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',[_c('el-checkbox-group',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeStyle},model:{value:(_vm.boxValue),callback:function ($$v) {_vm.boxValue=$$v},expression:\"boxValue\"}},_vm._l((_vm.checkboxOption),function(value,name){return _c('el-tooltip',{key:name,attrs:{\"open-delay\":500,\"content\":value.des,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-checkbox-button',{attrs:{\"label\":name}},[_vm._v(\" \"+_vm._s(value.text)+\" \")])],1)}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseBox.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseBox.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseBox.vue?vue&type=template&id=78fe7fa8&\"\nimport script from \"./ChartBaseBox.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseBox.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.9.js b/src/expendPlugins/chart/chartmix.common.9.js new file mode 100644 index 000000000..ae3efdd36 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.9.js @@ -0,0 +1,92 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[9],{ + +/***/ "37cd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=template&id=0f2b52c7& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("input")],2),_c('el-col',{attrs:{"span":16}},[_c('el-input',{attrs:{"placeholder":_vm.placeholder,"size":"mini","suffix-icon":"el-icon-edit","type":_vm.type?_vm.type:'text'},on:{"change":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:"input"}})],1)],1):_c('el-input',{attrs:{"type":_vm.type?_vm.type:'text',"placeholder":_vm.placeholder,"size":"mini"},on:{"change":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:"input"}})],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=template&id=0f2b52c7& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseInputvue_type_script_lang_js_ = ({ + name: 'chart-base-input', + props: { + placeholder: { + type: String, + default: '' + }, + inputValue: '', + hideCol: Boolean, + type: String + }, + data: function data() { + return { + input: '' + }; + }, + mounted: function mounted() { + this.input = this.inputValue ? this.inputValue : ''; + }, + methods: { + changeInput: function changeInput(val) { + this.$emit('update:inputValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseInputvue_type_script_lang_js_ = (ChartBaseInputvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseInputvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseInput = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.common.9.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.9.js.map b/src/expendPlugins/chart/chartmix.common.9.js.map new file mode 100644 index 000000000..d5d14b37f --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.9.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?3385","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseInput.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?20e7","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,6CAA6C,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,iBAAiB,OAAO,yGAAyG,KAAK,yBAAyB,QAAQ,2CAA2C,cAAc,qBAAqB,yBAAyB,OAAO,4EAA4E,KAAK,yBAAyB,QAAQ,2CAA2C,cAAc,qBAAqB;AACtuB;;;;;;;;;;;;;;;;;;;;;;;;;;ACoBA;AACA,0BADA;AAEA;AACA;AACA,kBADA;AAEA;AAFA,KADA;AAKA,kBALA;AAMA,oBANA;AAOA;AAPA,GAFA;AAWA,MAXA,kBAWA;AACA;AACA;AADA;AAGA,GAfA;AAgBA,SAhBA,qBAgBA;AACA;AACA,GAlBA;AAmBA;AACA,eADA,uBACA,GADA,EACA;AACA;AACA;AAHA;AAnBA,G;;ACrBqX,CAAgB,sHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG7D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,2CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,qG","file":"chartmix.common.9.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"input\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-input',{attrs:{\"placeholder\":_vm.placeholder,\"size\":\"mini\",\"suffix-icon\":\"el-icon-edit\",\"type\":_vm.type?_vm.type:'text'},on:{\"change\":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:\"input\"}})],1)],1):_c('el-input',{attrs:{\"type\":_vm.type?_vm.type:'text',\"placeholder\":_vm.placeholder,\"size\":\"mini\"},on:{\"change\":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:\"input\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseInput.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseInput.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseInput.vue?vue&type=template&id=0f2b52c7&\"\nimport script from \"./ChartBaseInput.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseInput.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.common.js b/src/expendPlugins/chart/chartmix.common.js new file mode 100644 index 000000000..6098f19e1 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.common.js @@ -0,0 +1,134858 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // install a JSONP callback for chunk loading +/******/ function webpackJsonpCallback(data) { +/******/ var chunkIds = data[0]; +/******/ var moreModules = data[1]; +/******/ +/******/ +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0, resolves = []; +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ resolves.push(installedChunks[chunkId][0]); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ for(moduleId in moreModules) { +/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { +/******/ modules[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(parentJsonpFunction) parentJsonpFunction(data); +/******/ +/******/ while(resolves.length) { +/******/ resolves.shift()(); +/******/ } +/******/ +/******/ }; +/******/ +/******/ +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 0: 0 +/******/ } +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // Promise = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ +/******/ +/******/ // script path function +/******/ function jsonpScriptSrc(chunkId) { +/******/ return __webpack_require__.p + "chartmix.common." + ({}[chunkId]||chunkId) + ".js" +/******/ } +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = function requireEnsure(chunkId) { +/******/ var promises = []; +/******/ +/******/ +/******/ // mini-css-extract-plugin CSS loading +/******/ var cssChunks = {"1":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) { +/******/ var href = "css/" + ({}[chunkId]||chunkId) + "." + {"1":"68a757d2","2":"31d6cfe0","3":"31d6cfe0","4":"31d6cfe0","5":"31d6cfe0","6":"31d6cfe0","7":"31d6cfe0","8":"31d6cfe0","9":"31d6cfe0","10":"31d6cfe0","11":"31d6cfe0"}[chunkId] + ".css"; +/******/ var fullhref = __webpack_require__.p + href; +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve(); +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return resolve(); +/******/ } +/******/ var linkTag = document.createElement("link"); +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ linkTag.onload = resolve; +/******/ linkTag.onerror = function(event) { +/******/ var request = event && event.target && event.target.src || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")"); +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.request = request; +/******/ delete installedCssChunks[chunkId] +/******/ linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ }; +/******/ linkTag.href = fullhref; +/******/ +/******/ var head = document.getElementsByTagName("head")[0]; +/******/ head.appendChild(linkTag); +/******/ }).then(function() { +/******/ installedCssChunks[chunkId] = 0; +/******/ })); +/******/ } +/******/ +/******/ // JSONP chunk loading for javascript +/******/ +/******/ var installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise(function(resolve, reject) { +/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; +/******/ }); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var script = document.createElement('script'); +/******/ var onScriptComplete; +/******/ +/******/ script.charset = 'utf-8'; +/******/ script.timeout = 120; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ script.src = jsonpScriptSrc(chunkId); +/******/ +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ onScriptComplete = function (event) { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var chunk = installedChunks[chunkId]; +/******/ if(chunk !== 0) { +/******/ if(chunk) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ chunk[1](error); +/******/ } +/******/ installedChunks[chunkId] = undefined; +/******/ } +/******/ }; +/******/ var timeout = setTimeout(function(){ +/******/ onScriptComplete({ type: 'timeout', target: script }); +/******/ }, 120000); +/******/ script.onerror = script.onload = onScriptComplete; +/******/ document.head.appendChild(script); +/******/ } +/******/ } +/******/ return Promise.all(promises); +/******/ }; +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // on error function for async loading +/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; +/******/ +/******/ var jsonpArray = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []; +/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); +/******/ jsonpArray.push = webpackJsonpCallback; +/******/ jsonpArray = jsonpArray.slice(); +/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); +/******/ var parentJsonpFunction = oldJsonpFunction; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "fb15"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "0046": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _util = __webpack_require__("6d8b"); + +var each = _util.each; +var createHashMap = _util.createHashMap; + +var SeriesModel = __webpack_require__("4f85"); + +var createListFromArray = __webpack_require__("3301"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = SeriesModel.extend({ + type: 'series.parallel', + dependencies: ['parallel'], + visualColorAccessPath: 'lineStyle.color', + getInitialData: function (option, ecModel) { + var source = this.getSource(); + setEncodeAndDimensions(source, this); + return createListFromArray(source, this); + }, + + /** + * User can get data raw indices on 'axisAreaSelected' event received. + * + * @public + * @param {string} activeState 'active' or 'inactive' or 'normal' + * @return {Array.} Raw indices + */ + getRawIndicesByActiveState: function (activeState) { + var coordSys = this.coordinateSystem; + var data = this.getData(); + var indices = []; + coordSys.eachActiveState(data, function (theActiveState, dataIndex) { + if (activeState === theActiveState) { + indices.push(data.getRawIndex(dataIndex)); + } + }); + return indices; + }, + defaultOption: { + zlevel: 0, + // 一级层叠 + z: 2, + // 二级层叠 + coordinateSystem: 'parallel', + parallelIndex: 0, + label: { + show: false + }, + inactiveOpacity: 0.05, + activeOpacity: 1, + lineStyle: { + width: 1, + opacity: 0.45, + type: 'solid' + }, + emphasis: { + label: { + show: false + } + }, + progressive: 500, + smooth: false, + // true | false | number + animationEasing: 'linear' + } +}); + +function setEncodeAndDimensions(source, seriesModel) { + // The mapping of parallelAxis dimension to data dimension can + // be specified in parallelAxis.option.dim. For example, if + // parallelAxis.option.dim is 'dim3', it mapping to the third + // dimension of data. But `data.encode` has higher priority. + // Moreover, parallelModel.dimension should not be regarded as data + // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6']; + if (source.encodeDefine) { + return; + } + + var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex')); + + if (!parallelModel) { + return; + } + + var encodeDefine = source.encodeDefine = createHashMap(); + each(parallelModel.dimensions, function (axisDim) { + var dataDimIndex = convertDimNameToNumber(axisDim); + encodeDefine.set(axisDim, dataDimIndex); + }); +} + +function convertDimNameToNumber(dimName) { + return +dimName.replace('dim', ''); +} + +module.exports = _default; + +/***/ }), + +/***/ "004f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var VisualMapView = __webpack_require__("72b6"); + +var graphic = __webpack_require__("2306"); + +var _symbol = __webpack_require__("a15a"); + +var createSymbol = _symbol.createSymbol; + +var layout = __webpack_require__("f934"); + +var helper = __webpack_require__("cbb0"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var PiecewiseVisualMapView = VisualMapView.extend({ + type: 'visualMap.piecewise', + + /** + * @protected + * @override + */ + doRender: function () { + var thisGroup = this.group; + thisGroup.removeAll(); + var visualMapModel = this.visualMapModel; + var textGap = visualMapModel.get('textGap'); + var textStyleModel = visualMapModel.textStyleModel; + var textFont = textStyleModel.getFont(); + var textFill = textStyleModel.getTextColor(); + + var itemAlign = this._getItemAlign(); + + var itemSize = visualMapModel.itemSize; + + var viewData = this._getViewData(); + + var endsText = viewData.endsText; + var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText); + endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign); + zrUtil.each(viewData.viewPieceList, renderItem, this); + endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign); + layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap')); + this.renderBackground(thisGroup); + this.positionGroup(thisGroup); + + function renderItem(item) { + var piece = item.piece; + var itemGroup = new graphic.Group(); + itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece); + + this._enableHoverLink(itemGroup, item.indexInModelPieceList); + + var representValue = visualMapModel.getRepresentValue(piece); + + this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]); + + if (showLabel) { + var visualState = this.visualMapModel.getValueState(representValue); + itemGroup.add(new graphic.Text({ + style: { + x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap, + y: itemSize[1] / 2, + text: piece.text, + textVerticalAlign: 'middle', + textAlign: itemAlign, + textFont: textFont, + textFill: textFill, + opacity: visualState === 'outOfRange' ? 0.5 : 1 + } + })); + } + + thisGroup.add(itemGroup); + } + }, + + /** + * @private + */ + _enableHoverLink: function (itemGroup, pieceIndex) { + itemGroup.on('mouseover', zrUtil.bind(onHoverLink, this, 'highlight')).on('mouseout', zrUtil.bind(onHoverLink, this, 'downplay')); + + function onHoverLink(method) { + var visualMapModel = this.visualMapModel; + visualMapModel.option.hoverLink && this.api.dispatchAction({ + type: method, + batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel) + }); + } + }, + + /** + * @private + */ + _getItemAlign: function () { + var visualMapModel = this.visualMapModel; + var modelOption = visualMapModel.option; + + if (modelOption.orient === 'vertical') { + return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize); + } else { + // horizontal, most case left unless specifying right. + var align = modelOption.align; + + if (!align || align === 'auto') { + align = 'left'; + } + + return align; + } + }, + + /** + * @private + */ + _renderEndsText: function (group, text, itemSize, showLabel, itemAlign) { + if (!text) { + return; + } + + var itemGroup = new graphic.Group(); + var textStyleModel = this.visualMapModel.textStyleModel; + itemGroup.add(new graphic.Text({ + style: { + x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2, + y: itemSize[1] / 2, + textVerticalAlign: 'middle', + textAlign: showLabel ? itemAlign : 'center', + text: text, + textFont: textStyleModel.getFont(), + textFill: textStyleModel.getTextColor() + } + })); + group.add(itemGroup); + }, + + /** + * @private + * @return {Object} {peiceList, endsText} The order is the same as screen pixel order. + */ + _getViewData: function () { + var visualMapModel = this.visualMapModel; + var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) { + return { + piece: piece, + indexInModelPieceList: index + }; + }); + var endsText = visualMapModel.get('text'); // Consider orient and inverse. + + var orient = visualMapModel.get('orient'); + var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high] + + if (orient === 'horizontal' ? inverse : !inverse) { + viewPieceList.reverse(); + } // Origin order of endsText is [high, low] + else if (endsText) { + endsText = endsText.slice().reverse(); + } + + return { + viewPieceList: viewPieceList, + endsText: endsText + }; + }, + + /** + * @private + */ + _createItemSymbol: function (group, representValue, shapeParam) { + group.add(createSymbol(this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], this.getControllerVisual(representValue, 'color'))); + }, + + /** + * @private + */ + _onItemClick: function (piece) { + var visualMapModel = this.visualMapModel; + var option = visualMapModel.option; + var selected = zrUtil.clone(option.selected); + var newKey = visualMapModel.getSelectedMapKey(piece); + + if (option.selectedMode === 'single') { + selected[newKey] = true; + zrUtil.each(selected, function (o, key) { + selected[key] = key === newKey; + }); + } else { + selected[newKey] = !selected[newKey]; + } + + this.api.dispatchAction({ + type: 'selectDataRange', + from: this.uid, + visualMapId: this.visualMapModel.id, + selected: selected + }); + } +}); +var _default = PiecewiseVisualMapView; +module.exports = _default; + +/***/ }), + +/***/ "007d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("cb8f"); + +__webpack_require__("a96b"); + +__webpack_require__("42f6"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// FIXME Better way to pack data in graphic element + +/** + * @action + * @property {string} type + * @property {number} seriesIndex + * @property {number} dataIndex + * @property {number} [x] + * @property {number} [y] + */ +echarts.registerAction({ + type: 'showTip', + event: 'showTip', + update: 'tooltip:manuallyShowTip' +}, // noop +function () {}); +echarts.registerAction({ + type: 'hideTip', + event: 'hideTip', + update: 'tooltip:manuallyHideTip' +}, // noop +function () {}); + +/***/ }), + +/***/ "00ba": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var createListSimply = __webpack_require__("e46b"); + +var _model = __webpack_require__("e0d3"); + +var defaultEmphasis = _model.defaultEmphasis; + +var _sourceHelper = __webpack_require__("0f99"); + +var makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased; + +var LegendVisualProvider = __webpack_require__("c4a3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var FunnelSeries = echarts.extendSeriesModel({ + type: 'series.funnel', + init: function (option) { + FunnelSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item + // Use a function instead of direct access because data reference may changed + + this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)); // Extend labelLine emphasis + + this._defaultLabelLine(option); + }, + getInitialData: function (option, ecModel) { + return createListSimply(this, { + coordDimensions: ['value'], + encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this) + }); + }, + _defaultLabelLine: function (option) { + // Extend labelLine emphasis + defaultEmphasis(option, 'labelLine', ['show']); + var labelLineNormalOpt = option.labelLine; + var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false` + + labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show; + labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show; + }, + // Overwrite + getDataParams: function (dataIndex) { + var data = this.getData(); + var params = FunnelSeries.superCall(this, 'getDataParams', dataIndex); + var valueDim = data.mapDimension('value'); + var sum = data.getSum(valueDim); // Percent is 0 if sum is 0 + + params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2); + params.$vars.push('percent'); + return params; + }, + defaultOption: { + zlevel: 0, + // 一级层叠 + z: 2, + // 二级层叠 + legendHoverLink: true, + left: 80, + top: 60, + right: 80, + bottom: 60, + // width: {totalWidth} - left - right, + // height: {totalHeight} - top - bottom, + // 默认取数据最小最大值 + // min: 0, + // max: 100, + minSize: '0%', + maxSize: '100%', + sort: 'descending', + // 'ascending', 'descending' + gap: 0, + funnelAlign: 'center', + label: { + show: true, + position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 + + }, + labelLine: { + show: true, + length: 20, + lineStyle: { + // color: 各异, + width: 1, + type: 'solid' + } + }, + itemStyle: { + // color: 各异, + borderColor: '#fff', + borderWidth: 1 + }, + emphasis: { + label: { + show: true + } + } + } +}); +var _default = FunnelSeries; +module.exports = _default; + +/***/ }), + +/***/ "00d8": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function dataToCoordSize(dataSize, dataItem) { + dataItem = dataItem || [0, 0]; + return zrUtil.map([0, 1], function (dimIdx) { + var val = dataItem[dimIdx]; + var halfSize = dataSize[dimIdx] / 2; + var p1 = []; + var p2 = []; + p1[dimIdx] = val - halfSize; + p2[dimIdx] = val + halfSize; + p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; + return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); + }, this); +} + +function _default(coordSys) { + var rect = coordSys.getBoundingRect(); + return { + coordSys: { + type: 'geo', + x: rect.x, + y: rect.y, + width: rect.width, + height: rect.height, + zoom: coordSys.getZoom() + }, + api: { + coord: function (data) { + // do not provide "out" and noRoam param, + // Compatible with this usage: + // echarts.util.map(item.points, api.coord) + return coordSys.dataToPoint(data); + }, + size: zrUtil.bind(dataToCoordSize, coordSys) + } + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "00ee": +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__("b622"); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; + +test[TO_STRING_TAG] = 'z'; + +module.exports = String(test) === '[object z]'; + + +/***/ }), + +/***/ "0141": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var BoundingRect = __webpack_require__("9850"); + +var View = __webpack_require__("6cc5"); + +var geoSourceManager = __webpack_require__("5b87"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * [Geo description] + * For backward compatibility, the orginal interface: + * `name, map, geoJson, specialAreas, nameMap` is kept. + * + * @param {string|Object} name + * @param {string} map Map type + * Specify the positioned areas by left, top, width, height + * @param {Object.} [nameMap] + * Specify name alias + * @param {boolean} [invertLongitute=true] + */ +function Geo(name, map, nameMap, invertLongitute) { + View.call(this, name); + /** + * Map type + * @type {string} + */ + + this.map = map; + var source = geoSourceManager.load(map, nameMap); + this._nameCoordMap = source.nameCoordMap; + this._regionsMap = source.regionsMap; + this._invertLongitute = invertLongitute == null ? true : invertLongitute; + /** + * @readOnly + */ + + this.regions = source.regions; + /** + * @type {module:zrender/src/core/BoundingRect} + */ + + this._rect = source.boundingRect; +} + +Geo.prototype = { + constructor: Geo, + type: 'geo', + + /** + * @param {Array.} + * @readOnly + */ + dimensions: ['lng', 'lat'], + + /** + * If contain given lng,lat coord + * @param {Array.} + * @readOnly + */ + containCoord: function (coord) { + var regions = this.regions; + + for (var i = 0; i < regions.length; i++) { + if (regions[i].contain(coord)) { + return true; + } + } + + return false; + }, + + /** + * @override + */ + transformTo: function (x, y, width, height) { + var rect = this.getBoundingRect(); + var invertLongitute = this._invertLongitute; + rect = rect.clone(); + + if (invertLongitute) { + // Longitute is inverted + rect.y = -rect.y - rect.height; + } + + var rawTransformable = this._rawTransformable; + rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height)); + rawTransformable.decomposeTransform(); + + if (invertLongitute) { + var scale = rawTransformable.scale; + scale[1] = -scale[1]; + } + + rawTransformable.updateTransform(); + + this._updateTransform(); + }, + + /** + * @param {string} name + * @return {module:echarts/coord/geo/Region} + */ + getRegion: function (name) { + return this._regionsMap.get(name); + }, + getRegionByCoord: function (coord) { + var regions = this.regions; + + for (var i = 0; i < regions.length; i++) { + if (regions[i].contain(coord)) { + return regions[i]; + } + } + }, + + /** + * Add geoCoord for indexing by name + * @param {string} name + * @param {Array.} geoCoord + */ + addGeoCoord: function (name, geoCoord) { + this._nameCoordMap.set(name, geoCoord); + }, + + /** + * Get geoCoord by name + * @param {string} name + * @return {Array.} + */ + getGeoCoord: function (name) { + return this._nameCoordMap.get(name); + }, + + /** + * @override + */ + getBoundingRect: function () { + return this._rect; + }, + + /** + * @param {string|Array.} data + * @param {boolean} noRoam + * @param {Array.} [out] + * @return {Array.} + */ + dataToPoint: function (data, noRoam, out) { + if (typeof data === 'string') { + // Map area name to geoCoord + data = this.getGeoCoord(data); + } + + if (data) { + return View.prototype.dataToPoint.call(this, data, noRoam, out); + } + }, + + /** + * @override + */ + convertToPixel: zrUtil.curry(doConvert, 'dataToPoint'), + + /** + * @override + */ + convertFromPixel: zrUtil.curry(doConvert, 'pointToData') +}; +zrUtil.mixin(Geo, View); + +function doConvert(methodName, ecModel, finder, value) { + var geoModel = finder.geoModel; + var seriesModel = finder.seriesModel; + var coordSys = geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map. + || (seriesModel.getReferringComponents('geo')[0] || {}).coordinateSystem : null; + return coordSys === this ? coordSys[methodName](value) : null; +} + +var _default = Geo; +module.exports = _default; + +/***/ }), + +/***/ "0156": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Can only be called after coordinate system creation stage. + * (Can be called before coordinate system update stage). + * + * @param {Object} opt {labelInside} + * @return {Object} { + * position, rotation, labelDirection, labelOffset, + * tickDirection, labelRotate, z2 + * } + */ +function layout(gridModel, axisModel, opt) { + opt = opt || {}; + var grid = gridModel.coordinateSystem; + var axis = axisModel.axis; + var layout = {}; + var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0]; + var rawAxisPosition = axis.position; + var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition; + var axisDim = axis.dim; + var rect = grid.getRect(); + var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; + var idx = { + left: 0, + right: 1, + top: 0, + bottom: 1, + onZero: 2 + }; + var axisOffset = axisModel.get('offset') || 0; + var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset]; + + if (otherAxisOnZeroOf) { + var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0)); + posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]); + } // Axis position + + + layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation + + layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim + + var dirMap = { + top: -1, + bottom: 1, + left: -1, + right: 1 + }; + layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition]; + layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0; + + if (axisModel.get('axisTick.inside')) { + layout.tickDirection = -layout.tickDirection; + } + + if (zrUtil.retrieve(opt.labelInside, axisModel.get('axisLabel.inside'))) { + layout.labelDirection = -layout.labelDirection; + } // Special label rotation + + + var labelRotate = axisModel.get('axisLabel.rotate'); + layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea + + layout.z2 = 1; + return layout; +} + +exports.layout = layout; + +/***/ }), + +/***/ "01ed": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +__webpack_require__("5aa9"); + +__webpack_require__("af24"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// Grid view +echarts.extendComponentView({ + type: 'grid', + render: function (gridModel, ecModel) { + this.group.removeAll(); + + if (gridModel.get('show')) { + this.group.add(new graphic.Rect({ + shape: gridModel.coordinateSystem.getRect(), + style: zrUtil.defaults({ + fill: gridModel.get('backgroundColor') + }, gridModel.getItemStyle()), + silent: true, + z2: -1 + })); + } + } +}); +echarts.registerPreprocessor(function (option) { + // Only create grid when need + if (option.xAxis && option.yAxis && !option.grid) { + option.grid = {}; + } +}); + +/***/ }), + +/***/ "01ef": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * For geo and graph. + * + * @param {Object} controllerHost + * @param {module:zrender/Element} controllerHost.target + */ +function updateViewOnPan(controllerHost, dx, dy) { + var target = controllerHost.target; + var pos = target.position; + pos[0] += dx; + pos[1] += dy; + target.dirty(); +} +/** + * For geo and graph. + * + * @param {Object} controllerHost + * @param {module:zrender/Element} controllerHost.target + * @param {number} controllerHost.zoom + * @param {number} controllerHost.zoomLimit like: {min: 1, max: 2} + */ + + +function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) { + var target = controllerHost.target; + var zoomLimit = controllerHost.zoomLimit; + var pos = target.position; + var scale = target.scale; + var newZoom = controllerHost.zoom = controllerHost.zoom || 1; + newZoom *= zoomDelta; + + if (zoomLimit) { + var zoomMin = zoomLimit.min || 0; + var zoomMax = zoomLimit.max || Infinity; + newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin); + } + + var zoomScale = newZoom / controllerHost.zoom; + controllerHost.zoom = newZoom; // Keep the mouse center when scaling + + pos[0] -= (zoomX - pos[0]) * (zoomScale - 1); + pos[1] -= (zoomY - pos[1]) * (zoomScale - 1); + scale[0] *= zoomScale; + scale[1] *= zoomScale; + target.dirty(); +} + +exports.updateViewOnPan = updateViewOnPan; +exports.updateViewOnZoom = updateViewOnZoom; + +/***/ }), + +/***/ "0352": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var ComponentModel = __webpack_require__("6cb7"); + +var ComponentView = __webpack_require__("b12f"); + +var _sourceHelper = __webpack_require__("0f99"); + +var detectSourceFormat = _sourceHelper.detectSourceFormat; + +var _sourceType = __webpack_require__("93d0"); + +var SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * This module is imported by echarts directly. + * + * Notice: + * Always keep this file exists for backward compatibility. + * Because before 4.1.0, dataset is an optional component, + * some users may import this module manually. + */ +ComponentModel.extend({ + type: 'dataset', + + /** + * @protected + */ + defaultOption: { + // 'row', 'column' + seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN, + // null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper" + sourceHeader: null, + dimensions: null, + source: null + }, + optionUpdated: function () { + detectSourceFormat(this); + } +}); +ComponentView.extend({ + type: 'dataset' +}); + +/***/ }), + +/***/ "0366": +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__("1c0b"); + +// optional / simple context binding +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "04f6": +/***/ (function(module, exports) { + +// https://github.com/mziccard/node-timsort +var DEFAULT_MIN_MERGE = 32; +var DEFAULT_MIN_GALLOPING = 7; +var DEFAULT_TMP_STORAGE_LENGTH = 256; + +function minRunLength(n) { + var r = 0; + + while (n >= DEFAULT_MIN_MERGE) { + r |= n & 1; + n >>= 1; + } + + return n + r; +} + +function makeAscendingRun(array, lo, hi, compare) { + var runHi = lo + 1; + + if (runHi === hi) { + return 1; + } + + if (compare(array[runHi++], array[lo]) < 0) { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { + runHi++; + } + + reverseRun(array, lo, runHi); + } else { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { + runHi++; + } + } + + return runHi - lo; +} + +function reverseRun(array, lo, hi) { + hi--; + + while (lo < hi) { + var t = array[lo]; + array[lo++] = array[hi]; + array[hi--] = t; + } +} + +function binaryInsertionSort(array, lo, hi, start, compare) { + if (start === lo) { + start++; + } + + for (; start < hi; start++) { + var pivot = array[start]; + var left = lo; + var right = start; + var mid; + + while (left < right) { + mid = left + right >>> 1; + + if (compare(pivot, array[mid]) < 0) { + right = mid; + } else { + left = mid + 1; + } + } + + var n = start - left; + + switch (n) { + case 3: + array[left + 3] = array[left + 2]; + + case 2: + array[left + 2] = array[left + 1]; + + case 1: + array[left + 1] = array[left]; + break; + + default: + while (n > 0) { + array[left + n] = array[left + n - 1]; + n--; + } + + } + + array[left] = pivot; + } +} + +function gallopLeft(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) > 0) { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } else { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) > 0) { + lastOffset = m + 1; + } else { + offset = m; + } + } + + return offset; +} + +function gallopRight(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) < 0) { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } else { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) < 0) { + offset = m; + } else { + lastOffset = m + 1; + } + } + + return offset; +} + +function TimSort(array, compare) { + var minGallop = DEFAULT_MIN_GALLOPING; + var length = 0; + var tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH; + var stackLength = 0; + var runStart; + var runLength; + var stackSize = 0; + length = array.length; + + if (length < 2 * DEFAULT_TMP_STORAGE_LENGTH) { + tmpStorageLength = length >>> 1; + } + + var tmp = []; + stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40; + runStart = []; + runLength = []; + + function pushRun(_runStart, _runLength) { + runStart[stackSize] = _runStart; + runLength[stackSize] = _runLength; + stackSize += 1; + } + + function mergeRuns() { + while (stackSize > 1) { + var n = stackSize - 2; + + if (n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1] || n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1]) { + if (runLength[n - 1] < runLength[n + 1]) { + n--; + } + } else if (runLength[n] > runLength[n + 1]) { + break; + } + + mergeAt(n); + } + } + + function forceMergeRuns() { + while (stackSize > 1) { + var n = stackSize - 2; + + if (n > 0 && runLength[n - 1] < runLength[n + 1]) { + n--; + } + + mergeAt(n); + } + } + + function mergeAt(i) { + var start1 = runStart[i]; + var length1 = runLength[i]; + var start2 = runStart[i + 1]; + var length2 = runLength[i + 1]; + runLength[i] = length1 + length2; + + if (i === stackSize - 3) { + runStart[i + 1] = runStart[i + 2]; + runLength[i + 1] = runLength[i + 2]; + } + + stackSize--; + var k = gallopRight(array[start2], array, start1, length1, 0, compare); + start1 += k; + length1 -= k; + + if (length1 === 0) { + return; + } + + length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare); + + if (length2 === 0) { + return; + } + + if (length1 <= length2) { + mergeLow(start1, length1, start2, length2); + } else { + mergeHigh(start1, length1, start2, length2); + } + } + + function mergeLow(start1, length1, start2, length2) { + var i = 0; + + for (i = 0; i < length1; i++) { + tmp[i] = array[start1 + i]; + } + + var cursor1 = 0; + var cursor2 = start2; + var dest = start1; + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + return; + } + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + return; + } + + var _minGallop = minGallop; + var count1; + var count2; + var exit; + + while (1) { + count1 = 0; + count2 = 0; + exit = false; + + do { + if (compare(array[cursor2], tmp[cursor1]) < 0) { + array[dest++] = array[cursor2++]; + count2++; + count1 = 0; + + if (--length2 === 0) { + exit = true; + break; + } + } else { + array[dest++] = tmp[cursor1++]; + count1++; + count2 = 0; + + if (--length1 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < _minGallop); + + if (exit) { + break; + } + + do { + count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); + + if (count1 !== 0) { + for (i = 0; i < count1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + dest += count1; + cursor1 += count1; + length1 -= count1; + + if (length1 <= 1) { + exit = true; + break; + } + } + + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + exit = true; + break; + } + + count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); + + if (count2 !== 0) { + for (i = 0; i < count2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + dest += count2; + cursor2 += count2; + length2 -= count2; + + if (length2 === 0) { + exit = true; + break; + } + } + + array[dest++] = tmp[cursor1++]; + + if (--length1 === 1) { + exit = true; + break; + } + + _minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (_minGallop < 0) { + _minGallop = 0; + } + + _minGallop += 2; + } + + minGallop = _minGallop; + minGallop < 1 && (minGallop = 1); + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + } else if (length1 === 0) { + throw new Error(); // throw new Error('mergeLow preconditions were not respected'); + } else { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + } + } + + function mergeHigh(start1, length1, start2, length2) { + var i = 0; + + for (i = 0; i < length2; i++) { + tmp[i] = array[start2 + i]; + } + + var cursor1 = start1 + length1 - 1; + var cursor2 = length2 - 1; + var dest = start2 + length2 - 1; + var customCursor = 0; + var customDest = 0; + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + + return; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + return; + } + + var _minGallop = minGallop; + + while (true) { + var count1 = 0; + var count2 = 0; + var exit = false; + + do { + if (compare(tmp[cursor2], array[cursor1]) < 0) { + array[dest--] = array[cursor1--]; + count1++; + count2 = 0; + + if (--length1 === 0) { + exit = true; + break; + } + } else { + array[dest--] = tmp[cursor2--]; + count2++; + count1 = 0; + + if (--length2 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < _minGallop); + + if (exit) { + break; + } + + do { + count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare); + + if (count1 !== 0) { + dest -= count1; + cursor1 -= count1; + length1 -= count1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = count1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + if (length1 === 0) { + exit = true; + break; + } + } + + array[dest--] = tmp[cursor2--]; + + if (--length2 === 1) { + exit = true; + break; + } + + count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare); + + if (count2 !== 0) { + dest -= count2; + cursor2 -= count2; + length2 -= count2; + customDest = dest + 1; + customCursor = cursor2 + 1; + + for (i = 0; i < count2; i++) { + array[customDest + i] = tmp[customCursor + i]; + } + + if (length2 <= 1) { + exit = true; + break; + } + } + + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + exit = true; + break; + } + + _minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (_minGallop < 0) { + _minGallop = 0; + } + + _minGallop += 2; + } + + minGallop = _minGallop; + + if (minGallop < 1) { + minGallop = 1; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + } else if (length2 === 0) { + throw new Error(); // throw new Error('mergeHigh preconditions were not respected'); + } else { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + } + } + + this.mergeRuns = mergeRuns; + this.forceMergeRuns = forceMergeRuns; + this.pushRun = pushRun; +} + +function sort(array, compare, lo, hi) { + if (!lo) { + lo = 0; + } + + if (!hi) { + hi = array.length; + } + + var remaining = hi - lo; + + if (remaining < 2) { + return; + } + + var runLength = 0; + + if (remaining < DEFAULT_MIN_MERGE) { + runLength = makeAscendingRun(array, lo, hi, compare); + binaryInsertionSort(array, lo, hi, lo + runLength, compare); + return; + } + + var ts = new TimSort(array, compare); + var minRun = minRunLength(remaining); + + do { + runLength = makeAscendingRun(array, lo, hi, compare); + + if (runLength < minRun) { + var force = remaining; + + if (force > minRun) { + force = minRun; + } + + binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); + runLength = force; + } + + ts.pushRun(lo, runLength); + ts.mergeRuns(); + remaining -= runLength; + lo += runLength; + } while (remaining !== 0); + + ts.forceMergeRuns(); +} + +module.exports = sort; + +/***/ }), + +/***/ "057f": +/***/ (function(module, exports, __webpack_require__) { + +var toIndexedObject = __webpack_require__("fc6a"); +var nativeGetOwnPropertyNames = __webpack_require__("241c").f; + +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return nativeGetOwnPropertyNames(it); + } catch (error) { + return windowNames.slice(); + } +}; + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : nativeGetOwnPropertyNames(toIndexedObject(it)); +}; + + +/***/ }), + +/***/ "0655": +/***/ (function(module, exports, __webpack_require__) { + +var windingLine = __webpack_require__("8728"); + +var EPSILON = 1e-8; + +function isAroundEqual(a, b) { + return Math.abs(a - b) < EPSILON; +} + +function contain(points, x, y) { + var w = 0; + var p = points[0]; + + if (!p) { + return false; + } + + for (var i = 1; i < points.length; i++) { + var p2 = points[i]; + w += windingLine(p[0], p[1], p2[0], p2[1], x, y); + p = p2; + } // Close polygon + + + var p0 = points[0]; + + if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) { + w += windingLine(p[0], p[1], p0[0], p0[1], x, y); + } + + return w !== 0; +} + +exports.contain = contain; + +/***/ }), + +/***/ "06ad": +/***/ (function(module, exports, __webpack_require__) { + +var Clip = __webpack_require__("4436"); + +var color = __webpack_require__("41ef"); + +var _util = __webpack_require__("6d8b"); + +var isArrayLike = _util.isArrayLike; + +/** + * @module echarts/animation/Animator + */ +var arraySlice = Array.prototype.slice; + +function defaultGetter(target, key) { + return target[key]; +} + +function defaultSetter(target, key, value) { + target[key] = value; +} +/** + * @param {number} p0 + * @param {number} p1 + * @param {number} percent + * @return {number} + */ + + +function interpolateNumber(p0, p1, percent) { + return (p1 - p0) * percent + p0; +} +/** + * @param {string} p0 + * @param {string} p1 + * @param {number} percent + * @return {string} + */ + + +function interpolateString(p0, p1, percent) { + return percent > 0.5 ? p1 : p0; +} +/** + * @param {Array} p0 + * @param {Array} p1 + * @param {number} percent + * @param {Array} out + * @param {number} arrDim + */ + + +function interpolateArray(p0, p1, percent, out, arrDim) { + var len = p0.length; + + if (arrDim === 1) { + for (var i = 0; i < len; i++) { + out[i] = interpolateNumber(p0[i], p1[i], percent); + } + } else { + var len2 = len && p0[0].length; + + for (var i = 0; i < len; i++) { + for (var j = 0; j < len2; j++) { + out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent); + } + } + } +} // arr0 is source array, arr1 is target array. +// Do some preprocess to avoid error happened when interpolating from arr0 to arr1 + + +function fillArr(arr0, arr1, arrDim) { + var arr0Len = arr0.length; + var arr1Len = arr1.length; + + if (arr0Len !== arr1Len) { + // FIXME Not work for TypedArray + var isPreviousLarger = arr0Len > arr1Len; + + if (isPreviousLarger) { + // Cut the previous + arr0.length = arr1Len; + } else { + // Fill the previous + for (var i = arr0Len; i < arr1Len; i++) { + arr0.push(arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i])); + } + } + } // Handling NaN value + + + var len2 = arr0[0] && arr0[0].length; + + for (var i = 0; i < arr0.length; i++) { + if (arrDim === 1) { + if (isNaN(arr0[i])) { + arr0[i] = arr1[i]; + } + } else { + for (var j = 0; j < len2; j++) { + if (isNaN(arr0[i][j])) { + arr0[i][j] = arr1[i][j]; + } + } + } + } +} +/** + * @param {Array} arr0 + * @param {Array} arr1 + * @param {number} arrDim + * @return {boolean} + */ + + +function isArraySame(arr0, arr1, arrDim) { + if (arr0 === arr1) { + return true; + } + + var len = arr0.length; + + if (len !== arr1.length) { + return false; + } + + if (arrDim === 1) { + for (var i = 0; i < len; i++) { + if (arr0[i] !== arr1[i]) { + return false; + } + } + } else { + var len2 = arr0[0].length; + + for (var i = 0; i < len; i++) { + for (var j = 0; j < len2; j++) { + if (arr0[i][j] !== arr1[i][j]) { + return false; + } + } + } + } + + return true; +} +/** + * Catmull Rom interpolate array + * @param {Array} p0 + * @param {Array} p1 + * @param {Array} p2 + * @param {Array} p3 + * @param {number} t + * @param {number} t2 + * @param {number} t3 + * @param {Array} out + * @param {number} arrDim + */ + + +function catmullRomInterpolateArray(p0, p1, p2, p3, t, t2, t3, out, arrDim) { + var len = p0.length; + + if (arrDim === 1) { + for (var i = 0; i < len; i++) { + out[i] = catmullRomInterpolate(p0[i], p1[i], p2[i], p3[i], t, t2, t3); + } + } else { + var len2 = p0[0].length; + + for (var i = 0; i < len; i++) { + for (var j = 0; j < len2; j++) { + out[i][j] = catmullRomInterpolate(p0[i][j], p1[i][j], p2[i][j], p3[i][j], t, t2, t3); + } + } + } +} +/** + * Catmull Rom interpolate number + * @param {number} p0 + * @param {number} p1 + * @param {number} p2 + * @param {number} p3 + * @param {number} t + * @param {number} t2 + * @param {number} t3 + * @return {number} + */ + + +function catmullRomInterpolate(p0, p1, p2, p3, t, t2, t3) { + var v0 = (p2 - p0) * 0.5; + var v1 = (p3 - p1) * 0.5; + return (2 * (p1 - p2) + v0 + v1) * t3 + (-3 * (p1 - p2) - 2 * v0 - v1) * t2 + v0 * t + p1; +} + +function cloneValue(value) { + if (isArrayLike(value)) { + var len = value.length; + + if (isArrayLike(value[0])) { + var ret = []; + + for (var i = 0; i < len; i++) { + ret.push(arraySlice.call(value[i])); + } + + return ret; + } + + return arraySlice.call(value); + } + + return value; +} + +function rgba2String(rgba) { + rgba[0] = Math.floor(rgba[0]); + rgba[1] = Math.floor(rgba[1]); + rgba[2] = Math.floor(rgba[2]); + return 'rgba(' + rgba.join(',') + ')'; +} + +function getArrayDim(keyframes) { + var lastValue = keyframes[keyframes.length - 1].value; + return isArrayLike(lastValue && lastValue[0]) ? 2 : 1; +} + +function createTrackClip(animator, easing, oneTrackDone, keyframes, propName, forceAnimate) { + var getter = animator._getter; + var setter = animator._setter; + var useSpline = easing === 'spline'; + var trackLen = keyframes.length; + + if (!trackLen) { + return; + } // Guess data type + + + var firstVal = keyframes[0].value; + var isValueArray = isArrayLike(firstVal); + var isValueColor = false; + var isValueString = false; // For vertices morphing + + var arrDim = isValueArray ? getArrayDim(keyframes) : 0; + var trackMaxTime; // Sort keyframe as ascending + + keyframes.sort(function (a, b) { + return a.time - b.time; + }); + trackMaxTime = keyframes[trackLen - 1].time; // Percents of each keyframe + + var kfPercents = []; // Value of each keyframe + + var kfValues = []; + var prevValue = keyframes[0].value; + var isAllValueEqual = true; + + for (var i = 0; i < trackLen; i++) { + kfPercents.push(keyframes[i].time / trackMaxTime); // Assume value is a color when it is a string + + var value = keyframes[i].value; // Check if value is equal, deep check if value is array + + if (!(isValueArray && isArraySame(value, prevValue, arrDim) || !isValueArray && value === prevValue)) { + isAllValueEqual = false; + } + + prevValue = value; // Try converting a string to a color array + + if (typeof value === 'string') { + var colorArray = color.parse(value); + + if (colorArray) { + value = colorArray; + isValueColor = true; + } else { + isValueString = true; + } + } + + kfValues.push(value); + } + + if (!forceAnimate && isAllValueEqual) { + return; + } + + var lastValue = kfValues[trackLen - 1]; // Polyfill array and NaN value + + for (var i = 0; i < trackLen - 1; i++) { + if (isValueArray) { + fillArr(kfValues[i], lastValue, arrDim); + } else { + if (isNaN(kfValues[i]) && !isNaN(lastValue) && !isValueString && !isValueColor) { + kfValues[i] = lastValue; + } + } + } + + isValueArray && fillArr(getter(animator._target, propName), lastValue, arrDim); // Cache the key of last frame to speed up when + // animation playback is sequency + + var lastFrame = 0; + var lastFramePercent = 0; + var start; + var w; + var p0; + var p1; + var p2; + var p3; + + if (isValueColor) { + var rgba = [0, 0, 0, 0]; + } + + var onframe = function (target, percent) { + // Find the range keyframes + // kf1-----kf2---------current--------kf3 + // find kf2 and kf3 and do interpolation + var frame; // In the easing function like elasticOut, percent may less than 0 + + if (percent < 0) { + frame = 0; + } else if (percent < lastFramePercent) { + // Start from next key + // PENDING start from lastFrame ? + start = Math.min(lastFrame + 1, trackLen - 1); + + for (frame = start; frame >= 0; frame--) { + if (kfPercents[frame] <= percent) { + break; + } + } // PENDING really need to do this ? + + + frame = Math.min(frame, trackLen - 2); + } else { + for (frame = lastFrame; frame < trackLen; frame++) { + if (kfPercents[frame] > percent) { + break; + } + } + + frame = Math.min(frame - 1, trackLen - 2); + } + + lastFrame = frame; + lastFramePercent = percent; + var range = kfPercents[frame + 1] - kfPercents[frame]; + + if (range === 0) { + return; + } else { + w = (percent - kfPercents[frame]) / range; + } + + if (useSpline) { + p1 = kfValues[frame]; + p0 = kfValues[frame === 0 ? frame : frame - 1]; + p2 = kfValues[frame > trackLen - 2 ? trackLen - 1 : frame + 1]; + p3 = kfValues[frame > trackLen - 3 ? trackLen - 1 : frame + 2]; + + if (isValueArray) { + catmullRomInterpolateArray(p0, p1, p2, p3, w, w * w, w * w * w, getter(target, propName), arrDim); + } else { + var value; + + if (isValueColor) { + value = catmullRomInterpolateArray(p0, p1, p2, p3, w, w * w, w * w * w, rgba, 1); + value = rgba2String(rgba); + } else if (isValueString) { + // String is step(0.5) + return interpolateString(p1, p2, w); + } else { + value = catmullRomInterpolate(p0, p1, p2, p3, w, w * w, w * w * w); + } + + setter(target, propName, value); + } + } else { + if (isValueArray) { + interpolateArray(kfValues[frame], kfValues[frame + 1], w, getter(target, propName), arrDim); + } else { + var value; + + if (isValueColor) { + interpolateArray(kfValues[frame], kfValues[frame + 1], w, rgba, 1); + value = rgba2String(rgba); + } else if (isValueString) { + // String is step(0.5) + return interpolateString(kfValues[frame], kfValues[frame + 1], w); + } else { + value = interpolateNumber(kfValues[frame], kfValues[frame + 1], w); + } + + setter(target, propName, value); + } + } + }; + + var clip = new Clip({ + target: animator._target, + life: trackMaxTime, + loop: animator._loop, + delay: animator._delay, + onframe: onframe, + ondestroy: oneTrackDone + }); + + if (easing && easing !== 'spline') { + clip.easing = easing; + } + + return clip; +} +/** + * @alias module:zrender/animation/Animator + * @constructor + * @param {Object} target + * @param {boolean} loop + * @param {Function} getter + * @param {Function} setter + */ + + +var Animator = function (target, loop, getter, setter) { + this._tracks = {}; + this._target = target; + this._loop = loop || false; + this._getter = getter || defaultGetter; + this._setter = setter || defaultSetter; + this._clipCount = 0; + this._delay = 0; + this._doneList = []; + this._onframeList = []; + this._clipList = []; +}; + +Animator.prototype = { + /** + * Set Animation keyframe + * @param {number} time 关键帧时间,单位是ms + * @param {Object} props 关键帧的属性值,key-value表示 + * @return {module:zrender/animation/Animator} + */ + when: function (time + /* ms */ + , props) { + var tracks = this._tracks; + + for (var propName in props) { + if (!props.hasOwnProperty(propName)) { + continue; + } + + if (!tracks[propName]) { + tracks[propName] = []; // Invalid value + + var value = this._getter(this._target, propName); + + if (value == null) { + // zrLog('Invalid property ' + propName); + continue; + } // If time is 0 + // Then props is given initialize value + // Else + // Initialize value from current prop value + + + if (time !== 0) { + tracks[propName].push({ + time: 0, + value: cloneValue(value) + }); + } + } + + tracks[propName].push({ + time: time, + value: props[propName] + }); + } + + return this; + }, + + /** + * 添加动画每一帧的回调函数 + * @param {Function} callback + * @return {module:zrender/animation/Animator} + */ + during: function (callback) { + this._onframeList.push(callback); + + return this; + }, + pause: function () { + for (var i = 0; i < this._clipList.length; i++) { + this._clipList[i].pause(); + } + + this._paused = true; + }, + resume: function () { + for (var i = 0; i < this._clipList.length; i++) { + this._clipList[i].resume(); + } + + this._paused = false; + }, + isPaused: function () { + return !!this._paused; + }, + _doneCallback: function () { + // Clear all tracks + this._tracks = {}; // Clear all clips + + this._clipList.length = 0; + var doneList = this._doneList; + var len = doneList.length; + + for (var i = 0; i < len; i++) { + doneList[i].call(this); + } + }, + + /** + * Start the animation + * @param {string|Function} [easing] + * 动画缓动函数,详见{@link module:zrender/animation/easing} + * @param {boolean} forceAnimate + * @return {module:zrender/animation/Animator} + */ + start: function (easing, forceAnimate) { + var self = this; + var clipCount = 0; + + var oneTrackDone = function () { + clipCount--; + + if (!clipCount) { + self._doneCallback(); + } + }; + + var lastClip; + + for (var propName in this._tracks) { + if (!this._tracks.hasOwnProperty(propName)) { + continue; + } + + var clip = createTrackClip(this, easing, oneTrackDone, this._tracks[propName], propName, forceAnimate); + + if (clip) { + this._clipList.push(clip); + + clipCount++; // If start after added to animation + + if (this.animation) { + this.animation.addClip(clip); + } + + lastClip = clip; + } + } // Add during callback on the last clip + + + if (lastClip) { + var oldOnFrame = lastClip.onframe; + + lastClip.onframe = function (target, percent) { + oldOnFrame(target, percent); + + for (var i = 0; i < self._onframeList.length; i++) { + self._onframeList[i](target, percent); + } + }; + } // This optimization will help the case that in the upper application + // the view may be refreshed frequently, where animation will be + // called repeatly but nothing changed. + + + if (!clipCount) { + this._doneCallback(); + } + + return this; + }, + + /** + * Stop animation + * @param {boolean} forwardToLast If move to last frame before stop + */ + stop: function (forwardToLast) { + var clipList = this._clipList; + var animation = this.animation; + + for (var i = 0; i < clipList.length; i++) { + var clip = clipList[i]; + + if (forwardToLast) { + // Move to last frame before stop + clip.onframe(this._target, 1); + } + + animation && animation.removeClip(clip); + } + + clipList.length = 0; + }, + + /** + * Set when animation delay starts + * @param {number} time 单位ms + * @return {module:zrender/animation/Animator} + */ + delay: function (time) { + this._delay = time; + return this; + }, + + /** + * Add callback for animation end + * @param {Function} cb + * @return {module:zrender/animation/Animator} + */ + done: function (cb) { + if (cb) { + this._doneList.push(cb); + } + + return this; + }, + + /** + * @return {Array.} + */ + getClips: function () { + return this._clipList; + } +}; +var _default = Animator; +module.exports = _default; + +/***/ }), + +/***/ "06c7": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Model = __webpack_require__("4319"); + +var linkList = __webpack_require__("31d9"); + +var List = __webpack_require__("6179"); + +var createDimensions = __webpack_require__("b1d4"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Tree data structure + * + * @module echarts/data/Tree + */ + +/** + * @constructor module:echarts/data/Tree~TreeNode + * @param {string} name + * @param {module:echarts/data/Tree} hostTree + */ +var TreeNode = function (name, hostTree) { + /** + * @type {string} + */ + this.name = name || ''; + /** + * Depth of node + * + * @type {number} + * @readOnly + */ + + this.depth = 0; + /** + * Height of the subtree rooted at this node. + * @type {number} + * @readOnly + */ + + this.height = 0; + /** + * @type {module:echarts/data/Tree~TreeNode} + * @readOnly + */ + + this.parentNode = null; + /** + * Reference to list item. + * Do not persistent dataIndex outside, + * besause it may be changed by list. + * If dataIndex -1, + * this node is logical deleted (filtered) in list. + * + * @type {Object} + * @readOnly + */ + + this.dataIndex = -1; + /** + * @type {Array.} + * @readOnly + */ + + this.children = []; + /** + * @type {Array.} + * @pubilc + */ + + this.viewChildren = []; + /** + * @type {moduel:echarts/data/Tree} + * @readOnly + */ + + this.hostTree = hostTree; +}; + +TreeNode.prototype = { + constructor: TreeNode, + + /** + * The node is removed. + * @return {boolean} is removed. + */ + isRemoved: function () { + return this.dataIndex < 0; + }, + + /** + * Travel this subtree (include this node). + * Usage: + * node.eachNode(function () { ... }); // preorder + * node.eachNode('preorder', function () { ... }); // preorder + * node.eachNode('postorder', function () { ... }); // postorder + * node.eachNode( + * {order: 'postorder', attr: 'viewChildren'}, + * function () { ... } + * ); // postorder + * + * @param {(Object|string)} options If string, means order. + * @param {string=} options.order 'preorder' or 'postorder' + * @param {string=} options.attr 'children' or 'viewChildren' + * @param {Function} cb If in preorder and return false, + * its subtree will not be visited. + * @param {Object} [context] + */ + eachNode: function (options, cb, context) { + if (typeof options === 'function') { + context = cb; + cb = options; + options = null; + } + + options = options || {}; + + if (zrUtil.isString(options)) { + options = { + order: options + }; + } + + var order = options.order || 'preorder'; + var children = this[options.attr || 'children']; + var suppressVisitSub; + order === 'preorder' && (suppressVisitSub = cb.call(context, this)); + + for (var i = 0; !suppressVisitSub && i < children.length; i++) { + children[i].eachNode(options, cb, context); + } + + order === 'postorder' && cb.call(context, this); + }, + + /** + * Update depth and height of this subtree. + * + * @param {number} depth + */ + updateDepthAndHeight: function (depth) { + var height = 0; + this.depth = depth; + + for (var i = 0; i < this.children.length; i++) { + var child = this.children[i]; + child.updateDepthAndHeight(depth + 1); + + if (child.height > height) { + height = child.height; + } + } + + this.height = height + 1; + }, + + /** + * @param {string} id + * @return {module:echarts/data/Tree~TreeNode} + */ + getNodeById: function (id) { + if (this.getId() === id) { + return this; + } + + for (var i = 0, children = this.children, len = children.length; i < len; i++) { + var res = children[i].getNodeById(id); + + if (res) { + return res; + } + } + }, + + /** + * @param {module:echarts/data/Tree~TreeNode} node + * @return {boolean} + */ + contains: function (node) { + if (node === this) { + return true; + } + + for (var i = 0, children = this.children, len = children.length; i < len; i++) { + var res = children[i].contains(node); + + if (res) { + return res; + } + } + }, + + /** + * @param {boolean} includeSelf Default false. + * @return {Array.} order: [root, child, grandchild, ...] + */ + getAncestors: function (includeSelf) { + var ancestors = []; + var node = includeSelf ? this : this.parentNode; + + while (node) { + ancestors.push(node); + node = node.parentNode; + } + + ancestors.reverse(); + return ancestors; + }, + + /** + * @param {string|Array=} [dimension='value'] Default 'value'. can be 0, 1, 2, 3 + * @return {number} Value. + */ + getValue: function (dimension) { + var data = this.hostTree.data; + return data.get(data.getDimension(dimension || 'value'), this.dataIndex); + }, + + /** + * @param {Object} layout + * @param {boolean=} [merge=false] + */ + setLayout: function (layout, merge) { + this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge); + }, + + /** + * @return {Object} layout + */ + getLayout: function () { + return this.hostTree.data.getItemLayout(this.dataIndex); + }, + + /** + * @param {string} [path] + * @return {module:echarts/model/Model} + */ + getModel: function (path) { + if (this.dataIndex < 0) { + return; + } + + var hostTree = this.hostTree; + var itemModel = hostTree.data.getItemModel(this.dataIndex); + var levelModel = this.getLevelModel(); // FIXME: refactor levelModel to "beforeLink", and remove levelModel here. + + if (levelModel) { + return itemModel.getModel(path, levelModel.getModel(path)); + } else { + return itemModel.getModel(path); + } + }, + + /** + * @return {module:echarts/model/Model} + */ + getLevelModel: function () { + return (this.hostTree.levelModels || [])[this.depth]; + }, + + /** + * @example + * setItemVisual('color', color); + * setItemVisual({ + * 'color': color + * }); + */ + setVisual: function (key, value) { + this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value); + }, + + /** + * Get item visual + */ + getVisual: function (key, ignoreParent) { + return this.hostTree.data.getItemVisual(this.dataIndex, key, ignoreParent); + }, + + /** + * @public + * @return {number} + */ + getRawIndex: function () { + return this.hostTree.data.getRawIndex(this.dataIndex); + }, + + /** + * @public + * @return {string} + */ + getId: function () { + return this.hostTree.data.getId(this.dataIndex); + }, + + /** + * if this is an ancestor of another node + * + * @public + * @param {TreeNode} node another node + * @return {boolean} if is ancestor + */ + isAncestorOf: function (node) { + var parent = node.parentNode; + + while (parent) { + if (parent === this) { + return true; + } + + parent = parent.parentNode; + } + + return false; + }, + + /** + * if this is an descendant of another node + * + * @public + * @param {TreeNode} node another node + * @return {boolean} if is descendant + */ + isDescendantOf: function (node) { + return node !== this && node.isAncestorOf(this); + } +}; +/** + * @constructor + * @alias module:echarts/data/Tree + * @param {module:echarts/model/Model} hostModel + * @param {Array.} levelOptions + */ + +function Tree(hostModel, levelOptions) { + /** + * @type {module:echarts/data/Tree~TreeNode} + * @readOnly + */ + this.root; + /** + * @type {module:echarts/data/List} + * @readOnly + */ + + this.data; + /** + * Index of each item is the same as the raw index of coresponding list item. + * @private + * @type {Array.} treeOptions.levels + * @return module:echarts/data/Tree + */ + +Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) { + var tree = new Tree(hostModel, treeOptions && treeOptions.levels); + var listData = []; + var dimMax = 1; + buildHierarchy(dataRoot); + + function buildHierarchy(dataNode, parentNode) { + var value = dataNode.value; + dimMax = Math.max(dimMax, zrUtil.isArray(value) ? value.length : 1); + listData.push(dataNode); + var node = new TreeNode(dataNode.name, tree); + parentNode ? addChild(node, parentNode) : tree.root = node; + + tree._nodes.push(node); + + var children = dataNode.children; + + if (children) { + for (var i = 0; i < children.length; i++) { + buildHierarchy(children[i], node); + } + } + } + + tree.root.updateDepthAndHeight(0); + var dimensionsInfo = createDimensions(listData, { + coordDimensions: ['value'], + dimensionsCount: dimMax + }); + var list = new List(dimensionsInfo, hostModel); + list.initData(listData); + beforeLink && beforeLink(list); + linkList({ + mainData: list, + struct: tree, + structAttr: 'tree' + }); + tree.update(); + return tree; +}; +/** + * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote, + * so this function is not ready and not necessary to be public. + * + * @param {(module:echarts/data/Tree~TreeNode|Object)} child + */ + + +function addChild(child, node) { + var children = node.children; + + if (child.parentNode === node) { + return; + } + + children.push(child); + child.parentNode = node; +} + +var _default = Tree; +module.exports = _default; + +/***/ }), + +/***/ "06cf": +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__("83ab"); +var propertyIsEnumerableModule = __webpack_require__("d1e7"); +var createPropertyDescriptor = __webpack_require__("5c6c"); +var toIndexedObject = __webpack_require__("fc6a"); +var toPrimitive = __webpack_require__("c04e"); +var has = __webpack_require__("5135"); +var IE8_DOM_DEFINE = __webpack_require__("0cfb"); + +var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor +exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); +}; + + +/***/ }), + +/***/ "06ea": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var zrUtil = __webpack_require__("6d8b"); + +var VisualMapModel = __webpack_require__("eaea"); + +var VisualMapping = __webpack_require__("5f14"); + +var visualDefault = __webpack_require__("60e3"); + +var _number = __webpack_require__("3842"); + +var reformIntervals = _number.reformIntervals; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var PiecewiseModel = VisualMapModel.extend({ + type: 'visualMap.piecewise', + + /** + * Order Rule: + * + * option.categories / option.pieces / option.text / option.selected: + * If !option.inverse, + * Order when vertical: ['top', ..., 'bottom']. + * Order when horizontal: ['left', ..., 'right']. + * If option.inverse, the meaning of + * the order should be reversed. + * + * this._pieceList: + * The order is always [low, ..., high]. + * + * Mapping from location to low-high: + * If !option.inverse + * When vertical, top is high. + * When horizontal, right is high. + * If option.inverse, reverse. + */ + + /** + * @protected + */ + defaultOption: { + selected: null, + // Object. If not specified, means selected. + // When pieces and splitNumber: {'0': true, '5': true} + // When categories: {'cate1': false, 'cate3': true} + // When selected === false, means all unselected. + minOpen: false, + // Whether include values that smaller than `min`. + maxOpen: false, + // Whether include values that bigger than `max`. + align: 'auto', + // 'auto', 'left', 'right' + itemWidth: 20, + // When put the controller vertically, it is the length of + // horizontal side of each item. Otherwise, vertical side. + itemHeight: 14, + // When put the controller vertically, it is the length of + // vertical side of each item. Otherwise, horizontal side. + itemSymbol: 'roundRect', + pieceList: null, + // Each item is Object, with some of those attrs: + // {min, max, lt, gt, lte, gte, value, + // color, colorSaturation, colorAlpha, opacity, + // symbol, symbolSize}, which customize the range or visual + // coding of the certain piece. Besides, see "Order Rule". + categories: null, + // category names, like: ['some1', 'some2', 'some3']. + // Attr min/max are ignored when categories set. See "Order Rule" + splitNumber: 5, + // If set to 5, auto split five pieces equally. + // If set to 0 and component type not set, component type will be + // determined as "continuous". (It is less reasonable but for ec2 + // compatibility, see echarts/component/visualMap/typeDefaulter) + selectedMode: 'multiple', + // Can be 'multiple' or 'single'. + itemGap: 10, + // The gap between two items, in px. + hoverLink: true, + // Enable hover highlight. + showLabel: null // By default, when text is used, label will hide (the logic + // is remained for compatibility reason) + + }, + + /** + * @override + */ + optionUpdated: function (newOption, isInit) { + PiecewiseModel.superApply(this, 'optionUpdated', arguments); + /** + * The order is always [low, ..., high]. + * [{text: string, interval: Array.}, ...] + * @private + * @type {Array.} + */ + + this._pieceList = []; + this.resetExtent(); + /** + * 'pieces', 'categories', 'splitNumber' + * @type {string} + */ + + var mode = this._mode = this._determineMode(); + + resetMethods[this._mode].call(this); + + this._resetSelected(newOption, isInit); + + var categories = this.option.categories; + this.resetVisual(function (mappingOption, state) { + if (mode === 'categories') { + mappingOption.mappingMethod = 'category'; + mappingOption.categories = zrUtil.clone(categories); + } else { + mappingOption.dataExtent = this.getExtent(); + mappingOption.mappingMethod = 'piecewise'; + mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) { + var piece = zrUtil.clone(piece); + + if (state !== 'inRange') { + // FIXME + // outOfRange do not support special visual in pieces. + piece.visual = null; + } + + return piece; + }); + } + }); + }, + + /** + * @protected + * @override + */ + completeVisualOption: function () { + // Consider this case: + // visualMap: { + // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}] + // } + // where no inRange/outOfRange set but only pieces. So we should make + // default inRange/outOfRange for this case, otherwise visuals that only + // appear in `pieces` will not be taken into account in visual encoding. + var option = this.option; + var visualTypesInPieces = {}; + var visualTypes = VisualMapping.listVisualTypes(); + var isCategory = this.isCategory(); + zrUtil.each(option.pieces, function (piece) { + zrUtil.each(visualTypes, function (visualType) { + if (piece.hasOwnProperty(visualType)) { + visualTypesInPieces[visualType] = 1; + } + }); + }); + zrUtil.each(visualTypesInPieces, function (v, visualType) { + var exists = 0; + zrUtil.each(this.stateList, function (state) { + exists |= has(option, state, visualType) || has(option.target, state, visualType); + }, this); + !exists && zrUtil.each(this.stateList, function (state) { + (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory); + }); + }, this); + + function has(obj, state, visualType) { + return obj && obj[state] && (zrUtil.isObject(obj[state]) ? obj[state].hasOwnProperty(visualType) : obj[state] === visualType // e.g., inRange: 'symbol' + ); + } + + VisualMapModel.prototype.completeVisualOption.apply(this, arguments); + }, + _resetSelected: function (newOption, isInit) { + var thisOption = this.option; + var pieceList = this._pieceList; // Selected do not merge but all override. + + var selected = (isInit ? thisOption : newOption).selected || {}; + thisOption.selected = selected; // Consider 'not specified' means true. + + zrUtil.each(pieceList, function (piece, index) { + var key = this.getSelectedMapKey(piece); + + if (!selected.hasOwnProperty(key)) { + selected[key] = true; + } + }, this); + + if (thisOption.selectedMode === 'single') { + // Ensure there is only one selected. + var hasSel = false; + zrUtil.each(pieceList, function (piece, index) { + var key = this.getSelectedMapKey(piece); + + if (selected[key]) { + hasSel ? selected[key] = false : hasSel = true; + } + }, this); + } // thisOption.selectedMode === 'multiple', default: all selected. + + }, + + /** + * @public + */ + getSelectedMapKey: function (piece) { + return this._mode === 'categories' ? piece.value + '' : piece.index + ''; + }, + + /** + * @public + */ + getPieceList: function () { + return this._pieceList; + }, + + /** + * @private + * @return {string} + */ + _determineMode: function () { + var option = this.option; + return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber'; + }, + + /** + * @public + * @override + */ + setSelected: function (selected) { + this.option.selected = zrUtil.clone(selected); + }, + + /** + * @public + * @override + */ + getValueState: function (value) { + var index = VisualMapping.findPieceIndex(value, this._pieceList); + return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange'; + }, + + /** + * @public + * @params {number} pieceIndex piece index in visualMapModel.getPieceList() + * @return {Array.} [{seriesId, dataIndex: >}, ...] + */ + findTargetDataIndices: function (pieceIndex) { + var result = []; + this.eachTargetSeries(function (seriesModel) { + var dataIndices = []; + var data = seriesModel.getData(); + data.each(this.getDataDimension(data), function (value, dataIndex) { + // Should always base on model pieceList, because it is order sensitive. + var pIdx = VisualMapping.findPieceIndex(value, this._pieceList); + pIdx === pieceIndex && dataIndices.push(dataIndex); + }, this); + result.push({ + seriesId: seriesModel.id, + dataIndex: dataIndices + }); + }, this); + return result; + }, + + /** + * @private + * @param {Object} piece piece.value or piece.interval is required. + * @return {number} Can be Infinity or -Infinity + */ + getRepresentValue: function (piece) { + var representValue; + + if (this.isCategory()) { + representValue = piece.value; + } else { + if (piece.value != null) { + representValue = piece.value; + } else { + var pieceInterval = piece.interval || []; + representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2; + } + } + + return representValue; + }, + getVisualMeta: function (getColorVisual) { + // Do not support category. (category axis is ordinal, numerical) + if (this.isCategory()) { + return; + } + + var stops = []; + var outerColors = []; + var visualMapModel = this; + + function setStop(interval, valueState) { + var representValue = visualMapModel.getRepresentValue({ + interval: interval + }); + + if (!valueState) { + valueState = visualMapModel.getValueState(representValue); + } + + var color = getColorVisual(representValue, valueState); + + if (interval[0] === -Infinity) { + outerColors[0] = color; + } else if (interval[1] === Infinity) { + outerColors[1] = color; + } else { + stops.push({ + value: interval[0], + color: color + }, { + value: interval[1], + color: color + }); + } + } // Suplement + + + var pieceList = this._pieceList.slice(); + + if (!pieceList.length) { + pieceList.push({ + interval: [-Infinity, Infinity] + }); + } else { + var edge = pieceList[0].interval[0]; + edge !== -Infinity && pieceList.unshift({ + interval: [-Infinity, edge] + }); + edge = pieceList[pieceList.length - 1].interval[1]; + edge !== Infinity && pieceList.push({ + interval: [edge, Infinity] + }); + } + + var curr = -Infinity; + zrUtil.each(pieceList, function (piece) { + var interval = piece.interval; + + if (interval) { + // Fulfill gap. + interval[0] > curr && setStop([curr, interval[0]], 'outOfRange'); + setStop(interval.slice()); + curr = interval[1]; + } + }, this); + return { + stops: stops, + outerColors: outerColors + }; + } +}); +/** + * Key is this._mode + * @type {Object} + * @this {module:echarts/component/viusalMap/PiecewiseMode} + */ + +var resetMethods = { + splitNumber: function () { + var thisOption = this.option; + var pieceList = this._pieceList; + var precision = Math.min(thisOption.precision, 20); + var dataExtent = this.getExtent(); + var splitNumber = thisOption.splitNumber; + splitNumber = Math.max(parseInt(splitNumber, 10), 1); + thisOption.splitNumber = splitNumber; + var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption + + while (+splitStep.toFixed(precision) !== splitStep && precision < 5) { + precision++; + } + + thisOption.precision = precision; + splitStep = +splitStep.toFixed(precision); + + if (thisOption.minOpen) { + pieceList.push({ + interval: [-Infinity, dataExtent[0]], + close: [0, 0] + }); + } + + for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) { + var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep; + pieceList.push({ + interval: [curr, max], + close: [1, 1] + }); + } + + if (thisOption.maxOpen) { + pieceList.push({ + interval: [dataExtent[1], Infinity], + close: [0, 0] + }); + } + + reformIntervals(pieceList); + zrUtil.each(pieceList, function (piece, index) { + piece.index = index; + piece.text = this.formatValueText(piece.interval); + }, this); + }, + categories: function () { + var thisOption = this.option; + zrUtil.each(thisOption.categories, function (cate) { + // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。 + // 是否改一致。 + this._pieceList.push({ + text: this.formatValueText(cate, true), + value: cate + }); + }, this); // See "Order Rule". + + normalizeReverse(thisOption, this._pieceList); + }, + pieces: function () { + var thisOption = this.option; + var pieceList = this._pieceList; + zrUtil.each(thisOption.pieces, function (pieceListItem, index) { + if (!zrUtil.isObject(pieceListItem)) { + pieceListItem = { + value: pieceListItem + }; + } + + var item = { + text: '', + index: index + }; + + if (pieceListItem.label != null) { + item.text = pieceListItem.label; + } + + if (pieceListItem.hasOwnProperty('value')) { + var value = item.value = pieceListItem.value; + item.interval = [value, value]; + item.close = [1, 1]; + } else { + // `min` `max` is legacy option. + // `lt` `gt` `lte` `gte` is recommanded. + var interval = item.interval = []; + var close = item.close = [0, 0]; + var closeList = [1, 0, 1]; + var infinityList = [-Infinity, Infinity]; + var useMinMax = []; + + for (var lg = 0; lg < 2; lg++) { + var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg]; + + for (var i = 0; i < 3 && interval[lg] == null; i++) { + interval[lg] = pieceListItem[names[i]]; + close[lg] = closeList[i]; + useMinMax[lg] = i === 2; + } + + interval[lg] == null && (interval[lg] = infinityList[lg]); + } + + useMinMax[0] && interval[1] === Infinity && (close[0] = 0); + useMinMax[1] && interval[0] === -Infinity && (close[1] = 0); + + if (interval[0] === interval[1] && close[0] && close[1]) { + // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}], + // we use value to lift the priority when min === max + item.value = interval[0]; + } + } + + item.visual = VisualMapping.retrieveVisuals(pieceListItem); + pieceList.push(item); + }, this); // See "Order Rule". + + normalizeReverse(thisOption, pieceList); // Only pieces + + reformIntervals(pieceList); + zrUtil.each(pieceList, function (piece) { + var close = piece.close; + var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]]; + piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols); + }, this); + } +}; + +function normalizeReverse(thisOption, pieceList) { + var inverse = thisOption.inverse; + + if (thisOption.orient === 'vertical' ? !inverse : inverse) { + pieceList.reverse(); + } +} + +var _default = PiecewiseModel; +module.exports = _default; + +/***/ }), + +/***/ "07d7": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var zrColor = __webpack_require__("41ef"); + +var eventUtil = __webpack_require__("607d"); + +var domUtil = __webpack_require__("65ed"); + +var env = __webpack_require__("22d1"); + +var formatUtil = __webpack_require__("eda2"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var each = zrUtil.each; +var toCamelCase = formatUtil.toCamelCase; +var vendors = ['', '-webkit-', '-moz-', '-o-']; +var gCssText = 'position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;'; +/** + * @param {number} duration + * @return {string} + * @inner + */ + +function assembleTransition(duration) { + var transitionCurve = 'cubic-bezier(0.23, 1, 0.32, 1)'; + var transitionText = 'left ' + duration + 's ' + transitionCurve + ',' + 'top ' + duration + 's ' + transitionCurve; + return zrUtil.map(vendors, function (vendorPrefix) { + return vendorPrefix + 'transition:' + transitionText; + }).join(';'); +} +/** + * @param {Object} textStyle + * @return {string} + * @inner + */ + + +function assembleFont(textStyleModel) { + var cssText = []; + var fontSize = textStyleModel.get('fontSize'); + var color = textStyleModel.getTextColor(); + color && cssText.push('color:' + color); + cssText.push('font:' + textStyleModel.getFont()); + fontSize && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px'); + each(['decoration', 'align'], function (name) { + var val = textStyleModel.get(name); + val && cssText.push('text-' + name + ':' + val); + }); + return cssText.join(';'); +} +/** + * @param {Object} tooltipModel + * @return {string} + * @inner + */ + + +function assembleCssText(tooltipModel) { + var cssText = []; + var transitionDuration = tooltipModel.get('transitionDuration'); + var backgroundColor = tooltipModel.get('backgroundColor'); + var textStyleModel = tooltipModel.getModel('textStyle'); + var padding = tooltipModel.get('padding'); // Animation transition. Do not animate when transitionDuration is 0. + + transitionDuration && cssText.push(assembleTransition(transitionDuration)); + + if (backgroundColor) { + if (env.canvasSupported) { + cssText.push('background-Color:' + backgroundColor); + } else { + // for ie + cssText.push('background-Color:#' + zrColor.toHex(backgroundColor)); + cssText.push('filter:alpha(opacity=70)'); + } + } // Border style + + + each(['width', 'color', 'radius'], function (name) { + var borderName = 'border-' + name; + var camelCase = toCamelCase(borderName); + var val = tooltipModel.get(camelCase); + val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px')); + }); // Text style + + cssText.push(assembleFont(textStyleModel)); // Padding + + if (padding != null) { + cssText.push('padding:' + formatUtil.normalizeCssArray(padding).join('px ') + 'px'); + } + + return cssText.join(';') + ';'; +} // If not able to make, do not modify the input `out`. + + +function makeStyleCoord(out, zr, appendToBody, zrX, zrY) { + var zrPainter = zr && zr.painter; + + if (appendToBody) { + var zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); + + if (zrViewportRoot) { + // Some APPs might use scale on body, so we support CSS transform here. + domUtil.transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY); + } + } else { + out[0] = zrX; + out[1] = zrY; // xy should be based on canvas root. But tooltipContent is + // the sibling of canvas root. So padding of ec container + // should be considered here. + + var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset(); + + if (viewportRootOffset) { + out[0] += viewportRootOffset.offsetLeft; + out[1] += viewportRootOffset.offsetTop; + } + } +} +/** + * @alias module:echarts/component/tooltip/TooltipContent + * @param {HTMLElement} container + * @param {ExtensionAPI} api + * @param {Object} [opt] + * @param {boolean} [opt.appendToBody] + * `false`: the DOM element will be inside the container. Default value. + * `true`: the DOM element will be appended to HTML body, which avoid + * some overflow clip but intrude outside of the container. + * @constructor + */ + + +function TooltipContent(container, api, opt) { + if (env.wxa) { + return null; + } + + var el = document.createElement('div'); + el.domBelongToZr = true; + this.el = el; + var zr = this._zr = api.getZr(); + var appendToBody = this._appendToBody = opt && opt.appendToBody; + this._styleCoord = [0, 0]; + makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2); + + if (appendToBody) { + document.body.appendChild(el); + } else { + container.appendChild(el); + } + + this._container = container; + this._show = false; + /** + * @private + */ + + this._hideTimeout; // FIXME + // Is it needed to trigger zr event manually if + // the browser do not support `pointer-events: none`. + + var self = this; + + el.onmouseenter = function () { + // clear the timeout in hideLater and keep showing tooltip + if (self._enterable) { + clearTimeout(self._hideTimeout); + self._show = true; + } + + self._inContent = true; + }; + + el.onmousemove = function (e) { + e = e || window.event; + + if (!self._enterable) { + // `pointer-events: none` is set to tooltip content div + // if `enterable` is set as `false`, and `el.onmousemove` + // can not be triggered. But in browser that do not + // support `pointer-events`, we need to do this: + // Try trigger zrender event to avoid mouse + // in and out shape too frequently + var handler = zr.handler; + var zrViewportRoot = zr.painter.getViewportRoot(); + eventUtil.normalizeEvent(zrViewportRoot, e, true); + handler.dispatch('mousemove', e); + } + }; + + el.onmouseleave = function () { + if (self._enterable) { + if (self._show) { + self.hideLater(self._hideDelay); + } + } + + self._inContent = false; + }; +} + +TooltipContent.prototype = { + constructor: TooltipContent, + + /** + * @private + * @type {boolean} + */ + _enterable: true, + + /** + * Update when tooltip is rendered + */ + update: function () { + // FIXME + // Move this logic to ec main? + var container = this._container; + var stl = container.currentStyle || document.defaultView.getComputedStyle(container); + var domStyle = container.style; + + if (domStyle.position !== 'absolute' && stl.position !== 'absolute') { + domStyle.position = 'relative'; + } // Hide the tooltip + // PENDING + // this.hide(); + + }, + show: function (tooltipModel) { + clearTimeout(this._hideTimeout); + var el = this.el; + var styleCoord = this._styleCoord; + el.style.cssText = gCssText + assembleCssText(tooltipModel) // Because of the reason described in: + // http://stackoverflow.com/questions/21125587/css3-transition-not-working-in-chrome-anymore + // we should set initial value to `left` and `top`. + + ';left:' + styleCoord[0] + 'px;top:' + styleCoord[1] + 'px;' + (tooltipModel.get('extraCssText') || ''); + el.style.display = el.innerHTML ? 'block' : 'none'; // If mouse occsionally move over the tooltip, a mouseout event will be + // triggered by canvas, and cuase some unexpectable result like dragging + // stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve + // it. Although it is not suppored by IE8~IE10, fortunately it is a rare + // scenario. + + el.style.pointerEvents = this._enterable ? 'auto' : 'none'; + this._show = true; + }, + setContent: function (content) { + this.el.innerHTML = content == null ? '' : content; + }, + setEnterable: function (enterable) { + this._enterable = enterable; + }, + getSize: function () { + var el = this.el; + return [el.clientWidth, el.clientHeight]; + }, + moveTo: function (zrX, zrY) { + var styleCoord = this._styleCoord; + makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY); + var style = this.el.style; + style.left = styleCoord[0] + 'px'; + style.top = styleCoord[1] + 'px'; + }, + hide: function () { + this.el.style.display = 'none'; + this._show = false; + }, + hideLater: function (time) { + if (this._show && !(this._inContent && this._enterable)) { + if (time) { + this._hideDelay = time; // Set show false to avoid invoke hideLater mutiple times + + this._show = false; + this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time); + } else { + this.hide(); + } + } + }, + isShow: function () { + return this._show; + }, + dispose: function () { + this.el.parentNode.removeChild(this.el); + }, + getOuterSize: function () { + var width = this.el.clientWidth; + var height = this.el.clientHeight; // Consider browser compatibility. + // IE8 does not support getComputedStyle. + + if (document.defaultView && document.defaultView.getComputedStyle) { + var stl = document.defaultView.getComputedStyle(this.el); + + if (stl) { + width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10); + height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10); + } + } + + return { + width: width, + height: height + }; + } +}; +var _default = TooltipContent; +module.exports = _default; + +/***/ }), + +/***/ "07e6": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +__webpack_require__("4d85"); + +__webpack_require__("a753"); + +/***/ }), + +/***/ "0817": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("f306"); + +__webpack_require__("0046"); + +__webpack_require__("60d7"); + +var parallelVisual = __webpack_require__("ab71"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerVisual(parallelVisual); + +/***/ }), + +/***/ "085d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("bd92"); + +__webpack_require__("19e2"); + +var preprocessor = __webpack_require__("eabf"); + +var candlestickVisual = __webpack_require__("4c99"); + +var candlestickLayout = __webpack_require__("09b1"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerPreprocessor(preprocessor); +echarts.registerVisual(candlestickVisual); +echarts.registerLayout(candlestickLayout); + +/***/ }), + +/***/ "08c3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Axis = __webpack_require__("84ce"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Extend axis 2d + * @constructor module:echarts/coord/cartesian/Axis2D + * @extends {module:echarts/coord/cartesian/Axis} + * @param {string} dim + * @param {*} scale + * @param {Array.} coordExtent + * @param {string} axisType + * @param {string} position + */ +var TimelineAxis = function (dim, scale, coordExtent, axisType) { + Axis.call(this, dim, scale, coordExtent); + /** + * Axis type + * - 'category' + * - 'value' + * - 'time' + * - 'log' + * @type {string} + */ + + this.type = axisType || 'value'; + /** + * Axis model + * @param {module:echarts/component/TimelineModel} + */ + + this.model = null; +}; + +TimelineAxis.prototype = { + constructor: TimelineAxis, + + /** + * @override + */ + getLabelModel: function () { + return this.model.getModel('label'); + }, + + /** + * @override + */ + isHorizontal: function () { + return this.model.get('orient') === 'horizontal'; + } +}; +zrUtil.inherits(TimelineAxis, Axis); +var _default = TimelineAxis; +module.exports = _default; + +/***/ }), + +/***/ "09b1": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _graphic = __webpack_require__("2306"); + +var subPixelOptimize = _graphic.subPixelOptimize; + +var createRenderPlanner = __webpack_require__("cccd"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _util = __webpack_require__("6d8b"); + +var retrieve2 = _util.retrieve2; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* global Float32Array */ +var LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array; +var _default = { + seriesType: 'candlestick', + plan: createRenderPlanner(), + reset: function (seriesModel) { + var coordSys = seriesModel.coordinateSystem; + var data = seriesModel.getData(); + var candleWidth = calculateCandleWidth(seriesModel, data); + var cDimIdx = 0; + var vDimIdx = 1; + var coordDims = ['x', 'y']; + var cDim = data.mapDimension(coordDims[cDimIdx]); + var vDims = data.mapDimension(coordDims[vDimIdx], true); + var openDim = vDims[0]; + var closeDim = vDims[1]; + var lowestDim = vDims[2]; + var highestDim = vDims[3]; + data.setLayout({ + candleWidth: candleWidth, + // The value is experimented visually. + isSimpleBox: candleWidth <= 1.3 + }); + + if (cDim == null || vDims.length < 4) { + return; + } + + return { + progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress + }; + + function normalProgress(params, data) { + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var axisDimVal = data.get(cDim, dataIndex); + var openVal = data.get(openDim, dataIndex); + var closeVal = data.get(closeDim, dataIndex); + var lowestVal = data.get(lowestDim, dataIndex); + var highestVal = data.get(highestDim, dataIndex); + var ocLow = Math.min(openVal, closeVal); + var ocHigh = Math.max(openVal, closeVal); + var ocLowPoint = getPoint(ocLow, axisDimVal); + var ocHighPoint = getPoint(ocHigh, axisDimVal); + var lowestPoint = getPoint(lowestVal, axisDimVal); + var highestPoint = getPoint(highestVal, axisDimVal); + var ends = []; + addBodyEnd(ends, ocHighPoint, 0); + addBodyEnd(ends, ocLowPoint, 1); + ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint)); + data.setItemLayout(dataIndex, { + sign: getSign(data, dataIndex, openVal, closeVal, closeDim), + initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx], + // open point. + ends: ends, + brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal) + }); + } + + function getPoint(val, axisDimVal) { + var p = []; + p[cDimIdx] = axisDimVal; + p[vDimIdx] = val; + return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p); + } + + function addBodyEnd(ends, point, start) { + var point1 = point.slice(); + var point2 = point.slice(); + point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false); + point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true); + start ? ends.push(point1, point2) : ends.push(point2, point1); + } + + function makeBrushRect(lowestVal, highestVal, axisDimVal) { + var pmin = getPoint(lowestVal, axisDimVal); + var pmax = getPoint(highestVal, axisDimVal); + pmin[cDimIdx] -= candleWidth / 2; + pmax[cDimIdx] -= candleWidth / 2; + return { + x: pmin[0], + y: pmin[1], + width: vDimIdx ? candleWidth : pmax[0] - pmin[0], + height: vDimIdx ? pmax[1] - pmin[1] : candleWidth + }; + } + + function subPixelOptimizePoint(point) { + point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1); + return point; + } + } + + function largeProgress(params, data) { + // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...] + var points = new LargeArr(params.count * 4); + var offset = 0; + var point; + var tmpIn = []; + var tmpOut = []; + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var axisDimVal = data.get(cDim, dataIndex); + var openVal = data.get(openDim, dataIndex); + var closeVal = data.get(closeDim, dataIndex); + var lowestVal = data.get(lowestDim, dataIndex); + var highestVal = data.get(highestDim, dataIndex); + + if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) { + points[offset++] = NaN; + offset += 3; + continue; + } + + points[offset++] = getSign(data, dataIndex, openVal, closeVal, closeDim); + tmpIn[cDimIdx] = axisDimVal; + tmpIn[vDimIdx] = lowestVal; + point = coordSys.dataToPoint(tmpIn, null, tmpOut); + points[offset++] = point ? point[0] : NaN; + points[offset++] = point ? point[1] : NaN; + tmpIn[vDimIdx] = highestVal; + point = coordSys.dataToPoint(tmpIn, null, tmpOut); + points[offset++] = point ? point[1] : NaN; + } + + data.setLayout('largePoints', points); + } + } +}; + +function getSign(data, dataIndex, openVal, closeVal, closeDim) { + var sign; + + if (openVal > closeVal) { + sign = -1; + } else if (openVal < closeVal) { + sign = 1; + } else { + sign = dataIndex > 0 // If close === open, compare with close of last record + ? data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1 : // No record of previous, set to be positive + 1; + } + + return sign; +} + +function calculateCandleWidth(seriesModel, data) { + var baseAxis = seriesModel.getBaseAxis(); + var extent; + var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count()); + var barMaxWidth = parsePercent(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth); + var barMinWidth = parsePercent(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth); + var barWidth = seriesModel.get('barWidth'); + return barWidth != null ? parsePercent(barWidth, bandWidth) // Put max outer to ensure bar visible in spite of overlap. + : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth); +} + +module.exports = _default; + +/***/ }), + +/***/ "0a6d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +__webpack_require__("e4d1"); + +__webpack_require__("7f72"); + +/***/ }), + +/***/ "0b44": +/***/ (function(module, exports, __webpack_require__) { + +var eventUtil = __webpack_require__("607d"); + +/** + * Only implements needed gestures for mobile. + */ +var GestureMgr = function () { + /** + * @private + * @type {Array.} + */ + this._track = []; +}; + +GestureMgr.prototype = { + constructor: GestureMgr, + recognize: function (event, target, root) { + this._doTrack(event, target, root); + + return this._recognize(event); + }, + clear: function () { + this._track.length = 0; + return this; + }, + _doTrack: function (event, target, root) { + var touches = event.touches; + + if (!touches) { + return; + } + + var trackItem = { + points: [], + touches: [], + target: target, + event: event + }; + + for (var i = 0, len = touches.length; i < len; i++) { + var touch = touches[i]; + var pos = eventUtil.clientToLocal(root, touch, {}); + trackItem.points.push([pos.zrX, pos.zrY]); + trackItem.touches.push(touch); + } + + this._track.push(trackItem); + }, + _recognize: function (event) { + for (var eventName in recognizers) { + if (recognizers.hasOwnProperty(eventName)) { + var gestureInfo = recognizers[eventName](this._track, event); + + if (gestureInfo) { + return gestureInfo; + } + } + } + } +}; + +function dist(pointPair) { + var dx = pointPair[1][0] - pointPair[0][0]; + var dy = pointPair[1][1] - pointPair[0][1]; + return Math.sqrt(dx * dx + dy * dy); +} + +function center(pointPair) { + return [(pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2]; +} + +var recognizers = { + pinch: function (track, event) { + var trackLen = track.length; + + if (!trackLen) { + return; + } + + var pinchEnd = (track[trackLen - 1] || {}).points; + var pinchPre = (track[trackLen - 2] || {}).points || pinchEnd; + + if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) { + var pinchScale = dist(pinchEnd) / dist(pinchPre); + !isFinite(pinchScale) && (pinchScale = 1); + event.pinchScale = pinchScale; + var pinchCenter = center(pinchEnd); + event.pinchX = pinchCenter[0]; + event.pinchY = pinchCenter[1]; + return { + type: 'pinch', + target: track[0].target, + event: event + }; + } + } // Only pinch currently. + +}; +var _default = GestureMgr; +module.exports = _default; + +/***/ }), + +/***/ "0b4b": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +__webpack_require__("d28f"); + +__webpack_require__("f14c"); + +__webpack_require__("0ee7"); + +__webpack_require__("ebf9"); + +/***/ }), + +/***/ "0c12": +/***/ (function(module, exports) { + +// Myers' Diff Algorithm +// Modified from https://github.com/kpdecker/jsdiff/blob/master/src/diff/base.js +function Diff() {} + +Diff.prototype = { + diff: function (oldArr, newArr, equals) { + if (!equals) { + equals = function (a, b) { + return a === b; + }; + } + + this.equals = equals; + var self = this; + oldArr = oldArr.slice(); + newArr = newArr.slice(); // Allow subclasses to massage the input prior to running + + var newLen = newArr.length; + var oldLen = oldArr.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newArr, oldArr, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + var indices = []; + + for (var i = 0; i < newArr.length; i++) { + indices.push(i); + } // Identity per the equality and tokenizer + + + return [{ + indices: indices, + count: newArr.length + }]; + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath; + var addPath = bestPath[diagonalPath - 1]; + var removePath = bestPath[diagonalPath + 1]; + var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen; + var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + oldPos = self.extractCommon(basePath, newArr, oldArr, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return buildValues(self, basePath.components, newArr, oldArr); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } + + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + }, + pushComponent: function (components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + extractCommon: function (basePath, newArr, oldArr, diagonalPath) { + var newLen = newArr.length; + var oldLen = oldArr.length; + var newPos = basePath.newPos; + var oldPos = newPos - diagonalPath; + var commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newArr[newPos + 1], oldArr[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + tokenize: function (value) { + return value.slice(); + }, + join: function (value) { + return value.slice(); + } +}; + +function buildValues(diff, components, newArr, oldArr) { + var componentPos = 0; + var componentLen = components.length; + var newPos = 0; + var oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + var indices = []; + + for (var i = newPos; i < newPos + component.count; i++) { + indices.push(i); + } + + component.indices = indices; + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + var indices = []; + + for (var i = oldPos; i < oldPos + component.count; i++) { + indices.push(i); + } + + component.indices = indices; + oldPos += component.count; + } + } + + return components; +} + +function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; +} + +var arrayDiff = new Diff(); + +function _default(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); +} + +module.exports = _default; + +/***/ }), + +/***/ "0c41": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var RoamController = __webpack_require__("4a01"); + +var roamHelper = __webpack_require__("01ef"); + +var _cursorHelper = __webpack_require__("c526"); + +var onIrrelevantElement = _cursorHelper.onIrrelevantElement; + +var graphic = __webpack_require__("2306"); + +var geoSourceManager = __webpack_require__("5b87"); + +var _component = __webpack_require__("8918"); + +var getUID = _component.getUID; + +var Transformable = __webpack_require__("0cde"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function getFixedItemStyle(model) { + var itemStyle = model.getItemStyle(); + var areaColor = model.get('areaColor'); // If user want the color not to be changed when hover, + // they should both set areaColor and color to be null. + + if (areaColor != null) { + itemStyle.fill = areaColor; + } + + return itemStyle; +} + +function updateMapSelectHandler(mapDraw, mapOrGeoModel, regionsGroup, api, fromView) { + regionsGroup.off('click'); + regionsGroup.off('mousedown'); + + if (mapOrGeoModel.get('selectedMode')) { + regionsGroup.on('mousedown', function () { + mapDraw._mouseDownFlag = true; + }); + regionsGroup.on('click', function (e) { + if (!mapDraw._mouseDownFlag) { + return; + } + + mapDraw._mouseDownFlag = false; + var el = e.target; + + while (!el.__regions) { + el = el.parent; + } + + if (!el) { + return; + } + + var action = { + type: (mapOrGeoModel.mainType === 'geo' ? 'geo' : 'map') + 'ToggleSelect', + batch: zrUtil.map(el.__regions, function (region) { + return { + name: region.name, + from: fromView.uid + }; + }) + }; + action[mapOrGeoModel.mainType + 'Id'] = mapOrGeoModel.id; + api.dispatchAction(action); + updateMapSelected(mapOrGeoModel, regionsGroup); + }); + } +} + +function updateMapSelected(mapOrGeoModel, regionsGroup) { + // FIXME + regionsGroup.eachChild(function (otherRegionEl) { + zrUtil.each(otherRegionEl.__regions, function (region) { + otherRegionEl.trigger(mapOrGeoModel.isSelected(region.name) ? 'emphasis' : 'normal'); + }); + }); +} +/** + * @alias module:echarts/component/helper/MapDraw + * @param {module:echarts/ExtensionAPI} api + * @param {boolean} updateGroup + */ + + +function MapDraw(api, updateGroup) { + var group = new graphic.Group(); + /** + * @type {string} + * @private + */ + + this.uid = getUID('ec_map_draw'); + /** + * @type {module:echarts/component/helper/RoamController} + * @private + */ + + this._controller = new RoamController(api.getZr()); + /** + * @type {Object} {target, zoom, zoomLimit} + * @private + */ + + this._controllerHost = { + target: updateGroup ? group : null + }; + /** + * @type {module:zrender/container/Group} + * @readOnly + */ + + this.group = group; + /** + * @type {boolean} + * @private + */ + + this._updateGroup = updateGroup; + /** + * This flag is used to make sure that only one among + * `pan`, `zoom`, `click` can occurs, otherwise 'selected' + * action may be triggered when `pan`, which is unexpected. + * @type {booelan} + */ + + this._mouseDownFlag; + /** + * @type {string} + */ + + this._mapName; + /** + * @type {boolean} + */ + + this._initialized; + /** + * @type {module:zrender/container/Group} + */ + + group.add(this._regionsGroup = new graphic.Group()); + /** + * @type {module:zrender/container/Group} + */ + + group.add(this._backgroundGroup = new graphic.Group()); +} + +MapDraw.prototype = { + constructor: MapDraw, + draw: function (mapOrGeoModel, ecModel, api, fromView, payload) { + var isGeo = mapOrGeoModel.mainType === 'geo'; // Map series has data. GEO model that controlled by map series + // will be assigned with map data. Other GEO model has no data. + + var data = mapOrGeoModel.getData && mapOrGeoModel.getData(); + isGeo && ecModel.eachComponent({ + mainType: 'series', + subType: 'map' + }, function (mapSeries) { + if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) { + data = mapSeries.getData(); + } + }); + var geo = mapOrGeoModel.coordinateSystem; + + this._updateBackground(geo); + + var regionsGroup = this._regionsGroup; + var group = this.group; + var transformInfo = geo.getTransformInfo(); // No animation when first draw or in action + + var isFirstDraw = !regionsGroup.childAt(0) || payload; + var targetScale; + + if (isFirstDraw) { + group.transform = transformInfo.roamTransform; + group.decomposeTransform(); + group.dirty(); + } else { + var target = new Transformable(); + target.transform = transformInfo.roamTransform; + target.decomposeTransform(); + var props = { + scale: target.scale, + position: target.position + }; + targetScale = target.scale; + graphic.updateProps(group, props, mapOrGeoModel); + } + + var scale = transformInfo.rawScale; + var position = transformInfo.rawPosition; + regionsGroup.removeAll(); + var itemStyleAccessPath = ['itemStyle']; + var hoverItemStyleAccessPath = ['emphasis', 'itemStyle']; + var labelAccessPath = ['label']; + var hoverLabelAccessPath = ['emphasis', 'label']; + var nameMap = zrUtil.createHashMap(); + zrUtil.each(geo.regions, function (region) { + // Consider in GeoJson properties.name may be duplicated, for example, + // there is multiple region named "United Kindom" or "France" (so many + // colonies). And it is not appropriate to merge them in geo, which + // will make them share the same label and bring trouble in label + // location calculation. + var regionGroup = nameMap.get(region.name) || nameMap.set(region.name, new graphic.Group()); + var compoundPath = new graphic.CompoundPath({ + segmentIgnoreThreshold: 1, + shape: { + paths: [] + } + }); + regionGroup.add(compoundPath); + var regionModel = mapOrGeoModel.getRegionModel(region.name) || mapOrGeoModel; + var itemStyleModel = regionModel.getModel(itemStyleAccessPath); + var hoverItemStyleModel = regionModel.getModel(hoverItemStyleAccessPath); + var itemStyle = getFixedItemStyle(itemStyleModel); + var hoverItemStyle = getFixedItemStyle(hoverItemStyleModel); + var labelModel = regionModel.getModel(labelAccessPath); + var hoverLabelModel = regionModel.getModel(hoverLabelAccessPath); + var dataIdx; // Use the itemStyle in data if has data + + if (data) { + dataIdx = data.indexOfName(region.name); // Only visual color of each item will be used. It can be encoded by dataRange + // But visual color of series is used in symbol drawing + // + // Visual color for each series is for the symbol draw + + var visualColor = data.getItemVisual(dataIdx, 'color', true); + + if (visualColor) { + itemStyle.fill = visualColor; + } + } + + var transformPoint = function (point) { + return [point[0] * scale[0] + position[0], point[1] * scale[1] + position[1]]; + }; + + zrUtil.each(region.geometries, function (geometry) { + if (geometry.type !== 'polygon') { + return; + } + + var points = []; + + for (var i = 0; i < geometry.exterior.length; ++i) { + points.push(transformPoint(geometry.exterior[i])); + } + + compoundPath.shape.paths.push(new graphic.Polygon({ + segmentIgnoreThreshold: 1, + shape: { + points: points + } + })); + + for (var i = 0; i < (geometry.interiors ? geometry.interiors.length : 0); ++i) { + var interior = geometry.interiors[i]; + var points = []; + + for (var j = 0; j < interior.length; ++j) { + points.push(transformPoint(interior[j])); + } + + compoundPath.shape.paths.push(new graphic.Polygon({ + segmentIgnoreThreshold: 1, + shape: { + points: points + } + })); + } + }); + compoundPath.setStyle(itemStyle); + compoundPath.style.strokeNoScale = true; + compoundPath.culling = true; // Label + + var showLabel = labelModel.get('show'); + var hoverShowLabel = hoverLabelModel.get('show'); + var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx)); + var itemLayout = data && data.getItemLayout(dataIdx); // In the following cases label will be drawn + // 1. In map series and data value is NaN + // 2. In geo component + // 4. Region has no series legendSymbol, which will be add a showLabel flag in mapSymbolLayout + + if (isGeo || isDataNaN && (showLabel || hoverShowLabel) || itemLayout && itemLayout.showLabel) { + var query = !isGeo ? dataIdx : region.name; + var labelFetcher; // Consider dataIdx not found. + + if (!data || dataIdx >= 0) { + labelFetcher = mapOrGeoModel; + } + + var textEl = new graphic.Text({ + position: transformPoint(region.center.slice()), + // FIXME + // label rotation is not support yet in geo or regions of series-map + // that has no data. The rotation will be effected by this `scale`. + // So needed to change to RectText? + scale: [1 / group.scale[0], 1 / group.scale[1]], + z2: 10, + silent: true + }); + graphic.setLabelStyle(textEl.style, textEl.hoverStyle = {}, labelModel, hoverLabelModel, { + labelFetcher: labelFetcher, + labelDataIndex: query, + defaultText: region.name, + useInsideStyle: false + }, { + textAlign: 'center', + textVerticalAlign: 'middle' + }); + + if (!isFirstDraw) { + // Text animation + var textScale = [1 / targetScale[0], 1 / targetScale[1]]; + graphic.updateProps(textEl, { + scale: textScale + }, mapOrGeoModel); + } + + regionGroup.add(textEl); + } // setItemGraphicEl, setHoverStyle after all polygons and labels + // are added to the rigionGroup + + + if (data) { + data.setItemGraphicEl(dataIdx, regionGroup); + } else { + var regionModel = mapOrGeoModel.getRegionModel(region.name); // Package custom mouse event for geo component + + compoundPath.eventData = { + componentType: 'geo', + componentIndex: mapOrGeoModel.componentIndex, + geoIndex: mapOrGeoModel.componentIndex, + name: region.name, + region: regionModel && regionModel.option || {} + }; + } + + var groupRegions = regionGroup.__regions || (regionGroup.__regions = []); + groupRegions.push(region); + regionGroup.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode'); + graphic.setHoverStyle(regionGroup, hoverItemStyle); + regionsGroup.add(regionGroup); + }); + + this._updateController(mapOrGeoModel, ecModel, api); + + updateMapSelectHandler(this, mapOrGeoModel, regionsGroup, api, fromView); + updateMapSelected(mapOrGeoModel, regionsGroup); + }, + remove: function () { + this._regionsGroup.removeAll(); + + this._backgroundGroup.removeAll(); + + this._controller.dispose(); + + this._mapName && geoSourceManager.removeGraphic(this._mapName, this.uid); + this._mapName = null; + this._controllerHost = {}; + }, + _updateBackground: function (geo) { + var mapName = geo.map; + + if (this._mapName !== mapName) { + zrUtil.each(geoSourceManager.makeGraphic(mapName, this.uid), function (root) { + this._backgroundGroup.add(root); + }, this); + } + + this._mapName = mapName; + }, + _updateController: function (mapOrGeoModel, ecModel, api) { + var geo = mapOrGeoModel.coordinateSystem; + var controller = this._controller; + var controllerHost = this._controllerHost; + controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit'); + controllerHost.zoom = geo.getZoom(); // roamType is will be set default true if it is null + + controller.enable(mapOrGeoModel.get('roam') || false); + var mainType = mapOrGeoModel.mainType; + + function makeActionBase() { + var action = { + type: 'geoRoam', + componentType: mainType + }; + action[mainType + 'Id'] = mapOrGeoModel.id; + return action; + } + + controller.off('pan').on('pan', function (e) { + this._mouseDownFlag = false; + roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy); + api.dispatchAction(zrUtil.extend(makeActionBase(), { + dx: e.dx, + dy: e.dy + })); + }, this); + controller.off('zoom').on('zoom', function (e) { + this._mouseDownFlag = false; + roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); + api.dispatchAction(zrUtil.extend(makeActionBase(), { + zoom: e.scale, + originX: e.originX, + originY: e.originY + })); + + if (this._updateGroup) { + var scale = this.group.scale; + + this._regionsGroup.traverse(function (el) { + if (el.type === 'text') { + el.attr('scale', [1 / scale[0], 1 / scale[1]]); + } + }); + } + }, this); + controller.setPointerChecker(function (e, x, y) { + return geo.getViewRectAfterRoam().contain(x, y) && !onIrrelevantElement(e, api, mapOrGeoModel); + }); + } +}; +var _default = MapDraw; +module.exports = _default; + +/***/ }), + +/***/ "0cde": +/***/ (function(module, exports, __webpack_require__) { + +var matrix = __webpack_require__("1687"); + +var vector = __webpack_require__("401b"); + +/** + * 提供变换扩展 + * @module zrender/mixin/Transformable + * @author pissang (https://www.github.com/pissang) + */ +var mIdentity = matrix.identity; +var EPSILON = 5e-5; + +function isNotAroundZero(val) { + return val > EPSILON || val < -EPSILON; +} +/** + * @alias module:zrender/mixin/Transformable + * @constructor + */ + + +var Transformable = function (opts) { + opts = opts || {}; // If there are no given position, rotation, scale + + if (!opts.position) { + /** + * 平移 + * @type {Array.} + * @default [0, 0] + */ + this.position = [0, 0]; + } + + if (opts.rotation == null) { + /** + * 旋转 + * @type {Array.} + * @default 0 + */ + this.rotation = 0; + } + + if (!opts.scale) { + /** + * 缩放 + * @type {Array.} + * @default [1, 1] + */ + this.scale = [1, 1]; + } + /** + * 旋转和缩放的原点 + * @type {Array.} + * @default null + */ + + + this.origin = this.origin || null; +}; + +var transformableProto = Transformable.prototype; +transformableProto.transform = null; +/** + * 判断是否需要有坐标变换 + * 如果有坐标变换, 则从position, rotation, scale以及父节点的transform计算出自身的transform矩阵 + */ + +transformableProto.needLocalTransform = function () { + return isNotAroundZero(this.rotation) || isNotAroundZero(this.position[0]) || isNotAroundZero(this.position[1]) || isNotAroundZero(this.scale[0] - 1) || isNotAroundZero(this.scale[1] - 1); +}; + +var scaleTmp = []; + +transformableProto.updateTransform = function () { + var parent = this.parent; + var parentHasTransform = parent && parent.transform; + var needLocalTransform = this.needLocalTransform(); + var m = this.transform; + + if (!(needLocalTransform || parentHasTransform)) { + m && mIdentity(m); + return; + } + + m = m || matrix.create(); + + if (needLocalTransform) { + this.getLocalTransform(m); + } else { + mIdentity(m); + } // 应用父节点变换 + + + if (parentHasTransform) { + if (needLocalTransform) { + matrix.mul(m, parent.transform, m); + } else { + matrix.copy(m, parent.transform); + } + } // 保存这个变换矩阵 + + + this.transform = m; + var globalScaleRatio = this.globalScaleRatio; + + if (globalScaleRatio != null && globalScaleRatio !== 1) { + this.getGlobalScale(scaleTmp); + var relX = scaleTmp[0] < 0 ? -1 : 1; + var relY = scaleTmp[1] < 0 ? -1 : 1; + var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0; + var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0; + m[0] *= sx; + m[1] *= sx; + m[2] *= sy; + m[3] *= sy; + } + + this.invTransform = this.invTransform || matrix.create(); + matrix.invert(this.invTransform, m); +}; + +transformableProto.getLocalTransform = function (m) { + return Transformable.getLocalTransform(this, m); +}; +/** + * 将自己的transform应用到context上 + * @param {CanvasRenderingContext2D} ctx + */ + + +transformableProto.setTransform = function (ctx) { + var m = this.transform; + var dpr = ctx.dpr || 1; + + if (m) { + ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]); + } else { + ctx.setTransform(dpr, 0, 0, dpr, 0, 0); + } +}; + +transformableProto.restoreTransform = function (ctx) { + var dpr = ctx.dpr || 1; + ctx.setTransform(dpr, 0, 0, dpr, 0, 0); +}; + +var tmpTransform = []; +var originTransform = matrix.create(); + +transformableProto.setLocalTransform = function (m) { + if (!m) { + // TODO return or set identity? + return; + } + + var sx = m[0] * m[0] + m[1] * m[1]; + var sy = m[2] * m[2] + m[3] * m[3]; + var position = this.position; + var scale = this.scale; + + if (isNotAroundZero(sx - 1)) { + sx = Math.sqrt(sx); + } + + if (isNotAroundZero(sy - 1)) { + sy = Math.sqrt(sy); + } + + if (m[0] < 0) { + sx = -sx; + } + + if (m[3] < 0) { + sy = -sy; + } + + position[0] = m[4]; + position[1] = m[5]; + scale[0] = sx; + scale[1] = sy; + this.rotation = Math.atan2(-m[1] / sy, m[0] / sx); +}; +/** + * 分解`transform`矩阵到`position`, `rotation`, `scale` + */ + + +transformableProto.decomposeTransform = function () { + if (!this.transform) { + return; + } + + var parent = this.parent; + var m = this.transform; + + if (parent && parent.transform) { + // Get local transform and decompose them to position, scale, rotation + matrix.mul(tmpTransform, parent.invTransform, m); + m = tmpTransform; + } + + var origin = this.origin; + + if (origin && (origin[0] || origin[1])) { + originTransform[4] = origin[0]; + originTransform[5] = origin[1]; + matrix.mul(tmpTransform, m, originTransform); + tmpTransform[4] -= origin[0]; + tmpTransform[5] -= origin[1]; + m = tmpTransform; + } + + this.setLocalTransform(m); +}; +/** + * Get global scale + * @return {Array.} + */ + + +transformableProto.getGlobalScale = function (out) { + var m = this.transform; + out = out || []; + + if (!m) { + out[0] = 1; + out[1] = 1; + return out; + } + + out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]); + out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]); + + if (m[0] < 0) { + out[0] = -out[0]; + } + + if (m[3] < 0) { + out[1] = -out[1]; + } + + return out; +}; +/** + * 变换坐标位置到 shape 的局部坐标空间 + * @method + * @param {number} x + * @param {number} y + * @return {Array.} + */ + + +transformableProto.transformCoordToLocal = function (x, y) { + var v2 = [x, y]; + var invTransform = this.invTransform; + + if (invTransform) { + vector.applyTransform(v2, v2, invTransform); + } + + return v2; +}; +/** + * 变换局部坐标位置到全局坐标空间 + * @method + * @param {number} x + * @param {number} y + * @return {Array.} + */ + + +transformableProto.transformCoordToGlobal = function (x, y) { + var v2 = [x, y]; + var transform = this.transform; + + if (transform) { + vector.applyTransform(v2, v2, transform); + } + + return v2; +}; +/** + * @static + * @param {Object} target + * @param {Array.} target.origin + * @param {number} target.rotation + * @param {Array.} target.position + * @param {Array.} [m] + */ + + +Transformable.getLocalTransform = function (target, m) { + m = m || []; + mIdentity(m); + var origin = target.origin; + var scale = target.scale || [1, 1]; + var rotation = target.rotation || 0; + var position = target.position || [0, 0]; + + if (origin) { + // Translate to origin + m[4] -= origin[0]; + m[5] -= origin[1]; + } + + matrix.scale(m, m, scale); + + if (rotation) { + matrix.rotate(m, m, rotation); + } + + if (origin) { + // Translate back from origin + m[4] += origin[0]; + m[5] += origin[1]; + } + + m[4] += position[0]; + m[5] += position[1]; + return m; +}; + +var _default = Transformable; +module.exports = _default; + +/***/ }), + +/***/ "0cfb": +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__("83ab"); +var fails = __webpack_require__("d039"); +var createElement = __webpack_require__("cc12"); + +// Thank's IE8 for his funny defineProperty +module.exports = !DESCRIPTORS && !fails(function () { + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; +}); + + +/***/ }), + +/***/ "0da8": +/***/ (function(module, exports, __webpack_require__) { + +var Displayable = __webpack_require__("19eb"); + +var BoundingRect = __webpack_require__("9850"); + +var zrUtil = __webpack_require__("6d8b"); + +var imageHelper = __webpack_require__("5e76"); + +/** + * @alias zrender/graphic/Image + * @extends module:zrender/graphic/Displayable + * @constructor + * @param {Object} opts + */ +function ZImage(opts) { + Displayable.call(this, opts); +} + +ZImage.prototype = { + constructor: ZImage, + type: 'image', + brush: function (ctx, prevEl) { + var style = this.style; + var src = style.image; // Must bind each time + + style.bind(ctx, this, prevEl); + var image = this._image = imageHelper.createOrUpdateImage(src, this._image, this, this.onload); + + if (!image || !imageHelper.isImageReady(image)) { + return; + } // 图片已经加载完成 + // if (image.nodeName.toUpperCase() == 'IMG') { + // if (!image.complete) { + // return; + // } + // } + // Else is canvas + + + var x = style.x || 0; + var y = style.y || 0; + var width = style.width; + var height = style.height; + var aspect = image.width / image.height; + + if (width == null && height != null) { + // Keep image/height ratio + width = height * aspect; + } else if (height == null && width != null) { + height = width / aspect; + } else if (width == null && height == null) { + width = image.width; + height = image.height; + } // 设置transform + + + this.setTransform(ctx); + + if (style.sWidth && style.sHeight) { + var sx = style.sx || 0; + var sy = style.sy || 0; + ctx.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height); + } else if (style.sx && style.sy) { + var sx = style.sx; + var sy = style.sy; + var sWidth = width - sx; + var sHeight = height - sy; + ctx.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height); + } else { + ctx.drawImage(image, x, y, width, height); + } // Draw rect text + + + if (style.text != null) { + // Only restore transform when needs draw text. + this.restoreTransform(ctx); + this.drawRectText(ctx, this.getBoundingRect()); + } + }, + getBoundingRect: function () { + var style = this.style; + + if (!this._rect) { + this._rect = new BoundingRect(style.x || 0, style.y || 0, style.width || 0, style.height || 0); + } + + return this._rect; + } +}; +zrUtil.inherits(ZImage, Displayable); +var _default = ZImage; +module.exports = _default; + +/***/ }), + +/***/ "0e0f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var VisualMapping = __webpack_require__("5f14"); + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function _default(ecModel, payload) { + ecModel.eachSeriesByType('sankey', function (seriesModel) { + var graph = seriesModel.getGraph(); + var nodes = graph.nodes; + + if (nodes.length) { + var minValue = Infinity; + var maxValue = -Infinity; + zrUtil.each(nodes, function (node) { + var nodeValue = node.getLayout().value; + + if (nodeValue < minValue) { + minValue = nodeValue; + } + + if (nodeValue > maxValue) { + maxValue = nodeValue; + } + }); + zrUtil.each(nodes, function (node) { + var mapping = new VisualMapping({ + type: 'color', + mappingMethod: 'linear', + dataExtent: [minValue, maxValue], + visual: seriesModel.get('color') + }); + var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value); + var customColor = node.getModel().get('itemStyle.color'); + customColor != null ? node.setVisual('color', customColor) : node.setVisual('color', mapValueToColor); + }); + } + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "0ee7": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +var layoutUtil = __webpack_require__("f934"); + +var LegendView = __webpack_require__("5e97"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Separate legend and scrollable legend to reduce package size. + */ +var Group = graphic.Group; +var WH = ['width', 'height']; +var XY = ['x', 'y']; +var ScrollableLegendView = LegendView.extend({ + type: 'legend.scroll', + newlineDisabled: true, + init: function () { + ScrollableLegendView.superCall(this, 'init'); + /** + * @private + * @type {number} For `scroll`. + */ + + this._currentIndex = 0; + /** + * @private + * @type {module:zrender/container/Group} + */ + + this.group.add(this._containerGroup = new Group()); + + this._containerGroup.add(this.getContentGroup()); + /** + * @private + * @type {module:zrender/container/Group} + */ + + + this.group.add(this._controllerGroup = new Group()); + /** + * + * @private + */ + + this._showController; + }, + + /** + * @override + */ + resetInner: function () { + ScrollableLegendView.superCall(this, 'resetInner'); + + this._controllerGroup.removeAll(); + + this._containerGroup.removeClipPath(); + + this._containerGroup.__rectSize = null; + }, + + /** + * @override + */ + renderInner: function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) { + var me = this; // Render content items. + + ScrollableLegendView.superCall(this, 'renderInner', itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); + var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length, + // e.g., '3/12345' should not overlap with the control arrow button. + + var pageIconSize = legendModel.get('pageIconSize', true); + + if (!zrUtil.isArray(pageIconSize)) { + pageIconSize = [pageIconSize, pageIconSize]; + } + + createPageButton('pagePrev', 0); + var pageTextStyleModel = legendModel.getModel('pageTextStyle'); + controllerGroup.add(new graphic.Text({ + name: 'pageText', + style: { + textFill: pageTextStyleModel.getTextColor(), + font: pageTextStyleModel.getFont(), + textVerticalAlign: 'middle', + textAlign: 'center' + }, + silent: true + })); + createPageButton('pageNext', 1); + + function createPageButton(name, iconIdx) { + var pageDataIndexName = name + 'DataIndex'; + var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], { + // Buttons will be created in each render, so we do not need + // to worry about avoiding using legendModel kept in scope. + onclick: zrUtil.bind(me._pageGo, me, pageDataIndexName, legendModel, api) + }, { + x: -pageIconSize[0] / 2, + y: -pageIconSize[1] / 2, + width: pageIconSize[0], + height: pageIconSize[1] + }); + icon.name = name; + controllerGroup.add(icon); + } + }, + + /** + * @override + */ + layoutInner: function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) { + var selectorGroup = this.getSelectorGroup(); + var orientIdx = legendModel.getOrient().index; + var wh = WH[orientIdx]; + var xy = XY[orientIdx]; + var hw = WH[1 - orientIdx]; + var yx = XY[1 - orientIdx]; + selector && layoutUtil.box( // Buttons in selectorGroup always layout horizontally + 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true)); + var selectorButtonGap = legendModel.get('selectorButtonGap', true); + var selectorRect = selectorGroup.getBoundingRect(); + var selectorPos = [-selectorRect.x, -selectorRect.y]; + var processMaxSize = zrUtil.clone(maxSize); + selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap); + + var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx); + + if (selector) { + if (selectorPosition === 'end') { + selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap; + } else { + var offset = selectorRect[wh] + selectorButtonGap; + selectorPos[orientIdx] -= offset; + mainRect[xy] -= offset; + } + + mainRect[wh] += selectorRect[wh] + selectorButtonGap; + selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2; + mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]); + mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]); + selectorGroup.attr('position', selectorPos); + } + + return mainRect; + }, + _layoutContentAndController: function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx) { + var contentGroup = this.getContentGroup(); + var containerGroup = this._containerGroup; + var controllerGroup = this._controllerGroup; // Place items in contentGroup. + + layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height); + layoutUtil.box( // Buttons in controller are layout always horizontally. + 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true)); + var contentRect = contentGroup.getBoundingRect(); + var controllerRect = controllerGroup.getBoundingRect(); + var showController = this._showController = contentRect[wh] > maxSize[wh]; + var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming. + // If first rendering, `contentGroup.position` is [0, 0], which + // does not make sense and may cause unexepcted animation if adopted. + + if (!isFirstRender) { + contentPos[orientIdx] = contentGroup.position[orientIdx]; + } // Layout container group based on 0. + + + var containerPos = [0, 0]; + var controllerPos = [-controllerRect.x, -controllerRect.y]; + var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup. + + if (showController) { + var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom. + + if (pageButtonPosition === 'end') { + controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh]; + } // controller is on the left / top. + else { + containerPos[orientIdx] += controllerRect[wh] + pageButtonGap; + } + } // Always align controller to content as 'middle'. + + + controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2; + contentGroup.attr('position', contentPos); + containerGroup.attr('position', containerPos); + controllerGroup.attr('position', controllerPos); // Calculate `mainRect` and set `clipPath`. + // mainRect should not be calculated by `this.group.getBoundingRect()` + // for sake of the overflow. + + var mainRect = { + x: 0, + y: 0 + }; // Consider content may be overflow (should be clipped). + + mainRect[wh] = showController ? maxSize[wh] : contentRect[wh]; + mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0. + + mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]); + containerGroup.__rectSize = maxSize[wh]; + + if (showController) { + var clipShape = { + x: 0, + y: 0 + }; + clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0); + clipShape[hw] = mainRect[hw]; + containerGroup.setClipPath(new graphic.Rect({ + shape: clipShape + })); // Consider content may be larger than container, container rect + // can not be obtained from `containerGroup.getBoundingRect()`. + + containerGroup.__rectSize = clipShape[wh]; + } else { + // Do not remove or ignore controller. Keep them set as placeholders. + controllerGroup.eachChild(function (child) { + child.attr({ + invisible: true, + silent: true + }); + }); + } // Content translate animation. + + + var pageInfo = this._getPageInfo(legendModel); + + pageInfo.pageIndex != null && graphic.updateProps(contentGroup, { + position: pageInfo.contentPosition + }, // When switch from "show controller" to "not show controller", view should be + // updated immediately without animation, otherwise causes weird effect. + showController ? legendModel : false); + + this._updatePageInfoView(legendModel, pageInfo); + + return mainRect; + }, + _pageGo: function (to, legendModel, api) { + var scrollDataIndex = this._getPageInfo(legendModel)[to]; + + scrollDataIndex != null && api.dispatchAction({ + type: 'legendScroll', + scrollDataIndex: scrollDataIndex, + legendId: legendModel.id + }); + }, + _updatePageInfoView: function (legendModel, pageInfo) { + var controllerGroup = this._controllerGroup; + zrUtil.each(['pagePrev', 'pageNext'], function (name) { + var canJump = pageInfo[name + 'DataIndex'] != null; + var icon = controllerGroup.childOfName(name); + + if (icon) { + icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true)); + icon.cursor = canJump ? 'pointer' : 'default'; + } + }); + var pageText = controllerGroup.childOfName('pageText'); + var pageFormatter = legendModel.get('pageFormatter'); + var pageIndex = pageInfo.pageIndex; + var current = pageIndex != null ? pageIndex + 1 : 0; + var total = pageInfo.pageCount; + pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current).replace('{total}', total) : pageFormatter({ + current: current, + total: total + })); + }, + + /** + * @param {module:echarts/model/Model} legendModel + * @return {Object} { + * contentPosition: Array., null when data item not found. + * pageIndex: number, null when data item not found. + * pageCount: number, always be a number, can be 0. + * pagePrevDataIndex: number, null when no previous page. + * pageNextDataIndex: number, null when no next page. + * } + */ + _getPageInfo: function (legendModel) { + var scrollDataIndex = legendModel.get('scrollDataIndex', true); + var contentGroup = this.getContentGroup(); + var containerRectSize = this._containerGroup.__rectSize; + var orientIdx = legendModel.getOrient().index; + var wh = WH[orientIdx]; + var xy = XY[orientIdx]; + + var targetItemIndex = this._findTargetItemIndex(scrollDataIndex); + + var children = contentGroup.children(); + var targetItem = children[targetItemIndex]; + var itemCount = children.length; + var pCount = !itemCount ? 0 : 1; + var result = { + contentPosition: contentGroup.position.slice(), + pageCount: pCount, + pageIndex: pCount - 1, + pagePrevDataIndex: null, + pageNextDataIndex: null + }; + + if (!targetItem) { + return result; + } + + var targetItemInfo = getItemInfo(targetItem); + result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy: + // (1) Always align based on the left/top most item. + // (2) It is user-friendly that the last item shown in the + // current window is shown at the begining of next window. + // Otherwise if half of the last item is cut by the window, + // it will have no chance to display entirely. + // (3) Consider that item size probably be different, we + // have calculate pageIndex by size rather than item index, + // and we can not get page index directly by division. + // (4) The window is to narrow to contain more than + // one item, we should make sure that the page can be fliped. + + for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) { + currItemInfo = getItemInfo(children[i]); + + if ( // Half of the last item is out of the window. + !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize || // If the current item does not intersect with the window, the new page + // can be started at the current item or the last item. + currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) { + if (winEndItemInfo.i > winStartItemInfo.i) { + winStartItemInfo = winEndItemInfo; + } else { + // e.g., when page size is smaller than item size. + winStartItemInfo = currItemInfo; + } + + if (winStartItemInfo) { + if (result.pageNextDataIndex == null) { + result.pageNextDataIndex = winStartItemInfo.i; + } + + ++result.pageCount; + } + } + + winEndItemInfo = currItemInfo; + } + + for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) { + currItemInfo = getItemInfo(children[i]); + + if ( // If the the end item does not intersect with the window started + // from the current item, a page can be settled. + (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)) && // e.g., when page size is smaller than item size. + winStartItemInfo.i < winEndItemInfo.i) { + winEndItemInfo = winStartItemInfo; + + if (result.pagePrevDataIndex == null) { + result.pagePrevDataIndex = winStartItemInfo.i; + } + + ++result.pageCount; + ++result.pageIndex; + } + + winStartItemInfo = currItemInfo; + } + + return result; + + function getItemInfo(el) { + if (el) { + var itemRect = el.getBoundingRect(); + var start = itemRect[xy] + el.position[orientIdx]; + return { + s: start, + e: start + itemRect[wh], + i: el.__legendDataIndex + }; + } + } + + function intersect(itemInfo, winStart) { + return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize; + } + }, + _findTargetItemIndex: function (targetDataIndex) { + if (!this._showController) { + return 0; + } + + var index; + var contentGroup = this.getContentGroup(); + var defaultIndex; + contentGroup.eachChild(function (child, idx) { + var legendDataIdx = child.__legendDataIndex; // FIXME + // If the given targetDataIndex (from model) is illegal, + // we use defualtIndex. But the index on the legend model and + // action payload is still illegal. That case will not be + // changed until some scenario requires. + + if (defaultIndex == null && legendDataIdx != null) { + defaultIndex = idx; + } + + if (legendDataIdx === targetDataIndex) { + index = idx; + } + }); + return index != null ? index : defaultIndex; + } +}); +var _default = ScrollableLegendView; +module.exports = _default; + +/***/ }), + +/***/ "0f55": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Axis = __webpack_require__("84ce"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @constructor module:echarts/coord/parallel/ParallelAxis + * @extends {module:echarts/coord/Axis} + * @param {string} dim + * @param {*} scale + * @param {Array.} coordExtent + * @param {string} axisType + */ +var ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) { + Axis.call(this, dim, scale, coordExtent); + /** + * Axis type + * - 'category' + * - 'value' + * - 'time' + * - 'log' + * @type {string} + */ + + this.type = axisType || 'value'; + /** + * @type {number} + * @readOnly + */ + + this.axisIndex = axisIndex; +}; + +ParallelAxis.prototype = { + constructor: ParallelAxis, + + /** + * Axis model + * @param {module:echarts/coord/parallel/AxisModel} + */ + model: null, + + /** + * @override + */ + isHorizontal: function () { + return this.coordinateSystem.getModel().get('layout') !== 'horizontal'; + } +}; +zrUtil.inherits(ParallelAxis, Axis); +var _default = ParallelAxis; +module.exports = _default; + +/***/ }), + +/***/ "0f99": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var _model = __webpack_require__("e0d3"); + +var makeInner = _model.makeInner; +var getDataItemValue = _model.getDataItemValue; + +var _util = __webpack_require__("6d8b"); + +var createHashMap = _util.createHashMap; +var each = _util.each; +var map = _util.map; +var isArray = _util.isArray; +var isString = _util.isString; +var isObject = _util.isObject; +var isTypedArray = _util.isTypedArray; +var isArrayLike = _util.isArrayLike; +var extend = _util.extend; +var assert = _util.assert; + +var Source = __webpack_require__("ec6f"); + +var _sourceType = __webpack_require__("93d0"); + +var SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL; +var SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS; +var SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS; +var SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS; +var SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN; +var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY; +var SERIES_LAYOUT_BY_ROW = _sourceType.SERIES_LAYOUT_BY_ROW; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// The result of `guessOrdinal`. +var BE_ORDINAL = { + Must: 1, + // Encounter string but not '-' and not number-like. + Might: 2, + // Encounter string but number-like. + Not: 3 // Other cases + +}; +var inner = makeInner(); +/** + * @see {module:echarts/data/Source} + * @param {module:echarts/component/dataset/DatasetModel} datasetModel + * @return {string} sourceFormat + */ + +function detectSourceFormat(datasetModel) { + var data = datasetModel.option.source; + var sourceFormat = SOURCE_FORMAT_UNKNOWN; + + if (isTypedArray(data)) { + sourceFormat = SOURCE_FORMAT_TYPED_ARRAY; + } else if (isArray(data)) { + // FIXME Whether tolerate null in top level array? + if (data.length === 0) { + sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; + } + + for (var i = 0, len = data.length; i < len; i++) { + var item = data[i]; + + if (item == null) { + continue; + } else if (isArray(item)) { + sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; + break; + } else if (isObject(item)) { + sourceFormat = SOURCE_FORMAT_OBJECT_ROWS; + break; + } + } + } else if (isObject(data)) { + for (var key in data) { + if (data.hasOwnProperty(key) && isArrayLike(data[key])) { + sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS; + break; + } + } + } else if (data != null) { + throw new Error('Invalid data'); + } + + inner(datasetModel).sourceFormat = sourceFormat; +} +/** + * [Scenarios]: + * (1) Provide source data directly: + * series: { + * encode: {...}, + * dimensions: [...] + * seriesLayoutBy: 'row', + * data: [[...]] + * } + * (2) Refer to datasetModel. + * series: [{ + * encode: {...} + * // Ignore datasetIndex means `datasetIndex: 0` + * // and the dimensions defination in dataset is used + * }, { + * encode: {...}, + * seriesLayoutBy: 'column', + * datasetIndex: 1 + * }] + * + * Get data from series itself or datset. + * @return {module:echarts/data/Source} source + */ + + +function getSource(seriesModel) { + return inner(seriesModel).source; +} +/** + * MUST be called before mergeOption of all series. + * @param {module:echarts/model/Global} ecModel + */ + + +function resetSourceDefaulter(ecModel) { + // `datasetMap` is used to make default encode. + inner(ecModel).datasetMap = createHashMap(); +} +/** + * [Caution]: + * MUST be called after series option merged and + * before "series.getInitailData()" called. + * + * [The rule of making default encode]: + * Category axis (if exists) alway map to the first dimension. + * Each other axis occupies a subsequent dimension. + * + * [Why make default encode]: + * Simplify the typing of encode in option, avoiding the case like that: + * series: [{encode: {x: 0, y: 1}}, {encode: {x: 0, y: 2}}, {encode: {x: 0, y: 3}}], + * where the "y" have to be manually typed as "1, 2, 3, ...". + * + * @param {module:echarts/model/Series} seriesModel + */ + + +function prepareSource(seriesModel) { + var seriesOption = seriesModel.option; + var data = seriesOption.data; + var sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL; + var fromDataset = false; + var seriesLayoutBy = seriesOption.seriesLayoutBy; + var sourceHeader = seriesOption.sourceHeader; + var dimensionsDefine = seriesOption.dimensions; + var datasetModel = getDatasetModel(seriesModel); + + if (datasetModel) { + var datasetOption = datasetModel.option; + data = datasetOption.source; + sourceFormat = inner(datasetModel).sourceFormat; + fromDataset = true; // These settings from series has higher priority. + + seriesLayoutBy = seriesLayoutBy || datasetOption.seriesLayoutBy; + sourceHeader == null && (sourceHeader = datasetOption.sourceHeader); + dimensionsDefine = dimensionsDefine || datasetOption.dimensions; + } + + var completeResult = completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine); + inner(seriesModel).source = new Source({ + data: data, + fromDataset: fromDataset, + seriesLayoutBy: seriesLayoutBy, + sourceFormat: sourceFormat, + dimensionsDefine: completeResult.dimensionsDefine, + startIndex: completeResult.startIndex, + dimensionsDetectCount: completeResult.dimensionsDetectCount, + // Note: dataset option does not have `encode`. + encodeDefine: seriesOption.encode + }); +} // return {startIndex, dimensionsDefine, dimensionsCount} + + +function completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine) { + if (!data) { + return { + dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine) + }; + } + + var dimensionsDetectCount; + var startIndex; + + if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { + // Rule: Most of the first line are string: it is header. + // Caution: consider a line with 5 string and 1 number, + // it still can not be sure it is a head, because the + // 5 string may be 5 values of category columns. + if (sourceHeader === 'auto' || sourceHeader == null) { + arrayRowsTravelFirst(function (val) { + // '-' is regarded as null/undefined. + if (val != null && val !== '-') { + if (isString(val)) { + startIndex == null && (startIndex = 1); + } else { + startIndex = 0; + } + } // 10 is an experience number, avoid long loop. + + }, seriesLayoutBy, data, 10); + } else { + startIndex = sourceHeader ? 1 : 0; + } + + if (!dimensionsDefine && startIndex === 1) { + dimensionsDefine = []; + arrayRowsTravelFirst(function (val, index) { + dimensionsDefine[index] = val != null ? val : ''; + }, seriesLayoutBy, data); + } + + dimensionsDetectCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? data.length : data[0] ? data[0].length : null; + } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { + if (!dimensionsDefine) { + dimensionsDefine = objectRowsCollectDimensions(data); + } + } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { + if (!dimensionsDefine) { + dimensionsDefine = []; + each(data, function (colArr, key) { + dimensionsDefine.push(key); + }); + } + } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { + var value0 = getDataItemValue(data[0]); + dimensionsDetectCount = isArray(value0) && value0.length || 1; + } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {} + + return { + startIndex: startIndex, + dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine), + dimensionsDetectCount: dimensionsDetectCount + }; +} // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'], +// which is reasonable. But dimension name is duplicated. +// Returns undefined or an array contains only object without null/undefiend or string. + + +function normalizeDimensionsDefine(dimensionsDefine) { + if (!dimensionsDefine) { + // The meaning of null/undefined is different from empty array. + return; + } + + var nameMap = createHashMap(); + return map(dimensionsDefine, function (item, index) { + item = extend({}, isObject(item) ? item : { + name: item + }); // User can set null in dimensions. + // We dont auto specify name, othewise a given name may + // cause it be refered unexpectedly. + + if (item.name == null) { + return item; + } // Also consider number form like 2012. + + + item.name += ''; // User may also specify displayName. + // displayName will always exists except user not + // specified or dim name is not specified or detected. + // (A auto generated dim name will not be used as + // displayName). + + if (item.displayName == null) { + item.displayName = item.name; + } + + var exist = nameMap.get(item.name); + + if (!exist) { + nameMap.set(item.name, { + count: 1 + }); + } else { + item.name += '-' + exist.count++; + } + + return item; + }); +} + +function arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) { + maxLoop == null && (maxLoop = Infinity); + + if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { + for (var i = 0; i < data.length && i < maxLoop; i++) { + cb(data[i] ? data[i][0] : null, i); + } + } else { + var value0 = data[0] || []; + + for (var i = 0; i < value0.length && i < maxLoop; i++) { + cb(value0[i], i); + } + } +} + +function objectRowsCollectDimensions(data) { + var firstIndex = 0; + var obj; + + while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line + + + if (obj) { + var dimensions = []; + each(obj, function (value, key) { + dimensions.push(key); + }); + return dimensions; + } +} +/** + * [The strategy of the arrengment of data dimensions for dataset]: + * "value way": all axes are non-category axes. So series one by one take + * several (the number is coordSysDims.length) dimensions from dataset. + * The result of data arrengment of data dimensions like: + * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y | + * "category way": at least one axis is category axis. So the the first data + * dimension is always mapped to the first category axis and shared by + * all of the series. The other data dimensions are taken by series like + * "value way" does. + * The result of data arrengment of data dimensions like: + * | ser_shared_x | ser0_y | ser1_y | ser2_y | + * + * @param {Array.} coordDimensions [{name: , type: , dimsDef: }, ...] + * @param {module:model/Series} seriesModel + * @param {module:data/Source} source + * @return {Object} encode Never be `null/undefined`. + */ + + +function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) { + var encode = {}; + var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur. + + if (!datasetModel || !coordDimensions) { + return encode; + } + + var encodeItemName = []; + var encodeSeriesName = []; + var ecModel = seriesModel.ecModel; + var datasetMap = inner(ecModel).datasetMap; + var key = datasetModel.uid + '_' + source.seriesLayoutBy; + var baseCategoryDimIndex; + var categoryWayValueDimStart; + coordDimensions = coordDimensions.slice(); + each(coordDimensions, function (coordDimInfo, coordDimIdx) { + !isObject(coordDimInfo) && (coordDimensions[coordDimIdx] = { + name: coordDimInfo + }); + + if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) { + baseCategoryDimIndex = coordDimIdx; + categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimensions[coordDimIdx]); + } + + encode[coordDimInfo.name] = []; + }); + var datasetRecord = datasetMap.get(key) || datasetMap.set(key, { + categoryWayDim: categoryWayValueDimStart, + valueWayDim: 0 + }); // TODO + // Auto detect first time axis and do arrangement. + + each(coordDimensions, function (coordDimInfo, coordDimIdx) { + var coordDimName = coordDimInfo.name; + var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way. + + if (baseCategoryDimIndex == null) { + var start = datasetRecord.valueWayDim; + pushDim(encode[coordDimName], start, count); + pushDim(encodeSeriesName, start, count); + datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule? + // especially when encode x y specified. + // consider: when mutiple series share one dimension + // category axis, series name should better use + // the other dimsion name. On the other hand, use + // both dimensions name. + } // In category way, the first category axis. + else if (baseCategoryDimIndex === coordDimIdx) { + pushDim(encode[coordDimName], 0, count); + pushDim(encodeItemName, 0, count); + } // In category way, the other axis. + else { + var start = datasetRecord.categoryWayDim; + pushDim(encode[coordDimName], start, count); + pushDim(encodeSeriesName, start, count); + datasetRecord.categoryWayDim += count; + } + }); + + function pushDim(dimIdxArr, idxFrom, idxCount) { + for (var i = 0; i < idxCount; i++) { + dimIdxArr.push(idxFrom + i); + } + } + + function getDataDimCountOnCoordDim(coordDimInfo) { + var dimsDef = coordDimInfo.dimsDef; + return dimsDef ? dimsDef.length : 1; + } + + encodeItemName.length && (encode.itemName = encodeItemName); + encodeSeriesName.length && (encode.seriesName = encodeSeriesName); + return encode; +} +/** + * Work for data like [{name: ..., value: ...}, ...]. + * + * @param {module:model/Series} seriesModel + * @param {module:data/Source} source + * @return {Object} encode Never be `null/undefined`. + */ + + +function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) { + var encode = {}; + var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur. + + if (!datasetModel) { + return encode; + } + + var sourceFormat = source.sourceFormat; + var dimensionsDefine = source.dimensionsDefine; + var potentialNameDimIndex; + + if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { + each(dimensionsDefine, function (dim, idx) { + if ((isObject(dim) ? dim.name : dim) === 'name') { + potentialNameDimIndex = idx; + } + }); + } // idxResult: {v, n}. + + + var idxResult = function () { + var idxRes0 = {}; + var idxRes1 = {}; + var guessRecords = []; // 5 is an experience value. + + for (var i = 0, len = Math.min(5, dimCount); i < len; i++) { + var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i); + guessRecords.push(guessResult); + var isPureNumber = guessResult === BE_ORDINAL.Not; // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim, + // and then find a name dim with the priority: + // "BE_ORDINAL.Might|BE_ORDINAL.Must" > "other dim" > "the value dim itself". + + if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) { + idxRes0.v = i; + } + + if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) { + idxRes0.n = i; + } + + if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) { + return idxRes0; + } // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not), + // find the first BE_ORDINAL.Might as the value dim, + // and then find a name dim with the priority: + // "other dim" > "the value dim itself". + // That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be + // treated as number. + + + if (!isPureNumber) { + if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) { + idxRes1.v = i; + } + + if (idxRes1.n == null || idxRes1.n === idxRes1.v) { + idxRes1.n = i; + } + } + } + + function fulfilled(idxResult) { + return idxResult.v != null && idxResult.n != null; + } + + return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null; + }(); + + if (idxResult) { + encode.value = idxResult.v; // `potentialNameDimIndex` has highest priority. + + var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n; // By default, label use itemName in charts. + // So we dont set encodeLabel here. + + encode.itemName = [nameDimIndex]; + encode.seriesName = [nameDimIndex]; + } + + return encode; +} +/** + * If return null/undefined, indicate that should not use datasetModel. + */ + + +function getDatasetModel(seriesModel) { + var option = seriesModel.option; // Caution: consider the scenario: + // A dataset is declared and a series is not expected to use the dataset, + // and at the beginning `setOption({series: { noData })` (just prepare other + // option but no data), then `setOption({series: {data: [...]}); In this case, + // the user should set an empty array to avoid that dataset is used by default. + + var thisData = option.data; + + if (!thisData) { + return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0); + } +} +/** + * The rule should not be complex, otherwise user might not + * be able to known where the data is wrong. + * The code is ugly, but how to make it neat? + * + * @param {module:echars/data/Source} source + * @param {number} dimIndex + * @return {BE_ORDINAL} guess result. + */ + + +function guessOrdinal(source, dimIndex) { + return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex); +} // dimIndex may be overflow source data. +// return {BE_ORDINAL} + + +function doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) { + var result; // Experience value. + + var maxLoop = 5; + + if (isTypedArray(data)) { + return BE_ORDINAL.Not; + } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine + // always exists in source. + + + var dimName; + var dimType; + + if (dimensionsDefine) { + var dimDefItem = dimensionsDefine[dimIndex]; + + if (isObject(dimDefItem)) { + dimName = dimDefItem.name; + dimType = dimDefItem.type; + } else if (isString(dimDefItem)) { + dimName = dimDefItem; + } + } + + if (dimType != null) { + return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not; + } + + if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { + if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { + var sample = data[dimIndex]; + + for (var i = 0; i < (sample || []).length && i < maxLoop; i++) { + if ((result = detectValue(sample[startIndex + i])) != null) { + return result; + } + } + } else { + for (var i = 0; i < data.length && i < maxLoop; i++) { + var row = data[startIndex + i]; + + if (row && (result = detectValue(row[dimIndex])) != null) { + return result; + } + } + } + } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { + if (!dimName) { + return BE_ORDINAL.Not; + } + + for (var i = 0; i < data.length && i < maxLoop; i++) { + var item = data[i]; + + if (item && (result = detectValue(item[dimName])) != null) { + return result; + } + } + } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { + if (!dimName) { + return BE_ORDINAL.Not; + } + + var sample = data[dimName]; + + if (!sample || isTypedArray(sample)) { + return BE_ORDINAL.Not; + } + + for (var i = 0; i < sample.length && i < maxLoop; i++) { + if ((result = detectValue(sample[i])) != null) { + return result; + } + } + } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { + for (var i = 0; i < data.length && i < maxLoop; i++) { + var item = data[i]; + var val = getDataItemValue(item); + + if (!isArray(val)) { + return BE_ORDINAL.Not; + } + + if ((result = detectValue(val[dimIndex])) != null) { + return result; + } + } + } + + function detectValue(val) { + var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as "number". + // `isFinit('')` get `true`. + + if (val != null && isFinite(val) && val !== '') { + return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not; + } else if (beStr && val !== '-') { + return BE_ORDINAL.Must; + } + } + + return BE_ORDINAL.Not; +} + +exports.BE_ORDINAL = BE_ORDINAL; +exports.detectSourceFormat = detectSourceFormat; +exports.getSource = getSource; +exports.resetSourceDefaulter = resetSourceDefaulter; +exports.prepareSource = prepareSource; +exports.makeSeriesEncodeForAxisCoordSys = makeSeriesEncodeForAxisCoordSys; +exports.makeSeriesEncodeForNameBased = makeSeriesEncodeForNameBased; +exports.guessOrdinal = guessOrdinal; + +/***/ }), + +/***/ "0fd3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var graphic = __webpack_require__("2306"); + +var Line = __webpack_require__("7e5b"); + +var zrUtil = __webpack_require__("6d8b"); + +var _symbol = __webpack_require__("a15a"); + +var createSymbol = _symbol.createSymbol; + +var vec2 = __webpack_require__("401b"); + +var curveUtil = __webpack_require__("4a3f"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Provide effect for line + * @module echarts/chart/helper/EffectLine + */ + +/** + * @constructor + * @extends {module:zrender/graphic/Group} + * @alias {module:echarts/chart/helper/Line} + */ +function EffectLine(lineData, idx, seriesScope) { + graphic.Group.call(this); + this.add(this.createLine(lineData, idx, seriesScope)); + + this._updateEffectSymbol(lineData, idx); +} + +var effectLineProto = EffectLine.prototype; + +effectLineProto.createLine = function (lineData, idx, seriesScope) { + return new Line(lineData, idx, seriesScope); +}; + +effectLineProto._updateEffectSymbol = function (lineData, idx) { + var itemModel = lineData.getItemModel(idx); + var effectModel = itemModel.getModel('effect'); + var size = effectModel.get('symbolSize'); + var symbolType = effectModel.get('symbol'); + + if (!zrUtil.isArray(size)) { + size = [size, size]; + } + + var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color'); + var symbol = this.childAt(1); + + if (this._symbolType !== symbolType) { + // Remove previous + this.remove(symbol); + symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color); + symbol.z2 = 100; + symbol.culling = true; + this.add(symbol); + } // Symbol may be removed if loop is false + + + if (!symbol) { + return; + } // Shadow color is same with color in default + + + symbol.setStyle('shadowColor', color); + symbol.setStyle(effectModel.getItemStyle(['color'])); + symbol.attr('scale', size); + symbol.setColor(color); + symbol.attr('scale', size); + this._symbolType = symbolType; + this._symbolScale = size; + + this._updateEffectAnimation(lineData, effectModel, idx); +}; + +effectLineProto._updateEffectAnimation = function (lineData, effectModel, idx) { + var symbol = this.childAt(1); + + if (!symbol) { + return; + } + + var self = this; + var points = lineData.getItemLayout(idx); + var period = effectModel.get('period') * 1000; + var loop = effectModel.get('loop'); + var constantSpeed = effectModel.get('constantSpeed'); + var delayExpr = zrUtil.retrieve(effectModel.get('delay'), function (idx) { + return idx / lineData.count() * period / 3; + }); + var isDelayFunc = typeof delayExpr === 'function'; // Ignore when updating + + symbol.ignore = true; + this.updateAnimationPoints(symbol, points); + + if (constantSpeed > 0) { + period = this.getLineLength(symbol) / constantSpeed * 1000; + } + + if (period !== this._period || loop !== this._loop) { + symbol.stopAnimation(); + var delay = delayExpr; + + if (isDelayFunc) { + delay = delayExpr(idx); + } + + if (symbol.__t > 0) { + delay = -period * symbol.__t; + } + + symbol.__t = 0; + var animator = symbol.animate('', loop).when(period, { + __t: 1 + }).delay(delay).during(function () { + self.updateSymbolPosition(symbol); + }); + + if (!loop) { + animator.done(function () { + self.remove(symbol); + }); + } + + animator.start(); + } + + this._period = period; + this._loop = loop; +}; + +effectLineProto.getLineLength = function (symbol) { + // Not so accurate + return vec2.dist(symbol.__p1, symbol.__cp1) + vec2.dist(symbol.__cp1, symbol.__p2); +}; + +effectLineProto.updateAnimationPoints = function (symbol, points) { + symbol.__p1 = points[0]; + symbol.__p2 = points[1]; + symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2]; +}; + +effectLineProto.updateData = function (lineData, idx, seriesScope) { + this.childAt(0).updateData(lineData, idx, seriesScope); + + this._updateEffectSymbol(lineData, idx); +}; + +effectLineProto.updateSymbolPosition = function (symbol) { + var p1 = symbol.__p1; + var p2 = symbol.__p2; + var cp1 = symbol.__cp1; + var t = symbol.__t; + var pos = symbol.position; + var lastPos = [pos[0], pos[1]]; + var quadraticAt = curveUtil.quadraticAt; + var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt; + pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t); + pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); // Tangent + + var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t); + var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t); + symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; // enable continuity trail for 'line', 'rect', 'roundRect' symbolType + + if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') { + if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) { + var scaleY = vec2.dist(lastPos, pos) * 1.05; + symbol.attr('scale', [symbol.scale[0], scaleY]); // make sure the last segment render within endPoint + + if (t === 1) { + pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2; + pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2; + } + } else if (symbol.__lastT === 1) { + // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly. + var scaleY = 2 * vec2.dist(p1, pos); + symbol.attr('scale', [symbol.scale[0], scaleY]); + } else { + symbol.attr('scale', this._symbolScale); + } + } + + symbol.__lastT = symbol.__t; + symbol.ignore = false; +}; + +effectLineProto.updateLayout = function (lineData, idx) { + this.childAt(0).updateLayout(lineData, idx); + var effectModel = lineData.getItemModel(idx).getModel('effect'); + + this._updateEffectAnimation(lineData, effectModel, idx); +}; + +zrUtil.inherits(EffectLine, graphic.Group); +var _default = EffectLine; +module.exports = _default; + +/***/ }), + +/***/ "10cc": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var BoundingRect = __webpack_require__("9850"); + +var visualSolution = __webpack_require__("2b8c"); + +var selector = __webpack_require__("a890"); + +var throttleUtil = __webpack_require__("88b3"); + +var BrushTargetManager = __webpack_require__("bd9e"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var STATE_LIST = ['inBrush', 'outOfBrush']; +var DISPATCH_METHOD = '__ecBrushSelect'; +var DISPATCH_FLAG = '__ecInBrushSelectEvent'; +var PRIORITY_BRUSH = echarts.PRIORITY.VISUAL.BRUSH; +/** + * Layout for visual, the priority higher than other layout, and before brush visual. + */ + +echarts.registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) { + ecModel.eachComponent({ + mainType: 'brush' + }, function (brushModel) { + payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : { + brushType: false + }); + }); + layoutCovers(ecModel); +}); + +function layoutCovers(ecModel) { + ecModel.eachComponent({ + mainType: 'brush' + }, function (brushModel) { + var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel); + brushTargetManager.setInputRanges(brushModel.areas, ecModel); + }); +} +/** + * Register the visual encoding if this modules required. + */ + + +echarts.registerVisual(PRIORITY_BRUSH, function (ecModel, api, payload) { + var brushSelected = []; + var throttleType; + var throttleDelay; + ecModel.eachComponent({ + mainType: 'brush' + }, function (brushModel, brushIndex) { + var thisBrushSelected = { + brushId: brushModel.id, + brushIndex: brushIndex, + brushName: brushModel.name, + areas: zrUtil.clone(brushModel.areas), + selected: [] + }; // Every brush component exists in event params, convenient + // for user to find by index. + + brushSelected.push(thisBrushSelected); + var brushOption = brushModel.option; + var brushLink = brushOption.brushLink; + var linkedSeriesMap = []; + var selectedDataIndexForLink = []; + var rangeInfoBySeries = []; + var hasBrushExists = 0; + + if (!brushIndex) { + // Only the first throttle setting works. + throttleType = brushOption.throttleType; + throttleDelay = brushOption.throttleDelay; + } // Add boundingRect and selectors to range. + + + var areas = zrUtil.map(brushModel.areas, function (area) { + return bindSelector(zrUtil.defaults({ + boundingRect: boundingRectBuilders[area.brushType](area) + }, area)); + }); + var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) { + mappingOption.mappingMethod = 'fixed'; + }); + zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) { + linkedSeriesMap[seriesIndex] = 1; + }); + + function linkOthers(seriesIndex) { + return brushLink === 'all' || linkedSeriesMap[seriesIndex]; + } // If no supported brush or no brush on the series, + // all visuals should be in original state. + + + function brushed(rangeInfoList) { + return !!rangeInfoList.length; + } + /** + * Logic for each series: (If the logic has to be modified one day, do it carefully!) + * + * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord. + * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord. + * └!hasBrushExist┘ └nothing. + * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord. + * └!hasBrushExist┘ └nothing. + * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck. + * !brushed┘ └nothing. + * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing. + */ + // Step A + + + ecModel.eachSeries(function (seriesModel, seriesIndex) { + var rangeInfoList = rangeInfoBySeries[seriesIndex] = []; + seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex, rangeInfoList) : stepAOthers(seriesModel, seriesIndex, rangeInfoList); + }); + + function stepAParallel(seriesModel, seriesIndex) { + var coordSys = seriesModel.coordinateSystem; + hasBrushExists |= coordSys.hasAxisBrushed(); + linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) { + activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1); + }); + } + + function stepAOthers(seriesModel, seriesIndex, rangeInfoList) { + var selectorsByBrushType = getSelectorsByBrushType(seriesModel); + + if (!selectorsByBrushType || brushModelNotControll(brushModel, seriesIndex)) { + return; + } + + zrUtil.each(areas, function (area) { + selectorsByBrushType[area.brushType] && brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel) && rangeInfoList.push(area); + hasBrushExists |= brushed(rangeInfoList); + }); + + if (linkOthers(seriesIndex) && brushed(rangeInfoList)) { + var data = seriesModel.getData(); + data.each(function (dataIndex) { + if (checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex)) { + selectedDataIndexForLink[dataIndex] = 1; + } + }); + } + } // Step B + + + ecModel.eachSeries(function (seriesModel, seriesIndex) { + var seriesBrushSelected = { + seriesId: seriesModel.id, + seriesIndex: seriesIndex, + seriesName: seriesModel.name, + dataIndex: [] + }; // Every series exists in event params, convenient + // for user to find series by seriesIndex. + + thisBrushSelected.selected.push(seriesBrushSelected); + var selectorsByBrushType = getSelectorsByBrushType(seriesModel); + var rangeInfoList = rangeInfoBySeries[seriesIndex]; + var data = seriesModel.getData(); + var getValueState = linkOthers(seriesIndex) ? function (dataIndex) { + return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; + } : function (dataIndex) { + return checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; + }; // If no supported brush or no brush, all visuals are in original state. + + (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState); + }); + }); + dispatchAction(api, throttleType, throttleDelay, brushSelected, payload); +}); + +function dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) { + // This event will not be triggered when `setOpion`, otherwise dead lock may + // triggered when do `setOption` in event listener, which we do not find + // satisfactory way to solve yet. Some considered resolutions: + // (a) Diff with prevoius selected data ant only trigger event when changed. + // But store previous data and diff precisely (i.e., not only by dataIndex, but + // also detect value changes in selected data) might bring complexity or fragility. + // (b) Use spectial param like `silent` to suppress event triggering. + // But such kind of volatile param may be weird in `setOption`. + if (!payload) { + return; + } + + var zr = api.getZr(); + + if (zr[DISPATCH_FLAG]) { + return; + } + + if (!zr[DISPATCH_METHOD]) { + zr[DISPATCH_METHOD] = doDispatch; + } + + var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType); + fn(api, brushSelected); +} + +function doDispatch(api, brushSelected) { + if (!api.isDisposed()) { + var zr = api.getZr(); + zr[DISPATCH_FLAG] = true; + api.dispatchAction({ + type: 'brushSelect', + batch: brushSelected + }); + zr[DISPATCH_FLAG] = false; + } +} + +function checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) { + for (var i = 0, len = rangeInfoList.length; i < len; i++) { + var area = rangeInfoList[i]; + + if (selectorsByBrushType[area.brushType](dataIndex, data, area.selectors, area)) { + return true; + } + } +} + +function getSelectorsByBrushType(seriesModel) { + var brushSelector = seriesModel.brushSelector; + + if (zrUtil.isString(brushSelector)) { + var sels = []; + zrUtil.each(selector, function (selectorsByElementType, brushType) { + sels[brushType] = function (dataIndex, data, selectors, area) { + var itemLayout = data.getItemLayout(dataIndex); + return selectorsByElementType[brushSelector](itemLayout, selectors, area); + }; + }); + return sels; + } else if (zrUtil.isFunction(brushSelector)) { + var bSelector = {}; + zrUtil.each(selector, function (sel, brushType) { + bSelector[brushType] = brushSelector; + }); + return bSelector; + } + + return brushSelector; +} + +function brushModelNotControll(brushModel, seriesIndex) { + var seriesIndices = brushModel.option.seriesIndex; + return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices); +} + +function bindSelector(area) { + var selectors = area.selectors = {}; + zrUtil.each(selector[area.brushType], function (selFn, elType) { + // Do not use function binding or curry for performance. + selectors[elType] = function (itemLayout) { + return selFn(itemLayout, selectors, area); + }; + }); + return area; +} + +var boundingRectBuilders = { + lineX: zrUtil.noop, + lineY: zrUtil.noop, + rect: function (area) { + return getBoundingRectFromMinMax(area.range); + }, + polygon: function (area) { + var minMax; + var range = area.range; + + for (var i = 0, len = range.length; i < len; i++) { + minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]]; + var rg = range[i]; + rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]); + rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]); + rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]); + rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]); + } + + return minMax && getBoundingRectFromMinMax(minMax); + } +}; + +function getBoundingRectFromMinMax(minMax) { + return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]); +} + +exports.layoutCovers = layoutCovers; + +/***/ }), + +/***/ "1111": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("67a8"); + +__webpack_require__("4784"); + +var visualSymbol = __webpack_require__("7f96"); + +var layoutPoints = __webpack_require__("87c3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerVisual(visualSymbol('effectScatter', 'circle')); +echarts.registerLayout(layoutPoints('effectScatter')); + +/***/ }), + +/***/ "1148": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__("a691"); +var requireObjectCoercible = __webpack_require__("1d80"); + +// `String.prototype.repeat` method implementation +// https://tc39.github.io/ecma262/#sec-string.prototype.repeat +module.exports = ''.repeat || function repeat(count) { + var str = String(requireObjectCoercible(this)); + var result = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; + return result; +}; + + +/***/ }), + +/***/ "1276": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784"); +var isRegExp = __webpack_require__("44e7"); +var anObject = __webpack_require__("825a"); +var requireObjectCoercible = __webpack_require__("1d80"); +var speciesConstructor = __webpack_require__("4840"); +var advanceStringIndex = __webpack_require__("8aa5"); +var toLength = __webpack_require__("50c4"); +var callRegExpExec = __webpack_require__("14c3"); +var regexpExec = __webpack_require__("9263"); +var fails = __webpack_require__("d039"); + +var arrayPush = [].push; +var min = Math.min; +var MAX_UINT32 = 0xFFFFFFFF; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { + var internalSplit; + if ( + 'abbc'.split(/(b)*/)[1] == 'c' || + 'test'.split(/(?:)/, -1).length != 4 || + 'ab'.split(/(?:ab)*/).length != 2 || + '.'.split(/(.?)(.?)/).length != 4 || + '.'.split(/()()/).length > 1 || + ''.split(/.?/).length + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(requireObjectCoercible(this)); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (separator === undefined) return [string]; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) { + return nativeSplit.call(string, separator, lim); + } + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy.lastIndex; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= lim) break; + } + if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output.length > lim ? output.slice(0, lim) : output; + }; + // Chakra, V8 + } else if ('0'.split(undefined, 0).length) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); + }; + } else internalSplit = nativeSplit; + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = requireObjectCoercible(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}, !SUPPORTS_Y); + + +/***/ }), + +/***/ "133d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var modelUtil = __webpack_require__("e0d3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @param {Object} finder contains {seriesIndex, dataIndex, dataIndexInside} + * @param {module:echarts/model/Global} ecModel + * @return {Object} {point: [x, y], el: ...} point Will not be null. + */ +function _default(finder, ecModel) { + var point = []; + var seriesIndex = finder.seriesIndex; + var seriesModel; + + if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) { + return { + point: [] + }; + } + + var data = seriesModel.getData(); + var dataIndex = modelUtil.queryDataIndex(data, finder); + + if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) { + return { + point: [] + }; + } + + var el = data.getItemGraphicEl(dataIndex); + var coordSys = seriesModel.coordinateSystem; + + if (seriesModel.getTooltipPosition) { + point = seriesModel.getTooltipPosition(dataIndex) || []; + } else if (coordSys && coordSys.dataToPoint) { + point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) { + return data.mapDimension(dim); + }), dataIndex, true)) || []; + } else if (el) { + // Use graphic bounding rect + var rect = el.getBoundingRect().clone(); + rect.applyTransform(el.transform); + point = [rect.x + rect.width / 2, rect.y + rect.height / 2]; + } + + return { + point: point, + el: el + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "1418": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var _symbol = __webpack_require__("a15a"); + +var createSymbol = _symbol.createSymbol; + +var graphic = __webpack_require__("2306"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _labelHelper = __webpack_require__("c775"); + +var getDefaultLabel = _labelHelper.getDefaultLabel; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @module echarts/chart/helper/Symbol + */ + +/** + * @constructor + * @alias {module:echarts/chart/helper/Symbol} + * @param {module:echarts/data/List} data + * @param {number} idx + * @extends {module:zrender/graphic/Group} + */ +function SymbolClz(data, idx, seriesScope) { + graphic.Group.call(this); + this.updateData(data, idx, seriesScope); +} + +var symbolProto = SymbolClz.prototype; +/** + * @public + * @static + * @param {module:echarts/data/List} data + * @param {number} dataIndex + * @return {Array.} [width, height] + */ + +var getSymbolSize = SymbolClz.getSymbolSize = function (data, idx) { + var symbolSize = data.getItemVisual(idx, 'symbolSize'); + return symbolSize instanceof Array ? symbolSize.slice() : [+symbolSize, +symbolSize]; +}; + +function getScale(symbolSize) { + return [symbolSize[0] / 2, symbolSize[1] / 2]; +} + +function driftSymbol(dx, dy) { + this.parent.drift(dx, dy); +} + +symbolProto._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) { + // Remove paths created before + this.removeAll(); + var color = data.getItemVisual(idx, 'color'); // var symbolPath = createSymbol( + // symbolType, -0.5, -0.5, 1, 1, color + // ); + // If width/height are set too small (e.g., set to 1) on ios10 + // and macOS Sierra, a circle stroke become a rect, no matter what + // the scale is set. So we set width/height as 2. See #4150. + + var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, color, keepAspect); + symbolPath.attr({ + z2: 100, + culling: true, + scale: getScale(symbolSize) + }); // Rewrite drift method + + symbolPath.drift = driftSymbol; + this._symbolType = symbolType; + this.add(symbolPath); +}; +/** + * Stop animation + * @param {boolean} toLastFrame + */ + + +symbolProto.stopSymbolAnimation = function (toLastFrame) { + this.childAt(0).stopAnimation(toLastFrame); +}; +/** + * FIXME: + * Caution: This method breaks the encapsulation of this module, + * but it indeed brings convenience. So do not use the method + * unless you detailedly know all the implements of `Symbol`, + * especially animation. + * + * Get symbol path element. + */ + + +symbolProto.getSymbolPath = function () { + return this.childAt(0); +}; +/** + * Get scale(aka, current symbol size). + * Including the change caused by animation + */ + + +symbolProto.getScale = function () { + return this.childAt(0).scale; +}; +/** + * Highlight symbol + */ + + +symbolProto.highlight = function () { + this.childAt(0).trigger('emphasis'); +}; +/** + * Downplay symbol + */ + + +symbolProto.downplay = function () { + this.childAt(0).trigger('normal'); +}; +/** + * @param {number} zlevel + * @param {number} z + */ + + +symbolProto.setZ = function (zlevel, z) { + var symbolPath = this.childAt(0); + symbolPath.zlevel = zlevel; + symbolPath.z = z; +}; + +symbolProto.setDraggable = function (draggable) { + var symbolPath = this.childAt(0); + symbolPath.draggable = draggable; + symbolPath.cursor = draggable ? 'move' : symbolPath.cursor; +}; +/** + * Update symbol properties + * @param {module:echarts/data/List} data + * @param {number} idx + * @param {Object} [seriesScope] + * @param {Object} [seriesScope.itemStyle] + * @param {Object} [seriesScope.hoverItemStyle] + * @param {Object} [seriesScope.symbolRotate] + * @param {Object} [seriesScope.symbolOffset] + * @param {module:echarts/model/Model} [seriesScope.labelModel] + * @param {module:echarts/model/Model} [seriesScope.hoverLabelModel] + * @param {boolean} [seriesScope.hoverAnimation] + * @param {Object} [seriesScope.cursorStyle] + * @param {module:echarts/model/Model} [seriesScope.itemModel] + * @param {string} [seriesScope.symbolInnerColor] + * @param {Object} [seriesScope.fadeIn=false] + */ + + +symbolProto.updateData = function (data, idx, seriesScope) { + this.silent = false; + var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; + var seriesModel = data.hostModel; + var symbolSize = getSymbolSize(data, idx); + var isInit = symbolType !== this._symbolType; + + if (isInit) { + var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect'); + + this._createSymbol(symbolType, data, idx, symbolSize, keepAspect); + } else { + var symbolPath = this.childAt(0); + symbolPath.silent = false; + graphic.updateProps(symbolPath, { + scale: getScale(symbolSize) + }, seriesModel, idx); + } + + this._updateCommon(data, idx, symbolSize, seriesScope); + + if (isInit) { + var symbolPath = this.childAt(0); + var fadeIn = seriesScope && seriesScope.fadeIn; + var target = { + scale: symbolPath.scale.slice() + }; + fadeIn && (target.style = { + opacity: symbolPath.style.opacity + }); + symbolPath.scale = [0, 0]; + fadeIn && (symbolPath.style.opacity = 0); + graphic.initProps(symbolPath, target, seriesModel, idx); + } + + this._seriesModel = seriesModel; +}; // Update common properties + + +var normalStyleAccessPath = ['itemStyle']; +var emphasisStyleAccessPath = ['emphasis', 'itemStyle']; +var normalLabelAccessPath = ['label']; +var emphasisLabelAccessPath = ['emphasis', 'label']; +/** + * @param {module:echarts/data/List} data + * @param {number} idx + * @param {Array.} symbolSize + * @param {Object} [seriesScope] + */ + +symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) { + var symbolPath = this.childAt(0); + var seriesModel = data.hostModel; + var color = data.getItemVisual(idx, 'color'); // Reset style + + if (symbolPath.type !== 'image') { + symbolPath.useStyle({ + strokeNoScale: true + }); + } else { + symbolPath.setStyle({ + opacity: null, + shadowBlur: null, + shadowOffsetX: null, + shadowOffsetY: null, + shadowColor: null + }); + } + + var itemStyle = seriesScope && seriesScope.itemStyle; + var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle; + var symbolOffset = seriesScope && seriesScope.symbolOffset; + var labelModel = seriesScope && seriesScope.labelModel; + var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel; + var hoverAnimation = seriesScope && seriesScope.hoverAnimation; + var cursorStyle = seriesScope && seriesScope.cursorStyle; + + if (!seriesScope || data.hasItemOption) { + var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx); // Color must be excluded. + // Because symbol provide setColor individually to set fill and stroke + + itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']); + hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle(); + symbolOffset = itemModel.getShallow('symbolOffset'); + labelModel = itemModel.getModel(normalLabelAccessPath); + hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath); + hoverAnimation = itemModel.getShallow('hoverAnimation'); + cursorStyle = itemModel.getShallow('cursor'); + } else { + hoverItemStyle = zrUtil.extend({}, hoverItemStyle); + } + + var elStyle = symbolPath.style; + var symbolRotate = data.getItemVisual(idx, 'symbolRotate'); + symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0); + + if (symbolOffset) { + symbolPath.attr('position', [parsePercent(symbolOffset[0], symbolSize[0]), parsePercent(symbolOffset[1], symbolSize[1])]); + } + + cursorStyle && symbolPath.attr('cursor', cursorStyle); // PENDING setColor before setStyle!!! + + symbolPath.setColor(color, seriesScope && seriesScope.symbolInnerColor); + symbolPath.setStyle(itemStyle); + var opacity = data.getItemVisual(idx, 'opacity'); + + if (opacity != null) { + elStyle.opacity = opacity; + } + + var liftZ = data.getItemVisual(idx, 'liftZ'); + var z2Origin = symbolPath.__z2Origin; + + if (liftZ != null) { + if (z2Origin == null) { + symbolPath.__z2Origin = symbolPath.z2; + symbolPath.z2 += liftZ; + } + } else if (z2Origin != null) { + symbolPath.z2 = z2Origin; + symbolPath.__z2Origin = null; + } + + var useNameLabel = seriesScope && seriesScope.useNameLabel; + graphic.setLabelStyle(elStyle, hoverItemStyle, labelModel, hoverLabelModel, { + labelFetcher: seriesModel, + labelDataIndex: idx, + defaultText: getLabelDefaultText, + isRectText: true, + autoColor: color + }); // Do not execute util needed. + + function getLabelDefaultText(idx, opt) { + return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx); + } + + symbolPath.__symbolOriginalScale = getScale(symbolSize); + symbolPath.hoverStyle = hoverItemStyle; + symbolPath.highDownOnUpdate = hoverAnimation && seriesModel.isAnimationEnabled() ? highDownOnUpdate : null; + graphic.setHoverStyle(symbolPath); +}; + +function highDownOnUpdate(fromState, toState) { + // Do not support this hover animation util some scenario required. + // Animation can only be supported in hover layer when using `el.incremetal`. + if (this.incremental || this.useHoverLayer) { + return; + } + + if (toState === 'emphasis') { + var scale = this.__symbolOriginalScale; + var ratio = scale[1] / scale[0]; + var emphasisOpt = { + scale: [Math.max(scale[0] * 1.1, scale[0] + 3), Math.max(scale[1] * 1.1, scale[1] + 3 * ratio)] + }; // FIXME + // modify it after support stop specified animation. + // toState === fromState + // ? (this.stopAnimation(), this.attr(emphasisOpt)) + + this.animateTo(emphasisOpt, 400, 'elasticOut'); + } else if (toState === 'normal') { + this.animateTo({ + scale: this.__symbolOriginalScale + }, 400, 'elasticOut'); + } +} +/** + * @param {Function} cb + * @param {Object} [opt] + * @param {Object} [opt.keepLabel=true] + */ + + +symbolProto.fadeOut = function (cb, opt) { + var symbolPath = this.childAt(0); // Avoid mistaken hover when fading out + + this.silent = symbolPath.silent = true; // Not show text when animating + + !(opt && opt.keepLabel) && (symbolPath.style.text = null); + graphic.updateProps(symbolPath, { + style: { + opacity: 0 + }, + scale: [0, 0] + }, this._seriesModel, this.dataIndex, cb); +}; + +zrUtil.inherits(SymbolClz, graphic.Group); +var _default = SymbolClz; +module.exports = _default; + +/***/ }), + +/***/ "1466": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var graphic = __webpack_require__("2306"); + +var zrUtil = __webpack_require__("6d8b"); + +var symbolUtil = __webpack_require__("a15a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function normalizeSymbolSize(symbolSize) { + if (!zrUtil.isArray(symbolSize)) { + symbolSize = [+symbolSize, +symbolSize]; + } + + return symbolSize; +} + +var _default = echarts.extendChartView({ + type: 'radar', + render: function (seriesModel, ecModel, api) { + var polar = seriesModel.coordinateSystem; + var group = this.group; + var data = seriesModel.getData(); + var oldData = this._data; + + function createSymbol(data, idx) { + var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; + var color = data.getItemVisual(idx, 'color'); + + if (symbolType === 'none') { + return; + } + + var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize')); + var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2, color); + symbolPath.attr({ + style: { + strokeNoScale: true + }, + z2: 100, + scale: [symbolSize[0] / 2, symbolSize[1] / 2] + }); + return symbolPath; + } + + function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) { + // Simply rerender all + symbolGroup.removeAll(); + + for (var i = 0; i < newPoints.length - 1; i++) { + var symbolPath = createSymbol(data, idx); + + if (symbolPath) { + symbolPath.__dimIdx = i; + + if (oldPoints[i]) { + symbolPath.attr('position', oldPoints[i]); + graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, { + position: newPoints[i] + }, seriesModel, idx); + } else { + symbolPath.attr('position', newPoints[i]); + } + + symbolGroup.add(symbolPath); + } + } + } + + function getInitialPoints(points) { + return zrUtil.map(points, function (pt) { + return [polar.cx, polar.cy]; + }); + } + + data.diff(oldData).add(function (idx) { + var points = data.getItemLayout(idx); + + if (!points) { + return; + } + + var polygon = new graphic.Polygon(); + var polyline = new graphic.Polyline(); + var target = { + shape: { + points: points + } + }; + polygon.shape.points = getInitialPoints(points); + polyline.shape.points = getInitialPoints(points); + graphic.initProps(polygon, target, seriesModel, idx); + graphic.initProps(polyline, target, seriesModel, idx); + var itemGroup = new graphic.Group(); + var symbolGroup = new graphic.Group(); + itemGroup.add(polyline); + itemGroup.add(polygon); + itemGroup.add(symbolGroup); + updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true); + data.setItemGraphicEl(idx, itemGroup); + }).update(function (newIdx, oldIdx) { + var itemGroup = oldData.getItemGraphicEl(oldIdx); + var polyline = itemGroup.childAt(0); + var polygon = itemGroup.childAt(1); + var symbolGroup = itemGroup.childAt(2); + var target = { + shape: { + points: data.getItemLayout(newIdx) + } + }; + + if (!target.shape.points) { + return; + } + + updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false); + graphic.updateProps(polyline, target, seriesModel); + graphic.updateProps(polygon, target, seriesModel); + data.setItemGraphicEl(newIdx, itemGroup); + }).remove(function (idx) { + group.remove(oldData.getItemGraphicEl(idx)); + }).execute(); + data.eachItemGraphicEl(function (itemGroup, idx) { + var itemModel = data.getItemModel(idx); + var polyline = itemGroup.childAt(0); + var polygon = itemGroup.childAt(1); + var symbolGroup = itemGroup.childAt(2); + var color = data.getItemVisual(idx, 'color'); + group.add(itemGroup); + polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), { + fill: 'none', + stroke: color + })); + polyline.hoverStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle(); + var areaStyleModel = itemModel.getModel('areaStyle'); + var hoverAreaStyleModel = itemModel.getModel('emphasis.areaStyle'); + var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty(); + var hoverPolygonIgnore = hoverAreaStyleModel.isEmpty() && hoverAreaStyleModel.parentModel.isEmpty(); + hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore; + polygon.ignore = polygonIgnore; + polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), { + fill: color, + opacity: 0.7 + })); + polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle(); + var itemStyle = itemModel.getModel('itemStyle').getItemStyle(['color']); + var itemHoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle(); + var labelModel = itemModel.getModel('label'); + var labelHoverModel = itemModel.getModel('emphasis.label'); + symbolGroup.eachChild(function (symbolPath) { + symbolPath.setStyle(itemStyle); + symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle); + var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx); + (defaultText == null || isNaN(defaultText)) && (defaultText = ''); + graphic.setLabelStyle(symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel, { + labelFetcher: data.hostModel, + labelDataIndex: idx, + labelDimIndex: symbolPath.__dimIdx, + defaultText: defaultText, + autoColor: color, + isRectText: true + }); + }); + + itemGroup.highDownOnUpdate = function (fromState, toState) { + polygon.attr('ignore', toState === 'emphasis' ? hoverPolygonIgnore : polygonIgnore); + }; + + graphic.setHoverStyle(itemGroup); + }); + this._data = data; + }, + remove: function () { + this.group.removeAll(); + this._data = null; + }, + dispose: function () {} +}); + +module.exports = _default; + +/***/ }), + +/***/ "14c3": +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__("c6b6"); +var regexpExec = __webpack_require__("9263"); + +// `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classof(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); +}; + + + +/***/ }), + +/***/ "14d3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +var AxisBuilder = __webpack_require__("fab2"); + +var AxisView = __webpack_require__("6679"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName']; +var selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine']; + +var _default = AxisView.extend({ + type: 'radiusAxis', + axisPointerClass: 'PolarAxisPointer', + render: function (radiusAxisModel, ecModel) { + this.group.removeAll(); + + if (!radiusAxisModel.get('show')) { + return; + } + + var radiusAxis = radiusAxisModel.axis; + var polar = radiusAxis.polar; + var angleAxis = polar.getAngleAxis(); + var ticksCoords = radiusAxis.getTicksCoords(); + var minorTicksCoords = radiusAxis.getMinorTicksCoords(); + var axisAngle = angleAxis.getExtent()[0]; + var radiusExtent = radiusAxis.getExtent(); + var layout = layoutAxis(polar, radiusAxisModel, axisAngle); + var axisBuilder = new AxisBuilder(radiusAxisModel, layout); + zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder); + this.group.add(axisBuilder.getGroup()); + zrUtil.each(selfBuilderAttrs, function (name) { + if (radiusAxisModel.get(name + '.show') && !radiusAxis.scale.isBlank()) { + this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords); + } + }, this); + }, + + /** + * @private + */ + _splitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { + var splitLineModel = radiusAxisModel.getModel('splitLine'); + var lineStyleModel = splitLineModel.getModel('lineStyle'); + var lineColors = lineStyleModel.get('color'); + var lineCount = 0; + lineColors = lineColors instanceof Array ? lineColors : [lineColors]; + var splitLines = []; + + for (var i = 0; i < ticksCoords.length; i++) { + var colorIndex = lineCount++ % lineColors.length; + splitLines[colorIndex] = splitLines[colorIndex] || []; + splitLines[colorIndex].push(new graphic.Circle({ + shape: { + cx: polar.cx, + cy: polar.cy, + r: ticksCoords[i].coord + } + })); + } // Simple optimization + // Batching the lines if color are the same + + + for (var i = 0; i < splitLines.length; i++) { + this.group.add(graphic.mergePath(splitLines[i], { + style: zrUtil.defaults({ + stroke: lineColors[i % lineColors.length], + fill: null + }, lineStyleModel.getLineStyle()), + silent: true + })); + } + }, + + /** + * @private + */ + _minorSplitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) { + if (!minorTicksCoords.length) { + return; + } + + var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine'); + var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); + var lines = []; + + for (var i = 0; i < minorTicksCoords.length; i++) { + for (var k = 0; k < minorTicksCoords[i].length; k++) { + lines.push(new graphic.Circle({ + shape: { + cx: polar.cx, + cy: polar.cy, + r: minorTicksCoords[i][k].coord + } + })); + } + } + + this.group.add(graphic.mergePath(lines, { + style: zrUtil.defaults({ + fill: null + }, lineStyleModel.getLineStyle()), + silent: true + })); + }, + + /** + * @private + */ + _splitArea: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { + if (!ticksCoords.length) { + return; + } + + var splitAreaModel = radiusAxisModel.getModel('splitArea'); + var areaStyleModel = splitAreaModel.getModel('areaStyle'); + var areaColors = areaStyleModel.get('color'); + var lineCount = 0; + areaColors = areaColors instanceof Array ? areaColors : [areaColors]; + var splitAreas = []; + var prevRadius = ticksCoords[0].coord; + + for (var i = 1; i < ticksCoords.length; i++) { + var colorIndex = lineCount++ % areaColors.length; + splitAreas[colorIndex] = splitAreas[colorIndex] || []; + splitAreas[colorIndex].push(new graphic.Sector({ + shape: { + cx: polar.cx, + cy: polar.cy, + r0: prevRadius, + r: ticksCoords[i].coord, + startAngle: 0, + endAngle: Math.PI * 2 + }, + silent: true + })); + prevRadius = ticksCoords[i].coord; + } // Simple optimization + // Batching the lines if color are the same + + + for (var i = 0; i < splitAreas.length; i++) { + this.group.add(graphic.mergePath(splitAreas[i], { + style: zrUtil.defaults({ + fill: areaColors[i % areaColors.length] + }, areaStyleModel.getAreaStyle()), + silent: true + })); + } + } +}); +/** + * @inner + */ + + +function layoutAxis(polar, radiusAxisModel, axisAngle) { + return { + position: [polar.cx, polar.cy], + rotation: axisAngle / 180 * Math.PI, + labelDirection: -1, + tickDirection: -1, + nameDirection: 1, + labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'), + // Over splitLine and splitArea + z2: 1 + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "1548": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var createListFromArray = __webpack_require__("3301"); + +var axisHelper = __webpack_require__("697e"); + +var axisModelCommonMixin = __webpack_require__("2023"); + +var Model = __webpack_require__("4319"); + +var _layout = __webpack_require__("f934"); + +var getLayoutRect = _layout.getLayoutRect; +exports.getLayoutRect = _layout.getLayoutRect; + +var _dataStackHelper = __webpack_require__("ee1a"); + +var enableDataStack = _dataStackHelper.enableDataStack; +var isDimensionStacked = _dataStackHelper.isDimensionStacked; +var getStackedDimension = _dataStackHelper.getStackedDimension; + +var _completeDimensions = __webpack_require__("862d"); + +exports.completeDimensions = _completeDimensions; + +var _createDimensions = __webpack_require__("b1d4"); + +exports.createDimensions = _createDimensions; + +var _symbol = __webpack_require__("a15a"); + +exports.createSymbol = _symbol.createSymbol; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge'; + +/** + * Create a muti dimension List structure from seriesModel. + * @param {module:echarts/model/Model} seriesModel + * @return {module:echarts/data/List} list + */ +function createList(seriesModel) { + return createListFromArray(seriesModel.getSource(), seriesModel); +} // export function createGraph(seriesModel) { +// var nodes = seriesModel.get('data'); +// var links = seriesModel.get('links'); +// return createGraphFromNodeEdge(nodes, links, seriesModel); +// } + + +var dataStack = { + isDimensionStacked: isDimensionStacked, + enableDataStack: enableDataStack, + getStackedDimension: getStackedDimension +}; +/** + * Create a symbol element with given symbol configuration: shape, x, y, width, height, color + * @param {string} symbolDesc + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + * @param {string} color + */ + +/** + * Create scale + * @param {Array.} dataExtent + * @param {Object|module:echarts/Model} option + */ +function createScale(dataExtent, option) { + var axisModel = option; + + if (!Model.isInstance(option)) { + axisModel = new Model(option); + zrUtil.mixin(axisModel, axisModelCommonMixin); + } + + var scale = axisHelper.createScaleByModel(axisModel); + scale.setExtent(dataExtent[0], dataExtent[1]); + axisHelper.niceScaleExtent(scale, axisModel); + return scale; +} +/** + * Mixin common methods to axis model, + * + * Inlcude methods + * `getFormattedLabels() => Array.` + * `getCategories() => Array.` + * `getMin(origin: boolean) => number` + * `getMax(origin: boolean) => number` + * `getNeedCrossZero() => boolean` + * `setRange(start: number, end: number)` + * `resetRange()` + */ + + +function mixinAxisModelCommonMethods(Model) { + zrUtil.mixin(Model, axisModelCommonMixin); +} + +exports.createList = createList; +exports.dataStack = dataStack; +exports.createScale = createScale; +exports.mixinAxisModelCommonMethods = mixinAxisModelCommonMethods; + +/***/ }), + +/***/ "159b": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var DOMIterables = __webpack_require__("fdbc"); +var forEach = __webpack_require__("17c2"); +var createNonEnumerableProperty = __webpack_require__("9112"); + +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { + createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); + } catch (error) { + CollectionPrototype.forEach = forEach; + } +} + + +/***/ }), + +/***/ "15af": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("cb69"); + +__webpack_require__("abff"); + +var visualSymbol = __webpack_require__("7f96"); + +var layoutPoints = __webpack_require__("87c3"); + +__webpack_require__("01ed"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// import * as zrUtil from 'zrender/src/core/util'; +// In case developer forget to include grid component +echarts.registerVisual(visualSymbol('scatter', 'circle')); +echarts.registerLayout(layoutPoints('scatter')); // echarts.registerProcessor(function (ecModel, api) { +// ecModel.eachSeriesByType('scatter', function (seriesModel) { +// var data = seriesModel.getData(); +// var coordSys = seriesModel.coordinateSystem; +// if (coordSys.type !== 'geo') { +// return; +// } +// var startPt = coordSys.pointToData([0, 0]); +// var endPt = coordSys.pointToData([api.getWidth(), api.getHeight()]); +// var dims = zrUtil.map(coordSys.dimensions, function (dim) { +// return data.mapDimension(dim); +// }); +// var range = {}; +// range[dims[0]] = [Math.min(startPt[0], endPt[0]), Math.max(startPt[0], endPt[0])]; +// range[dims[1]] = [Math.min(startPt[1], endPt[1]), Math.max(startPt[1], endPt[1])]; +// data.selectRange(range); +// }); +// }); + +/***/ }), + +/***/ "1687": +/***/ (function(module, exports) { + +/** + * 3x2矩阵操作类 + * @exports zrender/tool/matrix + */ + +/* global Float32Array */ +var ArrayCtor = typeof Float32Array === 'undefined' ? Array : Float32Array; +/** + * Create a identity matrix. + * @return {Float32Array|Array.} + */ + +function create() { + var out = new ArrayCtor(6); + identity(out); + return out; +} +/** + * 设置矩阵为单位矩阵 + * @param {Float32Array|Array.} out + */ + + +function identity(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; +} +/** + * 复制矩阵 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} m + */ + + +function copy(out, m) { + out[0] = m[0]; + out[1] = m[1]; + out[2] = m[2]; + out[3] = m[3]; + out[4] = m[4]; + out[5] = m[5]; + return out; +} +/** + * 矩阵相乘 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} m1 + * @param {Float32Array|Array.} m2 + */ + + +function mul(out, m1, m2) { + // Consider matrix.mul(m, m2, m); + // where out is the same as m2. + // So use temp variable to escape error. + var out0 = m1[0] * m2[0] + m1[2] * m2[1]; + var out1 = m1[1] * m2[0] + m1[3] * m2[1]; + var out2 = m1[0] * m2[2] + m1[2] * m2[3]; + var out3 = m1[1] * m2[2] + m1[3] * m2[3]; + var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4]; + var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5]; + out[0] = out0; + out[1] = out1; + out[2] = out2; + out[3] = out3; + out[4] = out4; + out[5] = out5; + return out; +} +/** + * 平移变换 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + * @param {Float32Array|Array.} v + */ + + +function translate(out, a, v) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4] + v[0]; + out[5] = a[5] + v[1]; + return out; +} +/** + * 旋转变换 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + * @param {number} rad + */ + + +function rotate(out, a, rad) { + var aa = a[0]; + var ac = a[2]; + var atx = a[4]; + var ab = a[1]; + var ad = a[3]; + var aty = a[5]; + var st = Math.sin(rad); + var ct = Math.cos(rad); + out[0] = aa * ct + ab * st; + out[1] = -aa * st + ab * ct; + out[2] = ac * ct + ad * st; + out[3] = -ac * st + ct * ad; + out[4] = ct * atx + st * aty; + out[5] = ct * aty - st * atx; + return out; +} +/** + * 缩放变换 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + * @param {Float32Array|Array.} v + */ + + +function scale(out, a, v) { + var vx = v[0]; + var vy = v[1]; + out[0] = a[0] * vx; + out[1] = a[1] * vy; + out[2] = a[2] * vx; + out[3] = a[3] * vy; + out[4] = a[4] * vx; + out[5] = a[5] * vy; + return out; +} +/** + * 求逆矩阵 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + */ + + +function invert(out, a) { + var aa = a[0]; + var ac = a[2]; + var atx = a[4]; + var ab = a[1]; + var ad = a[3]; + var aty = a[5]; + var det = aa * ad - ab * ac; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; +} +/** + * Clone a new matrix. + * @param {Float32Array|Array.} a + */ + + +function clone(a) { + var b = create(); + copy(b, a); + return b; +} + +exports.create = create; +exports.identity = identity; +exports.copy = copy; +exports.mul = mul; +exports.translate = translate; +exports.rotate = rotate; +exports.scale = scale; +exports.invert = invert; +exports.clone = clone; + +/***/ }), + +/***/ "1748": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var axisDefault = __webpack_require__("71ad"); + +var Model = __webpack_require__("4319"); + +var axisModelCommonMixin = __webpack_require__("2023"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var valueAxisDefault = axisDefault.valueAxis; + +function defaultsShow(opt, show) { + return zrUtil.defaults({ + show: show + }, opt); +} + +var RadarModel = echarts.extendComponentModel({ + type: 'radar', + optionUpdated: function () { + var boundaryGap = this.get('boundaryGap'); + var splitNumber = this.get('splitNumber'); + var scale = this.get('scale'); + var axisLine = this.get('axisLine'); + var axisTick = this.get('axisTick'); + var axisType = this.get('axisType'); + var axisLabel = this.get('axisLabel'); + var nameTextStyle = this.get('name'); + var showName = this.get('name.show'); + var nameFormatter = this.get('name.formatter'); + var nameGap = this.get('nameGap'); + var triggerEvent = this.get('triggerEvent'); + var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) { + // PENDING + if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) { + indicatorOpt.min = 0; + } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) { + indicatorOpt.max = 0; + } + + var iNameTextStyle = nameTextStyle; + + if (indicatorOpt.color != null) { + iNameTextStyle = zrUtil.defaults({ + color: indicatorOpt.color + }, nameTextStyle); + } // Use same configuration + + + indicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), { + boundaryGap: boundaryGap, + splitNumber: splitNumber, + scale: scale, + axisLine: axisLine, + axisTick: axisTick, + axisType: axisType, + axisLabel: axisLabel, + // Compatible with 2 and use text + name: indicatorOpt.text, + nameLocation: 'end', + nameGap: nameGap, + // min: 0, + nameTextStyle: iNameTextStyle, + triggerEvent: triggerEvent + }, false); + + if (!showName) { + indicatorOpt.name = ''; + } + + if (typeof nameFormatter === 'string') { + var indName = indicatorOpt.name; + indicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : ''); + } else if (typeof nameFormatter === 'function') { + indicatorOpt.name = nameFormatter(indicatorOpt.name, indicatorOpt); + } + + var model = zrUtil.extend(new Model(indicatorOpt, null, this.ecModel), axisModelCommonMixin); // For triggerEvent. + + model.mainType = 'radar'; + model.componentIndex = this.componentIndex; + return model; + }, this); + + this.getIndicatorModels = function () { + return indicatorModels; + }; + }, + defaultOption: { + zlevel: 0, + z: 0, + center: ['50%', '50%'], + radius: '75%', + startAngle: 90, + name: { + show: true // formatter: null + // textStyle: {} + + }, + boundaryGap: [0, 0], + splitNumber: 5, + nameGap: 15, + scale: false, + // Polygon or circle + shape: 'polygon', + axisLine: zrUtil.merge({ + lineStyle: { + color: '#bbb' + } + }, valueAxisDefault.axisLine), + axisLabel: defaultsShow(valueAxisDefault.axisLabel, false), + axisTick: defaultsShow(valueAxisDefault.axisTick, false), + axisType: 'interval', + splitLine: defaultsShow(valueAxisDefault.splitLine, true), + splitArea: defaultsShow(valueAxisDefault.splitArea, true), + // {text, min, max} + indicator: [] + } +}); +var _default = RadarModel; +module.exports = _default; + +/***/ }), + +/***/ "1792": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var coordsOffsetMap = { + '南海诸岛': [32, 80], + // 全国 + '广东': [0, -10], + '香港': [10, 5], + '澳门': [-10, 10], + //'北京': [-10, 0], + '天津': [5, 5] +}; + +function _default(mapType, region) { + if (mapType === 'china') { + var coordFix = coordsOffsetMap[region.name]; + + if (coordFix) { + var cp = region.center; + cp[0] += coordFix[0] / 10.5; + cp[1] += -coordFix[1] / (10.5 / 0.75); + } + } +} + +module.exports = _default; + +/***/ }), + +/***/ "17b8": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var BaseBarSeries = __webpack_require__("3014"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = BaseBarSeries.extend({ + type: 'series.bar', + dependencies: ['grid', 'polar'], + brushSelector: 'rect', + + /** + * @override + */ + getProgressive: function () { + // Do not support progressive in normal mode. + return this.get('large') ? this.get('progressive') : false; + }, + + /** + * @override + */ + getProgressiveThreshold: function () { + // Do not support progressive in normal mode. + var progressiveThreshold = this.get('progressiveThreshold'); + var largeThreshold = this.get('largeThreshold'); + + if (largeThreshold > progressiveThreshold) { + progressiveThreshold = largeThreshold; + } + + return progressiveThreshold; + }, + defaultOption: { + // If clipped + // Only available on cartesian2d + clip: true, + // If use caps on two sides of bars + // Only available on tangential polar bar + roundCap: false, + showBackground: false, + 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 + } + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "17c2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $forEach = __webpack_require__("b727").forEach; +var arrayMethodIsStrict = __webpack_require__("a640"); +var arrayMethodUsesToLength = __webpack_require__("ae40"); + +var STRICT_METHOD = arrayMethodIsStrict('forEach'); +var USES_TO_LENGTH = arrayMethodUsesToLength('forEach'); + +// `Array.prototype.forEach` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.foreach +module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); +} : [].forEach; + + +/***/ }), + +/***/ "17d6": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var env = __webpack_require__("22d1"); + +var _model = __webpack_require__("e0d3"); + +var makeInner = _model.makeInner; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var inner = makeInner(); +var each = zrUtil.each; +/** + * @param {string} key + * @param {module:echarts/ExtensionAPI} api + * @param {Function} handler + * param: {string} currTrigger + * param: {Array.} point + */ + +function register(key, api, handler) { + if (env.node) { + return; + } + + var zr = api.getZr(); + inner(zr).records || (inner(zr).records = {}); + initGlobalListeners(zr, api); + var record = inner(zr).records[key] || (inner(zr).records[key] = {}); + record.handler = handler; +} + +function initGlobalListeners(zr, api) { + if (inner(zr).initialized) { + return; + } + + inner(zr).initialized = true; + useHandler('click', zrUtil.curry(doEnter, 'click')); + useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove')); // useHandler('mouseout', onLeave); + + useHandler('globalout', onLeave); + + function useHandler(eventType, cb) { + zr.on(eventType, function (e) { + var dis = makeDispatchAction(api); + each(inner(zr).records, function (record) { + record && cb(record, e, dis.dispatchAction); + }); + dispatchTooltipFinally(dis.pendings, api); + }); + } +} + +function dispatchTooltipFinally(pendings, api) { + var showLen = pendings.showTip.length; + var hideLen = pendings.hideTip.length; + var actuallyPayload; + + if (showLen) { + actuallyPayload = pendings.showTip[showLen - 1]; + } else if (hideLen) { + actuallyPayload = pendings.hideTip[hideLen - 1]; + } + + if (actuallyPayload) { + actuallyPayload.dispatchAction = null; + api.dispatchAction(actuallyPayload); + } +} + +function onLeave(record, e, dispatchAction) { + record.handler('leave', null, dispatchAction); +} + +function doEnter(currTrigger, record, e, dispatchAction) { + record.handler(currTrigger, e, dispatchAction); +} + +function makeDispatchAction(api) { + var pendings = { + showTip: [], + hideTip: [] + }; // FIXME + // better approach? + // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip, + // which may be conflict, (axisPointer call showTip but tooltip call hideTip); + // So we have to add "final stage" to merge those dispatched actions. + + var dispatchAction = function (payload) { + var pendingList = pendings[payload.type]; + + if (pendingList) { + pendingList.push(payload); + } else { + payload.dispatchAction = dispatchAction; + api.dispatchAction(payload); + } + }; + + return { + dispatchAction: dispatchAction, + pendings: pendings + }; +} +/** + * @param {string} key + * @param {module:echarts/ExtensionAPI} api + */ + + +function unregister(key, api) { + if (env.node) { + return; + } + + var zr = api.getZr(); + var record = (inner(zr).records || {})[key]; + + if (record) { + inner(zr).records[key] = null; + } +} + +exports.register = register; +exports.unregister = unregister; + +/***/ }), + +/***/ "18c0": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Scale = __webpack_require__("e0d8"); + +var OrdinalMeta = __webpack_require__("8e43"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Linear continuous scale + * @module echarts/coord/scale/Ordinal + * + * http://en.wikipedia.org/wiki/Level_of_measurement + */ +// FIXME only one data +var scaleProto = Scale.prototype; +var OrdinalScale = Scale.extend({ + type: 'ordinal', + + /** + * @param {module:echarts/data/OrdianlMeta|Array.} ordinalMeta + */ + init: function (ordinalMeta, extent) { + // Caution: Should not use instanceof, consider ec-extensions using + // import approach to get OrdinalMeta class. + if (!ordinalMeta || zrUtil.isArray(ordinalMeta)) { + ordinalMeta = new OrdinalMeta({ + categories: ordinalMeta + }); + } + + this._ordinalMeta = ordinalMeta; + this._extent = extent || [0, ordinalMeta.categories.length - 1]; + }, + parse: function (val) { + return typeof val === 'string' ? this._ordinalMeta.getOrdinal(val) // val might be float. + : Math.round(val); + }, + contain: function (rank) { + rank = this.parse(rank); + return scaleProto.contain.call(this, rank) && this._ordinalMeta.categories[rank] != null; + }, + + /** + * Normalize given rank or name to linear [0, 1] + * @param {number|string} [val] + * @return {number} + */ + normalize: function (val) { + return scaleProto.normalize.call(this, this.parse(val)); + }, + scale: function (val) { + return Math.round(scaleProto.scale.call(this, val)); + }, + + /** + * @return {Array} + */ + getTicks: function () { + var ticks = []; + var extent = this._extent; + var rank = extent[0]; + + while (rank <= extent[1]) { + ticks.push(rank); + rank++; + } + + return ticks; + }, + + /** + * Get item on rank n + * @param {number} n + * @return {string} + */ + getLabel: function (n) { + if (!this.isBlank()) { + // Note that if no data, ordinalMeta.categories is an empty array. + return this._ordinalMeta.categories[n]; + } + }, + + /** + * @return {number} + */ + count: function () { + return this._extent[1] - this._extent[0] + 1; + }, + + /** + * @override + */ + unionExtentFromData: function (data, dim) { + this.unionExtent(data.getApproximateExtent(dim)); + }, + getOrdinalMeta: function () { + return this._ordinalMeta; + }, + niceTicks: zrUtil.noop, + niceExtent: zrUtil.noop +}); +/** + * @return {module:echarts/scale/Time} + */ + +OrdinalScale.create = function () { + return new OrdinalScale(); +}; + +var _default = OrdinalScale; +module.exports = _default; + +/***/ }), + +/***/ "1953": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var MarkerModel = __webpack_require__("2449"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = MarkerModel.extend({ + type: 'markLine', + defaultOption: { + zlevel: 0, + z: 5, + symbol: ['circle', 'arrow'], + symbolSize: [8, 16], + //symbolRotate: 0, + precision: 2, + tooltip: { + trigger: 'item' + }, + label: { + show: true, + position: 'end', + distance: 5 + }, + lineStyle: { + type: 'dashed' + }, + emphasis: { + label: { + show: true + }, + lineStyle: { + width: 3 + } + }, + animationEasing: 'linear' + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "19aa": +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name) { + if (!(it instanceof Constructor)) { + throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); + } return it; +}; + + +/***/ }), + +/***/ "19e2": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var ChartView = __webpack_require__("e887"); + +var graphic = __webpack_require__("2306"); + +var Path = __webpack_require__("cbe5"); + +var _createClipPathFromCoordSys = __webpack_require__("b0af"); + +var createClipPath = _createClipPathFromCoordSys.createClipPath; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var NORMAL_ITEM_STYLE_PATH = ['itemStyle']; +var EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle']; +var SKIP_PROPS = ['color', 'color0', 'borderColor', 'borderColor0']; +var CandlestickView = ChartView.extend({ + type: 'candlestick', + render: function (seriesModel, ecModel, api) { + // If there is clipPath created in large mode. Remove it. + this.group.removeClipPath(); + + this._updateDrawMode(seriesModel); + + this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel); + }, + incrementalPrepareRender: function (seriesModel, ecModel, api) { + this._clear(); + + this._updateDrawMode(seriesModel); + }, + incrementalRender: function (params, seriesModel, ecModel, api) { + this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel); + }, + _updateDrawMode: function (seriesModel) { + var isLargeDraw = seriesModel.pipelineContext.large; + + if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) { + this._isLargeDraw = isLargeDraw; + + this._clear(); + } + }, + _renderNormal: function (seriesModel) { + var data = seriesModel.getData(); + var oldData = this._data; + var group = this.group; + var isSimpleBox = data.getLayout('isSimpleBox'); + var needsClip = seriesModel.get('clip', true); + var coord = seriesModel.coordinateSystem; + var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from + // stream mode to normal mode, where previous elements should be removed. + + if (!this._data) { + group.removeAll(); + } + + data.diff(oldData).add(function (newIdx) { + if (data.hasValue(newIdx)) { + var el; + var itemLayout = data.getItemLayout(newIdx); + + if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { + return; + } + + el = createNormalBox(itemLayout, newIdx, true); + graphic.initProps(el, { + shape: { + points: itemLayout.ends + } + }, seriesModel, newIdx); + setBoxCommon(el, data, newIdx, isSimpleBox); + group.add(el); + data.setItemGraphicEl(newIdx, el); + } + }).update(function (newIdx, oldIdx) { + var el = oldData.getItemGraphicEl(oldIdx); // Empty data + + if (!data.hasValue(newIdx)) { + group.remove(el); + return; + } + + var itemLayout = data.getItemLayout(newIdx); + + if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { + group.remove(el); + return; + } + + if (!el) { + el = createNormalBox(itemLayout, newIdx); + } else { + graphic.updateProps(el, { + shape: { + points: itemLayout.ends + } + }, seriesModel, newIdx); + } + + setBoxCommon(el, data, newIdx, isSimpleBox); + group.add(el); + data.setItemGraphicEl(newIdx, el); + }).remove(function (oldIdx) { + var el = oldData.getItemGraphicEl(oldIdx); + el && group.remove(el); + }).execute(); + this._data = data; + }, + _renderLarge: function (seriesModel) { + this._clear(); + + createLarge(seriesModel, this.group); + var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null; + + if (clipPath) { + this.group.setClipPath(clipPath); + } else { + this.group.removeClipPath(); + } + }, + _incrementalRenderNormal: function (params, seriesModel) { + var data = seriesModel.getData(); + var isSimpleBox = data.getLayout('isSimpleBox'); + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var el; + var itemLayout = data.getItemLayout(dataIndex); + el = createNormalBox(itemLayout, dataIndex); + setBoxCommon(el, data, dataIndex, isSimpleBox); + el.incremental = true; + this.group.add(el); + } + }, + _incrementalRenderLarge: function (params, seriesModel) { + createLarge(seriesModel, this.group, true); + }, + remove: function (ecModel) { + this._clear(); + }, + _clear: function () { + this.group.removeAll(); + this._data = null; + }, + dispose: zrUtil.noop +}); +var NormalBoxPath = Path.extend({ + type: 'normalCandlestickBox', + shape: {}, + buildPath: function (ctx, shape) { + var ends = shape.points; + + if (this.__simpleBox) { + ctx.moveTo(ends[4][0], ends[4][1]); + ctx.lineTo(ends[6][0], ends[6][1]); + } else { + ctx.moveTo(ends[0][0], ends[0][1]); + ctx.lineTo(ends[1][0], ends[1][1]); + ctx.lineTo(ends[2][0], ends[2][1]); + ctx.lineTo(ends[3][0], ends[3][1]); + ctx.closePath(); + ctx.moveTo(ends[4][0], ends[4][1]); + ctx.lineTo(ends[5][0], ends[5][1]); + ctx.moveTo(ends[6][0], ends[6][1]); + ctx.lineTo(ends[7][0], ends[7][1]); + } + } +}); + +function createNormalBox(itemLayout, dataIndex, isInit) { + var ends = itemLayout.ends; + return new NormalBoxPath({ + shape: { + points: isInit ? transInit(ends, itemLayout) : ends + }, + z2: 100 + }); +} + +function isNormalBoxClipped(clipArea, itemLayout) { + var clipped = true; + + for (var i = 0; i < itemLayout.ends.length; i++) { + // If any point are in the region. + if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) { + clipped = false; + break; + } + } + + return clipped; +} + +function setBoxCommon(el, data, dataIndex, isSimpleBox) { + var itemModel = data.getItemModel(dataIndex); + var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH); + var color = data.getItemVisual(dataIndex, 'color'); + var borderColor = data.getItemVisual(dataIndex, 'borderColor') || color; // Color must be excluded. + // Because symbol provide setColor individually to set fill and stroke + + var itemStyle = normalItemStyleModel.getItemStyle(SKIP_PROPS); + el.useStyle(itemStyle); + el.style.strokeNoScale = true; + el.style.fill = color; + el.style.stroke = borderColor; + el.__simpleBox = isSimpleBox; + var hoverStyle = itemModel.getModel(EMPHASIS_ITEM_STYLE_PATH).getItemStyle(); + graphic.setHoverStyle(el, hoverStyle); +} + +function transInit(points, itemLayout) { + return zrUtil.map(points, function (point) { + point = point.slice(); + point[1] = itemLayout.initBaseline; + return point; + }); +} + +var LargeBoxPath = Path.extend({ + type: 'largeCandlestickBox', + shape: {}, + buildPath: function (ctx, shape) { + // Drawing lines is more efficient than drawing + // a whole line or drawing rects. + var points = shape.points; + + for (var i = 0; i < points.length;) { + if (this.__sign === points[i++]) { + var x = points[i++]; + ctx.moveTo(x, points[i++]); + ctx.lineTo(x, points[i++]); + } else { + i += 3; + } + } + } +}); + +function createLarge(seriesModel, group, incremental) { + var data = seriesModel.getData(); + var largePoints = data.getLayout('largePoints'); + var elP = new LargeBoxPath({ + shape: { + points: largePoints + }, + __sign: 1 + }); + group.add(elP); + var elN = new LargeBoxPath({ + shape: { + points: largePoints + }, + __sign: -1 + }); + group.add(elN); + setLargeStyle(1, elP, seriesModel, data); + setLargeStyle(-1, elN, seriesModel, data); + + if (incremental) { + elP.incremental = true; + elN.incremental = true; + } +} + +function setLargeStyle(sign, el, seriesModel, data) { + var suffix = sign > 0 ? 'P' : 'N'; + var borderColor = data.getVisual('borderColor' + suffix) || data.getVisual('color' + suffix); // Color must be excluded. + // Because symbol provide setColor individually to set fill and stroke + + var itemStyle = seriesModel.getModel(NORMAL_ITEM_STYLE_PATH).getItemStyle(SKIP_PROPS); + el.useStyle(itemStyle); + el.style.fill = null; + el.style.stroke = borderColor; // No different + // el.style.lineWidth = .5; +} + +var _default = CandlestickView; +module.exports = _default; + +/***/ }), + +/***/ "19eb": +/***/ (function(module, exports, __webpack_require__) { + +var zrUtil = __webpack_require__("6d8b"); + +var Style = __webpack_require__("2b61"); + +var Element = __webpack_require__("d5b7"); + +var RectText = __webpack_require__("9e2e"); + +/** + * Base class of all displayable graphic objects + * @module zrender/graphic/Displayable + */ + +/** + * @alias module:zrender/graphic/Displayable + * @extends module:zrender/Element + * @extends module:zrender/graphic/mixin/RectText + */ +function Displayable(opts) { + opts = opts || {}; + Element.call(this, opts); // Extend properties + + for (var name in opts) { + if (opts.hasOwnProperty(name) && name !== 'style') { + this[name] = opts[name]; + } + } + /** + * @type {module:zrender/graphic/Style} + */ + + + this.style = new Style(opts.style, this); + this._rect = null; // Shapes for cascade clipping. + // Can only be `null`/`undefined` or an non-empty array, MUST NOT be an empty array. + // because it is easy to only using null to check whether clipPaths changed. + + this.__clipPaths = null; // FIXME Stateful must be mixined after style is setted + // Stateful.call(this, opts); +} + +Displayable.prototype = { + constructor: Displayable, + type: 'displayable', + + /** + * Dirty flag. From which painter will determine if this displayable object needs brush. + * @name module:zrender/graphic/Displayable#__dirty + * @type {boolean} + */ + __dirty: true, + + /** + * Whether the displayable object is visible. when it is true, the displayable object + * is not drawn, but the mouse event can still trigger the object. + * @name module:/zrender/graphic/Displayable#invisible + * @type {boolean} + * @default false + */ + invisible: false, + + /** + * @name module:/zrender/graphic/Displayable#z + * @type {number} + * @default 0 + */ + z: 0, + + /** + * @name module:/zrender/graphic/Displayable#z + * @type {number} + * @default 0 + */ + z2: 0, + + /** + * The z level determines the displayable object can be drawn in which layer canvas. + * @name module:/zrender/graphic/Displayable#zlevel + * @type {number} + * @default 0 + */ + zlevel: 0, + + /** + * Whether it can be dragged. + * @name module:/zrender/graphic/Displayable#draggable + * @type {boolean} + * @default false + */ + draggable: false, + + /** + * Whether is it dragging. + * @name module:/zrender/graphic/Displayable#draggable + * @type {boolean} + * @default false + */ + dragging: false, + + /** + * Whether to respond to mouse events. + * @name module:/zrender/graphic/Displayable#silent + * @type {boolean} + * @default false + */ + silent: false, + + /** + * If enable culling + * @type {boolean} + * @default false + */ + culling: false, + + /** + * Mouse cursor when hovered + * @name module:/zrender/graphic/Displayable#cursor + * @type {string} + */ + cursor: 'pointer', + + /** + * If hover area is bounding rect + * @name module:/zrender/graphic/Displayable#rectHover + * @type {string} + */ + rectHover: false, + + /** + * Render the element progressively when the value >= 0, + * usefull for large data. + * @type {boolean} + */ + progressive: false, + + /** + * @type {boolean} + */ + incremental: false, + + /** + * Scale ratio for global scale. + * @type {boolean} + */ + globalScaleRatio: 1, + beforeBrush: function (ctx) {}, + afterBrush: function (ctx) {}, + + /** + * Graphic drawing method. + * @param {CanvasRenderingContext2D} ctx + */ + // Interface + brush: function (ctx, prevEl) {}, + + /** + * Get the minimum bounding box. + * @return {module:zrender/core/BoundingRect} + */ + // Interface + getBoundingRect: function () {}, + + /** + * If displayable element contain coord x, y + * @param {number} x + * @param {number} y + * @return {boolean} + */ + contain: function (x, y) { + return this.rectContain(x, y); + }, + + /** + * @param {Function} cb + * @param {} context + */ + traverse: function (cb, context) { + cb.call(context, this); + }, + + /** + * If bounding rect of element contain coord x, y + * @param {number} x + * @param {number} y + * @return {boolean} + */ + rectContain: function (x, y) { + var coord = this.transformCoordToLocal(x, y); + var rect = this.getBoundingRect(); + return rect.contain(coord[0], coord[1]); + }, + + /** + * Mark displayable element dirty and refresh next frame + */ + dirty: function () { + this.__dirty = this.__dirtyText = true; + this._rect = null; + this.__zr && this.__zr.refresh(); + }, + + /** + * If displayable object binded any event + * @return {boolean} + */ + // TODO, events bound by bind + // isSilent: function () { + // return !( + // this.hoverable || this.draggable + // || this.onmousemove || this.onmouseover || this.onmouseout + // || this.onmousedown || this.onmouseup || this.onclick + // || this.ondragenter || this.ondragover || this.ondragleave + // || this.ondrop + // ); + // }, + + /** + * Alias for animate('style') + * @param {boolean} loop + */ + animateStyle: function (loop) { + return this.animate('style', loop); + }, + attrKV: function (key, value) { + if (key !== 'style') { + Element.prototype.attrKV.call(this, key, value); + } else { + this.style.set(value); + } + }, + + /** + * @param {Object|string} key + * @param {*} value + */ + setStyle: function (key, value) { + this.style.set(key, value); + this.dirty(false); + return this; + }, + + /** + * Use given style object + * @param {Object} obj + */ + useStyle: function (obj) { + this.style = new Style(obj, this); + this.dirty(false); + return this; + }, + + /** + * The string value of `textPosition` needs to be calculated to a real postion. + * For example, `'inside'` is calculated to `[rect.width/2, rect.height/2]` + * by default. See `contain/text.js#calculateTextPosition` for more details. + * But some coutom shapes like "pin", "flag" have center that is not exactly + * `[width/2, height/2]`. So we provide this hook to customize the calculation + * for those shapes. It will be called if the `style.textPosition` is a string. + * @param {Obejct} [out] Prepared out object. If not provided, this method should + * be responsible for creating one. + * @param {module:zrender/graphic/Style} style + * @param {Object} rect {x, y, width, height} + * @return {Obejct} out The same as the input out. + * { + * x: number. mandatory. + * y: number. mandatory. + * textAlign: string. optional. use style.textAlign by default. + * textVerticalAlign: string. optional. use style.textVerticalAlign by default. + * } + */ + calculateTextPosition: null +}; +zrUtil.inherits(Displayable, Element); +zrUtil.mixin(Displayable, RectText); // zrUtil.mixin(Displayable, Stateful); + +var _default = Displayable; +module.exports = _default; + +/***/ }), + +/***/ "1ab3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +var ChartView = __webpack_require__("e887"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @param {module:echarts/model/Series} seriesModel + * @param {boolean} hasAnimation + * @inner + */ +function updateDataSelected(uid, seriesModel, hasAnimation, api) { + var data = seriesModel.getData(); + var dataIndex = this.dataIndex; + var name = data.getName(dataIndex); + var selectedOffset = seriesModel.get('selectedOffset'); + api.dispatchAction({ + type: 'pieToggleSelect', + from: uid, + name: name, + seriesId: seriesModel.id + }); + data.each(function (idx) { + toggleItemSelected(data.getItemGraphicEl(idx), data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), selectedOffset, hasAnimation); + }); +} +/** + * @param {module:zrender/graphic/Sector} el + * @param {Object} layout + * @param {boolean} isSelected + * @param {number} selectedOffset + * @param {boolean} hasAnimation + * @inner + */ + + +function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) { + var midAngle = (layout.startAngle + layout.endAngle) / 2; + var dx = Math.cos(midAngle); + var dy = Math.sin(midAngle); + var offset = isSelected ? selectedOffset : 0; + var position = [dx * offset, dy * offset]; + hasAnimation // animateTo will stop revious animation like update transition + ? el.animate().when(200, { + position: position + }).start('bounceOut') : el.attr('position', position); +} +/** + * Piece of pie including Sector, Label, LabelLine + * @constructor + * @extends {module:zrender/graphic/Group} + */ + + +function PiePiece(data, idx) { + graphic.Group.call(this); + var sector = new graphic.Sector({ + z2: 2 + }); + var polyline = new graphic.Polyline(); + var text = new graphic.Text(); + this.add(sector); + this.add(polyline); + this.add(text); + this.updateData(data, idx, true); +} + +var piePieceProto = PiePiece.prototype; + +piePieceProto.updateData = function (data, idx, firstCreate) { + var sector = this.childAt(0); + var labelLine = this.childAt(1); + var labelText = this.childAt(2); + var seriesModel = data.hostModel; + var itemModel = data.getItemModel(idx); + var layout = data.getItemLayout(idx); + var sectorShape = zrUtil.extend({}, layout); + sectorShape.label = null; + var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate'); + + if (firstCreate) { + sector.setShape(sectorShape); + var animationType = seriesModel.getShallow('animationType'); + + if (animationType === 'scale') { + sector.shape.r = layout.r0; + graphic.initProps(sector, { + shape: { + r: layout.r + } + }, seriesModel, idx); + } // Expansion + else { + sector.shape.endAngle = layout.startAngle; + graphic.updateProps(sector, { + shape: { + endAngle: layout.endAngle + } + }, seriesModel, idx); + } + } else { + if (animationTypeUpdate === 'expansion') { + // Sectors are set to be target shape and an overlaying clipPath is used for animation + sector.setShape(sectorShape); + } else { + // Transition animation from the old shape + graphic.updateProps(sector, { + shape: sectorShape + }, seriesModel, idx); + } + } // Update common style + + + var visualColor = data.getItemVisual(idx, 'color'); + sector.useStyle(zrUtil.defaults({ + lineJoin: 'bevel', + fill: visualColor + }, itemModel.getModel('itemStyle').getItemStyle())); + sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle(); + var cursorStyle = itemModel.getShallow('cursor'); + cursorStyle && sector.attr('cursor', cursorStyle); // Toggle selected + + toggleItemSelected(this, data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), seriesModel.get('selectedOffset'), seriesModel.get('animation')); // Label and text animation should be applied only for transition type animation when update + + var withAnimation = !firstCreate && animationTypeUpdate === 'transition'; + + this._updateLabel(data, idx, withAnimation); + + this.highDownOnUpdate = !seriesModel.get('silent') ? function (fromState, toState) { + var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation'); + + if (toState === 'emphasis') { + labelLine.ignore = labelLine.hoverIgnore; + labelText.ignore = labelText.hoverIgnore; // Sector may has animation of updating data. Force to move to the last frame + // Or it may stopped on the wrong shape + + if (hasAnimation) { + sector.stopAnimation(true); + sector.animateTo({ + shape: { + r: layout.r + seriesModel.get('hoverOffset') + } + }, 300, 'elasticOut'); + } + } else { + labelLine.ignore = labelLine.normalIgnore; + labelText.ignore = labelText.normalIgnore; + + if (hasAnimation) { + sector.stopAnimation(true); + sector.animateTo({ + shape: { + r: layout.r + } + }, 300, 'elasticOut'); + } + } + } : null; + graphic.setHoverStyle(this); +}; + +piePieceProto._updateLabel = function (data, idx, withAnimation) { + var labelLine = this.childAt(1); + var labelText = this.childAt(2); + var seriesModel = data.hostModel; + var itemModel = data.getItemModel(idx); + var layout = data.getItemLayout(idx); + var labelLayout = layout.label; + var visualColor = data.getItemVisual(idx, 'color'); + + if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) { + labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore = labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true; + return; + } + + var targetLineShape = { + points: labelLayout.linePoints || [[labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]] + }; + var targetTextStyle = { + x: labelLayout.x, + y: labelLayout.y + }; + + if (withAnimation) { + graphic.updateProps(labelLine, { + shape: targetLineShape + }, seriesModel, idx); + graphic.updateProps(labelText, { + style: targetTextStyle + }, seriesModel, idx); + } else { + labelLine.attr({ + shape: targetLineShape + }); + labelText.attr({ + style: targetTextStyle + }); + } + + labelText.attr({ + rotation: labelLayout.rotation, + origin: [labelLayout.x, labelLayout.y], + z2: 10 + }); + var labelModel = itemModel.getModel('label'); + var labelHoverModel = itemModel.getModel('emphasis.label'); + var labelLineModel = itemModel.getModel('labelLine'); + var labelLineHoverModel = itemModel.getModel('emphasis.labelLine'); + var visualColor = data.getItemVisual(idx, 'color'); + graphic.setLabelStyle(labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel, { + labelFetcher: data.hostModel, + labelDataIndex: idx, + defaultText: labelLayout.text, + autoColor: visualColor, + useInsideStyle: !!labelLayout.inside + }, { + textAlign: labelLayout.textAlign, + textVerticalAlign: labelLayout.verticalAlign, + opacity: data.getItemVisual(idx, 'opacity') + }); + labelText.ignore = labelText.normalIgnore = !labelModel.get('show'); + labelText.hoverIgnore = !labelHoverModel.get('show'); + labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show'); + labelLine.hoverIgnore = !labelLineHoverModel.get('show'); // Default use item visual color + + labelLine.setStyle({ + stroke: visualColor, + opacity: data.getItemVisual(idx, 'opacity') + }); + labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle()); + labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle(); + var smooth = labelLineModel.get('smooth'); + + if (smooth && smooth === true) { + smooth = 0.4; + } + + labelLine.setShape({ + smooth: smooth + }); +}; + +zrUtil.inherits(PiePiece, graphic.Group); // Pie view + +var PieView = ChartView.extend({ + type: 'pie', + init: function () { + var sectorGroup = new graphic.Group(); + this._sectorGroup = sectorGroup; + }, + render: function (seriesModel, ecModel, api, payload) { + if (payload && payload.from === this.uid) { + return; + } + + var data = seriesModel.getData(); + var oldData = this._data; + var group = this.group; + var hasAnimation = ecModel.get('animation'); + var isFirstRender = !oldData; + var animationType = seriesModel.get('animationType'); + var animationTypeUpdate = seriesModel.get('animationTypeUpdate'); + var onSectorClick = zrUtil.curry(updateDataSelected, this.uid, seriesModel, hasAnimation, api); + var selectedMode = seriesModel.get('selectedMode'); + data.diff(oldData).add(function (idx) { + var piePiece = new PiePiece(data, idx); // Default expansion animation + + if (isFirstRender && animationType !== 'scale') { + piePiece.eachChild(function (child) { + child.stopAnimation(true); + }); + } + + selectedMode && piePiece.on('click', onSectorClick); + data.setItemGraphicEl(idx, piePiece); + group.add(piePiece); + }).update(function (newIdx, oldIdx) { + var piePiece = oldData.getItemGraphicEl(oldIdx); + + if (!isFirstRender && animationTypeUpdate !== 'transition') { + piePiece.eachChild(function (child) { + child.stopAnimation(true); + }); + } + + piePiece.updateData(data, newIdx); + piePiece.off('click'); + selectedMode && piePiece.on('click', onSectorClick); + group.add(piePiece); + data.setItemGraphicEl(newIdx, piePiece); + }).remove(function (idx) { + var piePiece = oldData.getItemGraphicEl(idx); + group.remove(piePiece); + }).execute(); + + if (hasAnimation && data.count() > 0 && (isFirstRender ? animationType !== 'scale' : animationTypeUpdate !== 'transition')) { + var shape = data.getItemLayout(0); + + for (var s = 1; isNaN(shape.startAngle) && s < data.count(); ++s) { + shape = data.getItemLayout(s); + } + + var r = Math.max(api.getWidth(), api.getHeight()) / 2; + var removeClipPath = zrUtil.bind(group.removeClipPath, group); + group.setClipPath(this._createClipPath(shape.cx, shape.cy, r, shape.startAngle, shape.clockwise, removeClipPath, seriesModel, isFirstRender)); + } else { + // clipPath is used in first-time animation, so remove it when otherwise. See: #8994 + group.removeClipPath(); + } + + this._data = data; + }, + dispose: function () {}, + _createClipPath: function (cx, cy, r, startAngle, clockwise, cb, seriesModel, isFirstRender) { + var clipPath = new graphic.Sector({ + shape: { + cx: cx, + cy: cy, + r0: 0, + r: r, + startAngle: startAngle, + endAngle: startAngle, + clockwise: clockwise + } + }); + var initOrUpdate = isFirstRender ? graphic.initProps : graphic.updateProps; + initOrUpdate(clipPath, { + shape: { + endAngle: startAngle + (clockwise ? 1 : -1) * Math.PI * 2 + } + }, seriesModel, cb); + return clipPath; + }, + + /** + * @implement + */ + containPoint: function (point, seriesModel) { + var data = seriesModel.getData(); + var itemLayout = data.getItemLayout(0); + + if (itemLayout) { + var dx = point[0] - itemLayout.cx; + var dy = point[1] - itemLayout.cy; + var radius = Math.sqrt(dx * dx + dy * dy); + return radius <= itemLayout.r && radius >= itemLayout.r0; + } + } +}); +var _default = PieView; +module.exports = _default; + +/***/ }), + +/***/ "1be4": +/***/ (function(module, exports, __webpack_require__) { + +var getBuiltIn = __webpack_require__("d066"); + +module.exports = getBuiltIn('document', 'documentElement'); + + +/***/ }), + +/***/ "1c0b": +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; +}; + + +/***/ }), + +/***/ "1c5f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var vec2 = __webpack_require__("401b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function simpleLayout(seriesModel) { + var coordSys = seriesModel.coordinateSystem; + + if (coordSys && coordSys.type !== 'view') { + return; + } + + var graph = seriesModel.getGraph(); + graph.eachNode(function (node) { + var model = node.getModel(); + node.setLayout([+model.get('x'), +model.get('y')]); + }); + simpleLayoutEdge(graph); +} + +function simpleLayoutEdge(graph) { + graph.eachEdge(function (edge) { + var curveness = edge.getModel().get('lineStyle.curveness') || 0; + var p1 = vec2.clone(edge.node1.getLayout()); + var p2 = vec2.clone(edge.node2.getLayout()); + var points = [p1, p2]; + + if (+curveness) { + points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]); + } + + edge.setLayout(points); + }); +} + +exports.simpleLayout = simpleLayout; +exports.simpleLayoutEdge = simpleLayoutEdge; + +/***/ }), + +/***/ "1c7e": +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__("b622"); + +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; + +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + // eslint-disable-next-line no-throw-literal + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } + +module.exports = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; +}; + + +/***/ }), + +/***/ "1ccf": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var zrUtil = __webpack_require__("6d8b"); + +var Polar = __webpack_require__("fd27"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _axisHelper = __webpack_require__("697e"); + +var createScaleByModel = _axisHelper.createScaleByModel; +var niceScaleExtent = _axisHelper.niceScaleExtent; + +var CoordinateSystem = __webpack_require__("2039"); + +var _dataStackHelper = __webpack_require__("ee1a"); + +var getStackedDimension = _dataStackHelper.getStackedDimension; + +__webpack_require__("78f0"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO Axis scale + +/** + * Resize method bound to the polar + * @param {module:echarts/coord/polar/PolarModel} polarModel + * @param {module:echarts/ExtensionAPI} api + */ +function resizePolar(polar, polarModel, api) { + var center = polarModel.get('center'); + var width = api.getWidth(); + var height = api.getHeight(); + polar.cx = parsePercent(center[0], width); + polar.cy = parsePercent(center[1], height); + var radiusAxis = polar.getRadiusAxis(); + var size = Math.min(width, height) / 2; + var radius = polarModel.get('radius'); + + if (radius == null) { + radius = [0, '100%']; + } else if (!zrUtil.isArray(radius)) { + // r0 = 0 + radius = [0, radius]; + } + + radius = [parsePercent(radius[0], size), parsePercent(radius[1], size)]; + radiusAxis.inverse ? radiusAxis.setExtent(radius[1], radius[0]) : radiusAxis.setExtent(radius[0], radius[1]); +} +/** + * Update polar + */ + + +function updatePolarScale(ecModel, api) { + var polar = this; + var angleAxis = polar.getAngleAxis(); + var radiusAxis = polar.getRadiusAxis(); // Reset scale + + angleAxis.scale.setExtent(Infinity, -Infinity); + radiusAxis.scale.setExtent(Infinity, -Infinity); + ecModel.eachSeries(function (seriesModel) { + if (seriesModel.coordinateSystem === polar) { + var data = seriesModel.getData(); + zrUtil.each(data.mapDimension('radius', true), function (dim) { + radiusAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim)); + }); + zrUtil.each(data.mapDimension('angle', true), function (dim) { + angleAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim)); + }); + } + }); + niceScaleExtent(angleAxis.scale, angleAxis.model); + niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis + + if (angleAxis.type === 'category' && !angleAxis.onBand) { + var extent = angleAxis.getExtent(); + var diff = 360 / angleAxis.scale.count(); + angleAxis.inverse ? extent[1] += diff : extent[1] -= diff; + angleAxis.setExtent(extent[0], extent[1]); + } +} +/** + * Set common axis properties + * @param {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis} + * @param {module:echarts/coord/polar/AxisModel} + * @inner + */ + + +function setAxis(axis, axisModel) { + axis.type = axisModel.get('type'); + axis.scale = createScaleByModel(axisModel); + axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category'; + axis.inverse = axisModel.get('inverse'); + + if (axisModel.mainType === 'angleAxis') { + axis.inverse ^= axisModel.get('clockwise'); + var startAngle = axisModel.get('startAngle'); + axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360)); + } // Inject axis instance + + + axisModel.axis = axis; + axis.model = axisModel; +} + +var polarCreator = { + dimensions: Polar.prototype.dimensions, + create: function (ecModel, api) { + var polarList = []; + ecModel.eachComponent('polar', function (polarModel, idx) { + var polar = new Polar(idx); // Inject resize and update method + + polar.update = updatePolarScale; + var radiusAxis = polar.getRadiusAxis(); + var angleAxis = polar.getAngleAxis(); + var radiusAxisModel = polarModel.findAxisModel('radiusAxis'); + var angleAxisModel = polarModel.findAxisModel('angleAxis'); + setAxis(radiusAxis, radiusAxisModel); + setAxis(angleAxis, angleAxisModel); + resizePolar(polar, polarModel, api); + polarList.push(polar); + polarModel.coordinateSystem = polar; + polar.model = polarModel; + }); // Inject coordinateSystem to series + + ecModel.eachSeries(function (seriesModel) { + if (seriesModel.get('coordinateSystem') === 'polar') { + var polarModel = ecModel.queryComponents({ + mainType: 'polar', + index: seriesModel.get('polarIndex'), + id: seriesModel.get('polarId') + })[0]; + seriesModel.coordinateSystem = polarModel.coordinateSystem; + } + }); + return polarList; + } +}; +CoordinateSystem.register('polar', polarCreator); + +/***/ }), + +/***/ "1cdc": +/***/ (function(module, exports, __webpack_require__) { + +var userAgent = __webpack_require__("342f"); + +module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent); + + +/***/ }), + +/***/ "1d80": +/***/ (function(module, exports) { + +// `RequireObjectCoercible` abstract operation +// https://tc39.github.io/ecma262/#sec-requireobjectcoercible +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ "1dde": +/***/ (function(module, exports, __webpack_require__) { + +var fails = __webpack_require__("d039"); +var wellKnownSymbol = __webpack_require__("b622"); +var V8_VERSION = __webpack_require__("2d00"); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; + + +/***/ }), + +/***/ "1e32": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _dataStackHelper = __webpack_require__("ee1a"); + +var isDimensionStacked = _dataStackHelper.isDimensionStacked; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function getSeriesStackId(seriesModel) { + return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex; +} + +function getAxisKey(polar, axis) { + return axis.dim + polar.model.componentIndex; +} +/** + * @param {string} seriesType + * @param {module:echarts/model/Global} ecModel + * @param {module:echarts/ExtensionAPI} api + */ + + +function barLayoutPolar(seriesType, ecModel, api) { + var lastStackCoords = {}; + var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) { + return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar'; + })); + ecModel.eachSeriesByType(seriesType, function (seriesModel) { + // Check series coordinate, do layout for polar only + if (seriesModel.coordinateSystem.type !== 'polar') { + return; + } + + var data = seriesModel.getData(); + var polar = seriesModel.coordinateSystem; + var baseAxis = polar.getBaseAxis(); + var axisKey = getAxisKey(polar, baseAxis); + var stackId = getSeriesStackId(seriesModel); + var columnLayoutInfo = barWidthAndOffset[axisKey][stackId]; + var columnOffset = columnLayoutInfo.offset; + var columnWidth = columnLayoutInfo.width; + var valueAxis = polar.getOtherAxis(baseAxis); + var cx = seriesModel.coordinateSystem.cx; + var cy = seriesModel.coordinateSystem.cy; + var barMinHeight = seriesModel.get('barMinHeight') || 0; + var barMinAngle = seriesModel.get('barMinAngle') || 0; + lastStackCoords[stackId] = lastStackCoords[stackId] || []; + var valueDim = data.mapDimension(valueAxis.dim); + var baseDim = data.mapDimension(baseAxis.dim); + var stacked = isDimensionStacked(data, valueDim + /*, baseDim*/ + ); + var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true); + var valueAxisStart = valueAxis.getExtent()[0]; + + for (var idx = 0, len = data.count(); idx < len; idx++) { + var value = data.get(valueDim, idx); + var baseValue = data.get(baseDim, idx); + var sign = value >= 0 ? 'p' : 'n'; + var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in + // stackResultDimension directly. + // Only ordinal axis can be stacked. + + if (stacked) { + if (!lastStackCoords[stackId][baseValue]) { + lastStackCoords[stackId][baseValue] = { + p: valueAxisStart, + // Positive stack + n: valueAxisStart // Negative stack + + }; + } // Should also consider #4243 + + + baseCoord = lastStackCoords[stackId][baseValue][sign]; + } + + var r0; + var r; + var startAngle; + var endAngle; // radial sector + + if (valueAxis.dim === 'radius') { + var radiusSpan = valueAxis.dataToRadius(value) - valueAxisStart; + var angle = baseAxis.dataToAngle(baseValue); + + if (Math.abs(radiusSpan) < barMinHeight) { + radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight; + } + + r0 = baseCoord; + r = baseCoord + radiusSpan; + startAngle = angle - columnOffset; + endAngle = startAngle - columnWidth; + stacked && (lastStackCoords[stackId][baseValue][sign] = r); + } // tangential sector + else { + var angleSpan = valueAxis.dataToAngle(value, clampLayout) - valueAxisStart; + var radius = baseAxis.dataToRadius(baseValue); + + if (Math.abs(angleSpan) < barMinAngle) { + angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle; + } + + r0 = radius + columnOffset; + r = r0 + columnWidth; + startAngle = baseCoord; + endAngle = baseCoord + angleSpan; // if the previous stack is at the end of the ring, + // add a round to differentiate it from origin + // var extent = angleAxis.getExtent(); + // var stackCoord = angle; + // if (stackCoord === extent[0] && value > 0) { + // stackCoord = extent[1]; + // } + // else if (stackCoord === extent[1] && value < 0) { + // stackCoord = extent[0]; + // } + + stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle); + } + + data.setItemLayout(idx, { + cx: cx, + cy: cy, + r0: r0, + r: r, + // Consider that positive angle is anti-clockwise, + // while positive radian of sector is clockwise + startAngle: -startAngle * Math.PI / 180, + endAngle: -endAngle * Math.PI / 180 + }); + } + }, this); +} +/** + * Calculate bar width and offset for radial bar charts + */ + + +function calRadialBar(barSeries, api) { + // Columns info on each category axis. Key is polar name + var columnsMap = {}; + zrUtil.each(barSeries, function (seriesModel, idx) { + var data = seriesModel.getData(); + var polar = seriesModel.coordinateSystem; + var baseAxis = polar.getBaseAxis(); + var axisKey = getAxisKey(polar, baseAxis); + var axisExtent = baseAxis.getExtent(); + var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count(); + var columnsOnAxis = columnsMap[axisKey] || { + bandWidth: bandWidth, + remainedWidth: bandWidth, + autoWidthCount: 0, + categoryGap: '20%', + gap: '30%', + stacks: {} + }; + var stacks = columnsOnAxis.stacks; + columnsMap[axisKey] = columnsOnAxis; + var stackId = getSeriesStackId(seriesModel); + + if (!stacks[stackId]) { + columnsOnAxis.autoWidthCount++; + } + + stacks[stackId] = stacks[stackId] || { + width: 0, + maxWidth: 0 + }; + var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth); + var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth); + var barGap = seriesModel.get('barGap'); + var barCategoryGap = seriesModel.get('barCategoryGap'); + + if (barWidth && !stacks[stackId].width) { + barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth); + stacks[stackId].width = barWidth; + columnsOnAxis.remainedWidth -= barWidth; + } + + barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth); + barGap != null && (columnsOnAxis.gap = barGap); + barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap); + }); + var result = {}; + zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) { + result[coordSysName] = {}; + var stacks = columnsOnAxis.stacks; + var bandWidth = columnsOnAxis.bandWidth; + var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth); + var barGapPercent = parsePercent(columnsOnAxis.gap, 1); + var remainedWidth = columnsOnAxis.remainedWidth; + var autoWidthCount = columnsOnAxis.autoWidthCount; + var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); + autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth + + zrUtil.each(stacks, function (column, stack) { + var maxWidth = column.maxWidth; + + if (maxWidth && maxWidth < autoWidth) { + maxWidth = Math.min(maxWidth, remainedWidth); + + if (column.width) { + maxWidth = Math.min(maxWidth, column.width); + } + + remainedWidth -= maxWidth; + column.width = maxWidth; + autoWidthCount--; + } + }); // Recalculate width again + + autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); + autoWidth = Math.max(autoWidth, 0); + var widthSum = 0; + var lastColumn; + zrUtil.each(stacks, function (column, idx) { + if (!column.width) { + column.width = autoWidth; + } + + lastColumn = column; + widthSum += column.width * (1 + barGapPercent); + }); + + if (lastColumn) { + widthSum -= lastColumn.width * barGapPercent; + } + + var offset = -widthSum / 2; + zrUtil.each(stacks, function (column, stackId) { + result[coordSysName][stackId] = result[coordSysName][stackId] || { + offset: offset, + width: column.width + }; + offset += column.width * (1 + barGapPercent); + }); + }); + return result; +} + +var _default = barLayoutPolar; +module.exports = _default; + +/***/ }), + +/***/ "1f0e": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var Path = __webpack_require__("cbe5"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = Path.extend({ + type: 'echartsGaugePointer', + shape: { + angle: 0, + width: 10, + r: 10, + x: 0, + y: 0 + }, + buildPath: function (ctx, shape) { + var mathCos = Math.cos; + var mathSin = Math.sin; + var r = shape.r; + var width = shape.width; + var angle = shape.angle; + var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2); + var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2); + angle = shape.angle - Math.PI / 2; + ctx.moveTo(x, y); + ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width); + ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r); + ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width); + ctx.lineTo(x, y); + return; + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "1f1a": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var modelUtil = __webpack_require__("e0d3"); + +var ComponentModel = __webpack_require__("6cb7"); + +var Model = __webpack_require__("4319"); + +var selectableMixin = __webpack_require__("7023"); + +var geoCreator = __webpack_require__("eeea"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var GeoModel = ComponentModel.extend({ + type: 'geo', + + /** + * @type {module:echarts/coord/geo/Geo} + */ + coordinateSystem: null, + layoutMode: 'box', + init: function (option) { + ComponentModel.prototype.init.apply(this, arguments); // Default label emphasis `show` + + modelUtil.defaultEmphasis(option, 'label', ['show']); + }, + optionUpdated: function () { + var option = this.option; + var self = this; + option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap); + this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) { + if (regionOpt.name) { + optionModelMap.set(regionOpt.name, new Model(regionOpt, self)); + } + + return optionModelMap; + }, zrUtil.createHashMap()); + this.updateSelectedMap(option.regions); + }, + defaultOption: { + zlevel: 0, + z: 0, + show: true, + left: 'center', + top: 'center', + // width:, + // height:, + // right + // bottom + // Aspect is width / height. Inited to be geoJson bbox aspect + // This parameter is used for scale this aspect + // If svg used, aspectScale is 1 by default. + // aspectScale: 0.75, + aspectScale: null, + ///// Layout with center and size + // If you wan't to put map in a fixed size box with right aspect ratio + // This two properties may more conveninet + // layoutCenter: [50%, 50%] + // layoutSize: 100 + silent: false, + // Map type + map: '', + // Define left-top, right-bottom coords to control view + // For example, [ [180, 90], [-180, -90] ] + boundingCoords: null, + // Default on center of map + center: null, + zoom: 1, + scaleLimit: null, + // selectedMode: false + label: { + show: false, + color: '#000' + }, + itemStyle: { + // color: 各异, + borderWidth: 0.5, + borderColor: '#444', + color: '#eee' + }, + emphasis: { + label: { + show: true, + color: 'rgb(100,0,0)' + }, + itemStyle: { + color: 'rgba(255,215,0,0.8)' + } + }, + regions: [] + }, + + /** + * Get model of region + * @param {string} name + * @return {module:echarts/model/Model} + */ + getRegionModel: function (name) { + return this._optionModelMap.get(name) || new Model(null, this, this.ecModel); + }, + + /** + * Format label + * @param {string} name Region name + * @param {string} [status='normal'] 'normal' or 'emphasis' + * @return {string} + */ + getFormattedLabel: function (name, status) { + var regionModel = this.getRegionModel(name); + var formatter = regionModel.get('label' + (status === 'normal' ? '.' : status + '.') + 'formatter'); + var params = { + name: name + }; + + if (typeof formatter === 'function') { + params.status = status; + return formatter(params); + } else if (typeof formatter === 'string') { + return formatter.replace('{a}', name != null ? name : ''); + } + }, + setZoom: function (zoom) { + this.option.zoom = zoom; + }, + setCenter: function (center) { + this.option.center = center; + } +}); +zrUtil.mixin(GeoModel, selectableMixin); +var _default = GeoModel; +module.exports = _default; + +/***/ }), + +/***/ "1fab": +/***/ (function(module, exports) { + +/** + * Event Mixin + * @module zrender/mixin/Eventful + * @author Kener (@Kener-林峰, kener.linfeng@gmail.com) + * pissang (https://www.github.com/pissang) + */ +var arrySlice = Array.prototype.slice; +/** + * Event dispatcher. + * + * @alias module:zrender/mixin/Eventful + * @constructor + * @param {Object} [eventProcessor] The object eventProcessor is the scope when + * `eventProcessor.xxx` called. + * @param {Function} [eventProcessor.normalizeQuery] + * param: {string|Object} Raw query. + * return: {string|Object} Normalized query. + * @param {Function} [eventProcessor.filter] Event will be dispatched only + * if it returns `true`. + * param: {string} eventType + * param: {string|Object} query + * return: {boolean} + * @param {Function} [eventProcessor.afterTrigger] Called after all handlers called. + * param: {string} eventType + */ + +var Eventful = function (eventProcessor) { + this._$handlers = {}; + this._$eventProcessor = eventProcessor; +}; + +Eventful.prototype = { + constructor: Eventful, + + /** + * The handler can only be triggered once, then removed. + * + * @param {string} event The event name. + * @param {string|Object} [query] Condition used on event filter. + * @param {Function} handler The event handler. + * @param {Object} context + */ + one: function (event, query, handler, context) { + return on(this, event, query, handler, context, true); + }, + + /** + * Bind a handler. + * + * @param {string} event The event name. + * @param {string|Object} [query] Condition used on event filter. + * @param {Function} handler The event handler. + * @param {Object} [context] + */ + on: function (event, query, handler, context) { + return on(this, event, query, handler, context, false); + }, + + /** + * Whether any handler has bound. + * + * @param {string} event + * @return {boolean} + */ + isSilent: function (event) { + var _h = this._$handlers; + return !_h[event] || !_h[event].length; + }, + + /** + * Unbind a event. + * + * @param {string} [event] The event name. + * If no `event` input, "off" all listeners. + * @param {Function} [handler] The event handler. + * If no `handler` input, "off" all listeners of the `event`. + */ + off: function (event, handler) { + var _h = this._$handlers; + + if (!event) { + this._$handlers = {}; + return this; + } + + if (handler) { + if (_h[event]) { + var newList = []; + + for (var i = 0, l = _h[event].length; i < l; i++) { + if (_h[event][i].h !== handler) { + newList.push(_h[event][i]); + } + } + + _h[event] = newList; + } + + if (_h[event] && _h[event].length === 0) { + delete _h[event]; + } + } else { + delete _h[event]; + } + + return this; + }, + + /** + * Dispatch a event. + * + * @param {string} type The event name. + */ + trigger: function (type) { + var _h = this._$handlers[type]; + var eventProcessor = this._$eventProcessor; + + if (_h) { + var args = arguments; + var argLen = args.length; + + if (argLen > 3) { + args = arrySlice.call(args, 1); + } + + var len = _h.length; + + for (var i = 0; i < len;) { + var hItem = _h[i]; + + if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) { + i++; + continue; + } // Optimize advise from backbone + + + switch (argLen) { + case 1: + hItem.h.call(hItem.ctx); + break; + + case 2: + hItem.h.call(hItem.ctx, args[1]); + break; + + case 3: + hItem.h.call(hItem.ctx, args[1], args[2]); + break; + + default: + // have more than 2 given arguments + hItem.h.apply(hItem.ctx, args); + break; + } + + if (hItem.one) { + _h.splice(i, 1); + + len--; + } else { + i++; + } + } + } + + eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type); + return this; + }, + + /** + * Dispatch a event with context, which is specified at the last parameter. + * + * @param {string} type The event name. + */ + triggerWithContext: function (type) { + var _h = this._$handlers[type]; + var eventProcessor = this._$eventProcessor; + + if (_h) { + var args = arguments; + var argLen = args.length; + + if (argLen > 4) { + args = arrySlice.call(args, 1, args.length - 1); + } + + var ctx = args[args.length - 1]; + var len = _h.length; + + for (var i = 0; i < len;) { + var hItem = _h[i]; + + if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) { + i++; + continue; + } // Optimize advise from backbone + + + switch (argLen) { + case 1: + hItem.h.call(ctx); + break; + + case 2: + hItem.h.call(ctx, args[1]); + break; + + case 3: + hItem.h.call(ctx, args[1], args[2]); + break; + + default: + // have more than 2 given arguments + hItem.h.apply(ctx, args); + break; + } + + if (hItem.one) { + _h.splice(i, 1); + + len--; + } else { + i++; + } + } + } + + eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type); + return this; + } +}; + +function normalizeQuery(host, query) { + var eventProcessor = host._$eventProcessor; + + if (query != null && eventProcessor && eventProcessor.normalizeQuery) { + query = eventProcessor.normalizeQuery(query); + } + + return query; +} + +function on(eventful, event, query, handler, context, isOnce) { + var _h = eventful._$handlers; + + if (typeof query === 'function') { + context = handler; + handler = query; + query = null; + } + + if (!handler || !event) { + return eventful; + } + + query = normalizeQuery(eventful, query); + + if (!_h[event]) { + _h[event] = []; + } + + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return eventful; + } + } + + var wrap = { + h: handler, + one: isOnce, + query: query, + ctx: context || eventful, + // FIXME + // Do not publish this feature util it is proved that it makes sense. + callAtLast: handler.zrEventfulCallAtLast + }; + var lastIndex = _h[event].length - 1; + var lastWrap = _h[event][lastIndex]; + lastWrap && lastWrap.callAtLast ? _h[event].splice(lastIndex, 0, wrap) : _h[event].push(wrap); + return eventful; +} // ---------------------- +// The events in zrender +// ---------------------- + +/** + * @event module:zrender/mixin/Eventful#onclick + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmouseover + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmouseout + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmousemove + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmousewheel + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmousedown + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmouseup + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondrag + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragstart + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragend + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragenter + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragleave + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragover + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondrop + * @type {Function} + * @default null + */ + + +var _default = Eventful; +module.exports = _default; + +/***/ }), + +/***/ "2023": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// import * as axisHelper from './axisHelper'; +var _default = { + /** + * @param {boolean} origin + * @return {number|string} min value or 'dataMin' or null/undefined (means auto) or NaN + */ + getMin: function (origin) { + var option = this.option; + var min = !origin && option.rangeStart != null ? option.rangeStart : option.min; + + if (this.axis && min != null && min !== 'dataMin' && typeof min !== 'function' && !zrUtil.eqNaN(min)) { + min = this.axis.scale.parse(min); + } + + return min; + }, + + /** + * @param {boolean} origin + * @return {number|string} max value or 'dataMax' or null/undefined (means auto) or NaN + */ + getMax: function (origin) { + var option = this.option; + var max = !origin && option.rangeEnd != null ? option.rangeEnd : option.max; + + if (this.axis && max != null && max !== 'dataMax' && typeof max !== 'function' && !zrUtil.eqNaN(max)) { + max = this.axis.scale.parse(max); + } + + return max; + }, + + /** + * @return {boolean} + */ + getNeedCrossZero: function () { + var option = this.option; + return option.rangeStart != null || option.rangeEnd != null ? false : !option.scale; + }, + + /** + * Should be implemented by each axis model if necessary. + * @return {module:echarts/model/Component} coordinate system model + */ + getCoordSysModel: zrUtil.noop, + + /** + * @param {number} rangeStart Can only be finite number or null/undefined or NaN. + * @param {number} rangeEnd Can only be finite number or null/undefined or NaN. + */ + setRange: function (rangeStart, rangeEnd) { + this.option.rangeStart = rangeStart; + this.option.rangeEnd = rangeEnd; + }, + + /** + * Reset range + */ + resetRange: function () { + // rangeStart and rangeEnd is readonly. + this.option.rangeStart = this.option.rangeEnd = null; + } +}; +module.exports = _default; + +/***/ }), + +/***/ "2039": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var coordinateSystemCreators = {}; + +function CoordinateSystemManager() { + this._coordinateSystems = []; +} + +CoordinateSystemManager.prototype = { + constructor: CoordinateSystemManager, + create: function (ecModel, api) { + var coordinateSystems = []; + zrUtil.each(coordinateSystemCreators, function (creater, type) { + var list = creater.create(ecModel, api); + coordinateSystems = coordinateSystems.concat(list || []); + }); + this._coordinateSystems = coordinateSystems; + }, + update: function (ecModel, api) { + zrUtil.each(this._coordinateSystems, function (coordSys) { + coordSys.update && coordSys.update(ecModel, api); + }); + }, + getCoordinateSystems: function () { + return this._coordinateSystems.slice(); + } +}; + +CoordinateSystemManager.register = function (type, coordinateSystemCreator) { + coordinateSystemCreators[type] = coordinateSystemCreator; +}; + +CoordinateSystemManager.get = function (type) { + return coordinateSystemCreators[type]; +}; + +var _default = CoordinateSystemManager; +module.exports = _default; + +/***/ }), + +/***/ "20c8": +/***/ (function(module, exports, __webpack_require__) { + +var curve = __webpack_require__("4a3f"); + +var vec2 = __webpack_require__("401b"); + +var bbox = __webpack_require__("e263"); + +var BoundingRect = __webpack_require__("9850"); + +var _config = __webpack_require__("2cf4"); + +var dpr = _config.devicePixelRatio; + +/** + * Path 代理,可以在`buildPath`中用于替代`ctx`, 会保存每个path操作的命令到pathCommands属性中 + * 可以用于 isInsidePath 判断以及获取boundingRect + * + * @module zrender/core/PathProxy + * @author Yi Shen (http://www.github.com/pissang) + */ +// TODO getTotalLength, getPointAtLength + +/* global Float32Array */ +var CMD = { + M: 1, + L: 2, + C: 3, + Q: 4, + A: 5, + Z: 6, + // Rect + R: 7 +}; // var CMD_MEM_SIZE = { +// M: 3, +// L: 3, +// C: 7, +// Q: 5, +// A: 9, +// R: 5, +// Z: 1 +// }; + +var min = []; +var max = []; +var min2 = []; +var max2 = []; +var mathMin = Math.min; +var mathMax = Math.max; +var mathCos = Math.cos; +var mathSin = Math.sin; +var mathSqrt = Math.sqrt; +var mathAbs = Math.abs; +var hasTypedArray = typeof Float32Array !== 'undefined'; +/** + * @alias module:zrender/core/PathProxy + * @constructor + */ + +var PathProxy = function (notSaveData) { + this._saveData = !(notSaveData || false); + + if (this._saveData) { + /** + * Path data. Stored as flat array + * @type {Array.} + */ + this.data = []; + } + + this._ctx = null; +}; +/** + * 快速计算Path包围盒(并不是最小包围盒) + * @return {Object} + */ + + +PathProxy.prototype = { + constructor: PathProxy, + _xi: 0, + _yi: 0, + _x0: 0, + _y0: 0, + // Unit x, Unit y. Provide for avoiding drawing that too short line segment + _ux: 0, + _uy: 0, + _len: 0, + _lineDash: null, + _dashOffset: 0, + _dashIdx: 0, + _dashSum: 0, + + /** + * @readOnly + */ + setScale: function (sx, sy, segmentIgnoreThreshold) { + // Compat. Previously there is no segmentIgnoreThreshold. + segmentIgnoreThreshold = segmentIgnoreThreshold || 0; + this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0; + this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0; + }, + getContext: function () { + return this._ctx; + }, + + /** + * @param {CanvasRenderingContext2D} ctx + * @return {module:zrender/core/PathProxy} + */ + beginPath: function (ctx) { + this._ctx = ctx; + ctx && ctx.beginPath(); + ctx && (this.dpr = ctx.dpr); // Reset + + if (this._saveData) { + this._len = 0; + } + + if (this._lineDash) { + this._lineDash = null; + this._dashOffset = 0; + } + + return this; + }, + + /** + * @param {number} x + * @param {number} y + * @return {module:zrender/core/PathProxy} + */ + moveTo: function (x, y) { + this.addData(CMD.M, x, y); + this._ctx && this._ctx.moveTo(x, y); // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用 + // xi, yi 记录当前点, x0, y0 在 closePath 的时候回到起始点。 + // 有可能在 beginPath 之后直接调用 lineTo,这时候 x0, y0 需要 + // 在 lineTo 方法中记录,这里先不考虑这种情况,dashed line 也只在 IE10- 中不支持 + + this._x0 = x; + this._y0 = y; + this._xi = x; + this._yi = y; + return this; + }, + + /** + * @param {number} x + * @param {number} y + * @return {module:zrender/core/PathProxy} + */ + lineTo: function (x, y) { + var exceedUnit = mathAbs(x - this._xi) > this._ux || mathAbs(y - this._yi) > this._uy // Force draw the first segment + || this._len < 5; + this.addData(CMD.L, x, y); + + if (this._ctx && exceedUnit) { + this._needsDash() ? this._dashedLineTo(x, y) : this._ctx.lineTo(x, y); + } + + if (exceedUnit) { + this._xi = x; + this._yi = y; + } + + return this; + }, + + /** + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @return {module:zrender/core/PathProxy} + */ + bezierCurveTo: function (x1, y1, x2, y2, x3, y3) { + this.addData(CMD.C, x1, y1, x2, y2, x3, y3); + + if (this._ctx) { + this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3) : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); + } + + this._xi = x3; + this._yi = y3; + return this; + }, + + /** + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @return {module:zrender/core/PathProxy} + */ + quadraticCurveTo: function (x1, y1, x2, y2) { + this.addData(CMD.Q, x1, y1, x2, y2); + + if (this._ctx) { + this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2) : this._ctx.quadraticCurveTo(x1, y1, x2, y2); + } + + this._xi = x2; + this._yi = y2; + return this; + }, + + /** + * @param {number} cx + * @param {number} cy + * @param {number} r + * @param {number} startAngle + * @param {number} endAngle + * @param {boolean} anticlockwise + * @return {module:zrender/core/PathProxy} + */ + arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) { + this.addData(CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1); + this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise); + this._xi = mathCos(endAngle) * r + cx; + this._yi = mathSin(endAngle) * r + cy; + return this; + }, + // TODO + arcTo: function (x1, y1, x2, y2, radius) { + if (this._ctx) { + this._ctx.arcTo(x1, y1, x2, y2, radius); + } + + return this; + }, + // TODO + rect: function (x, y, w, h) { + this._ctx && this._ctx.rect(x, y, w, h); + this.addData(CMD.R, x, y, w, h); + return this; + }, + + /** + * @return {module:zrender/core/PathProxy} + */ + closePath: function () { + this.addData(CMD.Z); + var ctx = this._ctx; + var x0 = this._x0; + var y0 = this._y0; + + if (ctx) { + this._needsDash() && this._dashedLineTo(x0, y0); + ctx.closePath(); + } + + this._xi = x0; + this._yi = y0; + return this; + }, + + /** + * Context 从外部传入,因为有可能是 rebuildPath 完之后再 fill。 + * stroke 同样 + * @param {CanvasRenderingContext2D} ctx + * @return {module:zrender/core/PathProxy} + */ + fill: function (ctx) { + ctx && ctx.fill(); + this.toStatic(); + }, + + /** + * @param {CanvasRenderingContext2D} ctx + * @return {module:zrender/core/PathProxy} + */ + stroke: function (ctx) { + ctx && ctx.stroke(); + this.toStatic(); + }, + + /** + * 必须在其它绘制命令前调用 + * Must be invoked before all other path drawing methods + * @return {module:zrender/core/PathProxy} + */ + setLineDash: function (lineDash) { + if (lineDash instanceof Array) { + this._lineDash = lineDash; + this._dashIdx = 0; + var lineDashSum = 0; + + for (var i = 0; i < lineDash.length; i++) { + lineDashSum += lineDash[i]; + } + + this._dashSum = lineDashSum; + } + + return this; + }, + + /** + * 必须在其它绘制命令前调用 + * Must be invoked before all other path drawing methods + * @return {module:zrender/core/PathProxy} + */ + setLineDashOffset: function (offset) { + this._dashOffset = offset; + return this; + }, + + /** + * + * @return {boolean} + */ + len: function () { + return this._len; + }, + + /** + * 直接设置 Path 数据 + */ + setData: function (data) { + var len = data.length; + + if (!(this.data && this.data.length === len) && hasTypedArray) { + this.data = new Float32Array(len); + } + + for (var i = 0; i < len; i++) { + this.data[i] = data[i]; + } + + this._len = len; + }, + + /** + * 添加子路径 + * @param {module:zrender/core/PathProxy|Array.} path + */ + appendPath: function (path) { + if (!(path instanceof Array)) { + path = [path]; + } + + var len = path.length; + var appendSize = 0; + var offset = this._len; + + for (var i = 0; i < len; i++) { + appendSize += path[i].len(); + } + + if (hasTypedArray && this.data instanceof Float32Array) { + this.data = new Float32Array(offset + appendSize); + } + + for (var i = 0; i < len; i++) { + var appendPathData = path[i].data; + + for (var k = 0; k < appendPathData.length; k++) { + this.data[offset++] = appendPathData[k]; + } + } + + this._len = offset; + }, + + /** + * 填充 Path 数据。 + * 尽量复用而不申明新的数组。大部分图形重绘的指令数据长度都是不变的。 + */ + addData: function (cmd) { + if (!this._saveData) { + return; + } + + var data = this.data; + + if (this._len + arguments.length > data.length) { + // 因为之前的数组已经转换成静态的 Float32Array + // 所以不够用时需要扩展一个新的动态数组 + this._expandData(); + + data = this.data; + } + + for (var i = 0; i < arguments.length; i++) { + data[this._len++] = arguments[i]; + } + + this._prevCmd = cmd; + }, + _expandData: function () { + // Only if data is Float32Array + if (!(this.data instanceof Array)) { + var newData = []; + + for (var i = 0; i < this._len; i++) { + newData[i] = this.data[i]; + } + + this.data = newData; + } + }, + + /** + * If needs js implemented dashed line + * @return {boolean} + * @private + */ + _needsDash: function () { + return this._lineDash; + }, + _dashedLineTo: function (x1, y1) { + var dashSum = this._dashSum; + var offset = this._dashOffset; + var lineDash = this._lineDash; + var ctx = this._ctx; + var x0 = this._xi; + var y0 = this._yi; + var dx = x1 - x0; + var dy = y1 - y0; + var dist = mathSqrt(dx * dx + dy * dy); + var x = x0; + var y = y0; + var dash; + var nDash = lineDash.length; + var idx; + dx /= dist; + dy /= dist; + + if (offset < 0) { + // Convert to positive offset + offset = dashSum + offset; + } + + offset %= dashSum; + x -= offset * dx; + y -= offset * dy; + + while (dx > 0 && x <= x1 || dx < 0 && x >= x1 || dx === 0 && (dy > 0 && y <= y1 || dy < 0 && y >= y1)) { + idx = this._dashIdx; + dash = lineDash[idx]; + x += dx * dash; + y += dy * dash; + this._dashIdx = (idx + 1) % nDash; // Skip positive offset + + if (dx > 0 && x < x0 || dx < 0 && x > x0 || dy > 0 && y < y0 || dy < 0 && y > y0) { + continue; + } + + ctx[idx % 2 ? 'moveTo' : 'lineTo'](dx >= 0 ? mathMin(x, x1) : mathMax(x, x1), dy >= 0 ? mathMin(y, y1) : mathMax(y, y1)); + } // Offset for next lineTo + + + dx = x - x1; + dy = y - y1; + this._dashOffset = -mathSqrt(dx * dx + dy * dy); + }, + // Not accurate dashed line to + _dashedBezierTo: function (x1, y1, x2, y2, x3, y3) { + var dashSum = this._dashSum; + var offset = this._dashOffset; + var lineDash = this._lineDash; + var ctx = this._ctx; + var x0 = this._xi; + var y0 = this._yi; + var t; + var dx; + var dy; + var cubicAt = curve.cubicAt; + var bezierLen = 0; + var idx = this._dashIdx; + var nDash = lineDash.length; + var x; + var y; + var tmpLen = 0; + + if (offset < 0) { + // Convert to positive offset + offset = dashSum + offset; + } + + offset %= dashSum; // Bezier approx length + + for (t = 0; t < 1; t += 0.1) { + dx = cubicAt(x0, x1, x2, x3, t + 0.1) - cubicAt(x0, x1, x2, x3, t); + dy = cubicAt(y0, y1, y2, y3, t + 0.1) - cubicAt(y0, y1, y2, y3, t); + bezierLen += mathSqrt(dx * dx + dy * dy); + } // Find idx after add offset + + + for (; idx < nDash; idx++) { + tmpLen += lineDash[idx]; + + if (tmpLen > offset) { + break; + } + } + + t = (tmpLen - offset) / bezierLen; + + while (t <= 1) { + x = cubicAt(x0, x1, x2, x3, t); + y = cubicAt(y0, y1, y2, y3, t); // Use line to approximate dashed bezier + // Bad result if dash is long + + idx % 2 ? ctx.moveTo(x, y) : ctx.lineTo(x, y); + t += lineDash[idx] / bezierLen; + idx = (idx + 1) % nDash; + } // Finish the last segment and calculate the new offset + + + idx % 2 !== 0 && ctx.lineTo(x3, y3); + dx = x3 - x; + dy = y3 - y; + this._dashOffset = -mathSqrt(dx * dx + dy * dy); + }, + _dashedQuadraticTo: function (x1, y1, x2, y2) { + // Convert quadratic to cubic using degree elevation + var x3 = x2; + var y3 = y2; + x2 = (x2 + 2 * x1) / 3; + y2 = (y2 + 2 * y1) / 3; + x1 = (this._xi + 2 * x1) / 3; + y1 = (this._yi + 2 * y1) / 3; + + this._dashedBezierTo(x1, y1, x2, y2, x3, y3); + }, + + /** + * 转成静态的 Float32Array 减少堆内存占用 + * Convert dynamic array to static Float32Array + */ + toStatic: function () { + var data = this.data; + + if (data instanceof Array) { + data.length = this._len; + + if (hasTypedArray) { + this.data = new Float32Array(data); + } + } + }, + + /** + * @return {module:zrender/core/BoundingRect} + */ + getBoundingRect: function () { + min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE; + max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE; + var data = this.data; + var xi = 0; + var yi = 0; + var x0 = 0; + var y0 = 0; + + for (var i = 0; i < data.length;) { + var cmd = data[i++]; + + if (i === 1) { + // 如果第一个命令是 L, C, Q + // 则 previous point 同绘制命令的第一个 point + // + // 第一个命令为 Arc 的情况下会在后面特殊处理 + xi = data[i]; + yi = data[i + 1]; + x0 = xi; + y0 = yi; + } + + switch (cmd) { + case CMD.M: + // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点 + // 在 closePath 的时候使用 + x0 = data[i++]; + y0 = data[i++]; + xi = x0; + yi = y0; + min2[0] = x0; + min2[1] = y0; + max2[0] = x0; + max2[1] = y0; + break; + + case CMD.L: + bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2); + xi = data[i++]; + yi = data[i++]; + break; + + case CMD.C: + bbox.fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2); + xi = data[i++]; + yi = data[i++]; + break; + + case CMD.Q: + bbox.fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2); + xi = data[i++]; + yi = data[i++]; + break; + + case CMD.A: + // TODO Arc 判断的开销比较大 + var cx = data[i++]; + var cy = data[i++]; + var rx = data[i++]; + var ry = data[i++]; + var startAngle = data[i++]; + var endAngle = data[i++] + startAngle; // TODO Arc 旋转 + + i += 1; + var anticlockwise = 1 - data[i++]; + + if (i === 1) { + // 直接使用 arc 命令 + // 第一个命令起点还未定义 + x0 = mathCos(startAngle) * rx + cx; + y0 = mathSin(startAngle) * ry + cy; + } + + bbox.fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2); + xi = mathCos(endAngle) * rx + cx; + yi = mathSin(endAngle) * ry + cy; + break; + + case CMD.R: + x0 = xi = data[i++]; + y0 = yi = data[i++]; + var width = data[i++]; + var height = data[i++]; // Use fromLine + + bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2); + break; + + case CMD.Z: + xi = x0; + yi = y0; + break; + } // Union + + + vec2.min(min, min, min2); + vec2.max(max, max, max2); + } // No data + + + if (i === 0) { + min[0] = min[1] = max[0] = max[1] = 0; + } + + return new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]); + }, + + /** + * Rebuild path from current data + * Rebuild path will not consider javascript implemented line dash. + * @param {CanvasRenderingContext2D} ctx + */ + rebuildPath: function (ctx) { + var d = this.data; + var x0; + var y0; + var xi; + var yi; + var x; + var y; + var ux = this._ux; + var uy = this._uy; + var len = this._len; + + for (var i = 0; i < len;) { + var cmd = d[i++]; + + if (i === 1) { + // 如果第一个命令是 L, C, Q + // 则 previous point 同绘制命令的第一个 point + // + // 第一个命令为 Arc 的情况下会在后面特殊处理 + xi = d[i]; + yi = d[i + 1]; + x0 = xi; + y0 = yi; + } + + switch (cmd) { + case CMD.M: + x0 = xi = d[i++]; + y0 = yi = d[i++]; + ctx.moveTo(xi, yi); + break; + + case CMD.L: + x = d[i++]; + y = d[i++]; // Not draw too small seg between + + if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) { + ctx.lineTo(x, y); + xi = x; + yi = y; + } + + break; + + case CMD.C: + ctx.bezierCurveTo(d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]); + xi = d[i - 2]; + yi = d[i - 1]; + break; + + case CMD.Q: + ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]); + xi = d[i - 2]; + yi = d[i - 1]; + break; + + case CMD.A: + var cx = d[i++]; + var cy = d[i++]; + var rx = d[i++]; + var ry = d[i++]; + var theta = d[i++]; + var dTheta = d[i++]; + var psi = d[i++]; + var fs = d[i++]; + var r = rx > ry ? rx : ry; + var scaleX = rx > ry ? 1 : rx / ry; + var scaleY = rx > ry ? ry / rx : 1; + var isEllipse = Math.abs(rx - ry) > 1e-3; + var endAngle = theta + dTheta; + + if (isEllipse) { + ctx.translate(cx, cy); + ctx.rotate(psi); + ctx.scale(scaleX, scaleY); + ctx.arc(0, 0, r, theta, endAngle, 1 - fs); + ctx.scale(1 / scaleX, 1 / scaleY); + ctx.rotate(-psi); + ctx.translate(-cx, -cy); + } else { + ctx.arc(cx, cy, r, theta, endAngle, 1 - fs); + } + + if (i === 1) { + // 直接使用 arc 命令 + // 第一个命令起点还未定义 + x0 = mathCos(theta) * rx + cx; + y0 = mathSin(theta) * ry + cy; + } + + xi = mathCos(endAngle) * rx + cx; + yi = mathSin(endAngle) * ry + cy; + break; + + case CMD.R: + x0 = xi = d[i]; + y0 = yi = d[i + 1]; + ctx.rect(d[i++], d[i++], d[i++], d[i++]); + break; + + case CMD.Z: + ctx.closePath(); + xi = x0; + yi = y0; + } + } + } +}; +PathProxy.CMD = CMD; +var _default = PathProxy; +module.exports = _default; + +/***/ }), + +/***/ "2145": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var features = {}; + +function register(name, ctor) { + features[name] = ctor; +} + +function get(name) { + return features[name]; +} + +exports.register = register; +exports.get = get; + +/***/ }), + +/***/ "2163": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var SeriesModel = __webpack_require__("4f85"); + +var Tree = __webpack_require__("06c7"); + +var _format = __webpack_require__("eda2"); + +var encodeHTML = _format.encodeHTML; + +var Model = __webpack_require__("4319"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = SeriesModel.extend({ + type: 'series.tree', + layoutInfo: null, + // can support the position parameters 'left', 'top','right','bottom', 'width', + // 'height' in the setOption() with 'merge' mode normal. + layoutMode: 'box', + + /** + * Init a tree data structure from data in option series + * @param {Object} option the object used to config echarts view + * @return {module:echarts/data/List} storage initial data + */ + getInitialData: function (option) { + //create an virtual root + var root = { + name: option.name, + children: option.data + }; + var leaves = option.leaves || {}; + var leavesModel = new Model(leaves, this, this.ecModel); + var tree = Tree.createTree(root, this, {}, beforeLink); + + function beforeLink(nodeData) { + nodeData.wrapMethod('getItemModel', function (model, idx) { + var node = tree.getNodeByDataIndex(idx); + + if (!node.children.length || !node.isExpand) { + model.parentModel = leavesModel; + } + + return model; + }); + } + + var treeDepth = 0; + tree.eachNode('preorder', function (node) { + if (node.depth > treeDepth) { + treeDepth = node.depth; + } + }); + var expandAndCollapse = option.expandAndCollapse; + var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth; + tree.root.eachNode('preorder', function (node) { + var item = node.hostTree.data.getRawDataItem(node.dataIndex); // Add item.collapsed != null, because users can collapse node original in the series.data. + + node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth; + }); + return tree.data; + }, + + /** + * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'. + * @returns {string} orient + */ + getOrient: function () { + var orient = this.get('orient'); + + if (orient === 'horizontal') { + orient = 'LR'; + } else if (orient === 'vertical') { + orient = 'TB'; + } + + return orient; + }, + setZoom: function (zoom) { + this.option.zoom = zoom; + }, + setCenter: function (center) { + this.option.center = center; + }, + + /** + * @override + * @param {number} dataIndex + */ + formatTooltip: function (dataIndex) { + var tree = this.getData().tree; + var realRoot = tree.root.children[0]; + var node = tree.getNodeByDataIndex(dataIndex); + var value = node.getValue(); + var name = node.name; + + while (node && node !== realRoot) { + name = node.parentNode.name + '.' + name; + node = node.parentNode; + } + + return encodeHTML(name + (isNaN(value) || value == null ? '' : ' : ' + value)); + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: 'view', + // the position of the whole view + left: '12%', + top: '12%', + right: '12%', + bottom: '12%', + // the layout of the tree, two value can be selected, 'orthogonal' or 'radial' + layout: 'orthogonal', + // value can be 'polyline' + edgeShape: 'curve', + edgeForkPosition: '50%', + // true | false | 'move' | 'scale', see module:component/helper/RoamController. + roam: false, + // Symbol size scale ratio in roam + nodeScaleRatio: 0.4, + // Default on center of graph + center: null, + zoom: 1, + // The orient of orthoginal layout, can be setted to 'LR', 'TB', 'RL', 'BT'. + // and the backward compatibility configuration 'horizontal = LR', 'vertical = TB'. + orient: 'LR', + symbol: 'emptyCircle', + symbolSize: 7, + expandAndCollapse: true, + initialTreeDepth: 2, + lineStyle: { + color: '#ccc', + width: 1.5, + curveness: 0.5 + }, + itemStyle: { + color: 'lightsteelblue', + borderColor: '#c23531', + borderWidth: 1.5 + }, + label: { + show: true, + color: '#555' + }, + leaves: { + label: { + show: true + } + }, + animationEasing: 'linear', + animationDuration: 700, + animationDurationUpdate: 1000 + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "216a": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var numberUtil = __webpack_require__("3842"); + +var formatUtil = __webpack_require__("eda2"); + +var scaleHelper = __webpack_require__("944e"); + +var IntervalScale = __webpack_require__("89e3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* A third-party license is embeded for some of the code in this file: +* The "scaleLevels" was originally copied from "d3.js" with some +* modifications made for this project. +* (See more details in the comment on the definition of "scaleLevels" below.) +* The use of the source code of this file is also subject to the terms +* and consitions of the license of "d3.js" (BSD-3Clause, see +* ). +*/ +// [About UTC and local time zone]: +// In most cases, `number.parseDate` will treat input data string as local time +// (except time zone is specified in time string). And `format.formateTime` returns +// local time by default. option.useUTC is false by default. This design have +// concidered these common case: +// (1) Time that is persistent in server is in UTC, but it is needed to be diplayed +// in local time by default. +// (2) By default, the input data string (e.g., '2011-01-02') should be displayed +// as its original time, without any time difference. +var intervalScaleProto = IntervalScale.prototype; +var mathCeil = Math.ceil; +var mathFloor = Math.floor; +var ONE_SECOND = 1000; +var ONE_MINUTE = ONE_SECOND * 60; +var ONE_HOUR = ONE_MINUTE * 60; +var ONE_DAY = ONE_HOUR * 24; // FIXME 公用? + +var bisect = function (a, x, lo, hi) { + while (lo < hi) { + var mid = lo + hi >>> 1; + + if (a[mid][1] < x) { + lo = mid + 1; + } else { + hi = mid; + } + } + + return lo; +}; +/** + * @alias module:echarts/coord/scale/Time + * @constructor + */ + + +var TimeScale = IntervalScale.extend({ + type: 'time', + + /** + * @override + */ + getLabel: function (val) { + var stepLvl = this._stepLvl; + var date = new Date(val); + return formatUtil.formatTime(stepLvl[0], date, this.getSetting('useUTC')); + }, + + /** + * @override + */ + niceExtent: function (opt) { + var extent = this._extent; // If extent start and end are same, expand them + + if (extent[0] === extent[1]) { + // Expand extent + extent[0] -= ONE_DAY; + extent[1] += ONE_DAY; + } // If there are no data and extent are [Infinity, -Infinity] + + + if (extent[1] === -Infinity && extent[0] === Infinity) { + var d = new Date(); + extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate()); + extent[0] = extent[1] - ONE_DAY; + } + + this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // var extent = this._extent; + + var interval = this._interval; + + if (!opt.fixMin) { + extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval); + } + + if (!opt.fixMax) { + extent[1] = numberUtil.round(mathCeil(extent[1] / interval) * interval); + } + }, + + /** + * @override + */ + niceTicks: function (approxTickNum, minInterval, maxInterval) { + approxTickNum = approxTickNum || 10; + var extent = this._extent; + var span = extent[1] - extent[0]; + var approxInterval = span / approxTickNum; + + if (minInterval != null && approxInterval < minInterval) { + approxInterval = minInterval; + } + + if (maxInterval != null && approxInterval > maxInterval) { + approxInterval = maxInterval; + } + + var scaleLevelsLen = scaleLevels.length; + var idx = bisect(scaleLevels, approxInterval, 0, scaleLevelsLen); + var level = scaleLevels[Math.min(idx, scaleLevelsLen - 1)]; + var interval = level[1]; // Same with interval scale if span is much larger than 1 year + + if (level[0] === 'year') { + var yearSpan = span / interval; // From "Nice Numbers for Graph Labels" of Graphic Gems + // var niceYearSpan = numberUtil.nice(yearSpan, false); + + var yearStep = numberUtil.nice(yearSpan / approxTickNum, true); + interval *= yearStep; + } + + var timezoneOffset = this.getSetting('useUTC') ? 0 : new Date(+extent[0] || +extent[1]).getTimezoneOffset() * 60 * 1000; + var niceExtent = [Math.round(mathCeil((extent[0] - timezoneOffset) / interval) * interval + timezoneOffset), Math.round(mathFloor((extent[1] - timezoneOffset) / interval) * interval + timezoneOffset)]; + scaleHelper.fixExtent(niceExtent, extent); + this._stepLvl = level; // Interval will be used in getTicks + + this._interval = interval; + this._niceExtent = niceExtent; + }, + parse: function (val) { + // val might be float. + return +numberUtil.parseDate(val); + } +}); +zrUtil.each(['contain', 'normalize'], function (methodName) { + TimeScale.prototype[methodName] = function (val) { + return intervalScaleProto[methodName].call(this, this.parse(val)); + }; +}); +/** + * This implementation was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + */ + +var scaleLevels = [// Format interval +['hh:mm:ss', ONE_SECOND], // 1s +['hh:mm:ss', ONE_SECOND * 5], // 5s +['hh:mm:ss', ONE_SECOND * 10], // 10s +['hh:mm:ss', ONE_SECOND * 15], // 15s +['hh:mm:ss', ONE_SECOND * 30], // 30s +['hh:mm\nMM-dd', ONE_MINUTE], // 1m +['hh:mm\nMM-dd', ONE_MINUTE * 5], // 5m +['hh:mm\nMM-dd', ONE_MINUTE * 10], // 10m +['hh:mm\nMM-dd', ONE_MINUTE * 15], // 15m +['hh:mm\nMM-dd', ONE_MINUTE * 30], // 30m +['hh:mm\nMM-dd', ONE_HOUR], // 1h +['hh:mm\nMM-dd', ONE_HOUR * 2], // 2h +['hh:mm\nMM-dd', ONE_HOUR * 6], // 6h +['hh:mm\nMM-dd', ONE_HOUR * 12], // 12h +['MM-dd\nyyyy', ONE_DAY], // 1d +['MM-dd\nyyyy', ONE_DAY * 2], // 2d +['MM-dd\nyyyy', ONE_DAY * 3], // 3d +['MM-dd\nyyyy', ONE_DAY * 4], // 4d +['MM-dd\nyyyy', ONE_DAY * 5], // 5d +['MM-dd\nyyyy', ONE_DAY * 6], // 6d +['week', ONE_DAY * 7], // 7d +['MM-dd\nyyyy', ONE_DAY * 10], // 10d +['week', ONE_DAY * 14], // 2w +['week', ONE_DAY * 21], // 3w +['month', ONE_DAY * 31], // 1M +['week', ONE_DAY * 42], // 6w +['month', ONE_DAY * 62], // 2M +['week', ONE_DAY * 70], // 10w +['quarter', ONE_DAY * 95], // 3M +['month', ONE_DAY * 31 * 4], // 4M +['month', ONE_DAY * 31 * 5], // 5M +['half-year', ONE_DAY * 380 / 2], // 6M +['month', ONE_DAY * 31 * 8], // 8M +['month', ONE_DAY * 31 * 10], // 10M +['year', ONE_DAY * 380] // 1Y +]; +/** + * @param {module:echarts/model/Model} + * @return {module:echarts/scale/Time} + */ + +TimeScale.create = function (model) { + return new TimeScale({ + useUTC: model.ecModel.get('useUTC') + }); +}; + +var _default = TimeScale; +module.exports = _default; + +/***/ }), + +/***/ "217b": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var createListFromArray = __webpack_require__("3301"); + +var SeriesModel = __webpack_require__("4f85"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = SeriesModel.extend({ + type: 'series.line', + dependencies: ['grid', 'polar'], + getInitialData: function (option, ecModel) { + return createListFromArray(this.getSource(), this, { + useEncodeDefaulter: true + }); + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: 'cartesian2d', + legendHoverLink: true, + hoverAnimation: true, + // stack: null + // xAxisIndex: 0, + // yAxisIndex: 0, + // polarIndex: 0, + // If clip the overflow value + clip: true, + // cursor: null, + label: { + position: 'top' + }, + // itemStyle: { + // }, + lineStyle: { + width: 2, + type: 'solid' + }, + // areaStyle: { + // origin of areaStyle. Valid values: + // `'auto'/null/undefined`: from axisLine to data + // `'start'`: from min to data + // `'end'`: from data to max + // origin: 'auto' + // }, + // false, 'start', 'end', 'middle' + step: false, + // Disabled if step is true + smooth: false, + smoothMonotone: null, + symbol: 'emptyCircle', + symbolSize: 4, + symbolRotate: null, + showSymbol: true, + // `false`: follow the label interval strategy. + // `true`: show all symbols. + // `'auto'`: If possible, show all symbols, otherwise + // follow the label interval strategy. + showAllSymbol: 'auto', + // Whether to connect break point. + connectNulls: false, + // Sampling for large data. Can be: 'average', 'max', 'min', 'sum'. + sampling: 'none', + animationEasing: 'linear', + // Disable progressive + progressive: 0, + hoverLayerThreshold: Infinity + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "217c": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Component = __webpack_require__("6cb7"); + +__webpack_require__("df3a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = Component.extend({ + type: 'parallel', + dependencies: ['parallelAxis'], + + /** + * @type {module:echarts/coord/parallel/Parallel} + */ + coordinateSystem: null, + + /** + * Each item like: 'dim0', 'dim1', 'dim2', ... + * @type {Array.} + * @readOnly + */ + dimensions: null, + + /** + * Coresponding to dimensions. + * @type {Array.} + * @readOnly + */ + parallelAxisIndex: null, + layoutMode: 'box', + defaultOption: { + zlevel: 0, + z: 0, + left: 80, + top: 60, + right: 80, + bottom: 60, + // width: {totalWidth} - left - right, + // height: {totalHeight} - top - bottom, + layout: 'horizontal', + // 'horizontal' or 'vertical' + // FIXME + // naming? + axisExpandable: false, + axisExpandCenter: null, + axisExpandCount: 0, + axisExpandWidth: 50, + // FIXME '10%' ? + axisExpandRate: 17, + axisExpandDebounce: 50, + // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full. + // Do not doc to user until necessary. + axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4], + axisExpandTriggerOn: 'click', + // 'mousemove' or 'click' + parallelAxisDefault: null + }, + + /** + * @override + */ + init: function () { + Component.prototype.init.apply(this, arguments); + this.mergeOption({}); + }, + + /** + * @override + */ + mergeOption: function (newOption) { + var thisOption = this.option; + newOption && zrUtil.merge(thisOption, newOption, true); + + this._initDimensions(); + }, + + /** + * Whether series or axis is in this coordinate system. + * @param {module:echarts/model/Series|module:echarts/coord/parallel/AxisModel} model + * @param {module:echarts/model/Global} ecModel + */ + contains: function (model, ecModel) { + var parallelIndex = model.get('parallelIndex'); + return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this; + }, + setAxisExpand: function (opt) { + zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) { + if (opt.hasOwnProperty(name)) { + this.option[name] = opt[name]; + } + }, this); + }, + + /** + * @private + */ + _initDimensions: function () { + var dimensions = this.dimensions = []; + var parallelAxisIndex = this.parallelAxisIndex = []; + var axisModels = zrUtil.filter(this.dependentModels.parallelAxis, function (axisModel) { + // Can not use this.contains here, because + // initialization has not been completed yet. + return (axisModel.get('parallelIndex') || 0) === this.componentIndex; + }, this); + zrUtil.each(axisModels, function (axisModel) { + dimensions.push('dim' + axisModel.get('dim')); + parallelAxisIndex.push(axisModel.componentIndex); + }); + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "2266": +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__("825a"); +var isArrayIteratorMethod = __webpack_require__("e95a"); +var toLength = __webpack_require__("50c4"); +var bind = __webpack_require__("0366"); +var getIteratorMethod = __webpack_require__("35a1"); +var callWithSafeIterationClosing = __webpack_require__("9bdd"); + +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; + +var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { + var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1); + var iterator, iterFn, index, length, result, next, step; + + if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = toLength(iterable.length); length > index; index++) { + result = AS_ENTRIES + ? boundFunction(anObject(step = iterable[index])[0], step[1]) + : boundFunction(iterable[index]); + if (result && result instanceof Result) return result; + } return new Result(false); + } + iterator = iterFn.call(iterable); + } + + next = iterator.next; + while (!(step = next.call(iterator)).done) { + result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); + if (typeof result == 'object' && result && result instanceof Result) return result; + } return new Result(false); +}; + +iterate.stop = function (result) { + return new Result(true, result); +}; + + +/***/ }), + +/***/ "22d1": +/***/ (function(module, exports) { + +/** + * echarts设备环境识别 + * + * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。 + * @author firede[firede@firede.us] + * @desc thanks zepto. + */ + +/* global wx */ +var env = {}; + +if (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') { + // In Weixin Application + env = { + browser: {}, + os: {}, + node: false, + wxa: true, + // Weixin Application + canvasSupported: true, + svgSupported: false, + touchEventsSupported: true, + domSupported: false + }; +} else if (typeof document === 'undefined' && typeof self !== 'undefined') { + // In worker + env = { + browser: {}, + os: {}, + node: false, + worker: true, + canvasSupported: true, + domSupported: false + }; +} else if (typeof navigator === 'undefined') { + // In node + env = { + browser: {}, + os: {}, + node: true, + worker: false, + // Assume canvas is supported + canvasSupported: true, + svgSupported: true, + domSupported: false + }; +} else { + env = detect(navigator.userAgent); +} + +var _default = env; // Zepto.js +// (c) 2010-2013 Thomas Fuchs +// Zepto.js may be freely distributed under the MIT license. + +function detect(ua) { + var os = {}; + var browser = {}; // var webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/); + // var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); + // var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + // var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + // var iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/); + // var webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/); + // var touchpad = webos && ua.match(/TouchPad/); + // var kindle = ua.match(/Kindle\/([\d.]+)/); + // var silk = ua.match(/Silk\/([\d._]+)/); + // var blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/); + // var bb10 = ua.match(/(BB10).*Version\/([\d.]+)/); + // var rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/); + // var playbook = ua.match(/PlayBook/); + // var chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/); + + var firefox = ua.match(/Firefox\/([\d.]+)/); // var safari = webkit && ua.match(/Mobile\//) && !chrome; + // var webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome; + + var ie = ua.match(/MSIE\s([\d.]+)/) // IE 11 Trident/7.0; rv:11.0 + || ua.match(/Trident\/.+?rv:(([\d.]+))/); + var edge = ua.match(/Edge\/([\d.]+)/); // IE 12 and 12+ + + var weChat = /micromessenger/i.test(ua); // Todo: clean this up with a better OS/browser seperation: + // - discern (more) between multiple browsers on android + // - decide if kindle fire in silk mode is android or not + // - Firefox on Android doesn't specify the Android version + // - possibly devide in os, device and browser hashes + // if (browser.webkit = !!webkit) browser.version = webkit[1]; + // if (android) os.android = true, os.version = android[2]; + // if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.'); + // if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.'); + // if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null; + // if (webos) os.webos = true, os.version = webos[2]; + // if (touchpad) os.touchpad = true; + // if (blackberry) os.blackberry = true, os.version = blackberry[2]; + // if (bb10) os.bb10 = true, os.version = bb10[2]; + // if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2]; + // if (playbook) browser.playbook = true; + // if (kindle) os.kindle = true, os.version = kindle[1]; + // if (silk) browser.silk = true, browser.version = silk[1]; + // if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true; + // if (chrome) browser.chrome = true, browser.version = chrome[1]; + + if (firefox) { + browser.firefox = true; + browser.version = firefox[1]; + } // if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true; + // if (webview) browser.webview = true; + + + if (ie) { + browser.ie = true; + browser.version = ie[1]; + } + + if (edge) { + browser.edge = true; + browser.version = edge[1]; + } // It is difficult to detect WeChat in Win Phone precisely, because ua can + // not be set on win phone. So we do not consider Win Phone. + + + if (weChat) { + browser.weChat = true; + } // os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) || + // (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/))); + // os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || + // (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) || + // (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/)))); + + + return { + browser: browser, + os: os, + node: false, + // 原生canvas支持,改极端点了 + // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9) + canvasSupported: !!document.createElement('canvas').getContext, + svgSupported: typeof SVGRect !== 'undefined', + // works on most browsers + // IE10/11 does not support touch event, and MS Edge supports them but not by + // default, so we dont check navigator.maxTouchPoints for them here. + touchEventsSupported: 'ontouchstart' in window && !browser.ie && !browser.edge, + // . + pointerEventsSupported: // (1) Firefox supports pointer but not by default, only MS browsers are reliable on pointer + // events currently. So we dont use that on other browsers unless tested sufficiently. + // For example, in iOS 13 Mobile Chromium 78, if the touching behavior starts page + // scroll, the `pointermove` event can not be fired any more. That will break some + // features like "pan horizontally to move something and pan vertically to page scroll". + // The horizontal pan probably be interrupted by the casually triggered page scroll. + // (2) Although IE 10 supports pointer event, it use old style and is different from the + // standard. So we exclude that. (IE 10 is hardly used on touch device) + 'onpointerdown' in window && (browser.edge || browser.ie && browser.version >= 11), + // passiveSupported: detectPassiveSupport() + domSupported: typeof document !== 'undefined' + }; +} // See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection +// function detectPassiveSupport() { +// // Test via a getter in the options object to see if the passive property is accessed +// var supportsPassive = false; +// try { +// var opts = Object.defineProperty({}, 'passive', { +// get: function() { +// supportsPassive = true; +// } +// }); +// window.addEventListener('testPassive', function() {}, opts); +// } catch (e) { +// } +// return supportsPassive; +// } + + +module.exports = _default; + +/***/ }), + +/***/ "22da": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var layout = __webpack_require__("f934"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* A third-party license is embeded for some of the code in this file: +* The tree layoutHelper implementation was originally copied from +* "d3.js"(https://github.com/d3/d3-hierarchy) with +* some modifications made for this project. +* (see more details in the comment of the specific method below.) +* The use of the source code of this file is also subject to the terms +* and consitions of the licence of "d3.js" (BSD-3Clause, see +* ). +*/ + +/** + * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing + * the tree. + */ + +/** + * Initialize all computational message for following algorithm. + * + * @param {module:echarts/data/Tree~TreeNode} root The virtual root of the tree. + */ +function init(root) { + root.hierNode = { + defaultAncestor: null, + ancestor: root, + prelim: 0, + modifier: 0, + change: 0, + shift: 0, + i: 0, + thread: null + }; + var nodes = [root]; + var node; + var children; + + while (node = nodes.pop()) { + // jshint ignore:line + children = node.children; + + if (node.isExpand && children.length) { + var n = children.length; + + for (var i = n - 1; i >= 0; i--) { + var child = children[i]; + child.hierNode = { + defaultAncestor: null, + ancestor: child, + prelim: 0, + modifier: 0, + change: 0, + shift: 0, + i: i, + thread: null + }; + nodes.push(child); + } + } + } +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * Computes a preliminary x coordinate for node. Before that, this function is + * applied recursively to the children of node, as well as the function + * apportion(). After spacing out the children by calling executeShifts(), the + * node is placed to the midpoint of its outermost children. + * + * @param {module:echarts/data/Tree~TreeNode} node + * @param {Function} separation + */ + + +function firstWalk(node, separation) { + var children = node.isExpand ? node.children : []; + var siblings = node.parentNode.children; + var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null; + + if (children.length) { + executeShifts(node); + var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2; + + if (subtreeW) { + node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); + node.hierNode.modifier = node.hierNode.prelim - midPoint; + } else { + node.hierNode.prelim = midPoint; + } + } else if (subtreeW) { + node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); + } + + node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation); +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * Computes all real x-coordinates by summing up the modifiers recursively. + * + * @param {module:echarts/data/Tree~TreeNode} node + */ + + +function secondWalk(node) { + var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier; + node.setLayout({ + x: nodeX + }, true); + node.hierNode.modifier += node.parentNode.hierNode.modifier; +} + +function separation(cb) { + return arguments.length ? cb : defaultSeparation; +} +/** + * Transform the common coordinate to radial coordinate. + * + * @param {number} x + * @param {number} y + * @return {Object} + */ + + +function radialCoordinate(x, y) { + var radialCoor = {}; + x -= Math.PI / 2; + radialCoor.x = y * Math.cos(x); + radialCoor.y = y * Math.sin(x); + return radialCoor; +} +/** + * Get the layout position of the whole view. + * + * @param {module:echarts/model/Series} seriesModel the model object of sankey series + * @param {module:echarts/ExtensionAPI} api provide the API list that the developer can call + * @return {module:zrender/core/BoundingRect} size of rect to draw the sankey view + */ + + +function getViewRect(seriesModel, api) { + return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + }); +} +/** + * All other shifts, applied to the smaller subtrees between w- and w+, are + * performed by this function. + * + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * @param {module:echarts/data/Tree~TreeNode} node + */ + + +function executeShifts(node) { + var children = node.children; + var n = children.length; + var shift = 0; + var change = 0; + + while (--n >= 0) { + var child = children[n]; + child.hierNode.prelim += shift; + child.hierNode.modifier += shift; + change += child.hierNode.change; + shift += child.hierNode.shift + change; + } +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * The core of the algorithm. Here, a new subtree is combined with the + * previous subtrees. Threads are used to traverse the inside and outside + * contours of the left and right subtree up to the highest common level. + * Whenever two nodes of the inside contours conflict, we compute the left + * one of the greatest uncommon ancestors using the function nextAncestor() + * and call moveSubtree() to shift the subtree and prepare the shifts of + * smaller subtrees. Finally, we add a new thread (if necessary). + * + * @param {module:echarts/data/Tree~TreeNode} subtreeV + * @param {module:echarts/data/Tree~TreeNode} subtreeW + * @param {module:echarts/data/Tree~TreeNode} ancestor + * @param {Function} separation + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function apportion(subtreeV, subtreeW, ancestor, separation) { + if (subtreeW) { + var nodeOutRight = subtreeV; + var nodeInRight = subtreeV; + var nodeOutLeft = nodeInRight.parentNode.children[0]; + var nodeInLeft = subtreeW; + var sumOutRight = nodeOutRight.hierNode.modifier; + var sumInRight = nodeInRight.hierNode.modifier; + var sumOutLeft = nodeOutLeft.hierNode.modifier; + var sumInLeft = nodeInLeft.hierNode.modifier; + + while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) { + nodeOutRight = nextRight(nodeOutRight); + nodeOutLeft = nextLeft(nodeOutLeft); + nodeOutRight.hierNode.ancestor = subtreeV; + var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight); + + if (shift > 0) { + moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift); + sumInRight += shift; + sumOutRight += shift; + } + + sumInLeft += nodeInLeft.hierNode.modifier; + sumInRight += nodeInRight.hierNode.modifier; + sumOutRight += nodeOutRight.hierNode.modifier; + sumOutLeft += nodeOutLeft.hierNode.modifier; + } + + if (nodeInLeft && !nextRight(nodeOutRight)) { + nodeOutRight.hierNode.thread = nodeInLeft; + nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight; + } + + if (nodeInRight && !nextLeft(nodeOutLeft)) { + nodeOutLeft.hierNode.thread = nodeInRight; + nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft; + ancestor = subtreeV; + } + } + + return ancestor; +} +/** + * This function is used to traverse the right contour of a subtree. + * It returns the rightmost child of node or the thread of node. The function + * returns null if and only if node is on the highest depth of its subtree. + * + * @param {module:echarts/data/Tree~TreeNode} node + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function nextRight(node) { + var children = node.children; + return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread; +} +/** + * This function is used to traverse the left contour of a subtree (or a subforest). + * It returns the leftmost child of node or the thread of node. The function + * returns null if and only if node is on the highest depth of its subtree. + * + * @param {module:echarts/data/Tree~TreeNode} node + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function nextLeft(node) { + var children = node.children; + return children.length && node.isExpand ? children[0] : node.hierNode.thread; +} +/** + * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor. + * Otherwise, returns the specified ancestor. + * + * @param {module:echarts/data/Tree~TreeNode} nodeInLeft + * @param {module:echarts/data/Tree~TreeNode} node + * @param {module:echarts/data/Tree~TreeNode} ancestor + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function nextAncestor(nodeInLeft, node, ancestor) { + return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor; +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * Shifts the current subtree rooted at wr. + * This is done by increasing prelim(w+) and modifier(w+) by shift. + * + * @param {module:echarts/data/Tree~TreeNode} wl + * @param {module:echarts/data/Tree~TreeNode} wr + * @param {number} shift [description] + */ + + +function moveSubtree(wl, wr, shift) { + var change = shift / (wr.hierNode.i - wl.hierNode.i); + wr.hierNode.change -= change; + wr.hierNode.shift += shift; + wr.hierNode.modifier += shift; + wr.hierNode.prelim += shift; + wl.hierNode.change += change; +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + */ + + +function defaultSeparation(node1, node2) { + return node1.parentNode === node2.parentNode ? 1 : 2; +} + +exports.init = init; +exports.firstWalk = firstWalk; +exports.secondWalk = secondWalk; +exports.separation = separation; +exports.radialCoordinate = radialCoordinate; +exports.getViewRect = getViewRect; + +/***/ }), + +/***/ "2306": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var pathTool = __webpack_require__("342d"); + +var colorTool = __webpack_require__("41ef"); + +var matrix = __webpack_require__("1687"); + +var vector = __webpack_require__("401b"); + +var Path = __webpack_require__("cbe5"); + +var Transformable = __webpack_require__("0cde"); + +var ZImage = __webpack_require__("0da8"); + +exports.Image = ZImage; + +var Group = __webpack_require__("e1fc"); + +exports.Group = Group; + +var Text = __webpack_require__("76a5"); + +exports.Text = Text; + +var Circle = __webpack_require__("d9fc"); + +exports.Circle = Circle; + +var Sector = __webpack_require__("4aa2"); + +exports.Sector = Sector; + +var Ring = __webpack_require__("4573"); + +exports.Ring = Ring; + +var Polygon = __webpack_require__("87b1"); + +exports.Polygon = Polygon; + +var Polyline = __webpack_require__("d498"); + +exports.Polyline = Polyline; + +var Rect = __webpack_require__("c7a2"); + +exports.Rect = Rect; + +var Line = __webpack_require__("cb11"); + +exports.Line = Line; + +var BezierCurve = __webpack_require__("ac0f"); + +exports.BezierCurve = BezierCurve; + +var Arc = __webpack_require__("8d32"); + +exports.Arc = Arc; + +var CompoundPath = __webpack_require__("d4c6"); + +exports.CompoundPath = CompoundPath; + +var LinearGradient = __webpack_require__("48a9"); + +exports.LinearGradient = LinearGradient; + +var RadialGradient = __webpack_require__("dded"); + +exports.RadialGradient = RadialGradient; + +var BoundingRect = __webpack_require__("9850"); + +exports.BoundingRect = BoundingRect; + +var IncrementalDisplayable = __webpack_require__("392f"); + +exports.IncrementalDisplayable = IncrementalDisplayable; + +var subPixelOptimizeUtil = __webpack_require__("9cf9"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var mathMax = Math.max; +var mathMin = Math.min; +var EMPTY_OBJ = {}; +var Z2_EMPHASIS_LIFT = 1; // key: label model property nane, value: style property name. + +var CACHED_LABEL_STYLE_PROPERTIES = { + color: 'textFill', + textBorderColor: 'textStroke', + textBorderWidth: 'textStrokeWidth' +}; +var EMPHASIS = 'emphasis'; +var NORMAL = 'normal'; // Reserve 0 as default. + +var _highlightNextDigit = 1; +var _highlightKeyMap = {}; +var _customShapeMap = {}; +/** + * Extend shape with parameters + */ + +function extendShape(opts) { + return Path.extend(opts); +} +/** + * Extend path + */ + + +function extendPath(pathData, opts) { + return pathTool.extendFromString(pathData, opts); +} +/** + * Register a user defined shape. + * The shape class can be fetched by `getShapeClass` + * This method will overwrite the registered shapes, including + * the registered built-in shapes, if using the same `name`. + * The shape can be used in `custom series` and + * `graphic component` by declaring `{type: name}`. + * + * @param {string} name + * @param {Object} ShapeClass Can be generated by `extendShape`. + */ + + +function registerShape(name, ShapeClass) { + _customShapeMap[name] = ShapeClass; +} +/** + * Find shape class registered by `registerShape`. Usually used in + * fetching user defined shape. + * + * [Caution]: + * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared + * to use user registered shapes. + * Because the built-in shape (see `getBuiltInShape`) will be registered by + * `registerShape` by default. That enables users to get both built-in + * shapes as well as the shapes belonging to themsleves. But users can overwrite + * the built-in shapes by using names like 'circle', 'rect' via calling + * `registerShape`. So the echarts inner featrues should not fetch shapes from here + * in case that it is overwritten by users, except that some features, like + * `custom series`, `graphic component`, do it deliberately. + * + * (2) In the features like `custom series`, `graphic component`, the user input + * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic + * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names + * are reserved names, that is, if some user register a shape named `'image'`, + * the shape will not be used. If we intending to add some more reserved names + * in feature, that might bring break changes (disable some existing user shape + * names). But that case probably rearly happen. So we dont make more mechanism + * to resolve this issue here. + * + * @param {string} name + * @return {Object} The shape class. If not found, return nothing. + */ + + +function getShapeClass(name) { + if (_customShapeMap.hasOwnProperty(name)) { + return _customShapeMap[name]; + } +} +/** + * Create a path element from path data string + * @param {string} pathData + * @param {Object} opts + * @param {module:zrender/core/BoundingRect} rect + * @param {string} [layout=cover] 'center' or 'cover' + */ + + +function makePath(pathData, opts, rect, layout) { + var path = pathTool.createFromString(pathData, opts); + + if (rect) { + if (layout === 'center') { + rect = centerGraphic(rect, path.getBoundingRect()); + } + + resizePath(path, rect); + } + + return path; +} +/** + * Create a image element from image url + * @param {string} imageUrl image url + * @param {Object} opts options + * @param {module:zrender/core/BoundingRect} rect constrain rect + * @param {string} [layout=cover] 'center' or 'cover' + */ + + +function makeImage(imageUrl, rect, layout) { + var path = new ZImage({ + style: { + image: imageUrl, + x: rect.x, + y: rect.y, + width: rect.width, + height: rect.height + }, + onload: function (img) { + if (layout === 'center') { + var boundingRect = { + width: img.width, + height: img.height + }; + path.setStyle(centerGraphic(rect, boundingRect)); + } + } + }); + return path; +} +/** + * Get position of centered element in bounding box. + * + * @param {Object} rect element local bounding box + * @param {Object} boundingRect constraint bounding box + * @return {Object} element position containing x, y, width, and height + */ + + +function centerGraphic(rect, boundingRect) { + // Set rect to center, keep width / height ratio. + var aspect = boundingRect.width / boundingRect.height; + var width = rect.height * aspect; + var height; + + if (width <= rect.width) { + height = rect.height; + } else { + width = rect.width; + height = width / aspect; + } + + var cx = rect.x + rect.width / 2; + var cy = rect.y + rect.height / 2; + return { + x: cx - width / 2, + y: cy - height / 2, + width: width, + height: height + }; +} + +var mergePath = pathTool.mergePath; +/** + * Resize a path to fit the rect + * @param {module:zrender/graphic/Path} path + * @param {Object} rect + */ + +function resizePath(path, rect) { + if (!path.applyTransform) { + return; + } + + var pathRect = path.getBoundingRect(); + var m = pathRect.calculateTransform(rect); + path.applyTransform(m); +} +/** + * Sub pixel optimize line for canvas + * + * @param {Object} param + * @param {Object} [param.shape] + * @param {number} [param.shape.x1] + * @param {number} [param.shape.y1] + * @param {number} [param.shape.x2] + * @param {number} [param.shape.y2] + * @param {Object} [param.style] + * @param {number} [param.style.lineWidth] + * @return {Object} Modified param + */ + + +function subPixelOptimizeLine(param) { + subPixelOptimizeUtil.subPixelOptimizeLine(param.shape, param.shape, param.style); + return param; +} +/** + * Sub pixel optimize rect for canvas + * + * @param {Object} param + * @param {Object} [param.shape] + * @param {number} [param.shape.x] + * @param {number} [param.shape.y] + * @param {number} [param.shape.width] + * @param {number} [param.shape.height] + * @param {Object} [param.style] + * @param {number} [param.style.lineWidth] + * @return {Object} Modified param + */ + + +function subPixelOptimizeRect(param) { + subPixelOptimizeUtil.subPixelOptimizeRect(param.shape, param.shape, param.style); + return param; +} +/** + * Sub pixel optimize for canvas + * + * @param {number} position Coordinate, such as x, y + * @param {number} lineWidth Should be nonnegative integer. + * @param {boolean=} positiveOrNegative Default false (negative). + * @return {number} Optimized position. + */ + + +var subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize; + +function hasFillOrStroke(fillOrStroke) { + return fillOrStroke != null && fillOrStroke !== 'none'; +} // Most lifted color are duplicated. + + +var liftedColorMap = zrUtil.createHashMap(); +var liftedColorCount = 0; + +function liftColor(color) { + if (typeof color !== 'string') { + return color; + } + + var liftedColor = liftedColorMap.get(color); + + if (!liftedColor) { + liftedColor = colorTool.lift(color, -0.1); + + if (liftedColorCount < 10000) { + liftedColorMap.set(color, liftedColor); + liftedColorCount++; + } + } + + return liftedColor; +} + +function cacheElementStl(el) { + if (!el.__hoverStlDirty) { + return; + } + + el.__hoverStlDirty = false; + var hoverStyle = el.__hoverStl; + + if (!hoverStyle) { + el.__cachedNormalStl = el.__cachedNormalZ2 = null; + return; + } + + var normalStyle = el.__cachedNormalStl = {}; + el.__cachedNormalZ2 = el.z2; + var elStyle = el.style; + + for (var name in hoverStyle) { + // See comment in `singleEnterEmphasis`. + if (hoverStyle[name] != null) { + normalStyle[name] = elStyle[name]; + } + } // Always cache fill and stroke to normalStyle for lifting color. + + + normalStyle.fill = elStyle.fill; + normalStyle.stroke = elStyle.stroke; +} + +function singleEnterEmphasis(el) { + var hoverStl = el.__hoverStl; + + if (!hoverStl || el.__highlighted) { + return; + } + + var zr = el.__zr; + var useHoverLayer = el.useHoverLayer && zr && zr.painter.type === 'canvas'; + el.__highlighted = useHoverLayer ? 'layer' : 'plain'; + + if (el.isGroup || !zr && el.useHoverLayer) { + return; + } + + var elTarget = el; + var targetStyle = el.style; + + if (useHoverLayer) { + elTarget = zr.addHover(el); + targetStyle = elTarget.style; + } + + rollbackDefaultTextStyle(targetStyle); + + if (!useHoverLayer) { + cacheElementStl(elTarget); + } // styles can be: + // { + // label: { + // show: false, + // position: 'outside', + // fontSize: 18 + // }, + // emphasis: { + // label: { + // show: true + // } + // } + // }, + // where properties of `emphasis` may not appear in `normal`. We previously use + // module:echarts/util/model#defaultEmphasis to merge `normal` to `emphasis`. + // But consider rich text and setOption in merge mode, it is impossible to cover + // all properties in merge. So we use merge mode when setting style here. + // But we choose the merge strategy that only properties that is not `null/undefined`. + // Because when making a textStyle (espacially rich text), it is not easy to distinguish + // `hasOwnProperty` and `null/undefined` in code, so we trade them as the same for simplicity. + // But this strategy brings a trouble that `null/undefined` can not be used to remove + // style any more in `emphasis`. Users can both set properties directly on normal and + // emphasis to avoid this issue, or we might support `'none'` for this case if required. + + + targetStyle.extendFrom(hoverStl); + setDefaultHoverFillStroke(targetStyle, hoverStl, 'fill'); + setDefaultHoverFillStroke(targetStyle, hoverStl, 'stroke'); + applyDefaultTextStyle(targetStyle); + + if (!useHoverLayer) { + el.dirty(false); + el.z2 += Z2_EMPHASIS_LIFT; + } +} + +function setDefaultHoverFillStroke(targetStyle, hoverStyle, prop) { + if (!hasFillOrStroke(hoverStyle[prop]) && hasFillOrStroke(targetStyle[prop])) { + targetStyle[prop] = liftColor(targetStyle[prop]); + } +} + +function singleEnterNormal(el) { + var highlighted = el.__highlighted; + + if (!highlighted) { + return; + } + + el.__highlighted = false; + + if (el.isGroup) { + return; + } + + if (highlighted === 'layer') { + el.__zr && el.__zr.removeHover(el); + } else { + var style = el.style; + var normalStl = el.__cachedNormalStl; + + if (normalStl) { + rollbackDefaultTextStyle(style); + el.setStyle(normalStl); + applyDefaultTextStyle(style); + } // `__cachedNormalZ2` will not be reset if calling `setElementHoverStyle` + // when `el` is on emphasis state. So here by comparing with 1, we try + // hard to make the bug case rare. + + + var normalZ2 = el.__cachedNormalZ2; + + if (normalZ2 != null && el.z2 - normalZ2 === Z2_EMPHASIS_LIFT) { + el.z2 = normalZ2; + } + } +} + +function traverseUpdate(el, updater, commonParam) { + // If root is group, also enter updater for `highDownOnUpdate`. + var fromState = NORMAL; + var toState = NORMAL; + var trigger; // See the rule of `highDownOnUpdate` on `graphic.setAsHighDownDispatcher`. + + el.__highlighted && (fromState = EMPHASIS, trigger = true); + updater(el, commonParam); + el.__highlighted && (toState = EMPHASIS, trigger = true); + el.isGroup && el.traverse(function (child) { + !child.isGroup && updater(child, commonParam); + }); + trigger && el.__highDownOnUpdate && el.__highDownOnUpdate(fromState, toState); +} +/** + * Set hover style (namely "emphasis style") of element, based on the current + * style of the given `el`. + * This method should be called after all of the normal styles have been adopted + * to the `el`. See the reason on `setHoverStyle`. + * + * @param {module:zrender/Element} el Should not be `zrender/container/Group`. + * @param {Object} [el.hoverStyle] Can be set on el or its descendants, + * e.g., `el.hoverStyle = ...; graphic.setHoverStyle(el); `. + * Often used when item group has a label element and it's hoverStyle is different. + * @param {Object|boolean} [hoverStl] The specified hover style. + * If set as `false`, disable the hover style. + * Similarly, The `el.hoverStyle` can alse be set + * as `false` to disable the hover style. + * Otherwise, use the default hover style if not provided. + */ + + +function setElementHoverStyle(el, hoverStl) { + // For performance consideration, it might be better to make the "hover style" only the + // difference properties from the "normal style", but not a entire copy of all styles. + hoverStl = el.__hoverStl = hoverStl !== false && (el.hoverStyle || hoverStl || {}); + el.__hoverStlDirty = true; // FIXME + // It is not completely right to save "normal"/"emphasis" flag on elements. + // It probably should be saved on `data` of series. Consider the cases: + // (1) A highlighted elements are moved out of the view port and re-enter + // again by dataZoom. + // (2) call `setOption` and replace elements totally when they are highlighted. + + if (el.__highlighted) { + // Consider the case: + // The styles of a highlighted `el` is being updated. The new "emphasis style" + // should be adapted to the `el`. Notice here new "normal styles" should have + // been set outside and the cached "normal style" is out of date. + el.__cachedNormalStl = null; // Do not clear `__cachedNormalZ2` here, because setting `z2` is not a constraint + // of this method. In most cases, `z2` is not set and hover style should be able + // to rollback. Of course, that would bring bug, but only in a rare case, see + // `doSingleLeaveHover` for details. + + singleEnterNormal(el); + singleEnterEmphasis(el); + } +} + +function onElementMouseOver(e) { + !shouldSilent(this, e) // "emphasis" event highlight has higher priority than mouse highlight. + && !this.__highByOuter && traverseUpdate(this, singleEnterEmphasis); +} + +function onElementMouseOut(e) { + !shouldSilent(this, e) // "emphasis" event highlight has higher priority than mouse highlight. + && !this.__highByOuter && traverseUpdate(this, singleEnterNormal); +} + +function onElementEmphasisEvent(highlightDigit) { + this.__highByOuter |= 1 << (highlightDigit || 0); + traverseUpdate(this, singleEnterEmphasis); +} + +function onElementNormalEvent(highlightDigit) { + !(this.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdate(this, singleEnterNormal); +} + +function shouldSilent(el, e) { + return el.__highDownSilentOnTouch && e.zrByTouch; +} +/** + * Set hover style (namely "emphasis style") of element, + * based on the current style of the given `el`. + * + * (1) + * **CONSTRAINTS** for this method: + * This method MUST be called after all of the normal styles having been adopted + * to the `el`. + * The input `hoverStyle` (that is, "emphasis style") MUST be the subset of the + * "normal style" having been set to the el. + * `color` MUST be one of the "normal styles" (because color might be lifted as + * a default hover style). + * + * The reason: this method treat the current style of the `el` as the "normal style" + * and cache them when enter/update the "emphasis style". Consider the case: the `el` + * is in "emphasis" state and `setOption`/`dispatchAction` trigger the style updating + * logic, where the el should shift from the original emphasis style to the new + * "emphasis style" and should be able to "downplay" back to the new "normal style". + * + * Indeed, it is error-prone to make a interface has so many constraints, but I have + * not found a better solution yet to fit the backward compatibility, performance and + * the current programming style. + * + * (2) + * Call the method for a "root" element once. Do not call it for each descendants. + * If the descendants elemenets of a group has itself hover style different from the + * root group, we can simply mount the style on `el.hoverStyle` for them, but should + * not call this method for them. + * + * (3) These input parameters can be set directly on `el`: + * + * @param {module:zrender/Element} el + * @param {Object} [el.hoverStyle] See `graphic.setElementHoverStyle`. + * @param {boolean} [el.highDownSilentOnTouch=false] See `graphic.setAsHighDownDispatcher`. + * @param {Function} [el.highDownOnUpdate] See `graphic.setAsHighDownDispatcher`. + * @param {Object|boolean} [hoverStyle] See `graphic.setElementHoverStyle`. + */ + + +function setHoverStyle(el, hoverStyle) { + setAsHighDownDispatcher(el, true); + traverseUpdate(el, setElementHoverStyle, hoverStyle); +} +/** + * @param {module:zrender/Element} el + * @param {Function} [el.highDownOnUpdate] Called when state updated. + * Since `setHoverStyle` has the constraint that it must be called after + * all of the normal style updated, `highDownOnUpdate` is not needed to + * trigger if both `fromState` and `toState` is 'normal', and needed to + * trigger if both `fromState` and `toState` is 'emphasis', which enables + * to sync outside style settings to "emphasis" state. + * @this {string} This dispatcher `el`. + * @param {string} fromState Can be "normal" or "emphasis". + * `fromState` might equal to `toState`, + * for example, when this method is called when `el` is + * on "emphasis" state. + * @param {string} toState Can be "normal" or "emphasis". + * + * FIXME + * CAUTION: Do not expose `highDownOnUpdate` outside echarts. + * Because it is not a complete solution. The update + * listener should not have been mount in element, + * and the normal/emphasis state should not have + * mantained on elements. + * + * @param {boolean} [el.highDownSilentOnTouch=false] + * In touch device, mouseover event will be trigger on touchstart event + * (see module:zrender/dom/HandlerProxy). By this mechanism, we can + * conveniently use hoverStyle when tap on touch screen without additional + * code for compatibility. + * But if the chart/component has select feature, which usually also use + * hoverStyle, there might be conflict between 'select-highlight' and + * 'hover-highlight' especially when roam is enabled (see geo for example). + * In this case, `highDownSilentOnTouch` should be used to disable + * hover-highlight on touch device. + * @param {boolean} [asDispatcher=true] If `false`, do not set as "highDownDispatcher". + */ + + +function setAsHighDownDispatcher(el, asDispatcher) { + var disable = asDispatcher === false; // Make `highDownSilentOnTouch` and `highDownOnUpdate` only work after + // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly. + + el.__highDownSilentOnTouch = el.highDownSilentOnTouch; + el.__highDownOnUpdate = el.highDownOnUpdate; // Simple optimize, since this method might be + // called for each elements of a group in some cases. + + if (!disable || el.__highDownDispatcher) { + var method = disable ? 'off' : 'on'; // Duplicated function will be auto-ignored, see Eventful.js. + + el[method]('mouseover', onElementMouseOver)[method]('mouseout', onElementMouseOut); // Emphasis, normal can be triggered manually by API or other components like hover link. + + el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent); // Also keep previous record. + + el.__highByOuter = el.__highByOuter || 0; + el.__highDownDispatcher = !disable; + } +} +/** + * @param {module:zrender/src/Element} el + * @return {boolean} + */ + + +function isHighDownDispatcher(el) { + return !!(el && el.__highDownDispatcher); +} +/** + * Support hightlight/downplay record on each elements. + * For the case: hover highlight/downplay (legend, visualMap, ...) and + * user triggerred hightlight/downplay should not conflict. + * Only all of the highlightDigit cleared, return to normal. + * @param {string} highlightKey + * @return {number} highlightDigit + */ + + +function getHighlightDigit(highlightKey) { + var highlightDigit = _highlightKeyMap[highlightKey]; + + if (highlightDigit == null && _highlightNextDigit <= 32) { + highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++; + } + + return highlightDigit; +} +/** + * See more info in `setTextStyleCommon`. + * @param {Object|module:zrender/graphic/Style} normalStyle + * @param {Object} emphasisStyle + * @param {module:echarts/model/Model} normalModel + * @param {module:echarts/model/Model} emphasisModel + * @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props. + * @param {string|Function} [opt.defaultText] + * @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by + * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {number} [opt.labelDataIndex] Fetch text by + * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {number} [opt.labelDimIndex] Fetch text by + * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {string} [opt.labelProp] Fetch text by + * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {Object} [normalSpecified] + * @param {Object} [emphasisSpecified] + */ + + +function setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisModel, opt, normalSpecified, emphasisSpecified) { + opt = opt || EMPTY_OBJ; + var labelFetcher = opt.labelFetcher; + var labelDataIndex = opt.labelDataIndex; + var labelDimIndex = opt.labelDimIndex; + var labelProp = opt.labelProp; // This scenario, `label.normal.show = true; label.emphasis.show = false`, + // is not supported util someone requests. + + var showNormal = normalModel.getShallow('show'); + var showEmphasis = emphasisModel.getShallow('show'); // Consider performance, only fetch label when necessary. + // If `normal.show` is `false` and `emphasis.show` is `true` and `emphasis.formatter` is not set, + // label should be displayed, where text is fetched by `normal.formatter` or `opt.defaultText`. + + var baseText; + + if (showNormal || showEmphasis) { + if (labelFetcher) { + baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp); + } + + if (baseText == null) { + baseText = zrUtil.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText; + } + } + + var normalStyleText = showNormal ? baseText : null; + var emphasisStyleText = showEmphasis ? zrUtil.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp) : null, baseText) : null; // Optimize: If style.text is null, text will not be drawn. + + if (normalStyleText != null || emphasisStyleText != null) { + // Always set `textStyle` even if `normalStyle.text` is null, because default + // values have to be set on `normalStyle`. + // If we set default values on `emphasisStyle`, consider case: + // Firstly, `setOption(... label: {normal: {text: null}, emphasis: {show: true}} ...);` + // Secondly, `setOption(... label: {noraml: {show: true, text: 'abc', color: 'red'} ...);` + // Then the 'red' will not work on emphasis. + setTextStyle(normalStyle, normalModel, normalSpecified, opt); + setTextStyle(emphasisStyle, emphasisModel, emphasisSpecified, opt, true); + } + + normalStyle.text = normalStyleText; + emphasisStyle.text = emphasisStyleText; +} +/** + * Modify label style manually. + * Only works after `setLabelStyle` and `setElementHoverStyle` called. + * + * @param {module:zrender/src/Element} el + * @param {Object} [normalStyleProps] optional + * @param {Object} [emphasisStyleProps] optional + */ + + +function modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) { + var elStyle = el.style; + + if (normalStyleProps) { + rollbackDefaultTextStyle(elStyle); + el.setStyle(normalStyleProps); + applyDefaultTextStyle(elStyle); + } + + elStyle = el.__hoverStl; + + if (emphasisStyleProps && elStyle) { + rollbackDefaultTextStyle(elStyle); + zrUtil.extend(elStyle, emphasisStyleProps); + applyDefaultTextStyle(elStyle); + } +} +/** + * Set basic textStyle properties. + * See more info in `setTextStyleCommon`. + * @param {Object|module:zrender/graphic/Style} textStyle + * @param {module:echarts/model/Model} model + * @param {Object} [specifiedTextStyle] Can be overrided by settings in model. + * @param {Object} [opt] See `opt` of `setTextStyleCommon`. + * @param {boolean} [isEmphasis] + */ + + +function setTextStyle(textStyle, textStyleModel, specifiedTextStyle, opt, isEmphasis) { + setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis); + specifiedTextStyle && zrUtil.extend(textStyle, specifiedTextStyle); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false); + + return textStyle; +} +/** + * Set text option in the style. + * See more info in `setTextStyleCommon`. + * @deprecated + * @param {Object} textStyle + * @param {module:echarts/model/Model} labelModel + * @param {string|boolean} defaultColor Default text color. + * If set as false, it will be processed as a emphasis style. + */ + + +function setText(textStyle, labelModel, defaultColor) { + var opt = { + isRectText: true + }; + var isEmphasis; + + if (defaultColor === false) { + isEmphasis = true; + } else { + // Support setting color as 'auto' to get visual color. + opt.autoColor = defaultColor; + } + + setTextStyleCommon(textStyle, labelModel, opt, isEmphasis); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false); +} +/** + * The uniform entry of set text style, that is, retrieve style definitions + * from `model` and set to `textStyle` object. + * + * Never in merge mode, but in overwrite mode, that is, all of the text style + * properties will be set. (Consider the states of normal and emphasis and + * default value can be adopted, merge would make the logic too complicated + * to manage.) + * + * The `textStyle` object can either be a plain object or an instance of + * `zrender/src/graphic/Style`, and either be the style of normal or emphasis. + * After this mothod called, the `textStyle` object can then be used in + * `el.setStyle(textStyle)` or `el.hoverStyle = textStyle`. + * + * Default value will be adopted and `insideRollbackOpt` will be created. + * See `applyDefaultTextStyle` `rollbackDefaultTextStyle` for more details. + * + * opt: { + * disableBox: boolean, Whether diable drawing box of block (outer most). + * isRectText: boolean, + * autoColor: string, specify a color when color is 'auto', + * for textFill, textStroke, textBackgroundColor, and textBorderColor. + * If autoColor specified, it is used as default textFill. + * useInsideStyle: + * `true`: Use inside style (textFill, textStroke, textStrokeWidth) + * if `textFill` is not specified. + * `false`: Do not use inside style. + * `null/undefined`: use inside style if `isRectText` is true and + * `textFill` is not specified and textPosition contains `'inside'`. + * forceRich: boolean + * } + */ + + +function setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis) { + // Consider there will be abnormal when merge hover style to normal style if given default value. + opt = opt || EMPTY_OBJ; + + if (opt.isRectText) { + var textPosition; + + if (opt.getTextPosition) { + textPosition = opt.getTextPosition(textStyleModel, isEmphasis); + } else { + textPosition = textStyleModel.getShallow('position') || (isEmphasis ? null : 'inside'); // 'outside' is not a valid zr textPostion value, but used + // in bar series, and magric type should be considered. + + textPosition === 'outside' && (textPosition = 'top'); + } + + textStyle.textPosition = textPosition; + textStyle.textOffset = textStyleModel.getShallow('offset'); + var labelRotate = textStyleModel.getShallow('rotate'); + labelRotate != null && (labelRotate *= Math.PI / 180); + textStyle.textRotation = labelRotate; + textStyle.textDistance = zrUtil.retrieve2(textStyleModel.getShallow('distance'), isEmphasis ? null : 5); + } + + var ecModel = textStyleModel.ecModel; + var globalTextStyle = ecModel && ecModel.option.textStyle; // Consider case: + // { + // data: [{ + // value: 12, + // label: { + // rich: { + // // no 'a' here but using parent 'a'. + // } + // } + // }], + // rich: { + // a: { ... } + // } + // } + + var richItemNames = getRichItemNames(textStyleModel); + var richResult; + + if (richItemNames) { + richResult = {}; + + for (var name in richItemNames) { + if (richItemNames.hasOwnProperty(name)) { + // Cascade is supported in rich. + var richTextStyle = textStyleModel.getModel(['rich', name]); // In rich, never `disableBox`. + // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`, + // the default color `'blue'` will not be adopted if no color declared in `rich`. + // That might confuses users. So probably we should put `textStyleModel` as the + // root ancestor of the `richTextStyle`. But that would be a break change. + + setTokenTextStyle(richResult[name] = {}, richTextStyle, globalTextStyle, opt, isEmphasis); + } + } + } + + textStyle.rich = richResult; + setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, true); + + if (opt.forceRich && !opt.textStyle) { + opt.textStyle = {}; + } + + return textStyle; +} // Consider case: +// { +// data: [{ +// value: 12, +// label: { +// rich: { +// // no 'a' here but using parent 'a'. +// } +// } +// }], +// rich: { +// a: { ... } +// } +// } + + +function getRichItemNames(textStyleModel) { + // Use object to remove duplicated names. + var richItemNameMap; + + while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { + var rich = (textStyleModel.option || EMPTY_OBJ).rich; + + if (rich) { + richItemNameMap = richItemNameMap || {}; + + for (var name in rich) { + if (rich.hasOwnProperty(name)) { + richItemNameMap[name] = 1; + } + } + } + + textStyleModel = textStyleModel.parentModel; + } + + return richItemNameMap; +} + +function setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, isBlock) { + // In merge mode, default value should not be given. + globalTextStyle = !isEmphasis && globalTextStyle || EMPTY_OBJ; + textStyle.textFill = getAutoColor(textStyleModel.getShallow('color'), opt) || globalTextStyle.color; + textStyle.textStroke = getAutoColor(textStyleModel.getShallow('textBorderColor'), opt) || globalTextStyle.textBorderColor; + textStyle.textStrokeWidth = zrUtil.retrieve2(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth); + + if (!isEmphasis) { + if (isBlock) { + textStyle.insideRollbackOpt = opt; + applyDefaultTextStyle(textStyle); + } // Set default finally. + + + if (textStyle.textFill == null) { + textStyle.textFill = opt.autoColor; + } + } // Do not use `getFont` here, because merge should be supported, where + // part of these properties may be changed in emphasis style, and the + // others should remain their original value got from normal style. + + + textStyle.fontStyle = textStyleModel.getShallow('fontStyle') || globalTextStyle.fontStyle; + textStyle.fontWeight = textStyleModel.getShallow('fontWeight') || globalTextStyle.fontWeight; + textStyle.fontSize = textStyleModel.getShallow('fontSize') || globalTextStyle.fontSize; + textStyle.fontFamily = textStyleModel.getShallow('fontFamily') || globalTextStyle.fontFamily; + textStyle.textAlign = textStyleModel.getShallow('align'); + textStyle.textVerticalAlign = textStyleModel.getShallow('verticalAlign') || textStyleModel.getShallow('baseline'); + textStyle.textLineHeight = textStyleModel.getShallow('lineHeight'); + textStyle.textWidth = textStyleModel.getShallow('width'); + textStyle.textHeight = textStyleModel.getShallow('height'); + textStyle.textTag = textStyleModel.getShallow('tag'); + + if (!isBlock || !opt.disableBox) { + textStyle.textBackgroundColor = getAutoColor(textStyleModel.getShallow('backgroundColor'), opt); + textStyle.textPadding = textStyleModel.getShallow('padding'); + textStyle.textBorderColor = getAutoColor(textStyleModel.getShallow('borderColor'), opt); + textStyle.textBorderWidth = textStyleModel.getShallow('borderWidth'); + textStyle.textBorderRadius = textStyleModel.getShallow('borderRadius'); + textStyle.textBoxShadowColor = textStyleModel.getShallow('shadowColor'); + textStyle.textBoxShadowBlur = textStyleModel.getShallow('shadowBlur'); + textStyle.textBoxShadowOffsetX = textStyleModel.getShallow('shadowOffsetX'); + textStyle.textBoxShadowOffsetY = textStyleModel.getShallow('shadowOffsetY'); + } + + textStyle.textShadowColor = textStyleModel.getShallow('textShadowColor') || globalTextStyle.textShadowColor; + textStyle.textShadowBlur = textStyleModel.getShallow('textShadowBlur') || globalTextStyle.textShadowBlur; + textStyle.textShadowOffsetX = textStyleModel.getShallow('textShadowOffsetX') || globalTextStyle.textShadowOffsetX; + textStyle.textShadowOffsetY = textStyleModel.getShallow('textShadowOffsetY') || globalTextStyle.textShadowOffsetY; +} + +function getAutoColor(color, opt) { + return color !== 'auto' ? color : opt && opt.autoColor ? opt.autoColor : null; +} +/** + * Give some default value to the input `textStyle` object, based on the current settings + * in this `textStyle` object. + * + * The Scenario: + * when text position is `inside` and `textFill` is not specified, we show + * text border by default for better view. But it should be considered that text position + * might be changed when hovering or being emphasis, where the `insideRollback` is used to + * restore the style. + * + * Usage (& NOTICE): + * When a style object (eithor plain object or instance of `zrender/src/graphic/Style`) is + * about to be modified on its text related properties, `rollbackDefaultTextStyle` should + * be called before the modification and `applyDefaultTextStyle` should be called after that. + * (For the case that all of the text related properties is reset, like `setTextStyleCommon` + * does, `rollbackDefaultTextStyle` is not needed to be called). + */ + + +function applyDefaultTextStyle(textStyle) { + var textPosition = textStyle.textPosition; + var opt = textStyle.insideRollbackOpt; + var insideRollback; + + if (opt && textStyle.textFill == null) { + var autoColor = opt.autoColor; + var isRectText = opt.isRectText; + var useInsideStyle = opt.useInsideStyle; + var useInsideStyleCache = useInsideStyle !== false && (useInsideStyle === true || isRectText && textPosition // textPosition can be [10, 30] + && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0); + var useAutoColorCache = !useInsideStyleCache && autoColor != null; // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached. + + if (useInsideStyleCache || useAutoColorCache) { + insideRollback = { + textFill: textStyle.textFill, + textStroke: textStyle.textStroke, + textStrokeWidth: textStyle.textStrokeWidth + }; + } + + if (useInsideStyleCache) { + textStyle.textFill = '#fff'; // Consider text with #fff overflow its container. + + if (textStyle.textStroke == null) { + textStyle.textStroke = autoColor; + textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2); + } + } + + if (useAutoColorCache) { + textStyle.textFill = autoColor; + } + } // Always set `insideRollback`, so that the previous one can be cleared. + + + textStyle.insideRollback = insideRollback; +} +/** + * Consider the case: in a scatter, + * label: { + * normal: {position: 'inside'}, + * emphasis: {position: 'top'} + * } + * In the normal state, the `textFill` will be set as '#fff' for pretty view (see + * `applyDefaultTextStyle`), but when switching to emphasis state, the `textFill` + * should be retured to 'autoColor', but not keep '#fff'. + */ + + +function rollbackDefaultTextStyle(style) { + var insideRollback = style.insideRollback; + + if (insideRollback) { + // Reset all of the props in `CACHED_LABEL_STYLE_PROPERTIES`. + style.textFill = insideRollback.textFill; + style.textStroke = insideRollback.textStroke; + style.textStrokeWidth = insideRollback.textStrokeWidth; + style.insideRollback = null; + } +} + +function getFont(opt, ecModel) { + var gTextStyleModel = ecModel && ecModel.getModel('textStyle'); + return zrUtil.trim([// FIXME in node-canvas fontWeight is before fontStyle + opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' ')); +} + +function animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb) { + if (typeof dataIndex === 'function') { + cb = dataIndex; + dataIndex = null; + } // Do not check 'animation' property directly here. Consider this case: + // animation model is an `itemModel`, whose does not have `isAnimationEnabled` + // but its parent model (`seriesModel`) does. + + + var animationEnabled = animatableModel && animatableModel.isAnimationEnabled(); + + if (animationEnabled) { + var postfix = isUpdate ? 'Update' : ''; + var duration = animatableModel.getShallow('animationDuration' + postfix); + var animationEasing = animatableModel.getShallow('animationEasing' + postfix); + var animationDelay = animatableModel.getShallow('animationDelay' + postfix); + + if (typeof animationDelay === 'function') { + animationDelay = animationDelay(dataIndex, animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null); + } + + if (typeof duration === 'function') { + duration = duration(dataIndex); + } + + duration > 0 ? el.animateTo(props, duration, animationDelay || 0, animationEasing, cb, !!cb) : (el.stopAnimation(), el.attr(props), cb && cb()); + } else { + el.stopAnimation(); + el.attr(props); + cb && cb(); + } +} +/** + * Update graphic element properties with or without animation according to the + * configuration in series. + * + * Caution: this method will stop previous animation. + * So do not use this method to one element twice before + * animation starts, unless you know what you are doing. + * + * @param {module:zrender/Element} el + * @param {Object} props + * @param {module:echarts/model/Model} [animatableModel] + * @param {number} [dataIndex] + * @param {Function} [cb] + * @example + * graphic.updateProps(el, { + * position: [100, 100] + * }, seriesModel, dataIndex, function () { console.log('Animation done!'); }); + * // Or + * graphic.updateProps(el, { + * position: [100, 100] + * }, seriesModel, function () { console.log('Animation done!'); }); + */ + + +function updateProps(el, props, animatableModel, dataIndex, cb) { + animateOrSetProps(true, el, props, animatableModel, dataIndex, cb); +} +/** + * Init graphic element properties with or without animation according to the + * configuration in series. + * + * Caution: this method will stop previous animation. + * So do not use this method to one element twice before + * animation starts, unless you know what you are doing. + * + * @param {module:zrender/Element} el + * @param {Object} props + * @param {module:echarts/model/Model} [animatableModel] + * @param {number} [dataIndex] + * @param {Function} cb + */ + + +function initProps(el, props, animatableModel, dataIndex, cb) { + animateOrSetProps(false, el, props, animatableModel, dataIndex, cb); +} +/** + * Get transform matrix of target (param target), + * in coordinate of its ancestor (param ancestor) + * + * @param {module:zrender/mixin/Transformable} target + * @param {module:zrender/mixin/Transformable} [ancestor] + */ + + +function getTransform(target, ancestor) { + var mat = matrix.identity([]); + + while (target && target !== ancestor) { + matrix.mul(mat, target.getLocalTransform(), mat); + target = target.parent; + } + + return mat; +} +/** + * Apply transform to an vertex. + * @param {Array.} target [x, y] + * @param {Array.|TypedArray.|Object} transform Can be: + * + Transform matrix: like [1, 0, 0, 1, 0, 0] + * + {position, rotation, scale}, the same as `zrender/Transformable`. + * @param {boolean=} invert Whether use invert matrix. + * @return {Array.} [x, y] + */ + + +function applyTransform(target, transform, invert) { + if (transform && !zrUtil.isArrayLike(transform)) { + transform = Transformable.getLocalTransform(transform); + } + + if (invert) { + transform = matrix.invert([], transform); + } + + return vector.applyTransform([], target, transform); +} +/** + * @param {string} direction 'left' 'right' 'top' 'bottom' + * @param {Array.} transform Transform matrix: like [1, 0, 0, 1, 0, 0] + * @param {boolean=} invert Whether use invert matrix. + * @return {string} Transformed direction. 'left' 'right' 'top' 'bottom' + */ + + +function transformDirection(direction, transform, invert) { + // Pick a base, ensure that transform result will not be (0, 0). + var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]); + var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]); + var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0]; + vertex = applyTransform(vertex, transform, invert); + return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top'; +} +/** + * Apply group transition animation from g1 to g2. + * If no animatableModel, no animation. + */ + + +function groupTransition(g1, g2, animatableModel, cb) { + if (!g1 || !g2) { + return; + } + + function getElMap(g) { + var elMap = {}; + g.traverse(function (el) { + if (!el.isGroup && el.anid) { + elMap[el.anid] = el; + } + }); + return elMap; + } + + function getAnimatableProps(el) { + var obj = { + position: vector.clone(el.position), + rotation: el.rotation + }; + + if (el.shape) { + obj.shape = zrUtil.extend({}, el.shape); + } + + return obj; + } + + var elMap1 = getElMap(g1); + g2.traverse(function (el) { + if (!el.isGroup && el.anid) { + var oldEl = elMap1[el.anid]; + + if (oldEl) { + var newProp = getAnimatableProps(el); + el.attr(getAnimatableProps(oldEl)); + updateProps(el, newProp, animatableModel, el.dataIndex); + } // else { + // if (el.previousProps) { + // graphic.updateProps + // } + // } + + } + }); +} +/** + * @param {Array.>} points Like: [[23, 44], [53, 66], ...] + * @param {Object} rect {x, y, width, height} + * @return {Array.>} A new clipped points. + */ + + +function clipPointsByRect(points, rect) { + // FIXME: this way migth be incorrect when grpahic clipped by a corner. + // and when element have border. + return zrUtil.map(points, function (point) { + var x = point[0]; + x = mathMax(x, rect.x); + x = mathMin(x, rect.x + rect.width); + var y = point[1]; + y = mathMax(y, rect.y); + y = mathMin(y, rect.y + rect.height); + return [x, y]; + }); +} +/** + * @param {Object} targetRect {x, y, width, height} + * @param {Object} rect {x, y, width, height} + * @return {Object} A new clipped rect. If rect size are negative, return undefined. + */ + + +function clipRectByRect(targetRect, rect) { + var x = mathMax(targetRect.x, rect.x); + var x2 = mathMin(targetRect.x + targetRect.width, rect.x + rect.width); + var y = mathMax(targetRect.y, rect.y); + var y2 = mathMin(targetRect.y + targetRect.height, rect.y + rect.height); // If the total rect is cliped, nothing, including the border, + // should be painted. So return undefined. + + if (x2 >= x && y2 >= y) { + return { + x: x, + y: y, + width: x2 - x, + height: y2 - y + }; + } +} +/** + * @param {string} iconStr Support 'image://' or 'path://' or direct svg path. + * @param {Object} [opt] Properties of `module:zrender/Element`, except `style`. + * @param {Object} [rect] {x, y, width, height} + * @return {module:zrender/Element} Icon path or image element. + */ + + +function createIcon(iconStr, opt, rect) { + opt = zrUtil.extend({ + rectHover: true + }, opt); + var style = opt.style = { + strokeNoScale: true + }; + rect = rect || { + x: -1, + y: -1, + width: 2, + height: 2 + }; + + if (iconStr) { + return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), zrUtil.defaults(style, rect), new ZImage(opt)) : makePath(iconStr.replace('path://', ''), opt, rect, 'center'); + } +} +/** + * Return `true` if the given line (line `a`) and the given polygon + * are intersect. + * Note that we do not count colinear as intersect here because no + * requirement for that. We could do that if required in future. + * + * @param {number} a1x + * @param {number} a1y + * @param {number} a2x + * @param {number} a2y + * @param {Array.>} points Points of the polygon. + * @return {boolean} + */ + + +function linePolygonIntersect(a1x, a1y, a2x, a2y, points) { + for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) { + var p = points[i]; + + if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) { + return true; + } + + p2 = p; + } +} +/** + * Return `true` if the given two lines (line `a` and line `b`) + * are intersect. + * Note that we do not count colinear as intersect here because no + * requirement for that. We could do that if required in future. + * + * @param {number} a1x + * @param {number} a1y + * @param {number} a2x + * @param {number} a2y + * @param {number} b1x + * @param {number} b1y + * @param {number} b2x + * @param {number} b2y + * @return {boolean} + */ + + +function lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { + // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`. + var mx = a2x - a1x; + var my = a2y - a1y; + var nx = b2x - b1x; + var ny = b2y - b1y; // `vec_m` and `vec_n` are parallel iff + // exising `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`. + + var nmCrossProduct = crossProduct2d(nx, ny, mx, my); + + if (nearZero(nmCrossProduct)) { + return false; + } // `vec_m` and `vec_n` are intersect iff + // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`, + // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)` + // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`. + + + var b1a1x = a1x - b1x; + var b1a1y = a1y - b1y; + var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct; + + if (q < 0 || q > 1) { + return false; + } + + var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct; + + if (p < 0 || p > 1) { + return false; + } + + return true; +} +/** + * Cross product of 2-dimension vector. + */ + + +function crossProduct2d(x1, y1, x2, y2) { + return x1 * y2 - x2 * y1; +} + +function nearZero(val) { + return val <= 1e-6 && val >= -1e-6; +} // Register built-in shapes. These shapes might be overwirtten +// by users, although we do not recommend that. + + +registerShape('circle', Circle); +registerShape('sector', Sector); +registerShape('ring', Ring); +registerShape('polygon', Polygon); +registerShape('polyline', Polyline); +registerShape('rect', Rect); +registerShape('line', Line); +registerShape('bezierCurve', BezierCurve); +registerShape('arc', Arc); +exports.Z2_EMPHASIS_LIFT = Z2_EMPHASIS_LIFT; +exports.CACHED_LABEL_STYLE_PROPERTIES = CACHED_LABEL_STYLE_PROPERTIES; +exports.extendShape = extendShape; +exports.extendPath = extendPath; +exports.registerShape = registerShape; +exports.getShapeClass = getShapeClass; +exports.makePath = makePath; +exports.makeImage = makeImage; +exports.mergePath = mergePath; +exports.resizePath = resizePath; +exports.subPixelOptimizeLine = subPixelOptimizeLine; +exports.subPixelOptimizeRect = subPixelOptimizeRect; +exports.subPixelOptimize = subPixelOptimize; +exports.setElementHoverStyle = setElementHoverStyle; +exports.setHoverStyle = setHoverStyle; +exports.setAsHighDownDispatcher = setAsHighDownDispatcher; +exports.isHighDownDispatcher = isHighDownDispatcher; +exports.getHighlightDigit = getHighlightDigit; +exports.setLabelStyle = setLabelStyle; +exports.modifyLabelStyle = modifyLabelStyle; +exports.setTextStyle = setTextStyle; +exports.setText = setText; +exports.getFont = getFont; +exports.updateProps = updateProps; +exports.initProps = initProps; +exports.getTransform = getTransform; +exports.applyTransform = applyTransform; +exports.transformDirection = transformDirection; +exports.groupTransition = groupTransition; +exports.clipPointsByRect = clipPointsByRect; +exports.clipRectByRect = clipRectByRect; +exports.createIcon = createIcon; +exports.linePolygonIntersect = linePolygonIntersect; +exports.lineLineIntersect = lineLineIntersect; + +/***/ }), + +/***/ "2325": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var eventTool = __webpack_require__("607d"); + +var graphic = __webpack_require__("2306"); + +var throttle = __webpack_require__("88b3"); + +var DataZoomView = __webpack_require__("7dcf"); + +var numberUtil = __webpack_require__("3842"); + +var layout = __webpack_require__("f934"); + +var sliderMove = __webpack_require__("ef6a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var Rect = graphic.Rect; +var linearMap = numberUtil.linearMap; +var asc = numberUtil.asc; +var bind = zrUtil.bind; +var each = zrUtil.each; // Constants + +var DEFAULT_LOCATION_EDGE_GAP = 7; +var DEFAULT_FRAME_BORDER_WIDTH = 1; +var DEFAULT_FILLER_SIZE = 30; +var HORIZONTAL = 'horizontal'; +var VERTICAL = 'vertical'; +var LABEL_GAP = 5; +var SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter']; +var SliderZoomView = DataZoomView.extend({ + type: 'dataZoom.slider', + init: function (ecModel, api) { + /** + * @private + * @type {Object} + */ + this._displayables = {}; + /** + * @private + * @type {string} + */ + + this._orient; + /** + * [0, 100] + * @private + */ + + this._range; + /** + * [coord of the first handle, coord of the second handle] + * @private + */ + + this._handleEnds; + /** + * [length, thick] + * @private + * @type {Array.} + */ + + this._size; + /** + * @private + * @type {number} + */ + + this._handleWidth; + /** + * @private + * @type {number} + */ + + this._handleHeight; + /** + * @private + */ + + this._location; + /** + * @private + */ + + this._dragging; + /** + * @private + */ + + this._dataShadowInfo; + this.api = api; + }, + + /** + * @override + */ + render: function (dataZoomModel, ecModel, api, payload) { + SliderZoomView.superApply(this, 'render', arguments); + throttle.createOrUpdate(this, '_dispatchZoomAction', this.dataZoomModel.get('throttle'), 'fixRate'); + this._orient = dataZoomModel.get('orient'); + + if (this.dataZoomModel.get('show') === false) { + this.group.removeAll(); + return; + } // Notice: this._resetInterval() should not be executed when payload.type + // is 'dataZoom', origin this._range should be maintained, otherwise 'pan' + // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction, + + + if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) { + this._buildView(); + } + + this._updateView(); + }, + + /** + * @override + */ + remove: function () { + SliderZoomView.superApply(this, 'remove', arguments); + throttle.clear(this, '_dispatchZoomAction'); + }, + + /** + * @override + */ + dispose: function () { + SliderZoomView.superApply(this, 'dispose', arguments); + throttle.clear(this, '_dispatchZoomAction'); + }, + _buildView: function () { + var thisGroup = this.group; + thisGroup.removeAll(); + + this._resetLocation(); + + this._resetInterval(); + + var barGroup = this._displayables.barGroup = new graphic.Group(); + + this._renderBackground(); + + this._renderHandle(); + + this._renderDataShadow(); + + thisGroup.add(barGroup); + + this._positionGroup(); + }, + + /** + * @private + */ + _resetLocation: function () { + var dataZoomModel = this.dataZoomModel; + var api = this.api; // If some of x/y/width/height are not specified, + // auto-adapt according to target grid. + + var coordRect = this._findCoordRect(); + + var ecSize = { + width: api.getWidth(), + height: api.getHeight() + }; // Default align by coordinate system rect. + + var positionInfo = this._orient === HORIZONTAL ? { + // Why using 'right', because right should be used in vertical, + // and it is better to be consistent for dealing with position param merge. + right: ecSize.width - coordRect.x - coordRect.width, + top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP, + width: coordRect.width, + height: DEFAULT_FILLER_SIZE + } : { + // vertical + right: DEFAULT_LOCATION_EDGE_GAP, + top: coordRect.y, + width: DEFAULT_FILLER_SIZE, + height: coordRect.height + }; // Do not write back to option and replace value 'ph', because + // the 'ph' value should be recalculated when resize. + + var layoutParams = layout.getLayoutParams(dataZoomModel.option); // Replace the placeholder value. + + zrUtil.each(['right', 'top', 'width', 'height'], function (name) { + if (layoutParams[name] === 'ph') { + layoutParams[name] = positionInfo[name]; + } + }); + var layoutRect = layout.getLayoutRect(layoutParams, ecSize, dataZoomModel.padding); + this._location = { + x: layoutRect.x, + y: layoutRect.y + }; + this._size = [layoutRect.width, layoutRect.height]; + this._orient === VERTICAL && this._size.reverse(); + }, + + /** + * @private + */ + _positionGroup: function () { + var thisGroup = this.group; + var location = this._location; + var orient = this._orient; // Just use the first axis to determine mapping. + + var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel(); + var inverse = targetAxisModel && targetAxisModel.get('inverse'); + var barGroup = this._displayables.barGroup; + var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse; // Transform barGroup. + + barGroup.attr(orient === HORIZONTAL && !inverse ? { + scale: otherAxisInverse ? [1, 1] : [1, -1] + } : orient === HORIZONTAL && inverse ? { + scale: otherAxisInverse ? [-1, 1] : [-1, -1] + } : orient === VERTICAL && !inverse ? { + scale: otherAxisInverse ? [1, -1] : [1, 1], + rotation: Math.PI / 2 // Dont use Math.PI, considering shadow direction. + + } : { + scale: otherAxisInverse ? [-1, -1] : [-1, 1], + rotation: Math.PI / 2 + }); // Position barGroup + + var rect = thisGroup.getBoundingRect([barGroup]); + thisGroup.attr('position', [location.x - rect.x, location.y - rect.y]); + }, + + /** + * @private + */ + _getViewExtent: function () { + return [0, this._size[0]]; + }, + _renderBackground: function () { + var dataZoomModel = this.dataZoomModel; + var size = this._size; + var barGroup = this._displayables.barGroup; + barGroup.add(new Rect({ + silent: true, + shape: { + x: 0, + y: 0, + width: size[0], + height: size[1] + }, + style: { + fill: dataZoomModel.get('backgroundColor') + }, + z2: -40 + })); // Click panel, over shadow, below handles. + + barGroup.add(new Rect({ + shape: { + x: 0, + y: 0, + width: size[0], + height: size[1] + }, + style: { + fill: 'transparent' + }, + z2: 0, + onclick: zrUtil.bind(this._onClickPanelClick, this) + })); + }, + _renderDataShadow: function () { + var info = this._dataShadowInfo = this._prepareDataShadowInfo(); + + if (!info) { + return; + } + + var size = this._size; + var seriesModel = info.series; + var data = seriesModel.getRawData(); + var otherDim = seriesModel.getShadowDim ? seriesModel.getShadowDim() // @see candlestick + : info.otherDim; + + if (otherDim == null) { + return; + } + + var otherDataExtent = data.getDataExtent(otherDim); // Nice extent. + + var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3; + otherDataExtent = [otherDataExtent[0] - otherOffset, otherDataExtent[1] + otherOffset]; + var otherShadowExtent = [0, size[1]]; + var thisShadowExtent = [0, size[0]]; + var areaPoints = [[size[0], 0], [0, 0]]; + var linePoints = []; + var step = thisShadowExtent[1] / (data.count() - 1); + var thisCoord = 0; // Optimize for large data shadow + + var stride = Math.round(data.count() / size[0]); + var lastIsEmpty; + data.each([otherDim], function (value, index) { + if (stride > 0 && index % stride) { + thisCoord += step; + return; + } // FIXME + // Should consider axis.min/axis.max when drawing dataShadow. + // FIXME + // 应该使用统一的空判断?还是在list里进行空判断? + + + var isEmpty = value == null || isNaN(value) || value === ''; // See #4235. + + var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent, otherShadowExtent, true); // Attempt to draw data shadow precisely when there are empty value. + + if (isEmpty && !lastIsEmpty && index) { + areaPoints.push([areaPoints[areaPoints.length - 1][0], 0]); + linePoints.push([linePoints[linePoints.length - 1][0], 0]); + } else if (!isEmpty && lastIsEmpty) { + areaPoints.push([thisCoord, 0]); + linePoints.push([thisCoord, 0]); + } + + areaPoints.push([thisCoord, otherCoord]); + linePoints.push([thisCoord, otherCoord]); + thisCoord += step; + lastIsEmpty = isEmpty; + }); + var dataZoomModel = this.dataZoomModel; // var dataBackgroundModel = dataZoomModel.getModel('dataBackground'); + + this._displayables.barGroup.add(new graphic.Polygon({ + shape: { + points: areaPoints + }, + style: zrUtil.defaults({ + fill: dataZoomModel.get('dataBackgroundColor') + }, dataZoomModel.getModel('dataBackground.areaStyle').getAreaStyle()), + silent: true, + z2: -20 + })); + + this._displayables.barGroup.add(new graphic.Polyline({ + shape: { + points: linePoints + }, + style: dataZoomModel.getModel('dataBackground.lineStyle').getLineStyle(), + silent: true, + z2: -19 + })); + }, + _prepareDataShadowInfo: function () { + var dataZoomModel = this.dataZoomModel; + var showDataShadow = dataZoomModel.get('showDataShadow'); + + if (showDataShadow === false) { + return; + } // Find a representative series. + + + var result; + var ecModel = this.ecModel; + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) { + var seriesModels = dataZoomModel.getAxisProxy(dimNames.name, axisIndex).getTargetSeriesModels(); + zrUtil.each(seriesModels, function (seriesModel) { + if (result) { + return; + } + + if (showDataShadow !== true && zrUtil.indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) { + return; + } + + var thisAxis = ecModel.getComponent(dimNames.axis, axisIndex).axis; + var otherDim = getOtherDim(dimNames.name); + var otherAxisInverse; + var coordSys = seriesModel.coordinateSystem; + + if (otherDim != null && coordSys.getOtherAxis) { + otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse; + } + + otherDim = seriesModel.getData().mapDimension(otherDim); + result = { + thisAxis: thisAxis, + series: seriesModel, + thisDim: dimNames.name, + otherDim: otherDim, + otherAxisInverse: otherAxisInverse + }; + }, this); + }, this); + return result; + }, + _renderHandle: function () { + var displaybles = this._displayables; + var handles = displaybles.handles = []; + var handleLabels = displaybles.handleLabels = []; + var barGroup = this._displayables.barGroup; + var size = this._size; + var dataZoomModel = this.dataZoomModel; + barGroup.add(displaybles.filler = new Rect({ + draggable: true, + cursor: getCursor(this._orient), + drift: bind(this._onDragMove, this, 'all'), + ondragstart: bind(this._showDataInfo, this, true), + ondragend: bind(this._onDragEnd, this), + onmouseover: bind(this._showDataInfo, this, true), + onmouseout: bind(this._showDataInfo, this, false), + style: { + fill: dataZoomModel.get('fillerColor'), + textPosition: 'inside' + } + })); // Frame border. + + barGroup.add(new Rect({ + silent: true, + subPixelOptimize: true, + shape: { + x: 0, + y: 0, + width: size[0], + height: size[1] + }, + style: { + stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'), + lineWidth: DEFAULT_FRAME_BORDER_WIDTH, + fill: 'rgba(0,0,0,0)' + } + })); + each([0, 1], function (handleIndex) { + var path = graphic.createIcon(dataZoomModel.get('handleIcon'), { + cursor: getCursor(this._orient), + draggable: true, + drift: bind(this._onDragMove, this, handleIndex), + ondragend: bind(this._onDragEnd, this), + onmouseover: bind(this._showDataInfo, this, true), + onmouseout: bind(this._showDataInfo, this, false) + }, { + x: -1, + y: 0, + width: 2, + height: 2 + }); + var bRect = path.getBoundingRect(); + this._handleHeight = numberUtil.parsePercent(dataZoomModel.get('handleSize'), this._size[1]); + this._handleWidth = bRect.width / bRect.height * this._handleHeight; + path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle()); + var handleColor = dataZoomModel.get('handleColor'); // Compatitable with previous version + + if (handleColor != null) { + path.style.fill = handleColor; + } + + barGroup.add(handles[handleIndex] = path); + var textStyleModel = dataZoomModel.textStyleModel; + this.group.add(handleLabels[handleIndex] = new graphic.Text({ + silent: true, + invisible: true, + style: { + x: 0, + y: 0, + text: '', + textVerticalAlign: 'middle', + textAlign: 'center', + textFill: textStyleModel.getTextColor(), + textFont: textStyleModel.getFont() + }, + z2: 10 + })); + }, this); + }, + + /** + * @private + */ + _resetInterval: function () { + var range = this._range = this.dataZoomModel.getPercentRange(); + + var viewExtent = this._getViewExtent(); + + this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)]; + }, + + /** + * @private + * @param {(number|string)} handleIndex 0 or 1 or 'all' + * @param {number} delta + * @return {boolean} changed + */ + _updateInterval: function (handleIndex, delta) { + var dataZoomModel = this.dataZoomModel; + var handleEnds = this._handleEnds; + + var viewExtend = this._getViewExtent(); + + var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); + var percentExtent = [0, 100]; + sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null); + var lastRange = this._range; + var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]); + return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1]; + }, + + /** + * @private + */ + _updateView: function (nonRealtime) { + var displaybles = this._displayables; + var handleEnds = this._handleEnds; + var handleInterval = asc(handleEnds.slice()); + var size = this._size; + each([0, 1], function (handleIndex) { + // Handles + var handle = displaybles.handles[handleIndex]; + var handleHeight = this._handleHeight; + handle.attr({ + scale: [handleHeight / 2, handleHeight / 2], + position: [handleEnds[handleIndex], size[1] / 2 - handleHeight / 2] + }); + }, this); // Filler + + displaybles.filler.setShape({ + x: handleInterval[0], + y: 0, + width: handleInterval[1] - handleInterval[0], + height: size[1] + }); + + this._updateDataInfo(nonRealtime); + }, + + /** + * @private + */ + _updateDataInfo: function (nonRealtime) { + var dataZoomModel = this.dataZoomModel; + var displaybles = this._displayables; + var handleLabels = displaybles.handleLabels; + var orient = this._orient; + var labelTexts = ['', '']; // FIXME + // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter) + + if (dataZoomModel.get('showDetail')) { + var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); + + if (axisProxy) { + var axis = axisProxy.getAxisModel().axis; + var range = this._range; + var dataInterval = nonRealtime // See #4434, data and axis are not processed and reset yet in non-realtime mode. + ? axisProxy.calculateDataWindow({ + start: range[0], + end: range[1] + }).valueWindow : axisProxy.getDataValueWindow(); + labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)]; + } + } + + var orderedHandleEnds = asc(this._handleEnds.slice()); + setLabel.call(this, 0); + setLabel.call(this, 1); + + function setLabel(handleIndex) { + // Label + // Text should not transform by barGroup. + // Ignore handlers transform + var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group); + var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform); + var offset = this._handleWidth / 2 + LABEL_GAP; + var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform); + handleLabels[handleIndex].setStyle({ + x: textPoint[0], + y: textPoint[1], + textVerticalAlign: orient === HORIZONTAL ? 'middle' : direction, + textAlign: orient === HORIZONTAL ? direction : 'center', + text: labelTexts[handleIndex] + }); + } + }, + + /** + * @private + */ + _formatLabel: function (value, axis) { + var dataZoomModel = this.dataZoomModel; + var labelFormatter = dataZoomModel.get('labelFormatter'); + var labelPrecision = dataZoomModel.get('labelPrecision'); + + if (labelPrecision == null || labelPrecision === 'auto') { + labelPrecision = axis.getPixelPrecision(); + } + + var valueStr = value == null || isNaN(value) ? '' // FIXME Glue code + : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel(Math.round(value)) // param of toFixed should less then 20. + : value.toFixed(Math.min(labelPrecision, 20)); + return zrUtil.isFunction(labelFormatter) ? labelFormatter(value, valueStr) : zrUtil.isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr; + }, + + /** + * @private + * @param {boolean} showOrHide true: show, false: hide + */ + _showDataInfo: function (showOrHide) { + // Always show when drgging. + showOrHide = this._dragging || showOrHide; + var handleLabels = this._displayables.handleLabels; + handleLabels[0].attr('invisible', !showOrHide); + handleLabels[1].attr('invisible', !showOrHide); + }, + _onDragMove: function (handleIndex, dx, dy, event) { + this._dragging = true; // For mobile device, prevent screen slider on the button. + + eventTool.stop(event.event); // Transform dx, dy to bar coordination. + + var barTransform = this._displayables.barGroup.getLocalTransform(); + + var vertex = graphic.applyTransform([dx, dy], barTransform, true); + + var changed = this._updateInterval(handleIndex, vertex[0]); + + var realtime = this.dataZoomModel.get('realtime'); + + this._updateView(!realtime); // Avoid dispatch dataZoom repeatly but range not changed, + // which cause bad visual effect when progressive enabled. + + + changed && realtime && this._dispatchZoomAction(); + }, + _onDragEnd: function () { + this._dragging = false; + + this._showDataInfo(false); // While in realtime mode and stream mode, dispatch action when + // drag end will cause the whole view rerender, which is unnecessary. + + + var realtime = this.dataZoomModel.get('realtime'); + !realtime && this._dispatchZoomAction(); + }, + _onClickPanelClick: function (e) { + var size = this._size; + + var localPoint = this._displayables.barGroup.transformCoordToLocal(e.offsetX, e.offsetY); + + if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) { + return; + } + + var handleEnds = this._handleEnds; + var center = (handleEnds[0] + handleEnds[1]) / 2; + + var changed = this._updateInterval('all', localPoint[0] - center); + + this._updateView(); + + changed && this._dispatchZoomAction(); + }, + + /** + * This action will be throttled. + * @private + */ + _dispatchZoomAction: function () { + var range = this._range; + this.api.dispatchAction({ + type: 'dataZoom', + from: this.uid, + dataZoomId: this.dataZoomModel.id, + start: range[0], + end: range[1] + }); + }, + + /** + * @private + */ + _findCoordRect: function () { + // Find the grid coresponding to the first axis referred by dataZoom. + var rect; + each(this.getTargetCoordInfo(), function (coordInfoList) { + if (!rect && coordInfoList.length) { + var coordSys = coordInfoList[0].model.coordinateSystem; + rect = coordSys.getRect && coordSys.getRect(); + } + }); + + if (!rect) { + var width = this.api.getWidth(); + var height = this.api.getHeight(); + rect = { + x: width * 0.2, + y: height * 0.2, + width: width * 0.6, + height: height * 0.6 + }; + } + + return rect; + } +}); + +function getOtherDim(thisDim) { + // FIXME + // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好 + var map = { + x: 'y', + y: 'x', + radius: 'angle', + angle: 'radius' + }; + return map[thisDim]; +} + +function getCursor(orient) { + return orient === 'vertical' ? 'ns-resize' : 'ew-resize'; +} + +var _default = SliderZoomView; +module.exports = _default; + +/***/ }), + +/***/ "237f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var List = __webpack_require__("6179"); + +var Graph = __webpack_require__("7368"); + +var linkList = __webpack_require__("31d9"); + +var createDimensions = __webpack_require__("b1d4"); + +var CoordinateSystem = __webpack_require__("2039"); + +var createListFromArray = __webpack_require__("3301"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function _default(nodes, edges, seriesModel, directed, beforeLink) { + // ??? TODO + // support dataset? + var graph = new Graph(directed); + + for (var i = 0; i < nodes.length; i++) { + graph.addNode(zrUtil.retrieve( // Id, name, dataIndex + nodes[i].id, nodes[i].name, i), i); + } + + var linkNameList = []; + var validEdges = []; + var linkCount = 0; + + for (var i = 0; i < edges.length; i++) { + var link = edges[i]; + var source = link.source; + var target = link.target; // addEdge may fail when source or target not exists + + if (graph.addEdge(source, target, linkCount)) { + validEdges.push(link); + linkNameList.push(zrUtil.retrieve(link.id, source + ' > ' + target)); + linkCount++; + } + } + + var coordSys = seriesModel.get('coordinateSystem'); + var nodeData; + + if (coordSys === 'cartesian2d' || coordSys === 'polar') { + nodeData = createListFromArray(nodes, seriesModel); + } else { + var coordSysCtor = CoordinateSystem.get(coordSys); + var coordDimensions = coordSysCtor && coordSysCtor.type !== 'view' ? coordSysCtor.dimensions || [] : []; // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs + // `value` dimension, but graph need `value` dimension. It's better to + // uniform this behavior. + + if (zrUtil.indexOf(coordDimensions, 'value') < 0) { + coordDimensions.concat(['value']); + } + + var dimensionNames = createDimensions(nodes, { + coordDimensions: coordDimensions + }); + nodeData = new List(dimensionNames, seriesModel); + nodeData.initData(nodes); + } + + var edgeData = new List(['value'], seriesModel); + edgeData.initData(validEdges, linkNameList); + beforeLink && beforeLink(nodeData, edgeData); + linkList({ + mainData: nodeData, + struct: graph, + structAttr: 'graph', + datas: { + node: nodeData, + edge: edgeData + }, + datasAttr: { + node: 'data', + edge: 'edgeData' + } + }); // Update dataIndex of nodes and edges because invalid edge may be removed + + graph.update(); + return graph; +} + +module.exports = _default; + +/***/ }), + +/***/ "23cb": +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__("a691"); + +var max = Math.max; +var min = Math.min; + +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). +module.exports = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; + + +/***/ }), + +/***/ "23e0": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var IndicatorAxis = __webpack_require__("7887"); + +var IntervalScale = __webpack_require__("89e3"); + +var numberUtil = __webpack_require__("3842"); + +var _axisHelper = __webpack_require__("697e"); + +var getScaleExtent = _axisHelper.getScaleExtent; +var niceScaleExtent = _axisHelper.niceScaleExtent; + +var CoordinateSystem = __webpack_require__("2039"); + +var LogScale = __webpack_require__("8c2a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO clockwise +function Radar(radarModel, ecModel, api) { + this._model = radarModel; + /** + * Radar dimensions + * @type {Array.} + */ + + this.dimensions = []; + this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) { + var dim = 'indicator_' + idx; + var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale()); + indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis + + indicatorAxis.model = indicatorModel; + indicatorModel.axis = indicatorAxis; + this.dimensions.push(dim); + return indicatorAxis; + }, this); + this.resize(radarModel, api); + /** + * @type {number} + * @readOnly + */ + + this.cx; + /** + * @type {number} + * @readOnly + */ + + this.cy; + /** + * @type {number} + * @readOnly + */ + + this.r; + /** + * @type {number} + * @readOnly + */ + + this.r0; + /** + * @type {number} + * @readOnly + */ + + this.startAngle; +} + +Radar.prototype.getIndicatorAxes = function () { + return this._indicatorAxes; +}; + +Radar.prototype.dataToPoint = function (value, indicatorIndex) { + var indicatorAxis = this._indicatorAxes[indicatorIndex]; + return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex); +}; + +Radar.prototype.coordToPoint = function (coord, indicatorIndex) { + var indicatorAxis = this._indicatorAxes[indicatorIndex]; + var angle = indicatorAxis.angle; + var x = this.cx + coord * Math.cos(angle); + var y = this.cy - coord * Math.sin(angle); + return [x, y]; +}; + +Radar.prototype.pointToData = function (pt) { + var dx = pt[0] - this.cx; + var dy = pt[1] - this.cy; + var radius = Math.sqrt(dx * dx + dy * dy); + dx /= radius; + dy /= radius; + var radian = Math.atan2(-dy, dx); // Find the closest angle + // FIXME index can calculated directly + + var minRadianDiff = Infinity; + var closestAxis; + var closestAxisIdx = -1; + + for (var i = 0; i < this._indicatorAxes.length; i++) { + var indicatorAxis = this._indicatorAxes[i]; + var diff = Math.abs(radian - indicatorAxis.angle); + + if (diff < minRadianDiff) { + closestAxis = indicatorAxis; + closestAxisIdx = i; + minRadianDiff = diff; + } + } + + return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))]; +}; + +Radar.prototype.resize = function (radarModel, api) { + var center = radarModel.get('center'); + var viewWidth = api.getWidth(); + var viewHeight = api.getHeight(); + var viewSize = Math.min(viewWidth, viewHeight) / 2; + this.cx = numberUtil.parsePercent(center[0], viewWidth); + this.cy = numberUtil.parsePercent(center[1], viewHeight); + this.startAngle = radarModel.get('startAngle') * Math.PI / 180; // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']` + + var radius = radarModel.get('radius'); + + if (typeof radius === 'string' || typeof radius === 'number') { + radius = [0, radius]; + } + + this.r0 = numberUtil.parsePercent(radius[0], viewSize); + this.r = numberUtil.parsePercent(radius[1], viewSize); + zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) { + indicatorAxis.setExtent(this.r0, this.r); + var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length; // Normalize to [-PI, PI] + + angle = Math.atan2(Math.sin(angle), Math.cos(angle)); + indicatorAxis.angle = angle; + }, this); +}; + +Radar.prototype.update = function (ecModel, api) { + var indicatorAxes = this._indicatorAxes; + var radarModel = this._model; + zrUtil.each(indicatorAxes, function (indicatorAxis) { + indicatorAxis.scale.setExtent(Infinity, -Infinity); + }); + ecModel.eachSeriesByType('radar', function (radarSeries, idx) { + if (radarSeries.get('coordinateSystem') !== 'radar' || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) { + return; + } + + var data = radarSeries.getData(); + zrUtil.each(indicatorAxes, function (indicatorAxis) { + indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim)); + }); + }, this); + var splitNumber = radarModel.get('splitNumber'); + + function increaseInterval(interval) { + var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval + + var f = interval / exp10; + + if (f === 2) { + f = 5; + } else { + // f is 2 or 5 + f *= 2; + } + + return f * exp10; + } // Force all the axis fixing the maxSplitNumber. + + + zrUtil.each(indicatorAxes, function (indicatorAxis, idx) { + var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent; + niceScaleExtent(indicatorAxis.scale, indicatorAxis.model); + var axisModel = indicatorAxis.model; + var scale = indicatorAxis.scale; + var fixedMin = axisModel.getMin(); + var fixedMax = axisModel.getMax(); + var interval = scale.getInterval(); + + if (fixedMin != null && fixedMax != null) { + // User set min, max, divide to get new interval + scale.setExtent(+fixedMin, +fixedMax); + scale.setInterval((fixedMax - fixedMin) / splitNumber); + } else if (fixedMin != null) { + var max; // User set min, expand extent on the other side + + do { + max = fixedMin + interval * splitNumber; + scale.setExtent(+fixedMin, max); // Interval must been set after extent + // FIXME + + scale.setInterval(interval); + interval = increaseInterval(interval); + } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])); + } else if (fixedMax != null) { + var min; // User set min, expand extent on the other side + + do { + min = fixedMax - interval * splitNumber; + scale.setExtent(min, +fixedMax); + scale.setInterval(interval); + interval = increaseInterval(interval); + } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])); + } else { + var nicedSplitNumber = scale.getTicks().length - 1; + + if (nicedSplitNumber > splitNumber) { + interval = increaseInterval(interval); + } // TODO + + + var max = Math.ceil(rawExtent[1] / interval) * interval; + var min = numberUtil.round(max - interval * splitNumber); + scale.setExtent(min, max); + scale.setInterval(interval); + } + }); +}; +/** + * Radar dimensions is based on the data + * @type {Array} + */ + + +Radar.dimensions = []; + +Radar.create = function (ecModel, api) { + var radarList = []; + ecModel.eachComponent('radar', function (radarModel) { + var radar = new Radar(radarModel, ecModel, api); + radarList.push(radar); + radarModel.coordinateSystem = radar; + }); + ecModel.eachSeriesByType('radar', function (radarSeries) { + if (radarSeries.get('coordinateSystem') === 'radar') { + // Inject coordinate system + radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0]; + } + }); + return radarList; +}; + +CoordinateSystem.register('radar', Radar); +var _default = Radar; +module.exports = _default; + +/***/ }), + +/***/ "23e7": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var getOwnPropertyDescriptor = __webpack_require__("06cf").f; +var createNonEnumerableProperty = __webpack_require__("9112"); +var redefine = __webpack_require__("6eeb"); +var setGlobal = __webpack_require__("ce4e"); +var copyConstructorProperties = __webpack_require__("e893"); +var isForced = __webpack_require__("94ca"); + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target +*/ +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } +}; + + +/***/ }), + +/***/ "23ee": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("879e"); + +__webpack_require__("9704"); + +__webpack_require__("d747"); + +var categoryFilter = __webpack_require__("675a"); + +var visualSymbol = __webpack_require__("7f96"); + +var categoryVisual = __webpack_require__("2943"); + +var edgeVisual = __webpack_require__("de6e"); + +var simpleLayout = __webpack_require__("d357"); + +var circularLayout = __webpack_require__("adda"); + +var forceLayout = __webpack_require__("5866"); + +var createView = __webpack_require__("7b0c"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerProcessor(categoryFilter); +echarts.registerVisual(visualSymbol('graph', 'circle', null)); +echarts.registerVisual(categoryVisual); +echarts.registerVisual(edgeVisual); +echarts.registerLayout(simpleLayout); +echarts.registerLayout(echarts.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout); +echarts.registerLayout(forceLayout); // Graph view coordinate system + +echarts.registerCoordinateSystem('graphView', { + create: createView +}); + +/***/ }), + +/***/ "241c": +/***/ (function(module, exports, __webpack_require__) { + +var internalObjectKeys = __webpack_require__("ca84"); +var enumBugKeys = __webpack_require__("7839"); + +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + +// `Object.getOwnPropertyNames` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertynames +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ "2449": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var env = __webpack_require__("22d1"); + +var modelUtil = __webpack_require__("e0d3"); + +var formatUtil = __webpack_require__("eda2"); + +var dataFormatMixin = __webpack_require__("38a2"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var addCommas = formatUtil.addCommas; +var encodeHTML = formatUtil.encodeHTML; + +function fillLabel(opt) { + modelUtil.defaultEmphasis(opt, 'label', ['show']); +} + +var MarkerModel = echarts.extendComponentModel({ + type: 'marker', + dependencies: ['series', 'grid', 'polar', 'geo'], + + /** + * @overrite + */ + init: function (option, parentModel, ecModel) { + this.mergeDefaultAndTheme(option, ecModel); + + this._mergeOption(option, ecModel, false, true); + }, + + /** + * @return {boolean} + */ + isAnimationEnabled: function () { + if (env.node) { + return false; + } + + var hostSeries = this.__hostSeries; + return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled(); + }, + + /** + * @overrite + */ + mergeOption: function (newOpt, ecModel) { + this._mergeOption(newOpt, ecModel, false, false); + }, + _mergeOption: function (newOpt, ecModel, createdBySelf, isInit) { + var MarkerModel = this.constructor; + var modelPropName = this.mainType + 'Model'; + + if (!createdBySelf) { + ecModel.eachSeries(function (seriesModel) { + var markerOpt = seriesModel.get(this.mainType, true); + var markerModel = seriesModel[modelPropName]; + + if (!markerOpt || !markerOpt.data) { + seriesModel[modelPropName] = null; + return; + } + + if (!markerModel) { + if (isInit) { + // Default label emphasis `position` and `show` + fillLabel(markerOpt); + } + + zrUtil.each(markerOpt.data, function (item) { + // FIXME Overwrite fillLabel method ? + if (item instanceof Array) { + fillLabel(item[0]); + fillLabel(item[1]); + } else { + fillLabel(item); + } + }); + markerModel = new MarkerModel(markerOpt, this, ecModel); + zrUtil.extend(markerModel, { + mainType: this.mainType, + // Use the same series index and name + seriesIndex: seriesModel.seriesIndex, + name: seriesModel.name, + createdBySelf: true + }); + markerModel.__hostSeries = seriesModel; + } else { + markerModel._mergeOption(markerOpt, ecModel, true); + } + + seriesModel[modelPropName] = markerModel; + }, this); + } + }, + formatTooltip: function (dataIndex) { + var data = this.getData(); + var value = this.getRawValue(dataIndex); + var formattedValue = zrUtil.isArray(value) ? zrUtil.map(value, addCommas).join(', ') : addCommas(value); + var name = data.getName(dataIndex); + var html = encodeHTML(this.name); + + if (value != null || name) { + html += '
'; + } + + if (name) { + html += encodeHTML(name); + + if (value != null) { + html += ' : '; + } + } + + if (value != null) { + html += encodeHTML(formattedValue); + } + + return html; + }, + getData: function () { + return this._data; + }, + setData: function (data) { + this._data = data; + } +}); +zrUtil.mixin(MarkerModel, dataFormatMixin); +var _default = MarkerModel; +module.exports = _default; + +/***/ }), + +/***/ "24b9": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var layout = __webpack_require__("f934"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; +var linearMap = _number.linearMap; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function getViewRect(seriesModel, api) { + return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + }); +} + +function getSortedIndices(data, sort) { + var valueDim = data.mapDimension('value'); + var valueArr = data.mapArray(valueDim, function (val) { + return val; + }); + var indices = []; + var isAscending = sort === 'ascending'; + + for (var i = 0, len = data.count(); i < len; i++) { + indices[i] = i; + } // Add custom sortable function & none sortable opetion by "options.sort" + + + if (typeof sort === 'function') { + indices.sort(sort); + } else if (sort !== 'none') { + indices.sort(function (a, b) { + return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a]; + }); + } + + return indices; +} + +function labelLayout(data) { + data.each(function (idx) { + var itemModel = data.getItemModel(idx); + var labelModel = itemModel.getModel('label'); + var labelPosition = labelModel.get('position'); + var labelLineModel = itemModel.getModel('labelLine'); + var layout = data.getItemLayout(idx); + var points = layout.points; + var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight'; + var textAlign; + var textX; + var textY; + var linePoints; + + if (isLabelInside) { + if (labelPosition === 'insideLeft') { + textX = (points[0][0] + points[3][0]) / 2 + 5; + textY = (points[0][1] + points[3][1]) / 2; + textAlign = 'left'; + } else if (labelPosition === 'insideRight') { + textX = (points[1][0] + points[2][0]) / 2 - 5; + textY = (points[1][1] + points[2][1]) / 2; + textAlign = 'right'; + } else { + textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4; + textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4; + textAlign = 'center'; + } + + linePoints = [[textX, textY], [textX, textY]]; + } else { + var x1; + var y1; + var x2; + var labelLineLen = labelLineModel.get('length'); + + if (labelPosition === 'left') { + // Left side + x1 = (points[3][0] + points[0][0]) / 2; + y1 = (points[3][1] + points[0][1]) / 2; + x2 = x1 - labelLineLen; + textX = x2 - 5; + textAlign = 'right'; + } else if (labelPosition === 'right') { + // Right side + x1 = (points[1][0] + points[2][0]) / 2; + y1 = (points[1][1] + points[2][1]) / 2; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'left'; + } else if (labelPosition === 'rightTop') { + // RightTop side + x1 = points[1][0]; + y1 = points[1][1]; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'top'; + } else if (labelPosition === 'rightBottom') { + // RightBottom side + x1 = points[2][0]; + y1 = points[2][1]; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'bottom'; + } else if (labelPosition === 'leftTop') { + // LeftTop side + x1 = points[0][0]; + y1 = points[1][1]; + x2 = x1 - labelLineLen; + textX = x2 - 5; + textAlign = 'right'; + } else if (labelPosition === 'leftBottom') { + // LeftBottom side + x1 = points[3][0]; + y1 = points[2][1]; + x2 = x1 - labelLineLen; + textX = x2 - 5; + textAlign = 'right'; + } else { + // Right side + x1 = (points[1][0] + points[2][0]) / 2; + y1 = (points[1][1] + points[2][1]) / 2; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'left'; + } + + var y2 = y1; + linePoints = [[x1, y1], [x2, y2]]; + textY = y2; + } + + layout.label = { + linePoints: linePoints, + x: textX, + y: textY, + verticalAlign: 'middle', + textAlign: textAlign, + inside: isLabelInside + }; + }); +} + +function _default(ecModel, api, payload) { + ecModel.eachSeriesByType('funnel', function (seriesModel) { + var data = seriesModel.getData(); + var valueDim = data.mapDimension('value'); + var sort = seriesModel.get('sort'); + var viewRect = getViewRect(seriesModel, api); + var indices = getSortedIndices(data, sort); + var sizeExtent = [parsePercent(seriesModel.get('minSize'), viewRect.width), parsePercent(seriesModel.get('maxSize'), viewRect.width)]; + var dataExtent = data.getDataExtent(valueDim); + var min = seriesModel.get('min'); + var max = seriesModel.get('max'); + + if (min == null) { + min = Math.min(dataExtent[0], 0); + } + + if (max == null) { + max = dataExtent[1]; + } + + var funnelAlign = seriesModel.get('funnelAlign'); + var gap = seriesModel.get('gap'); + var itemHeight = (viewRect.height - gap * (data.count() - 1)) / data.count(); + var y = viewRect.y; + + var getLinePoints = function (idx, offY) { + // End point index is data.count() and we assign it 0 + var val = data.get(valueDim, idx) || 0; + var itemWidth = linearMap(val, [min, max], sizeExtent, true); + var x0; + + switch (funnelAlign) { + case 'left': + x0 = viewRect.x; + break; + + case 'center': + x0 = viewRect.x + (viewRect.width - itemWidth) / 2; + break; + + case 'right': + x0 = viewRect.x + viewRect.width - itemWidth; + break; + } + + return [[x0, offY], [x0 + itemWidth, offY]]; + }; + + if (sort === 'ascending') { + // From bottom to top + itemHeight = -itemHeight; + gap = -gap; + y += viewRect.height; + indices = indices.reverse(); + } + + for (var i = 0; i < indices.length; i++) { + var idx = indices[i]; + var nextIdx = indices[i + 1]; + var itemModel = data.getItemModel(idx); + var height = itemModel.get('itemStyle.height'); + + if (height == null) { + height = itemHeight; + } else { + height = parsePercent(height, viewRect.height); + + if (sort === 'ascending') { + height = -height; + } + } + + var start = getLinePoints(idx, y); + var end = getLinePoints(nextIdx, y + height); + y += height + gap; + data.setItemLayout(idx, { + points: start.concat(end.slice().reverse()) + }); + } + + labelLayout(data); + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "255c": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var _poly = __webpack_require__("d4d1"); + +var Polygon = _poly.Polygon; + +var graphic = __webpack_require__("2306"); + +var _util = __webpack_require__("6d8b"); + +var bind = _util.bind; +var extend = _util.extend; + +var DataDiffer = __webpack_require__("80f0"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = echarts.extendChartView({ + type: 'themeRiver', + init: function () { + this._layers = []; + }, + render: function (seriesModel, ecModel, api) { + var data = seriesModel.getData(); + var group = this.group; + var layerSeries = seriesModel.getLayerSeries(); + var layoutInfo = data.getLayout('layoutInfo'); + var rect = layoutInfo.rect; + var boundaryGap = layoutInfo.boundaryGap; + group.attr('position', [0, rect.y + boundaryGap[0]]); + + function keyGetter(item) { + return item.name; + } + + var dataDiffer = new DataDiffer(this._layersSeries || [], layerSeries, keyGetter, keyGetter); + var newLayersGroups = {}; + dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute(); + + function process(status, idx, oldIdx) { + var oldLayersGroups = this._layers; + + if (status === 'remove') { + group.remove(oldLayersGroups[idx]); + return; + } + + var points0 = []; + var points1 = []; + var color; + var indices = layerSeries[idx].indices; + + for (var j = 0; j < indices.length; j++) { + var layout = data.getItemLayout(indices[j]); + var x = layout.x; + var y0 = layout.y0; + var y = layout.y; + points0.push([x, y0]); + points1.push([x, y0 + y]); + color = data.getItemVisual(indices[j], 'color'); + } + + var polygon; + var text; + var textLayout = data.getItemLayout(indices[0]); + var itemModel = data.getItemModel(indices[j - 1]); + var labelModel = itemModel.getModel('label'); + var margin = labelModel.get('margin'); + + if (status === 'add') { + var layerGroup = newLayersGroups[idx] = new graphic.Group(); + polygon = new Polygon({ + shape: { + points: points0, + stackedOnPoints: points1, + smooth: 0.4, + stackedOnSmooth: 0.4, + smoothConstraint: false + }, + z2: 0 + }); + text = new graphic.Text({ + style: { + x: textLayout.x - margin, + y: textLayout.y0 + textLayout.y / 2 + } + }); + layerGroup.add(polygon); + layerGroup.add(text); + group.add(layerGroup); + polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () { + polygon.removeClipPath(); + })); + } else { + var layerGroup = oldLayersGroups[oldIdx]; + polygon = layerGroup.childAt(0); + text = layerGroup.childAt(1); + group.add(layerGroup); + newLayersGroups[idx] = layerGroup; + graphic.updateProps(polygon, { + shape: { + points: points0, + stackedOnPoints: points1 + } + }, seriesModel); + graphic.updateProps(text, { + style: { + x: textLayout.x - margin, + y: textLayout.y0 + textLayout.y / 2 + } + }, seriesModel); + } + + var hoverItemStyleModel = itemModel.getModel('emphasis.itemStyle'); + var itemStyleModel = itemModel.getModel('itemStyle'); + graphic.setTextStyle(text.style, labelModel, { + text: labelModel.get('show') ? seriesModel.getFormattedLabel(indices[j - 1], 'normal') || data.getName(indices[j - 1]) : null, + textVerticalAlign: 'middle' + }); + polygon.setStyle(extend({ + fill: color + }, itemStyleModel.getItemStyle(['color']))); + graphic.setHoverStyle(polygon, hoverItemStyleModel.getItemStyle()); + } + + this._layersSeries = layerSeries; + this._layers = newLayersGroups; + }, + dispose: function () {} +}); // add animation to the view + + +function createGridClipShape(rect, seriesModel, cb) { + var rectEl = new graphic.Rect({ + shape: { + x: rect.x - 10, + y: rect.y - 10, + width: 0, + height: rect.height + 20 + } + }); + graphic.initProps(rectEl, { + shape: { + width: rect.width + 20, + height: rect.height + 20 + } + }, seriesModel, cb); + return rectEl; +} + +module.exports = _default; + +/***/ }), + +/***/ "25f0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefine = __webpack_require__("6eeb"); +var anObject = __webpack_require__("825a"); +var fails = __webpack_require__("d039"); +var flags = __webpack_require__("ad6d"); + +var TO_STRING = 'toString'; +var RegExpPrototype = RegExp.prototype; +var nativeToString = RegExpPrototype[TO_STRING]; + +var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); +// FF44- RegExp#toString has a wrong name +var INCORRECT_NAME = nativeToString.name != TO_STRING; + +// `RegExp.prototype.toString` method +// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring +if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = String(R.source); + var rf = R.flags; + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); +} + + +/***/ }), + +/***/ "2626": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var getBuiltIn = __webpack_require__("d066"); +var definePropertyModule = __webpack_require__("9bf2"); +var wellKnownSymbol = __webpack_require__("b622"); +var DESCRIPTORS = __webpack_require__("83ab"); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = definePropertyModule.f; + + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineProperty(Constructor, SPECIES, { + configurable: true, + get: function () { return this; } + }); + } +}; + + +/***/ }), + +/***/ "26e1": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var modelUtil = __webpack_require__("e0d3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var each = zrUtil.each; +var isObject = zrUtil.isObject; +var POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine']; + +function compatEC2ItemStyle(opt) { + var itemStyleOpt = opt && opt.itemStyle; + + if (!itemStyleOpt) { + return; + } + + for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) { + var styleName = POSSIBLE_STYLES[i]; + var normalItemStyleOpt = itemStyleOpt.normal; + var emphasisItemStyleOpt = itemStyleOpt.emphasis; + + if (normalItemStyleOpt && normalItemStyleOpt[styleName]) { + opt[styleName] = opt[styleName] || {}; + + if (!opt[styleName].normal) { + opt[styleName].normal = normalItemStyleOpt[styleName]; + } else { + zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]); + } + + normalItemStyleOpt[styleName] = null; + } + + if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) { + opt[styleName] = opt[styleName] || {}; + + if (!opt[styleName].emphasis) { + opt[styleName].emphasis = emphasisItemStyleOpt[styleName]; + } else { + zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]); + } + + emphasisItemStyleOpt[styleName] = null; + } + } +} + +function convertNormalEmphasis(opt, optType, useExtend) { + if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) { + var normalOpt = opt[optType].normal; + var emphasisOpt = opt[optType].emphasis; + + if (normalOpt) { + // Timeline controlStyle has other properties besides normal and emphasis + if (useExtend) { + opt[optType].normal = opt[optType].emphasis = null; + zrUtil.defaults(opt[optType], normalOpt); + } else { + opt[optType] = normalOpt; + } + } + + if (emphasisOpt) { + opt.emphasis = opt.emphasis || {}; + opt.emphasis[optType] = emphasisOpt; + } + } +} + +function removeEC3NormalStatus(opt) { + convertNormalEmphasis(opt, 'itemStyle'); + convertNormalEmphasis(opt, 'lineStyle'); + convertNormalEmphasis(opt, 'areaStyle'); + convertNormalEmphasis(opt, 'label'); + convertNormalEmphasis(opt, 'labelLine'); // treemap + + convertNormalEmphasis(opt, 'upperLabel'); // graph + + convertNormalEmphasis(opt, 'edgeLabel'); +} + +function compatTextStyle(opt, propName) { + // Check whether is not object (string\null\undefined ...) + var labelOptSingle = isObject(opt) && opt[propName]; + var textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle; + + if (textStyle) { + for (var i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) { + var propName = modelUtil.TEXT_STYLE_OPTIONS[i]; + + if (textStyle.hasOwnProperty(propName)) { + labelOptSingle[propName] = textStyle[propName]; + } + } + } +} + +function compatEC3CommonStyles(opt) { + if (opt) { + removeEC3NormalStatus(opt); + compatTextStyle(opt, 'label'); + opt.emphasis && compatTextStyle(opt.emphasis, 'label'); + } +} + +function processSeries(seriesOpt) { + if (!isObject(seriesOpt)) { + return; + } + + compatEC2ItemStyle(seriesOpt); + removeEC3NormalStatus(seriesOpt); + compatTextStyle(seriesOpt, 'label'); // treemap + + compatTextStyle(seriesOpt, 'upperLabel'); // graph + + compatTextStyle(seriesOpt, 'edgeLabel'); + + if (seriesOpt.emphasis) { + compatTextStyle(seriesOpt.emphasis, 'label'); // treemap + + compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph + + compatTextStyle(seriesOpt.emphasis, 'edgeLabel'); + } + + var markPoint = seriesOpt.markPoint; + + if (markPoint) { + compatEC2ItemStyle(markPoint); + compatEC3CommonStyles(markPoint); + } + + var markLine = seriesOpt.markLine; + + if (markLine) { + compatEC2ItemStyle(markLine); + compatEC3CommonStyles(markLine); + } + + var markArea = seriesOpt.markArea; + + if (markArea) { + compatEC3CommonStyles(markArea); + } + + var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option, + // then the backward compat based on option type will not be performed. + + if (seriesOpt.type === 'graph') { + data = data || seriesOpt.nodes; + var edgeData = seriesOpt.links || seriesOpt.edges; + + if (edgeData && !zrUtil.isTypedArray(edgeData)) { + for (var i = 0; i < edgeData.length; i++) { + compatEC3CommonStyles(edgeData[i]); + } + } + + zrUtil.each(seriesOpt.categories, function (opt) { + removeEC3NormalStatus(opt); + }); + } + + if (data && !zrUtil.isTypedArray(data)) { + for (var i = 0; i < data.length; i++) { + compatEC3CommonStyles(data[i]); + } + } // mark point data + + + var markPoint = seriesOpt.markPoint; + + if (markPoint && markPoint.data) { + var mpData = markPoint.data; + + for (var i = 0; i < mpData.length; i++) { + compatEC3CommonStyles(mpData[i]); + } + } // mark line data + + + var markLine = seriesOpt.markLine; + + if (markLine && markLine.data) { + var mlData = markLine.data; + + for (var i = 0; i < mlData.length; i++) { + if (zrUtil.isArray(mlData[i])) { + compatEC3CommonStyles(mlData[i][0]); + compatEC3CommonStyles(mlData[i][1]); + } else { + compatEC3CommonStyles(mlData[i]); + } + } + } // Series + + + if (seriesOpt.type === 'gauge') { + compatTextStyle(seriesOpt, 'axisLabel'); + compatTextStyle(seriesOpt, 'title'); + compatTextStyle(seriesOpt, 'detail'); + } else if (seriesOpt.type === 'treemap') { + convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle'); + zrUtil.each(seriesOpt.levels, function (opt) { + removeEC3NormalStatus(opt); + }); + } else if (seriesOpt.type === 'tree') { + removeEC3NormalStatus(seriesOpt.leaves); + } // sunburst starts from ec4, so it does not need to compat levels. + +} + +function toArr(o) { + return zrUtil.isArray(o) ? o : o ? [o] : []; +} + +function toObj(o) { + return (zrUtil.isArray(o) ? o[0] : o) || {}; +} + +function _default(option, isTheme) { + each(toArr(option.series), function (seriesOpt) { + isObject(seriesOpt) && processSeries(seriesOpt); + }); + var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar']; + isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis'); + each(axes, function (axisName) { + each(toArr(option[axisName]), function (axisOpt) { + if (axisOpt) { + compatTextStyle(axisOpt, 'axisLabel'); + compatTextStyle(axisOpt.axisPointer, 'label'); + } + }); + }); + each(toArr(option.parallel), function (parallelOpt) { + var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault; + compatTextStyle(parallelAxisDefault, 'axisLabel'); + compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label'); + }); + each(toArr(option.calendar), function (calendarOpt) { + convertNormalEmphasis(calendarOpt, 'itemStyle'); + compatTextStyle(calendarOpt, 'dayLabel'); + compatTextStyle(calendarOpt, 'monthLabel'); + compatTextStyle(calendarOpt, 'yearLabel'); + }); // radar.name.textStyle + + each(toArr(option.radar), function (radarOpt) { + compatTextStyle(radarOpt, 'name'); + }); + each(toArr(option.geo), function (geoOpt) { + if (isObject(geoOpt)) { + compatEC3CommonStyles(geoOpt); + each(toArr(geoOpt.regions), function (regionObj) { + compatEC3CommonStyles(regionObj); + }); + } + }); + each(toArr(option.timeline), function (timelineOpt) { + compatEC3CommonStyles(timelineOpt); + convertNormalEmphasis(timelineOpt, 'label'); + convertNormalEmphasis(timelineOpt, 'itemStyle'); + convertNormalEmphasis(timelineOpt, 'controlStyle', true); + var data = timelineOpt.data; + zrUtil.isArray(data) && zrUtil.each(data, function (item) { + if (zrUtil.isObject(item)) { + convertNormalEmphasis(item, 'label'); + convertNormalEmphasis(item, 'itemStyle'); + } + }); + }); + each(toArr(option.toolbox), function (toolboxOpt) { + convertNormalEmphasis(toolboxOpt, 'iconStyle'); + each(toolboxOpt.feature, function (featureOpt) { + convertNormalEmphasis(featureOpt, 'iconStyle'); + }); + }); + compatTextStyle(toObj(option.axisPointer), 'label'); + compatTextStyle(toObj(option.tooltip).axisPointer, 'label'); +} + +module.exports = _default; + +/***/ }), + +/***/ "282b": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO Parse shadow style +// TODO Only shallow path support +function _default(properties) { + // Normalize + for (var i = 0; i < properties.length; i++) { + if (!properties[i][1]) { + properties[i][1] = properties[i][0]; + } + } + + return function (model, excludes, includes) { + var style = {}; + + for (var i = 0; i < properties.length; i++) { + var propName = properties[i][1]; + + if (excludes && zrUtil.indexOf(excludes, propName) >= 0 || includes && zrUtil.indexOf(includes, propName) < 0) { + continue; + } + + var val = model.getShallow(propName); + + if (val != null) { + style[properties[i][0]] = val; + } + } + + return style; + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "2877": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent ( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier, /* server only */ + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { + injectStyles.call( + this, + (options.functional ? this.parent : this).$root.$options.shadowRoot + ) + } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + + +/***/ }), + +/***/ "292e": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; +var linearMap = _number.linearMap; + +var layout = __webpack_require__("f934"); + +var labelLayout = __webpack_require__("bb70"); + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var PI2 = Math.PI * 2; +var RADIAN = Math.PI / 180; + +function getViewRect(seriesModel, api) { + return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + }); +} + +function _default(seriesType, ecModel, api, payload) { + ecModel.eachSeriesByType(seriesType, function (seriesModel) { + var data = seriesModel.getData(); + var valueDim = data.mapDimension('value'); + var viewRect = getViewRect(seriesModel, api); + var center = seriesModel.get('center'); + var radius = seriesModel.get('radius'); + + if (!zrUtil.isArray(radius)) { + radius = [0, radius]; + } + + if (!zrUtil.isArray(center)) { + center = [center, center]; + } + + var width = parsePercent(viewRect.width, api.getWidth()); + var height = parsePercent(viewRect.height, api.getHeight()); + var size = Math.min(width, height); + var cx = parsePercent(center[0], width) + viewRect.x; + var cy = parsePercent(center[1], height) + viewRect.y; + var r0 = parsePercent(radius[0], size / 2); + var r = parsePercent(radius[1], size / 2); + var startAngle = -seriesModel.get('startAngle') * RADIAN; + var minAngle = seriesModel.get('minAngle') * RADIAN; + var validDataCount = 0; + data.each(valueDim, function (value) { + !isNaN(value) && validDataCount++; + }); + var sum = data.getSum(valueDim); // Sum may be 0 + + var unitRadian = Math.PI / (sum || validDataCount) * 2; + var clockwise = seriesModel.get('clockwise'); + var roseType = seriesModel.get('roseType'); + var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max] + + var extent = data.getDataExtent(valueDim); + extent[0] = 0; // In the case some sector angle is smaller than minAngle + + var restAngle = PI2; + var valueSumLargerThanMinAngle = 0; + var currentAngle = startAngle; + var dir = clockwise ? 1 : -1; + data.each(valueDim, function (value, idx) { + var angle; + + if (isNaN(value)) { + data.setItemLayout(idx, { + angle: NaN, + startAngle: NaN, + endAngle: NaN, + clockwise: clockwise, + cx: cx, + cy: cy, + r0: r0, + r: roseType ? NaN : r, + viewRect: viewRect + }); + return; + } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样? + + + if (roseType !== 'area') { + angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian; + } else { + angle = PI2 / validDataCount; + } + + if (angle < minAngle) { + angle = minAngle; + restAngle -= minAngle; + } else { + valueSumLargerThanMinAngle += value; + } + + var endAngle = currentAngle + dir * angle; + data.setItemLayout(idx, { + angle: angle, + startAngle: currentAngle, + endAngle: endAngle, + clockwise: clockwise, + cx: cx, + cy: cy, + r0: r0, + r: roseType ? linearMap(value, extent, [r0, r]) : r, + viewRect: viewRect + }); + currentAngle = endAngle; + }); // Some sector is constrained by minAngle + // Rest sectors needs recalculate angle + + if (restAngle < PI2 && validDataCount) { + // Average the angle if rest angle is not enough after all angles is + // Constrained by minAngle + if (restAngle <= 1e-3) { + var angle = PI2 / validDataCount; + data.each(valueDim, function (value, idx) { + if (!isNaN(value)) { + var layout = data.getItemLayout(idx); + layout.angle = angle; + layout.startAngle = startAngle + dir * idx * angle; + layout.endAngle = startAngle + dir * (idx + 1) * angle; + } + }); + } else { + unitRadian = restAngle / valueSumLargerThanMinAngle; + currentAngle = startAngle; + data.each(valueDim, function (value, idx) { + if (!isNaN(value)) { + var layout = data.getItemLayout(idx); + var angle = layout.angle === minAngle ? minAngle : value * unitRadian; + layout.startAngle = currentAngle; + layout.endAngle = currentAngle + dir * angle; + currentAngle += dir * angle; + } + }); + } + } + + labelLayout(seriesModel, r, viewRect.width, viewRect.height, viewRect.x, viewRect.y); + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "2943": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function _default(ecModel) { + var paletteScope = {}; + ecModel.eachSeriesByType('graph', function (seriesModel) { + var categoriesData = seriesModel.getCategoriesData(); + var data = seriesModel.getData(); + var categoryNameIdxMap = {}; + categoriesData.each(function (idx) { + var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype. + + categoryNameIdxMap['ec-' + name] = idx; + var itemModel = categoriesData.getItemModel(idx); + var color = itemModel.get('itemStyle.color') || seriesModel.getColorFromPalette(name, paletteScope); + categoriesData.setItemVisual(idx, 'color', color); + var itemStyleList = ['opacity', 'symbol', 'symbolSize', 'symbolKeepAspect']; + + for (var i = 0; i < itemStyleList.length; i++) { + var itemStyle = itemModel.getShallow(itemStyleList[i], true); + + if (itemStyle != null) { + categoriesData.setItemVisual(idx, itemStyleList[i], itemStyle); + } + } + }); // Assign category color to visual + + if (categoriesData.count()) { + data.each(function (idx) { + var model = data.getItemModel(idx); + var category = model.getShallow('category'); + + if (category != null) { + if (typeof category === 'string') { + category = categoryNameIdxMap['ec-' + category]; + } + + var itemStyleList = ['color', 'opacity', 'symbol', 'symbolSize', 'symbolKeepAspect']; + + for (var i = 0; i < itemStyleList.length; i++) { + if (data.getItemVisual(idx, itemStyleList[i], true) == null) { + data.setItemVisual(idx, itemStyleList[i], categoriesData.getItemVisual(category, itemStyleList[i])); + } + } + } + }); + } + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "29a8": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Language: (Simplified) Chinese. + */ +var _default = { + 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: '旭日图' + } + }, + 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: '' + } + } + } +}; +module.exports = _default; + +/***/ }), + +/***/ "29a9": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var preprocessor = __webpack_require__("b336"); + +__webpack_require__("bc5f"); + +__webpack_require__("ab05"); + +__webpack_require__("06ea"); + +__webpack_require__("004f"); + +__webpack_require__("d6ef"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * DataZoom component entry + */ +echarts.registerPreprocessor(preprocessor); + +/***/ }), + +/***/ "2b17": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var _util = __webpack_require__("6d8b"); + +var isTypedArray = _util.isTypedArray; +var extend = _util.extend; +var assert = _util.assert; +var each = _util.each; +var isObject = _util.isObject; + +var _model = __webpack_require__("e0d3"); + +var getDataItemValue = _model.getDataItemValue; +var isDataItemOption = _model.isDataItemOption; + +var _number = __webpack_require__("3842"); + +var parseDate = _number.parseDate; + +var Source = __webpack_require__("ec6f"); + +var _sourceType = __webpack_require__("93d0"); + +var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY; +var SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS; +var SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL; +var SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO +// ??? refactor? check the outer usage of data provider. +// merge with defaultDimValueGetter? + +/** + * If normal array used, mutable chunk size is supported. + * If typed array used, chunk size must be fixed. + */ +function DefaultDataProvider(source, dimSize) { + if (!Source.isInstance(source)) { + source = Source.seriesDataToSource(source); + } + + this._source = source; + var data = this._data = source.data; + var sourceFormat = source.sourceFormat; // Typed array. TODO IE10+? + + if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { + this._offset = 0; + this._dimSize = dimSize; + this._data = data; + } + + var methods = providerMethods[sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + source.seriesLayoutBy : sourceFormat]; + extend(this, methods); +} + +var providerProto = DefaultDataProvider.prototype; // If data is pure without style configuration + +providerProto.pure = false; // If data is persistent and will not be released after use. + +providerProto.persistent = true; // ???! FIXME legacy data provider do not has method getSource + +providerProto.getSource = function () { + return this._source; +}; + +var providerMethods = { + 'arrayRows_column': { + pure: true, + count: function () { + return Math.max(0, this._data.length - this._source.startIndex); + }, + getItem: function (idx) { + return this._data[idx + this._source.startIndex]; + }, + appendData: appendDataSimply + }, + 'arrayRows_row': { + pure: true, + count: function () { + var row = this._data[0]; + return row ? Math.max(0, row.length - this._source.startIndex) : 0; + }, + getItem: function (idx) { + idx += this._source.startIndex; + var item = []; + var data = this._data; + + for (var i = 0; i < data.length; i++) { + var row = data[i]; + item.push(row ? row[idx] : null); + } + + return item; + }, + appendData: function () { + throw new Error('Do not support appendData when set seriesLayoutBy: "row".'); + } + }, + 'objectRows': { + pure: true, + count: countSimply, + getItem: getItemSimply, + appendData: appendDataSimply + }, + 'keyedColumns': { + pure: true, + count: function () { + var dimName = this._source.dimensionsDefine[0].name; + var col = this._data[dimName]; + return col ? col.length : 0; + }, + getItem: function (idx) { + var item = []; + var dims = this._source.dimensionsDefine; + + for (var i = 0; i < dims.length; i++) { + var col = this._data[dims[i].name]; + item.push(col ? col[idx] : null); + } + + return item; + }, + appendData: function (newData) { + var data = this._data; + each(newData, function (newCol, key) { + var oldCol = data[key] || (data[key] = []); + + for (var i = 0; i < (newCol || []).length; i++) { + oldCol.push(newCol[i]); + } + }); + } + }, + 'original': { + count: countSimply, + getItem: getItemSimply, + appendData: appendDataSimply + }, + 'typedArray': { + persistent: false, + pure: true, + count: function () { + return this._data ? this._data.length / this._dimSize : 0; + }, + getItem: function (idx, out) { + idx = idx - this._offset; + out = out || []; + var offset = this._dimSize * idx; + + for (var i = 0; i < this._dimSize; i++) { + out[i] = this._data[offset + i]; + } + + return out; + }, + appendData: function (newData) { + this._data = newData; + }, + // Clean self if data is already used. + clean: function () { + // PENDING + this._offset += this.count(); + this._data = null; + } + } +}; + +function countSimply() { + return this._data.length; +} + +function getItemSimply(idx) { + return this._data[idx]; +} + +function appendDataSimply(newData) { + for (var i = 0; i < newData.length; i++) { + this._data.push(newData[i]); + } +} + +var rawValueGetters = { + arrayRows: getRawValueSimply, + objectRows: function (dataItem, dataIndex, dimIndex, dimName) { + return dimIndex != null ? dataItem[dimName] : dataItem; + }, + keyedColumns: getRawValueSimply, + original: function (dataItem, dataIndex, dimIndex, dimName) { + // FIXME + // In some case (markpoint in geo (geo-map.html)), dataItem + // is {coord: [...]} + var value = getDataItemValue(dataItem); + return dimIndex == null || !(value instanceof Array) ? value : value[dimIndex]; + }, + typedArray: getRawValueSimply +}; + +function getRawValueSimply(dataItem, dataIndex, dimIndex, dimName) { + return dimIndex != null ? dataItem[dimIndex] : dataItem; +} + +var defaultDimValueGetters = { + arrayRows: getDimValueSimply, + objectRows: function (dataItem, dimName, dataIndex, dimIndex) { + return converDataValue(dataItem[dimName], this._dimensionInfos[dimName]); + }, + keyedColumns: getDimValueSimply, + original: function (dataItem, dimName, dataIndex, dimIndex) { + // Performance sensitive, do not use modelUtil.getDataItemValue. + // If dataItem is an plain object with no value field, the var `value` + // will be assigned with the object, but it will be tread correctly + // in the `convertDataValue`. + var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value); // If any dataItem is like { value: 10 } + + if (!this._rawData.pure && isDataItemOption(dataItem)) { + this.hasItemOption = true; + } + + return converDataValue(value instanceof Array ? value[dimIndex] // If value is a single number or something else not array. + : value, this._dimensionInfos[dimName]); + }, + typedArray: function (dataItem, dimName, dataIndex, dimIndex) { + return dataItem[dimIndex]; + } +}; + +function getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) { + return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]); +} +/** + * This helper method convert value in data. + * @param {string|number|Date} value + * @param {Object|string} [dimInfo] If string (like 'x'), dimType defaults 'number'. + * If "dimInfo.ordinalParseAndSave", ordinal value can be parsed. + */ + + +function converDataValue(value, dimInfo) { + // Performance sensitive. + var dimType = dimInfo && dimInfo.type; + + if (dimType === 'ordinal') { + // If given value is a category string + var ordinalMeta = dimInfo && dimInfo.ordinalMeta; + return ordinalMeta ? ordinalMeta.parseAndCollect(value) : value; + } + + if (dimType === 'time' // spead up when using timestamp + && typeof value !== 'number' && value != null && value !== '-') { + value = +parseDate(value); + } // dimType defaults 'number'. + // If dimType is not ordinal and value is null or undefined or NaN or '-', + // parse to NaN. + + + return value == null || value === '' ? NaN // If string (like '-'), using '+' parse to NaN + // If object, also parse to NaN + : +value; +} // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem, +// Consider persistent. +// Caution: why use raw value to display on label or tooltip? +// A reason is to avoid format. For example time value we do not know +// how to format is expected. More over, if stack is used, calculated +// value may be 0.91000000001, which have brings trouble to display. +// TODO: consider how to treat null/undefined/NaN when display? + +/** + * @param {module:echarts/data/List} data + * @param {number} dataIndex + * @param {string|number} [dim] dimName or dimIndex + * @return {Array.|string|number} can be null/undefined. + */ + + +function retrieveRawValue(data, dataIndex, dim) { + if (!data) { + return; + } // Consider data may be not persistent. + + + var dataItem = data.getRawDataItem(dataIndex); + + if (dataItem == null) { + return; + } + + var sourceFormat = data.getProvider().getSource().sourceFormat; + var dimName; + var dimIndex; + var dimInfo = data.getDimensionInfo(dim); + + if (dimInfo) { + dimName = dimInfo.name; + dimIndex = dimInfo.index; + } + + return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName); +} +/** + * Compatible with some cases (in pie, map) like: + * data: [{name: 'xx', value: 5, selected: true}, ...] + * where only sourceFormat is 'original' and 'objectRows' supported. + * + * ??? TODO + * Supported detail options in data item when using 'arrayRows'. + * + * @param {module:echarts/data/List} data + * @param {number} dataIndex + * @param {string} attr like 'selected' + */ + + +function retrieveRawAttr(data, dataIndex, attr) { + if (!data) { + return; + } + + var sourceFormat = data.getProvider().getSource().sourceFormat; + + if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) { + return; + } + + var dataItem = data.getRawDataItem(dataIndex); + + if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) { + dataItem = null; + } + + if (dataItem) { + return dataItem[attr]; + } +} + +exports.DefaultDataProvider = DefaultDataProvider; +exports.defaultDimValueGetters = defaultDimValueGetters; +exports.retrieveRawValue = retrieveRawValue; +exports.retrieveRawAttr = retrieveRawAttr; + +/***/ }), + +/***/ "2b61": +/***/ (function(module, exports, __webpack_require__) { + +var fixShadow = __webpack_require__("7d6d"); + +var _constant = __webpack_require__("82eb"); + +var ContextCachedBy = _constant.ContextCachedBy; +var STYLE_COMMON_PROPS = [['shadowBlur', 0], ['shadowOffsetX', 0], ['shadowOffsetY', 0], ['shadowColor', '#000'], ['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10]]; // var SHADOW_PROPS = STYLE_COMMON_PROPS.slice(0, 4); +// var LINE_PROPS = STYLE_COMMON_PROPS.slice(4); + +var Style = function (opts) { + this.extendFrom(opts, false); +}; + +function createLinearGradient(ctx, obj, rect) { + var x = obj.x == null ? 0 : obj.x; + var x2 = obj.x2 == null ? 1 : obj.x2; + var y = obj.y == null ? 0 : obj.y; + var y2 = obj.y2 == null ? 0 : obj.y2; + + if (!obj.global) { + x = x * rect.width + rect.x; + x2 = x2 * rect.width + rect.x; + y = y * rect.height + rect.y; + y2 = y2 * rect.height + rect.y; + } // Fix NaN when rect is Infinity + + + x = isNaN(x) ? 0 : x; + x2 = isNaN(x2) ? 1 : x2; + y = isNaN(y) ? 0 : y; + y2 = isNaN(y2) ? 0 : y2; + var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); + return canvasGradient; +} + +function createRadialGradient(ctx, obj, rect) { + var width = rect.width; + var height = rect.height; + var min = Math.min(width, height); + var x = obj.x == null ? 0.5 : obj.x; + var y = obj.y == null ? 0.5 : obj.y; + var r = obj.r == null ? 0.5 : obj.r; + + if (!obj.global) { + x = x * width + rect.x; + y = y * height + rect.y; + r = r * min; + } + + var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); + return canvasGradient; +} + +Style.prototype = { + constructor: Style, + + /** + * @type {string} + */ + fill: '#000', + + /** + * @type {string} + */ + stroke: null, + + /** + * @type {number} + */ + opacity: 1, + + /** + * @type {number} + */ + fillOpacity: null, + + /** + * @type {number} + */ + strokeOpacity: null, + + /** + * `true` is not supported. + * `false`/`null`/`undefined` are the same. + * `false` is used to remove lineDash in some + * case that `null`/`undefined` can not be set. + * (e.g., emphasis.lineStyle in echarts) + * @type {Array.|boolean} + */ + lineDash: null, + + /** + * @type {number} + */ + lineDashOffset: 0, + + /** + * @type {number} + */ + shadowBlur: 0, + + /** + * @type {number} + */ + shadowOffsetX: 0, + + /** + * @type {number} + */ + shadowOffsetY: 0, + + /** + * @type {number} + */ + lineWidth: 1, + + /** + * If stroke ignore scale + * @type {Boolean} + */ + strokeNoScale: false, + // Bounding rect text configuration + // Not affected by element transform + + /** + * @type {string} + */ + text: null, + + /** + * If `fontSize` or `fontFamily` exists, `font` will be reset by + * `fontSize`, `fontStyle`, `fontWeight`, `fontFamily`. + * So do not visit it directly in upper application (like echarts), + * but use `contain/text#makeFont` instead. + * @type {string} + */ + font: null, + + /** + * The same as font. Use font please. + * @deprecated + * @type {string} + */ + textFont: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * @type {string} + */ + fontStyle: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * @type {string} + */ + fontWeight: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * Should be 12 but not '12px'. + * @type {number} + */ + fontSize: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * @type {string} + */ + fontFamily: null, + + /** + * Reserved for special functinality, like 'hr'. + * @type {string} + */ + textTag: null, + + /** + * @type {string} + */ + textFill: '#000', + + /** + * @type {string} + */ + textStroke: null, + + /** + * @type {number} + */ + textWidth: null, + + /** + * Only for textBackground. + * @type {number} + */ + textHeight: null, + + /** + * textStroke may be set as some color as a default + * value in upper applicaion, where the default value + * of textStrokeWidth should be 0 to make sure that + * user can choose to do not use text stroke. + * @type {number} + */ + textStrokeWidth: 0, + + /** + * @type {number} + */ + textLineHeight: null, + + /** + * 'inside', 'left', 'right', 'top', 'bottom' + * [x, y] + * Based on x, y of rect. + * @type {string|Array.} + * @default 'inside' + */ + textPosition: 'inside', + + /** + * If not specified, use the boundingRect of a `displayable`. + * @type {Object} + */ + textRect: null, + + /** + * [x, y] + * @type {Array.} + */ + textOffset: null, + + /** + * @type {string} + */ + textAlign: null, + + /** + * @type {string} + */ + textVerticalAlign: null, + + /** + * @type {number} + */ + textDistance: 5, + + /** + * @type {string} + */ + textShadowColor: 'transparent', + + /** + * @type {number} + */ + textShadowBlur: 0, + + /** + * @type {number} + */ + textShadowOffsetX: 0, + + /** + * @type {number} + */ + textShadowOffsetY: 0, + + /** + * @type {string} + */ + textBoxShadowColor: 'transparent', + + /** + * @type {number} + */ + textBoxShadowBlur: 0, + + /** + * @type {number} + */ + textBoxShadowOffsetX: 0, + + /** + * @type {number} + */ + textBoxShadowOffsetY: 0, + + /** + * Whether transform text. + * Only available in Path and Image element, + * where the text is called as `RectText`. + * @type {boolean} + */ + transformText: false, + + /** + * Text rotate around position of Path or Image. + * The origin of the rotation can be specified by `textOrigin`. + * Only available in Path and Image element, + * where the text is called as `RectText`. + */ + textRotation: 0, + + /** + * Text origin of text rotation. + * Useful in the case like label rotation of circular symbol. + * Only available in Path and Image element, where the text is called + * as `RectText` and the element is called as "host element". + * The value can be: + * + If specified as a coordinate like `[10, 40]`, it is the `[x, y]` + * base on the left-top corner of the rect of its host element. + * + If specified as a string `center`, it is the center of the rect of + * its host element. + * + By default, this origin is the `textPosition`. + * @type {string|Array.} + */ + textOrigin: null, + + /** + * @type {string} + */ + textBackgroundColor: null, + + /** + * @type {string} + */ + textBorderColor: null, + + /** + * @type {number} + */ + textBorderWidth: 0, + + /** + * @type {number} + */ + textBorderRadius: 0, + + /** + * Can be `2` or `[2, 4]` or `[2, 3, 4, 5]` + * @type {number|Array.} + */ + textPadding: null, + + /** + * Text styles for rich text. + * @type {Object} + */ + rich: null, + + /** + * {outerWidth, outerHeight, ellipsis, placeholder} + * @type {Object} + */ + truncate: null, + + /** + * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * @type {string} + */ + blend: null, + + /** + * @param {CanvasRenderingContext2D} ctx + */ + bind: function (ctx, el, prevEl) { + var style = this; + var prevStyle = prevEl && prevEl.style; // If no prevStyle, it means first draw. + // Only apply cache if the last time cachced by this function. + + var notCheckCache = !prevStyle || ctx.__attrCachedBy !== ContextCachedBy.STYLE_BIND; + ctx.__attrCachedBy = ContextCachedBy.STYLE_BIND; + + for (var i = 0; i < STYLE_COMMON_PROPS.length; i++) { + var prop = STYLE_COMMON_PROPS[i]; + var styleName = prop[0]; + + if (notCheckCache || style[styleName] !== prevStyle[styleName]) { + // FIXME Invalid property value will cause style leak from previous element. + ctx[styleName] = fixShadow(ctx, styleName, style[styleName] || prop[1]); + } + } + + if (notCheckCache || style.fill !== prevStyle.fill) { + ctx.fillStyle = style.fill; + } + + if (notCheckCache || style.stroke !== prevStyle.stroke) { + ctx.strokeStyle = style.stroke; + } + + if (notCheckCache || style.opacity !== prevStyle.opacity) { + ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; + } + + if (notCheckCache || style.blend !== prevStyle.blend) { + ctx.globalCompositeOperation = style.blend || 'source-over'; + } + + if (this.hasStroke()) { + var lineWidth = style.lineWidth; + ctx.lineWidth = lineWidth / (this.strokeNoScale && el && el.getLineScale ? el.getLineScale() : 1); + } + }, + hasFill: function () { + var fill = this.fill; + return fill != null && fill !== 'none'; + }, + hasStroke: function () { + var stroke = this.stroke; + return stroke != null && stroke !== 'none' && this.lineWidth > 0; + }, + + /** + * Extend from other style + * @param {zrender/graphic/Style} otherStyle + * @param {boolean} overwrite true: overwrirte any way. + * false: overwrite only when !target.hasOwnProperty + * others: overwrite when property is not null/undefined. + */ + extendFrom: function (otherStyle, overwrite) { + if (otherStyle) { + for (var name in otherStyle) { + if (otherStyle.hasOwnProperty(name) && (overwrite === true || (overwrite === false ? !this.hasOwnProperty(name) : otherStyle[name] != null))) { + this[name] = otherStyle[name]; + } + } + } + }, + + /** + * Batch setting style with a given object + * @param {Object|string} obj + * @param {*} [obj] + */ + set: function (obj, value) { + if (typeof obj === 'string') { + this[obj] = value; + } else { + this.extendFrom(obj, true); + } + }, + + /** + * Clone + * @return {zrender/graphic/Style} [description] + */ + clone: function () { + var newStyle = new this.constructor(); + newStyle.extendFrom(this, true); + return newStyle; + }, + getGradient: function (ctx, obj, rect) { + var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient; + var canvasGradient = method(ctx, obj, rect); + var colorStops = obj.colorStops; + + for (var i = 0; i < colorStops.length; i++) { + canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color); + } + + return canvasGradient; + } +}; +var styleProto = Style.prototype; + +for (var i = 0; i < STYLE_COMMON_PROPS.length; i++) { + var prop = STYLE_COMMON_PROPS[i]; + + if (!(prop[0] in styleProto)) { + styleProto[prop[0]] = prop[1]; + } +} // Provide for others + + +Style.getGradient = styleProto.getGradient; +var _default = Style; +module.exports = _default; + +/***/ }), + +/***/ "2b8c": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var VisualMapping = __webpack_require__("5f14"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @file Visual solution, for consistent option specification. + */ +var each = zrUtil.each; + +function hasKeys(obj) { + if (obj) { + for (var name in obj) { + if (obj.hasOwnProperty(name)) { + return true; + } + } + } +} +/** + * @param {Object} option + * @param {Array.} stateList + * @param {Function} [supplementVisualOption] + * @return {Object} visualMappings > + */ + + +function createVisualMappings(option, stateList, supplementVisualOption) { + var visualMappings = {}; + each(stateList, function (state) { + var mappings = visualMappings[state] = createMappings(); + each(option[state], function (visualData, visualType) { + if (!VisualMapping.isValidType(visualType)) { + return; + } + + var mappingOption = { + type: visualType, + visual: visualData + }; + supplementVisualOption && supplementVisualOption(mappingOption, state); + mappings[visualType] = new VisualMapping(mappingOption); // Prepare a alpha for opacity, for some case that opacity + // is not supported, such as rendering using gradient color. + + if (visualType === 'opacity') { + mappingOption = zrUtil.clone(mappingOption); + mappingOption.type = 'colorAlpha'; + mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption); + } + }); + }); + return visualMappings; + + function createMappings() { + var Creater = function () {}; // Make sure hidden fields will not be visited by + // object iteration (with hasOwnProperty checking). + + + Creater.prototype.__hidden = Creater.prototype; + var obj = new Creater(); + return obj; + } +} +/** + * @param {Object} thisOption + * @param {Object} newOption + * @param {Array.} keys + */ + + +function replaceVisualOption(thisOption, newOption, keys) { + // Visual attributes merge is not supported, otherwise it + // brings overcomplicated merge logic. See #2853. So if + // newOption has anyone of these keys, all of these keys + // will be reset. Otherwise, all keys remain. + var has; + zrUtil.each(keys, function (key) { + if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { + has = true; + } + }); + has && zrUtil.each(keys, function (key) { + if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { + thisOption[key] = zrUtil.clone(newOption[key]); + } else { + delete thisOption[key]; + } + }); +} +/** + * @param {Array.} stateList + * @param {Object} visualMappings > + * @param {module:echarts/data/List} list + * @param {Function} getValueState param: valueOrIndex, return: state. + * @param {object} [scope] Scope for getValueState + * @param {string} [dimension] Concrete dimension, if used. + */ +// ???! handle brush? + + +function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) { + var visualTypesMap = {}; + zrUtil.each(stateList, function (state) { + var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); + visualTypesMap[state] = visualTypes; + }); + var dataIndex; + + function getVisual(key) { + return data.getItemVisual(dataIndex, key); + } + + function setVisual(key, value) { + data.setItemVisual(dataIndex, key, value); + } + + if (dimension == null) { + data.each(eachItem); + } else { + data.each([dimension], eachItem); + } + + function eachItem(valueOrIndex, index) { + dataIndex = dimension == null ? valueOrIndex : index; + var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance + + if (rawDataItem && rawDataItem.visualMap === false) { + return; + } + + var valueState = getValueState.call(scope, valueOrIndex); + var mappings = visualMappings[valueState]; + var visualTypes = visualTypesMap[valueState]; + + for (var i = 0, len = visualTypes.length; i < len; i++) { + var type = visualTypes[i]; + mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual); + } + } +} +/** + * @param {module:echarts/data/List} data + * @param {Array.} stateList + * @param {Object} visualMappings > + * @param {Function} getValueState param: valueOrIndex, return: state. + * @param {number} [dim] dimension or dimension index. + */ + + +function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) { + var visualTypesMap = {}; + zrUtil.each(stateList, function (state) { + var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); + visualTypesMap[state] = visualTypes; + }); + + function progress(params, data) { + if (dim != null) { + dim = data.getDimension(dim); + } + + function getVisual(key) { + return data.getItemVisual(dataIndex, key); + } + + function setVisual(key, value) { + data.setItemVisual(dataIndex, key, value); + } + + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance + + if (rawDataItem && rawDataItem.visualMap === false) { + continue; + } + + var value = dim != null ? data.get(dim, dataIndex, true) : dataIndex; + var valueState = getValueState(value); + var mappings = visualMappings[valueState]; + var visualTypes = visualTypesMap[valueState]; + + for (var i = 0, len = visualTypes.length; i < len; i++) { + var type = visualTypes[i]; + mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual); + } + } + } + + return { + progress: progress + }; +} + +exports.createVisualMappings = createVisualMappings; +exports.replaceVisualOption = replaceVisualOption; +exports.applyVisual = applyVisual; +exports.incrementalApplyVisual = incrementalApplyVisual; + +/***/ }), + +/***/ "2c17": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var _util = __webpack_require__("6d8b"); + +var createHashMap = _util.createHashMap; +var each = _util.each; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerProcessor({ + // `dataZoomProcessor` will only be performed in needed series. Consider if + // there is a line series and a pie series, it is better not to update the + // line series if only pie series is needed to be updated. + getTargetSeries: function (ecModel) { + var seriesModelMap = createHashMap(); + ecModel.eachComponent('dataZoom', function (dataZoomModel) { + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) { + var axisProxy = dataZoomModel.getAxisProxy(dimNames.name, axisIndex); + each(axisProxy.getTargetSeriesModels(), function (seriesModel) { + seriesModelMap.set(seriesModel.uid, seriesModel); + }); + }); + }); + return seriesModelMap; + }, + modifyOutputEnd: true, + // Consider appendData, where filter should be performed. Because data process is + // in block mode currently, it is not need to worry about that the overallProgress + // execute every frame. + overallReset: function (ecModel, api) { + ecModel.eachComponent('dataZoom', function (dataZoomModel) { + // We calculate window and reset axis here but not in model + // init stage and not after action dispatch handler, because + // reset should be called after seriesData.restoreData. + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) { + dataZoomModel.getAxisProxy(dimNames.name, axisIndex).reset(dataZoomModel, api); + }); // Caution: data zoom filtering is order sensitive when using + // percent range and no min/max/scale set on axis. + // For example, we have dataZoom definition: + // [ + // {xAxisIndex: 0, start: 30, end: 70}, + // {yAxisIndex: 0, start: 20, end: 80} + // ] + // In this case, [20, 80] of y-dataZoom should be based on data + // that have filtered by x-dataZoom using range of [30, 70], + // but should not be based on full raw data. Thus sliding + // x-dataZoom will change both ranges of xAxis and yAxis, + // while sliding y-dataZoom will only change the range of yAxis. + // So we should filter x-axis after reset x-axis immediately, + // and then reset y-axis and filter y-axis. + + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) { + dataZoomModel.getAxisProxy(dimNames.name, axisIndex).filterData(dataZoomModel, api); + }); + }); + ecModel.eachComponent('dataZoom', function (dataZoomModel) { + // Fullfill all of the range props so that user + // is able to get them from chart.getOption(). + var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); + var percentRange = axisProxy.getDataPercentWindow(); + var valueRange = axisProxy.getDataValueWindow(); + dataZoomModel.setCalculatedRange({ + start: percentRange[0], + end: percentRange[1], + startValue: valueRange[0], + endValue: valueRange[1] + }); + }); + } +}); + +/***/ }), + +/***/ "2cf4": +/***/ (function(module, exports) { + +var dpr = 1; // If in browser environment + +if (typeof window !== 'undefined') { + dpr = Math.max(window.devicePixelRatio || 1, 1); +} +/** + * config默认配置项 + * @exports zrender/config + * @author Kener (@Kener-林峰, kener.linfeng@gmail.com) + */ + +/** + * Debug log mode: + * 0: Do nothing, for release. + * 1: console.error, for debug. + */ + + +var debugMode = 0; // retina 屏幕优化 + +var devicePixelRatio = dpr; +exports.debugMode = debugMode; +exports.devicePixelRatio = devicePixelRatio; + +/***/ }), + +/***/ "2cf49": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var fails = __webpack_require__("d039"); +var classof = __webpack_require__("c6b6"); +var bind = __webpack_require__("0366"); +var html = __webpack_require__("1be4"); +var createElement = __webpack_require__("cc12"); +var IS_IOS = __webpack_require__("1cdc"); + +var location = global.location; +var set = global.setImmediate; +var clear = global.clearImmediate; +var process = global.process; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; + +var run = function (id) { + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; + +var runner = function (id) { + return function () { + run(id); + }; +}; + +var listener = function (event) { + run(event.data); +}; + +var post = function (id) { + // old engines have not location.origin + global.postMessage(id + '', location.protocol + '//' + location.host); +}; + +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!set || !clear) { + set = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); + }; + defer(counter); + return counter; + }; + clear = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (classof(process) == 'process') { + defer = function (id) { + process.nextTick(runner(id)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(runner(id)); + }; + // Browsers with MessageChannel, includes WebWorkers + // except iOS - https://github.com/zloirock/core-js/issues/624 + } else if (MessageChannel && !IS_IOS) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = bind(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if ( + global.addEventListener && + typeof postMessage == 'function' && + !global.importScripts && + !fails(post) && + location.protocol !== 'file:' + ) { + defer = post; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in createElement('script')) { + defer = function (id) { + html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(runner(id), 0); + }; + } +} + +module.exports = { + set: set, + clear: clear +}; + + +/***/ }), + +/***/ "2cfc": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("4338"); + +__webpack_require__("bcbe"); + +__webpack_require__("c62c"); + +__webpack_require__("cb8f"); + +__webpack_require__("f138"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.extendComponentView({ + type: 'single' +}); + +/***/ }), + +/***/ "2d00": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var userAgent = __webpack_require__("342f"); + +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8; +var match, version; + +if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; +} else if (userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } +} + +module.exports = version && +version; + + +/***/ }), + +/***/ "2ef0": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = true && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSetting.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSetting.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartSetting.vue?vue&type=template&id=07b78e5c&\"\nimport script from \"./ChartSetting.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartSetting.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChartSetting.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export const ENABLE_ACTIVE = 'ENABLE_ACTIVE';\r\nexport const DISABLE_ACTIVE = 'DISABLE_ACTIVE';\r\nexport const UPDATE_CHART_ITEM = 'UPDATE_CHART_ITEM';\r\n\r\nexport default {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n UPDATE_CHART_ITEM,\r\n}","import types from './mutation-types';\r\n\r\nexport default {\r\n setActive({commit, state}, {id}) {\r\n for (let i = 0, l = state.chartLists.length; i < l; i++) {\r\n if (i === id) {\r\n commit(types.ENABLE_ACTIVE, i);\r\n continue;\r\n }\r\n\r\n commit(types.DISABLE_ACTIVE, i);\r\n }\r\n },\r\n unsetActive({commit}, {id}) {\r\n commit(types.DISABLE_ACTIVE, id);\r\n },\r\n updateChartItem({commit}, updateObj) {\r\n commit(types.UPDATE_CHART_ITEM, updateObj);\r\n }\r\n};","export default {\r\n getActive: state => {\r\n for (let i = 0, l = state.chartLists.length; i < l; i++) {\r\n let chartList = state.chartLists[i];\r\n\r\n if (chartList.active) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n}","import { transTextStyle } from '@/utils/chartUtil'\r\n/**\r\n * echarts title transform\r\n * \r\n */\r\nconst transformTitle = function (chartAllTypeArray, title, subtitle) {\r\n const chartPro = chartAllTypeArray[0];\r\n const chartType = chartAllTypeArray[1];\r\n const chartStyle = chartAllTypeArray[2];\r\n\r\n // init object\r\n let resultTitle = {\r\n show: true,\r\n text: '',\r\n left: 'auto',\r\n top: 'auto',\r\n textStyle: {\r\n fontSize: 12,\r\n color: '#333',\r\n fontFamily: 'sans-serif',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n },\r\n subtextStyle: {\r\n fontSize: 12,\r\n color: '#aaa',\r\n fontFamily: 'sans-serif',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n },\r\n subtext: '',\r\n itemGap: 10\r\n };\r\n\r\n // title.show\r\n resultTitle.show = title.show;\r\n\r\n // title.text\r\n resultTitle.text = title.text;\r\n resultTitle.subtext = subtitle.text\r\n\r\n // textstyle\r\n transTextStyle(title , resultTitle , 'textStyle' , 'text')\r\n transTextStyle(subtitle , resultTitle , 'subtextStyle' , 'subtext')\r\n\r\n // title.position\r\n if (title.position.value === 'custom') {\r\n resultTitle.left = title.position.offsetX + '%'\r\n resultTitle.top = title.position.offsetY + '%'\r\n } else {\r\n resultTitle.left = title.position.value.split('-')[0]\r\n resultTitle.top = title.position.value.split('-')[1]\r\n }\r\n\r\n // title.itemgap\r\n let actions = new Map([\r\n ['auto' , 10],\r\n ['far' , 30],\r\n ['close' , 5],\r\n ['normal' , 20],\r\n ['custom' , subtitle.distance.cusGap]\r\n ])\r\n resultTitle.itemGap = actions.get(subtitle.distance.value)\r\n\r\n return resultTitle\r\n}\r\n\r\nexport default transformTitle","/**\r\n * legend转换\r\n */\r\nimport { transTextStyle } from '@/utils/chartUtil'\r\nconst transformLegend = function(chartAllTypeArray , legend){\r\n let resLegend = {\r\n show: true,\r\n textStyle: {\r\n color: '#333',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 12\r\n },\r\n left: 'auto',\r\n top: 'auto',\r\n orient: 'horizontal',\r\n itemWidth: 25,\r\n itemGap: 10\r\n }\r\n // legend.show\r\n resLegend.show = legend.show\r\n // legend.textStyle\r\n transTextStyle(legend , resLegend , 'textStyle')\r\n // legend.position\r\n if (legend.position.value === 'custom') {\r\n resLegend.left = legend.position.offsetX \r\n resLegend.top = legend.position.offsetY \r\n } else {\r\n resLegend.left = legend.position.value.split('-')[0]\r\n resLegend.top = legend.position.value.split('-')[1]\r\n }\r\n // legend.orient\r\n resLegend.orient = legend.position.direction\r\n // legend.itemWidth\r\n let width = new Map([\r\n ['auto' , 25],\r\n ['big' , 45],\r\n ['medium' , 18],\r\n ['small' , 10],\r\n ['custom' , legend.width.cusSize]\r\n ])\r\n let height = new Map([\r\n ['auto' , 14],\r\n ['big' , 30],\r\n ['medium' , 20],\r\n ['small' , 10],\r\n ['custom' , legend.height.cusSize]\r\n ])\r\n resLegend.itemWidth = width.get(legend.width.value)\r\n resLegend.itemHeight = height.get(legend.height.value)\r\n // legend.itemGap\r\n let distance = new Map([\r\n ['auto' , 10],\r\n ['far' , 20],\r\n ['near' , 5],\r\n ['general' , 15],\r\n ['custom' , legend.distance.cusGap]\r\n ])\r\n resLegend.itemGap = distance.get(legend.distance.value) \r\n\r\n return resLegend\r\n}\r\n\r\nexport default transformLegend","/**\r\n * 鼠标提示转换\r\n */\r\nimport { transTextStyle , floatTool} from '@/utils/chartUtil'\r\nconst transformTooltip = function (chartAllTypeArray, tooltip) {\r\n const resTooltip = {\r\n show: true,\r\n trigger: 'item',\r\n textStyle: {\r\n color: '#fff',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 14\r\n },\r\n backgroundColor: 'rgba(50,50,50,0.7)',\r\n triggerOn: 'mousemove|click',\r\n axisPointer: {\r\n type: 'line',\r\n lineStyle: {\r\n type: 'solid',\r\n width: 1,\r\n color: '#555'\r\n }\r\n },\r\n position: 'right'\r\n }\r\n // tooltip.show\r\n resTooltip.show = tooltip.show\r\n // 触发类型\r\n resTooltip.trigger = tooltip.triggerType\r\n // 触发条件\r\n resTooltip.triggerOn = tooltip.triggerOn\r\n // 文字样式\r\n transTextStyle(tooltip, resTooltip, 'textStyle')\r\n // 背景色\r\n resTooltip.backgroundColor = tooltip.backgroundColor\r\n // 指示器配置\r\n resTooltip.axisPointer.lineStyle = tooltip.axisPointer.style\r\n resTooltip.axisPointer.type = tooltip.axisPointer.type\r\n // 提示框位置\r\n resTooltip.position = tooltip.position == 'auto' ? null : tooltip.position\r\n // 提示formatter\r\n let format = tooltip.format\r\n let formatter1 = function (params) {\r\n console.dir(params)\r\n let str = params[0].name + \"
\"\r\n for (var i = 0; i < params.length; i++) {\r\n if(format[params[i].seriesIndex].digit == 'auto'){\r\n params[i].value = floatTool.multiply(+params[i].value,format[params[i].seriesIndex].ratio) + format[params[i].seriesIndex].suffix\r\n }else{\r\n params[i].value = floatTool.multiply(+params[i].value,format[params[i].seriesIndex].ratio).toFixed(format[params[i].seriesIndex].digit) + format[params[i].seriesIndex].suffix\r\n }\r\n\r\n str += \"
 \" + params[i].seriesName + \":  \" + params[i].value + \"
\";\r\n }\r\n return str\r\n }\r\n\r\n let formatter2 = function (params) {\r\n if(format[params.seriesIndex].digit == 'auto'){\r\n params.value = floatTool.multiply(+params.value, format[params.seriesIndex].ratio) + format[params.seriesIndex].suffix\r\n }else{\r\n params.value = floatTool.multiply(+params.value, format[params.seriesIndex].ratio).toFixed(format[params.seriesIndex].digit) + format[params.seriesIndex].suffix\r\n }\r\n let str = params.seriesName + \"
    \" + params.name + \":  \" + params.value;\r\n return str\r\n }\r\n\r\n let actions = new Map([\r\n ['item' , formatter2],\r\n ['axis' , formatter1]\r\n ]) \r\n resTooltip.formatter = actions.get(resTooltip.trigger)\r\n\r\n return resTooltip\r\n}\r\n\r\nexport default transformTooltip","/**\r\n * 坐标轴转换\r\n */\r\nimport { transTextStyle , transLineStyle , floatTool ,transCustom } from '@/utils/chartUtil'\r\nimport { deepCopy } from '@/utils/util'\r\nconst transformAxis = function(chartAllTypeArray , axis){\r\n let chartType = chartAllTypeArray[1]\r\n let option = {\r\n show: true,\r\n name: '',\r\n nameTextStyle: {\r\n color: '#333',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 12\r\n },\r\n nameLocation: 'end',\r\n inverse: false,\r\n interval: null,\r\n nameGap: 15,\r\n nameRotate: null,\r\n axisLine: {\r\n show: true,\r\n lineStyle: {\r\n color: '#333',\r\n width: 1\r\n }\r\n },\r\n axisTick: {\r\n show: true,\r\n inside: false,\r\n length: 5,\r\n lineStyle: {\r\n width: 1,\r\n type: 'solid',\r\n color: null\r\n }\r\n },\r\n axisLabel: {\r\n show: true,\r\n rotate: 0,\r\n formatter: null\r\n },\r\n min: null,\r\n max: null,\r\n splitLine: {\r\n show: true,\r\n lineStyle: {\r\n color: '#ccc',\r\n width: 1,\r\n type: 'solid'\r\n },\r\n interval: 'auto'\r\n },\r\n splitArea: {\r\n show: false,\r\n areaStyle: {\r\n color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']\r\n }\r\n }\r\n }\r\n\r\n let transAxis = function(res , ori){\r\n let origin = axis[ori]\r\n // axis.show\r\n res.show = origin.show\r\n // axis.name\r\n res.name = origin.title.text\r\n // axis.label\r\n transTextStyle(origin.title , res , 'nameTextStyle')\r\n res.nameLocation = origin.title.fzPosition\r\n // 反向坐标轴\r\n res.inverse = origin.inverse\r\n // 坐标轴间隔个数\r\n res.interval = origin.tickLabel.optimize\r\n // 标题与轴线距离\r\n res.nameGap = origin.title.rotate\r\n // 刻度线设置\r\n res.axisLine.show = origin.tickLine.show\r\n res.axisLine.lineStyle = transLineStyle(origin.tickLine.width , origin.tickLine.color)\r\n // 刻度设置\r\n res.axisTick.show = origin.tick.show\r\n res.axisTick.lineStyle = transLineStyle(origin.tick.width , origin.tick.color)\r\n res.axisTick.inside = origin.tick.position == 'inside' ? true : false\r\n res.axisTick.length = origin.tick.length\r\n // 刻度标签\r\n res.axisLabel.show = origin.tickLabel.show\r\n res.axisLabel.rotate = origin.tickLabel.rotate\r\n // 标签formatter\r\n if((chartType == 'bar' && ori.slice(0,1) == 'x') || (chartType != 'bar' && ori.slice(0,1) == 'y')){\r\n res.min = origin.tickLabel.min\r\n res.max = origin.tickLabel.max\r\n res.axisLabel.formatter = function(params){\r\n if(origin.tickLabel.digit == 'auto'){\r\n return origin.tickLabel.prefix + floatTool.multiply(+params , origin.tickLabel.ratio) + origin.tickLabel.suffix\r\n }else{\r\n return origin.tickLabel.prefix + floatTool.multiply(+params , origin.tickLabel.ratio).toFixed(origin.tickLabel.digit) + origin.tickLabel.suffix\r\n }\r\n }\r\n }else{\r\n res.axisLabel.formatter = function(params){\r\n return origin.tickLabel.prefix + params + origin.tickLabel.suffix\r\n }\r\n }\r\n // 网格线\r\n res.splitLine.show = origin.netLine.show\r\n res.splitLine.lineStyle = transLineStyle(origin.netLine.width , origin.netLine.color , origin.netLine.type)\r\n res.splitLine.interval = transCustom(origin.netLine.interval.value , origin.netLine.interval.cusNumber)\r\n // 网格区域\r\n res.splitArea.show = origin.netArea.show\r\n res.splitArea.interval = transCustom(origin.netArea.interval.value , origin.netArea.interval.cusNumber)\r\n res.splitArea.areaStyle.color = [origin.netArea.colorOne == 'auto' ? 'rgba(250,250,250,0.3)' : origin.netArea.colorOne , origin.netArea.colorTwo == 'auto' ? 'rgba(200,200,200,0.3)' : origin.netArea.colorTwo]\r\n\r\n return res\r\n }\r\n\r\n return {\r\n xAxisUp: transAxis(deepCopy(option) , 'xAxisUp'),\r\n xAxisDown: transAxis(deepCopy(option) , 'xAxisDown'),\r\n yAxisLeft: transAxis(deepCopy(option) , 'yAxisLeft'),\r\n yAxisRight: transAxis(deepCopy(option) , 'yAxisRight')\r\n }\r\n}\r\n\r\nexport default transformAxis","/**\r\n * echarts转换引擎\r\n */\r\n\r\nimport transformTitle from './transformTitle'\r\nimport transformLegend from './transformLegend'\r\nimport transformTooltip from './transformTooltip'\r\nimport transformAxis from './transformAxis'\r\n\r\nconst echartsEngine = function (chartOptions) {\r\n //TODO: chartOptions 转换后导出\r\n\r\n const chartAllTypeArray = chartOptions.chartAllType.split('|');\r\n const chartPro = chartAllTypeArray[0];\r\n const chartType = chartAllTypeArray[1];\r\n const chartStyle = chartAllTypeArray[2];\r\n\r\n const titleOption = transformTitle(chartAllTypeArray , chartOptions.defaultOption.title,chartOptions.defaultOption.subtitle)\r\n // const configOption = transformConfig(chartOptions.defaultOption.config);\r\n const legendOption = transformLegend(chartAllTypeArray , chartOptions.defaultOption.legend)\r\n const tooltipOption = transformTooltip(chartAllTypeArray , chartOptions.defaultOption.tooltip)\r\n const axisOption = transformAxis(chartAllTypeArray , chartOptions.defaultOption.axis)\r\n axisOption.xAxisDown.data = chartOptions.defaultOption.axis.xAxisDown.data\r\n\r\n const option = {\r\n title:{...titleOption},\r\n tooltip: {\r\n ...tooltipOption\r\n },\r\n legend: {\r\n ...legendOption\r\n },\r\n xAxis: [{\r\n ...axisOption.xAxisDown\r\n },{\r\n ...axisOption.xAxisUp\r\n }],\r\n yAxis: [\r\n axisOption.yAxisLeft,\r\n axisOption.yAxisRight\r\n ],\r\n series: chartOptions.defaultOption.series\r\n };\r\n // 饼图去掉XY轴\r\n if(chartType == 'pie'){\r\n delete option.xAxis\r\n delete option.yAxis\r\n }\r\n\r\n console.dir(option)\r\n console.dir(JSON.stringify(option))\r\n return option;\r\n}\r\n\r\nexport default echartsEngine","import echartsEngine from '@/utils/echartsEngine/index'\r\n// import highchartsEngine from './highchartsEngine'\r\nconst echarts = require('echarts');\r\n\r\n\r\n/**\r\n * update main object's subject attribute by router\r\n * @param {Object} chartOptions main object\r\n * @param {String} router router\r\n * @param {Object} updateObj subject attribute\r\n */\r\nconst setChartOptionsByRouter = function (chartOptions, router, updateObj) {\r\n if (chartOptions == undefined || router == undefined) {\r\n return chartOptions;\r\n }\r\n\r\n let routerArray = router.split('/');\r\n const defaultOption = chartOptions.defaultOption;\r\n\r\n //递归获取内部属性\r\n function deepFind(curObj) {\r\n if (routerArray.length != 0) {\r\n return deepFind(curObj[routerArray.shift()])\r\n } else {\r\n Object.assign(curObj, updateObj)\r\n return curObj\r\n }\r\n\r\n }\r\n deepFind(defaultOption);\r\n return chartOptions;\r\n}\r\n\r\n/**\r\n * 渲染图表的方法,拿到store的配置json(对应于chartJson中的数据格式,可能是初始化图表的数据,也可能是后台传输来的特定配置的数据),执行转换引擎后,渲染到图表插件中,独立于vue组件.可用于编辑器和预览端\r\n * \r\n */\r\nconst renderChart = function (renderChartObj, ele) {\r\n const { chart_id, chartOptions } = renderChartObj;\r\n const chartAllTypeArray = chartOptions.chartAllType.split('|');\r\n const chartPro = chartAllTypeArray[0];\r\n // const container = ele || document.getElementById(chart_id);\r\n const container = document.getElementById(chart_id);\r\n\r\n if (chartPro === 'echarts') {\r\n const options = echartsEngine(chartOptions);\r\n\r\n let chart = echarts.getInstanceByDom(container);\r\n if (chart == null) {\r\n chart = echarts.init(container)\r\n }\r\n\r\n chart.setOption(options, true);\r\n\r\n setTimeout(() => {\r\n echarts.getInstanceById(container.getAttribute('_echarts_instance_')).resize();\r\n }, 0);\r\n }\r\n}\r\n\r\n/**\r\n * textStyle转化\r\n */\r\nconst transTextStyle = function(origin , result , attr , attr1){\r\n // fontGroup\r\n let fontGroupList = ['bold', 'vertical', 'italic'];\r\n origin.label.fontGroup.forEach(element => {\r\n if (fontGroupList.includes(element)) {\r\n switch (element) {\r\n case 'bold':\r\n result[attr].fontWeight = element;\r\n break;\r\n case 'vertical':\r\n // TODO: '标题01'\r\n result[attr1] = origin.text.replace(/\\B/g, '\\n');\r\n break;\r\n case 'italic':\r\n result[attr].fontStyle = element;\r\n break;\r\n }\r\n }\r\n });\r\n // fontColor\r\n result[attr].color = origin.label.color\r\n // fontSize\r\n result[attr].fontSize = transCustom(origin.label.fontSize , origin.label.cusFontSize)\r\n}\r\n\r\n// 解决精度\r\nconst floatTool = function() {\r\n \r\n /*\r\n * 判断obj是否为一个整数\r\n */\r\n function isInteger(obj) {\r\n return Math.floor(obj) === obj;\r\n }\r\n \r\n /*\r\n * 将一个浮点数转成整数,返回整数和倍数。如 3.14 >> 314,倍数是 100\r\n * @param floatNum {number} 小数\r\n * @return {object}\r\n * {times:100, num: 314}\r\n */\r\n function toInteger(floatNum) {\r\n var ret = {times: 1, num: 0};\r\n\r\n if (isInteger(floatNum)) {\r\n ret.num = floatNum;\r\n return ret;\r\n }\r\n\r\n var strfi = floatNum + '';\r\n var dotPos = strfi.indexOf('.');\r\n var len = strfi.substr(dotPos + 1).length;\r\n var times = Math.pow(10, len);\r\n var intNum = parseInt(floatNum * times + 0.5, 10);\r\n\r\n ret.times = times;\r\n ret.num = intNum;\r\n\r\n return ret;\r\n }\r\n \r\n /*\r\n * 核心方法,实现加减乘除运算,确保不丢失精度\r\n * 思路:把小数放大为整数(乘),进行算术运算,再缩小为小数(除)\r\n *\r\n * @param a {number} 运算数1\r\n * @param b {number} 运算数2\r\n * @param digits {number} 精度,保留的小数点数,比如 2, 即保留为两位小数\r\n * @param op {string} 运算类型,有加减乘除(add/subtract/multiply/divide)\r\n *\r\n */\r\n function operation(a, b, op) {\r\n var o1 = toInteger(a);\r\n var o2 = toInteger(b);\r\n var n1 = o1.num;\r\n var n2 = o2.num;\r\n var t1 = o1.times;\r\n var t2 = o2.times;\r\n var max = t1 > t2 ? t1 : t2;\r\n var result = null;\r\n\r\n switch (op) {\r\n case 'add':\r\n if (t1 === t2) { // 两个小数位数相同\r\n result = n1 + n2;\r\n } \r\n else if (t1 > t2) { // o1 小数位 大于 o2\r\n result = n1 + n2 * (t1 / t2);\r\n } \r\n else { // o1 小数位 小于 o2\r\n result = n1 * (t2 / t1) + n2;\r\n }\r\n\r\n return result / max;\r\n case 'subtract':\r\n if (t1 === t2) {\r\n result = n1 - n2;\r\n } \r\n else if (t1 > t2) {\r\n result = n1 - n2 * (t1 / t2);\r\n } \r\n else {\r\n result = n1 * (t2 / t1) - n2;\r\n }\r\n\r\n return result / max;\r\n case 'multiply':\r\n result = (n1 * n2) / (t1 * t2);\r\n \r\n return result;\r\n case 'divide':\r\n return result = function() {\r\n var r1 = n1 / n2;\r\n var r2 = t2 / t1;\r\n return operation(r1, r2, 'multiply');\r\n }();\r\n }\r\n }\r\n \r\n // 加减乘除的四个接口\r\n function add(a, b) {\r\n return operation(a, b, 'add');\r\n }\r\n function subtract(a, b) {\r\n return operation(a, b, 'subtract');\r\n }\r\n function multiply(a, b) {\r\n return operation(a, b, 'multiply');\r\n }\r\n function divide(a, b) {\r\n return operation(a, b, 'divide');\r\n }\r\n \r\n // exports\r\n return {\r\n add: add,\r\n subtract: subtract,\r\n multiply: multiply,\r\n divide: divide\r\n };\r\n}();\r\n\r\n/**\r\n * lineStyle转化\r\n */\r\nconst transLineStyle = function (width , color , type='solid'){\r\n return {\r\n width,\r\n color,\r\n type \r\n }\r\n}\r\n\r\n/**\r\n 自定义* custom数据\r\n */\r\nconst transCustom = function (a , b){\r\n if(a != 'custom'){\r\n return a\r\n }else{\r\n return b\r\n }\r\n}\r\n\r\n\r\nexport {\r\n setChartOptionsByRouter,\r\n renderChart,\r\n transTextStyle,\r\n floatTool,\r\n transLineStyle,\r\n transCustom\r\n}","import {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n UPDATE_CHART_ITEM,\r\n IS_UPDATE\r\n} from './mutation-types';\r\nimport { setChartOptionsByRouter } from '@/utils/chartUtil';\r\n\r\nexport default {\r\n [ENABLE_ACTIVE](state, id) {\r\n // 1. set active\r\n state.chartLists[id].active = true;\r\n\r\n // 2. set current chart index\r\n state.currentChartIndex = id;\r\n },\r\n [DISABLE_ACTIVE](state, id) {\r\n state.chartLists[id].active = false;\r\n },\r\n /**\r\n *根据对象属性的路径, 更新图表子属性的方法\r\n //自定义一种类型'router',updateObj内部也是采用颗粒更新的模式,防止全部替换chartOptions造成的chartsetting内部组件全局重刷\r\n params:{\r\n updateSubObj:{label:{},show:true,...} //子属性新的值\r\n router:'title/label' //属性路径\r\n }\r\n */\r\n [UPDATE_CHART_ITEM](state,params) {\r\n //子组件设置更新到chartOptions上后再更新到fabric组件上\r\n console.info('updateObj', params)\r\n const { router , updateObj } = params\r\n const currentChartOptions = state.chartLists[state.currentChartIndex].chartOptions;\r\n\r\n setChartOptionsByRouter(currentChartOptions,router , updateObj); //更新到子对象\r\n }\r\n};","import { merge, cloneDeep } from 'lodash';\r\nimport { chartOptions } from '@/data/chartJson';\r\nexport default {\r\n // store all chart objects\r\n chartLists:[\r\n {\r\n 'chart_id': 'chart_a_001',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n {\r\n 'chart_id': 'chart_a_002',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n {\r\n 'chart_id': 'chart_a_003',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n ],\r\n // store current chart index\r\n currentChartIndex: null,\r\n // current chart objects, bind to chartSetting component\r\n // currentChart: {},\r\n};","import actions from './actions';\r\nimport getters from './getters';\r\nimport mutations from './mutations';\r\nimport state from './state';\r\n\r\nexport default {\r\n namespaced: true,\r\n actions,\r\n getters,\r\n mutations,\r\n state\r\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"chartRender\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartRender.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartRender.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartRender.vue?vue&type=template&id=296f5725&scoped=true&\"\nimport script from \"./ChartRender.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartRender.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"296f5725\",\n null\n \n)\n\nexport default component.exports","export const ENABLE_ACTIVE = 'ENABLE_ACTIVE';\r\nexport const DISABLE_ACTIVE = 'DISABLE_ACTIVE';\r\n\r\nexport const ENABLE_DRAGGABLE = 'ENABLE_DRAGGABLE';\r\nexport const DISABLE_DRAGGABLE = 'DISABLE_DRAGGABLE';\r\n\r\nexport const ENABLE_RESIZABLE = 'ENABLE_RESIZABLE';\r\nexport const DISABLE_RESIZABLE = 'DISABLE_RESIZABLE';\r\n\r\nexport const ENABLE_PARENT_LIMITATION = 'ENABLE_PARENT_LIMITATION';\r\nexport const DISABLE_PARENT_LIMITATION = 'DISABLE_PARENT_LIMITATION';\r\n\r\nexport const ENABLE_SNAP_TO_GRID = 'ENABLE_SNAP_TO_GRID';\r\nexport const DISABLE_SNAP_TO_GRID = 'DISABLE_SNAP_TO_GRID';\r\n\r\nexport const ENABLE_ASPECT = 'ENABLE_ASPECT';\r\nexport const DISABLE_ASPECT = 'DISABLE_ASPECT';\r\n\r\nexport const ENABLE_X_AXIS = 'ENABLE_X_AXIS';\r\nexport const ENABLE_Y_AXIS = 'ENABLE_Y_AXIS';\r\nexport const ENABLE_BOTH_AXIS = 'ENABLE_BOTH_AXIS';\r\nexport const ENABLE_NONE_AXIS = 'ENABLE_NONE_AXIS';\r\n\r\nexport const CHANGE_ZINDEX = 'CHANGE_ZINDEX';\r\n\r\nexport const CHANGE_MINW = 'CHANGE_MINW';\r\nexport const CHANGE_MINH = 'CHANGE_MINH';\r\n\r\nexport const CHANGE_WIDTH = 'CHANGE_WIDTH';\r\nexport const CHANGE_HEIGHT = 'CHANGE_HEIGHT';\r\nexport const CHANGE_TOP = 'CHANGE_TOP';\r\nexport const CHANGE_LEFT = 'CHANGE_LEFT';\r\n\r\nexport default {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n ENABLE_DRAGGABLE,\r\n DISABLE_DRAGGABLE,\r\n ENABLE_RESIZABLE,\r\n DISABLE_RESIZABLE,\r\n ENABLE_PARENT_LIMITATION,\r\n DISABLE_PARENT_LIMITATION,\r\n ENABLE_SNAP_TO_GRID,\r\n DISABLE_SNAP_TO_GRID,\r\n ENABLE_ASPECT,\r\n DISABLE_ASPECT,\r\n ENABLE_X_AXIS,\r\n ENABLE_Y_AXIS,\r\n ENABLE_NONE_AXIS,\r\n ENABLE_BOTH_AXIS,\r\n CHANGE_ZINDEX,\r\n CHANGE_MINW,\r\n CHANGE_MINH,\r\n CHANGE_WIDTH,\r\n CHANGE_HEIGHT,\r\n CHANGE_TOP,\r\n CHANGE_LEFT\r\n}","import types, {CHANGE_ZINDEX} from './mutation-types';\r\n\r\nexport default {\r\n setActive({commit, state}, {id}) {\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i === id) {\r\n commit(types.ENABLE_ACTIVE, i);\r\n continue;\r\n }\r\n\r\n commit(types.DISABLE_ACTIVE, i);\r\n }\r\n },\r\n unsetActive({commit}, {id}) {\r\n commit(types.DISABLE_ACTIVE, id);\r\n },\r\n\r\n toggleDraggable({commit, state}, {id}) {\r\n if (!state.rects[id].draggable) {\r\n commit(types.ENABLE_DRAGGABLE, id);\r\n } else {\r\n commit(types.DISABLE_DRAGGABLE, id);\r\n }\r\n },\r\n\r\n toggleResizable({commit, state}, {id}) {\r\n if (!state.rects[id].resizable) {\r\n commit(types.ENABLE_RESIZABLE, id);\r\n } else {\r\n commit(types.DISABLE_RESIZABLE, id);\r\n }\r\n },\r\n\r\n toggleParentLimitation({commit, state}, {id}) {\r\n if (!state.rects[id].parentLim) {\r\n commit(types.ENABLE_PARENT_LIMITATION, id);\r\n } else {\r\n commit(types.DISABLE_PARENT_LIMITATION, id);\r\n }\r\n },\r\n\r\n toggleSnapToGrid({commit, state}, {id}) {\r\n if (!state.rects[id].snapToGrid) {\r\n commit(types.ENABLE_SNAP_TO_GRID, id);\r\n } else {\r\n commit(types.DISABLE_SNAP_TO_GRID, id);\r\n }\r\n },\r\n\r\n setAspect({commit}, {id}) {\r\n commit(types.ENABLE_ASPECT, id);\r\n },\r\n unsetAspect({commit}, {id}) {\r\n commit(types.DISABLE_ASPECT, id);\r\n },\r\n\r\n setWidth({commit}, {id, width}) {\r\n commit(types.CHANGE_WIDTH, {id, width});\r\n },\r\n\r\n setHeight({commit}, {id, height}) {\r\n commit(types.CHANGE_HEIGHT, {id, height});\r\n },\r\n\r\n setTop({commit}, {id, top}) {\r\n commit(types.CHANGE_TOP, {id, top});\r\n },\r\n\r\n setLeft({commit}, {id, left}) {\r\n commit(types.CHANGE_LEFT, {id, left});\r\n },\r\n\r\n changeXLock({commit, state}, {id}) {\r\n switch (state.rects[id].axis) {\r\n case 'both':\r\n commit(types.ENABLE_Y_AXIS, id);\r\n break;\r\n case 'x':\r\n commit(types.ENABLE_NONE_AXIS, id);\r\n break;\r\n case 'y':\r\n commit(types.ENABLE_BOTH_AXIS, id);\r\n break;\r\n case 'none':\r\n commit(types.ENABLE_X_AXIS, id);\r\n break;\r\n }\r\n },\r\n\r\n changeYLock({commit, state}, {id}) {\r\n switch (state.rects[id].axis) {\r\n case 'both':\r\n commit(types.ENABLE_X_AXIS, id);\r\n break;\r\n case 'x':\r\n commit(types.ENABLE_BOTH_AXIS, id);\r\n break;\r\n case 'y':\r\n commit(types.ENABLE_NONE_AXIS, id);\r\n break;\r\n case 'none':\r\n commit(types.ENABLE_Y_AXIS, id);\r\n break;\r\n }\r\n },\r\n\r\n changeZToBottom({commit, state}, {id}) {\r\n if (state.rects[id].zIndex === 1) {\r\n return\r\n }\r\n\r\n commit(types.CHANGE_ZINDEX, {id, zIndex: 1});\r\n\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i !== id) {\r\n if(state.rects[i].zIndex === state.rects.length){\r\n continue\r\n }\r\n commit(types.CHANGE_ZINDEX, {id: i, zIndex: state.rects[i].zIndex + 1});\r\n }\r\n }\r\n },\r\n\r\n changeZToTop({commit, state}, {id}) {\r\n if (state.rects[id].zIndex === state.rects.length) {\r\n return\r\n }\r\n\r\n commit(types.CHANGE_ZINDEX, {id, zIndex: state.rects.length});\r\n\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i !== id) {\r\n if(state.rects[i].zIndex === 1){\r\n continue\r\n }\r\n commit(types.CHANGE_ZINDEX, {id: i, zIndex: state.rects[i].zIndex - 1});\r\n }\r\n }\r\n },\r\n\r\n setMinWidth({commit}, {id, width}) {\r\n commit(types.CHANGE_MINW, {id, minw:width});\r\n },\r\n\r\n setMinHeight({commit}, {id, height}) {\r\n commit(types.CHANGE_MINH, {id, minh:height});\r\n }\r\n};\r\n","export default {\r\n getActive: state => {\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n let rect = state.rects[i];\r\n\r\n if (rect.active) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n}","import {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n ENABLE_ASPECT,\r\n DISABLE_ASPECT,\r\n ENABLE_DRAGGABLE,\r\n DISABLE_DRAGGABLE,\r\n ENABLE_RESIZABLE,\r\n DISABLE_RESIZABLE,\r\n ENABLE_PARENT_LIMITATION,\r\n DISABLE_PARENT_LIMITATION,\r\n ENABLE_SNAP_TO_GRID,\r\n DISABLE_SNAP_TO_GRID,\r\n CHANGE_ZINDEX,\r\n ENABLE_BOTH_AXIS,\r\n ENABLE_X_AXIS,\r\n ENABLE_Y_AXIS,\r\n ENABLE_NONE_AXIS,\r\n CHANGE_HEIGHT,\r\n CHANGE_LEFT,\r\n CHANGE_MINH,\r\n CHANGE_MINW,\r\n CHANGE_TOP,\r\n CHANGE_WIDTH\r\n} from './mutation-types';\r\n\r\nexport default {\r\n [ENABLE_ACTIVE](state, id) {\r\n state.rects[id].active = true;\r\n },\r\n [DISABLE_ACTIVE](state, id) {\r\n state.rects[id].active = false;\r\n },\r\n\r\n [ENABLE_ASPECT](state, id) {\r\n state.rects[id].aspectRatio = true;\r\n },\r\n [DISABLE_ASPECT](state, id) {\r\n state.rects[id].aspectRatio = false;\r\n },\r\n\r\n [ENABLE_DRAGGABLE](state, id) {\r\n state.rects[id].draggable = true;\r\n },\r\n [DISABLE_DRAGGABLE](state, id) {\r\n state.rects[id].draggable = false;\r\n },\r\n\r\n [ENABLE_RESIZABLE](state, id) {\r\n state.rects[id].resizable = true;\r\n },\r\n [DISABLE_RESIZABLE](state, id) {\r\n state.rects[id].resizable = false;\r\n },\r\n\r\n [ENABLE_SNAP_TO_GRID](state, id) {\r\n state.rects[id].snapToGrid = true;\r\n },\r\n [DISABLE_SNAP_TO_GRID](state, id) {\r\n state.rects[id].snapToGrid = false;\r\n },\r\n\r\n [ENABLE_BOTH_AXIS](state, id) {\r\n state.rects[id].axis = 'both';\r\n },\r\n [ENABLE_NONE_AXIS](state, id) {\r\n state.rects[id].axis = 'none';\r\n },\r\n [ENABLE_X_AXIS](state, id) {\r\n state.rects[id].axis = 'x';\r\n },\r\n [ENABLE_Y_AXIS](state, id) {\r\n state.rects[id].axis = 'y';\r\n },\r\n\r\n [ENABLE_PARENT_LIMITATION](state, id) {\r\n state.rects[id].parentLim = true;\r\n },\r\n [DISABLE_PARENT_LIMITATION](state, id) {\r\n state.rects[id].parentLim = false;\r\n },\r\n\r\n [CHANGE_ZINDEX](state, payload) {\r\n state.rects[payload.id].zIndex = payload.zIndex;\r\n },\r\n\r\n [CHANGE_HEIGHT](state, payload) {\r\n state.rects[payload.id].height = payload.height;\r\n },\r\n\r\n [CHANGE_WIDTH](state, payload) {\r\n state.rects[payload.id].width = payload.width;\r\n },\r\n\r\n [CHANGE_TOP](state, payload) {\r\n state.rects[payload.id].top = payload.top;\r\n },\r\n\r\n [CHANGE_LEFT](state, payload) {\r\n state.rects[payload.id].left = payload.left;\r\n },\r\n\r\n [CHANGE_MINH](state, payload) {\r\n\r\n state.rects[payload.id].minh = payload.minh;\r\n },\r\n\r\n [CHANGE_MINW](state, payload) {\r\n state.rects[payload.id].minw = payload.minw;\r\n }\r\n};","export default {\r\n 'rects': [\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 10,\r\n 'left': 10,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 1,\r\n 'color': '#EF9A9A',\r\n 'active': false,\r\n 'chart_id': 'chart_a_001',\r\n },\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 10,\r\n 'left': 220,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 2,\r\n 'color': '#AED581',\r\n 'active': false,\r\n 'chart_id': 'chart_a_002',\r\n },\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 170,\r\n 'left': 10,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 3,\r\n 'color': '#81D4FA',\r\n 'active': false,\r\n 'chart_id': 'chart_a_003',\r\n }\r\n ]\r\n};\r\n","import actions from './actions';\r\nimport getters from './getters';\r\nimport mutations from './mutations';\r\nimport state from './state';\r\n\r\nexport default {\r\n namespaced: true,\r\n actions,\r\n getters,\r\n mutations,\r\n state\r\n};\r\n","// use vuex modules\r\n\r\n//chart display box\r\nconst chartRender = {\r\n state: () => ({\r\n //show or hide\r\n isShow: true\r\n }),\r\n getters: {\r\n\r\n },\r\n mutations: {\r\n\r\n },\r\n actions: {\r\n\r\n }\r\n}\r\n\r\nexport default chartRender","import Vue from 'vue'\r\nimport Vuex from 'vuex'\r\nimport rect from './modules/rect'\r\nimport chartRender from './modules/chartRender'\r\nimport chartSetting from './modules/chartSetting'\r\n\r\nVue.use(Vuex)\r\n\r\nconst store = new Vuex.Store()\r\n\r\nexport { store }\r\n\r\n\r\n\r\nconst debug = process.env.NODE_ENV !== 'production';\r\n\r\nexport default new Vuex.Store({\r\n /**\r\n * Assign the modules to the store\r\n */\r\n modules: {\r\n 'rect': rect,\r\n 'chartRender': chartRender,\r\n 'chartSetting': chartSetting\r\n },\r\n\r\n /**\r\n * If strict mode should be enabled\r\n */\r\n strict: debug\r\n});\r\n","import store from '../store'\r\nimport Vue from 'vue'\r\nimport { generateRandomKey, deepCopy, replaceHtml, getRowColCheck, getRangeSplitArray, getChartDataCache , getChartDataSeriesOrder , addDataToOption } from '../utils/util'\r\nimport { chartOptions } from '../data/chartJson'\r\n\r\nfunction initChart(outDom) {\r\n let dom = document.createElement('div')\r\n dom.id = 'chartmix'\r\n outDom.appendChild(dom);\r\n\r\n new Vue({\r\n el: '#chartmix',\r\n store,\r\n computed: {\r\n chartOptions() {\r\n if (!store.state.chartSetting.currentChartIndex) {\r\n return null\r\n }\r\n return store.state.chartSetting.chartLists[store.state.chartSetting.currentChartIndex].chartOptions\r\n }\r\n },\r\n template: ``\r\n })\r\n\r\n}\r\n\r\n// 创建图表,返回dom便于后续操作\r\nfunction createChart(outDom, chartData) {\r\n\r\n let chart_id = generateRandomKey('chart')\r\n\r\n chartOptions.defaultOption.series = []\r\n\r\n // 随机生成图表\r\n let ratio = Math.random()*10\r\n if(ratio > 5){\r\n chartOptions.chartAllType = 'echarts|pie|default'\r\n }else{\r\n chartOptions.chartAllType = 'echarts|line|default'\r\n }\r\n\r\n // 生成图表数据机构\r\n let chartOption = insertNewChart(chartOptions , chart_id , chartOptions.chartAllType , chartData)\r\n\r\n let renderDom = document.createElement('div')\r\n renderDom.id = 'render' + chart_id\r\n\r\n let modelChartShowHTML =\r\n '
${content}
'\r\n\r\n let chart_id_c = chart_id + '_c'\r\n\r\n let $t = $(\r\n replaceHtml(modelChartShowHTML, {\r\n id: chart_id_c,\r\n addclass: 'jfgrid-data-visualization-chart',\r\n title: '图表生成',\r\n content: ''\r\n })\r\n ).appendTo($(outDom))\r\n\r\n $t.find('.jfgrid-modal-dialog-content').attr('id', chart_id)\r\n\r\n $('.jfgrid-modal-dialog-content').append(renderDom)\r\n\r\n store.state.chartSetting.currentChartIndex = store.state.chartSetting.chartLists.length\r\n store.state.chartSetting.chartLists.push({\r\n 'chart_id': chart_id,\r\n 'active': true,\r\n 'chartOptions': deepCopy(chartOption)\r\n })\r\n\r\n console.dir(chartOption)\r\n\r\n new Vue({\r\n el: '#render' + chart_id,\r\n store,\r\n data() {\r\n return {\r\n chart_id\r\n }\r\n },\r\n computed: {\r\n options() {\r\n console.dir(this.chart_id)\r\n return store.state.chartSetting.chartLists.find(item => item.chart_id == this.chart_id).chartOptions\r\n },\r\n active() {\r\n return store.state.chartSetting.chartLists.find(item => item.chart_id == this.chart_id).active\r\n }\r\n },\r\n template: ``\r\n })\r\n\r\n let render = document.getElementById(chart_id)\r\n let container = document.getElementById(chart_id + '_c')\r\n return {\r\n container,\r\n render\r\n }\r\n}\r\n\r\n// insertChart\r\nfunction insertNewChart (\r\n chartOptions,\r\n chart_id,\r\n chartAllType,\r\n chartData,\r\n chartTheme,\r\n height,\r\n width,\r\n left,\r\n top\r\n) {\r\n var chart_json = {}\r\n\r\n var chartAllTypeArray = chartAllType.split('|')\r\n\r\n var chartPro = chartAllTypeArray[0],\r\n chartType = chartAllTypeArray[1],\r\n chartStyle = chartAllTypeArray[2]\r\n\r\n chart_json.chart_id = chart_id\r\n chart_json.chartAllType = chartAllType\r\n chart_json.chartPro = chartPro\r\n chart_json.chartType = chartType\r\n chart_json.chartStyle = chartStyle\r\n\r\n chart_json.height = height\r\n chart_json.width = width\r\n chart_json.left = left\r\n chart_json.top = top\r\n\r\n //按照图表类型得到图表的默认设置\r\n var defaultOptionIni = chartOptions.defaultOption\r\n //数据的sheet索引\r\n chart_json.chartData = chartData\r\n\r\n //根据数据集得到按钮状态,rangeColCheck表示首列是否标题,rangeRowCheck表示首行是否标题,rangeConfigCheck表示是否转置。\r\n var rowColCheck = getRowColCheck(chartData)\r\n var rangeRowCheck = rowColCheck[0],\r\n rangeColCheck = rowColCheck[1],\r\n rangeConfigCheck = false\r\n\r\n chart_json.rangeColCheck = rangeColCheck\r\n chart_json.rangeRowCheck = rangeRowCheck\r\n chart_json.rangeConfigCheck = rangeConfigCheck\r\n\r\n //按照数据范围文字得到具体数据范围\r\n var rangeSplitArray = getRangeSplitArray(\r\n chartData,\r\n rangeColCheck,\r\n rangeRowCheck\r\n )\r\n chart_json.rangeSplitArray = rangeSplitArray\r\n\r\n //根据数据集、功能按钮状态、图表类型,得到图表可操作的数据格式,例如:{ \"x\":[], \"y\":[], series:[] },可以按照次格式渲染数据页中的系列和轴控件。\r\n //数据为一行且为汉字的时候,chartDataCache的series为空数组\r\n var chartDataCache = getChartDataCache(\r\n chartData,\r\n rangeSplitArray,\r\n chartPro,\r\n chartType,\r\n chartStyle\r\n )\r\n chart_json.chartDataCache = chartDataCache\r\n\r\n //生成默认的系列顺序,默认根据series数组的位置,用户可以在界面上操作更改这个位置。\r\n var chartDataSeriesOrder = getChartDataSeriesOrder(\r\n chartDataCache.series[0].length\r\n )\r\n\r\n chart_json.chartDataSeriesOrder = chartDataSeriesOrder\r\n\r\n //设置图表皮肤\r\n chart_json.chartTheme = chartTheme\r\n\r\n //根据图表的默认设置、图表数据、图表系列顺序,等到一个完整的图表配置串。\r\n var defaultOption = addDataToOption(\r\n defaultOptionIni,\r\n chartDataCache,\r\n chartDataSeriesOrder,\r\n chartPro,\r\n chartType,\r\n chartStyle\r\n )\r\n\r\n //根据图表厂商选择渲染引擎,并根据设置渲染出图表\r\n chart_json.defaultOption = defaultOption\r\n return chart_json\r\n}\r\n\r\n// highlight current chart\r\nfunction highlightChart(id){\r\n let index = store.state.chartSetting.chartLists.findIndex(item => item.chart_id == id)\r\n store.state.chartSetting.currentChartIndex = index\r\n}\r\n\r\n\r\nexport {\r\n initChart,\r\n createChart,\r\n highlightChart\r\n}","// import single vue component\r\nimport ChartSetting from './ChartMix/ChartSetting.vue'\r\nimport chartSetting from '../store/modules/chartSetting'\r\nimport ChartRender from './ChartMix/ChartRender.vue'\r\nimport { initChart , createChart , highlightChart } from '../utils/exportUtil'\r\n\r\n// all components\r\nconst components = [\r\n ChartSetting,\r\n ChartRender\r\n]\r\n\r\n/**\r\n * define install function\r\n *\r\n * @param {Object} Vue \r\n * @param {Object} [options={}] \r\n */\r\nconst install = function (Vue, options = {}) {\r\n if (!install.componentInstalled) {\r\n // map and register all global components\r\n components.map(component => {\r\n Vue.component(component.name, component)\r\n })\r\n\r\n install.componentInstalled = true\r\n }\r\n\r\n if (!install.storeRegistered) {\r\n // register store\r\n if (!options.store) {\r\n console.log('Please provide a store!!')\r\n } else {\r\n options.store.registerModule('chartSetting', chartSetting)\r\n\r\n install.storeRegistered = true;\r\n }\r\n }\r\n\r\n}\r\n\r\nif (typeof window !== 'undefined' && window.Vue) {\r\n install(window.Vue)\r\n}\r\n\r\nexport default {\r\n // must use install function\r\n install,\r\n // components list\r\n ...components,\r\n initChart,\r\n createChart,\r\n highlightChart\r\n // ChartSetting,\r\n // ChartRender\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Eventful = require(\"zrender/lib/mixin/Eventful\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar interactionMutex = require(\"./interactionMutex\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar map = zrUtil.map;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: 'rgba(0,0,0,0.3)',\n fill: 'rgba(0,0,0,0.1)'\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * @alias module:echarts/component/helper/BrushController\n * @constructor\n * @mixin {module:zrender/mixin/Eventful}\n * @event module:echarts/component/helper/BrushController#brush\n * params:\n * areas: Array., coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n *\n * @param {module:zrender/zrender~ZRender} zr\n */\n\nfunction BrushController(zr) {\n Eventful.call(this);\n /**\n * @type {module:zrender/zrender~ZRender}\n * @private\n */\n\n this._zr = zr;\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n\n this.group = new graphic.Group();\n /**\n * Only for drawing (after enabledBrush).\n * 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * Only for drawing (after enabledBrush).\n *\n * @private\n * @type {Object}\n */\n\n this._brushOption;\n /**\n * @private\n * @type {Object}\n */\n\n this._panels;\n /**\n * @private\n * @type {Array.}\n */\n\n this._track = [];\n /**\n * @private\n * @type {boolean}\n */\n\n this._dragging;\n /**\n * @private\n * @type {Array}\n */\n\n this._covers = [];\n /**\n * @private\n * @type {moudule:zrender/container/Group}\n */\n\n this._creatingCover;\n /**\n * `true` means global panel\n * @private\n * @type {module:zrender/container/Group|boolean}\n */\n\n this._creatingPanel;\n /**\n * @private\n * @type {boolean}\n */\n\n this._enableGlobalPan;\n /**\n * @private\n * @type {boolean}\n */\n\n /**\n * @private\n * @type {string}\n */\n this._uid = 'brushController_' + baseUID++;\n /**\n * @private\n * @type {Object}\n */\n\n this._handlers = {};\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = zrUtil.bind(handler, this);\n }, this);\n}\n\nBrushController.prototype = {\n constructor: BrushController,\n\n /**\n * If set to null/undefined/false, select disabled.\n * @param {Object} brushOption\n * @param {string|boolean} brushOption.brushType 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType.\n * ('auto' can not be used in global panel)\n * @param {number} [brushOption.brushMode='single'] 'single' or 'multiple'\n * @param {boolean} [brushOption.transformable=true]\n * @param {boolean} [brushOption.removeOnClick=false]\n * @param {Object} [brushOption.brushStyle]\n * @param {number} [brushOption.brushStyle.width]\n * @param {number} [brushOption.brushStyle.lineWidth]\n * @param {string} [brushOption.brushStyle.stroke]\n * @param {string} [brushOption.brushStyle.fill]\n * @param {number} [brushOption.z]\n */\n enableBrush: function (brushOption) {\n this._brushType && doDisableBrush(this);\n brushOption.brushType && doEnableBrush(this, brushOption);\n return this;\n },\n\n /**\n * @param {Array.} panelOpts If not pass, it is global brush.\n * Each items: {\n * panelId, // mandatory.\n * clipPath, // mandatory. function.\n * isTargetByCursor, // mandatory. function.\n * defaultBrushType, // optional, only used when brushType is 'auto'.\n * getLinearBrushOtherExtent, // optional. function.\n * }\n */\n setPanels: function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels = this._panels = {};\n zrUtil.each(panelOpts, function (panelOpts) {\n panels[panelOpts.panelId] = zrUtil.clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n\n return this;\n },\n\n /**\n * @param {Object} [opt]\n * @return {boolean} [opt.enableGlobalPan=false]\n */\n mount: function (opt) {\n opt = opt || {};\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n\n this._zr.add(thisGroup);\n\n thisGroup.attr({\n position: opt.position || [0, 0],\n rotation: opt.rotation || 0,\n scale: opt.scale || [1, 1]\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n },\n eachCover: function (cb, context) {\n each(this._covers, cb, context);\n },\n\n /**\n * Update covers.\n * @param {Array.} brushOptionList Like:\n * [\n * {id: 'xx', brushType: 'line', range: [23, 44], brushStyle, transformable},\n * {id: 'yy', brushType: 'rect', range: [[23, 44], [23, 54]]},\n * ...\n * ]\n * `brushType` is required in each cover info. (can not be 'auto')\n * `id` is not mandatory.\n * `brushStyle`, `transformable` is not mandatory, use DEFAULT_BRUSH_OPT by default.\n * If brushOptionList is null/undefined, all covers removed.\n */\n updateCovers: function (brushOptionList) {\n brushOptionList = zrUtil.map(brushOptionList, function (brushOption) {\n return zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushOption = brushOptionList[newIndex]; // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbiden.\n\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushOption, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushOption));\n updateCoverAfterCreation(controller, cover);\n }\n }\n\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n },\n unmount: function () {\n this.enableBrush(false); // container may 'removeAll' outside.\n\n clearCovers(this);\n\n this._zr.remove(this.group);\n\n return this;\n },\n dispose: function () {\n this.unmount();\n this.off();\n }\n};\nzrUtil.mixin(BrushController, Eventful);\n\nfunction doEnableBrush(controller, brushOption) {\n var zr = controller._zr; // Consider roam, which takes globalPan too.\n\n if (!controller._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid);\n }\n\n mountHandlers(zr, controller._handlers);\n controller._brushType = brushOption.brushType;\n controller._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n}\n\nfunction doDisableBrush(controller) {\n var zr = controller._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid);\n unmountHandlers(zr, controller._handlers);\n controller._brushType = controller._brushOption = null;\n}\n\nfunction mountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n}\n\nfunction unmountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n}\n\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\n\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n\n return creatingCover;\n}\n\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\n\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\n\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\n\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n} // return target panel or `true` (means global panel)\n\n\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n} // Return a panel or true\n\n\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panelId = cover.__brushOption.panelId; // User may give cover without coord sys info,\n // which is then treated as global panel.\n\n return panelId != null ? panels[panelId] : true;\n}\n\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\n\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = zrUtil.clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', areas, {\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\n\nfunction shouldShowCover(controller) {\n var track = controller._track;\n\n if (!track.length) {\n return false;\n }\n\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\n\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n\nfunction createBaseRectCover(doDrift, controller, brushOption, edgeNames) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(doDrift, controller, cover, 'nswe'),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNames, function (name) {\n cover.add(new graphic.Rect({\n name: name,\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(doDrift, controller, cover, name),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\n\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\n\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each(['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], function (name) {\n var el = cover.childOfName(name);\n var globalDir = getGlobalDirection(controller, name);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\n\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\n\nfunction makeStyle(brushOption) {\n return zrUtil.defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\n\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], // x range\n [min[1], max[1]] // y range\n ];\n}\n\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\n\nfunction getGlobalDirection(controller, localDirection) {\n if (localDirection.length > 1) {\n localDirection = localDirection.split('');\n var globalDir = [getGlobalDirection(controller, localDirection[0]), getGlobalDirection(controller, localDirection[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n } else {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var globalDir = graphic.transformDirection(map[localDirection], getTransform(controller));\n return inverseMap[globalDir];\n }\n}\n\nfunction driftRect(toRectRange, fromRectRange, controller, cover, name, dx, dy, e) {\n var brushOption = cover.__brushOption;\n var rectRange = toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(name.split(''), function (namePart) {\n var ind = DIRECTION_MAP[namePart];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction driftPolygon(controller, cover, dx, dy, e) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\n\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== true ? panel.clipPath(data, controller._transform) : zrUtil.clone(data);\n}\n\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\n\nfunction resetCursor(controller, e, localCursorPoint) {\n if ( // Check active\n !controller._brushType // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e)) {\n return;\n }\n\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint); // Check whether in covers.\n\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n\n if (currPanel && (currPanel === true || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n\n currPanel && zr.setCursorStyle('crosshair');\n}\n\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\n\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\n\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n\n controller._track.push(localCursorPoint.slice());\n\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = zrUtil.clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === true ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n\n controller._covers.push(creatingCover);\n }\n\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n\n return eventParams;\n}\n\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n return panel.defaultBrushType;\n }\n\n return brushType;\n}\n\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mose out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\n\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null; // trigger event shoule be at final, after procedure will be nested.\n\n eventParams && trigger(controller, eventParams);\n }\n}\n\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n * @type {Object}\n */\n\n\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n return range;\n }, function (range) {\n return range;\n }), controller, brushOption, ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw']);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape.\n\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\n\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n }, function (rectRange) {\n return rectRange[xyIndex];\n }), controller, brushOption, [['w', 'e'], ['n', 's']][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent; // If brushWidth not specified, fit the panel.\n\n var panel = getPanelByCover(controller, cover);\n\n if (panel !== true && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex, controller._transform);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\n\nvar _default = BrushController;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar RadiusAxis = require(\"./RadiusAxis\");\n\nvar AngleAxis = require(\"./AngleAxis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @module echarts/coord/polar/Polar\n */\n\n/**\n * @alias {module:echarts/coord/polar/Polar}\n * @constructor\n * @param {string} name\n */\nvar Polar = function (name) {\n /**\n * @type {string}\n */\n this.name = name || '';\n /**\n * x of polar center\n * @type {number}\n */\n\n this.cx = 0;\n /**\n * y of polar center\n * @type {number}\n */\n\n this.cy = 0;\n /**\n * @type {module:echarts/coord/polar/RadiusAxis}\n * @private\n */\n\n this._radiusAxis = new RadiusAxis();\n /**\n * @type {module:echarts/coord/polar/AngleAxis}\n * @private\n */\n\n this._angleAxis = new AngleAxis();\n this._radiusAxis.polar = this._angleAxis.polar = this;\n};\n\nPolar.prototype = {\n type: 'polar',\n axisPointerEnabled: true,\n constructor: Polar,\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['radius', 'angle'],\n\n /**\n * @type {module:echarts/coord/PolarModel}\n */\n model: null,\n\n /**\n * If contain coord\n * @param {Array.} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n },\n\n /**\n * If contain data\n * @param {Array.} data\n * @return {boolean}\n */\n containData: function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n },\n\n /**\n * @param {string} dim\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxis: function (dim) {\n return this['_' + dim + 'Axis'];\n },\n\n /**\n * @return {Array.}\n */\n getAxes: function () {\n return [this._radiusAxis, this._angleAxis];\n },\n\n /**\n * Get axes by type of scale\n * @param {string} scaleType\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxesByScale: function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n },\n\n /**\n * @return {module:echarts/coord/polar/AngleAxis}\n */\n getAngleAxis: function () {\n return this._angleAxis;\n },\n\n /**\n * @return {module:echarts/coord/polar/RadiusAxis}\n */\n getRadiusAxis: function () {\n return this._radiusAxis;\n },\n\n /**\n * @param {module:echarts/coord/polar/Axis}\n * @return {module:echarts/coord/polar/Axis}\n */\n getOtherAxis: function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n },\n\n /**\n * Base axis will be used on stacking.\n *\n * @return {module:echarts/coord/polar/Axis}\n */\n getBaseAxis: function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n },\n\n /**\n * @param {string} [dim] 'radius' or 'angle' or 'auto' or null/undefined\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n getTooltipAxes: function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n },\n\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n * @param {Array.} data\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n dataToPoint: function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n },\n\n /**\n * Convert a (x, y) point to data\n * @param {Array.} point\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n pointToData: function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n },\n\n /**\n * Convert a (x, y) point to (radius, angle) coord\n * @param {Array.} point\n * @return {Array.}\n */\n pointToCoord: function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]); // Fix fixed extent in polarCreator\n // FIXME\n\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180; // move to angleExtent\n\n var dir = radian < minAngle ? 1 : -1;\n\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n\n return [radius, radian];\n },\n\n /**\n * Convert a (radius, angle) coord to (x, y) point\n * @param {Array.} coord\n * @return {Array.}\n */\n coordToPoint: function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx; // Inverse the y\n\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n },\n\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n * @return {Ring}\n */\n getArea: function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n var d2 = dx * dx + dy * dy;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n }\n};\nvar _default = Polar;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Gradient = require(\"zrender/lib/graphic/Gradient\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isFunction = _util.isFunction;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = {\n createOnAllSeries: true,\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.color').split('.'); // Set in itemStyle\n\n var color = seriesModel.get(colorAccessPath);\n var colorCallback = isFunction(color) && !(color instanceof Gradient) ? color : null; // Default color\n\n if (!color || colorCallback) {\n color = seriesModel.getColorFromPalette( // TODO series count changed.\n seriesModel.name, null, ecModel.getSeriesCount());\n }\n\n data.setVisual('color', color);\n var borderColorAccessPath = (seriesModel.visualBorderColorAccessPath || 'itemStyle.borderColor').split('.');\n var borderColor = seriesModel.get(borderColorAccessPath);\n data.setVisual('borderColor', borderColor); // Only visible series has each data be visual encoded\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n if (colorCallback) {\n data.each(function (idx) {\n data.setItemVisual(idx, 'color', colorCallback(seriesModel.getDataParams(idx)));\n });\n } // itemStyle in each data item\n\n\n var dataEach = function (data, idx) {\n var itemModel = data.getItemModel(idx);\n var color = itemModel.get(colorAccessPath, true);\n var borderColor = itemModel.get(borderColorAccessPath, true);\n\n if (color != null) {\n data.setItemVisual(idx, 'color', color);\n }\n\n if (borderColor != null) {\n data.setItemVisual(idx, 'borderColor', borderColor);\n }\n };\n\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n }\n};\nmodule.exports = _default;","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n } // Return NaN if count is 0\n\n\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(min) ? min : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\n\nvar indexSampler = function (frame, value) {\n return Math.round(frame.length / 2);\n};\n\nfunction _default(seriesType) {\n return {\n seriesType: seriesType,\n modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem; // Only cartesian2d support down sampling\n\n if (coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent(); // Coordinste system has been resized\n\n var size = extent[1] - extent[0];\n var rate = Math.round(data.count() / size);\n\n if (rate > 1) {\n var sampler;\n\n if (typeof sampling === 'string') {\n sampler = samplers[sampling];\n } else if (typeof sampling === 'function') {\n sampler = sampling;\n }\n\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar graphicUtil = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PATH_COLOR = ['textStyle', 'color'];\nvar _default = {\n /**\n * Get color property or get color from option.textStyle.color\n * @param {boolean} [isEmphasis]\n * @return {string}\n */\n getTextColor: function (isEmphasis) {\n var ecModel = this.ecModel;\n return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);\n },\n\n /**\n * Create font string from fontStyle, fontWeight, fontSize, fontFamily\n * @return {string}\n */\n getFont: function () {\n return graphicUtil.getFont({\n fontStyle: this.getShallow('fontStyle'),\n fontWeight: this.getShallow('fontWeight'),\n fontSize: this.getShallow('fontSize'),\n fontFamily: this.getShallow('fontFamily')\n }, this.ecModel);\n },\n getTextRect: function (text) {\n return textContain.getBoundingRect(text, this.getFont(), this.getShallow('align'), this.getShallow('verticalAlign') || this.getShallow('baseline'), this.getShallow('padding'), this.getShallow('lineHeight'), this.getShallow('rich'), this.getShallow('truncateText'));\n }\n};\nmodule.exports = _default;","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar _whiskerBoxCommon = require(\"../helper/whiskerBoxCommon\");\n\nvar seriesModelMixin = _whiskerBoxCommon.seriesModelMixin;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar BoxplotSeries = SeriesModel.extend({\n type: 'series.boxplot',\n dependencies: ['xAxis', 'yAxis', 'grid'],\n // TODO\n // box width represents group size, so dimension should have 'size'.\n\n /**\n * @see \n * The meanings of 'min' and 'max' depend on user,\n * and echarts do not need to know it.\n * @readOnly\n */\n defaultValueDimensions: [{\n name: 'min',\n defaultTooltip: true\n }, {\n name: 'Q1',\n defaultTooltip: true\n }, {\n name: 'median',\n defaultTooltip: true\n }, {\n name: 'Q3',\n defaultTooltip: true\n }, {\n name: 'max',\n defaultTooltip: true\n }],\n\n /**\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * @override\n */\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n // 'horizontal' or 'vertical'\n boxWidth: [7, 50],\n // [min, max] can be percent of band width.\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\n emphasis: {\n itemStyle: {\n borderWidth: 2,\n shadowBlur: 5,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(0,0,0,0.4)'\n }\n },\n animationEasing: 'elasticOut',\n animationDuration: 800\n }\n});\nzrUtil.mixin(BoxplotSeries, seriesModelMixin, true);\nvar _default = BoxplotSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar featureManager = require(\"../featureManager\");\n\nvar lang = require(\"../../../lang\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar brushLang = lang.toolbox.brush;\n\nfunction Brush(model, ecModel, api) {\n this.model = model;\n this.ecModel = ecModel;\n this.api = api;\n /**\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * @private\n * @type {string}\n */\n\n this._brushMode;\n}\n\nBrush.defaultOption = {\n show: true,\n type: ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'],\n icon: {\n /* eslint-disable */\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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' // jshint ignore:line\n\n /* eslint-enable */\n\n },\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: zrUtil.clone(brushLang.title)\n};\nvar proto = Brush.prototype; // proto.updateLayout = function (featureModel, ecModel, api) {\n\n/* eslint-disable */\n\nproto.render =\n/* eslint-enable */\nproto.updateView = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed |= brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n};\n\nproto.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n};\n\nproto.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n};\n\nfeatureManager.register('brush', Brush);\nvar _default = Brush;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar AxisBuilder = require(\"../axis/AxisBuilder\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {module:echarts/model/Model} axisPointerModel\n */\nfunction buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\n\n\nfunction buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get('label.precision'),\n formatter: axisPointerModel.get('label.formatter')\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2]; // Adjust by align.\n\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2); // Not overflow ec container\n\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get('axisLine.lineStyle.color');\n }\n\n elOption.label = {\n shape: {\n x: 0,\n y: 0,\n width: width,\n height: height,\n r: labelModel.get('borderRadius')\n },\n position: position.slice(),\n // TODO: rich\n style: {\n text: text,\n textFont: font,\n textFill: labelModel.getTextColor(),\n textPosition: 'inside',\n textPadding: paddings,\n fill: bgColor,\n stroke: labelModel.get('borderColor') || 'transparent',\n lineWidth: labelModel.get('borderWidth') || 0,\n shadowBlur: labelModel.get('shadowBlur'),\n shadowColor: labelModel.get('shadowColor'),\n shadowOffsetX: labelModel.get('shadowOffsetX'),\n shadowOffsetY: labelModel.get('shadowOffsetY')\n },\n // Lable should be over axisPointer.\n z2: 10\n };\n} // Do not overflow ec container\n\n\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\n/**\n * @param {number} value\n * @param {module:echarts/coord/Axis} axis\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} opt\n * @param {Array.} seriesDataIndices\n * @param {number|string} opt.precision 'auto' or a number\n * @param {string|Function} opt.formatter label formatter\n */\n\n\nfunction getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel( // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n value, {\n precision: opt.precision\n });\n var formatter = opt.formatter;\n\n if (formatter) {\n var params = {\n value: axisHelper.getAxisRawValue(axis, value),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params.seriesData.push(dataParams);\n });\n\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params);\n }\n }\n\n return text;\n}\n/**\n * @param {module:echarts/coord/Axis} axis\n * @param {number} value\n * @param {Object} layoutInfo {\n * rotation, position, labelOffset, labelDirection, labelMargin\n * }\n */\n\n\nfunction getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\n\nfunction buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get('label.margin');\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\n/**\n * @param {Array.} p1\n * @param {Array.} p2\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\n/**\n * @param {Array.} xy\n * @param {Array.} wh\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\n\nfunction makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}\n\nexports.buildElStyle = buildElStyle;\nexports.buildLabelElOption = buildLabelElOption;\nexports.getValueLabel = getValueLabel;\nexports.getTransformedPosition = getTransformedPosition;\nexports.buildCartesianSingleLabelElOption = buildCartesianSingleLabelElOption;\nexports.makeLineShape = makeLineShape;\nexports.makeRectShape = makeRectShape;\nexports.makeSectorShape = makeSectorShape;"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.css b/src/expendPlugins/chart/chartmix.css new file mode 100644 index 000000000..b7ca51e83 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.css @@ -0,0 +1 @@ +.title{font-weight:700}.el-row{font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chartSetting{width:100%;height:100%} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.0.js b/src/expendPlugins/chart/chartmix.umd.0.js new file mode 100644 index 000000000..a7c7d0f7a --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.0.js @@ -0,0 +1,1034 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[0],{ + +/***/ "2f62": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export Store */ +/* unused harmony export createNamespacedHelpers */ +/* unused harmony export install */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mapActions; }); +/* unused harmony export mapGetters */ +/* unused harmony export mapMutations */ +/* unused harmony export mapState */ +/*! + * vuex v3.4.0 + * (c) 2020 Evan You + * @license MIT + */ +function applyMixin (Vue) { + var version = Number(Vue.version.split('.')[0]); + + if (version >= 2) { + Vue.mixin({ beforeCreate: vuexInit }); + } else { + // override init and inject vuex init procedure + // for 1.x backwards compatibility. + var _init = Vue.prototype._init; + Vue.prototype._init = function (options) { + if ( options === void 0 ) options = {}; + + options.init = options.init + ? [vuexInit].concat(options.init) + : vuexInit; + _init.call(this, options); + }; + } + + /** + * Vuex init hook, injected into each instances init hooks list. + */ + + function vuexInit () { + var options = this.$options; + // store injection + if (options.store) { + this.$store = typeof options.store === 'function' + ? options.store() + : options.store; + } else if (options.parent && options.parent.$store) { + this.$store = options.parent.$store; + } + } +} + +var target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +function devtoolPlugin (store) { + if (!devtoolHook) { return } + + store._devtoolHook = devtoolHook; + + devtoolHook.emit('vuex:init', store); + + devtoolHook.on('vuex:travel-to-state', function (targetState) { + store.replaceState(targetState); + }); + + store.subscribe(function (mutation, state) { + devtoolHook.emit('vuex:mutation', mutation, state); + }, { prepend: true }); + + store.subscribeAction(function (action, state) { + devtoolHook.emit('vuex:action', action, state); + }, { prepend: true }); +} + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ + +/** + * forEach for object + */ +function forEachValue (obj, fn) { + Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); +} + +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} + +function isPromise (val) { + return val && typeof val.then === 'function' +} + +function assert (condition, msg) { + if (!condition) { throw new Error(("[vuex] " + msg)) } +} + +function partial (fn, arg) { + return function () { + return fn(arg) + } +} + +// Base data struct for store's module, package with some attribute and method +var Module = function Module (rawModule, runtime) { + this.runtime = runtime; + // Store some children item + this._children = Object.create(null); + // Store the origin module object which passed by programmer + this._rawModule = rawModule; + var rawState = rawModule.state; + + // Store the origin module's state + this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; +}; + +var prototypeAccessors = { namespaced: { configurable: true } }; + +prototypeAccessors.namespaced.get = function () { + return !!this._rawModule.namespaced +}; + +Module.prototype.addChild = function addChild (key, module) { + this._children[key] = module; +}; + +Module.prototype.removeChild = function removeChild (key) { + delete this._children[key]; +}; + +Module.prototype.getChild = function getChild (key) { + return this._children[key] +}; + +Module.prototype.hasChild = function hasChild (key) { + return key in this._children +}; + +Module.prototype.update = function update (rawModule) { + this._rawModule.namespaced = rawModule.namespaced; + if (rawModule.actions) { + this._rawModule.actions = rawModule.actions; + } + if (rawModule.mutations) { + this._rawModule.mutations = rawModule.mutations; + } + if (rawModule.getters) { + this._rawModule.getters = rawModule.getters; + } +}; + +Module.prototype.forEachChild = function forEachChild (fn) { + forEachValue(this._children, fn); +}; + +Module.prototype.forEachGetter = function forEachGetter (fn) { + if (this._rawModule.getters) { + forEachValue(this._rawModule.getters, fn); + } +}; + +Module.prototype.forEachAction = function forEachAction (fn) { + if (this._rawModule.actions) { + forEachValue(this._rawModule.actions, fn); + } +}; + +Module.prototype.forEachMutation = function forEachMutation (fn) { + if (this._rawModule.mutations) { + forEachValue(this._rawModule.mutations, fn); + } +}; + +Object.defineProperties( Module.prototype, prototypeAccessors ); + +var ModuleCollection = function ModuleCollection (rawRootModule) { + // register root module (Vuex.Store options) + this.register([], rawRootModule, false); +}; + +ModuleCollection.prototype.get = function get (path) { + return path.reduce(function (module, key) { + return module.getChild(key) + }, this.root) +}; + +ModuleCollection.prototype.getNamespace = function getNamespace (path) { + var module = this.root; + return path.reduce(function (namespace, key) { + module = module.getChild(key); + return namespace + (module.namespaced ? key + '/' : '') + }, '') +}; + +ModuleCollection.prototype.update = function update$1 (rawRootModule) { + update([], this.root, rawRootModule); +}; + +ModuleCollection.prototype.register = function register (path, rawModule, runtime) { + var this$1 = this; + if ( runtime === void 0 ) runtime = true; + + if ((false)) {} + + var newModule = new Module(rawModule, runtime); + if (path.length === 0) { + this.root = newModule; + } else { + var parent = this.get(path.slice(0, -1)); + parent.addChild(path[path.length - 1], newModule); + } + + // register nested modules + if (rawModule.modules) { + forEachValue(rawModule.modules, function (rawChildModule, key) { + this$1.register(path.concat(key), rawChildModule, runtime); + }); + } +}; + +ModuleCollection.prototype.unregister = function unregister (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + if (!parent.getChild(key).runtime) { return } + + parent.removeChild(key); +}; + +ModuleCollection.prototype.isRegistered = function isRegistered (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + + return parent.hasChild(key) +}; + +function update (path, targetModule, newModule) { + if ((false)) {} + + // update target module + targetModule.update(newModule); + + // update nested modules + if (newModule.modules) { + for (var key in newModule.modules) { + if (!targetModule.getChild(key)) { + if ((false)) {} + return + } + update( + path.concat(key), + targetModule.getChild(key), + newModule.modules[key] + ); + } + } +} + +var functionAssert = { + assert: function (value) { return typeof value === 'function'; }, + expected: 'function' +}; + +var objectAssert = { + assert: function (value) { return typeof value === 'function' || + (typeof value === 'object' && typeof value.handler === 'function'); }, + expected: 'function or object with "handler" function' +}; + +var assertTypes = { + getters: functionAssert, + mutations: functionAssert, + actions: objectAssert +}; + +function assertRawModule (path, rawModule) { + Object.keys(assertTypes).forEach(function (key) { + if (!rawModule[key]) { return } + + var assertOptions = assertTypes[key]; + + forEachValue(rawModule[key], function (value, type) { + assert( + assertOptions.assert(value), + makeAssertionMessage(path, key, type, value, assertOptions.expected) + ); + }); + }); +} + +function makeAssertionMessage (path, key, type, value, expected) { + var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; + if (path.length > 0) { + buf += " in module \"" + (path.join('.')) + "\""; + } + buf += " is " + (JSON.stringify(value)) + "."; + return buf +} + +var Vue; // bind on install + +var Store = function Store (options) { + var this$1 = this; + if ( options === void 0 ) options = {}; + + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #731 + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + if ((false)) {} + + var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; + var strict = options.strict; if ( strict === void 0 ) strict = false; + + // store internal state + this._committing = false; + this._actions = Object.create(null); + this._actionSubscribers = []; + this._mutations = Object.create(null); + this._wrappedGetters = Object.create(null); + this._modules = new ModuleCollection(options); + this._modulesNamespaceMap = Object.create(null); + this._subscribers = []; + this._watcherVM = new Vue(); + this._makeLocalGettersCache = Object.create(null); + + // bind commit and dispatch to self + var store = this; + var ref = this; + var dispatch = ref.dispatch; + var commit = ref.commit; + this.dispatch = function boundDispatch (type, payload) { + return dispatch.call(store, type, payload) + }; + this.commit = function boundCommit (type, payload, options) { + return commit.call(store, type, payload, options) + }; + + // strict mode + this.strict = strict; + + var state = this._modules.root.state; + + // init root module. + // this also recursively registers all sub-modules + // and collects all module getters inside this._wrappedGetters + installModule(this, state, [], this._modules.root); + + // initialize the store vm, which is responsible for the reactivity + // (also registers _wrappedGetters as computed properties) + resetStoreVM(this, state); + + // apply plugins + plugins.forEach(function (plugin) { return plugin(this$1); }); + + var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools; + if (useDevtools) { + devtoolPlugin(this); + } +}; + +var prototypeAccessors$1 = { state: { configurable: true } }; + +prototypeAccessors$1.state.get = function () { + return this._vm._data.$$state +}; + +prototypeAccessors$1.state.set = function (v) { + if ((false)) {} +}; + +Store.prototype.commit = function commit (_type, _payload, _options) { + var this$1 = this; + + // check object-style commit + var ref = unifyObjectStyle(_type, _payload, _options); + var type = ref.type; + var payload = ref.payload; + var options = ref.options; + + var mutation = { type: type, payload: payload }; + var entry = this._mutations[type]; + if (!entry) { + if ((false)) {} + return + } + this._withCommit(function () { + entry.forEach(function commitIterator (handler) { + handler(payload); + }); + }); + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(function (sub) { return sub(mutation, this$1.state); }); + + if ( + false + ) {} +}; + +Store.prototype.dispatch = function dispatch (_type, _payload) { + var this$1 = this; + + // check object-style dispatch + var ref = unifyObjectStyle(_type, _payload); + var type = ref.type; + var payload = ref.payload; + + var action = { type: type, payload: payload }; + var entry = this._actions[type]; + if (!entry) { + if ((false)) {} + return + } + + try { + this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .filter(function (sub) { return sub.before; }) + .forEach(function (sub) { return sub.before(action, this$1.state); }); + } catch (e) { + if ((false)) {} + } + + var result = entry.length > 1 + ? Promise.all(entry.map(function (handler) { return handler(payload); })) + : entry[0](payload); + + return new Promise(function (resolve, reject) { + result.then(function (res) { + try { + this$1._actionSubscribers + .filter(function (sub) { return sub.after; }) + .forEach(function (sub) { return sub.after(action, this$1.state); }); + } catch (e) { + if ((false)) {} + } + resolve(res); + }, function (error) { + try { + this$1._actionSubscribers + .filter(function (sub) { return sub.error; }) + .forEach(function (sub) { return sub.error(action, this$1.state, error); }); + } catch (e) { + if ((false)) {} + } + reject(error); + }); + }) +}; + +Store.prototype.subscribe = function subscribe (fn, options) { + return genericSubscribe(fn, this._subscribers, options) +}; + +Store.prototype.subscribeAction = function subscribeAction (fn, options) { + var subs = typeof fn === 'function' ? { before: fn } : fn; + return genericSubscribe(subs, this._actionSubscribers, options) +}; + +Store.prototype.watch = function watch (getter, cb, options) { + var this$1 = this; + + if ((false)) {} + return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) +}; + +Store.prototype.replaceState = function replaceState (state) { + var this$1 = this; + + this._withCommit(function () { + this$1._vm._data.$$state = state; + }); +}; + +Store.prototype.registerModule = function registerModule (path, rawModule, options) { + if ( options === void 0 ) options = {}; + + if (typeof path === 'string') { path = [path]; } + + if ((false)) {} + + this._modules.register(path, rawModule); + installModule(this, this.state, path, this._modules.get(path), options.preserveState); + // reset store to update getters... + resetStoreVM(this, this.state); +}; + +Store.prototype.unregisterModule = function unregisterModule (path) { + var this$1 = this; + + if (typeof path === 'string') { path = [path]; } + + if ((false)) {} + + this._modules.unregister(path); + this._withCommit(function () { + var parentState = getNestedState(this$1.state, path.slice(0, -1)); + Vue.delete(parentState, path[path.length - 1]); + }); + resetStore(this); +}; + +Store.prototype.hasModule = function hasModule (path) { + if (typeof path === 'string') { path = [path]; } + + if ((false)) {} + + return this._modules.isRegistered(path) +}; + +Store.prototype.hotUpdate = function hotUpdate (newOptions) { + this._modules.update(newOptions); + resetStore(this, true); +}; + +Store.prototype._withCommit = function _withCommit (fn) { + var committing = this._committing; + this._committing = true; + fn(); + this._committing = committing; +}; + +Object.defineProperties( Store.prototype, prototypeAccessors$1 ); + +function genericSubscribe (fn, subs, options) { + if (subs.indexOf(fn) < 0) { + options && options.prepend + ? subs.unshift(fn) + : subs.push(fn); + } + return function () { + var i = subs.indexOf(fn); + if (i > -1) { + subs.splice(i, 1); + } + } +} + +function resetStore (store, hot) { + store._actions = Object.create(null); + store._mutations = Object.create(null); + store._wrappedGetters = Object.create(null); + store._modulesNamespaceMap = Object.create(null); + var state = store.state; + // init all modules + installModule(store, state, [], store._modules.root, true); + // reset vm + resetStoreVM(store, state, hot); +} + +function resetStoreVM (store, state, hot) { + var oldVm = store._vm; + + // bind store public getters + store.getters = {}; + // reset local getters cache + store._makeLocalGettersCache = Object.create(null); + var wrappedGetters = store._wrappedGetters; + var computed = {}; + forEachValue(wrappedGetters, function (fn, key) { + // use computed to leverage its lazy-caching mechanism + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure environment. + computed[key] = partial(fn, store); + Object.defineProperty(store.getters, key, { + get: function () { return store._vm[key]; }, + enumerable: true // for local getters + }); + }); + + // use a Vue instance to store the state tree + // suppress warnings just in case the user has added + // some funky global mixins + var silent = Vue.config.silent; + Vue.config.silent = true; + store._vm = new Vue({ + data: { + $$state: state + }, + computed: computed + }); + Vue.config.silent = silent; + + // enable strict mode for new vm + if (store.strict) { + enableStrictMode(store); + } + + if (oldVm) { + if (hot) { + // dispatch changes in all subscribed watchers + // to force getter re-evaluation for hot reloading. + store._withCommit(function () { + oldVm._data.$$state = null; + }); + } + Vue.nextTick(function () { return oldVm.$destroy(); }); + } +} + +function installModule (store, rootState, path, module, hot) { + var isRoot = !path.length; + var namespace = store._modules.getNamespace(path); + + // register in namespace map + if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && ("production" !== 'production')) { + console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); + } + store._modulesNamespaceMap[namespace] = module; + } + + // set state + if (!isRoot && !hot) { + var parentState = getNestedState(rootState, path.slice(0, -1)); + var moduleName = path[path.length - 1]; + store._withCommit(function () { + if ((false)) {} + Vue.set(parentState, moduleName, module.state); + }); + } + + var local = module.context = makeLocalContext(store, namespace, path); + + module.forEachMutation(function (mutation, key) { + var namespacedType = namespace + key; + registerMutation(store, namespacedType, mutation, local); + }); + + module.forEachAction(function (action, key) { + var type = action.root ? key : namespace + key; + var handler = action.handler || action; + registerAction(store, type, handler, local); + }); + + module.forEachGetter(function (getter, key) { + var namespacedType = namespace + key; + registerGetter(store, namespacedType, getter, local); + }); + + module.forEachChild(function (child, key) { + installModule(store, rootState, path.concat(key), child, hot); + }); +} + +/** + * make localized dispatch, commit, getters and state + * if there is no namespace, just use root ones + */ +function makeLocalContext (store, namespace, path) { + var noNamespace = namespace === ''; + + var local = { + dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (false) {} + } + + return store.dispatch(type, payload) + }, + + commit: noNamespace ? store.commit : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (false) {} + } + + store.commit(type, payload, options); + } + }; + + // getters and state object must be gotten lazily + // because they will be changed by vm update + Object.defineProperties(local, { + getters: { + get: noNamespace + ? function () { return store.getters; } + : function () { return makeLocalGetters(store, namespace); } + }, + state: { + get: function () { return getNestedState(store.state, path); } + } + }); + + return local +} + +function makeLocalGetters (store, namespace) { + if (!store._makeLocalGettersCache[namespace]) { + var gettersProxy = {}; + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); + }); + store._makeLocalGettersCache[namespace] = gettersProxy; + } + + return store._makeLocalGettersCache[namespace] +} + +function registerMutation (store, type, handler, local) { + var entry = store._mutations[type] || (store._mutations[type] = []); + entry.push(function wrappedMutationHandler (payload) { + handler.call(store, local.state, payload); + }); +} + +function registerAction (store, type, handler, local) { + var entry = store._actions[type] || (store._actions[type] = []); + entry.push(function wrappedActionHandler (payload) { + var res = handler.call(store, { + dispatch: local.dispatch, + commit: local.commit, + getters: local.getters, + state: local.state, + rootGetters: store.getters, + rootState: store.state + }, payload); + if (!isPromise(res)) { + res = Promise.resolve(res); + } + if (store._devtoolHook) { + return res.catch(function (err) { + store._devtoolHook.emit('vuex:error', err); + throw err + }) + } else { + return res + } + }); +} + +function registerGetter (store, type, rawGetter, local) { + if (store._wrappedGetters[type]) { + if ((false)) {} + return + } + store._wrappedGetters[type] = function wrappedGetter (store) { + return rawGetter( + local.state, // local state + local.getters, // local getters + store.state, // root state + store.getters // root getters + ) + }; +} + +function enableStrictMode (store) { + store._vm.$watch(function () { return this._data.$$state }, function () { + if ((false)) {} + }, { deep: true, sync: true }); +} + +function getNestedState (state, path) { + return path.reduce(function (state, key) { return state[key]; }, state) +} + +function unifyObjectStyle (type, payload, options) { + if (isObject(type) && type.type) { + options = payload; + payload = type; + type = type.type; + } + + if ((false)) {} + + return { type: type, payload: payload, options: options } +} + +function install (_Vue) { + if (Vue && _Vue === Vue) { + if ((false)) {} + return + } + Vue = _Vue; + applyMixin(Vue); +} + +/** + * Reduce the code which written in Vue.js for getting the state. + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it. + * @param {Object} + */ +var mapState = normalizeNamespace(function (namespace, states) { + var res = {}; + if (false) {} + normalizeMap(states).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedState () { + var state = this.$store.state; + var getters = this.$store.getters; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapState', namespace); + if (!module) { + return + } + state = module.context.state; + getters = module.context.getters; + } + return typeof val === 'function' + ? val.call(this, state, getters) + : state[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for committing the mutation + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function. + * @return {Object} + */ +var mapMutations = normalizeNamespace(function (namespace, mutations) { + var res = {}; + if (false) {} + normalizeMap(mutations).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedMutation () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + // Get the commit method from store + var commit = this.$store.commit; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); + if (!module) { + return + } + commit = module.context.commit; + } + return typeof val === 'function' + ? val.apply(this, [commit].concat(args)) + : commit.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for getting the getters + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} getters + * @return {Object} + */ +var mapGetters = normalizeNamespace(function (namespace, getters) { + var res = {}; + if (false) {} + normalizeMap(getters).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + // The namespace has been mutated by normalizeNamespace + val = namespace + val; + res[key] = function mappedGetter () { + if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { + return + } + if (false) {} + return this.$store.getters[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for dispatch the action + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function. + * @return {Object} + */ +var mapActions = normalizeNamespace(function (namespace, actions) { + var res = {}; + if (false) {} + normalizeMap(actions).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedAction () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + // get dispatch function from store + var dispatch = this.$store.dispatch; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapActions', namespace); + if (!module) { + return + } + dispatch = module.context.dispatch; + } + return typeof val === 'function' + ? val.apply(this, [dispatch].concat(args)) + : dispatch.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +/** + * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object + * @param {String} namespace + * @return {Object} + */ +var createNamespacedHelpers = function (namespace) { return ({ + mapState: mapState.bind(null, namespace), + mapGetters: mapGetters.bind(null, namespace), + mapMutations: mapMutations.bind(null, namespace), + mapActions: mapActions.bind(null, namespace) +}); }; + +/** + * Normalize the map + * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ] + * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ] + * @param {Array|Object} map + * @return {Object} + */ +function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } + return Array.isArray(map) + ? map.map(function (key) { return ({ key: key, val: key }); }) + : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) +} + +/** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ +function isValidMap (map) { + return Array.isArray(map) || isObject(map) +} + +/** + * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. + * @param {Function} fn + * @return {Function} + */ +function normalizeNamespace (fn) { + return function (namespace, map) { + if (typeof namespace !== 'string') { + map = namespace; + namespace = ''; + } else if (namespace.charAt(namespace.length - 1) !== '/') { + namespace += '/'; + } + return fn(namespace, map) + } +} + +/** + * Search a special module from store by namespace. if module not exist, print error message. + * @param {Object} store + * @param {String} helper + * @param {String} namespace + * @return {Object} + */ +function getModuleByNamespace (store, helper, namespace) { + var module = store._modulesNamespaceMap[namespace]; + if (false) {} + return module +} + +var index = { + Store: Store, + install: install, + version: '3.4.0', + mapState: mapState, + mapMutations: mapMutations, + mapGetters: mapGetters, + mapActions: mapActions, + createNamespacedHelpers: createNamespacedHelpers +}; + +/* unused harmony default export */ var _unused_webpack_default_export = (index); + + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.0.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.0.js.map b/src/expendPlugins/chart/chartmix.umd.0.js.map new file mode 100644 index 000000000..a667e54bd --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.0.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./node_modules/vuex/dist/vuex.esm.js"],"names":[],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,yBAAyB;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;;AAErB;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG,GAAG,gBAAgB;;AAEtB;AACA;AACA,GAAG,GAAG,gBAAgB;AACtB;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B,EAAE;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B,cAAc,qBAAqB;;AAE7D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,OAAO,KAAqC,GAAG,EAE5C;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO,KAAqC,GAAG,EAE5C;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAqC,GAAG,EAK5C;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,oCAAoC,EAAE;AAClE;AACA;;AAEA;AACA,4BAA4B;AAC5B,uEAAuE,EAAE;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,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A;AACA;AACA;;AAEA;AACA,yCAAyC,aAAa;AACtD;AACA;;AAEA;AACA;;AAEA,OAAO,KAAqC,GAAG,EAE5C;AACH,6CAA6C,6CAA6C,EAAE;AAC5F;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA,iCAAiC,eAAe;;AAEhD,OAAO,KAAqC,GAAG,EAG5C;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iCAAiC,eAAe;;AAEhD,OAAO,KAAqC,GAAG,EAE5C;;AAEH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,iCAAiC,eAAe;;AAEhD,OAAO,KAAqC,GAAG,EAE5C;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB,EAAE;AACjD;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,8BAA8B,yBAAyB,EAAE;AACzD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kDAAkD,YAAoB;AACtE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAqC,GAAG,EAM5C;AACP;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,KAAgE,EAAE,EAGrE;AACT;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,KAAkE,EAAE,EAGvE;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C,uBAAuB,2CAA2C;AAClE,KAAK;AACL;AACA,wBAAwB,0CAA0C;AAClE;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,SAAS,KAAqC,GAAG,EAE5C;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,4BAA4B;AAC5D,SAAS,KAAqC,GAAG,EAE5C;AACL,GAAG,GAAG,yBAAyB;AAC/B;;AAEA;AACA,4CAA4C,mBAAmB,EAAE;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAqC,GAAG,EAE5C;;AAEH,UAAU;AACV;;AAEA;AACA;AACA,SAAS,KAAqC,GAAG,EAI5C;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW;AACX;AACA;AACA;AACA,MAAM,KAA8D,EAAE,EAEnE;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAAiE,EAAE,EAEtE;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAA+D,EAAE,EAEpE;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,KAAwE,EAAE,EAG7E;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAA+D,EAAE,EAEpE;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,CAAC,EAAE;;AAEH;AACA;AACA,iCAAiC,iBAAiB,GAAG,iBAAiB,GAAG,iBAAiB;AAC1F,iBAAiB,iBAAiB,QAAQ,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB;AACzG,WAAW,aAAa;AACxB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU,qBAAqB,EAAE,EAAE;AACjE,2CAA2C,UAAU,0BAA0B,EAAE,EAAE;AACnF;;AAEA;AACA;AACA,WAAW,EAAE;AACb,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA,MAAM,KAAkD,EAAE,EAEvD;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,+EAAK,EAAC;AAC8E","file":"chartmix.umd.0.js","sourcesContent":["/*!\n * vuex v3.4.0\n * (c) 2020 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.hasChild = function hasChild (key) {\n return key in this._children\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nModuleCollection.prototype.isRegistered = function isRegistered (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n\n return parent.hasChild(key)\n};\n\nfunction update (path, targetModule, newModule) {\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n this._makeLocalGettersCache = Object.create(null);\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n\n this._subscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n (process.env.NODE_ENV !== 'production') &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return new Promise(function (resolve, reject) {\n result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n resolve(res);\n }, function (error) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.error; })\n .forEach(function (sub) { return sub.error(action, this$1.state, error); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in error action subscribers: \");\n console.error(e);\n }\n }\n reject(error);\n });\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn, options) {\n return genericSubscribe(fn, this._subscribers, options)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn, options) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers, options)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hasModule = function hasModule (path) {\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n return this._modules.isRegistered(path)\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs, options) {\n if (subs.indexOf(fn) < 0) {\n options && options.prepend\n ? subs.unshift(fn)\n : subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n // reset local getters cache\n store._makeLocalGettersCache = Object.create(null);\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldVm.\n // using partial to return function with only arguments preserved in closure environment.\n computed[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n if (store._modulesNamespaceMap[namespace] && (process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate namespace \" + namespace + \" for the namespaced module \" + (path.join('/'))));\n }\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n if ((process.env.NODE_ENV !== 'production')) {\n if (moduleName in parentState) {\n console.warn(\n (\"[vuex] state field \\\"\" + moduleName + \"\\\" was overridden by a module with the same name at \\\"\" + (path.join('.')) + \"\\\"\")\n );\n }\n }\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n if (!store._makeLocalGettersCache[namespace]) {\n var gettersProxy = {};\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n store._makeLocalGettersCache[namespace] = gettersProxy;\n }\n\n return store._makeLocalGettersCache[namespace]\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.reduce(function (state, key) { return state[key]; }, state)\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(states)) {\n console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(mutations)) {\n console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(getters)) {\n console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if ((process.env.NODE_ENV !== 'production') && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(actions)) {\n console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n if (!isValidMap(map)) {\n return []\n }\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Validate whether given map is valid or not\n * @param {*} map\n * @return {Boolean}\n */\nfunction isValidMap (map) {\n return Array.isArray(map) || isObject(map)\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if ((process.env.NODE_ENV !== 'production') && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index = {\n Store: Store,\n install: install,\n version: '3.4.0',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\nexport default index;\nexport { Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState };\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.1.js b/src/expendPlugins/chart/chartmix.umd.1.js new file mode 100644 index 000000000..47ded407f --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.1.js @@ -0,0 +1,161 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[1],{ + +/***/ "1847": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a9e3"); +/* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ __webpack_exports__["a"] = ({ + name: "chart-base-slider", + props: { + baseSliderOption: Number, + unit: String, + // % or px + min: { + type: Number, + default: 0 + }, + max: { + type: Number, + default: 100 + }, + content: { + type: String, + default: "滑动修改值大小" + }, + hideCol: false, + format: [Function, String] + }, + data: function data() { + return { + baseSliderData: 12 + }; + }, + mounted: function mounted() { + this.baseSliderData = this.baseSliderOption; + }, + methods: { + handlerChange: function handlerChange(value) { + this.$emit("update:baseSliderOption", value); + }, + formatter: function formatter(val) { + eval(this.format); + } + } +}); + +/***/ }), + +/***/ "6999": +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "9470": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6999"); +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartBaseSlider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); + +/***/ }), + +/***/ "b57e": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=template&id=609b7952& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticClass:"chart-base-slider",staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":22}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":_vm.content,"placement":"top"}},[_c('el-slider',{staticStyle:{"padding-left":"12px"},attrs:{"show-input-controls":false,"min":_vm.min,"max":_vm.max,"input-size":"mini","show-input":"","format-tooltip":_vm.format?_vm.formatter:null},on:{"change":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:"baseSliderData"}})],1)],1),_c('el-col',{staticClass:"input_content",attrs:{"span":1}},[_vm._v(_vm._s(_vm.unit))])],1):_c('el-row',{staticClass:"chart-base-slider",staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":17}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":_vm.content,"placement":"top"}},[_c('el-slider',{staticStyle:{"padding-left":"12px"},attrs:{"show-input-controls":false,"min":_vm.min,"max":_vm.max,"input-size":"mini","show-input":"","format-tooltip":_vm.format?_vm.formatter:null},on:{"change":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:"baseSliderData"}})],1)],1),_c('el-col',{staticClass:"input_content",attrs:{"span":1}},[_vm._v(_vm._s(_vm.unit))])],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=template&id=609b7952& + +// EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=script&lang=js& +var ChartBaseSlidervue_type_script_lang_js_ = __webpack_require__("1847"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSlidervue_type_script_lang_js_ = (ChartBaseSlidervue_type_script_lang_js_["a" /* default */]); +// EXTERNAL MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?vue&type=style&index=0&lang=css& +var ChartBaseSlidervue_type_style_index_0_lang_css_ = __webpack_require__("9470"); + +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue + + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSlidervue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSlider = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.1.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.1.js.map b/src/expendPlugins/chart/chartmix.umd.1.js.map new file mode 100644 index 000000000..769b9d8f8 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.1.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?8675","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?135a","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?4399","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?dbc7","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA;AACA,2BADA;AAEA;AACA,4BADA;AAEA,gBAFA;AAEA;AACA;AACA,kBADA;AAEA;AAFA,KAHA;AAOA;AACA,kBADA;AAEA;AAFA,KAPA;AAWA;AACA,kBADA;AAEA;AAFA,KAXA;AAeA,kBAfA;AAgBA;AAhBA,GAFA;AAoBA,MApBA,kBAoBA;AACA;AACA;AADA;AAGA,GAxBA;AAyBA,SAzBA,qBAyBA;AACA;AACA,GA3BA;AA4BA;AACA,iBADA,yBACA,KADA,EACA;AACA;AACA,KAHA;AAIA,aAJA,qBAIA,GAJA,EAIA;AACA;AACA;AANA;AA5BA,G;;;;;;;AC3CA,uC;;;;;;;;ACAA;AAAA;AAAA;AAA4f,CAAgB,ofAAG,EAAC,C;;;;;;;;;;;;ACAhhB,0BAA0B,aAAa,0BAA0B,wBAAwB,6CAA6C,6CAA6C,qBAAqB,eAAe,OAAO,WAAW,mBAAmB,OAAO,0DAA0D,kBAAkB,aAAa,sBAAsB,QAAQ,2IAA2I,KAAK,2BAA2B,QAAQ,oDAAoD,uBAAuB,8BAA8B,uBAAuB,mCAAmC,UAAU,8CAA8C,6CAA6C,qBAAqB,eAAe,OAAO,UAAU,mCAAmC,OAAO,WAAW,mBAAmB,OAAO,0DAA0D,kBAAkB,aAAa,sBAAsB,QAAQ,2IAA2I,KAAK,2BAA2B,QAAQ,oDAAoD,uBAAuB,8BAA8B,uBAAuB,mCAAmC,UAAU;AACh5C;;;;;;;;;ACDsX,CAAgB,2IAAG,EAAC,C;;;;;;;;ACA5S;AAC3B;AACL;AACa;;;AAG3E;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.umd.1.js","sourcesContent":["\r\n\r\n\r\n\r\n\r\n\r\n","// extracted by mini-css-extract-plugin","import mod from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticClass:\"chart-base-slider\",staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":_vm.content,\"placement\":\"top\"}},[_c('el-slider',{staticStyle:{\"padding-left\":\"12px\"},attrs:{\"show-input-controls\":false,\"min\":_vm.min,\"max\":_vm.max,\"input-size\":\"mini\",\"show-input\":\"\",\"format-tooltip\":_vm.format?_vm.formatter:null},on:{\"change\":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:\"baseSliderData\"}})],1)],1),_c('el-col',{staticClass:\"input_content\",attrs:{\"span\":1}},[_vm._v(_vm._s(_vm.unit))])],1):_c('el-row',{staticClass:\"chart-base-slider\",staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":17}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":_vm.content,\"placement\":\"top\"}},[_c('el-slider',{staticStyle:{\"padding-left\":\"12px\"},attrs:{\"show-input-controls\":false,\"min\":_vm.min,\"max\":_vm.max,\"input-size\":\"mini\",\"show-input\":\"\",\"format-tooltip\":_vm.format?_vm.formatter:null},on:{\"change\":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:\"baseSliderData\"}})],1)],1),_c('el-col',{staticClass:\"input_content\",attrs:{\"span\":1}},[_vm._v(_vm._s(_vm.unit))])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSlider.vue?vue&type=template&id=609b7952&\"\nimport script from \"./ChartBaseSlider.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSlider.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.10.js b/src/expendPlugins/chart/chartmix.umd.10.js new file mode 100644 index 000000000..aabe50aa7 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.10.js @@ -0,0 +1,91 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[10],{ + +/***/ "138b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=template&id=6331a3cc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.hideCol)?_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("select")],2),_c('el-col',{attrs:{"span":16}},[_c('el-tooltip',{attrs:{"disabled":!_vm.tooltip,"open-delay":500,"content":_vm.tooltip,"effect":"dark","placement":"bottom"}},[_c('el-select',{attrs:{"size":"mini"},on:{"change":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:"select"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.label,"value":item.value}})}),1)],1)],1)],1):_c('el-tooltip',{attrs:{"disabled":!_vm.tooltip,"open-delay":500,"content":_vm.tooltip,"effect":"dark","placement":"bottom"}},[_c('el-select',{attrs:{"size":"mini"},on:{"change":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:"select"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.label,"value":item.value}})}),1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=template&id=6331a3cc& + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js +var es_number_constructor = __webpack_require__("a9e3"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseSelectvue_type_script_lang_js_ = ({ + props: { + selectOption: Array, + tooltip: String, + selectValue: [String, Number, Array], + hideCol: Boolean + }, + data: function data() { + return { + select: '' + }; + }, + mounted: function mounted() { + this.select = this.selectValue; + }, + methods: { + changeSelect: function changeSelect(val) { + this.$emit('update:selectValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSelectvue_type_script_lang_js_ = (ChartBaseSelectvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSelectvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSelect = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.10.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.10.js.map b/src/expendPlugins/chart/chartmix.umd.10.js.map new file mode 100644 index 000000000..4e8ae88c7 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.10.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?57e3","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?da35","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,mCAAmC,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,oCAAoC,OAAO,WAAW,mBAAmB,OAAO,qGAAqG,kBAAkB,OAAO,cAAc,KAAK,0BAA0B,QAAQ,4CAA4C,eAAe,sBAAsB,4CAA4C,uBAAuB,aAAa,uCAAuC,EAAE,kCAAkC,OAAO,qGAAqG,kBAAkB,OAAO,cAAc,KAAK,0BAA0B,QAAQ,4CAA4C,eAAe,sBAAsB,4CAA4C,uBAAuB,aAAa,uCAAuC,EAAE;AACrkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmBA;AACA;AACA,uBADA;AAEA,mBAFA;AAGA,wCAHA;AAIA;AAJA,GADA;AAOA,MAPA,kBAOA;AACA;AACA;AADA;AAGA,GAXA;AAYA,SAZA,qBAYA;AACA;AACA,GAdA;AAeA;AACA,gBADA,wBACA,GADA,EACA;AACA;AACA;AAHA;AAfA,G;;ACpBsX,CAAgB,wHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG9D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.umd.10.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.hideCol)?_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"select\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-tooltip',{attrs:{\"disabled\":!_vm.tooltip,\"open-delay\":500,\"content\":_vm.tooltip,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-select',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:\"select\"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{\"label\":item.label,\"value\":item.value}})}),1)],1)],1)],1):_c('el-tooltip',{attrs:{\"disabled\":!_vm.tooltip,\"open-delay\":500,\"content\":_vm.tooltip,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-select',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:\"select\"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{\"label\":item.label,\"value\":item.value}})}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSelect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSelect.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSelect.vue?vue&type=template&id=6331a3cc&\"\nimport script from \"./ChartBaseSelect.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSelect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.11.js b/src/expendPlugins/chart/chartmix.umd.11.js new file mode 100644 index 000000000..1be16c74a --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.11.js @@ -0,0 +1,82 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[11],{ + +/***/ "9e1a": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":16}},[_c('el-switch',{attrs:{"active-color":"#13ce66","inactive-color":"#d8d8d8"},on:{"change":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:"switchData"}})],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseSwitchvue_type_script_lang_js_ = ({ + name: "chart-base-switch", + props: { + switchValue: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + switchData: false + }; + }, + mounted: function mounted() { + this.switchData = this.switchValue ? this.switchValue : false; + }, + methods: { + changeSwitch: function changeSwitch(val) { + this.$emit('update:switchValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSwitchvue_type_script_lang_js_ = (ChartBaseSwitchvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSwitchvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSwitch = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.11.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.11.js.map b/src/expendPlugins/chart/chartmix.umd.11.js.map new file mode 100644 index 000000000..d9387ccbb --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.11.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?d947","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?b3a8","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,oBAAoB,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,kBAAkB,OAAO,oDAAoD,KAAK,0BAA0B,QAAQ,gDAAgD,mBAAmB,0BAA0B;AACzc;;;;;;;;;;;;;;;;;;;ACaA;AACA,2BADA;AAEA;AACA;AACA,mBADA;AAEA;AAFA;AADA,GAFA;AAQA,MARA,kBAQA;AACA;AACA;AADA;AAGA,GAZA;AAaA,SAbA,qBAaA;AACA;AACA,GAfA;AAgBA;AACA,gBADA,wBACA,GADA,EACA;AACA;AACA;AAHA;AAhBA,G;;ACdsX,CAAgB,wHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG9D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.umd.11.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-switch',{attrs:{\"active-color\":\"#13ce66\",\"inactive-color\":\"#d8d8d8\"},on:{\"change\":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:\"switchData\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSwitch.vue?vue&type=template&id=c152a4dc&\"\nimport script from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.12.js b/src/expendPlugins/chart/chartmix.umd.12.js new file mode 100644 index 000000000..f5162626e --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.12.js @@ -0,0 +1,82 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[12],{ + +/***/ "9e1a": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":16}},[_c('el-switch',{attrs:{"active-color":"#13ce66","inactive-color":"#d8d8d8"},on:{"change":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:"switchData"}})],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=template&id=c152a4dc& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseSwitchvue_type_script_lang_js_ = ({ + name: "chart-base-switch", + props: { + switchValue: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + switchData: false + }; + }, + mounted: function mounted() { + this.switchData = this.switchValue ? this.switchValue : false; + }, + methods: { + changeSwitch: function changeSwitch(val) { + this.$emit('update:switchValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseSwitchvue_type_script_lang_js_ = (ChartBaseSwitchvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseSwitchvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseSwitch = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.12.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.12.js.map b/src/expendPlugins/chart/chartmix.umd.12.js.map new file mode 100644 index 000000000..9bc6d10cc --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.12.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?d947","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?b3a8","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,oBAAoB,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,kBAAkB,OAAO,oDAAoD,KAAK,0BAA0B,QAAQ,gDAAgD,mBAAmB,0BAA0B;AACzc;;;;;;;;;;;;;;;;;;;ACaA;AACA,2BADA;AAEA;AACA;AACA,mBADA;AAEA;AAFA;AADA,GAFA;AAQA,MARA,kBAQA;AACA;AACA;AADA;AAGA,GAZA;AAaA,SAbA,qBAaA;AACA;AACA,GAfA;AAgBA;AACA,gBADA,wBACA,GADA,EACA;AACA;AACA;AAHA;AAhBA,G;;ACdsX,CAAgB,wHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG9D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,4CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,sG","file":"chartmix.umd.12.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-switch',{attrs:{\"active-color\":\"#13ce66\",\"inactive-color\":\"#d8d8d8\"},on:{\"change\":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:\"switchData\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSwitch.vue?vue&type=template&id=c152a4dc&\"\nimport script from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.2.js b/src/expendPlugins/chart/chartmix.umd.2.js new file mode 100644 index 000000000..0871d0f5a --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.2.js @@ -0,0 +1,212 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[2],{ + +/***/ "02ce": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=template&id=e2628114& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("title")],2),_c('el-col',{attrs:{"span":16}},[_c('chart-base-box',{attrs:{"boxData":_vm.baseLabelOptionData.fontGroup,"checkboxOption":_vm.fontStyleObj},on:{"update:boxData":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontGroup", $event)},"update:box-data":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontGroup", $event)}}}),_c('el-row',{staticStyle:{"margin-top":"5px"}},[_c('el-col',{attrs:{"span":12}},[_c('chart-base-select',{attrs:{"hideCol":true,"tooltip":'选择字体大小',"selectOption":_vm.fontSizeList,"selectValue":_vm.baseLabelOptionData.fontSize},on:{"update:selectValue":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontSize", $event)},"update:select-value":function($event){return _vm.$set(_vm.baseLabelOptionData, "fontSize", $event)}}})],1),_c('el-col',{attrs:{"span":8,"offset":2}},[_c('el-color-picker',{attrs:{"size":"mini"},on:{"change":_vm.changeStyle},model:{value:(_vm.baseLabelOptionData.color),callback:function ($$v) {_vm.$set(_vm.baseLabelOptionData, "color", $$v)},expression:"baseLabelOptionData.color"}})],1)],1)],1)],1),(_vm.baseLabelOptionData.fontSize === 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.baseLabelOptionData.cusFontSize,"unit":'px',"content":'滑动修改字体大小'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.baseLabelOptionData, "cusFontSize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.baseLabelOptionData, "cusFontSize", $event)}}}):_vm._e()],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=template&id=e2628114& + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js +var es_array_includes = __webpack_require__("caad"); + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js +var es_string_includes = __webpack_require__("2532"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=script&lang=js& + + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartBaseLabelvue_type_script_lang_js_ = ({ + name: 'chart-base-label', + props: { + router: String, + baseLabelOption: Object + }, + components: { + 'chart-base-slider': importUtil["ChartBaseSlider"], + 'chart-base-select': importUtil["ChartBaseSelect"], + 'chart-base-box': importUtil["ChartBaseBox"] + }, + data: function data() { + return { + baseLabelOptionData: {}, + //整个label设置 + fontSizeList: importUtil["deepCopy"](chartJson["e" /* fontSizeList */]), + //位置选择数组 + fontStyleObj: {} //字体样式:数据=>DOM转换 + + }; + }, + watch: { + baseLabelOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.baseLabelOptionData, newVal)) { + return; + } + + this.baseLabelOptionData = importUtil["deepCopy"](newVal); //传过来的值需要深拷贝防止数据流向父组件传递 + //根据在不同的组件内渲染不同的结构 + + if (this.router.includes('title')) { + //在主标题/副标题组件内 + this.fontStyleObj = importUtil["deepCopy"](chartJson["h" /* fontStyleIBV */]); + } else { + //鼠标提示组件内 + this.fontStyleObj = importUtil["deepCopy"](chartJson["g" /* fontStyleIB */]); + } + }, + immediate: true, + deep: true + }, + baseLabelOptionData: { + handler: function handler(newVal, oldVal) { + if (oldVal) { + this.changeStyle(); + } + }, + immediate: true, + deep: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeStyle: function changeStyle() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.baseLabelOptionData), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseLabelvue_type_script_lang_js_ = (ChartBaseLabelvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseLabelvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseLabel = __webpack_exports__["default"] = (component.exports); + +/***/ }), + +/***/ "2532": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__("23e7"); +var notARegExp = __webpack_require__("5a34"); +var requireObjectCoercible = __webpack_require__("1d80"); +var correctIsRegExpLogic = __webpack_require__("ab13"); + +// `String.prototype.includes` method +// https://tc39.github.io/ecma262/#sec-string.prototype.includes +$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { + includes: function includes(searchString /* , position = 0 */) { + return !!~String(requireObjectCoercible(this)) + .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "5a34": +/***/ (function(module, exports, __webpack_require__) { + +var isRegExp = __webpack_require__("44e7"); + +module.exports = function (it) { + if (isRegExp(it)) { + throw TypeError("The method doesn't accept regular expressions"); + } return it; +}; + + +/***/ }), + +/***/ "ab13": +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__("b622"); + +var MATCH = wellKnownSymbol('match'); + +module.exports = function (METHOD_NAME) { + var regexp = /./; + try { + '/./'[METHOD_NAME](regexp); + } catch (e) { + try { + regexp[MATCH] = false; + return '/./'[METHOD_NAME](regexp); + } catch (f) { /* empty */ } + } return false; +}; + + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.2.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.2.js.map b/src/expendPlugins/chart/chartmix.umd.2.js.map new file mode 100644 index 000000000..79cf09066 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?eeeb","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?3060","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue","webpack://chartmix/./node_modules/core-js/modules/es.string.includes.js","webpack://chartmix/./node_modules/core-js/internals/not-a-regexp.js","webpack://chartmix/./node_modules/core-js/internals/correct-is-regexp-logic.js"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,8BAA8B,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,uBAAuB,OAAO,8EAA8E,KAAK,kCAAkC,8DAA8D,oCAAoC,gEAAgE,eAAe,aAAa,oBAAoB,eAAe,OAAO,WAAW,0BAA0B,OAAO,iHAAiH,KAAK,sCAAsC,6DAA6D,wCAAwC,+DAA+D,mBAAmB,OAAO,qBAAqB,wBAAwB,OAAO,cAAc,KAAK,yBAAyB,QAAQ,+DAA+D,gDAAgD,yCAAyC,0FAA0F,OAAO,wFAAwF,KAAK,2CAA2C,gEAAgE,8CAA8C,kEAAkE;AAC5pD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyBA;AACA;AAEA;AACA,0BADA;AAEA;AACA,kBADA;AAEA;AAFA,GAFA;AAMA;AACA,sDADA;AAEA,sDAFA;AAGA;AAHA,GANA;AAWA;AACA;AACA,6BADA;AACA;AACA,6EAFA;AAEA;AACA,sBAHA,CAGA;;AAHA;AAKA,GAjBA;AAkBA;AAEA;AACA;AACA;AACA;AACA;;AACA,kEAJA,CAIA;AAEA;;AACA;AAAA;AACA;AACA,SAFA,MAEA;AAAA;AACA;AACA;AAEA,OAdA;AAeA,qBAfA;AAgBA;AAhBA,KAFA;AAoBA;AACA;AACA;AACA;AACA;AACA,OALA;AAMA,qBANA;AAOA;AAPA;AApBA,GAlBA;AAgDA,iGACA,6DADA;AAEA,eAFA,yBAEA;AACA;AACA,mEADA;AAEA;AAFA;AAIA;AACA;AARA;AAhDA,G;;AC7BqX,CAAgB,sHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG7D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,2CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,qG;;;;;;;;AClBF;AACb,QAAQ,mBAAO,CAAC,MAAqB;AACrC,iBAAiB,mBAAO,CAAC,MAA2B;AACpD,6BAA6B,mBAAO,CAAC,MAAuC;AAC5E,2BAA2B,mBAAO,CAAC,MAAsC;;AAEzE;AACA;AACA,GAAG,2EAA2E;AAC9E;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACbD,eAAe,mBAAO,CAAC,MAAwB;;AAE/C;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACNA,sBAAsB,mBAAO,CAAC,MAAgC;;AAE9D;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK,YAAY;AACjB,GAAG;AACH","file":"chartmix.umd.2.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('chart-base-box',{attrs:{\"boxData\":_vm.baseLabelOptionData.fontGroup,\"checkboxOption\":_vm.fontStyleObj},on:{\"update:boxData\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontGroup\", $event)},\"update:box-data\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontGroup\", $event)}}}),_c('el-row',{staticStyle:{\"margin-top\":\"5px\"}},[_c('el-col',{attrs:{\"span\":12}},[_c('chart-base-select',{attrs:{\"hideCol\":true,\"tooltip\":'选择字体大小',\"selectOption\":_vm.fontSizeList,\"selectValue\":_vm.baseLabelOptionData.fontSize},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontSize\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontSize\", $event)}}})],1),_c('el-col',{attrs:{\"span\":8,\"offset\":2}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeStyle},model:{value:(_vm.baseLabelOptionData.color),callback:function ($$v) {_vm.$set(_vm.baseLabelOptionData, \"color\", $$v)},expression:\"baseLabelOptionData.color\"}})],1)],1)],1)],1),(_vm.baseLabelOptionData.fontSize === 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.baseLabelOptionData.cusFontSize,\"unit\":'px',\"content\":'滑动修改字体大小'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"cusFontSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"cusFontSize\", $event)}}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseLabel.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseLabel.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseLabel.vue?vue&type=template&id=e2628114&\"\nimport script from \"./ChartBaseLabel.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseLabel.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.3.js b/src/expendPlugins/chart/chartmix.umd.3.js new file mode 100644 index 000000000..1df70240a --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.3.js @@ -0,0 +1,476 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[3],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "e078": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=template&id=728665dc& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"6","title":"XY轴设置"}},[_c('chart-base-select',{attrs:{"selectOption":_vm.axisGroup,"selectValue":_vm.axis.axisType},on:{"update:selectValue":function($event){return _vm.$set(_vm.axis, "axisType", $event)},"update:select-value":function($event){return _vm.$set(_vm.axis, "axisType", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("选择坐标轴")])]),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v(_vm._s(_vm.series.name))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.show),expression:"series.show"}]},[_c('chart-base-input',{attrs:{"inputValue":_vm.series.title.text,"placeholder":'请输入标题内容'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.title, "text", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.title, "text", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("标题内容")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.title.text),expression:"series.title.text"}],staticStyle:{"margin-top":"15px"}},[_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.series.title.label},on:{"update:baseLabelOption":function($event){return _vm.$set(_vm.series.title, "label", $event)},"update:base-label-option":function($event){return _vm.$set(_vm.series.title, "label", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("文本样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.fzPosOption,"selectValue":_vm.series.title.fzPosition},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.title, "fzPosition", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.title, "fzPosition", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("文本对齐方式")])])],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.inverse},on:{"update:switchValue":function($event){return _vm.$set(_vm.series, "inverse", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series, "inverse", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("反向坐标轴")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"max":10,"baseSliderOption":_vm.series.tickLabel.optimize,"unit":'个',"content":'滑动修改坐标轴间隔个数'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tickLabel, "optimize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tickLabel, "optimize", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("坐标轴间隔个数")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.title.text),expression:"series.title.text"}]},[_c('chart-base-slider',{attrs:{"hideCol":true,"baseSliderOption":_vm.series.title.nameGap,"unit":'px',"content":'滑动修改标题与轴线距离'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.title, "nameGap", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.title, "nameGap", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("标题与轴线距离")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"format":_vm.formatRotation+'',"max":180,"min":-180,"baseSliderOption":_vm.series.title.rotate,"unit":'°',"content":'滑动修改标题与轴线距离'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.title, "rotate", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.title, "rotate", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("倾斜轴标题")])])],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.tickLine.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.tickLine, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.tickLine, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示刻度线")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"min":1,"baseSliderOption":_vm.series.tickLine.width,"unit":'px',"content":'滑动修改刻度线宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tickLine, "width", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tickLine, "width", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("刻度线宽度")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":7}},[_vm._v("刻度线颜色")]),_c('el-col',{attrs:{"push":14,"span":3}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":"刻度线颜色","effect":"dark","placement":"bottom"}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.tickLine.color),callback:function ($$v) {_vm.$set(_vm.series.tickLine, "color", $$v)},expression:"series.tickLine.color"}})],1)],1)],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.tick.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.tick, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.tick, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示刻度")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.orient,"selectValue":_vm.series.tick.position},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.tick, "position", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.tick, "position", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("刻度位置")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"min":1,"baseSliderOption":_vm.series.tick.length,"unit":'px',"content":'滑动修改刻度长度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tick, "length", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tick, "length", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("刻度长度")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"max":20,"min":1,"baseSliderOption":_vm.series.tick.width,"unit":'px',"content":'滑动修改刻度宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tick, "width", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tick, "width", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("刻度宽度")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":6}},[_vm._v("刻度颜色")]),_c('el-col',{attrs:{"push":14,"span":4}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":"刻度颜色","effect":"dark","placement":"bottom"}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.tick.color),callback:function ($$v) {_vm.$set(_vm.series.tick, "color", $$v)},expression:"series.tick.color"}})],1)],1)],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.tickLabel.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.tickLabel, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.tickLabel, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示刻度标签")])]),_c('chart-base-slider',{attrs:{"hideCol":true,"format":_vm.formatRotation,"max":180,"min":-180,"baseSliderOption":_vm.series.tickLabel.rotate,"unit":'°',"content":'滑动修改标签倾斜角度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.tickLabel, "rotate", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.tickLabel, "rotate", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("倾斜标签")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showLabel),expression:"showLabel"}]},[_c('chart-base-input',{attrs:{"type":'text',"inputValue":_vm.series.tickLabel.min,"placeholder":'请输入刻度最小值'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "min", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "min", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("刻度最小值")])]),_c('chart-base-input',{attrs:{"type":'text',"inputValue":_vm.series.tickLabel.max,"placeholder":'请输入刻度最大值且最大值不能小于最小值'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "max", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "max", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("刻度最大值")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.ratioOption,"selectValue":_vm.series.tickLabel.ratio},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.tickLabel, "ratio", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.tickLabel, "ratio", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("数值缩放比例")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.digitOption,"selectValue":_vm.series.tickLabel.digit},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.tickLabel, "digit", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.tickLabel, "digit", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("小数位数")])])],1),_c('chart-base-input',{attrs:{"inputValue":_vm.series.tickLabel.prefix,"placeholder":'请输入标签前缀'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "prefix", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "prefix", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("标签前缀")])]),_c('chart-base-input',{attrs:{"inputValue":_vm.series.tickLabel.suffix,"placeholder":'请输入标签后缀'},on:{"update:inputValue":function($event){return _vm.$set(_vm.series.tickLabel, "suffix", $event)},"update:input-value":function($event){return _vm.$set(_vm.series.tickLabel, "suffix", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("标签后缀")])]),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.netLine.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.netLine, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.netLine, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示网格线")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.netLine.show),expression:"series.netLine.show"}]},[_c('chart-base-slider',{attrs:{"hideCol":true,"max":20,"min":1,"baseSliderOption":_vm.series.netLine.width,"unit":'px',"content":'滑动修改网格线宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.netLine, "width", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.netLine, "width", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("网格线宽度")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.lineStyleOption,"selectValue":_vm.series.netLine.type},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.netLine, "type", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.netLine, "type", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("网格线类型")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._v("网格线颜色")]),_c('el-col',{attrs:{"push":13,"span":3}},[_c('el-tooltip',{attrs:{"open-delay":500,"content":"网格线颜色","effect":"dark","placement":"bottom"}},[_c('el-color-picker',{attrs:{"label":true,"size":"mini"},model:{value:(_vm.series.netLine.color),callback:function ($$v) {_vm.$set(_vm.series.netLine, "color", $$v)},expression:"series.netLine.color"}})],1)],1)],1),_c('chart-base-select',{attrs:{"selectOption":_vm.intervalOption,"selectValue":_vm.series.netLine.interval.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.netLine.interval, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.netLine.interval, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("网格线分割间隔数")])]),(_vm.series.netLine.interval.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.series.netLine.interval.cusNumber,"unit":'个',"content":'滑动修改间隔数'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.netLine.interval, "cusNumber", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.netLine.interval, "cusNumber", $event)}}}):_vm._e()],1),_c('chart-base-switch',{attrs:{"switchValue":_vm.series.netArea.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.series.netArea, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.series.netArea, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示网格区域")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.series.netArea.show),expression:"series.netArea.show"}]},[_c('chart-base-select',{attrs:{"selectOption":_vm.intervalOption,"selectValue":_vm.series.netArea.interval.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.series.netArea.interval, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.series.netArea.interval, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("网格区域分割间隔数")])]),(_vm.series.netArea.interval.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.series.netArea.interval.cusNumber,"unit":'个',"content":'滑动修改间隔数'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.series.netArea.interval, "cusNumber", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.series.netArea.interval, "cusNumber", $event)}}}):_vm._e(),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v("网格区域第一颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.netArea.colorOne),callback:function ($$v) {_vm.$set(_vm.series.netArea, "colorOne", $$v)},expression:"series.netArea.colorOne"}})],1),_c('el-col',{attrs:{"span":6}},[_vm._v("网格区域第二颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.series.netArea.colorTwo),callback:function ($$v) {_vm.$set(_vm.series.netArea, "colorTwo", $$v)},expression:"series.netArea.colorTwo"}})],1)],1)],1)],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=template&id=728665dc& + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js +var es_array_slice = __webpack_require__("fb6a"); + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js +var es_regexp_exec = __webpack_require__("ac1f"); + +// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js +var es_string_split = __webpack_require__("1276"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=script&lang=js& + + + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartAxisvue_type_script_lang_js_ = ({ + name: 'ChartXaxis', + props: { + chartAllType: String, + axisOption: Object, + router: String + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + data: function data() { + return { + axis: {}, + series: {}, + //具体坐标轴配置 + fontSizeOption: '', + lineStyleOption: '', + ratioOption: '', + digitOption: '', + fzPosOption: [{ + value: 'middle', + label: '居中' + }, { + value: 'start', + label: '头部' + }, { + value: 'end', + label: '尾部' + }, { + value: 'hidden', + label: '隐藏' + }], + orient: [{ + label: '朝内', + value: 'inside' + }, { + label: '朝外', + value: 'outside' + }], + formatRotation: function formatRotation(val) { + return val + ' °'; + } + }; + }, + watch: { + axisOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.axis, this.axisOption)) { + return; + } + + this.axis = importUtil["deepCopy"](this.axisOption); + this.series = this.axis[newVal.axisType]; + this.fontSizeOption = importUtil["deepCopy"](chartJson["f" /* fontSizeOption */]); + this.lineStyleOption = importUtil["deepCopy"](chartJson["j" /* lineStyleOption */]); + this.intervalOption = importUtil["deepCopy"](chartJson["i" /* intervalOption */]); + this.ratioOption = importUtil["deepCopy"](chartJson["n" /* ratioOption */]); + this.digitOption = importUtil["deepCopy"](chartJson["c" /* digitOption */]); + }, + immediate: true, + deep: true + }, + series: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeAxis(); + } + }, + deep: true, + immediate: true + } + }, + computed: { + chartType: function chartType() { + return this.chartAllType.split('|')[1]; + }, + chartStyle: function chartStyle() { + return this.chartAllType.split('|')[2]; + }, + axisGroup: function axisGroup() { + if (this.chartType == 'bar' && this.chartStyle != 'compare') { + return [{ + value: 'xAxisDown', + label: 'Y轴(左侧垂直)' + }, { + value: 'xAxisUp', + label: 'Y轴(左侧垂直)' + }, { + value: 'yAxisLeft', + label: 'X轴(下方水平)' + }, { + value: 'yAxisRight', + label: 'X轴(上方水平)' + }]; + } else if (this.chartStyle == 'compare') { + return [{ + value: 'xAxisDown', + label: 'Y轴(右侧坐标轴)' + }, { + value: 'xAxisUp', + label: 'Y轴(左侧坐标轴)' + }, { + value: 'yAxisLeft', + label: 'X轴(右侧坐标轴)' + }, { + value: 'yAxisRight', + label: 'X轴(左侧坐标轴)' + }]; + } else { + return [{ + value: 'xAxisDown', + label: 'X轴(下方水平)' + }, { + value: 'xAxisUp', + label: 'X轴(上方水平)' + }, { + value: 'yAxisLeft', + label: 'Y轴(左侧垂直)' + }, { + value: 'yAxisRight', + label: 'Y轴(右侧垂直)' + }]; + } + }, + showLabel: function showLabel() { + if (this.chartType == 'bar' && this.axis.axisType.slice(0, 1) == 'x' || this.chartType != 'bar' && this.axis.axisType.slice(0, 1) == 'y') { + return true; + } + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeAxis: function changeAxis() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.series), + router: this.router + '/' + this.axis.axisType + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartAxisvue_type_script_lang_js_ = (ChartAxisvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartAxis.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartAxisvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartAxis = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.3.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.3.js.map b/src/expendPlugins/chart/chartmix.umd.3.js.map new file mode 100644 index 000000000..5af64ae5b --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?76b7","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartAxis.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?5c0a","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,oFAAN;AAAA,CAAxB;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAM,oFAAN;AAAA,CAArB;;AACA;AACA;CAEA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAASC,CAAT,EAAW;AAC1B,SAAO;AACH,wBAAoBA,CAAC,CAACP,cADnB;AAEH,wBAAoBO,CAAC,CAACL,cAFnB;A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IA;AAAA;AAAA;AAAA,SAJA;AAMA,OAPA,MAOA;AACA,gBACA;AAAA;AAAA;AAAA,SADA,EAEA;AAAA;AAAA;AAAA,SAFA,EAGA;AAAA;AAAA;AAAA,SAHA,EAIA;AAAA;AAAA;AAAA,SAJA;AAMA;AACA,KA9BA;AA+BA,aA/BA,uBA+BA;AACA;AACA;AACA;AACA;AAnCA,GA7DA;AAkGA,iGACA,6DADA;AAEA,cAFA,wBAEA;AACA;AACA,sDADA;AAEA;AAFA;AAIA;AACA;AARA;AAlGA,G;;ACrMgX,CAAgB,6GAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAGxD;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,uCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,gG","file":"chartmix.umd.3.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"6\",\"title\":\"XY轴设置\"}},[_c('chart-base-select',{attrs:{\"selectOption\":_vm.axisGroup,\"selectValue\":_vm.axis.axisType},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.axis, \"axisType\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.axis, \"axisType\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"选择坐标轴\")])]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(_vm._s(_vm.series.name))])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.show),expression:\"series.show\"}]},[_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.title.text,\"placeholder\":'请输入标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.title, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.title, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标题内容\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.title.text),expression:\"series.title.text\"}],staticStyle:{\"margin-top\":\"15px\"}},[_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.series.title.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.series.title, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.series.title, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.fzPosOption,\"selectValue\":_vm.series.title.fzPosition},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.title, \"fzPosition\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.title, \"fzPosition\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"文本对齐方式\")])])],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.inverse},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series, \"inverse\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series, \"inverse\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"反向坐标轴\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":10,\"baseSliderOption\":_vm.series.tickLabel.optimize,\"unit\":'个',\"content\":'滑动修改坐标轴间隔个数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLabel, \"optimize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLabel, \"optimize\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"坐标轴间隔个数\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.title.text),expression:\"series.title.text\"}]},[_c('chart-base-slider',{attrs:{\"hideCol\":true,\"baseSliderOption\":_vm.series.title.nameGap,\"unit\":'px',\"content\":'滑动修改标题与轴线距离'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.title, \"nameGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.title, \"nameGap\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"标题与轴线距离\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"format\":_vm.formatRotation+'',\"max\":180,\"min\":-180,\"baseSliderOption\":_vm.series.title.rotate,\"unit\":'°',\"content\":'滑动修改标题与轴线距离'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.title, \"rotate\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.title, \"rotate\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"倾斜轴标题\")])])],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tickLine.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tickLine, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tickLine, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度线\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"min\":1,\"baseSliderOption\":_vm.series.tickLine.width,\"unit\":'px',\"content\":'滑动修改刻度线宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLine, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLine, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度线宽度\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":7}},[_vm._v(\"刻度线颜色\")]),_c('el-col',{attrs:{\"push\":14,\"span\":3}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"刻度线颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.tickLine.color),callback:function ($$v) {_vm.$set(_vm.series.tickLine, \"color\", $$v)},expression:\"series.tickLine.color\"}})],1)],1)],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tick.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tick, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tick, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.orient,\"selectValue\":_vm.series.tick.position},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tick, \"position\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tick, \"position\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"刻度位置\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"min\":1,\"baseSliderOption\":_vm.series.tick.length,\"unit\":'px',\"content\":'滑动修改刻度长度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tick, \"length\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tick, \"length\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度长度\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":20,\"min\":1,\"baseSliderOption\":_vm.series.tick.width,\"unit\":'px',\"content\":'滑动修改刻度宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tick, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tick, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度宽度\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":6}},[_vm._v(\"刻度颜色\")]),_c('el-col',{attrs:{\"push\":14,\"span\":4}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"刻度颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.tick.color),callback:function ($$v) {_vm.$set(_vm.series.tick, \"color\", $$v)},expression:\"series.tick.color\"}})],1)],1)],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tickLabel.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度标签\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"format\":_vm.formatRotation,\"max\":180,\"min\":-180,\"baseSliderOption\":_vm.series.tickLabel.rotate,\"unit\":'°',\"content\":'滑动修改标签倾斜角度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLabel, \"rotate\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLabel, \"rotate\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"倾斜标签\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showLabel),expression:\"showLabel\"}]},[_c('chart-base-input',{attrs:{\"type\":'text',\"inputValue\":_vm.series.tickLabel.min,\"placeholder\":'请输入刻度最小值'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"min\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"min\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"刻度最小值\")])]),_c('chart-base-input',{attrs:{\"type\":'text',\"inputValue\":_vm.series.tickLabel.max,\"placeholder\":'请输入刻度最大值且最大值不能小于最小值'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"max\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"max\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"刻度最大值\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.ratioOption,\"selectValue\":_vm.series.tickLabel.ratio},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"ratio\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"ratio\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"数值缩放比例\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.digitOption,\"selectValue\":_vm.series.tickLabel.digit},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"digit\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"digit\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"小数位数\")])])],1),_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.tickLabel.prefix,\"placeholder\":'请输入标签前缀'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"prefix\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"prefix\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标签前缀\")])]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.tickLabel.suffix,\"placeholder\":'请输入标签后缀'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"suffix\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"suffix\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标签后缀\")])]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.netLine.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.netLine, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.netLine, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示网格线\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.netLine.show),expression:\"series.netLine.show\"}]},[_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":20,\"min\":1,\"baseSliderOption\":_vm.series.netLine.width,\"unit\":'px',\"content\":'滑动修改网格线宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netLine, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netLine, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"网格线宽度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineStyleOption,\"selectValue\":_vm.series.netLine.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netLine, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netLine, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格线类型\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._v(\"网格线颜色\")]),_c('el-col',{attrs:{\"push\":13,\"span\":3}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"网格线颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"label\":true,\"size\":\"mini\"},model:{value:(_vm.series.netLine.color),callback:function ($$v) {_vm.$set(_vm.series.netLine, \"color\", $$v)},expression:\"series.netLine.color\"}})],1)],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.intervalOption,\"selectValue\":_vm.series.netLine.interval.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netLine.interval, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netLine.interval, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格线分割间隔数\")])]),(_vm.series.netLine.interval.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.series.netLine.interval.cusNumber,\"unit\":'个',\"content\":'滑动修改间隔数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netLine.interval, \"cusNumber\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netLine.interval, \"cusNumber\", $event)}}}):_vm._e()],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.netArea.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.netArea, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.netArea, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示网格区域\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.netArea.show),expression:\"series.netArea.show\"}]},[_c('chart-base-select',{attrs:{\"selectOption\":_vm.intervalOption,\"selectValue\":_vm.series.netArea.interval.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netArea.interval, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netArea.interval, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格区域分割间隔数\")])]),(_vm.series.netArea.interval.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.series.netArea.interval.cusNumber,\"unit\":'个',\"content\":'滑动修改间隔数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netArea.interval, \"cusNumber\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netArea.interval, \"cusNumber\", $event)}}}):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"网格区域第一颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.netArea.colorOne),callback:function ($$v) {_vm.$set(_vm.series.netArea, \"colorOne\", $$v)},expression:\"series.netArea.colorOne\"}})],1),_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"网格区域第二颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.netArea.colorTwo),callback:function ($$v) {_vm.$set(_vm.series.netArea, \"colorTwo\", $$v)},expression:\"series.netArea.colorTwo\"}})],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartAxis.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartAxis.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartAxis.vue?vue&type=template&id=728665dc&\"\nimport script from \"./ChartAxis.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartAxis.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.4.js b/src/expendPlugins/chart/chartmix.umd.4.js new file mode 100644 index 000000000..87618b841 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.4.js @@ -0,0 +1,299 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[4],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "9b10": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=template&id=1ee52ff0& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"4","title":"鼠标提示"}},[_c('chart-base-switch',{attrs:{"switchValue":_vm.cursor.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.cursor, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.cursor, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示提示框")])]),_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.cursor.label}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("鼠标提示样式")])]),_c('el-row',{staticStyle:{"margin-top":"10px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v("背景颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.cursor.backgroundColor),callback:function ($$v) {_vm.$set(_vm.cursor, "backgroundColor", $$v)},expression:"cursor.backgroundColor"}})],1)],1),_c('chart-base-select',{attrs:{"selectOption":_vm.triggerMethodArr,"selectValue":_vm.cursor.triggerOn},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor, "triggerOn", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor, "triggerOn", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("提示触发条件")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.triggerTypeArr,"selectValue":_vm.cursor.triggerType},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor, "triggerType", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor, "triggerType", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("提示触发类型")])]),(_vm.cursor.triggerType != 'item')?_c('div',[_c('chart-base-select',{attrs:{"selectOption":_vm.lineStyleOption,"selectValue":_vm.cursor.axisPointer.style.type},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "type", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "type", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("指示器线类型")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.lineWeightOption,"selectValue":_vm.cursor.axisPointer.style.width},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "width", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.axisPointer.style, "width", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("指示器线宽")])]),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v("线条颜色")]),_c('el-col',{attrs:{"span":3}},[_c('el-color-picker',{attrs:{"size":"mini"},model:{value:(_vm.cursor.axisPointer.style.color),callback:function ($$v) {_vm.$set(_vm.cursor.axisPointer.style, "color", $$v)},expression:"cursor.axisPointer.style.color"}})],1)],1),_c('chart-base-select',{attrs:{"selectOption":_vm.axisPointerArr,"selectValue":_vm.cursor.axisPointer.type},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.axisPointer, "type", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.axisPointer, "type", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("指示器类型")])])],1):_vm._e(),(_vm.cursor.triggerType == 'item')?_c('chart-base-select',{attrs:{"selectOption":_vm.posOption,"selectValue":_vm.cursor.position},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor, "position", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor, "position", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("提示框浮层位置")])]):_vm._e(),_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":2}},[_c('i',{staticClass:"el-icon-menu"})]),_c('el-col',{attrs:{"span":8}},[_vm._v("鼠标提示后缀")])],1),_vm._l((_vm.seriesOption),function(item,i){return _c('el-row',{key:i,staticStyle:{"margin-top":"15px"}},[_c('el-col',{attrs:{"span":6}},[_vm._v(_vm._s(item))]),_c('el-col',{attrs:{"span":4}},[_c('chart-base-input',{attrs:{"hideCol":true,"placeholder":'后缀'}})],1),_c('el-col',{attrs:{"span":6}},[_c('chart-base-select',{attrs:{"tooltip":'数值比例',"selectOption":_vm.ratioOption,"selectValue":_vm.cursor.format[i].ratio,"hideCol":true},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.format[i], "ratio", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.format[i], "ratio", $event)}}})],1),_c('el-col',{attrs:{"span":6}},[_c('chart-base-select',{attrs:{"tooltip":'小数位数',"selectOption":_vm.digitOption,"selectValue":_vm.cursor.format[i].digit,"hideCol":true},on:{"update:selectValue":function($event){return _vm.$set(_vm.cursor.format[i], "digit", $event)},"update:select-value":function($event){return _vm.$set(_vm.cursor.format[i], "digit", $event)}}})],1)],1)})],2)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=template&id=1ee52ff0& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartCursorvue_type_script_lang_js_ = ({ + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + props: { + router: String, + chartAllType: String, + cursorOption: Object + }, + data: function data() { + return { + cursor: {}, + //鼠标提示设置 + fontSizeOption: importUtil["deepCopy"](chartJson["f" /* fontSizeOption */]), + lineStyleOption: importUtil["deepCopy"](chartJson["j" /* lineStyleOption */]), + lineWeightOption: importUtil["deepCopy"](chartJson["k" /* lineWeightOption */]), + posOption: importUtil["deepCopy"](chartJson["l" /* posOption */]), + ratioOption: importUtil["deepCopy"](chartJson["n" /* ratioOption */]), + digitOption: importUtil["deepCopy"](chartJson["c" /* digitOption */]), + triggerTypeArr: [{ + value: 'item', + label: '数据项图形触发' + }, { + value: 'axis', + label: '坐标轴触发' + }], + axisPointerArr: [{ + value: 'line', + label: '直线指示器' + }, { + value: 'shadow', + label: '阴影指示器' + }, { + value: 'cross', + label: '十字准星指示器' + }], + triggerMethodArr: [{ + value: 'mousemove', + label: '鼠标移动' + }, { + value: 'click', + label: '单击左键/鼠标划过' + }, { + value: 'mousemove|click', + label: '同时触发' + }] + }; + }, + watch: { + cursorOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.cursor, newVal)) { + return; + } + + this.cursor = importUtil["deepCopy"](newVal); + }, + immediate: true, + deep: true + }, + cursor: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeCursor(); + } + }, + deep: true, + immediate: true + } + }, + computed: { + seriesOption: function seriesOption() { + var arr = []; + + for (var i = 0; i < this.cursor.format.length; i++) { + arr.push(this.cursor.format[i].seriesName); + } + + return arr; + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeCursor: function changeCursor() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.cursor), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartCursorvue_type_script_lang_js_ = (ChartCursorvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartCursor.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartCursorvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartCursor = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.4.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.4.js.map b/src/expendPlugins/chart/chartmix.umd.4.js.map new file mode 100644 index 000000000..ac024daf4 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.4.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?713b","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartCursor.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartCursor.vue?9f7b","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartCursor.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AAC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;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAXA,GAlCA;AAwDA;AACA,gBADA,0BACA;AACA;;AACA;AACA;AACA;;AACA;AACA;AAPA,GAxDA;AAiEA,iGACA,6DADA;AAEA,gBAFA,0BAEA;AACA;AACA,sDADA;AAEA;AAFA;AAIA;AACA;AARA;AAjEA,G;;AClFkX,CAAgB,iHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG1D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,kG","file":"chartmix.umd.4.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"4\",\"title\":\"鼠标提示\"}},[_c('chart-base-switch',{attrs:{\"switchValue\":_vm.cursor.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.cursor, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.cursor, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示提示框\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.cursor.label}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"鼠标提示样式\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"10px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"背景颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.cursor.backgroundColor),callback:function ($$v) {_vm.$set(_vm.cursor, \"backgroundColor\", $$v)},expression:\"cursor.backgroundColor\"}})],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.triggerMethodArr,\"selectValue\":_vm.cursor.triggerOn},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"triggerOn\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"triggerOn\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示触发条件\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.triggerTypeArr,\"selectValue\":_vm.cursor.triggerType},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"triggerType\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"triggerType\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示触发类型\")])]),(_vm.cursor.triggerType != 'item')?_c('div',[_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineStyleOption,\"selectValue\":_vm.cursor.axisPointer.style.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器线类型\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineWeightOption,\"selectValue\":_vm.cursor.axisPointer.style.width},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"width\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器线宽\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"线条颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.cursor.axisPointer.style.color),callback:function ($$v) {_vm.$set(_vm.cursor.axisPointer.style, \"color\", $$v)},expression:\"cursor.axisPointer.style.color\"}})],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.axisPointerArr,\"selectValue\":_vm.cursor.axisPointer.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器类型\")])])],1):_vm._e(),(_vm.cursor.triggerType == 'item')?_c('chart-base-select',{attrs:{\"selectOption\":_vm.posOption,\"selectValue\":_vm.cursor.position},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"position\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"position\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示框浮层位置\")])]):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":2}},[_c('i',{staticClass:\"el-icon-menu\"})]),_c('el-col',{attrs:{\"span\":8}},[_vm._v(\"鼠标提示后缀\")])],1),_vm._l((_vm.seriesOption),function(item,i){return _c('el-row',{key:i,staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(_vm._s(item))]),_c('el-col',{attrs:{\"span\":4}},[_c('chart-base-input',{attrs:{\"hideCol\":true,\"placeholder\":'后缀'}})],1),_c('el-col',{attrs:{\"span\":6}},[_c('chart-base-select',{attrs:{\"tooltip\":'数值比例',\"selectOption\":_vm.ratioOption,\"selectValue\":_vm.cursor.format[i].ratio,\"hideCol\":true},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.format[i], \"ratio\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.format[i], \"ratio\", $event)}}})],1),_c('el-col',{attrs:{\"span\":6}},[_c('chart-base-select',{attrs:{\"tooltip\":'小数位数',\"selectOption\":_vm.digitOption,\"selectValue\":_vm.cursor.format[i].digit,\"hideCol\":true},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.format[i], \"digit\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.format[i], \"digit\", $event)}}})],1)],1)})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartCursor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartCursor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartCursor.vue?vue&type=template&id=1ee52ff0&\"\nimport script from \"./ChartCursor.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartCursor.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.5.js b/src/expendPlugins/chart/chartmix.umd.5.js new file mode 100644 index 000000000..ac0b65b54 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.5.js @@ -0,0 +1,243 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[5],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "954f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=template&id=9e7569a0& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"3","title":"图例设置"}},[_c('chart-base-switch',{attrs:{"switchValue":_vm.legend.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.legend, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.legend, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示图例")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.legend.show),expression:"legend.show"}]},[_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.legend.label},on:{"update:baseLabelOption":function($event){return _vm.$set(_vm.legend, "label", $event)},"update:base-label-option":function($event){return _vm.$set(_vm.legend, "label", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("图例样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.positionOption,"selectValue":_vm.legend.position.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.position, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.position, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例位置")])]),(_vm.legend.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.position.offsetX,"unit":'%',"content":'滑动修改水平偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.position, "offsetX", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.position, "offsetX", $event)}}}),_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.position.offsetY,"unit":'%',"content":'滑动修改垂直偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.position, "offsetY", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.position, "offsetY", $event)}}})],1):_vm._e(),_c('chart-base-select',{attrs:{"selectOption":_vm.dirOptions,"selectValue":_vm.legend.position.direction},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.position, "direction", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.position, "direction", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例朝向")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.sizeOption,"selectValue":_vm.legend.width.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.width, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.width, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例宽度")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.sizeOption,"selectValue":_vm.legend.height.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.height, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.height, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例高度")])]),(_vm.legend.width.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.width.cusSize,"unit":'px',"content":'滑动修改图例宽度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.width, "cusSize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.width, "cusSize", $event)}}}):_vm._e(),(_vm.legend.height.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.height.cusSize,"unit":'px',"content":'滑动修改图例高度'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.height, "cusSize", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.height, "cusSize", $event)}}}):_vm._e(),_c('chart-base-select',{attrs:{"selectOption":_vm.distanceOption,"selectValue":_vm.legend.distance.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.legend.distance, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.legend.distance, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("图例间距")])]),(_vm.legend.distance.value == 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.legend.distance.cusGap,"unit":'px',"content":'滑动修改图例间距'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.legend.distance, "cusGap", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.legend.distance, "cusGap", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("图例样式")])]):_vm._e()],1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=template&id=9e7569a0& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartLegendvue_type_script_lang_js_ = ({ + props: { + legendOption: Object, + chartAllType: String, + router: String + }, + data: function data() { + return { + legend: {}, + //图例设置 + positionOption: importUtil["deepCopy"](chartJson["m" /* positionOption */]), + sizeOption: importUtil["deepCopy"](chartJson["o" /* sizeOption */]), + distanceOption: importUtil["deepCopy"](chartJson["d" /* distanceOption */]), + dirOptions: [{ + value: "horizontal", + label: "水平" + }, { + value: "vertical", + label: "垂直" + }] + }; + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + watch: { + legendOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.legend, newVal)) { + return; + } + + this.legend = importUtil["deepCopy"](newVal); + }, + immediate: true, + deep: true + }, + legend: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeLegend(); + } + }, + deep: true, + immediate: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeLegend: function changeLegend() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.legend), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartLegendvue_type_script_lang_js_ = (ChartLegendvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartLegend.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartLegendvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartLegend = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.5.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.5.js.map b/src/expendPlugins/chart/chartmix.umd.5.js.map new file mode 100644 index 000000000..6a9b4b782 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.5.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?b74c","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartLegend.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?3100","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,oFAAN;AAAA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AAwD,mCAAmC,OAAO,0EAA0E,KAAK,sCAAsC,sDAAsD,wCAAwC,wDAAwD,YAAY,OAAO,gBAAgB,eAAe,qFAAqF,OAAO,+EAA+E,KAAK,2CAA2C,uDAAuD,8CAA8C,yDAAyD,YAAY,OAAO,eAAe,cAAc;AAC/9I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwDA;AACA;AAEA;AACA;AACA,wBADA;AAEA,wBAFA;AAGA;AAHA,GADA;AAMA,MANA,kBAMA;AACA;AACA,gBADA;AACA;AACA,iFAFA;AAGA,yEAHA;AAIA,iFAJA;AAKA,mBACA;AAAA;AAAA;AAAA,OADA,EAEA;AAAA;AAAA;AAAA,OAFA;AALA;AAUA,GAjBA;AAkBA,2DACA,oCADA,CAlBA;AAqBA;AACA;AACA,aADA,mBACA,MADA,EACA;AACA;AACA;AACA;;AACA;AACA,OANA;AAOA,qBAPA;AAQA;AARA,KADA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAXA,GArBA;AA2CA,iGACA,6DADA;AAEA,gBAFA,0BAEA;AACA;AACA,sDADA;AAEA;AAFA;AAIA;AACA;AARA;AA3CA,G;;AC5DkX,CAAgB,iHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG1D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,kG","file":"chartmix.umd.5.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"3\",\"title\":\"图例设置\"}},[_c('chart-base-switch',{attrs:{\"switchValue\":_vm.legend.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.legend, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.legend, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示图例\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.legend.show),expression:\"legend.show\"}]},[_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.legend.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.legend, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.legend, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"图例样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.positionOption,\"selectValue\":_vm.legend.position.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.position, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.position, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例位置\")])]),(_vm.legend.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.position.offsetX,\"unit\":'%',\"content\":'滑动修改水平偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.position, \"offsetX\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.position, \"offsetX\", $event)}}}),_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.position.offsetY,\"unit\":'%',\"content\":'滑动修改垂直偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.position, \"offsetY\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.position, \"offsetY\", $event)}}})],1):_vm._e(),_c('chart-base-select',{attrs:{\"selectOption\":_vm.dirOptions,\"selectValue\":_vm.legend.position.direction},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.position, \"direction\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.position, \"direction\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例朝向\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.sizeOption,\"selectValue\":_vm.legend.width.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.width, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.width, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例宽度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.sizeOption,\"selectValue\":_vm.legend.height.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.height, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.height, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例高度\")])]),(_vm.legend.width.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.width.cusSize,\"unit\":'px',\"content\":'滑动修改图例宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.width, \"cusSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.width, \"cusSize\", $event)}}}):_vm._e(),(_vm.legend.height.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.height.cusSize,\"unit\":'px',\"content\":'滑动修改图例高度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.height, \"cusSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.height, \"cusSize\", $event)}}}):_vm._e(),_c('chart-base-select',{attrs:{\"selectOption\":_vm.distanceOption,\"selectValue\":_vm.legend.distance.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.distance, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.distance, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例间距\")])]),(_vm.legend.distance.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.distance.cusGap,\"unit\":'px',\"content\":'滑动修改图例间距'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.distance, \"cusGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.distance, \"cusGap\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"图例样式\")])]):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartLegend.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartLegend.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartLegend.vue?vue&type=template&id=9e7569a0&\"\nimport script from \"./ChartLegend.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartLegend.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.6.js b/src/expendPlugins/chart/chartmix.umd.6.js new file mode 100644 index 000000000..7da3377fe --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.6.js @@ -0,0 +1,208 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[6],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "969a": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=template&id=60e525b6& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"2"}},[_c('template',{slot:"title"},[_vm._v(" 副标题设置 "),_c('i',{staticClass:"iconfont icon-biaoti"})]),_c('chart-base-input',{attrs:{"inputValue":_vm.subTitle.text,"placeholder":'请输入副标题内容'},on:{"update:inputValue":function($event){return _vm.$set(_vm.subTitle, "text", $event)},"update:input-value":function($event){return _vm.$set(_vm.subTitle, "text", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("副标题内容")])]),_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.subTitle.label}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("文本样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.distanceOption,"selectValue":_vm.subTitle.distance.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.subTitle.distance, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.subTitle.distance, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("主副标题间距")])]),(_vm.subTitle.distance.value === 'custom')?_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.subTitle.distance.cusGap,"unit":'px',"content":'滑动修改间距'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.subTitle.distance, "cusGap", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.subTitle.distance, "cusGap", $event)}}}):_vm._e()],2)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=template&id=60e525b6& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartSubTitlevue_type_script_lang_js_ = ({ + name: 'ChartSubTitle', + props: { + router: String, + chartAllType: String, + subTitleOption: Object + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + data: function data() { + return { + subTitle: {}, + //整个title设置 + distanceOption: importUtil["deepCopy"](chartJson["d" /* distanceOption */]) //位置选择数组 + + }; + }, + watch: { + subTitleOption: { + handler: function handler(newVal) { + if (importUtil["isEqual"](this.subTitle, newVal)) { + return; + } + + this.subTitle = importUtil["deepCopy"](newVal); //传过来的值需要深拷贝防止数据流向父组件传递 + }, + immediate: true, + deep: true + }, + subTitle: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeTitle(); + } + }, + deep: true, + immediate: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeTitle: function changeTitle() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.subTitle), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartSubTitlevue_type_script_lang_js_ = (ChartSubTitlevue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartSubTitlevue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartSubTitle = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.6.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.6.js.map b/src/expendPlugins/chart/chartmix.umd.6.js.map new file mode 100644 index 000000000..395ca3336 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.6.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?5555","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?bf82","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAM,oFAAN;AAAA,CAAvB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,qFAAN;AAAA,CAAxB;;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAAM,oFAAN;AAAA,CAAxB;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAM,oFAAN;AAAA,CAArB;;AACA;AACA;CAEA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAASC,CAAT,EAAW;AAC1B,SAAO;AACH,wBAAoBA,CAAC,CAACP,cADnB;AAEH,wBAAoBO,CAAC,CAACL,cAFnB;AAGH,yBAAqBK,CAAC,CAACN,eAHpB;AAIH,yBAAqBM,CAAC,CAACH,eAJpB;AAKH,yBAAqBG,CAAC,CAACJ;AALpB,GAAP;AAOH,CARD;;;;;;;;;;;;;;ACXA,0BAA0B,aAAa,0BAA0B,wBAAwB,8BAA8B,OAAO,YAAY,iBAAiB,aAAa,4BAA4B,mCAAmC,2BAA2B,OAAO,wDAAwD,KAAK,qCAAqC,8CAA8C,uCAAuC,gDAAgD,YAAY,OAAO,eAAe,cAAc,6CAA6C,OAAO,qEAAqE,YAAY,OAAO,eAAe,cAAc,6CAA6C,OAAO,4EAA4E,KAAK,sCAAsC,wDAAwD,wCAAwC,0DAA0D,YAAY,OAAO,gBAAgB,eAAe,0FAA0F,OAAO,+EAA+E,KAAK,2CAA2C,yDAAyD,8CAA8C,2DAA2D;AACl8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4BA;AACA;AAEA;AACA,uBADA;AAEA;AACA,kBADA;AAEA,wBAFA;AAGA;AAHA,GAFA;AAOA,2DACA,oCADA,CAPA;AAUA;AACA;AACA,kBADA;AACA;AACA,iFAFA,CAEA;;AAFA;AAIA,GAfA;AAgBA;AACA;AACA;AAEA;AACA;AACA;;AACA,uDALA,CAKA;AACA,OAPA;AAQA,qBARA;AASA;AATA,KADA;AAYA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAZA,GAhBA;AAuCA,iGACA,6DADA;AAEA,eAFA,yBAEA;AACA;AACA,wDADA;AAEA;AAFA;AAIA;AACA;AARA;AAvCA,G;;AChCoX,CAAgB,qHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG5D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,2CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,oG","file":"chartmix.umd.6.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"2\"}},[_c('template',{slot:\"title\"},[_vm._v(\" 副标题设置 \"),_c('i',{staticClass:\"iconfont icon-biaoti\"})]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.subTitle.text,\"placeholder\":'请输入副标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.subTitle, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.subTitle, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"副标题内容\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.subTitle.label}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.distanceOption,\"selectValue\":_vm.subTitle.distance.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.subTitle.distance, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.subTitle.distance, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"主副标题间距\")])]),(_vm.subTitle.distance.value === 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.subTitle.distance.cusGap,\"unit\":'px',\"content\":'滑动修改间距'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.subTitle.distance, \"cusGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.subTitle.distance, \"cusGap\", $event)}}}):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSubTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSubTitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartSubTitle.vue?vue&type=template&id=60e525b6&\"\nimport script from \"./ChartSubTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartSubTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.7.js b/src/expendPlugins/chart/chartmix.umd.7.js new file mode 100644 index 000000000..ae88a64cc --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.7.js @@ -0,0 +1,218 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[7],{ + +/***/ "1540": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseLabel", function() { return ChartBaseLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSwitch", function() { return ChartBaseSwitch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseInput", function() { return ChartBaseInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSelect", function() { return ChartBaseSelect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseSlider", function() { return ChartBaseSlider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartBaseBox", function() { return ChartBaseBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "importComp", function() { return importComp; }); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d3b7"); +/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e6cf"); +/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2f62"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return vuex__WEBPACK_IMPORTED_MODULE_2__["b"]; }); + +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ca00"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return _utils_util__WEBPACK_IMPORTED_MODULE_3__["b"]; }); + +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2ef0"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return lodash__WEBPACK_IMPORTED_MODULE_4__["isEqual"]; }); + + + + +// 复用的组件和方法 +var ChartBaseLabel = function ChartBaseLabel() { + return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.bind(null, "02ce")); +}; + +var ChartBaseSwitch = function ChartBaseSwitch() { + return __webpack_require__.e(/* import() */ 11).then(__webpack_require__.bind(null, "9e1a")); +}; + +var ChartBaseInput = function ChartBaseInput() { + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.bind(null, "37cd")); +}; + +var ChartBaseSelect = function ChartBaseSelect() { + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.bind(null, "138b")); +}; + +var ChartBaseSlider = function ChartBaseSlider() { + return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "b57e")); +}; + +var ChartBaseBox = function ChartBaseBox() { + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.bind(null, "3f9f")); +}; + + + + // 重复引入的组件 + +var importComp = function importComp(t) { + return { + 'chart-base-label': t.ChartBaseLabel, + 'chart-base-input': t.ChartBaseInput, + 'chart-base-switch': t.ChartBaseSwitch, + 'chart-base-slider': t.ChartBaseSlider, + 'chart-base-select': t.ChartBaseSelect + }; +}; + + + +/***/ }), + +/***/ "450b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=template&id=3cf11da3& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{"name":"1"}},[_c('template',{slot:"title"},[_vm._v(" 标题设置 "),_c('i',{staticClass:"iconfont icon-biaoti"})]),_c('chart-base-switch',{attrs:{"switchValue":_vm.title.show},on:{"update:switchValue":function($event){return _vm.$set(_vm.title, "show", $event)},"update:switch-value":function($event){return _vm.$set(_vm.title, "show", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("显示主标题")])]),_c('chart-base-input',{attrs:{"inputValue":_vm.title.text,"placeholder":'请输入标题内容'},on:{"update:inputValue":function($event){return _vm.$set(_vm.title, "text", $event)},"update:input-value":function($event){return _vm.$set(_vm.title, "text", $event)}}},[_c('div',{attrs:{"slot":"input"},slot:"input"},[_vm._v("主标题内容")])]),_c('chart-base-label',{attrs:{"router":_vm.router + '/label',"baseLabelOption":_vm.title.label},on:{"update:baseLabelOption":function($event){return _vm.$set(_vm.title, "label", $event)},"update:base-label-option":function($event){return _vm.$set(_vm.title, "label", $event)}}},[_c('div',{attrs:{"slot":"title"},slot:"title"},[_vm._v("文本样式")])]),_c('chart-base-select',{attrs:{"selectOption":_vm.positionData,"selectValue":_vm.title.position.value},on:{"update:selectValue":function($event){return _vm.$set(_vm.title.position, "value", $event)},"update:select-value":function($event){return _vm.$set(_vm.title.position, "value", $event)}}},[_c('div',{attrs:{"slot":"select"},slot:"select"},[_vm._v("主标题位置")])]),(_vm.title.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.title.position.offsetX,"unit":'%',"content":'滑动修改左边距偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.title.position, "offsetX", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.title.position, "offsetX", $event)}}}),_c('chart-base-slider',{attrs:{"baseSliderOption":_vm.title.position.offsetY,"unit":'%',"content":'滑动修改上边距偏移量'},on:{"update:baseSliderOption":function($event){return _vm.$set(_vm.title.position, "offsetY", $event)},"update:base-slider-option":function($event){return _vm.$set(_vm.title.position, "offsetY", $event)}}})],1):_vm._e()],2)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=template&id=3cf11da3& + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("5530"); + +// EXTERNAL MODULE: ./src/utils/importUtil.js +var importUtil = __webpack_require__("1540"); + +// EXTERNAL MODULE: ./src/data/chartJson.js +var chartJson = __webpack_require__("b4cc"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=script&lang=js& + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var ChartTitlevue_type_script_lang_js_ = ({ + name: 'ChartTitle', + props: { + router: String, + chartAllType: String, + titleOption: Object + }, + components: Object(objectSpread2["a" /* default */])({}, importUtil["importComp"](importUtil)), + data: function data() { + return { + title: '', + //整个title设置, + positionData: chartJson["m" /* positionOption */] + }; + }, + watch: { + titleOption: { + handler: function handler(newVal, oldVal) { + if (importUtil["isEqual"](this.title, newVal)) { + return; + } + + this.title = importUtil["deepCopy"](newVal); + }, + deep: true, + immediate: true + }, + title: { + handler: function handler(newVal, oldVal) { + // 改变值就重新渲染 + if (oldVal) { + this.changeTitle(); + } + }, + deep: true, + immediate: true + } + }, + methods: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, importUtil["mapActions"]('chartSetting', ['updateChartItem'])), {}, { + changeTitle: function changeTitle() { + var updateObj = { + updateObj: importUtil["deepCopy"](this.title), + router: this.router + }; + this.updateChartItem(updateObj); + } + }) +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?vue&type=script&lang=js& + /* harmony default export */ var chart_ChartTitlevue_type_script_lang_js_ = (ChartTitlevue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/chart/ChartTitle.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + chart_ChartTitlevue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartTitle = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.7.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.7.js.map b/src/expendPlugins/chart/chartmix.umd.7.js.map new file mode 100644 index 000000000..4b562fdb2 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.7.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?a624","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartTitle.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?3ba4","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseS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O,gBAAgB,eAAe,mGAAmG,OAAO,gFAAgF,KAAK,2CAA2C,uDAAuD,8CAA8C,yDAAyD,0BAA0B,OAAO,gFAAgF,KAAK,2CAA2C,uDAAuD,8CAA8C,yDAAyD;AAChtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACuCA;AACA;AAEA;AACA,oBADA;AAEA;AACA,kBADA;AAEA,wBAFA;AAGA;AAHA,GAFA;AAOA,2DACA,oCADA,CAPA;AAUA;AACA;AACA,eADA;AACA;AACA;AAFA;AAIA,GAfA;AAgBA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA,KADA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,gBAPA;AAQA;AARA;AAXA,GAhBA;AAsCA,iGACA,6DADA;AAEA,eAFA,yBAEA;AACA;AACA,qDADA;AAEA;AAFA;AAIA;AACA;AARA;AAtCA,G;;AC3CiX,CAAgB,+GAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAGzD;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,wCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,iG","file":"chartmix.umd.7.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"1\"}},[_c('template',{slot:\"title\"},[_vm._v(\" 标题设置 \"),_c('i',{staticClass:\"iconfont icon-biaoti\"})]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.title.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.title, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.title, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示主标题\")])]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.title.text,\"placeholder\":'请输入标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.title, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.title, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"主标题内容\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.title.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.title, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.title, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.positionData,\"selectValue\":_vm.title.position.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.title.position, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.title.position, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"主标题位置\")])]),(_vm.title.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.title.position.offsetX,\"unit\":'%',\"content\":'滑动修改左边距偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.title.position, \"offsetX\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.title.position, \"offsetX\", $event)}}}),_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.title.position.offsetY,\"unit\":'%',\"content\":'滑动修改上边距偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.title.position, \"offsetY\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.title.position, \"offsetY\", $event)}}})],1):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartTitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartTitle.vue?vue&type=template&id=3cf11da3&\"\nimport script from \"./ChartTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.8.js b/src/expendPlugins/chart/chartmix.umd.8.js new file mode 100644 index 000000000..4a40e8ac5 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.8.js @@ -0,0 +1,83 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[8],{ + +/***/ "3f9f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=template&id=78fe7fa8& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',[_c('el-checkbox-group',{attrs:{"size":"mini"},on:{"change":_vm.changeStyle},model:{value:(_vm.boxValue),callback:function ($$v) {_vm.boxValue=$$v},expression:"boxValue"}},_vm._l((_vm.checkboxOption),function(value,name){return _c('el-tooltip',{key:name,attrs:{"open-delay":500,"content":value.des,"effect":"dark","placement":"bottom"}},[_c('el-checkbox-button',{attrs:{"label":name}},[_vm._v(" "+_vm._s(value.text)+" ")])],1)}),1)],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=template&id=78fe7fa8& + +// EXTERNAL MODULE: ./src/utils/util.js + 4 modules +var util = __webpack_require__("ca00"); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ var ChartBaseBoxvue_type_script_lang_js_ = ({ + props: { + checkboxOption: [Object, Array], + boxData: { + type: Array, + default: [] + } + }, + data: function data() { + return { + boxValue: '' + }; + }, + mounted: function mounted() { + this.boxValue = this.boxData ? Object(util["b" /* deepCopy */])(this.boxData) : []; + }, + methods: { + changeStyle: function changeStyle(val) { + this.$emit('update:boxData', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseBoxvue_type_script_lang_js_ = (ChartBaseBoxvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseBoxvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseBox = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.8.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.8.js.map b/src/expendPlugins/chart/chartmix.umd.8.js.map new file mode 100644 index 000000000..cc4290b67 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.8.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?6065","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseBox.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?5317","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,4CAA4C,OAAO,cAAc,KAAK,yBAAyB,QAAQ,8CAA8C,iBAAiB,wBAAwB,kDAAkD,wBAAwB,gBAAgB,2EAA2E,2BAA2B,OAAO,cAAc,2CAA2C;AACvhB;;;;;;;;;;;;;;;;;;;ACUA;AACA;AACA;AACA,mCADA;AAEA;AACA,iBADA;AAEA;AAFA;AAFA,GADA;AAQA,MARA,kBAQA;AACA;AACA;AADA;AAGA,GAZA;AAaA,SAbA,qBAaA;AACA;AACA,GAfA;AAgBA;AACA,eADA,uBACA,GADA,EACA;AACA;AACA;AAHA;AAhBA,G;;ACZmX,CAAgB,kHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG3D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,mG","file":"chartmix.umd.8.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',[_c('el-checkbox-group',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeStyle},model:{value:(_vm.boxValue),callback:function ($$v) {_vm.boxValue=$$v},expression:\"boxValue\"}},_vm._l((_vm.checkboxOption),function(value,name){return _c('el-tooltip',{key:name,attrs:{\"open-delay\":500,\"content\":value.des,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-checkbox-button',{attrs:{\"label\":name}},[_vm._v(\" \"+_vm._s(value.text)+\" \")])],1)}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseBox.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseBox.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseBox.vue?vue&type=template&id=78fe7fa8&\"\nimport script from \"./ChartBaseBox.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseBox.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.9.js b/src/expendPlugins/chart/chartmix.umd.9.js new file mode 100644 index 000000000..adeab892a --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.9.js @@ -0,0 +1,92 @@ +((typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []).push([[9],{ + +/***/ "37cd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3da76939-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=template&id=0f2b52c7& +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticStyle:{"margin-top":"15px"}},[_c('el-col',{staticClass:"title",attrs:{"span":8}},[_vm._t("input")],2),_c('el-col',{attrs:{"span":16}},[_c('el-input',{attrs:{"placeholder":_vm.placeholder,"size":"mini","suffix-icon":"el-icon-edit","type":_vm.type?_vm.type:'text'},on:{"change":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:"input"}})],1)],1):_c('el-input',{attrs:{"type":_vm.type?_vm.type:'text',"placeholder":_vm.placeholder,"size":"mini"},on:{"change":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:"input"}})],1)} +var staticRenderFns = [] + + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=template&id=0f2b52c7& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +/* harmony default export */ var ChartBaseInputvue_type_script_lang_js_ = ({ + name: 'chart-base-input', + props: { + placeholder: { + type: String, + default: '' + }, + inputValue: '', + hideCol: Boolean, + type: String + }, + data: function data() { + return { + input: '' + }; + }, + mounted: function mounted() { + this.input = this.inputValue ? this.inputValue : ''; + }, + methods: { + changeInput: function changeInput(val) { + this.$emit('update:inputValue', val); + } + } +}); +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?vue&type=script&lang=js& + /* harmony default export */ var base_ChartBaseInputvue_type_script_lang_js_ = (ChartBaseInputvue_type_script_lang_js_); +// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__("2877"); + +// CONCATENATED MODULE: ./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + base_ChartBaseInputvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ChartBaseInput = __webpack_exports__["default"] = (component.exports); + +/***/ }) + +}]); +//# sourceMappingURL=chartmix.umd.9.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.9.js.map b/src/expendPlugins/chart/chartmix.umd.9.js.map new file mode 100644 index 000000000..06695531e --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.9.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?3385","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseInput.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?20e7","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue"],"names":[],"mappings":";;;;;;;;;;AAAA,0BAA0B,aAAa,0BAA0B,wBAAwB,6CAA6C,aAAa,qBAAqB,eAAe,2BAA2B,UAAU,mCAAmC,OAAO,WAAW,iBAAiB,OAAO,yGAAyG,KAAK,yBAAyB,QAAQ,2CAA2C,cAAc,qBAAqB,yBAAyB,OAAO,4EAA4E,KAAK,yBAAyB,QAAQ,2CAA2C,cAAc,qBAAqB;AACtuB;;;;;;;;;;;;;;;;;;;;;;;;;;ACoBA;AACA,0BADA;AAEA;AACA;AACA,kBADA;AAEA;AAFA,KADA;AAKA,kBALA;AAMA,oBANA;AAOA;AAPA,GAFA;AAWA,MAXA,kBAWA;AACA;AACA;AADA;AAGA,GAfA;AAgBA,SAhBA,qBAgBA;AACA;AACA,GAlBA;AAmBA;AACA,eADA,uBACA,GADA,EACA;AACA;AACA;AAHA;AAnBA,G;;ACrBqX,CAAgB,sHAAG,EAAC,C;;;;;ACA5S;AAC3B;AACL;;;AAG7D;AACmG;AACnG,gBAAgB,8CAAU;AAC1B,EAAE,2CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,qG","file":"chartmix.umd.9.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"input\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-input',{attrs:{\"placeholder\":_vm.placeholder,\"size\":\"mini\",\"suffix-icon\":\"el-icon-edit\",\"type\":_vm.type?_vm.type:'text'},on:{\"change\":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:\"input\"}})],1)],1):_c('el-input',{attrs:{\"type\":_vm.type?_vm.type:'text',\"placeholder\":_vm.placeholder,\"size\":\"mini\"},on:{\"change\":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:\"input\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseInput.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseInput.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseInput.vue?vue&type=template&id=0f2b52c7&\"\nimport script from \"./ChartBaseInput.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseInput.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.js b/src/expendPlugins/chart/chartmix.umd.js new file mode 100644 index 000000000..7332d0ca3 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.js @@ -0,0 +1,134868 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("vue")); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["chartmix"] = factory(require("vue")); + else + root["chartmix"] = factory(root["Vue"]); +})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // install a JSONP callback for chunk loading +/******/ function webpackJsonpCallback(data) { +/******/ var chunkIds = data[0]; +/******/ var moreModules = data[1]; +/******/ +/******/ +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0, resolves = []; +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ resolves.push(installedChunks[chunkId][0]); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ for(moduleId in moreModules) { +/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { +/******/ modules[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(parentJsonpFunction) parentJsonpFunction(data); +/******/ +/******/ while(resolves.length) { +/******/ resolves.shift()(); +/******/ } +/******/ +/******/ }; +/******/ +/******/ +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 0: 0 +/******/ } +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // Promise = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ +/******/ +/******/ // script path function +/******/ function jsonpScriptSrc(chunkId) { +/******/ return __webpack_require__.p + "chartmix.umd." + ({}[chunkId]||chunkId) + ".js" +/******/ } +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = function requireEnsure(chunkId) { +/******/ var promises = []; +/******/ +/******/ +/******/ // mini-css-extract-plugin CSS loading +/******/ var cssChunks = {"1":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) { +/******/ var href = "css/" + ({}[chunkId]||chunkId) + "." + {"1":"68a757d2","2":"31d6cfe0","3":"31d6cfe0","4":"31d6cfe0","5":"31d6cfe0","6":"31d6cfe0","7":"31d6cfe0","8":"31d6cfe0","9":"31d6cfe0","10":"31d6cfe0","11":"31d6cfe0"}[chunkId] + ".css"; +/******/ var fullhref = __webpack_require__.p + href; +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve(); +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return resolve(); +/******/ } +/******/ var linkTag = document.createElement("link"); +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ linkTag.onload = resolve; +/******/ linkTag.onerror = function(event) { +/******/ var request = event && event.target && event.target.src || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")"); +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.request = request; +/******/ delete installedCssChunks[chunkId] +/******/ linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ }; +/******/ linkTag.href = fullhref; +/******/ +/******/ var head = document.getElementsByTagName("head")[0]; +/******/ head.appendChild(linkTag); +/******/ }).then(function() { +/******/ installedCssChunks[chunkId] = 0; +/******/ })); +/******/ } +/******/ +/******/ // JSONP chunk loading for javascript +/******/ +/******/ var installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise(function(resolve, reject) { +/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; +/******/ }); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var script = document.createElement('script'); +/******/ var onScriptComplete; +/******/ +/******/ script.charset = 'utf-8'; +/******/ script.timeout = 120; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ script.src = jsonpScriptSrc(chunkId); +/******/ +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ onScriptComplete = function (event) { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var chunk = installedChunks[chunkId]; +/******/ if(chunk !== 0) { +/******/ if(chunk) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ chunk[1](error); +/******/ } +/******/ installedChunks[chunkId] = undefined; +/******/ } +/******/ }; +/******/ var timeout = setTimeout(function(){ +/******/ onScriptComplete({ type: 'timeout', target: script }); +/******/ }, 120000); +/******/ script.onerror = script.onload = onScriptComplete; +/******/ document.head.appendChild(script); +/******/ } +/******/ } +/******/ return Promise.all(promises); +/******/ }; +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // on error function for async loading +/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; +/******/ +/******/ var jsonpArray = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpchartmix"] || []; +/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); +/******/ jsonpArray.push = webpackJsonpCallback; +/******/ jsonpArray = jsonpArray.slice(); +/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); +/******/ var parentJsonpFunction = oldJsonpFunction; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "fb15"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "0046": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _util = __webpack_require__("6d8b"); + +var each = _util.each; +var createHashMap = _util.createHashMap; + +var SeriesModel = __webpack_require__("4f85"); + +var createListFromArray = __webpack_require__("3301"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = SeriesModel.extend({ + type: 'series.parallel', + dependencies: ['parallel'], + visualColorAccessPath: 'lineStyle.color', + getInitialData: function (option, ecModel) { + var source = this.getSource(); + setEncodeAndDimensions(source, this); + return createListFromArray(source, this); + }, + + /** + * User can get data raw indices on 'axisAreaSelected' event received. + * + * @public + * @param {string} activeState 'active' or 'inactive' or 'normal' + * @return {Array.} Raw indices + */ + getRawIndicesByActiveState: function (activeState) { + var coordSys = this.coordinateSystem; + var data = this.getData(); + var indices = []; + coordSys.eachActiveState(data, function (theActiveState, dataIndex) { + if (activeState === theActiveState) { + indices.push(data.getRawIndex(dataIndex)); + } + }); + return indices; + }, + defaultOption: { + zlevel: 0, + // 一级层叠 + z: 2, + // 二级层叠 + coordinateSystem: 'parallel', + parallelIndex: 0, + label: { + show: false + }, + inactiveOpacity: 0.05, + activeOpacity: 1, + lineStyle: { + width: 1, + opacity: 0.45, + type: 'solid' + }, + emphasis: { + label: { + show: false + } + }, + progressive: 500, + smooth: false, + // true | false | number + animationEasing: 'linear' + } +}); + +function setEncodeAndDimensions(source, seriesModel) { + // The mapping of parallelAxis dimension to data dimension can + // be specified in parallelAxis.option.dim. For example, if + // parallelAxis.option.dim is 'dim3', it mapping to the third + // dimension of data. But `data.encode` has higher priority. + // Moreover, parallelModel.dimension should not be regarded as data + // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6']; + if (source.encodeDefine) { + return; + } + + var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex')); + + if (!parallelModel) { + return; + } + + var encodeDefine = source.encodeDefine = createHashMap(); + each(parallelModel.dimensions, function (axisDim) { + var dataDimIndex = convertDimNameToNumber(axisDim); + encodeDefine.set(axisDim, dataDimIndex); + }); +} + +function convertDimNameToNumber(dimName) { + return +dimName.replace('dim', ''); +} + +module.exports = _default; + +/***/ }), + +/***/ "004f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var VisualMapView = __webpack_require__("72b6"); + +var graphic = __webpack_require__("2306"); + +var _symbol = __webpack_require__("a15a"); + +var createSymbol = _symbol.createSymbol; + +var layout = __webpack_require__("f934"); + +var helper = __webpack_require__("cbb0"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var PiecewiseVisualMapView = VisualMapView.extend({ + type: 'visualMap.piecewise', + + /** + * @protected + * @override + */ + doRender: function () { + var thisGroup = this.group; + thisGroup.removeAll(); + var visualMapModel = this.visualMapModel; + var textGap = visualMapModel.get('textGap'); + var textStyleModel = visualMapModel.textStyleModel; + var textFont = textStyleModel.getFont(); + var textFill = textStyleModel.getTextColor(); + + var itemAlign = this._getItemAlign(); + + var itemSize = visualMapModel.itemSize; + + var viewData = this._getViewData(); + + var endsText = viewData.endsText; + var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText); + endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign); + zrUtil.each(viewData.viewPieceList, renderItem, this); + endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign); + layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap')); + this.renderBackground(thisGroup); + this.positionGroup(thisGroup); + + function renderItem(item) { + var piece = item.piece; + var itemGroup = new graphic.Group(); + itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece); + + this._enableHoverLink(itemGroup, item.indexInModelPieceList); + + var representValue = visualMapModel.getRepresentValue(piece); + + this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]); + + if (showLabel) { + var visualState = this.visualMapModel.getValueState(representValue); + itemGroup.add(new graphic.Text({ + style: { + x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap, + y: itemSize[1] / 2, + text: piece.text, + textVerticalAlign: 'middle', + textAlign: itemAlign, + textFont: textFont, + textFill: textFill, + opacity: visualState === 'outOfRange' ? 0.5 : 1 + } + })); + } + + thisGroup.add(itemGroup); + } + }, + + /** + * @private + */ + _enableHoverLink: function (itemGroup, pieceIndex) { + itemGroup.on('mouseover', zrUtil.bind(onHoverLink, this, 'highlight')).on('mouseout', zrUtil.bind(onHoverLink, this, 'downplay')); + + function onHoverLink(method) { + var visualMapModel = this.visualMapModel; + visualMapModel.option.hoverLink && this.api.dispatchAction({ + type: method, + batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel) + }); + } + }, + + /** + * @private + */ + _getItemAlign: function () { + var visualMapModel = this.visualMapModel; + var modelOption = visualMapModel.option; + + if (modelOption.orient === 'vertical') { + return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize); + } else { + // horizontal, most case left unless specifying right. + var align = modelOption.align; + + if (!align || align === 'auto') { + align = 'left'; + } + + return align; + } + }, + + /** + * @private + */ + _renderEndsText: function (group, text, itemSize, showLabel, itemAlign) { + if (!text) { + return; + } + + var itemGroup = new graphic.Group(); + var textStyleModel = this.visualMapModel.textStyleModel; + itemGroup.add(new graphic.Text({ + style: { + x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2, + y: itemSize[1] / 2, + textVerticalAlign: 'middle', + textAlign: showLabel ? itemAlign : 'center', + text: text, + textFont: textStyleModel.getFont(), + textFill: textStyleModel.getTextColor() + } + })); + group.add(itemGroup); + }, + + /** + * @private + * @return {Object} {peiceList, endsText} The order is the same as screen pixel order. + */ + _getViewData: function () { + var visualMapModel = this.visualMapModel; + var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) { + return { + piece: piece, + indexInModelPieceList: index + }; + }); + var endsText = visualMapModel.get('text'); // Consider orient and inverse. + + var orient = visualMapModel.get('orient'); + var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high] + + if (orient === 'horizontal' ? inverse : !inverse) { + viewPieceList.reverse(); + } // Origin order of endsText is [high, low] + else if (endsText) { + endsText = endsText.slice().reverse(); + } + + return { + viewPieceList: viewPieceList, + endsText: endsText + }; + }, + + /** + * @private + */ + _createItemSymbol: function (group, representValue, shapeParam) { + group.add(createSymbol(this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], this.getControllerVisual(representValue, 'color'))); + }, + + /** + * @private + */ + _onItemClick: function (piece) { + var visualMapModel = this.visualMapModel; + var option = visualMapModel.option; + var selected = zrUtil.clone(option.selected); + var newKey = visualMapModel.getSelectedMapKey(piece); + + if (option.selectedMode === 'single') { + selected[newKey] = true; + zrUtil.each(selected, function (o, key) { + selected[key] = key === newKey; + }); + } else { + selected[newKey] = !selected[newKey]; + } + + this.api.dispatchAction({ + type: 'selectDataRange', + from: this.uid, + visualMapId: this.visualMapModel.id, + selected: selected + }); + } +}); +var _default = PiecewiseVisualMapView; +module.exports = _default; + +/***/ }), + +/***/ "007d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("cb8f"); + +__webpack_require__("a96b"); + +__webpack_require__("42f6"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// FIXME Better way to pack data in graphic element + +/** + * @action + * @property {string} type + * @property {number} seriesIndex + * @property {number} dataIndex + * @property {number} [x] + * @property {number} [y] + */ +echarts.registerAction({ + type: 'showTip', + event: 'showTip', + update: 'tooltip:manuallyShowTip' +}, // noop +function () {}); +echarts.registerAction({ + type: 'hideTip', + event: 'hideTip', + update: 'tooltip:manuallyHideTip' +}, // noop +function () {}); + +/***/ }), + +/***/ "00ba": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var createListSimply = __webpack_require__("e46b"); + +var _model = __webpack_require__("e0d3"); + +var defaultEmphasis = _model.defaultEmphasis; + +var _sourceHelper = __webpack_require__("0f99"); + +var makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased; + +var LegendVisualProvider = __webpack_require__("c4a3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var FunnelSeries = echarts.extendSeriesModel({ + type: 'series.funnel', + init: function (option) { + FunnelSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item + // Use a function instead of direct access because data reference may changed + + this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)); // Extend labelLine emphasis + + this._defaultLabelLine(option); + }, + getInitialData: function (option, ecModel) { + return createListSimply(this, { + coordDimensions: ['value'], + encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this) + }); + }, + _defaultLabelLine: function (option) { + // Extend labelLine emphasis + defaultEmphasis(option, 'labelLine', ['show']); + var labelLineNormalOpt = option.labelLine; + var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false` + + labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show; + labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show; + }, + // Overwrite + getDataParams: function (dataIndex) { + var data = this.getData(); + var params = FunnelSeries.superCall(this, 'getDataParams', dataIndex); + var valueDim = data.mapDimension('value'); + var sum = data.getSum(valueDim); // Percent is 0 if sum is 0 + + params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2); + params.$vars.push('percent'); + return params; + }, + defaultOption: { + zlevel: 0, + // 一级层叠 + z: 2, + // 二级层叠 + legendHoverLink: true, + left: 80, + top: 60, + right: 80, + bottom: 60, + // width: {totalWidth} - left - right, + // height: {totalHeight} - top - bottom, + // 默认取数据最小最大值 + // min: 0, + // max: 100, + minSize: '0%', + maxSize: '100%', + sort: 'descending', + // 'ascending', 'descending' + gap: 0, + funnelAlign: 'center', + label: { + show: true, + position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 + + }, + labelLine: { + show: true, + length: 20, + lineStyle: { + // color: 各异, + width: 1, + type: 'solid' + } + }, + itemStyle: { + // color: 各异, + borderColor: '#fff', + borderWidth: 1 + }, + emphasis: { + label: { + show: true + } + } + } +}); +var _default = FunnelSeries; +module.exports = _default; + +/***/ }), + +/***/ "00d8": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function dataToCoordSize(dataSize, dataItem) { + dataItem = dataItem || [0, 0]; + return zrUtil.map([0, 1], function (dimIdx) { + var val = dataItem[dimIdx]; + var halfSize = dataSize[dimIdx] / 2; + var p1 = []; + var p2 = []; + p1[dimIdx] = val - halfSize; + p2[dimIdx] = val + halfSize; + p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; + return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); + }, this); +} + +function _default(coordSys) { + var rect = coordSys.getBoundingRect(); + return { + coordSys: { + type: 'geo', + x: rect.x, + y: rect.y, + width: rect.width, + height: rect.height, + zoom: coordSys.getZoom() + }, + api: { + coord: function (data) { + // do not provide "out" and noRoam param, + // Compatible with this usage: + // echarts.util.map(item.points, api.coord) + return coordSys.dataToPoint(data); + }, + size: zrUtil.bind(dataToCoordSize, coordSys) + } + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "00ee": +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__("b622"); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; + +test[TO_STRING_TAG] = 'z'; + +module.exports = String(test) === '[object z]'; + + +/***/ }), + +/***/ "0141": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var BoundingRect = __webpack_require__("9850"); + +var View = __webpack_require__("6cc5"); + +var geoSourceManager = __webpack_require__("5b87"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * [Geo description] + * For backward compatibility, the orginal interface: + * `name, map, geoJson, specialAreas, nameMap` is kept. + * + * @param {string|Object} name + * @param {string} map Map type + * Specify the positioned areas by left, top, width, height + * @param {Object.} [nameMap] + * Specify name alias + * @param {boolean} [invertLongitute=true] + */ +function Geo(name, map, nameMap, invertLongitute) { + View.call(this, name); + /** + * Map type + * @type {string} + */ + + this.map = map; + var source = geoSourceManager.load(map, nameMap); + this._nameCoordMap = source.nameCoordMap; + this._regionsMap = source.regionsMap; + this._invertLongitute = invertLongitute == null ? true : invertLongitute; + /** + * @readOnly + */ + + this.regions = source.regions; + /** + * @type {module:zrender/src/core/BoundingRect} + */ + + this._rect = source.boundingRect; +} + +Geo.prototype = { + constructor: Geo, + type: 'geo', + + /** + * @param {Array.} + * @readOnly + */ + dimensions: ['lng', 'lat'], + + /** + * If contain given lng,lat coord + * @param {Array.} + * @readOnly + */ + containCoord: function (coord) { + var regions = this.regions; + + for (var i = 0; i < regions.length; i++) { + if (regions[i].contain(coord)) { + return true; + } + } + + return false; + }, + + /** + * @override + */ + transformTo: function (x, y, width, height) { + var rect = this.getBoundingRect(); + var invertLongitute = this._invertLongitute; + rect = rect.clone(); + + if (invertLongitute) { + // Longitute is inverted + rect.y = -rect.y - rect.height; + } + + var rawTransformable = this._rawTransformable; + rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height)); + rawTransformable.decomposeTransform(); + + if (invertLongitute) { + var scale = rawTransformable.scale; + scale[1] = -scale[1]; + } + + rawTransformable.updateTransform(); + + this._updateTransform(); + }, + + /** + * @param {string} name + * @return {module:echarts/coord/geo/Region} + */ + getRegion: function (name) { + return this._regionsMap.get(name); + }, + getRegionByCoord: function (coord) { + var regions = this.regions; + + for (var i = 0; i < regions.length; i++) { + if (regions[i].contain(coord)) { + return regions[i]; + } + } + }, + + /** + * Add geoCoord for indexing by name + * @param {string} name + * @param {Array.} geoCoord + */ + addGeoCoord: function (name, geoCoord) { + this._nameCoordMap.set(name, geoCoord); + }, + + /** + * Get geoCoord by name + * @param {string} name + * @return {Array.} + */ + getGeoCoord: function (name) { + return this._nameCoordMap.get(name); + }, + + /** + * @override + */ + getBoundingRect: function () { + return this._rect; + }, + + /** + * @param {string|Array.} data + * @param {boolean} noRoam + * @param {Array.} [out] + * @return {Array.} + */ + dataToPoint: function (data, noRoam, out) { + if (typeof data === 'string') { + // Map area name to geoCoord + data = this.getGeoCoord(data); + } + + if (data) { + return View.prototype.dataToPoint.call(this, data, noRoam, out); + } + }, + + /** + * @override + */ + convertToPixel: zrUtil.curry(doConvert, 'dataToPoint'), + + /** + * @override + */ + convertFromPixel: zrUtil.curry(doConvert, 'pointToData') +}; +zrUtil.mixin(Geo, View); + +function doConvert(methodName, ecModel, finder, value) { + var geoModel = finder.geoModel; + var seriesModel = finder.seriesModel; + var coordSys = geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map. + || (seriesModel.getReferringComponents('geo')[0] || {}).coordinateSystem : null; + return coordSys === this ? coordSys[methodName](value) : null; +} + +var _default = Geo; +module.exports = _default; + +/***/ }), + +/***/ "0156": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Can only be called after coordinate system creation stage. + * (Can be called before coordinate system update stage). + * + * @param {Object} opt {labelInside} + * @return {Object} { + * position, rotation, labelDirection, labelOffset, + * tickDirection, labelRotate, z2 + * } + */ +function layout(gridModel, axisModel, opt) { + opt = opt || {}; + var grid = gridModel.coordinateSystem; + var axis = axisModel.axis; + var layout = {}; + var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0]; + var rawAxisPosition = axis.position; + var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition; + var axisDim = axis.dim; + var rect = grid.getRect(); + var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; + var idx = { + left: 0, + right: 1, + top: 0, + bottom: 1, + onZero: 2 + }; + var axisOffset = axisModel.get('offset') || 0; + var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset]; + + if (otherAxisOnZeroOf) { + var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0)); + posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]); + } // Axis position + + + layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation + + layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim + + var dirMap = { + top: -1, + bottom: 1, + left: -1, + right: 1 + }; + layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition]; + layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0; + + if (axisModel.get('axisTick.inside')) { + layout.tickDirection = -layout.tickDirection; + } + + if (zrUtil.retrieve(opt.labelInside, axisModel.get('axisLabel.inside'))) { + layout.labelDirection = -layout.labelDirection; + } // Special label rotation + + + var labelRotate = axisModel.get('axisLabel.rotate'); + layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea + + layout.z2 = 1; + return layout; +} + +exports.layout = layout; + +/***/ }), + +/***/ "01ed": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +__webpack_require__("5aa9"); + +__webpack_require__("af24"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// Grid view +echarts.extendComponentView({ + type: 'grid', + render: function (gridModel, ecModel) { + this.group.removeAll(); + + if (gridModel.get('show')) { + this.group.add(new graphic.Rect({ + shape: gridModel.coordinateSystem.getRect(), + style: zrUtil.defaults({ + fill: gridModel.get('backgroundColor') + }, gridModel.getItemStyle()), + silent: true, + z2: -1 + })); + } + } +}); +echarts.registerPreprocessor(function (option) { + // Only create grid when need + if (option.xAxis && option.yAxis && !option.grid) { + option.grid = {}; + } +}); + +/***/ }), + +/***/ "01ef": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * For geo and graph. + * + * @param {Object} controllerHost + * @param {module:zrender/Element} controllerHost.target + */ +function updateViewOnPan(controllerHost, dx, dy) { + var target = controllerHost.target; + var pos = target.position; + pos[0] += dx; + pos[1] += dy; + target.dirty(); +} +/** + * For geo and graph. + * + * @param {Object} controllerHost + * @param {module:zrender/Element} controllerHost.target + * @param {number} controllerHost.zoom + * @param {number} controllerHost.zoomLimit like: {min: 1, max: 2} + */ + + +function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) { + var target = controllerHost.target; + var zoomLimit = controllerHost.zoomLimit; + var pos = target.position; + var scale = target.scale; + var newZoom = controllerHost.zoom = controllerHost.zoom || 1; + newZoom *= zoomDelta; + + if (zoomLimit) { + var zoomMin = zoomLimit.min || 0; + var zoomMax = zoomLimit.max || Infinity; + newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin); + } + + var zoomScale = newZoom / controllerHost.zoom; + controllerHost.zoom = newZoom; // Keep the mouse center when scaling + + pos[0] -= (zoomX - pos[0]) * (zoomScale - 1); + pos[1] -= (zoomY - pos[1]) * (zoomScale - 1); + scale[0] *= zoomScale; + scale[1] *= zoomScale; + target.dirty(); +} + +exports.updateViewOnPan = updateViewOnPan; +exports.updateViewOnZoom = updateViewOnZoom; + +/***/ }), + +/***/ "0352": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var ComponentModel = __webpack_require__("6cb7"); + +var ComponentView = __webpack_require__("b12f"); + +var _sourceHelper = __webpack_require__("0f99"); + +var detectSourceFormat = _sourceHelper.detectSourceFormat; + +var _sourceType = __webpack_require__("93d0"); + +var SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * This module is imported by echarts directly. + * + * Notice: + * Always keep this file exists for backward compatibility. + * Because before 4.1.0, dataset is an optional component, + * some users may import this module manually. + */ +ComponentModel.extend({ + type: 'dataset', + + /** + * @protected + */ + defaultOption: { + // 'row', 'column' + seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN, + // null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper" + sourceHeader: null, + dimensions: null, + source: null + }, + optionUpdated: function () { + detectSourceFormat(this); + } +}); +ComponentView.extend({ + type: 'dataset' +}); + +/***/ }), + +/***/ "0366": +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__("1c0b"); + +// optional / simple context binding +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "04f6": +/***/ (function(module, exports) { + +// https://github.com/mziccard/node-timsort +var DEFAULT_MIN_MERGE = 32; +var DEFAULT_MIN_GALLOPING = 7; +var DEFAULT_TMP_STORAGE_LENGTH = 256; + +function minRunLength(n) { + var r = 0; + + while (n >= DEFAULT_MIN_MERGE) { + r |= n & 1; + n >>= 1; + } + + return n + r; +} + +function makeAscendingRun(array, lo, hi, compare) { + var runHi = lo + 1; + + if (runHi === hi) { + return 1; + } + + if (compare(array[runHi++], array[lo]) < 0) { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { + runHi++; + } + + reverseRun(array, lo, runHi); + } else { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { + runHi++; + } + } + + return runHi - lo; +} + +function reverseRun(array, lo, hi) { + hi--; + + while (lo < hi) { + var t = array[lo]; + array[lo++] = array[hi]; + array[hi--] = t; + } +} + +function binaryInsertionSort(array, lo, hi, start, compare) { + if (start === lo) { + start++; + } + + for (; start < hi; start++) { + var pivot = array[start]; + var left = lo; + var right = start; + var mid; + + while (left < right) { + mid = left + right >>> 1; + + if (compare(pivot, array[mid]) < 0) { + right = mid; + } else { + left = mid + 1; + } + } + + var n = start - left; + + switch (n) { + case 3: + array[left + 3] = array[left + 2]; + + case 2: + array[left + 2] = array[left + 1]; + + case 1: + array[left + 1] = array[left]; + break; + + default: + while (n > 0) { + array[left + n] = array[left + n - 1]; + n--; + } + + } + + array[left] = pivot; + } +} + +function gallopLeft(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) > 0) { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } else { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) > 0) { + lastOffset = m + 1; + } else { + offset = m; + } + } + + return offset; +} + +function gallopRight(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) < 0) { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } else { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) < 0) { + offset = m; + } else { + lastOffset = m + 1; + } + } + + return offset; +} + +function TimSort(array, compare) { + var minGallop = DEFAULT_MIN_GALLOPING; + var length = 0; + var tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH; + var stackLength = 0; + var runStart; + var runLength; + var stackSize = 0; + length = array.length; + + if (length < 2 * DEFAULT_TMP_STORAGE_LENGTH) { + tmpStorageLength = length >>> 1; + } + + var tmp = []; + stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40; + runStart = []; + runLength = []; + + function pushRun(_runStart, _runLength) { + runStart[stackSize] = _runStart; + runLength[stackSize] = _runLength; + stackSize += 1; + } + + function mergeRuns() { + while (stackSize > 1) { + var n = stackSize - 2; + + if (n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1] || n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1]) { + if (runLength[n - 1] < runLength[n + 1]) { + n--; + } + } else if (runLength[n] > runLength[n + 1]) { + break; + } + + mergeAt(n); + } + } + + function forceMergeRuns() { + while (stackSize > 1) { + var n = stackSize - 2; + + if (n > 0 && runLength[n - 1] < runLength[n + 1]) { + n--; + } + + mergeAt(n); + } + } + + function mergeAt(i) { + var start1 = runStart[i]; + var length1 = runLength[i]; + var start2 = runStart[i + 1]; + var length2 = runLength[i + 1]; + runLength[i] = length1 + length2; + + if (i === stackSize - 3) { + runStart[i + 1] = runStart[i + 2]; + runLength[i + 1] = runLength[i + 2]; + } + + stackSize--; + var k = gallopRight(array[start2], array, start1, length1, 0, compare); + start1 += k; + length1 -= k; + + if (length1 === 0) { + return; + } + + length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare); + + if (length2 === 0) { + return; + } + + if (length1 <= length2) { + mergeLow(start1, length1, start2, length2); + } else { + mergeHigh(start1, length1, start2, length2); + } + } + + function mergeLow(start1, length1, start2, length2) { + var i = 0; + + for (i = 0; i < length1; i++) { + tmp[i] = array[start1 + i]; + } + + var cursor1 = 0; + var cursor2 = start2; + var dest = start1; + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + return; + } + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + return; + } + + var _minGallop = minGallop; + var count1; + var count2; + var exit; + + while (1) { + count1 = 0; + count2 = 0; + exit = false; + + do { + if (compare(array[cursor2], tmp[cursor1]) < 0) { + array[dest++] = array[cursor2++]; + count2++; + count1 = 0; + + if (--length2 === 0) { + exit = true; + break; + } + } else { + array[dest++] = tmp[cursor1++]; + count1++; + count2 = 0; + + if (--length1 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < _minGallop); + + if (exit) { + break; + } + + do { + count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); + + if (count1 !== 0) { + for (i = 0; i < count1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + dest += count1; + cursor1 += count1; + length1 -= count1; + + if (length1 <= 1) { + exit = true; + break; + } + } + + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + exit = true; + break; + } + + count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); + + if (count2 !== 0) { + for (i = 0; i < count2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + dest += count2; + cursor2 += count2; + length2 -= count2; + + if (length2 === 0) { + exit = true; + break; + } + } + + array[dest++] = tmp[cursor1++]; + + if (--length1 === 1) { + exit = true; + break; + } + + _minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (_minGallop < 0) { + _minGallop = 0; + } + + _minGallop += 2; + } + + minGallop = _minGallop; + minGallop < 1 && (minGallop = 1); + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + } else if (length1 === 0) { + throw new Error(); // throw new Error('mergeLow preconditions were not respected'); + } else { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + } + } + + function mergeHigh(start1, length1, start2, length2) { + var i = 0; + + for (i = 0; i < length2; i++) { + tmp[i] = array[start2 + i]; + } + + var cursor1 = start1 + length1 - 1; + var cursor2 = length2 - 1; + var dest = start2 + length2 - 1; + var customCursor = 0; + var customDest = 0; + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + + return; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + return; + } + + var _minGallop = minGallop; + + while (true) { + var count1 = 0; + var count2 = 0; + var exit = false; + + do { + if (compare(tmp[cursor2], array[cursor1]) < 0) { + array[dest--] = array[cursor1--]; + count1++; + count2 = 0; + + if (--length1 === 0) { + exit = true; + break; + } + } else { + array[dest--] = tmp[cursor2--]; + count2++; + count1 = 0; + + if (--length2 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < _minGallop); + + if (exit) { + break; + } + + do { + count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare); + + if (count1 !== 0) { + dest -= count1; + cursor1 -= count1; + length1 -= count1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = count1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + if (length1 === 0) { + exit = true; + break; + } + } + + array[dest--] = tmp[cursor2--]; + + if (--length2 === 1) { + exit = true; + break; + } + + count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare); + + if (count2 !== 0) { + dest -= count2; + cursor2 -= count2; + length2 -= count2; + customDest = dest + 1; + customCursor = cursor2 + 1; + + for (i = 0; i < count2; i++) { + array[customDest + i] = tmp[customCursor + i]; + } + + if (length2 <= 1) { + exit = true; + break; + } + } + + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + exit = true; + break; + } + + _minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (_minGallop < 0) { + _minGallop = 0; + } + + _minGallop += 2; + } + + minGallop = _minGallop; + + if (minGallop < 1) { + minGallop = 1; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + } else if (length2 === 0) { + throw new Error(); // throw new Error('mergeHigh preconditions were not respected'); + } else { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + } + } + + this.mergeRuns = mergeRuns; + this.forceMergeRuns = forceMergeRuns; + this.pushRun = pushRun; +} + +function sort(array, compare, lo, hi) { + if (!lo) { + lo = 0; + } + + if (!hi) { + hi = array.length; + } + + var remaining = hi - lo; + + if (remaining < 2) { + return; + } + + var runLength = 0; + + if (remaining < DEFAULT_MIN_MERGE) { + runLength = makeAscendingRun(array, lo, hi, compare); + binaryInsertionSort(array, lo, hi, lo + runLength, compare); + return; + } + + var ts = new TimSort(array, compare); + var minRun = minRunLength(remaining); + + do { + runLength = makeAscendingRun(array, lo, hi, compare); + + if (runLength < minRun) { + var force = remaining; + + if (force > minRun) { + force = minRun; + } + + binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); + runLength = force; + } + + ts.pushRun(lo, runLength); + ts.mergeRuns(); + remaining -= runLength; + lo += runLength; + } while (remaining !== 0); + + ts.forceMergeRuns(); +} + +module.exports = sort; + +/***/ }), + +/***/ "057f": +/***/ (function(module, exports, __webpack_require__) { + +var toIndexedObject = __webpack_require__("fc6a"); +var nativeGetOwnPropertyNames = __webpack_require__("241c").f; + +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return nativeGetOwnPropertyNames(it); + } catch (error) { + return windowNames.slice(); + } +}; + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : nativeGetOwnPropertyNames(toIndexedObject(it)); +}; + + +/***/ }), + +/***/ "0655": +/***/ (function(module, exports, __webpack_require__) { + +var windingLine = __webpack_require__("8728"); + +var EPSILON = 1e-8; + +function isAroundEqual(a, b) { + return Math.abs(a - b) < EPSILON; +} + +function contain(points, x, y) { + var w = 0; + var p = points[0]; + + if (!p) { + return false; + } + + for (var i = 1; i < points.length; i++) { + var p2 = points[i]; + w += windingLine(p[0], p[1], p2[0], p2[1], x, y); + p = p2; + } // Close polygon + + + var p0 = points[0]; + + if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) { + w += windingLine(p[0], p[1], p0[0], p0[1], x, y); + } + + return w !== 0; +} + +exports.contain = contain; + +/***/ }), + +/***/ "06ad": +/***/ (function(module, exports, __webpack_require__) { + +var Clip = __webpack_require__("4436"); + +var color = __webpack_require__("41ef"); + +var _util = __webpack_require__("6d8b"); + +var isArrayLike = _util.isArrayLike; + +/** + * @module echarts/animation/Animator + */ +var arraySlice = Array.prototype.slice; + +function defaultGetter(target, key) { + return target[key]; +} + +function defaultSetter(target, key, value) { + target[key] = value; +} +/** + * @param {number} p0 + * @param {number} p1 + * @param {number} percent + * @return {number} + */ + + +function interpolateNumber(p0, p1, percent) { + return (p1 - p0) * percent + p0; +} +/** + * @param {string} p0 + * @param {string} p1 + * @param {number} percent + * @return {string} + */ + + +function interpolateString(p0, p1, percent) { + return percent > 0.5 ? p1 : p0; +} +/** + * @param {Array} p0 + * @param {Array} p1 + * @param {number} percent + * @param {Array} out + * @param {number} arrDim + */ + + +function interpolateArray(p0, p1, percent, out, arrDim) { + var len = p0.length; + + if (arrDim === 1) { + for (var i = 0; i < len; i++) { + out[i] = interpolateNumber(p0[i], p1[i], percent); + } + } else { + var len2 = len && p0[0].length; + + for (var i = 0; i < len; i++) { + for (var j = 0; j < len2; j++) { + out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent); + } + } + } +} // arr0 is source array, arr1 is target array. +// Do some preprocess to avoid error happened when interpolating from arr0 to arr1 + + +function fillArr(arr0, arr1, arrDim) { + var arr0Len = arr0.length; + var arr1Len = arr1.length; + + if (arr0Len !== arr1Len) { + // FIXME Not work for TypedArray + var isPreviousLarger = arr0Len > arr1Len; + + if (isPreviousLarger) { + // Cut the previous + arr0.length = arr1Len; + } else { + // Fill the previous + for (var i = arr0Len; i < arr1Len; i++) { + arr0.push(arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i])); + } + } + } // Handling NaN value + + + var len2 = arr0[0] && arr0[0].length; + + for (var i = 0; i < arr0.length; i++) { + if (arrDim === 1) { + if (isNaN(arr0[i])) { + arr0[i] = arr1[i]; + } + } else { + for (var j = 0; j < len2; j++) { + if (isNaN(arr0[i][j])) { + arr0[i][j] = arr1[i][j]; + } + } + } + } +} +/** + * @param {Array} arr0 + * @param {Array} arr1 + * @param {number} arrDim + * @return {boolean} + */ + + +function isArraySame(arr0, arr1, arrDim) { + if (arr0 === arr1) { + return true; + } + + var len = arr0.length; + + if (len !== arr1.length) { + return false; + } + + if (arrDim === 1) { + for (var i = 0; i < len; i++) { + if (arr0[i] !== arr1[i]) { + return false; + } + } + } else { + var len2 = arr0[0].length; + + for (var i = 0; i < len; i++) { + for (var j = 0; j < len2; j++) { + if (arr0[i][j] !== arr1[i][j]) { + return false; + } + } + } + } + + return true; +} +/** + * Catmull Rom interpolate array + * @param {Array} p0 + * @param {Array} p1 + * @param {Array} p2 + * @param {Array} p3 + * @param {number} t + * @param {number} t2 + * @param {number} t3 + * @param {Array} out + * @param {number} arrDim + */ + + +function catmullRomInterpolateArray(p0, p1, p2, p3, t, t2, t3, out, arrDim) { + var len = p0.length; + + if (arrDim === 1) { + for (var i = 0; i < len; i++) { + out[i] = catmullRomInterpolate(p0[i], p1[i], p2[i], p3[i], t, t2, t3); + } + } else { + var len2 = p0[0].length; + + for (var i = 0; i < len; i++) { + for (var j = 0; j < len2; j++) { + out[i][j] = catmullRomInterpolate(p0[i][j], p1[i][j], p2[i][j], p3[i][j], t, t2, t3); + } + } + } +} +/** + * Catmull Rom interpolate number + * @param {number} p0 + * @param {number} p1 + * @param {number} p2 + * @param {number} p3 + * @param {number} t + * @param {number} t2 + * @param {number} t3 + * @return {number} + */ + + +function catmullRomInterpolate(p0, p1, p2, p3, t, t2, t3) { + var v0 = (p2 - p0) * 0.5; + var v1 = (p3 - p1) * 0.5; + return (2 * (p1 - p2) + v0 + v1) * t3 + (-3 * (p1 - p2) - 2 * v0 - v1) * t2 + v0 * t + p1; +} + +function cloneValue(value) { + if (isArrayLike(value)) { + var len = value.length; + + if (isArrayLike(value[0])) { + var ret = []; + + for (var i = 0; i < len; i++) { + ret.push(arraySlice.call(value[i])); + } + + return ret; + } + + return arraySlice.call(value); + } + + return value; +} + +function rgba2String(rgba) { + rgba[0] = Math.floor(rgba[0]); + rgba[1] = Math.floor(rgba[1]); + rgba[2] = Math.floor(rgba[2]); + return 'rgba(' + rgba.join(',') + ')'; +} + +function getArrayDim(keyframes) { + var lastValue = keyframes[keyframes.length - 1].value; + return isArrayLike(lastValue && lastValue[0]) ? 2 : 1; +} + +function createTrackClip(animator, easing, oneTrackDone, keyframes, propName, forceAnimate) { + var getter = animator._getter; + var setter = animator._setter; + var useSpline = easing === 'spline'; + var trackLen = keyframes.length; + + if (!trackLen) { + return; + } // Guess data type + + + var firstVal = keyframes[0].value; + var isValueArray = isArrayLike(firstVal); + var isValueColor = false; + var isValueString = false; // For vertices morphing + + var arrDim = isValueArray ? getArrayDim(keyframes) : 0; + var trackMaxTime; // Sort keyframe as ascending + + keyframes.sort(function (a, b) { + return a.time - b.time; + }); + trackMaxTime = keyframes[trackLen - 1].time; // Percents of each keyframe + + var kfPercents = []; // Value of each keyframe + + var kfValues = []; + var prevValue = keyframes[0].value; + var isAllValueEqual = true; + + for (var i = 0; i < trackLen; i++) { + kfPercents.push(keyframes[i].time / trackMaxTime); // Assume value is a color when it is a string + + var value = keyframes[i].value; // Check if value is equal, deep check if value is array + + if (!(isValueArray && isArraySame(value, prevValue, arrDim) || !isValueArray && value === prevValue)) { + isAllValueEqual = false; + } + + prevValue = value; // Try converting a string to a color array + + if (typeof value === 'string') { + var colorArray = color.parse(value); + + if (colorArray) { + value = colorArray; + isValueColor = true; + } else { + isValueString = true; + } + } + + kfValues.push(value); + } + + if (!forceAnimate && isAllValueEqual) { + return; + } + + var lastValue = kfValues[trackLen - 1]; // Polyfill array and NaN value + + for (var i = 0; i < trackLen - 1; i++) { + if (isValueArray) { + fillArr(kfValues[i], lastValue, arrDim); + } else { + if (isNaN(kfValues[i]) && !isNaN(lastValue) && !isValueString && !isValueColor) { + kfValues[i] = lastValue; + } + } + } + + isValueArray && fillArr(getter(animator._target, propName), lastValue, arrDim); // Cache the key of last frame to speed up when + // animation playback is sequency + + var lastFrame = 0; + var lastFramePercent = 0; + var start; + var w; + var p0; + var p1; + var p2; + var p3; + + if (isValueColor) { + var rgba = [0, 0, 0, 0]; + } + + var onframe = function (target, percent) { + // Find the range keyframes + // kf1-----kf2---------current--------kf3 + // find kf2 and kf3 and do interpolation + var frame; // In the easing function like elasticOut, percent may less than 0 + + if (percent < 0) { + frame = 0; + } else if (percent < lastFramePercent) { + // Start from next key + // PENDING start from lastFrame ? + start = Math.min(lastFrame + 1, trackLen - 1); + + for (frame = start; frame >= 0; frame--) { + if (kfPercents[frame] <= percent) { + break; + } + } // PENDING really need to do this ? + + + frame = Math.min(frame, trackLen - 2); + } else { + for (frame = lastFrame; frame < trackLen; frame++) { + if (kfPercents[frame] > percent) { + break; + } + } + + frame = Math.min(frame - 1, trackLen - 2); + } + + lastFrame = frame; + lastFramePercent = percent; + var range = kfPercents[frame + 1] - kfPercents[frame]; + + if (range === 0) { + return; + } else { + w = (percent - kfPercents[frame]) / range; + } + + if (useSpline) { + p1 = kfValues[frame]; + p0 = kfValues[frame === 0 ? frame : frame - 1]; + p2 = kfValues[frame > trackLen - 2 ? trackLen - 1 : frame + 1]; + p3 = kfValues[frame > trackLen - 3 ? trackLen - 1 : frame + 2]; + + if (isValueArray) { + catmullRomInterpolateArray(p0, p1, p2, p3, w, w * w, w * w * w, getter(target, propName), arrDim); + } else { + var value; + + if (isValueColor) { + value = catmullRomInterpolateArray(p0, p1, p2, p3, w, w * w, w * w * w, rgba, 1); + value = rgba2String(rgba); + } else if (isValueString) { + // String is step(0.5) + return interpolateString(p1, p2, w); + } else { + value = catmullRomInterpolate(p0, p1, p2, p3, w, w * w, w * w * w); + } + + setter(target, propName, value); + } + } else { + if (isValueArray) { + interpolateArray(kfValues[frame], kfValues[frame + 1], w, getter(target, propName), arrDim); + } else { + var value; + + if (isValueColor) { + interpolateArray(kfValues[frame], kfValues[frame + 1], w, rgba, 1); + value = rgba2String(rgba); + } else if (isValueString) { + // String is step(0.5) + return interpolateString(kfValues[frame], kfValues[frame + 1], w); + } else { + value = interpolateNumber(kfValues[frame], kfValues[frame + 1], w); + } + + setter(target, propName, value); + } + } + }; + + var clip = new Clip({ + target: animator._target, + life: trackMaxTime, + loop: animator._loop, + delay: animator._delay, + onframe: onframe, + ondestroy: oneTrackDone + }); + + if (easing && easing !== 'spline') { + clip.easing = easing; + } + + return clip; +} +/** + * @alias module:zrender/animation/Animator + * @constructor + * @param {Object} target + * @param {boolean} loop + * @param {Function} getter + * @param {Function} setter + */ + + +var Animator = function (target, loop, getter, setter) { + this._tracks = {}; + this._target = target; + this._loop = loop || false; + this._getter = getter || defaultGetter; + this._setter = setter || defaultSetter; + this._clipCount = 0; + this._delay = 0; + this._doneList = []; + this._onframeList = []; + this._clipList = []; +}; + +Animator.prototype = { + /** + * Set Animation keyframe + * @param {number} time 关键帧时间,单位是ms + * @param {Object} props 关键帧的属性值,key-value表示 + * @return {module:zrender/animation/Animator} + */ + when: function (time + /* ms */ + , props) { + var tracks = this._tracks; + + for (var propName in props) { + if (!props.hasOwnProperty(propName)) { + continue; + } + + if (!tracks[propName]) { + tracks[propName] = []; // Invalid value + + var value = this._getter(this._target, propName); + + if (value == null) { + // zrLog('Invalid property ' + propName); + continue; + } // If time is 0 + // Then props is given initialize value + // Else + // Initialize value from current prop value + + + if (time !== 0) { + tracks[propName].push({ + time: 0, + value: cloneValue(value) + }); + } + } + + tracks[propName].push({ + time: time, + value: props[propName] + }); + } + + return this; + }, + + /** + * 添加动画每一帧的回调函数 + * @param {Function} callback + * @return {module:zrender/animation/Animator} + */ + during: function (callback) { + this._onframeList.push(callback); + + return this; + }, + pause: function () { + for (var i = 0; i < this._clipList.length; i++) { + this._clipList[i].pause(); + } + + this._paused = true; + }, + resume: function () { + for (var i = 0; i < this._clipList.length; i++) { + this._clipList[i].resume(); + } + + this._paused = false; + }, + isPaused: function () { + return !!this._paused; + }, + _doneCallback: function () { + // Clear all tracks + this._tracks = {}; // Clear all clips + + this._clipList.length = 0; + var doneList = this._doneList; + var len = doneList.length; + + for (var i = 0; i < len; i++) { + doneList[i].call(this); + } + }, + + /** + * Start the animation + * @param {string|Function} [easing] + * 动画缓动函数,详见{@link module:zrender/animation/easing} + * @param {boolean} forceAnimate + * @return {module:zrender/animation/Animator} + */ + start: function (easing, forceAnimate) { + var self = this; + var clipCount = 0; + + var oneTrackDone = function () { + clipCount--; + + if (!clipCount) { + self._doneCallback(); + } + }; + + var lastClip; + + for (var propName in this._tracks) { + if (!this._tracks.hasOwnProperty(propName)) { + continue; + } + + var clip = createTrackClip(this, easing, oneTrackDone, this._tracks[propName], propName, forceAnimate); + + if (clip) { + this._clipList.push(clip); + + clipCount++; // If start after added to animation + + if (this.animation) { + this.animation.addClip(clip); + } + + lastClip = clip; + } + } // Add during callback on the last clip + + + if (lastClip) { + var oldOnFrame = lastClip.onframe; + + lastClip.onframe = function (target, percent) { + oldOnFrame(target, percent); + + for (var i = 0; i < self._onframeList.length; i++) { + self._onframeList[i](target, percent); + } + }; + } // This optimization will help the case that in the upper application + // the view may be refreshed frequently, where animation will be + // called repeatly but nothing changed. + + + if (!clipCount) { + this._doneCallback(); + } + + return this; + }, + + /** + * Stop animation + * @param {boolean} forwardToLast If move to last frame before stop + */ + stop: function (forwardToLast) { + var clipList = this._clipList; + var animation = this.animation; + + for (var i = 0; i < clipList.length; i++) { + var clip = clipList[i]; + + if (forwardToLast) { + // Move to last frame before stop + clip.onframe(this._target, 1); + } + + animation && animation.removeClip(clip); + } + + clipList.length = 0; + }, + + /** + * Set when animation delay starts + * @param {number} time 单位ms + * @return {module:zrender/animation/Animator} + */ + delay: function (time) { + this._delay = time; + return this; + }, + + /** + * Add callback for animation end + * @param {Function} cb + * @return {module:zrender/animation/Animator} + */ + done: function (cb) { + if (cb) { + this._doneList.push(cb); + } + + return this; + }, + + /** + * @return {Array.} + */ + getClips: function () { + return this._clipList; + } +}; +var _default = Animator; +module.exports = _default; + +/***/ }), + +/***/ "06c7": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Model = __webpack_require__("4319"); + +var linkList = __webpack_require__("31d9"); + +var List = __webpack_require__("6179"); + +var createDimensions = __webpack_require__("b1d4"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Tree data structure + * + * @module echarts/data/Tree + */ + +/** + * @constructor module:echarts/data/Tree~TreeNode + * @param {string} name + * @param {module:echarts/data/Tree} hostTree + */ +var TreeNode = function (name, hostTree) { + /** + * @type {string} + */ + this.name = name || ''; + /** + * Depth of node + * + * @type {number} + * @readOnly + */ + + this.depth = 0; + /** + * Height of the subtree rooted at this node. + * @type {number} + * @readOnly + */ + + this.height = 0; + /** + * @type {module:echarts/data/Tree~TreeNode} + * @readOnly + */ + + this.parentNode = null; + /** + * Reference to list item. + * Do not persistent dataIndex outside, + * besause it may be changed by list. + * If dataIndex -1, + * this node is logical deleted (filtered) in list. + * + * @type {Object} + * @readOnly + */ + + this.dataIndex = -1; + /** + * @type {Array.} + * @readOnly + */ + + this.children = []; + /** + * @type {Array.} + * @pubilc + */ + + this.viewChildren = []; + /** + * @type {moduel:echarts/data/Tree} + * @readOnly + */ + + this.hostTree = hostTree; +}; + +TreeNode.prototype = { + constructor: TreeNode, + + /** + * The node is removed. + * @return {boolean} is removed. + */ + isRemoved: function () { + return this.dataIndex < 0; + }, + + /** + * Travel this subtree (include this node). + * Usage: + * node.eachNode(function () { ... }); // preorder + * node.eachNode('preorder', function () { ... }); // preorder + * node.eachNode('postorder', function () { ... }); // postorder + * node.eachNode( + * {order: 'postorder', attr: 'viewChildren'}, + * function () { ... } + * ); // postorder + * + * @param {(Object|string)} options If string, means order. + * @param {string=} options.order 'preorder' or 'postorder' + * @param {string=} options.attr 'children' or 'viewChildren' + * @param {Function} cb If in preorder and return false, + * its subtree will not be visited. + * @param {Object} [context] + */ + eachNode: function (options, cb, context) { + if (typeof options === 'function') { + context = cb; + cb = options; + options = null; + } + + options = options || {}; + + if (zrUtil.isString(options)) { + options = { + order: options + }; + } + + var order = options.order || 'preorder'; + var children = this[options.attr || 'children']; + var suppressVisitSub; + order === 'preorder' && (suppressVisitSub = cb.call(context, this)); + + for (var i = 0; !suppressVisitSub && i < children.length; i++) { + children[i].eachNode(options, cb, context); + } + + order === 'postorder' && cb.call(context, this); + }, + + /** + * Update depth and height of this subtree. + * + * @param {number} depth + */ + updateDepthAndHeight: function (depth) { + var height = 0; + this.depth = depth; + + for (var i = 0; i < this.children.length; i++) { + var child = this.children[i]; + child.updateDepthAndHeight(depth + 1); + + if (child.height > height) { + height = child.height; + } + } + + this.height = height + 1; + }, + + /** + * @param {string} id + * @return {module:echarts/data/Tree~TreeNode} + */ + getNodeById: function (id) { + if (this.getId() === id) { + return this; + } + + for (var i = 0, children = this.children, len = children.length; i < len; i++) { + var res = children[i].getNodeById(id); + + if (res) { + return res; + } + } + }, + + /** + * @param {module:echarts/data/Tree~TreeNode} node + * @return {boolean} + */ + contains: function (node) { + if (node === this) { + return true; + } + + for (var i = 0, children = this.children, len = children.length; i < len; i++) { + var res = children[i].contains(node); + + if (res) { + return res; + } + } + }, + + /** + * @param {boolean} includeSelf Default false. + * @return {Array.} order: [root, child, grandchild, ...] + */ + getAncestors: function (includeSelf) { + var ancestors = []; + var node = includeSelf ? this : this.parentNode; + + while (node) { + ancestors.push(node); + node = node.parentNode; + } + + ancestors.reverse(); + return ancestors; + }, + + /** + * @param {string|Array=} [dimension='value'] Default 'value'. can be 0, 1, 2, 3 + * @return {number} Value. + */ + getValue: function (dimension) { + var data = this.hostTree.data; + return data.get(data.getDimension(dimension || 'value'), this.dataIndex); + }, + + /** + * @param {Object} layout + * @param {boolean=} [merge=false] + */ + setLayout: function (layout, merge) { + this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge); + }, + + /** + * @return {Object} layout + */ + getLayout: function () { + return this.hostTree.data.getItemLayout(this.dataIndex); + }, + + /** + * @param {string} [path] + * @return {module:echarts/model/Model} + */ + getModel: function (path) { + if (this.dataIndex < 0) { + return; + } + + var hostTree = this.hostTree; + var itemModel = hostTree.data.getItemModel(this.dataIndex); + var levelModel = this.getLevelModel(); // FIXME: refactor levelModel to "beforeLink", and remove levelModel here. + + if (levelModel) { + return itemModel.getModel(path, levelModel.getModel(path)); + } else { + return itemModel.getModel(path); + } + }, + + /** + * @return {module:echarts/model/Model} + */ + getLevelModel: function () { + return (this.hostTree.levelModels || [])[this.depth]; + }, + + /** + * @example + * setItemVisual('color', color); + * setItemVisual({ + * 'color': color + * }); + */ + setVisual: function (key, value) { + this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value); + }, + + /** + * Get item visual + */ + getVisual: function (key, ignoreParent) { + return this.hostTree.data.getItemVisual(this.dataIndex, key, ignoreParent); + }, + + /** + * @public + * @return {number} + */ + getRawIndex: function () { + return this.hostTree.data.getRawIndex(this.dataIndex); + }, + + /** + * @public + * @return {string} + */ + getId: function () { + return this.hostTree.data.getId(this.dataIndex); + }, + + /** + * if this is an ancestor of another node + * + * @public + * @param {TreeNode} node another node + * @return {boolean} if is ancestor + */ + isAncestorOf: function (node) { + var parent = node.parentNode; + + while (parent) { + if (parent === this) { + return true; + } + + parent = parent.parentNode; + } + + return false; + }, + + /** + * if this is an descendant of another node + * + * @public + * @param {TreeNode} node another node + * @return {boolean} if is descendant + */ + isDescendantOf: function (node) { + return node !== this && node.isAncestorOf(this); + } +}; +/** + * @constructor + * @alias module:echarts/data/Tree + * @param {module:echarts/model/Model} hostModel + * @param {Array.} levelOptions + */ + +function Tree(hostModel, levelOptions) { + /** + * @type {module:echarts/data/Tree~TreeNode} + * @readOnly + */ + this.root; + /** + * @type {module:echarts/data/List} + * @readOnly + */ + + this.data; + /** + * Index of each item is the same as the raw index of coresponding list item. + * @private + * @type {Array.} treeOptions.levels + * @return module:echarts/data/Tree + */ + +Tree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) { + var tree = new Tree(hostModel, treeOptions && treeOptions.levels); + var listData = []; + var dimMax = 1; + buildHierarchy(dataRoot); + + function buildHierarchy(dataNode, parentNode) { + var value = dataNode.value; + dimMax = Math.max(dimMax, zrUtil.isArray(value) ? value.length : 1); + listData.push(dataNode); + var node = new TreeNode(dataNode.name, tree); + parentNode ? addChild(node, parentNode) : tree.root = node; + + tree._nodes.push(node); + + var children = dataNode.children; + + if (children) { + for (var i = 0; i < children.length; i++) { + buildHierarchy(children[i], node); + } + } + } + + tree.root.updateDepthAndHeight(0); + var dimensionsInfo = createDimensions(listData, { + coordDimensions: ['value'], + dimensionsCount: dimMax + }); + var list = new List(dimensionsInfo, hostModel); + list.initData(listData); + beforeLink && beforeLink(list); + linkList({ + mainData: list, + struct: tree, + structAttr: 'tree' + }); + tree.update(); + return tree; +}; +/** + * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote, + * so this function is not ready and not necessary to be public. + * + * @param {(module:echarts/data/Tree~TreeNode|Object)} child + */ + + +function addChild(child, node) { + var children = node.children; + + if (child.parentNode === node) { + return; + } + + children.push(child); + child.parentNode = node; +} + +var _default = Tree; +module.exports = _default; + +/***/ }), + +/***/ "06cf": +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__("83ab"); +var propertyIsEnumerableModule = __webpack_require__("d1e7"); +var createPropertyDescriptor = __webpack_require__("5c6c"); +var toIndexedObject = __webpack_require__("fc6a"); +var toPrimitive = __webpack_require__("c04e"); +var has = __webpack_require__("5135"); +var IE8_DOM_DEFINE = __webpack_require__("0cfb"); + +var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor +exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); +}; + + +/***/ }), + +/***/ "06ea": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var zrUtil = __webpack_require__("6d8b"); + +var VisualMapModel = __webpack_require__("eaea"); + +var VisualMapping = __webpack_require__("5f14"); + +var visualDefault = __webpack_require__("60e3"); + +var _number = __webpack_require__("3842"); + +var reformIntervals = _number.reformIntervals; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var PiecewiseModel = VisualMapModel.extend({ + type: 'visualMap.piecewise', + + /** + * Order Rule: + * + * option.categories / option.pieces / option.text / option.selected: + * If !option.inverse, + * Order when vertical: ['top', ..., 'bottom']. + * Order when horizontal: ['left', ..., 'right']. + * If option.inverse, the meaning of + * the order should be reversed. + * + * this._pieceList: + * The order is always [low, ..., high]. + * + * Mapping from location to low-high: + * If !option.inverse + * When vertical, top is high. + * When horizontal, right is high. + * If option.inverse, reverse. + */ + + /** + * @protected + */ + defaultOption: { + selected: null, + // Object. If not specified, means selected. + // When pieces and splitNumber: {'0': true, '5': true} + // When categories: {'cate1': false, 'cate3': true} + // When selected === false, means all unselected. + minOpen: false, + // Whether include values that smaller than `min`. + maxOpen: false, + // Whether include values that bigger than `max`. + align: 'auto', + // 'auto', 'left', 'right' + itemWidth: 20, + // When put the controller vertically, it is the length of + // horizontal side of each item. Otherwise, vertical side. + itemHeight: 14, + // When put the controller vertically, it is the length of + // vertical side of each item. Otherwise, horizontal side. + itemSymbol: 'roundRect', + pieceList: null, + // Each item is Object, with some of those attrs: + // {min, max, lt, gt, lte, gte, value, + // color, colorSaturation, colorAlpha, opacity, + // symbol, symbolSize}, which customize the range or visual + // coding of the certain piece. Besides, see "Order Rule". + categories: null, + // category names, like: ['some1', 'some2', 'some3']. + // Attr min/max are ignored when categories set. See "Order Rule" + splitNumber: 5, + // If set to 5, auto split five pieces equally. + // If set to 0 and component type not set, component type will be + // determined as "continuous". (It is less reasonable but for ec2 + // compatibility, see echarts/component/visualMap/typeDefaulter) + selectedMode: 'multiple', + // Can be 'multiple' or 'single'. + itemGap: 10, + // The gap between two items, in px. + hoverLink: true, + // Enable hover highlight. + showLabel: null // By default, when text is used, label will hide (the logic + // is remained for compatibility reason) + + }, + + /** + * @override + */ + optionUpdated: function (newOption, isInit) { + PiecewiseModel.superApply(this, 'optionUpdated', arguments); + /** + * The order is always [low, ..., high]. + * [{text: string, interval: Array.}, ...] + * @private + * @type {Array.} + */ + + this._pieceList = []; + this.resetExtent(); + /** + * 'pieces', 'categories', 'splitNumber' + * @type {string} + */ + + var mode = this._mode = this._determineMode(); + + resetMethods[this._mode].call(this); + + this._resetSelected(newOption, isInit); + + var categories = this.option.categories; + this.resetVisual(function (mappingOption, state) { + if (mode === 'categories') { + mappingOption.mappingMethod = 'category'; + mappingOption.categories = zrUtil.clone(categories); + } else { + mappingOption.dataExtent = this.getExtent(); + mappingOption.mappingMethod = 'piecewise'; + mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) { + var piece = zrUtil.clone(piece); + + if (state !== 'inRange') { + // FIXME + // outOfRange do not support special visual in pieces. + piece.visual = null; + } + + return piece; + }); + } + }); + }, + + /** + * @protected + * @override + */ + completeVisualOption: function () { + // Consider this case: + // visualMap: { + // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}] + // } + // where no inRange/outOfRange set but only pieces. So we should make + // default inRange/outOfRange for this case, otherwise visuals that only + // appear in `pieces` will not be taken into account in visual encoding. + var option = this.option; + var visualTypesInPieces = {}; + var visualTypes = VisualMapping.listVisualTypes(); + var isCategory = this.isCategory(); + zrUtil.each(option.pieces, function (piece) { + zrUtil.each(visualTypes, function (visualType) { + if (piece.hasOwnProperty(visualType)) { + visualTypesInPieces[visualType] = 1; + } + }); + }); + zrUtil.each(visualTypesInPieces, function (v, visualType) { + var exists = 0; + zrUtil.each(this.stateList, function (state) { + exists |= has(option, state, visualType) || has(option.target, state, visualType); + }, this); + !exists && zrUtil.each(this.stateList, function (state) { + (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory); + }); + }, this); + + function has(obj, state, visualType) { + return obj && obj[state] && (zrUtil.isObject(obj[state]) ? obj[state].hasOwnProperty(visualType) : obj[state] === visualType // e.g., inRange: 'symbol' + ); + } + + VisualMapModel.prototype.completeVisualOption.apply(this, arguments); + }, + _resetSelected: function (newOption, isInit) { + var thisOption = this.option; + var pieceList = this._pieceList; // Selected do not merge but all override. + + var selected = (isInit ? thisOption : newOption).selected || {}; + thisOption.selected = selected; // Consider 'not specified' means true. + + zrUtil.each(pieceList, function (piece, index) { + var key = this.getSelectedMapKey(piece); + + if (!selected.hasOwnProperty(key)) { + selected[key] = true; + } + }, this); + + if (thisOption.selectedMode === 'single') { + // Ensure there is only one selected. + var hasSel = false; + zrUtil.each(pieceList, function (piece, index) { + var key = this.getSelectedMapKey(piece); + + if (selected[key]) { + hasSel ? selected[key] = false : hasSel = true; + } + }, this); + } // thisOption.selectedMode === 'multiple', default: all selected. + + }, + + /** + * @public + */ + getSelectedMapKey: function (piece) { + return this._mode === 'categories' ? piece.value + '' : piece.index + ''; + }, + + /** + * @public + */ + getPieceList: function () { + return this._pieceList; + }, + + /** + * @private + * @return {string} + */ + _determineMode: function () { + var option = this.option; + return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber'; + }, + + /** + * @public + * @override + */ + setSelected: function (selected) { + this.option.selected = zrUtil.clone(selected); + }, + + /** + * @public + * @override + */ + getValueState: function (value) { + var index = VisualMapping.findPieceIndex(value, this._pieceList); + return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange'; + }, + + /** + * @public + * @params {number} pieceIndex piece index in visualMapModel.getPieceList() + * @return {Array.} [{seriesId, dataIndex: >}, ...] + */ + findTargetDataIndices: function (pieceIndex) { + var result = []; + this.eachTargetSeries(function (seriesModel) { + var dataIndices = []; + var data = seriesModel.getData(); + data.each(this.getDataDimension(data), function (value, dataIndex) { + // Should always base on model pieceList, because it is order sensitive. + var pIdx = VisualMapping.findPieceIndex(value, this._pieceList); + pIdx === pieceIndex && dataIndices.push(dataIndex); + }, this); + result.push({ + seriesId: seriesModel.id, + dataIndex: dataIndices + }); + }, this); + return result; + }, + + /** + * @private + * @param {Object} piece piece.value or piece.interval is required. + * @return {number} Can be Infinity or -Infinity + */ + getRepresentValue: function (piece) { + var representValue; + + if (this.isCategory()) { + representValue = piece.value; + } else { + if (piece.value != null) { + representValue = piece.value; + } else { + var pieceInterval = piece.interval || []; + representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2; + } + } + + return representValue; + }, + getVisualMeta: function (getColorVisual) { + // Do not support category. (category axis is ordinal, numerical) + if (this.isCategory()) { + return; + } + + var stops = []; + var outerColors = []; + var visualMapModel = this; + + function setStop(interval, valueState) { + var representValue = visualMapModel.getRepresentValue({ + interval: interval + }); + + if (!valueState) { + valueState = visualMapModel.getValueState(representValue); + } + + var color = getColorVisual(representValue, valueState); + + if (interval[0] === -Infinity) { + outerColors[0] = color; + } else if (interval[1] === Infinity) { + outerColors[1] = color; + } else { + stops.push({ + value: interval[0], + color: color + }, { + value: interval[1], + color: color + }); + } + } // Suplement + + + var pieceList = this._pieceList.slice(); + + if (!pieceList.length) { + pieceList.push({ + interval: [-Infinity, Infinity] + }); + } else { + var edge = pieceList[0].interval[0]; + edge !== -Infinity && pieceList.unshift({ + interval: [-Infinity, edge] + }); + edge = pieceList[pieceList.length - 1].interval[1]; + edge !== Infinity && pieceList.push({ + interval: [edge, Infinity] + }); + } + + var curr = -Infinity; + zrUtil.each(pieceList, function (piece) { + var interval = piece.interval; + + if (interval) { + // Fulfill gap. + interval[0] > curr && setStop([curr, interval[0]], 'outOfRange'); + setStop(interval.slice()); + curr = interval[1]; + } + }, this); + return { + stops: stops, + outerColors: outerColors + }; + } +}); +/** + * Key is this._mode + * @type {Object} + * @this {module:echarts/component/viusalMap/PiecewiseMode} + */ + +var resetMethods = { + splitNumber: function () { + var thisOption = this.option; + var pieceList = this._pieceList; + var precision = Math.min(thisOption.precision, 20); + var dataExtent = this.getExtent(); + var splitNumber = thisOption.splitNumber; + splitNumber = Math.max(parseInt(splitNumber, 10), 1); + thisOption.splitNumber = splitNumber; + var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption + + while (+splitStep.toFixed(precision) !== splitStep && precision < 5) { + precision++; + } + + thisOption.precision = precision; + splitStep = +splitStep.toFixed(precision); + + if (thisOption.minOpen) { + pieceList.push({ + interval: [-Infinity, dataExtent[0]], + close: [0, 0] + }); + } + + for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) { + var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep; + pieceList.push({ + interval: [curr, max], + close: [1, 1] + }); + } + + if (thisOption.maxOpen) { + pieceList.push({ + interval: [dataExtent[1], Infinity], + close: [0, 0] + }); + } + + reformIntervals(pieceList); + zrUtil.each(pieceList, function (piece, index) { + piece.index = index; + piece.text = this.formatValueText(piece.interval); + }, this); + }, + categories: function () { + var thisOption = this.option; + zrUtil.each(thisOption.categories, function (cate) { + // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。 + // 是否改一致。 + this._pieceList.push({ + text: this.formatValueText(cate, true), + value: cate + }); + }, this); // See "Order Rule". + + normalizeReverse(thisOption, this._pieceList); + }, + pieces: function () { + var thisOption = this.option; + var pieceList = this._pieceList; + zrUtil.each(thisOption.pieces, function (pieceListItem, index) { + if (!zrUtil.isObject(pieceListItem)) { + pieceListItem = { + value: pieceListItem + }; + } + + var item = { + text: '', + index: index + }; + + if (pieceListItem.label != null) { + item.text = pieceListItem.label; + } + + if (pieceListItem.hasOwnProperty('value')) { + var value = item.value = pieceListItem.value; + item.interval = [value, value]; + item.close = [1, 1]; + } else { + // `min` `max` is legacy option. + // `lt` `gt` `lte` `gte` is recommanded. + var interval = item.interval = []; + var close = item.close = [0, 0]; + var closeList = [1, 0, 1]; + var infinityList = [-Infinity, Infinity]; + var useMinMax = []; + + for (var lg = 0; lg < 2; lg++) { + var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg]; + + for (var i = 0; i < 3 && interval[lg] == null; i++) { + interval[lg] = pieceListItem[names[i]]; + close[lg] = closeList[i]; + useMinMax[lg] = i === 2; + } + + interval[lg] == null && (interval[lg] = infinityList[lg]); + } + + useMinMax[0] && interval[1] === Infinity && (close[0] = 0); + useMinMax[1] && interval[0] === -Infinity && (close[1] = 0); + + if (interval[0] === interval[1] && close[0] && close[1]) { + // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}], + // we use value to lift the priority when min === max + item.value = interval[0]; + } + } + + item.visual = VisualMapping.retrieveVisuals(pieceListItem); + pieceList.push(item); + }, this); // See "Order Rule". + + normalizeReverse(thisOption, pieceList); // Only pieces + + reformIntervals(pieceList); + zrUtil.each(pieceList, function (piece) { + var close = piece.close; + var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]]; + piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols); + }, this); + } +}; + +function normalizeReverse(thisOption, pieceList) { + var inverse = thisOption.inverse; + + if (thisOption.orient === 'vertical' ? !inverse : inverse) { + pieceList.reverse(); + } +} + +var _default = PiecewiseModel; +module.exports = _default; + +/***/ }), + +/***/ "07d7": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var zrColor = __webpack_require__("41ef"); + +var eventUtil = __webpack_require__("607d"); + +var domUtil = __webpack_require__("65ed"); + +var env = __webpack_require__("22d1"); + +var formatUtil = __webpack_require__("eda2"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var each = zrUtil.each; +var toCamelCase = formatUtil.toCamelCase; +var vendors = ['', '-webkit-', '-moz-', '-o-']; +var gCssText = 'position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;'; +/** + * @param {number} duration + * @return {string} + * @inner + */ + +function assembleTransition(duration) { + var transitionCurve = 'cubic-bezier(0.23, 1, 0.32, 1)'; + var transitionText = 'left ' + duration + 's ' + transitionCurve + ',' + 'top ' + duration + 's ' + transitionCurve; + return zrUtil.map(vendors, function (vendorPrefix) { + return vendorPrefix + 'transition:' + transitionText; + }).join(';'); +} +/** + * @param {Object} textStyle + * @return {string} + * @inner + */ + + +function assembleFont(textStyleModel) { + var cssText = []; + var fontSize = textStyleModel.get('fontSize'); + var color = textStyleModel.getTextColor(); + color && cssText.push('color:' + color); + cssText.push('font:' + textStyleModel.getFont()); + fontSize && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px'); + each(['decoration', 'align'], function (name) { + var val = textStyleModel.get(name); + val && cssText.push('text-' + name + ':' + val); + }); + return cssText.join(';'); +} +/** + * @param {Object} tooltipModel + * @return {string} + * @inner + */ + + +function assembleCssText(tooltipModel) { + var cssText = []; + var transitionDuration = tooltipModel.get('transitionDuration'); + var backgroundColor = tooltipModel.get('backgroundColor'); + var textStyleModel = tooltipModel.getModel('textStyle'); + var padding = tooltipModel.get('padding'); // Animation transition. Do not animate when transitionDuration is 0. + + transitionDuration && cssText.push(assembleTransition(transitionDuration)); + + if (backgroundColor) { + if (env.canvasSupported) { + cssText.push('background-Color:' + backgroundColor); + } else { + // for ie + cssText.push('background-Color:#' + zrColor.toHex(backgroundColor)); + cssText.push('filter:alpha(opacity=70)'); + } + } // Border style + + + each(['width', 'color', 'radius'], function (name) { + var borderName = 'border-' + name; + var camelCase = toCamelCase(borderName); + var val = tooltipModel.get(camelCase); + val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px')); + }); // Text style + + cssText.push(assembleFont(textStyleModel)); // Padding + + if (padding != null) { + cssText.push('padding:' + formatUtil.normalizeCssArray(padding).join('px ') + 'px'); + } + + return cssText.join(';') + ';'; +} // If not able to make, do not modify the input `out`. + + +function makeStyleCoord(out, zr, appendToBody, zrX, zrY) { + var zrPainter = zr && zr.painter; + + if (appendToBody) { + var zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); + + if (zrViewportRoot) { + // Some APPs might use scale on body, so we support CSS transform here. + domUtil.transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY); + } + } else { + out[0] = zrX; + out[1] = zrY; // xy should be based on canvas root. But tooltipContent is + // the sibling of canvas root. So padding of ec container + // should be considered here. + + var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset(); + + if (viewportRootOffset) { + out[0] += viewportRootOffset.offsetLeft; + out[1] += viewportRootOffset.offsetTop; + } + } +} +/** + * @alias module:echarts/component/tooltip/TooltipContent + * @param {HTMLElement} container + * @param {ExtensionAPI} api + * @param {Object} [opt] + * @param {boolean} [opt.appendToBody] + * `false`: the DOM element will be inside the container. Default value. + * `true`: the DOM element will be appended to HTML body, which avoid + * some overflow clip but intrude outside of the container. + * @constructor + */ + + +function TooltipContent(container, api, opt) { + if (env.wxa) { + return null; + } + + var el = document.createElement('div'); + el.domBelongToZr = true; + this.el = el; + var zr = this._zr = api.getZr(); + var appendToBody = this._appendToBody = opt && opt.appendToBody; + this._styleCoord = [0, 0]; + makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2); + + if (appendToBody) { + document.body.appendChild(el); + } else { + container.appendChild(el); + } + + this._container = container; + this._show = false; + /** + * @private + */ + + this._hideTimeout; // FIXME + // Is it needed to trigger zr event manually if + // the browser do not support `pointer-events: none`. + + var self = this; + + el.onmouseenter = function () { + // clear the timeout in hideLater and keep showing tooltip + if (self._enterable) { + clearTimeout(self._hideTimeout); + self._show = true; + } + + self._inContent = true; + }; + + el.onmousemove = function (e) { + e = e || window.event; + + if (!self._enterable) { + // `pointer-events: none` is set to tooltip content div + // if `enterable` is set as `false`, and `el.onmousemove` + // can not be triggered. But in browser that do not + // support `pointer-events`, we need to do this: + // Try trigger zrender event to avoid mouse + // in and out shape too frequently + var handler = zr.handler; + var zrViewportRoot = zr.painter.getViewportRoot(); + eventUtil.normalizeEvent(zrViewportRoot, e, true); + handler.dispatch('mousemove', e); + } + }; + + el.onmouseleave = function () { + if (self._enterable) { + if (self._show) { + self.hideLater(self._hideDelay); + } + } + + self._inContent = false; + }; +} + +TooltipContent.prototype = { + constructor: TooltipContent, + + /** + * @private + * @type {boolean} + */ + _enterable: true, + + /** + * Update when tooltip is rendered + */ + update: function () { + // FIXME + // Move this logic to ec main? + var container = this._container; + var stl = container.currentStyle || document.defaultView.getComputedStyle(container); + var domStyle = container.style; + + if (domStyle.position !== 'absolute' && stl.position !== 'absolute') { + domStyle.position = 'relative'; + } // Hide the tooltip + // PENDING + // this.hide(); + + }, + show: function (tooltipModel) { + clearTimeout(this._hideTimeout); + var el = this.el; + var styleCoord = this._styleCoord; + el.style.cssText = gCssText + assembleCssText(tooltipModel) // Because of the reason described in: + // http://stackoverflow.com/questions/21125587/css3-transition-not-working-in-chrome-anymore + // we should set initial value to `left` and `top`. + + ';left:' + styleCoord[0] + 'px;top:' + styleCoord[1] + 'px;' + (tooltipModel.get('extraCssText') || ''); + el.style.display = el.innerHTML ? 'block' : 'none'; // If mouse occsionally move over the tooltip, a mouseout event will be + // triggered by canvas, and cuase some unexpectable result like dragging + // stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve + // it. Although it is not suppored by IE8~IE10, fortunately it is a rare + // scenario. + + el.style.pointerEvents = this._enterable ? 'auto' : 'none'; + this._show = true; + }, + setContent: function (content) { + this.el.innerHTML = content == null ? '' : content; + }, + setEnterable: function (enterable) { + this._enterable = enterable; + }, + getSize: function () { + var el = this.el; + return [el.clientWidth, el.clientHeight]; + }, + moveTo: function (zrX, zrY) { + var styleCoord = this._styleCoord; + makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY); + var style = this.el.style; + style.left = styleCoord[0] + 'px'; + style.top = styleCoord[1] + 'px'; + }, + hide: function () { + this.el.style.display = 'none'; + this._show = false; + }, + hideLater: function (time) { + if (this._show && !(this._inContent && this._enterable)) { + if (time) { + this._hideDelay = time; // Set show false to avoid invoke hideLater mutiple times + + this._show = false; + this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time); + } else { + this.hide(); + } + } + }, + isShow: function () { + return this._show; + }, + dispose: function () { + this.el.parentNode.removeChild(this.el); + }, + getOuterSize: function () { + var width = this.el.clientWidth; + var height = this.el.clientHeight; // Consider browser compatibility. + // IE8 does not support getComputedStyle. + + if (document.defaultView && document.defaultView.getComputedStyle) { + var stl = document.defaultView.getComputedStyle(this.el); + + if (stl) { + width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10); + height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10); + } + } + + return { + width: width, + height: height + }; + } +}; +var _default = TooltipContent; +module.exports = _default; + +/***/ }), + +/***/ "07e6": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +__webpack_require__("4d85"); + +__webpack_require__("a753"); + +/***/ }), + +/***/ "0817": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("f306"); + +__webpack_require__("0046"); + +__webpack_require__("60d7"); + +var parallelVisual = __webpack_require__("ab71"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerVisual(parallelVisual); + +/***/ }), + +/***/ "085d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("bd92"); + +__webpack_require__("19e2"); + +var preprocessor = __webpack_require__("eabf"); + +var candlestickVisual = __webpack_require__("4c99"); + +var candlestickLayout = __webpack_require__("09b1"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerPreprocessor(preprocessor); +echarts.registerVisual(candlestickVisual); +echarts.registerLayout(candlestickLayout); + +/***/ }), + +/***/ "08c3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Axis = __webpack_require__("84ce"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Extend axis 2d + * @constructor module:echarts/coord/cartesian/Axis2D + * @extends {module:echarts/coord/cartesian/Axis} + * @param {string} dim + * @param {*} scale + * @param {Array.} coordExtent + * @param {string} axisType + * @param {string} position + */ +var TimelineAxis = function (dim, scale, coordExtent, axisType) { + Axis.call(this, dim, scale, coordExtent); + /** + * Axis type + * - 'category' + * - 'value' + * - 'time' + * - 'log' + * @type {string} + */ + + this.type = axisType || 'value'; + /** + * Axis model + * @param {module:echarts/component/TimelineModel} + */ + + this.model = null; +}; + +TimelineAxis.prototype = { + constructor: TimelineAxis, + + /** + * @override + */ + getLabelModel: function () { + return this.model.getModel('label'); + }, + + /** + * @override + */ + isHorizontal: function () { + return this.model.get('orient') === 'horizontal'; + } +}; +zrUtil.inherits(TimelineAxis, Axis); +var _default = TimelineAxis; +module.exports = _default; + +/***/ }), + +/***/ "09b1": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _graphic = __webpack_require__("2306"); + +var subPixelOptimize = _graphic.subPixelOptimize; + +var createRenderPlanner = __webpack_require__("cccd"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _util = __webpack_require__("6d8b"); + +var retrieve2 = _util.retrieve2; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* global Float32Array */ +var LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array; +var _default = { + seriesType: 'candlestick', + plan: createRenderPlanner(), + reset: function (seriesModel) { + var coordSys = seriesModel.coordinateSystem; + var data = seriesModel.getData(); + var candleWidth = calculateCandleWidth(seriesModel, data); + var cDimIdx = 0; + var vDimIdx = 1; + var coordDims = ['x', 'y']; + var cDim = data.mapDimension(coordDims[cDimIdx]); + var vDims = data.mapDimension(coordDims[vDimIdx], true); + var openDim = vDims[0]; + var closeDim = vDims[1]; + var lowestDim = vDims[2]; + var highestDim = vDims[3]; + data.setLayout({ + candleWidth: candleWidth, + // The value is experimented visually. + isSimpleBox: candleWidth <= 1.3 + }); + + if (cDim == null || vDims.length < 4) { + return; + } + + return { + progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress + }; + + function normalProgress(params, data) { + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var axisDimVal = data.get(cDim, dataIndex); + var openVal = data.get(openDim, dataIndex); + var closeVal = data.get(closeDim, dataIndex); + var lowestVal = data.get(lowestDim, dataIndex); + var highestVal = data.get(highestDim, dataIndex); + var ocLow = Math.min(openVal, closeVal); + var ocHigh = Math.max(openVal, closeVal); + var ocLowPoint = getPoint(ocLow, axisDimVal); + var ocHighPoint = getPoint(ocHigh, axisDimVal); + var lowestPoint = getPoint(lowestVal, axisDimVal); + var highestPoint = getPoint(highestVal, axisDimVal); + var ends = []; + addBodyEnd(ends, ocHighPoint, 0); + addBodyEnd(ends, ocLowPoint, 1); + ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint)); + data.setItemLayout(dataIndex, { + sign: getSign(data, dataIndex, openVal, closeVal, closeDim), + initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx], + // open point. + ends: ends, + brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal) + }); + } + + function getPoint(val, axisDimVal) { + var p = []; + p[cDimIdx] = axisDimVal; + p[vDimIdx] = val; + return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p); + } + + function addBodyEnd(ends, point, start) { + var point1 = point.slice(); + var point2 = point.slice(); + point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false); + point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true); + start ? ends.push(point1, point2) : ends.push(point2, point1); + } + + function makeBrushRect(lowestVal, highestVal, axisDimVal) { + var pmin = getPoint(lowestVal, axisDimVal); + var pmax = getPoint(highestVal, axisDimVal); + pmin[cDimIdx] -= candleWidth / 2; + pmax[cDimIdx] -= candleWidth / 2; + return { + x: pmin[0], + y: pmin[1], + width: vDimIdx ? candleWidth : pmax[0] - pmin[0], + height: vDimIdx ? pmax[1] - pmin[1] : candleWidth + }; + } + + function subPixelOptimizePoint(point) { + point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1); + return point; + } + } + + function largeProgress(params, data) { + // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...] + var points = new LargeArr(params.count * 4); + var offset = 0; + var point; + var tmpIn = []; + var tmpOut = []; + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var axisDimVal = data.get(cDim, dataIndex); + var openVal = data.get(openDim, dataIndex); + var closeVal = data.get(closeDim, dataIndex); + var lowestVal = data.get(lowestDim, dataIndex); + var highestVal = data.get(highestDim, dataIndex); + + if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) { + points[offset++] = NaN; + offset += 3; + continue; + } + + points[offset++] = getSign(data, dataIndex, openVal, closeVal, closeDim); + tmpIn[cDimIdx] = axisDimVal; + tmpIn[vDimIdx] = lowestVal; + point = coordSys.dataToPoint(tmpIn, null, tmpOut); + points[offset++] = point ? point[0] : NaN; + points[offset++] = point ? point[1] : NaN; + tmpIn[vDimIdx] = highestVal; + point = coordSys.dataToPoint(tmpIn, null, tmpOut); + points[offset++] = point ? point[1] : NaN; + } + + data.setLayout('largePoints', points); + } + } +}; + +function getSign(data, dataIndex, openVal, closeVal, closeDim) { + var sign; + + if (openVal > closeVal) { + sign = -1; + } else if (openVal < closeVal) { + sign = 1; + } else { + sign = dataIndex > 0 // If close === open, compare with close of last record + ? data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1 : // No record of previous, set to be positive + 1; + } + + return sign; +} + +function calculateCandleWidth(seriesModel, data) { + var baseAxis = seriesModel.getBaseAxis(); + var extent; + var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count()); + var barMaxWidth = parsePercent(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth); + var barMinWidth = parsePercent(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth); + var barWidth = seriesModel.get('barWidth'); + return barWidth != null ? parsePercent(barWidth, bandWidth) // Put max outer to ensure bar visible in spite of overlap. + : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth); +} + +module.exports = _default; + +/***/ }), + +/***/ "0a6d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +__webpack_require__("e4d1"); + +__webpack_require__("7f72"); + +/***/ }), + +/***/ "0b44": +/***/ (function(module, exports, __webpack_require__) { + +var eventUtil = __webpack_require__("607d"); + +/** + * Only implements needed gestures for mobile. + */ +var GestureMgr = function () { + /** + * @private + * @type {Array.} + */ + this._track = []; +}; + +GestureMgr.prototype = { + constructor: GestureMgr, + recognize: function (event, target, root) { + this._doTrack(event, target, root); + + return this._recognize(event); + }, + clear: function () { + this._track.length = 0; + return this; + }, + _doTrack: function (event, target, root) { + var touches = event.touches; + + if (!touches) { + return; + } + + var trackItem = { + points: [], + touches: [], + target: target, + event: event + }; + + for (var i = 0, len = touches.length; i < len; i++) { + var touch = touches[i]; + var pos = eventUtil.clientToLocal(root, touch, {}); + trackItem.points.push([pos.zrX, pos.zrY]); + trackItem.touches.push(touch); + } + + this._track.push(trackItem); + }, + _recognize: function (event) { + for (var eventName in recognizers) { + if (recognizers.hasOwnProperty(eventName)) { + var gestureInfo = recognizers[eventName](this._track, event); + + if (gestureInfo) { + return gestureInfo; + } + } + } + } +}; + +function dist(pointPair) { + var dx = pointPair[1][0] - pointPair[0][0]; + var dy = pointPair[1][1] - pointPair[0][1]; + return Math.sqrt(dx * dx + dy * dy); +} + +function center(pointPair) { + return [(pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2]; +} + +var recognizers = { + pinch: function (track, event) { + var trackLen = track.length; + + if (!trackLen) { + return; + } + + var pinchEnd = (track[trackLen - 1] || {}).points; + var pinchPre = (track[trackLen - 2] || {}).points || pinchEnd; + + if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) { + var pinchScale = dist(pinchEnd) / dist(pinchPre); + !isFinite(pinchScale) && (pinchScale = 1); + event.pinchScale = pinchScale; + var pinchCenter = center(pinchEnd); + event.pinchX = pinchCenter[0]; + event.pinchY = pinchCenter[1]; + return { + type: 'pinch', + target: track[0].target, + event: event + }; + } + } // Only pinch currently. + +}; +var _default = GestureMgr; +module.exports = _default; + +/***/ }), + +/***/ "0b4b": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +__webpack_require__("d28f"); + +__webpack_require__("f14c"); + +__webpack_require__("0ee7"); + +__webpack_require__("ebf9"); + +/***/ }), + +/***/ "0c12": +/***/ (function(module, exports) { + +// Myers' Diff Algorithm +// Modified from https://github.com/kpdecker/jsdiff/blob/master/src/diff/base.js +function Diff() {} + +Diff.prototype = { + diff: function (oldArr, newArr, equals) { + if (!equals) { + equals = function (a, b) { + return a === b; + }; + } + + this.equals = equals; + var self = this; + oldArr = oldArr.slice(); + newArr = newArr.slice(); // Allow subclasses to massage the input prior to running + + var newLen = newArr.length; + var oldLen = oldArr.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newArr, oldArr, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + var indices = []; + + for (var i = 0; i < newArr.length; i++) { + indices.push(i); + } // Identity per the equality and tokenizer + + + return [{ + indices: indices, + count: newArr.length + }]; + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath; + var addPath = bestPath[diagonalPath - 1]; + var removePath = bestPath[diagonalPath + 1]; + var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen; + var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + oldPos = self.extractCommon(basePath, newArr, oldArr, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return buildValues(self, basePath.components, newArr, oldArr); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } + + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + }, + pushComponent: function (components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + extractCommon: function (basePath, newArr, oldArr, diagonalPath) { + var newLen = newArr.length; + var oldLen = oldArr.length; + var newPos = basePath.newPos; + var oldPos = newPos - diagonalPath; + var commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newArr[newPos + 1], oldArr[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + tokenize: function (value) { + return value.slice(); + }, + join: function (value) { + return value.slice(); + } +}; + +function buildValues(diff, components, newArr, oldArr) { + var componentPos = 0; + var componentLen = components.length; + var newPos = 0; + var oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + var indices = []; + + for (var i = newPos; i < newPos + component.count; i++) { + indices.push(i); + } + + component.indices = indices; + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + var indices = []; + + for (var i = oldPos; i < oldPos + component.count; i++) { + indices.push(i); + } + + component.indices = indices; + oldPos += component.count; + } + } + + return components; +} + +function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; +} + +var arrayDiff = new Diff(); + +function _default(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); +} + +module.exports = _default; + +/***/ }), + +/***/ "0c41": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var RoamController = __webpack_require__("4a01"); + +var roamHelper = __webpack_require__("01ef"); + +var _cursorHelper = __webpack_require__("c526"); + +var onIrrelevantElement = _cursorHelper.onIrrelevantElement; + +var graphic = __webpack_require__("2306"); + +var geoSourceManager = __webpack_require__("5b87"); + +var _component = __webpack_require__("8918"); + +var getUID = _component.getUID; + +var Transformable = __webpack_require__("0cde"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function getFixedItemStyle(model) { + var itemStyle = model.getItemStyle(); + var areaColor = model.get('areaColor'); // If user want the color not to be changed when hover, + // they should both set areaColor and color to be null. + + if (areaColor != null) { + itemStyle.fill = areaColor; + } + + return itemStyle; +} + +function updateMapSelectHandler(mapDraw, mapOrGeoModel, regionsGroup, api, fromView) { + regionsGroup.off('click'); + regionsGroup.off('mousedown'); + + if (mapOrGeoModel.get('selectedMode')) { + regionsGroup.on('mousedown', function () { + mapDraw._mouseDownFlag = true; + }); + regionsGroup.on('click', function (e) { + if (!mapDraw._mouseDownFlag) { + return; + } + + mapDraw._mouseDownFlag = false; + var el = e.target; + + while (!el.__regions) { + el = el.parent; + } + + if (!el) { + return; + } + + var action = { + type: (mapOrGeoModel.mainType === 'geo' ? 'geo' : 'map') + 'ToggleSelect', + batch: zrUtil.map(el.__regions, function (region) { + return { + name: region.name, + from: fromView.uid + }; + }) + }; + action[mapOrGeoModel.mainType + 'Id'] = mapOrGeoModel.id; + api.dispatchAction(action); + updateMapSelected(mapOrGeoModel, regionsGroup); + }); + } +} + +function updateMapSelected(mapOrGeoModel, regionsGroup) { + // FIXME + regionsGroup.eachChild(function (otherRegionEl) { + zrUtil.each(otherRegionEl.__regions, function (region) { + otherRegionEl.trigger(mapOrGeoModel.isSelected(region.name) ? 'emphasis' : 'normal'); + }); + }); +} +/** + * @alias module:echarts/component/helper/MapDraw + * @param {module:echarts/ExtensionAPI} api + * @param {boolean} updateGroup + */ + + +function MapDraw(api, updateGroup) { + var group = new graphic.Group(); + /** + * @type {string} + * @private + */ + + this.uid = getUID('ec_map_draw'); + /** + * @type {module:echarts/component/helper/RoamController} + * @private + */ + + this._controller = new RoamController(api.getZr()); + /** + * @type {Object} {target, zoom, zoomLimit} + * @private + */ + + this._controllerHost = { + target: updateGroup ? group : null + }; + /** + * @type {module:zrender/container/Group} + * @readOnly + */ + + this.group = group; + /** + * @type {boolean} + * @private + */ + + this._updateGroup = updateGroup; + /** + * This flag is used to make sure that only one among + * `pan`, `zoom`, `click` can occurs, otherwise 'selected' + * action may be triggered when `pan`, which is unexpected. + * @type {booelan} + */ + + this._mouseDownFlag; + /** + * @type {string} + */ + + this._mapName; + /** + * @type {boolean} + */ + + this._initialized; + /** + * @type {module:zrender/container/Group} + */ + + group.add(this._regionsGroup = new graphic.Group()); + /** + * @type {module:zrender/container/Group} + */ + + group.add(this._backgroundGroup = new graphic.Group()); +} + +MapDraw.prototype = { + constructor: MapDraw, + draw: function (mapOrGeoModel, ecModel, api, fromView, payload) { + var isGeo = mapOrGeoModel.mainType === 'geo'; // Map series has data. GEO model that controlled by map series + // will be assigned with map data. Other GEO model has no data. + + var data = mapOrGeoModel.getData && mapOrGeoModel.getData(); + isGeo && ecModel.eachComponent({ + mainType: 'series', + subType: 'map' + }, function (mapSeries) { + if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) { + data = mapSeries.getData(); + } + }); + var geo = mapOrGeoModel.coordinateSystem; + + this._updateBackground(geo); + + var regionsGroup = this._regionsGroup; + var group = this.group; + var transformInfo = geo.getTransformInfo(); // No animation when first draw or in action + + var isFirstDraw = !regionsGroup.childAt(0) || payload; + var targetScale; + + if (isFirstDraw) { + group.transform = transformInfo.roamTransform; + group.decomposeTransform(); + group.dirty(); + } else { + var target = new Transformable(); + target.transform = transformInfo.roamTransform; + target.decomposeTransform(); + var props = { + scale: target.scale, + position: target.position + }; + targetScale = target.scale; + graphic.updateProps(group, props, mapOrGeoModel); + } + + var scale = transformInfo.rawScale; + var position = transformInfo.rawPosition; + regionsGroup.removeAll(); + var itemStyleAccessPath = ['itemStyle']; + var hoverItemStyleAccessPath = ['emphasis', 'itemStyle']; + var labelAccessPath = ['label']; + var hoverLabelAccessPath = ['emphasis', 'label']; + var nameMap = zrUtil.createHashMap(); + zrUtil.each(geo.regions, function (region) { + // Consider in GeoJson properties.name may be duplicated, for example, + // there is multiple region named "United Kindom" or "France" (so many + // colonies). And it is not appropriate to merge them in geo, which + // will make them share the same label and bring trouble in label + // location calculation. + var regionGroup = nameMap.get(region.name) || nameMap.set(region.name, new graphic.Group()); + var compoundPath = new graphic.CompoundPath({ + segmentIgnoreThreshold: 1, + shape: { + paths: [] + } + }); + regionGroup.add(compoundPath); + var regionModel = mapOrGeoModel.getRegionModel(region.name) || mapOrGeoModel; + var itemStyleModel = regionModel.getModel(itemStyleAccessPath); + var hoverItemStyleModel = regionModel.getModel(hoverItemStyleAccessPath); + var itemStyle = getFixedItemStyle(itemStyleModel); + var hoverItemStyle = getFixedItemStyle(hoverItemStyleModel); + var labelModel = regionModel.getModel(labelAccessPath); + var hoverLabelModel = regionModel.getModel(hoverLabelAccessPath); + var dataIdx; // Use the itemStyle in data if has data + + if (data) { + dataIdx = data.indexOfName(region.name); // Only visual color of each item will be used. It can be encoded by dataRange + // But visual color of series is used in symbol drawing + // + // Visual color for each series is for the symbol draw + + var visualColor = data.getItemVisual(dataIdx, 'color', true); + + if (visualColor) { + itemStyle.fill = visualColor; + } + } + + var transformPoint = function (point) { + return [point[0] * scale[0] + position[0], point[1] * scale[1] + position[1]]; + }; + + zrUtil.each(region.geometries, function (geometry) { + if (geometry.type !== 'polygon') { + return; + } + + var points = []; + + for (var i = 0; i < geometry.exterior.length; ++i) { + points.push(transformPoint(geometry.exterior[i])); + } + + compoundPath.shape.paths.push(new graphic.Polygon({ + segmentIgnoreThreshold: 1, + shape: { + points: points + } + })); + + for (var i = 0; i < (geometry.interiors ? geometry.interiors.length : 0); ++i) { + var interior = geometry.interiors[i]; + var points = []; + + for (var j = 0; j < interior.length; ++j) { + points.push(transformPoint(interior[j])); + } + + compoundPath.shape.paths.push(new graphic.Polygon({ + segmentIgnoreThreshold: 1, + shape: { + points: points + } + })); + } + }); + compoundPath.setStyle(itemStyle); + compoundPath.style.strokeNoScale = true; + compoundPath.culling = true; // Label + + var showLabel = labelModel.get('show'); + var hoverShowLabel = hoverLabelModel.get('show'); + var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx)); + var itemLayout = data && data.getItemLayout(dataIdx); // In the following cases label will be drawn + // 1. In map series and data value is NaN + // 2. In geo component + // 4. Region has no series legendSymbol, which will be add a showLabel flag in mapSymbolLayout + + if (isGeo || isDataNaN && (showLabel || hoverShowLabel) || itemLayout && itemLayout.showLabel) { + var query = !isGeo ? dataIdx : region.name; + var labelFetcher; // Consider dataIdx not found. + + if (!data || dataIdx >= 0) { + labelFetcher = mapOrGeoModel; + } + + var textEl = new graphic.Text({ + position: transformPoint(region.center.slice()), + // FIXME + // label rotation is not support yet in geo or regions of series-map + // that has no data. The rotation will be effected by this `scale`. + // So needed to change to RectText? + scale: [1 / group.scale[0], 1 / group.scale[1]], + z2: 10, + silent: true + }); + graphic.setLabelStyle(textEl.style, textEl.hoverStyle = {}, labelModel, hoverLabelModel, { + labelFetcher: labelFetcher, + labelDataIndex: query, + defaultText: region.name, + useInsideStyle: false + }, { + textAlign: 'center', + textVerticalAlign: 'middle' + }); + + if (!isFirstDraw) { + // Text animation + var textScale = [1 / targetScale[0], 1 / targetScale[1]]; + graphic.updateProps(textEl, { + scale: textScale + }, mapOrGeoModel); + } + + regionGroup.add(textEl); + } // setItemGraphicEl, setHoverStyle after all polygons and labels + // are added to the rigionGroup + + + if (data) { + data.setItemGraphicEl(dataIdx, regionGroup); + } else { + var regionModel = mapOrGeoModel.getRegionModel(region.name); // Package custom mouse event for geo component + + compoundPath.eventData = { + componentType: 'geo', + componentIndex: mapOrGeoModel.componentIndex, + geoIndex: mapOrGeoModel.componentIndex, + name: region.name, + region: regionModel && regionModel.option || {} + }; + } + + var groupRegions = regionGroup.__regions || (regionGroup.__regions = []); + groupRegions.push(region); + regionGroup.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode'); + graphic.setHoverStyle(regionGroup, hoverItemStyle); + regionsGroup.add(regionGroup); + }); + + this._updateController(mapOrGeoModel, ecModel, api); + + updateMapSelectHandler(this, mapOrGeoModel, regionsGroup, api, fromView); + updateMapSelected(mapOrGeoModel, regionsGroup); + }, + remove: function () { + this._regionsGroup.removeAll(); + + this._backgroundGroup.removeAll(); + + this._controller.dispose(); + + this._mapName && geoSourceManager.removeGraphic(this._mapName, this.uid); + this._mapName = null; + this._controllerHost = {}; + }, + _updateBackground: function (geo) { + var mapName = geo.map; + + if (this._mapName !== mapName) { + zrUtil.each(geoSourceManager.makeGraphic(mapName, this.uid), function (root) { + this._backgroundGroup.add(root); + }, this); + } + + this._mapName = mapName; + }, + _updateController: function (mapOrGeoModel, ecModel, api) { + var geo = mapOrGeoModel.coordinateSystem; + var controller = this._controller; + var controllerHost = this._controllerHost; + controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit'); + controllerHost.zoom = geo.getZoom(); // roamType is will be set default true if it is null + + controller.enable(mapOrGeoModel.get('roam') || false); + var mainType = mapOrGeoModel.mainType; + + function makeActionBase() { + var action = { + type: 'geoRoam', + componentType: mainType + }; + action[mainType + 'Id'] = mapOrGeoModel.id; + return action; + } + + controller.off('pan').on('pan', function (e) { + this._mouseDownFlag = false; + roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy); + api.dispatchAction(zrUtil.extend(makeActionBase(), { + dx: e.dx, + dy: e.dy + })); + }, this); + controller.off('zoom').on('zoom', function (e) { + this._mouseDownFlag = false; + roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); + api.dispatchAction(zrUtil.extend(makeActionBase(), { + zoom: e.scale, + originX: e.originX, + originY: e.originY + })); + + if (this._updateGroup) { + var scale = this.group.scale; + + this._regionsGroup.traverse(function (el) { + if (el.type === 'text') { + el.attr('scale', [1 / scale[0], 1 / scale[1]]); + } + }); + } + }, this); + controller.setPointerChecker(function (e, x, y) { + return geo.getViewRectAfterRoam().contain(x, y) && !onIrrelevantElement(e, api, mapOrGeoModel); + }); + } +}; +var _default = MapDraw; +module.exports = _default; + +/***/ }), + +/***/ "0cde": +/***/ (function(module, exports, __webpack_require__) { + +var matrix = __webpack_require__("1687"); + +var vector = __webpack_require__("401b"); + +/** + * 提供变换扩展 + * @module zrender/mixin/Transformable + * @author pissang (https://www.github.com/pissang) + */ +var mIdentity = matrix.identity; +var EPSILON = 5e-5; + +function isNotAroundZero(val) { + return val > EPSILON || val < -EPSILON; +} +/** + * @alias module:zrender/mixin/Transformable + * @constructor + */ + + +var Transformable = function (opts) { + opts = opts || {}; // If there are no given position, rotation, scale + + if (!opts.position) { + /** + * 平移 + * @type {Array.} + * @default [0, 0] + */ + this.position = [0, 0]; + } + + if (opts.rotation == null) { + /** + * 旋转 + * @type {Array.} + * @default 0 + */ + this.rotation = 0; + } + + if (!opts.scale) { + /** + * 缩放 + * @type {Array.} + * @default [1, 1] + */ + this.scale = [1, 1]; + } + /** + * 旋转和缩放的原点 + * @type {Array.} + * @default null + */ + + + this.origin = this.origin || null; +}; + +var transformableProto = Transformable.prototype; +transformableProto.transform = null; +/** + * 判断是否需要有坐标变换 + * 如果有坐标变换, 则从position, rotation, scale以及父节点的transform计算出自身的transform矩阵 + */ + +transformableProto.needLocalTransform = function () { + return isNotAroundZero(this.rotation) || isNotAroundZero(this.position[0]) || isNotAroundZero(this.position[1]) || isNotAroundZero(this.scale[0] - 1) || isNotAroundZero(this.scale[1] - 1); +}; + +var scaleTmp = []; + +transformableProto.updateTransform = function () { + var parent = this.parent; + var parentHasTransform = parent && parent.transform; + var needLocalTransform = this.needLocalTransform(); + var m = this.transform; + + if (!(needLocalTransform || parentHasTransform)) { + m && mIdentity(m); + return; + } + + m = m || matrix.create(); + + if (needLocalTransform) { + this.getLocalTransform(m); + } else { + mIdentity(m); + } // 应用父节点变换 + + + if (parentHasTransform) { + if (needLocalTransform) { + matrix.mul(m, parent.transform, m); + } else { + matrix.copy(m, parent.transform); + } + } // 保存这个变换矩阵 + + + this.transform = m; + var globalScaleRatio = this.globalScaleRatio; + + if (globalScaleRatio != null && globalScaleRatio !== 1) { + this.getGlobalScale(scaleTmp); + var relX = scaleTmp[0] < 0 ? -1 : 1; + var relY = scaleTmp[1] < 0 ? -1 : 1; + var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0; + var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0; + m[0] *= sx; + m[1] *= sx; + m[2] *= sy; + m[3] *= sy; + } + + this.invTransform = this.invTransform || matrix.create(); + matrix.invert(this.invTransform, m); +}; + +transformableProto.getLocalTransform = function (m) { + return Transformable.getLocalTransform(this, m); +}; +/** + * 将自己的transform应用到context上 + * @param {CanvasRenderingContext2D} ctx + */ + + +transformableProto.setTransform = function (ctx) { + var m = this.transform; + var dpr = ctx.dpr || 1; + + if (m) { + ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]); + } else { + ctx.setTransform(dpr, 0, 0, dpr, 0, 0); + } +}; + +transformableProto.restoreTransform = function (ctx) { + var dpr = ctx.dpr || 1; + ctx.setTransform(dpr, 0, 0, dpr, 0, 0); +}; + +var tmpTransform = []; +var originTransform = matrix.create(); + +transformableProto.setLocalTransform = function (m) { + if (!m) { + // TODO return or set identity? + return; + } + + var sx = m[0] * m[0] + m[1] * m[1]; + var sy = m[2] * m[2] + m[3] * m[3]; + var position = this.position; + var scale = this.scale; + + if (isNotAroundZero(sx - 1)) { + sx = Math.sqrt(sx); + } + + if (isNotAroundZero(sy - 1)) { + sy = Math.sqrt(sy); + } + + if (m[0] < 0) { + sx = -sx; + } + + if (m[3] < 0) { + sy = -sy; + } + + position[0] = m[4]; + position[1] = m[5]; + scale[0] = sx; + scale[1] = sy; + this.rotation = Math.atan2(-m[1] / sy, m[0] / sx); +}; +/** + * 分解`transform`矩阵到`position`, `rotation`, `scale` + */ + + +transformableProto.decomposeTransform = function () { + if (!this.transform) { + return; + } + + var parent = this.parent; + var m = this.transform; + + if (parent && parent.transform) { + // Get local transform and decompose them to position, scale, rotation + matrix.mul(tmpTransform, parent.invTransform, m); + m = tmpTransform; + } + + var origin = this.origin; + + if (origin && (origin[0] || origin[1])) { + originTransform[4] = origin[0]; + originTransform[5] = origin[1]; + matrix.mul(tmpTransform, m, originTransform); + tmpTransform[4] -= origin[0]; + tmpTransform[5] -= origin[1]; + m = tmpTransform; + } + + this.setLocalTransform(m); +}; +/** + * Get global scale + * @return {Array.} + */ + + +transformableProto.getGlobalScale = function (out) { + var m = this.transform; + out = out || []; + + if (!m) { + out[0] = 1; + out[1] = 1; + return out; + } + + out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]); + out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]); + + if (m[0] < 0) { + out[0] = -out[0]; + } + + if (m[3] < 0) { + out[1] = -out[1]; + } + + return out; +}; +/** + * 变换坐标位置到 shape 的局部坐标空间 + * @method + * @param {number} x + * @param {number} y + * @return {Array.} + */ + + +transformableProto.transformCoordToLocal = function (x, y) { + var v2 = [x, y]; + var invTransform = this.invTransform; + + if (invTransform) { + vector.applyTransform(v2, v2, invTransform); + } + + return v2; +}; +/** + * 变换局部坐标位置到全局坐标空间 + * @method + * @param {number} x + * @param {number} y + * @return {Array.} + */ + + +transformableProto.transformCoordToGlobal = function (x, y) { + var v2 = [x, y]; + var transform = this.transform; + + if (transform) { + vector.applyTransform(v2, v2, transform); + } + + return v2; +}; +/** + * @static + * @param {Object} target + * @param {Array.} target.origin + * @param {number} target.rotation + * @param {Array.} target.position + * @param {Array.} [m] + */ + + +Transformable.getLocalTransform = function (target, m) { + m = m || []; + mIdentity(m); + var origin = target.origin; + var scale = target.scale || [1, 1]; + var rotation = target.rotation || 0; + var position = target.position || [0, 0]; + + if (origin) { + // Translate to origin + m[4] -= origin[0]; + m[5] -= origin[1]; + } + + matrix.scale(m, m, scale); + + if (rotation) { + matrix.rotate(m, m, rotation); + } + + if (origin) { + // Translate back from origin + m[4] += origin[0]; + m[5] += origin[1]; + } + + m[4] += position[0]; + m[5] += position[1]; + return m; +}; + +var _default = Transformable; +module.exports = _default; + +/***/ }), + +/***/ "0cfb": +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__("83ab"); +var fails = __webpack_require__("d039"); +var createElement = __webpack_require__("cc12"); + +// Thank's IE8 for his funny defineProperty +module.exports = !DESCRIPTORS && !fails(function () { + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; +}); + + +/***/ }), + +/***/ "0da8": +/***/ (function(module, exports, __webpack_require__) { + +var Displayable = __webpack_require__("19eb"); + +var BoundingRect = __webpack_require__("9850"); + +var zrUtil = __webpack_require__("6d8b"); + +var imageHelper = __webpack_require__("5e76"); + +/** + * @alias zrender/graphic/Image + * @extends module:zrender/graphic/Displayable + * @constructor + * @param {Object} opts + */ +function ZImage(opts) { + Displayable.call(this, opts); +} + +ZImage.prototype = { + constructor: ZImage, + type: 'image', + brush: function (ctx, prevEl) { + var style = this.style; + var src = style.image; // Must bind each time + + style.bind(ctx, this, prevEl); + var image = this._image = imageHelper.createOrUpdateImage(src, this._image, this, this.onload); + + if (!image || !imageHelper.isImageReady(image)) { + return; + } // 图片已经加载完成 + // if (image.nodeName.toUpperCase() == 'IMG') { + // if (!image.complete) { + // return; + // } + // } + // Else is canvas + + + var x = style.x || 0; + var y = style.y || 0; + var width = style.width; + var height = style.height; + var aspect = image.width / image.height; + + if (width == null && height != null) { + // Keep image/height ratio + width = height * aspect; + } else if (height == null && width != null) { + height = width / aspect; + } else if (width == null && height == null) { + width = image.width; + height = image.height; + } // 设置transform + + + this.setTransform(ctx); + + if (style.sWidth && style.sHeight) { + var sx = style.sx || 0; + var sy = style.sy || 0; + ctx.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height); + } else if (style.sx && style.sy) { + var sx = style.sx; + var sy = style.sy; + var sWidth = width - sx; + var sHeight = height - sy; + ctx.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height); + } else { + ctx.drawImage(image, x, y, width, height); + } // Draw rect text + + + if (style.text != null) { + // Only restore transform when needs draw text. + this.restoreTransform(ctx); + this.drawRectText(ctx, this.getBoundingRect()); + } + }, + getBoundingRect: function () { + var style = this.style; + + if (!this._rect) { + this._rect = new BoundingRect(style.x || 0, style.y || 0, style.width || 0, style.height || 0); + } + + return this._rect; + } +}; +zrUtil.inherits(ZImage, Displayable); +var _default = ZImage; +module.exports = _default; + +/***/ }), + +/***/ "0e0f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var VisualMapping = __webpack_require__("5f14"); + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function _default(ecModel, payload) { + ecModel.eachSeriesByType('sankey', function (seriesModel) { + var graph = seriesModel.getGraph(); + var nodes = graph.nodes; + + if (nodes.length) { + var minValue = Infinity; + var maxValue = -Infinity; + zrUtil.each(nodes, function (node) { + var nodeValue = node.getLayout().value; + + if (nodeValue < minValue) { + minValue = nodeValue; + } + + if (nodeValue > maxValue) { + maxValue = nodeValue; + } + }); + zrUtil.each(nodes, function (node) { + var mapping = new VisualMapping({ + type: 'color', + mappingMethod: 'linear', + dataExtent: [minValue, maxValue], + visual: seriesModel.get('color') + }); + var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value); + var customColor = node.getModel().get('itemStyle.color'); + customColor != null ? node.setVisual('color', customColor) : node.setVisual('color', mapValueToColor); + }); + } + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "0ee7": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +var layoutUtil = __webpack_require__("f934"); + +var LegendView = __webpack_require__("5e97"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Separate legend and scrollable legend to reduce package size. + */ +var Group = graphic.Group; +var WH = ['width', 'height']; +var XY = ['x', 'y']; +var ScrollableLegendView = LegendView.extend({ + type: 'legend.scroll', + newlineDisabled: true, + init: function () { + ScrollableLegendView.superCall(this, 'init'); + /** + * @private + * @type {number} For `scroll`. + */ + + this._currentIndex = 0; + /** + * @private + * @type {module:zrender/container/Group} + */ + + this.group.add(this._containerGroup = new Group()); + + this._containerGroup.add(this.getContentGroup()); + /** + * @private + * @type {module:zrender/container/Group} + */ + + + this.group.add(this._controllerGroup = new Group()); + /** + * + * @private + */ + + this._showController; + }, + + /** + * @override + */ + resetInner: function () { + ScrollableLegendView.superCall(this, 'resetInner'); + + this._controllerGroup.removeAll(); + + this._containerGroup.removeClipPath(); + + this._containerGroup.__rectSize = null; + }, + + /** + * @override + */ + renderInner: function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) { + var me = this; // Render content items. + + ScrollableLegendView.superCall(this, 'renderInner', itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); + var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length, + // e.g., '3/12345' should not overlap with the control arrow button. + + var pageIconSize = legendModel.get('pageIconSize', true); + + if (!zrUtil.isArray(pageIconSize)) { + pageIconSize = [pageIconSize, pageIconSize]; + } + + createPageButton('pagePrev', 0); + var pageTextStyleModel = legendModel.getModel('pageTextStyle'); + controllerGroup.add(new graphic.Text({ + name: 'pageText', + style: { + textFill: pageTextStyleModel.getTextColor(), + font: pageTextStyleModel.getFont(), + textVerticalAlign: 'middle', + textAlign: 'center' + }, + silent: true + })); + createPageButton('pageNext', 1); + + function createPageButton(name, iconIdx) { + var pageDataIndexName = name + 'DataIndex'; + var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], { + // Buttons will be created in each render, so we do not need + // to worry about avoiding using legendModel kept in scope. + onclick: zrUtil.bind(me._pageGo, me, pageDataIndexName, legendModel, api) + }, { + x: -pageIconSize[0] / 2, + y: -pageIconSize[1] / 2, + width: pageIconSize[0], + height: pageIconSize[1] + }); + icon.name = name; + controllerGroup.add(icon); + } + }, + + /** + * @override + */ + layoutInner: function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) { + var selectorGroup = this.getSelectorGroup(); + var orientIdx = legendModel.getOrient().index; + var wh = WH[orientIdx]; + var xy = XY[orientIdx]; + var hw = WH[1 - orientIdx]; + var yx = XY[1 - orientIdx]; + selector && layoutUtil.box( // Buttons in selectorGroup always layout horizontally + 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true)); + var selectorButtonGap = legendModel.get('selectorButtonGap', true); + var selectorRect = selectorGroup.getBoundingRect(); + var selectorPos = [-selectorRect.x, -selectorRect.y]; + var processMaxSize = zrUtil.clone(maxSize); + selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap); + + var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx); + + if (selector) { + if (selectorPosition === 'end') { + selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap; + } else { + var offset = selectorRect[wh] + selectorButtonGap; + selectorPos[orientIdx] -= offset; + mainRect[xy] -= offset; + } + + mainRect[wh] += selectorRect[wh] + selectorButtonGap; + selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2; + mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]); + mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]); + selectorGroup.attr('position', selectorPos); + } + + return mainRect; + }, + _layoutContentAndController: function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx) { + var contentGroup = this.getContentGroup(); + var containerGroup = this._containerGroup; + var controllerGroup = this._controllerGroup; // Place items in contentGroup. + + layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height); + layoutUtil.box( // Buttons in controller are layout always horizontally. + 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true)); + var contentRect = contentGroup.getBoundingRect(); + var controllerRect = controllerGroup.getBoundingRect(); + var showController = this._showController = contentRect[wh] > maxSize[wh]; + var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming. + // If first rendering, `contentGroup.position` is [0, 0], which + // does not make sense and may cause unexepcted animation if adopted. + + if (!isFirstRender) { + contentPos[orientIdx] = contentGroup.position[orientIdx]; + } // Layout container group based on 0. + + + var containerPos = [0, 0]; + var controllerPos = [-controllerRect.x, -controllerRect.y]; + var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup. + + if (showController) { + var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom. + + if (pageButtonPosition === 'end') { + controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh]; + } // controller is on the left / top. + else { + containerPos[orientIdx] += controllerRect[wh] + pageButtonGap; + } + } // Always align controller to content as 'middle'. + + + controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2; + contentGroup.attr('position', contentPos); + containerGroup.attr('position', containerPos); + controllerGroup.attr('position', controllerPos); // Calculate `mainRect` and set `clipPath`. + // mainRect should not be calculated by `this.group.getBoundingRect()` + // for sake of the overflow. + + var mainRect = { + x: 0, + y: 0 + }; // Consider content may be overflow (should be clipped). + + mainRect[wh] = showController ? maxSize[wh] : contentRect[wh]; + mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0. + + mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]); + containerGroup.__rectSize = maxSize[wh]; + + if (showController) { + var clipShape = { + x: 0, + y: 0 + }; + clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0); + clipShape[hw] = mainRect[hw]; + containerGroup.setClipPath(new graphic.Rect({ + shape: clipShape + })); // Consider content may be larger than container, container rect + // can not be obtained from `containerGroup.getBoundingRect()`. + + containerGroup.__rectSize = clipShape[wh]; + } else { + // Do not remove or ignore controller. Keep them set as placeholders. + controllerGroup.eachChild(function (child) { + child.attr({ + invisible: true, + silent: true + }); + }); + } // Content translate animation. + + + var pageInfo = this._getPageInfo(legendModel); + + pageInfo.pageIndex != null && graphic.updateProps(contentGroup, { + position: pageInfo.contentPosition + }, // When switch from "show controller" to "not show controller", view should be + // updated immediately without animation, otherwise causes weird effect. + showController ? legendModel : false); + + this._updatePageInfoView(legendModel, pageInfo); + + return mainRect; + }, + _pageGo: function (to, legendModel, api) { + var scrollDataIndex = this._getPageInfo(legendModel)[to]; + + scrollDataIndex != null && api.dispatchAction({ + type: 'legendScroll', + scrollDataIndex: scrollDataIndex, + legendId: legendModel.id + }); + }, + _updatePageInfoView: function (legendModel, pageInfo) { + var controllerGroup = this._controllerGroup; + zrUtil.each(['pagePrev', 'pageNext'], function (name) { + var canJump = pageInfo[name + 'DataIndex'] != null; + var icon = controllerGroup.childOfName(name); + + if (icon) { + icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true)); + icon.cursor = canJump ? 'pointer' : 'default'; + } + }); + var pageText = controllerGroup.childOfName('pageText'); + var pageFormatter = legendModel.get('pageFormatter'); + var pageIndex = pageInfo.pageIndex; + var current = pageIndex != null ? pageIndex + 1 : 0; + var total = pageInfo.pageCount; + pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current).replace('{total}', total) : pageFormatter({ + current: current, + total: total + })); + }, + + /** + * @param {module:echarts/model/Model} legendModel + * @return {Object} { + * contentPosition: Array., null when data item not found. + * pageIndex: number, null when data item not found. + * pageCount: number, always be a number, can be 0. + * pagePrevDataIndex: number, null when no previous page. + * pageNextDataIndex: number, null when no next page. + * } + */ + _getPageInfo: function (legendModel) { + var scrollDataIndex = legendModel.get('scrollDataIndex', true); + var contentGroup = this.getContentGroup(); + var containerRectSize = this._containerGroup.__rectSize; + var orientIdx = legendModel.getOrient().index; + var wh = WH[orientIdx]; + var xy = XY[orientIdx]; + + var targetItemIndex = this._findTargetItemIndex(scrollDataIndex); + + var children = contentGroup.children(); + var targetItem = children[targetItemIndex]; + var itemCount = children.length; + var pCount = !itemCount ? 0 : 1; + var result = { + contentPosition: contentGroup.position.slice(), + pageCount: pCount, + pageIndex: pCount - 1, + pagePrevDataIndex: null, + pageNextDataIndex: null + }; + + if (!targetItem) { + return result; + } + + var targetItemInfo = getItemInfo(targetItem); + result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy: + // (1) Always align based on the left/top most item. + // (2) It is user-friendly that the last item shown in the + // current window is shown at the begining of next window. + // Otherwise if half of the last item is cut by the window, + // it will have no chance to display entirely. + // (3) Consider that item size probably be different, we + // have calculate pageIndex by size rather than item index, + // and we can not get page index directly by division. + // (4) The window is to narrow to contain more than + // one item, we should make sure that the page can be fliped. + + for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) { + currItemInfo = getItemInfo(children[i]); + + if ( // Half of the last item is out of the window. + !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize || // If the current item does not intersect with the window, the new page + // can be started at the current item or the last item. + currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) { + if (winEndItemInfo.i > winStartItemInfo.i) { + winStartItemInfo = winEndItemInfo; + } else { + // e.g., when page size is smaller than item size. + winStartItemInfo = currItemInfo; + } + + if (winStartItemInfo) { + if (result.pageNextDataIndex == null) { + result.pageNextDataIndex = winStartItemInfo.i; + } + + ++result.pageCount; + } + } + + winEndItemInfo = currItemInfo; + } + + for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) { + currItemInfo = getItemInfo(children[i]); + + if ( // If the the end item does not intersect with the window started + // from the current item, a page can be settled. + (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)) && // e.g., when page size is smaller than item size. + winStartItemInfo.i < winEndItemInfo.i) { + winEndItemInfo = winStartItemInfo; + + if (result.pagePrevDataIndex == null) { + result.pagePrevDataIndex = winStartItemInfo.i; + } + + ++result.pageCount; + ++result.pageIndex; + } + + winStartItemInfo = currItemInfo; + } + + return result; + + function getItemInfo(el) { + if (el) { + var itemRect = el.getBoundingRect(); + var start = itemRect[xy] + el.position[orientIdx]; + return { + s: start, + e: start + itemRect[wh], + i: el.__legendDataIndex + }; + } + } + + function intersect(itemInfo, winStart) { + return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize; + } + }, + _findTargetItemIndex: function (targetDataIndex) { + if (!this._showController) { + return 0; + } + + var index; + var contentGroup = this.getContentGroup(); + var defaultIndex; + contentGroup.eachChild(function (child, idx) { + var legendDataIdx = child.__legendDataIndex; // FIXME + // If the given targetDataIndex (from model) is illegal, + // we use defualtIndex. But the index on the legend model and + // action payload is still illegal. That case will not be + // changed until some scenario requires. + + if (defaultIndex == null && legendDataIdx != null) { + defaultIndex = idx; + } + + if (legendDataIdx === targetDataIndex) { + index = idx; + } + }); + return index != null ? index : defaultIndex; + } +}); +var _default = ScrollableLegendView; +module.exports = _default; + +/***/ }), + +/***/ "0f55": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Axis = __webpack_require__("84ce"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @constructor module:echarts/coord/parallel/ParallelAxis + * @extends {module:echarts/coord/Axis} + * @param {string} dim + * @param {*} scale + * @param {Array.} coordExtent + * @param {string} axisType + */ +var ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) { + Axis.call(this, dim, scale, coordExtent); + /** + * Axis type + * - 'category' + * - 'value' + * - 'time' + * - 'log' + * @type {string} + */ + + this.type = axisType || 'value'; + /** + * @type {number} + * @readOnly + */ + + this.axisIndex = axisIndex; +}; + +ParallelAxis.prototype = { + constructor: ParallelAxis, + + /** + * Axis model + * @param {module:echarts/coord/parallel/AxisModel} + */ + model: null, + + /** + * @override + */ + isHorizontal: function () { + return this.coordinateSystem.getModel().get('layout') !== 'horizontal'; + } +}; +zrUtil.inherits(ParallelAxis, Axis); +var _default = ParallelAxis; +module.exports = _default; + +/***/ }), + +/***/ "0f99": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var _model = __webpack_require__("e0d3"); + +var makeInner = _model.makeInner; +var getDataItemValue = _model.getDataItemValue; + +var _util = __webpack_require__("6d8b"); + +var createHashMap = _util.createHashMap; +var each = _util.each; +var map = _util.map; +var isArray = _util.isArray; +var isString = _util.isString; +var isObject = _util.isObject; +var isTypedArray = _util.isTypedArray; +var isArrayLike = _util.isArrayLike; +var extend = _util.extend; +var assert = _util.assert; + +var Source = __webpack_require__("ec6f"); + +var _sourceType = __webpack_require__("93d0"); + +var SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL; +var SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS; +var SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS; +var SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS; +var SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN; +var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY; +var SERIES_LAYOUT_BY_ROW = _sourceType.SERIES_LAYOUT_BY_ROW; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// The result of `guessOrdinal`. +var BE_ORDINAL = { + Must: 1, + // Encounter string but not '-' and not number-like. + Might: 2, + // Encounter string but number-like. + Not: 3 // Other cases + +}; +var inner = makeInner(); +/** + * @see {module:echarts/data/Source} + * @param {module:echarts/component/dataset/DatasetModel} datasetModel + * @return {string} sourceFormat + */ + +function detectSourceFormat(datasetModel) { + var data = datasetModel.option.source; + var sourceFormat = SOURCE_FORMAT_UNKNOWN; + + if (isTypedArray(data)) { + sourceFormat = SOURCE_FORMAT_TYPED_ARRAY; + } else if (isArray(data)) { + // FIXME Whether tolerate null in top level array? + if (data.length === 0) { + sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; + } + + for (var i = 0, len = data.length; i < len; i++) { + var item = data[i]; + + if (item == null) { + continue; + } else if (isArray(item)) { + sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; + break; + } else if (isObject(item)) { + sourceFormat = SOURCE_FORMAT_OBJECT_ROWS; + break; + } + } + } else if (isObject(data)) { + for (var key in data) { + if (data.hasOwnProperty(key) && isArrayLike(data[key])) { + sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS; + break; + } + } + } else if (data != null) { + throw new Error('Invalid data'); + } + + inner(datasetModel).sourceFormat = sourceFormat; +} +/** + * [Scenarios]: + * (1) Provide source data directly: + * series: { + * encode: {...}, + * dimensions: [...] + * seriesLayoutBy: 'row', + * data: [[...]] + * } + * (2) Refer to datasetModel. + * series: [{ + * encode: {...} + * // Ignore datasetIndex means `datasetIndex: 0` + * // and the dimensions defination in dataset is used + * }, { + * encode: {...}, + * seriesLayoutBy: 'column', + * datasetIndex: 1 + * }] + * + * Get data from series itself or datset. + * @return {module:echarts/data/Source} source + */ + + +function getSource(seriesModel) { + return inner(seriesModel).source; +} +/** + * MUST be called before mergeOption of all series. + * @param {module:echarts/model/Global} ecModel + */ + + +function resetSourceDefaulter(ecModel) { + // `datasetMap` is used to make default encode. + inner(ecModel).datasetMap = createHashMap(); +} +/** + * [Caution]: + * MUST be called after series option merged and + * before "series.getInitailData()" called. + * + * [The rule of making default encode]: + * Category axis (if exists) alway map to the first dimension. + * Each other axis occupies a subsequent dimension. + * + * [Why make default encode]: + * Simplify the typing of encode in option, avoiding the case like that: + * series: [{encode: {x: 0, y: 1}}, {encode: {x: 0, y: 2}}, {encode: {x: 0, y: 3}}], + * where the "y" have to be manually typed as "1, 2, 3, ...". + * + * @param {module:echarts/model/Series} seriesModel + */ + + +function prepareSource(seriesModel) { + var seriesOption = seriesModel.option; + var data = seriesOption.data; + var sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL; + var fromDataset = false; + var seriesLayoutBy = seriesOption.seriesLayoutBy; + var sourceHeader = seriesOption.sourceHeader; + var dimensionsDefine = seriesOption.dimensions; + var datasetModel = getDatasetModel(seriesModel); + + if (datasetModel) { + var datasetOption = datasetModel.option; + data = datasetOption.source; + sourceFormat = inner(datasetModel).sourceFormat; + fromDataset = true; // These settings from series has higher priority. + + seriesLayoutBy = seriesLayoutBy || datasetOption.seriesLayoutBy; + sourceHeader == null && (sourceHeader = datasetOption.sourceHeader); + dimensionsDefine = dimensionsDefine || datasetOption.dimensions; + } + + var completeResult = completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine); + inner(seriesModel).source = new Source({ + data: data, + fromDataset: fromDataset, + seriesLayoutBy: seriesLayoutBy, + sourceFormat: sourceFormat, + dimensionsDefine: completeResult.dimensionsDefine, + startIndex: completeResult.startIndex, + dimensionsDetectCount: completeResult.dimensionsDetectCount, + // Note: dataset option does not have `encode`. + encodeDefine: seriesOption.encode + }); +} // return {startIndex, dimensionsDefine, dimensionsCount} + + +function completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine) { + if (!data) { + return { + dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine) + }; + } + + var dimensionsDetectCount; + var startIndex; + + if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { + // Rule: Most of the first line are string: it is header. + // Caution: consider a line with 5 string and 1 number, + // it still can not be sure it is a head, because the + // 5 string may be 5 values of category columns. + if (sourceHeader === 'auto' || sourceHeader == null) { + arrayRowsTravelFirst(function (val) { + // '-' is regarded as null/undefined. + if (val != null && val !== '-') { + if (isString(val)) { + startIndex == null && (startIndex = 1); + } else { + startIndex = 0; + } + } // 10 is an experience number, avoid long loop. + + }, seriesLayoutBy, data, 10); + } else { + startIndex = sourceHeader ? 1 : 0; + } + + if (!dimensionsDefine && startIndex === 1) { + dimensionsDefine = []; + arrayRowsTravelFirst(function (val, index) { + dimensionsDefine[index] = val != null ? val : ''; + }, seriesLayoutBy, data); + } + + dimensionsDetectCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? data.length : data[0] ? data[0].length : null; + } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { + if (!dimensionsDefine) { + dimensionsDefine = objectRowsCollectDimensions(data); + } + } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { + if (!dimensionsDefine) { + dimensionsDefine = []; + each(data, function (colArr, key) { + dimensionsDefine.push(key); + }); + } + } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { + var value0 = getDataItemValue(data[0]); + dimensionsDetectCount = isArray(value0) && value0.length || 1; + } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {} + + return { + startIndex: startIndex, + dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine), + dimensionsDetectCount: dimensionsDetectCount + }; +} // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'], +// which is reasonable. But dimension name is duplicated. +// Returns undefined or an array contains only object without null/undefiend or string. + + +function normalizeDimensionsDefine(dimensionsDefine) { + if (!dimensionsDefine) { + // The meaning of null/undefined is different from empty array. + return; + } + + var nameMap = createHashMap(); + return map(dimensionsDefine, function (item, index) { + item = extend({}, isObject(item) ? item : { + name: item + }); // User can set null in dimensions. + // We dont auto specify name, othewise a given name may + // cause it be refered unexpectedly. + + if (item.name == null) { + return item; + } // Also consider number form like 2012. + + + item.name += ''; // User may also specify displayName. + // displayName will always exists except user not + // specified or dim name is not specified or detected. + // (A auto generated dim name will not be used as + // displayName). + + if (item.displayName == null) { + item.displayName = item.name; + } + + var exist = nameMap.get(item.name); + + if (!exist) { + nameMap.set(item.name, { + count: 1 + }); + } else { + item.name += '-' + exist.count++; + } + + return item; + }); +} + +function arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) { + maxLoop == null && (maxLoop = Infinity); + + if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { + for (var i = 0; i < data.length && i < maxLoop; i++) { + cb(data[i] ? data[i][0] : null, i); + } + } else { + var value0 = data[0] || []; + + for (var i = 0; i < value0.length && i < maxLoop; i++) { + cb(value0[i], i); + } + } +} + +function objectRowsCollectDimensions(data) { + var firstIndex = 0; + var obj; + + while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line + + + if (obj) { + var dimensions = []; + each(obj, function (value, key) { + dimensions.push(key); + }); + return dimensions; + } +} +/** + * [The strategy of the arrengment of data dimensions for dataset]: + * "value way": all axes are non-category axes. So series one by one take + * several (the number is coordSysDims.length) dimensions from dataset. + * The result of data arrengment of data dimensions like: + * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y | + * "category way": at least one axis is category axis. So the the first data + * dimension is always mapped to the first category axis and shared by + * all of the series. The other data dimensions are taken by series like + * "value way" does. + * The result of data arrengment of data dimensions like: + * | ser_shared_x | ser0_y | ser1_y | ser2_y | + * + * @param {Array.} coordDimensions [{name: , type: , dimsDef: }, ...] + * @param {module:model/Series} seriesModel + * @param {module:data/Source} source + * @return {Object} encode Never be `null/undefined`. + */ + + +function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) { + var encode = {}; + var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur. + + if (!datasetModel || !coordDimensions) { + return encode; + } + + var encodeItemName = []; + var encodeSeriesName = []; + var ecModel = seriesModel.ecModel; + var datasetMap = inner(ecModel).datasetMap; + var key = datasetModel.uid + '_' + source.seriesLayoutBy; + var baseCategoryDimIndex; + var categoryWayValueDimStart; + coordDimensions = coordDimensions.slice(); + each(coordDimensions, function (coordDimInfo, coordDimIdx) { + !isObject(coordDimInfo) && (coordDimensions[coordDimIdx] = { + name: coordDimInfo + }); + + if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) { + baseCategoryDimIndex = coordDimIdx; + categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimensions[coordDimIdx]); + } + + encode[coordDimInfo.name] = []; + }); + var datasetRecord = datasetMap.get(key) || datasetMap.set(key, { + categoryWayDim: categoryWayValueDimStart, + valueWayDim: 0 + }); // TODO + // Auto detect first time axis and do arrangement. + + each(coordDimensions, function (coordDimInfo, coordDimIdx) { + var coordDimName = coordDimInfo.name; + var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way. + + if (baseCategoryDimIndex == null) { + var start = datasetRecord.valueWayDim; + pushDim(encode[coordDimName], start, count); + pushDim(encodeSeriesName, start, count); + datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule? + // especially when encode x y specified. + // consider: when mutiple series share one dimension + // category axis, series name should better use + // the other dimsion name. On the other hand, use + // both dimensions name. + } // In category way, the first category axis. + else if (baseCategoryDimIndex === coordDimIdx) { + pushDim(encode[coordDimName], 0, count); + pushDim(encodeItemName, 0, count); + } // In category way, the other axis. + else { + var start = datasetRecord.categoryWayDim; + pushDim(encode[coordDimName], start, count); + pushDim(encodeSeriesName, start, count); + datasetRecord.categoryWayDim += count; + } + }); + + function pushDim(dimIdxArr, idxFrom, idxCount) { + for (var i = 0; i < idxCount; i++) { + dimIdxArr.push(idxFrom + i); + } + } + + function getDataDimCountOnCoordDim(coordDimInfo) { + var dimsDef = coordDimInfo.dimsDef; + return dimsDef ? dimsDef.length : 1; + } + + encodeItemName.length && (encode.itemName = encodeItemName); + encodeSeriesName.length && (encode.seriesName = encodeSeriesName); + return encode; +} +/** + * Work for data like [{name: ..., value: ...}, ...]. + * + * @param {module:model/Series} seriesModel + * @param {module:data/Source} source + * @return {Object} encode Never be `null/undefined`. + */ + + +function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) { + var encode = {}; + var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur. + + if (!datasetModel) { + return encode; + } + + var sourceFormat = source.sourceFormat; + var dimensionsDefine = source.dimensionsDefine; + var potentialNameDimIndex; + + if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { + each(dimensionsDefine, function (dim, idx) { + if ((isObject(dim) ? dim.name : dim) === 'name') { + potentialNameDimIndex = idx; + } + }); + } // idxResult: {v, n}. + + + var idxResult = function () { + var idxRes0 = {}; + var idxRes1 = {}; + var guessRecords = []; // 5 is an experience value. + + for (var i = 0, len = Math.min(5, dimCount); i < len; i++) { + var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i); + guessRecords.push(guessResult); + var isPureNumber = guessResult === BE_ORDINAL.Not; // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim, + // and then find a name dim with the priority: + // "BE_ORDINAL.Might|BE_ORDINAL.Must" > "other dim" > "the value dim itself". + + if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) { + idxRes0.v = i; + } + + if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) { + idxRes0.n = i; + } + + if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) { + return idxRes0; + } // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not), + // find the first BE_ORDINAL.Might as the value dim, + // and then find a name dim with the priority: + // "other dim" > "the value dim itself". + // That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be + // treated as number. + + + if (!isPureNumber) { + if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) { + idxRes1.v = i; + } + + if (idxRes1.n == null || idxRes1.n === idxRes1.v) { + idxRes1.n = i; + } + } + } + + function fulfilled(idxResult) { + return idxResult.v != null && idxResult.n != null; + } + + return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null; + }(); + + if (idxResult) { + encode.value = idxResult.v; // `potentialNameDimIndex` has highest priority. + + var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n; // By default, label use itemName in charts. + // So we dont set encodeLabel here. + + encode.itemName = [nameDimIndex]; + encode.seriesName = [nameDimIndex]; + } + + return encode; +} +/** + * If return null/undefined, indicate that should not use datasetModel. + */ + + +function getDatasetModel(seriesModel) { + var option = seriesModel.option; // Caution: consider the scenario: + // A dataset is declared and a series is not expected to use the dataset, + // and at the beginning `setOption({series: { noData })` (just prepare other + // option but no data), then `setOption({series: {data: [...]}); In this case, + // the user should set an empty array to avoid that dataset is used by default. + + var thisData = option.data; + + if (!thisData) { + return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0); + } +} +/** + * The rule should not be complex, otherwise user might not + * be able to known where the data is wrong. + * The code is ugly, but how to make it neat? + * + * @param {module:echars/data/Source} source + * @param {number} dimIndex + * @return {BE_ORDINAL} guess result. + */ + + +function guessOrdinal(source, dimIndex) { + return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex); +} // dimIndex may be overflow source data. +// return {BE_ORDINAL} + + +function doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) { + var result; // Experience value. + + var maxLoop = 5; + + if (isTypedArray(data)) { + return BE_ORDINAL.Not; + } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine + // always exists in source. + + + var dimName; + var dimType; + + if (dimensionsDefine) { + var dimDefItem = dimensionsDefine[dimIndex]; + + if (isObject(dimDefItem)) { + dimName = dimDefItem.name; + dimType = dimDefItem.type; + } else if (isString(dimDefItem)) { + dimName = dimDefItem; + } + } + + if (dimType != null) { + return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not; + } + + if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { + if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { + var sample = data[dimIndex]; + + for (var i = 0; i < (sample || []).length && i < maxLoop; i++) { + if ((result = detectValue(sample[startIndex + i])) != null) { + return result; + } + } + } else { + for (var i = 0; i < data.length && i < maxLoop; i++) { + var row = data[startIndex + i]; + + if (row && (result = detectValue(row[dimIndex])) != null) { + return result; + } + } + } + } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { + if (!dimName) { + return BE_ORDINAL.Not; + } + + for (var i = 0; i < data.length && i < maxLoop; i++) { + var item = data[i]; + + if (item && (result = detectValue(item[dimName])) != null) { + return result; + } + } + } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { + if (!dimName) { + return BE_ORDINAL.Not; + } + + var sample = data[dimName]; + + if (!sample || isTypedArray(sample)) { + return BE_ORDINAL.Not; + } + + for (var i = 0; i < sample.length && i < maxLoop; i++) { + if ((result = detectValue(sample[i])) != null) { + return result; + } + } + } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { + for (var i = 0; i < data.length && i < maxLoop; i++) { + var item = data[i]; + var val = getDataItemValue(item); + + if (!isArray(val)) { + return BE_ORDINAL.Not; + } + + if ((result = detectValue(val[dimIndex])) != null) { + return result; + } + } + } + + function detectValue(val) { + var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as "number". + // `isFinit('')` get `true`. + + if (val != null && isFinite(val) && val !== '') { + return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not; + } else if (beStr && val !== '-') { + return BE_ORDINAL.Must; + } + } + + return BE_ORDINAL.Not; +} + +exports.BE_ORDINAL = BE_ORDINAL; +exports.detectSourceFormat = detectSourceFormat; +exports.getSource = getSource; +exports.resetSourceDefaulter = resetSourceDefaulter; +exports.prepareSource = prepareSource; +exports.makeSeriesEncodeForAxisCoordSys = makeSeriesEncodeForAxisCoordSys; +exports.makeSeriesEncodeForNameBased = makeSeriesEncodeForNameBased; +exports.guessOrdinal = guessOrdinal; + +/***/ }), + +/***/ "0fd3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var graphic = __webpack_require__("2306"); + +var Line = __webpack_require__("7e5b"); + +var zrUtil = __webpack_require__("6d8b"); + +var _symbol = __webpack_require__("a15a"); + +var createSymbol = _symbol.createSymbol; + +var vec2 = __webpack_require__("401b"); + +var curveUtil = __webpack_require__("4a3f"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Provide effect for line + * @module echarts/chart/helper/EffectLine + */ + +/** + * @constructor + * @extends {module:zrender/graphic/Group} + * @alias {module:echarts/chart/helper/Line} + */ +function EffectLine(lineData, idx, seriesScope) { + graphic.Group.call(this); + this.add(this.createLine(lineData, idx, seriesScope)); + + this._updateEffectSymbol(lineData, idx); +} + +var effectLineProto = EffectLine.prototype; + +effectLineProto.createLine = function (lineData, idx, seriesScope) { + return new Line(lineData, idx, seriesScope); +}; + +effectLineProto._updateEffectSymbol = function (lineData, idx) { + var itemModel = lineData.getItemModel(idx); + var effectModel = itemModel.getModel('effect'); + var size = effectModel.get('symbolSize'); + var symbolType = effectModel.get('symbol'); + + if (!zrUtil.isArray(size)) { + size = [size, size]; + } + + var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color'); + var symbol = this.childAt(1); + + if (this._symbolType !== symbolType) { + // Remove previous + this.remove(symbol); + symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color); + symbol.z2 = 100; + symbol.culling = true; + this.add(symbol); + } // Symbol may be removed if loop is false + + + if (!symbol) { + return; + } // Shadow color is same with color in default + + + symbol.setStyle('shadowColor', color); + symbol.setStyle(effectModel.getItemStyle(['color'])); + symbol.attr('scale', size); + symbol.setColor(color); + symbol.attr('scale', size); + this._symbolType = symbolType; + this._symbolScale = size; + + this._updateEffectAnimation(lineData, effectModel, idx); +}; + +effectLineProto._updateEffectAnimation = function (lineData, effectModel, idx) { + var symbol = this.childAt(1); + + if (!symbol) { + return; + } + + var self = this; + var points = lineData.getItemLayout(idx); + var period = effectModel.get('period') * 1000; + var loop = effectModel.get('loop'); + var constantSpeed = effectModel.get('constantSpeed'); + var delayExpr = zrUtil.retrieve(effectModel.get('delay'), function (idx) { + return idx / lineData.count() * period / 3; + }); + var isDelayFunc = typeof delayExpr === 'function'; // Ignore when updating + + symbol.ignore = true; + this.updateAnimationPoints(symbol, points); + + if (constantSpeed > 0) { + period = this.getLineLength(symbol) / constantSpeed * 1000; + } + + if (period !== this._period || loop !== this._loop) { + symbol.stopAnimation(); + var delay = delayExpr; + + if (isDelayFunc) { + delay = delayExpr(idx); + } + + if (symbol.__t > 0) { + delay = -period * symbol.__t; + } + + symbol.__t = 0; + var animator = symbol.animate('', loop).when(period, { + __t: 1 + }).delay(delay).during(function () { + self.updateSymbolPosition(symbol); + }); + + if (!loop) { + animator.done(function () { + self.remove(symbol); + }); + } + + animator.start(); + } + + this._period = period; + this._loop = loop; +}; + +effectLineProto.getLineLength = function (symbol) { + // Not so accurate + return vec2.dist(symbol.__p1, symbol.__cp1) + vec2.dist(symbol.__cp1, symbol.__p2); +}; + +effectLineProto.updateAnimationPoints = function (symbol, points) { + symbol.__p1 = points[0]; + symbol.__p2 = points[1]; + symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2]; +}; + +effectLineProto.updateData = function (lineData, idx, seriesScope) { + this.childAt(0).updateData(lineData, idx, seriesScope); + + this._updateEffectSymbol(lineData, idx); +}; + +effectLineProto.updateSymbolPosition = function (symbol) { + var p1 = symbol.__p1; + var p2 = symbol.__p2; + var cp1 = symbol.__cp1; + var t = symbol.__t; + var pos = symbol.position; + var lastPos = [pos[0], pos[1]]; + var quadraticAt = curveUtil.quadraticAt; + var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt; + pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t); + pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); // Tangent + + var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t); + var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t); + symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; // enable continuity trail for 'line', 'rect', 'roundRect' symbolType + + if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') { + if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) { + var scaleY = vec2.dist(lastPos, pos) * 1.05; + symbol.attr('scale', [symbol.scale[0], scaleY]); // make sure the last segment render within endPoint + + if (t === 1) { + pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2; + pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2; + } + } else if (symbol.__lastT === 1) { + // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly. + var scaleY = 2 * vec2.dist(p1, pos); + symbol.attr('scale', [symbol.scale[0], scaleY]); + } else { + symbol.attr('scale', this._symbolScale); + } + } + + symbol.__lastT = symbol.__t; + symbol.ignore = false; +}; + +effectLineProto.updateLayout = function (lineData, idx) { + this.childAt(0).updateLayout(lineData, idx); + var effectModel = lineData.getItemModel(idx).getModel('effect'); + + this._updateEffectAnimation(lineData, effectModel, idx); +}; + +zrUtil.inherits(EffectLine, graphic.Group); +var _default = EffectLine; +module.exports = _default; + +/***/ }), + +/***/ "10cc": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var BoundingRect = __webpack_require__("9850"); + +var visualSolution = __webpack_require__("2b8c"); + +var selector = __webpack_require__("a890"); + +var throttleUtil = __webpack_require__("88b3"); + +var BrushTargetManager = __webpack_require__("bd9e"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var STATE_LIST = ['inBrush', 'outOfBrush']; +var DISPATCH_METHOD = '__ecBrushSelect'; +var DISPATCH_FLAG = '__ecInBrushSelectEvent'; +var PRIORITY_BRUSH = echarts.PRIORITY.VISUAL.BRUSH; +/** + * Layout for visual, the priority higher than other layout, and before brush visual. + */ + +echarts.registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) { + ecModel.eachComponent({ + mainType: 'brush' + }, function (brushModel) { + payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : { + brushType: false + }); + }); + layoutCovers(ecModel); +}); + +function layoutCovers(ecModel) { + ecModel.eachComponent({ + mainType: 'brush' + }, function (brushModel) { + var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel); + brushTargetManager.setInputRanges(brushModel.areas, ecModel); + }); +} +/** + * Register the visual encoding if this modules required. + */ + + +echarts.registerVisual(PRIORITY_BRUSH, function (ecModel, api, payload) { + var brushSelected = []; + var throttleType; + var throttleDelay; + ecModel.eachComponent({ + mainType: 'brush' + }, function (brushModel, brushIndex) { + var thisBrushSelected = { + brushId: brushModel.id, + brushIndex: brushIndex, + brushName: brushModel.name, + areas: zrUtil.clone(brushModel.areas), + selected: [] + }; // Every brush component exists in event params, convenient + // for user to find by index. + + brushSelected.push(thisBrushSelected); + var brushOption = brushModel.option; + var brushLink = brushOption.brushLink; + var linkedSeriesMap = []; + var selectedDataIndexForLink = []; + var rangeInfoBySeries = []; + var hasBrushExists = 0; + + if (!brushIndex) { + // Only the first throttle setting works. + throttleType = brushOption.throttleType; + throttleDelay = brushOption.throttleDelay; + } // Add boundingRect and selectors to range. + + + var areas = zrUtil.map(brushModel.areas, function (area) { + return bindSelector(zrUtil.defaults({ + boundingRect: boundingRectBuilders[area.brushType](area) + }, area)); + }); + var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) { + mappingOption.mappingMethod = 'fixed'; + }); + zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) { + linkedSeriesMap[seriesIndex] = 1; + }); + + function linkOthers(seriesIndex) { + return brushLink === 'all' || linkedSeriesMap[seriesIndex]; + } // If no supported brush or no brush on the series, + // all visuals should be in original state. + + + function brushed(rangeInfoList) { + return !!rangeInfoList.length; + } + /** + * Logic for each series: (If the logic has to be modified one day, do it carefully!) + * + * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord. + * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord. + * └!hasBrushExist┘ └nothing. + * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord. + * └!hasBrushExist┘ └nothing. + * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck. + * !brushed┘ └nothing. + * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing. + */ + // Step A + + + ecModel.eachSeries(function (seriesModel, seriesIndex) { + var rangeInfoList = rangeInfoBySeries[seriesIndex] = []; + seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex, rangeInfoList) : stepAOthers(seriesModel, seriesIndex, rangeInfoList); + }); + + function stepAParallel(seriesModel, seriesIndex) { + var coordSys = seriesModel.coordinateSystem; + hasBrushExists |= coordSys.hasAxisBrushed(); + linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) { + activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1); + }); + } + + function stepAOthers(seriesModel, seriesIndex, rangeInfoList) { + var selectorsByBrushType = getSelectorsByBrushType(seriesModel); + + if (!selectorsByBrushType || brushModelNotControll(brushModel, seriesIndex)) { + return; + } + + zrUtil.each(areas, function (area) { + selectorsByBrushType[area.brushType] && brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel) && rangeInfoList.push(area); + hasBrushExists |= brushed(rangeInfoList); + }); + + if (linkOthers(seriesIndex) && brushed(rangeInfoList)) { + var data = seriesModel.getData(); + data.each(function (dataIndex) { + if (checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex)) { + selectedDataIndexForLink[dataIndex] = 1; + } + }); + } + } // Step B + + + ecModel.eachSeries(function (seriesModel, seriesIndex) { + var seriesBrushSelected = { + seriesId: seriesModel.id, + seriesIndex: seriesIndex, + seriesName: seriesModel.name, + dataIndex: [] + }; // Every series exists in event params, convenient + // for user to find series by seriesIndex. + + thisBrushSelected.selected.push(seriesBrushSelected); + var selectorsByBrushType = getSelectorsByBrushType(seriesModel); + var rangeInfoList = rangeInfoBySeries[seriesIndex]; + var data = seriesModel.getData(); + var getValueState = linkOthers(seriesIndex) ? function (dataIndex) { + return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; + } : function (dataIndex) { + return checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; + }; // If no supported brush or no brush, all visuals are in original state. + + (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState); + }); + }); + dispatchAction(api, throttleType, throttleDelay, brushSelected, payload); +}); + +function dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) { + // This event will not be triggered when `setOpion`, otherwise dead lock may + // triggered when do `setOption` in event listener, which we do not find + // satisfactory way to solve yet. Some considered resolutions: + // (a) Diff with prevoius selected data ant only trigger event when changed. + // But store previous data and diff precisely (i.e., not only by dataIndex, but + // also detect value changes in selected data) might bring complexity or fragility. + // (b) Use spectial param like `silent` to suppress event triggering. + // But such kind of volatile param may be weird in `setOption`. + if (!payload) { + return; + } + + var zr = api.getZr(); + + if (zr[DISPATCH_FLAG]) { + return; + } + + if (!zr[DISPATCH_METHOD]) { + zr[DISPATCH_METHOD] = doDispatch; + } + + var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType); + fn(api, brushSelected); +} + +function doDispatch(api, brushSelected) { + if (!api.isDisposed()) { + var zr = api.getZr(); + zr[DISPATCH_FLAG] = true; + api.dispatchAction({ + type: 'brushSelect', + batch: brushSelected + }); + zr[DISPATCH_FLAG] = false; + } +} + +function checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) { + for (var i = 0, len = rangeInfoList.length; i < len; i++) { + var area = rangeInfoList[i]; + + if (selectorsByBrushType[area.brushType](dataIndex, data, area.selectors, area)) { + return true; + } + } +} + +function getSelectorsByBrushType(seriesModel) { + var brushSelector = seriesModel.brushSelector; + + if (zrUtil.isString(brushSelector)) { + var sels = []; + zrUtil.each(selector, function (selectorsByElementType, brushType) { + sels[brushType] = function (dataIndex, data, selectors, area) { + var itemLayout = data.getItemLayout(dataIndex); + return selectorsByElementType[brushSelector](itemLayout, selectors, area); + }; + }); + return sels; + } else if (zrUtil.isFunction(brushSelector)) { + var bSelector = {}; + zrUtil.each(selector, function (sel, brushType) { + bSelector[brushType] = brushSelector; + }); + return bSelector; + } + + return brushSelector; +} + +function brushModelNotControll(brushModel, seriesIndex) { + var seriesIndices = brushModel.option.seriesIndex; + return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices); +} + +function bindSelector(area) { + var selectors = area.selectors = {}; + zrUtil.each(selector[area.brushType], function (selFn, elType) { + // Do not use function binding or curry for performance. + selectors[elType] = function (itemLayout) { + return selFn(itemLayout, selectors, area); + }; + }); + return area; +} + +var boundingRectBuilders = { + lineX: zrUtil.noop, + lineY: zrUtil.noop, + rect: function (area) { + return getBoundingRectFromMinMax(area.range); + }, + polygon: function (area) { + var minMax; + var range = area.range; + + for (var i = 0, len = range.length; i < len; i++) { + minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]]; + var rg = range[i]; + rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]); + rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]); + rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]); + rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]); + } + + return minMax && getBoundingRectFromMinMax(minMax); + } +}; + +function getBoundingRectFromMinMax(minMax) { + return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]); +} + +exports.layoutCovers = layoutCovers; + +/***/ }), + +/***/ "1111": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("67a8"); + +__webpack_require__("4784"); + +var visualSymbol = __webpack_require__("7f96"); + +var layoutPoints = __webpack_require__("87c3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerVisual(visualSymbol('effectScatter', 'circle')); +echarts.registerLayout(layoutPoints('effectScatter')); + +/***/ }), + +/***/ "1148": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__("a691"); +var requireObjectCoercible = __webpack_require__("1d80"); + +// `String.prototype.repeat` method implementation +// https://tc39.github.io/ecma262/#sec-string.prototype.repeat +module.exports = ''.repeat || function repeat(count) { + var str = String(requireObjectCoercible(this)); + var result = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; + return result; +}; + + +/***/ }), + +/***/ "1276": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784"); +var isRegExp = __webpack_require__("44e7"); +var anObject = __webpack_require__("825a"); +var requireObjectCoercible = __webpack_require__("1d80"); +var speciesConstructor = __webpack_require__("4840"); +var advanceStringIndex = __webpack_require__("8aa5"); +var toLength = __webpack_require__("50c4"); +var callRegExpExec = __webpack_require__("14c3"); +var regexpExec = __webpack_require__("9263"); +var fails = __webpack_require__("d039"); + +var arrayPush = [].push; +var min = Math.min; +var MAX_UINT32 = 0xFFFFFFFF; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { + var internalSplit; + if ( + 'abbc'.split(/(b)*/)[1] == 'c' || + 'test'.split(/(?:)/, -1).length != 4 || + 'ab'.split(/(?:ab)*/).length != 2 || + '.'.split(/(.?)(.?)/).length != 4 || + '.'.split(/()()/).length > 1 || + ''.split(/.?/).length + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(requireObjectCoercible(this)); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (separator === undefined) return [string]; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) { + return nativeSplit.call(string, separator, lim); + } + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy.lastIndex; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= lim) break; + } + if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output.length > lim ? output.slice(0, lim) : output; + }; + // Chakra, V8 + } else if ('0'.split(undefined, 0).length) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); + }; + } else internalSplit = nativeSplit; + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = requireObjectCoercible(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}, !SUPPORTS_Y); + + +/***/ }), + +/***/ "133d": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var modelUtil = __webpack_require__("e0d3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @param {Object} finder contains {seriesIndex, dataIndex, dataIndexInside} + * @param {module:echarts/model/Global} ecModel + * @return {Object} {point: [x, y], el: ...} point Will not be null. + */ +function _default(finder, ecModel) { + var point = []; + var seriesIndex = finder.seriesIndex; + var seriesModel; + + if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) { + return { + point: [] + }; + } + + var data = seriesModel.getData(); + var dataIndex = modelUtil.queryDataIndex(data, finder); + + if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) { + return { + point: [] + }; + } + + var el = data.getItemGraphicEl(dataIndex); + var coordSys = seriesModel.coordinateSystem; + + if (seriesModel.getTooltipPosition) { + point = seriesModel.getTooltipPosition(dataIndex) || []; + } else if (coordSys && coordSys.dataToPoint) { + point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) { + return data.mapDimension(dim); + }), dataIndex, true)) || []; + } else if (el) { + // Use graphic bounding rect + var rect = el.getBoundingRect().clone(); + rect.applyTransform(el.transform); + point = [rect.x + rect.width / 2, rect.y + rect.height / 2]; + } + + return { + point: point, + el: el + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "1418": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var _symbol = __webpack_require__("a15a"); + +var createSymbol = _symbol.createSymbol; + +var graphic = __webpack_require__("2306"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _labelHelper = __webpack_require__("c775"); + +var getDefaultLabel = _labelHelper.getDefaultLabel; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @module echarts/chart/helper/Symbol + */ + +/** + * @constructor + * @alias {module:echarts/chart/helper/Symbol} + * @param {module:echarts/data/List} data + * @param {number} idx + * @extends {module:zrender/graphic/Group} + */ +function SymbolClz(data, idx, seriesScope) { + graphic.Group.call(this); + this.updateData(data, idx, seriesScope); +} + +var symbolProto = SymbolClz.prototype; +/** + * @public + * @static + * @param {module:echarts/data/List} data + * @param {number} dataIndex + * @return {Array.} [width, height] + */ + +var getSymbolSize = SymbolClz.getSymbolSize = function (data, idx) { + var symbolSize = data.getItemVisual(idx, 'symbolSize'); + return symbolSize instanceof Array ? symbolSize.slice() : [+symbolSize, +symbolSize]; +}; + +function getScale(symbolSize) { + return [symbolSize[0] / 2, symbolSize[1] / 2]; +} + +function driftSymbol(dx, dy) { + this.parent.drift(dx, dy); +} + +symbolProto._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) { + // Remove paths created before + this.removeAll(); + var color = data.getItemVisual(idx, 'color'); // var symbolPath = createSymbol( + // symbolType, -0.5, -0.5, 1, 1, color + // ); + // If width/height are set too small (e.g., set to 1) on ios10 + // and macOS Sierra, a circle stroke become a rect, no matter what + // the scale is set. So we set width/height as 2. See #4150. + + var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, color, keepAspect); + symbolPath.attr({ + z2: 100, + culling: true, + scale: getScale(symbolSize) + }); // Rewrite drift method + + symbolPath.drift = driftSymbol; + this._symbolType = symbolType; + this.add(symbolPath); +}; +/** + * Stop animation + * @param {boolean} toLastFrame + */ + + +symbolProto.stopSymbolAnimation = function (toLastFrame) { + this.childAt(0).stopAnimation(toLastFrame); +}; +/** + * FIXME: + * Caution: This method breaks the encapsulation of this module, + * but it indeed brings convenience. So do not use the method + * unless you detailedly know all the implements of `Symbol`, + * especially animation. + * + * Get symbol path element. + */ + + +symbolProto.getSymbolPath = function () { + return this.childAt(0); +}; +/** + * Get scale(aka, current symbol size). + * Including the change caused by animation + */ + + +symbolProto.getScale = function () { + return this.childAt(0).scale; +}; +/** + * Highlight symbol + */ + + +symbolProto.highlight = function () { + this.childAt(0).trigger('emphasis'); +}; +/** + * Downplay symbol + */ + + +symbolProto.downplay = function () { + this.childAt(0).trigger('normal'); +}; +/** + * @param {number} zlevel + * @param {number} z + */ + + +symbolProto.setZ = function (zlevel, z) { + var symbolPath = this.childAt(0); + symbolPath.zlevel = zlevel; + symbolPath.z = z; +}; + +symbolProto.setDraggable = function (draggable) { + var symbolPath = this.childAt(0); + symbolPath.draggable = draggable; + symbolPath.cursor = draggable ? 'move' : symbolPath.cursor; +}; +/** + * Update symbol properties + * @param {module:echarts/data/List} data + * @param {number} idx + * @param {Object} [seriesScope] + * @param {Object} [seriesScope.itemStyle] + * @param {Object} [seriesScope.hoverItemStyle] + * @param {Object} [seriesScope.symbolRotate] + * @param {Object} [seriesScope.symbolOffset] + * @param {module:echarts/model/Model} [seriesScope.labelModel] + * @param {module:echarts/model/Model} [seriesScope.hoverLabelModel] + * @param {boolean} [seriesScope.hoverAnimation] + * @param {Object} [seriesScope.cursorStyle] + * @param {module:echarts/model/Model} [seriesScope.itemModel] + * @param {string} [seriesScope.symbolInnerColor] + * @param {Object} [seriesScope.fadeIn=false] + */ + + +symbolProto.updateData = function (data, idx, seriesScope) { + this.silent = false; + var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; + var seriesModel = data.hostModel; + var symbolSize = getSymbolSize(data, idx); + var isInit = symbolType !== this._symbolType; + + if (isInit) { + var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect'); + + this._createSymbol(symbolType, data, idx, symbolSize, keepAspect); + } else { + var symbolPath = this.childAt(0); + symbolPath.silent = false; + graphic.updateProps(symbolPath, { + scale: getScale(symbolSize) + }, seriesModel, idx); + } + + this._updateCommon(data, idx, symbolSize, seriesScope); + + if (isInit) { + var symbolPath = this.childAt(0); + var fadeIn = seriesScope && seriesScope.fadeIn; + var target = { + scale: symbolPath.scale.slice() + }; + fadeIn && (target.style = { + opacity: symbolPath.style.opacity + }); + symbolPath.scale = [0, 0]; + fadeIn && (symbolPath.style.opacity = 0); + graphic.initProps(symbolPath, target, seriesModel, idx); + } + + this._seriesModel = seriesModel; +}; // Update common properties + + +var normalStyleAccessPath = ['itemStyle']; +var emphasisStyleAccessPath = ['emphasis', 'itemStyle']; +var normalLabelAccessPath = ['label']; +var emphasisLabelAccessPath = ['emphasis', 'label']; +/** + * @param {module:echarts/data/List} data + * @param {number} idx + * @param {Array.} symbolSize + * @param {Object} [seriesScope] + */ + +symbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) { + var symbolPath = this.childAt(0); + var seriesModel = data.hostModel; + var color = data.getItemVisual(idx, 'color'); // Reset style + + if (symbolPath.type !== 'image') { + symbolPath.useStyle({ + strokeNoScale: true + }); + } else { + symbolPath.setStyle({ + opacity: null, + shadowBlur: null, + shadowOffsetX: null, + shadowOffsetY: null, + shadowColor: null + }); + } + + var itemStyle = seriesScope && seriesScope.itemStyle; + var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle; + var symbolOffset = seriesScope && seriesScope.symbolOffset; + var labelModel = seriesScope && seriesScope.labelModel; + var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel; + var hoverAnimation = seriesScope && seriesScope.hoverAnimation; + var cursorStyle = seriesScope && seriesScope.cursorStyle; + + if (!seriesScope || data.hasItemOption) { + var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx); // Color must be excluded. + // Because symbol provide setColor individually to set fill and stroke + + itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']); + hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle(); + symbolOffset = itemModel.getShallow('symbolOffset'); + labelModel = itemModel.getModel(normalLabelAccessPath); + hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath); + hoverAnimation = itemModel.getShallow('hoverAnimation'); + cursorStyle = itemModel.getShallow('cursor'); + } else { + hoverItemStyle = zrUtil.extend({}, hoverItemStyle); + } + + var elStyle = symbolPath.style; + var symbolRotate = data.getItemVisual(idx, 'symbolRotate'); + symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0); + + if (symbolOffset) { + symbolPath.attr('position', [parsePercent(symbolOffset[0], symbolSize[0]), parsePercent(symbolOffset[1], symbolSize[1])]); + } + + cursorStyle && symbolPath.attr('cursor', cursorStyle); // PENDING setColor before setStyle!!! + + symbolPath.setColor(color, seriesScope && seriesScope.symbolInnerColor); + symbolPath.setStyle(itemStyle); + var opacity = data.getItemVisual(idx, 'opacity'); + + if (opacity != null) { + elStyle.opacity = opacity; + } + + var liftZ = data.getItemVisual(idx, 'liftZ'); + var z2Origin = symbolPath.__z2Origin; + + if (liftZ != null) { + if (z2Origin == null) { + symbolPath.__z2Origin = symbolPath.z2; + symbolPath.z2 += liftZ; + } + } else if (z2Origin != null) { + symbolPath.z2 = z2Origin; + symbolPath.__z2Origin = null; + } + + var useNameLabel = seriesScope && seriesScope.useNameLabel; + graphic.setLabelStyle(elStyle, hoverItemStyle, labelModel, hoverLabelModel, { + labelFetcher: seriesModel, + labelDataIndex: idx, + defaultText: getLabelDefaultText, + isRectText: true, + autoColor: color + }); // Do not execute util needed. + + function getLabelDefaultText(idx, opt) { + return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx); + } + + symbolPath.__symbolOriginalScale = getScale(symbolSize); + symbolPath.hoverStyle = hoverItemStyle; + symbolPath.highDownOnUpdate = hoverAnimation && seriesModel.isAnimationEnabled() ? highDownOnUpdate : null; + graphic.setHoverStyle(symbolPath); +}; + +function highDownOnUpdate(fromState, toState) { + // Do not support this hover animation util some scenario required. + // Animation can only be supported in hover layer when using `el.incremetal`. + if (this.incremental || this.useHoverLayer) { + return; + } + + if (toState === 'emphasis') { + var scale = this.__symbolOriginalScale; + var ratio = scale[1] / scale[0]; + var emphasisOpt = { + scale: [Math.max(scale[0] * 1.1, scale[0] + 3), Math.max(scale[1] * 1.1, scale[1] + 3 * ratio)] + }; // FIXME + // modify it after support stop specified animation. + // toState === fromState + // ? (this.stopAnimation(), this.attr(emphasisOpt)) + + this.animateTo(emphasisOpt, 400, 'elasticOut'); + } else if (toState === 'normal') { + this.animateTo({ + scale: this.__symbolOriginalScale + }, 400, 'elasticOut'); + } +} +/** + * @param {Function} cb + * @param {Object} [opt] + * @param {Object} [opt.keepLabel=true] + */ + + +symbolProto.fadeOut = function (cb, opt) { + var symbolPath = this.childAt(0); // Avoid mistaken hover when fading out + + this.silent = symbolPath.silent = true; // Not show text when animating + + !(opt && opt.keepLabel) && (symbolPath.style.text = null); + graphic.updateProps(symbolPath, { + style: { + opacity: 0 + }, + scale: [0, 0] + }, this._seriesModel, this.dataIndex, cb); +}; + +zrUtil.inherits(SymbolClz, graphic.Group); +var _default = SymbolClz; +module.exports = _default; + +/***/ }), + +/***/ "1466": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var graphic = __webpack_require__("2306"); + +var zrUtil = __webpack_require__("6d8b"); + +var symbolUtil = __webpack_require__("a15a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function normalizeSymbolSize(symbolSize) { + if (!zrUtil.isArray(symbolSize)) { + symbolSize = [+symbolSize, +symbolSize]; + } + + return symbolSize; +} + +var _default = echarts.extendChartView({ + type: 'radar', + render: function (seriesModel, ecModel, api) { + var polar = seriesModel.coordinateSystem; + var group = this.group; + var data = seriesModel.getData(); + var oldData = this._data; + + function createSymbol(data, idx) { + var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; + var color = data.getItemVisual(idx, 'color'); + + if (symbolType === 'none') { + return; + } + + var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize')); + var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2, color); + symbolPath.attr({ + style: { + strokeNoScale: true + }, + z2: 100, + scale: [symbolSize[0] / 2, symbolSize[1] / 2] + }); + return symbolPath; + } + + function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) { + // Simply rerender all + symbolGroup.removeAll(); + + for (var i = 0; i < newPoints.length - 1; i++) { + var symbolPath = createSymbol(data, idx); + + if (symbolPath) { + symbolPath.__dimIdx = i; + + if (oldPoints[i]) { + symbolPath.attr('position', oldPoints[i]); + graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, { + position: newPoints[i] + }, seriesModel, idx); + } else { + symbolPath.attr('position', newPoints[i]); + } + + symbolGroup.add(symbolPath); + } + } + } + + function getInitialPoints(points) { + return zrUtil.map(points, function (pt) { + return [polar.cx, polar.cy]; + }); + } + + data.diff(oldData).add(function (idx) { + var points = data.getItemLayout(idx); + + if (!points) { + return; + } + + var polygon = new graphic.Polygon(); + var polyline = new graphic.Polyline(); + var target = { + shape: { + points: points + } + }; + polygon.shape.points = getInitialPoints(points); + polyline.shape.points = getInitialPoints(points); + graphic.initProps(polygon, target, seriesModel, idx); + graphic.initProps(polyline, target, seriesModel, idx); + var itemGroup = new graphic.Group(); + var symbolGroup = new graphic.Group(); + itemGroup.add(polyline); + itemGroup.add(polygon); + itemGroup.add(symbolGroup); + updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true); + data.setItemGraphicEl(idx, itemGroup); + }).update(function (newIdx, oldIdx) { + var itemGroup = oldData.getItemGraphicEl(oldIdx); + var polyline = itemGroup.childAt(0); + var polygon = itemGroup.childAt(1); + var symbolGroup = itemGroup.childAt(2); + var target = { + shape: { + points: data.getItemLayout(newIdx) + } + }; + + if (!target.shape.points) { + return; + } + + updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false); + graphic.updateProps(polyline, target, seriesModel); + graphic.updateProps(polygon, target, seriesModel); + data.setItemGraphicEl(newIdx, itemGroup); + }).remove(function (idx) { + group.remove(oldData.getItemGraphicEl(idx)); + }).execute(); + data.eachItemGraphicEl(function (itemGroup, idx) { + var itemModel = data.getItemModel(idx); + var polyline = itemGroup.childAt(0); + var polygon = itemGroup.childAt(1); + var symbolGroup = itemGroup.childAt(2); + var color = data.getItemVisual(idx, 'color'); + group.add(itemGroup); + polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), { + fill: 'none', + stroke: color + })); + polyline.hoverStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle(); + var areaStyleModel = itemModel.getModel('areaStyle'); + var hoverAreaStyleModel = itemModel.getModel('emphasis.areaStyle'); + var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty(); + var hoverPolygonIgnore = hoverAreaStyleModel.isEmpty() && hoverAreaStyleModel.parentModel.isEmpty(); + hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore; + polygon.ignore = polygonIgnore; + polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), { + fill: color, + opacity: 0.7 + })); + polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle(); + var itemStyle = itemModel.getModel('itemStyle').getItemStyle(['color']); + var itemHoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle(); + var labelModel = itemModel.getModel('label'); + var labelHoverModel = itemModel.getModel('emphasis.label'); + symbolGroup.eachChild(function (symbolPath) { + symbolPath.setStyle(itemStyle); + symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle); + var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx); + (defaultText == null || isNaN(defaultText)) && (defaultText = ''); + graphic.setLabelStyle(symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel, { + labelFetcher: data.hostModel, + labelDataIndex: idx, + labelDimIndex: symbolPath.__dimIdx, + defaultText: defaultText, + autoColor: color, + isRectText: true + }); + }); + + itemGroup.highDownOnUpdate = function (fromState, toState) { + polygon.attr('ignore', toState === 'emphasis' ? hoverPolygonIgnore : polygonIgnore); + }; + + graphic.setHoverStyle(itemGroup); + }); + this._data = data; + }, + remove: function () { + this.group.removeAll(); + this._data = null; + }, + dispose: function () {} +}); + +module.exports = _default; + +/***/ }), + +/***/ "14c3": +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__("c6b6"); +var regexpExec = __webpack_require__("9263"); + +// `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classof(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); +}; + + + +/***/ }), + +/***/ "14d3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +var AxisBuilder = __webpack_require__("fab2"); + +var AxisView = __webpack_require__("6679"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName']; +var selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine']; + +var _default = AxisView.extend({ + type: 'radiusAxis', + axisPointerClass: 'PolarAxisPointer', + render: function (radiusAxisModel, ecModel) { + this.group.removeAll(); + + if (!radiusAxisModel.get('show')) { + return; + } + + var radiusAxis = radiusAxisModel.axis; + var polar = radiusAxis.polar; + var angleAxis = polar.getAngleAxis(); + var ticksCoords = radiusAxis.getTicksCoords(); + var minorTicksCoords = radiusAxis.getMinorTicksCoords(); + var axisAngle = angleAxis.getExtent()[0]; + var radiusExtent = radiusAxis.getExtent(); + var layout = layoutAxis(polar, radiusAxisModel, axisAngle); + var axisBuilder = new AxisBuilder(radiusAxisModel, layout); + zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder); + this.group.add(axisBuilder.getGroup()); + zrUtil.each(selfBuilderAttrs, function (name) { + if (radiusAxisModel.get(name + '.show') && !radiusAxis.scale.isBlank()) { + this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords); + } + }, this); + }, + + /** + * @private + */ + _splitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { + var splitLineModel = radiusAxisModel.getModel('splitLine'); + var lineStyleModel = splitLineModel.getModel('lineStyle'); + var lineColors = lineStyleModel.get('color'); + var lineCount = 0; + lineColors = lineColors instanceof Array ? lineColors : [lineColors]; + var splitLines = []; + + for (var i = 0; i < ticksCoords.length; i++) { + var colorIndex = lineCount++ % lineColors.length; + splitLines[colorIndex] = splitLines[colorIndex] || []; + splitLines[colorIndex].push(new graphic.Circle({ + shape: { + cx: polar.cx, + cy: polar.cy, + r: ticksCoords[i].coord + } + })); + } // Simple optimization + // Batching the lines if color are the same + + + for (var i = 0; i < splitLines.length; i++) { + this.group.add(graphic.mergePath(splitLines[i], { + style: zrUtil.defaults({ + stroke: lineColors[i % lineColors.length], + fill: null + }, lineStyleModel.getLineStyle()), + silent: true + })); + } + }, + + /** + * @private + */ + _minorSplitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) { + if (!minorTicksCoords.length) { + return; + } + + var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine'); + var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); + var lines = []; + + for (var i = 0; i < minorTicksCoords.length; i++) { + for (var k = 0; k < minorTicksCoords[i].length; k++) { + lines.push(new graphic.Circle({ + shape: { + cx: polar.cx, + cy: polar.cy, + r: minorTicksCoords[i][k].coord + } + })); + } + } + + this.group.add(graphic.mergePath(lines, { + style: zrUtil.defaults({ + fill: null + }, lineStyleModel.getLineStyle()), + silent: true + })); + }, + + /** + * @private + */ + _splitArea: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { + if (!ticksCoords.length) { + return; + } + + var splitAreaModel = radiusAxisModel.getModel('splitArea'); + var areaStyleModel = splitAreaModel.getModel('areaStyle'); + var areaColors = areaStyleModel.get('color'); + var lineCount = 0; + areaColors = areaColors instanceof Array ? areaColors : [areaColors]; + var splitAreas = []; + var prevRadius = ticksCoords[0].coord; + + for (var i = 1; i < ticksCoords.length; i++) { + var colorIndex = lineCount++ % areaColors.length; + splitAreas[colorIndex] = splitAreas[colorIndex] || []; + splitAreas[colorIndex].push(new graphic.Sector({ + shape: { + cx: polar.cx, + cy: polar.cy, + r0: prevRadius, + r: ticksCoords[i].coord, + startAngle: 0, + endAngle: Math.PI * 2 + }, + silent: true + })); + prevRadius = ticksCoords[i].coord; + } // Simple optimization + // Batching the lines if color are the same + + + for (var i = 0; i < splitAreas.length; i++) { + this.group.add(graphic.mergePath(splitAreas[i], { + style: zrUtil.defaults({ + fill: areaColors[i % areaColors.length] + }, areaStyleModel.getAreaStyle()), + silent: true + })); + } + } +}); +/** + * @inner + */ + + +function layoutAxis(polar, radiusAxisModel, axisAngle) { + return { + position: [polar.cx, polar.cy], + rotation: axisAngle / 180 * Math.PI, + labelDirection: -1, + tickDirection: -1, + nameDirection: 1, + labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'), + // Over splitLine and splitArea + z2: 1 + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "1548": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var createListFromArray = __webpack_require__("3301"); + +var axisHelper = __webpack_require__("697e"); + +var axisModelCommonMixin = __webpack_require__("2023"); + +var Model = __webpack_require__("4319"); + +var _layout = __webpack_require__("f934"); + +var getLayoutRect = _layout.getLayoutRect; +exports.getLayoutRect = _layout.getLayoutRect; + +var _dataStackHelper = __webpack_require__("ee1a"); + +var enableDataStack = _dataStackHelper.enableDataStack; +var isDimensionStacked = _dataStackHelper.isDimensionStacked; +var getStackedDimension = _dataStackHelper.getStackedDimension; + +var _completeDimensions = __webpack_require__("862d"); + +exports.completeDimensions = _completeDimensions; + +var _createDimensions = __webpack_require__("b1d4"); + +exports.createDimensions = _createDimensions; + +var _symbol = __webpack_require__("a15a"); + +exports.createSymbol = _symbol.createSymbol; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge'; + +/** + * Create a muti dimension List structure from seriesModel. + * @param {module:echarts/model/Model} seriesModel + * @return {module:echarts/data/List} list + */ +function createList(seriesModel) { + return createListFromArray(seriesModel.getSource(), seriesModel); +} // export function createGraph(seriesModel) { +// var nodes = seriesModel.get('data'); +// var links = seriesModel.get('links'); +// return createGraphFromNodeEdge(nodes, links, seriesModel); +// } + + +var dataStack = { + isDimensionStacked: isDimensionStacked, + enableDataStack: enableDataStack, + getStackedDimension: getStackedDimension +}; +/** + * Create a symbol element with given symbol configuration: shape, x, y, width, height, color + * @param {string} symbolDesc + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + * @param {string} color + */ + +/** + * Create scale + * @param {Array.} dataExtent + * @param {Object|module:echarts/Model} option + */ +function createScale(dataExtent, option) { + var axisModel = option; + + if (!Model.isInstance(option)) { + axisModel = new Model(option); + zrUtil.mixin(axisModel, axisModelCommonMixin); + } + + var scale = axisHelper.createScaleByModel(axisModel); + scale.setExtent(dataExtent[0], dataExtent[1]); + axisHelper.niceScaleExtent(scale, axisModel); + return scale; +} +/** + * Mixin common methods to axis model, + * + * Inlcude methods + * `getFormattedLabels() => Array.` + * `getCategories() => Array.` + * `getMin(origin: boolean) => number` + * `getMax(origin: boolean) => number` + * `getNeedCrossZero() => boolean` + * `setRange(start: number, end: number)` + * `resetRange()` + */ + + +function mixinAxisModelCommonMethods(Model) { + zrUtil.mixin(Model, axisModelCommonMixin); +} + +exports.createList = createList; +exports.dataStack = dataStack; +exports.createScale = createScale; +exports.mixinAxisModelCommonMethods = mixinAxisModelCommonMethods; + +/***/ }), + +/***/ "159b": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var DOMIterables = __webpack_require__("fdbc"); +var forEach = __webpack_require__("17c2"); +var createNonEnumerableProperty = __webpack_require__("9112"); + +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { + createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); + } catch (error) { + CollectionPrototype.forEach = forEach; + } +} + + +/***/ }), + +/***/ "15af": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("cb69"); + +__webpack_require__("abff"); + +var visualSymbol = __webpack_require__("7f96"); + +var layoutPoints = __webpack_require__("87c3"); + +__webpack_require__("01ed"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// import * as zrUtil from 'zrender/src/core/util'; +// In case developer forget to include grid component +echarts.registerVisual(visualSymbol('scatter', 'circle')); +echarts.registerLayout(layoutPoints('scatter')); // echarts.registerProcessor(function (ecModel, api) { +// ecModel.eachSeriesByType('scatter', function (seriesModel) { +// var data = seriesModel.getData(); +// var coordSys = seriesModel.coordinateSystem; +// if (coordSys.type !== 'geo') { +// return; +// } +// var startPt = coordSys.pointToData([0, 0]); +// var endPt = coordSys.pointToData([api.getWidth(), api.getHeight()]); +// var dims = zrUtil.map(coordSys.dimensions, function (dim) { +// return data.mapDimension(dim); +// }); +// var range = {}; +// range[dims[0]] = [Math.min(startPt[0], endPt[0]), Math.max(startPt[0], endPt[0])]; +// range[dims[1]] = [Math.min(startPt[1], endPt[1]), Math.max(startPt[1], endPt[1])]; +// data.selectRange(range); +// }); +// }); + +/***/ }), + +/***/ "1687": +/***/ (function(module, exports) { + +/** + * 3x2矩阵操作类 + * @exports zrender/tool/matrix + */ + +/* global Float32Array */ +var ArrayCtor = typeof Float32Array === 'undefined' ? Array : Float32Array; +/** + * Create a identity matrix. + * @return {Float32Array|Array.} + */ + +function create() { + var out = new ArrayCtor(6); + identity(out); + return out; +} +/** + * 设置矩阵为单位矩阵 + * @param {Float32Array|Array.} out + */ + + +function identity(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; +} +/** + * 复制矩阵 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} m + */ + + +function copy(out, m) { + out[0] = m[0]; + out[1] = m[1]; + out[2] = m[2]; + out[3] = m[3]; + out[4] = m[4]; + out[5] = m[5]; + return out; +} +/** + * 矩阵相乘 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} m1 + * @param {Float32Array|Array.} m2 + */ + + +function mul(out, m1, m2) { + // Consider matrix.mul(m, m2, m); + // where out is the same as m2. + // So use temp variable to escape error. + var out0 = m1[0] * m2[0] + m1[2] * m2[1]; + var out1 = m1[1] * m2[0] + m1[3] * m2[1]; + var out2 = m1[0] * m2[2] + m1[2] * m2[3]; + var out3 = m1[1] * m2[2] + m1[3] * m2[3]; + var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4]; + var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5]; + out[0] = out0; + out[1] = out1; + out[2] = out2; + out[3] = out3; + out[4] = out4; + out[5] = out5; + return out; +} +/** + * 平移变换 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + * @param {Float32Array|Array.} v + */ + + +function translate(out, a, v) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4] + v[0]; + out[5] = a[5] + v[1]; + return out; +} +/** + * 旋转变换 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + * @param {number} rad + */ + + +function rotate(out, a, rad) { + var aa = a[0]; + var ac = a[2]; + var atx = a[4]; + var ab = a[1]; + var ad = a[3]; + var aty = a[5]; + var st = Math.sin(rad); + var ct = Math.cos(rad); + out[0] = aa * ct + ab * st; + out[1] = -aa * st + ab * ct; + out[2] = ac * ct + ad * st; + out[3] = -ac * st + ct * ad; + out[4] = ct * atx + st * aty; + out[5] = ct * aty - st * atx; + return out; +} +/** + * 缩放变换 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + * @param {Float32Array|Array.} v + */ + + +function scale(out, a, v) { + var vx = v[0]; + var vy = v[1]; + out[0] = a[0] * vx; + out[1] = a[1] * vy; + out[2] = a[2] * vx; + out[3] = a[3] * vy; + out[4] = a[4] * vx; + out[5] = a[5] * vy; + return out; +} +/** + * 求逆矩阵 + * @param {Float32Array|Array.} out + * @param {Float32Array|Array.} a + */ + + +function invert(out, a) { + var aa = a[0]; + var ac = a[2]; + var atx = a[4]; + var ab = a[1]; + var ad = a[3]; + var aty = a[5]; + var det = aa * ad - ab * ac; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; +} +/** + * Clone a new matrix. + * @param {Float32Array|Array.} a + */ + + +function clone(a) { + var b = create(); + copy(b, a); + return b; +} + +exports.create = create; +exports.identity = identity; +exports.copy = copy; +exports.mul = mul; +exports.translate = translate; +exports.rotate = rotate; +exports.scale = scale; +exports.invert = invert; +exports.clone = clone; + +/***/ }), + +/***/ "1748": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var axisDefault = __webpack_require__("71ad"); + +var Model = __webpack_require__("4319"); + +var axisModelCommonMixin = __webpack_require__("2023"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var valueAxisDefault = axisDefault.valueAxis; + +function defaultsShow(opt, show) { + return zrUtil.defaults({ + show: show + }, opt); +} + +var RadarModel = echarts.extendComponentModel({ + type: 'radar', + optionUpdated: function () { + var boundaryGap = this.get('boundaryGap'); + var splitNumber = this.get('splitNumber'); + var scale = this.get('scale'); + var axisLine = this.get('axisLine'); + var axisTick = this.get('axisTick'); + var axisType = this.get('axisType'); + var axisLabel = this.get('axisLabel'); + var nameTextStyle = this.get('name'); + var showName = this.get('name.show'); + var nameFormatter = this.get('name.formatter'); + var nameGap = this.get('nameGap'); + var triggerEvent = this.get('triggerEvent'); + var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) { + // PENDING + if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) { + indicatorOpt.min = 0; + } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) { + indicatorOpt.max = 0; + } + + var iNameTextStyle = nameTextStyle; + + if (indicatorOpt.color != null) { + iNameTextStyle = zrUtil.defaults({ + color: indicatorOpt.color + }, nameTextStyle); + } // Use same configuration + + + indicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), { + boundaryGap: boundaryGap, + splitNumber: splitNumber, + scale: scale, + axisLine: axisLine, + axisTick: axisTick, + axisType: axisType, + axisLabel: axisLabel, + // Compatible with 2 and use text + name: indicatorOpt.text, + nameLocation: 'end', + nameGap: nameGap, + // min: 0, + nameTextStyle: iNameTextStyle, + triggerEvent: triggerEvent + }, false); + + if (!showName) { + indicatorOpt.name = ''; + } + + if (typeof nameFormatter === 'string') { + var indName = indicatorOpt.name; + indicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : ''); + } else if (typeof nameFormatter === 'function') { + indicatorOpt.name = nameFormatter(indicatorOpt.name, indicatorOpt); + } + + var model = zrUtil.extend(new Model(indicatorOpt, null, this.ecModel), axisModelCommonMixin); // For triggerEvent. + + model.mainType = 'radar'; + model.componentIndex = this.componentIndex; + return model; + }, this); + + this.getIndicatorModels = function () { + return indicatorModels; + }; + }, + defaultOption: { + zlevel: 0, + z: 0, + center: ['50%', '50%'], + radius: '75%', + startAngle: 90, + name: { + show: true // formatter: null + // textStyle: {} + + }, + boundaryGap: [0, 0], + splitNumber: 5, + nameGap: 15, + scale: false, + // Polygon or circle + shape: 'polygon', + axisLine: zrUtil.merge({ + lineStyle: { + color: '#bbb' + } + }, valueAxisDefault.axisLine), + axisLabel: defaultsShow(valueAxisDefault.axisLabel, false), + axisTick: defaultsShow(valueAxisDefault.axisTick, false), + axisType: 'interval', + splitLine: defaultsShow(valueAxisDefault.splitLine, true), + splitArea: defaultsShow(valueAxisDefault.splitArea, true), + // {text, min, max} + indicator: [] + } +}); +var _default = RadarModel; +module.exports = _default; + +/***/ }), + +/***/ "1792": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var coordsOffsetMap = { + '南海诸岛': [32, 80], + // 全国 + '广东': [0, -10], + '香港': [10, 5], + '澳门': [-10, 10], + //'北京': [-10, 0], + '天津': [5, 5] +}; + +function _default(mapType, region) { + if (mapType === 'china') { + var coordFix = coordsOffsetMap[region.name]; + + if (coordFix) { + var cp = region.center; + cp[0] += coordFix[0] / 10.5; + cp[1] += -coordFix[1] / (10.5 / 0.75); + } + } +} + +module.exports = _default; + +/***/ }), + +/***/ "17b8": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var BaseBarSeries = __webpack_require__("3014"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = BaseBarSeries.extend({ + type: 'series.bar', + dependencies: ['grid', 'polar'], + brushSelector: 'rect', + + /** + * @override + */ + getProgressive: function () { + // Do not support progressive in normal mode. + return this.get('large') ? this.get('progressive') : false; + }, + + /** + * @override + */ + getProgressiveThreshold: function () { + // Do not support progressive in normal mode. + var progressiveThreshold = this.get('progressiveThreshold'); + var largeThreshold = this.get('largeThreshold'); + + if (largeThreshold > progressiveThreshold) { + progressiveThreshold = largeThreshold; + } + + return progressiveThreshold; + }, + defaultOption: { + // If clipped + // Only available on cartesian2d + clip: true, + // If use caps on two sides of bars + // Only available on tangential polar bar + roundCap: false, + showBackground: false, + 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 + } + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "17c2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $forEach = __webpack_require__("b727").forEach; +var arrayMethodIsStrict = __webpack_require__("a640"); +var arrayMethodUsesToLength = __webpack_require__("ae40"); + +var STRICT_METHOD = arrayMethodIsStrict('forEach'); +var USES_TO_LENGTH = arrayMethodUsesToLength('forEach'); + +// `Array.prototype.forEach` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.foreach +module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); +} : [].forEach; + + +/***/ }), + +/***/ "17d6": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var env = __webpack_require__("22d1"); + +var _model = __webpack_require__("e0d3"); + +var makeInner = _model.makeInner; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var inner = makeInner(); +var each = zrUtil.each; +/** + * @param {string} key + * @param {module:echarts/ExtensionAPI} api + * @param {Function} handler + * param: {string} currTrigger + * param: {Array.} point + */ + +function register(key, api, handler) { + if (env.node) { + return; + } + + var zr = api.getZr(); + inner(zr).records || (inner(zr).records = {}); + initGlobalListeners(zr, api); + var record = inner(zr).records[key] || (inner(zr).records[key] = {}); + record.handler = handler; +} + +function initGlobalListeners(zr, api) { + if (inner(zr).initialized) { + return; + } + + inner(zr).initialized = true; + useHandler('click', zrUtil.curry(doEnter, 'click')); + useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove')); // useHandler('mouseout', onLeave); + + useHandler('globalout', onLeave); + + function useHandler(eventType, cb) { + zr.on(eventType, function (e) { + var dis = makeDispatchAction(api); + each(inner(zr).records, function (record) { + record && cb(record, e, dis.dispatchAction); + }); + dispatchTooltipFinally(dis.pendings, api); + }); + } +} + +function dispatchTooltipFinally(pendings, api) { + var showLen = pendings.showTip.length; + var hideLen = pendings.hideTip.length; + var actuallyPayload; + + if (showLen) { + actuallyPayload = pendings.showTip[showLen - 1]; + } else if (hideLen) { + actuallyPayload = pendings.hideTip[hideLen - 1]; + } + + if (actuallyPayload) { + actuallyPayload.dispatchAction = null; + api.dispatchAction(actuallyPayload); + } +} + +function onLeave(record, e, dispatchAction) { + record.handler('leave', null, dispatchAction); +} + +function doEnter(currTrigger, record, e, dispatchAction) { + record.handler(currTrigger, e, dispatchAction); +} + +function makeDispatchAction(api) { + var pendings = { + showTip: [], + hideTip: [] + }; // FIXME + // better approach? + // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip, + // which may be conflict, (axisPointer call showTip but tooltip call hideTip); + // So we have to add "final stage" to merge those dispatched actions. + + var dispatchAction = function (payload) { + var pendingList = pendings[payload.type]; + + if (pendingList) { + pendingList.push(payload); + } else { + payload.dispatchAction = dispatchAction; + api.dispatchAction(payload); + } + }; + + return { + dispatchAction: dispatchAction, + pendings: pendings + }; +} +/** + * @param {string} key + * @param {module:echarts/ExtensionAPI} api + */ + + +function unregister(key, api) { + if (env.node) { + return; + } + + var zr = api.getZr(); + var record = (inner(zr).records || {})[key]; + + if (record) { + inner(zr).records[key] = null; + } +} + +exports.register = register; +exports.unregister = unregister; + +/***/ }), + +/***/ "18c0": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Scale = __webpack_require__("e0d8"); + +var OrdinalMeta = __webpack_require__("8e43"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Linear continuous scale + * @module echarts/coord/scale/Ordinal + * + * http://en.wikipedia.org/wiki/Level_of_measurement + */ +// FIXME only one data +var scaleProto = Scale.prototype; +var OrdinalScale = Scale.extend({ + type: 'ordinal', + + /** + * @param {module:echarts/data/OrdianlMeta|Array.} ordinalMeta + */ + init: function (ordinalMeta, extent) { + // Caution: Should not use instanceof, consider ec-extensions using + // import approach to get OrdinalMeta class. + if (!ordinalMeta || zrUtil.isArray(ordinalMeta)) { + ordinalMeta = new OrdinalMeta({ + categories: ordinalMeta + }); + } + + this._ordinalMeta = ordinalMeta; + this._extent = extent || [0, ordinalMeta.categories.length - 1]; + }, + parse: function (val) { + return typeof val === 'string' ? this._ordinalMeta.getOrdinal(val) // val might be float. + : Math.round(val); + }, + contain: function (rank) { + rank = this.parse(rank); + return scaleProto.contain.call(this, rank) && this._ordinalMeta.categories[rank] != null; + }, + + /** + * Normalize given rank or name to linear [0, 1] + * @param {number|string} [val] + * @return {number} + */ + normalize: function (val) { + return scaleProto.normalize.call(this, this.parse(val)); + }, + scale: function (val) { + return Math.round(scaleProto.scale.call(this, val)); + }, + + /** + * @return {Array} + */ + getTicks: function () { + var ticks = []; + var extent = this._extent; + var rank = extent[0]; + + while (rank <= extent[1]) { + ticks.push(rank); + rank++; + } + + return ticks; + }, + + /** + * Get item on rank n + * @param {number} n + * @return {string} + */ + getLabel: function (n) { + if (!this.isBlank()) { + // Note that if no data, ordinalMeta.categories is an empty array. + return this._ordinalMeta.categories[n]; + } + }, + + /** + * @return {number} + */ + count: function () { + return this._extent[1] - this._extent[0] + 1; + }, + + /** + * @override + */ + unionExtentFromData: function (data, dim) { + this.unionExtent(data.getApproximateExtent(dim)); + }, + getOrdinalMeta: function () { + return this._ordinalMeta; + }, + niceTicks: zrUtil.noop, + niceExtent: zrUtil.noop +}); +/** + * @return {module:echarts/scale/Time} + */ + +OrdinalScale.create = function () { + return new OrdinalScale(); +}; + +var _default = OrdinalScale; +module.exports = _default; + +/***/ }), + +/***/ "1953": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var MarkerModel = __webpack_require__("2449"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = MarkerModel.extend({ + type: 'markLine', + defaultOption: { + zlevel: 0, + z: 5, + symbol: ['circle', 'arrow'], + symbolSize: [8, 16], + //symbolRotate: 0, + precision: 2, + tooltip: { + trigger: 'item' + }, + label: { + show: true, + position: 'end', + distance: 5 + }, + lineStyle: { + type: 'dashed' + }, + emphasis: { + label: { + show: true + }, + lineStyle: { + width: 3 + } + }, + animationEasing: 'linear' + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "19aa": +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name) { + if (!(it instanceof Constructor)) { + throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); + } return it; +}; + + +/***/ }), + +/***/ "19e2": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var ChartView = __webpack_require__("e887"); + +var graphic = __webpack_require__("2306"); + +var Path = __webpack_require__("cbe5"); + +var _createClipPathFromCoordSys = __webpack_require__("b0af"); + +var createClipPath = _createClipPathFromCoordSys.createClipPath; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var NORMAL_ITEM_STYLE_PATH = ['itemStyle']; +var EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle']; +var SKIP_PROPS = ['color', 'color0', 'borderColor', 'borderColor0']; +var CandlestickView = ChartView.extend({ + type: 'candlestick', + render: function (seriesModel, ecModel, api) { + // If there is clipPath created in large mode. Remove it. + this.group.removeClipPath(); + + this._updateDrawMode(seriesModel); + + this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel); + }, + incrementalPrepareRender: function (seriesModel, ecModel, api) { + this._clear(); + + this._updateDrawMode(seriesModel); + }, + incrementalRender: function (params, seriesModel, ecModel, api) { + this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel); + }, + _updateDrawMode: function (seriesModel) { + var isLargeDraw = seriesModel.pipelineContext.large; + + if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) { + this._isLargeDraw = isLargeDraw; + + this._clear(); + } + }, + _renderNormal: function (seriesModel) { + var data = seriesModel.getData(); + var oldData = this._data; + var group = this.group; + var isSimpleBox = data.getLayout('isSimpleBox'); + var needsClip = seriesModel.get('clip', true); + var coord = seriesModel.coordinateSystem; + var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from + // stream mode to normal mode, where previous elements should be removed. + + if (!this._data) { + group.removeAll(); + } + + data.diff(oldData).add(function (newIdx) { + if (data.hasValue(newIdx)) { + var el; + var itemLayout = data.getItemLayout(newIdx); + + if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { + return; + } + + el = createNormalBox(itemLayout, newIdx, true); + graphic.initProps(el, { + shape: { + points: itemLayout.ends + } + }, seriesModel, newIdx); + setBoxCommon(el, data, newIdx, isSimpleBox); + group.add(el); + data.setItemGraphicEl(newIdx, el); + } + }).update(function (newIdx, oldIdx) { + var el = oldData.getItemGraphicEl(oldIdx); // Empty data + + if (!data.hasValue(newIdx)) { + group.remove(el); + return; + } + + var itemLayout = data.getItemLayout(newIdx); + + if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { + group.remove(el); + return; + } + + if (!el) { + el = createNormalBox(itemLayout, newIdx); + } else { + graphic.updateProps(el, { + shape: { + points: itemLayout.ends + } + }, seriesModel, newIdx); + } + + setBoxCommon(el, data, newIdx, isSimpleBox); + group.add(el); + data.setItemGraphicEl(newIdx, el); + }).remove(function (oldIdx) { + var el = oldData.getItemGraphicEl(oldIdx); + el && group.remove(el); + }).execute(); + this._data = data; + }, + _renderLarge: function (seriesModel) { + this._clear(); + + createLarge(seriesModel, this.group); + var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null; + + if (clipPath) { + this.group.setClipPath(clipPath); + } else { + this.group.removeClipPath(); + } + }, + _incrementalRenderNormal: function (params, seriesModel) { + var data = seriesModel.getData(); + var isSimpleBox = data.getLayout('isSimpleBox'); + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var el; + var itemLayout = data.getItemLayout(dataIndex); + el = createNormalBox(itemLayout, dataIndex); + setBoxCommon(el, data, dataIndex, isSimpleBox); + el.incremental = true; + this.group.add(el); + } + }, + _incrementalRenderLarge: function (params, seriesModel) { + createLarge(seriesModel, this.group, true); + }, + remove: function (ecModel) { + this._clear(); + }, + _clear: function () { + this.group.removeAll(); + this._data = null; + }, + dispose: zrUtil.noop +}); +var NormalBoxPath = Path.extend({ + type: 'normalCandlestickBox', + shape: {}, + buildPath: function (ctx, shape) { + var ends = shape.points; + + if (this.__simpleBox) { + ctx.moveTo(ends[4][0], ends[4][1]); + ctx.lineTo(ends[6][0], ends[6][1]); + } else { + ctx.moveTo(ends[0][0], ends[0][1]); + ctx.lineTo(ends[1][0], ends[1][1]); + ctx.lineTo(ends[2][0], ends[2][1]); + ctx.lineTo(ends[3][0], ends[3][1]); + ctx.closePath(); + ctx.moveTo(ends[4][0], ends[4][1]); + ctx.lineTo(ends[5][0], ends[5][1]); + ctx.moveTo(ends[6][0], ends[6][1]); + ctx.lineTo(ends[7][0], ends[7][1]); + } + } +}); + +function createNormalBox(itemLayout, dataIndex, isInit) { + var ends = itemLayout.ends; + return new NormalBoxPath({ + shape: { + points: isInit ? transInit(ends, itemLayout) : ends + }, + z2: 100 + }); +} + +function isNormalBoxClipped(clipArea, itemLayout) { + var clipped = true; + + for (var i = 0; i < itemLayout.ends.length; i++) { + // If any point are in the region. + if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) { + clipped = false; + break; + } + } + + return clipped; +} + +function setBoxCommon(el, data, dataIndex, isSimpleBox) { + var itemModel = data.getItemModel(dataIndex); + var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH); + var color = data.getItemVisual(dataIndex, 'color'); + var borderColor = data.getItemVisual(dataIndex, 'borderColor') || color; // Color must be excluded. + // Because symbol provide setColor individually to set fill and stroke + + var itemStyle = normalItemStyleModel.getItemStyle(SKIP_PROPS); + el.useStyle(itemStyle); + el.style.strokeNoScale = true; + el.style.fill = color; + el.style.stroke = borderColor; + el.__simpleBox = isSimpleBox; + var hoverStyle = itemModel.getModel(EMPHASIS_ITEM_STYLE_PATH).getItemStyle(); + graphic.setHoverStyle(el, hoverStyle); +} + +function transInit(points, itemLayout) { + return zrUtil.map(points, function (point) { + point = point.slice(); + point[1] = itemLayout.initBaseline; + return point; + }); +} + +var LargeBoxPath = Path.extend({ + type: 'largeCandlestickBox', + shape: {}, + buildPath: function (ctx, shape) { + // Drawing lines is more efficient than drawing + // a whole line or drawing rects. + var points = shape.points; + + for (var i = 0; i < points.length;) { + if (this.__sign === points[i++]) { + var x = points[i++]; + ctx.moveTo(x, points[i++]); + ctx.lineTo(x, points[i++]); + } else { + i += 3; + } + } + } +}); + +function createLarge(seriesModel, group, incremental) { + var data = seriesModel.getData(); + var largePoints = data.getLayout('largePoints'); + var elP = new LargeBoxPath({ + shape: { + points: largePoints + }, + __sign: 1 + }); + group.add(elP); + var elN = new LargeBoxPath({ + shape: { + points: largePoints + }, + __sign: -1 + }); + group.add(elN); + setLargeStyle(1, elP, seriesModel, data); + setLargeStyle(-1, elN, seriesModel, data); + + if (incremental) { + elP.incremental = true; + elN.incremental = true; + } +} + +function setLargeStyle(sign, el, seriesModel, data) { + var suffix = sign > 0 ? 'P' : 'N'; + var borderColor = data.getVisual('borderColor' + suffix) || data.getVisual('color' + suffix); // Color must be excluded. + // Because symbol provide setColor individually to set fill and stroke + + var itemStyle = seriesModel.getModel(NORMAL_ITEM_STYLE_PATH).getItemStyle(SKIP_PROPS); + el.useStyle(itemStyle); + el.style.fill = null; + el.style.stroke = borderColor; // No different + // el.style.lineWidth = .5; +} + +var _default = CandlestickView; +module.exports = _default; + +/***/ }), + +/***/ "19eb": +/***/ (function(module, exports, __webpack_require__) { + +var zrUtil = __webpack_require__("6d8b"); + +var Style = __webpack_require__("2b61"); + +var Element = __webpack_require__("d5b7"); + +var RectText = __webpack_require__("9e2e"); + +/** + * Base class of all displayable graphic objects + * @module zrender/graphic/Displayable + */ + +/** + * @alias module:zrender/graphic/Displayable + * @extends module:zrender/Element + * @extends module:zrender/graphic/mixin/RectText + */ +function Displayable(opts) { + opts = opts || {}; + Element.call(this, opts); // Extend properties + + for (var name in opts) { + if (opts.hasOwnProperty(name) && name !== 'style') { + this[name] = opts[name]; + } + } + /** + * @type {module:zrender/graphic/Style} + */ + + + this.style = new Style(opts.style, this); + this._rect = null; // Shapes for cascade clipping. + // Can only be `null`/`undefined` or an non-empty array, MUST NOT be an empty array. + // because it is easy to only using null to check whether clipPaths changed. + + this.__clipPaths = null; // FIXME Stateful must be mixined after style is setted + // Stateful.call(this, opts); +} + +Displayable.prototype = { + constructor: Displayable, + type: 'displayable', + + /** + * Dirty flag. From which painter will determine if this displayable object needs brush. + * @name module:zrender/graphic/Displayable#__dirty + * @type {boolean} + */ + __dirty: true, + + /** + * Whether the displayable object is visible. when it is true, the displayable object + * is not drawn, but the mouse event can still trigger the object. + * @name module:/zrender/graphic/Displayable#invisible + * @type {boolean} + * @default false + */ + invisible: false, + + /** + * @name module:/zrender/graphic/Displayable#z + * @type {number} + * @default 0 + */ + z: 0, + + /** + * @name module:/zrender/graphic/Displayable#z + * @type {number} + * @default 0 + */ + z2: 0, + + /** + * The z level determines the displayable object can be drawn in which layer canvas. + * @name module:/zrender/graphic/Displayable#zlevel + * @type {number} + * @default 0 + */ + zlevel: 0, + + /** + * Whether it can be dragged. + * @name module:/zrender/graphic/Displayable#draggable + * @type {boolean} + * @default false + */ + draggable: false, + + /** + * Whether is it dragging. + * @name module:/zrender/graphic/Displayable#draggable + * @type {boolean} + * @default false + */ + dragging: false, + + /** + * Whether to respond to mouse events. + * @name module:/zrender/graphic/Displayable#silent + * @type {boolean} + * @default false + */ + silent: false, + + /** + * If enable culling + * @type {boolean} + * @default false + */ + culling: false, + + /** + * Mouse cursor when hovered + * @name module:/zrender/graphic/Displayable#cursor + * @type {string} + */ + cursor: 'pointer', + + /** + * If hover area is bounding rect + * @name module:/zrender/graphic/Displayable#rectHover + * @type {string} + */ + rectHover: false, + + /** + * Render the element progressively when the value >= 0, + * usefull for large data. + * @type {boolean} + */ + progressive: false, + + /** + * @type {boolean} + */ + incremental: false, + + /** + * Scale ratio for global scale. + * @type {boolean} + */ + globalScaleRatio: 1, + beforeBrush: function (ctx) {}, + afterBrush: function (ctx) {}, + + /** + * Graphic drawing method. + * @param {CanvasRenderingContext2D} ctx + */ + // Interface + brush: function (ctx, prevEl) {}, + + /** + * Get the minimum bounding box. + * @return {module:zrender/core/BoundingRect} + */ + // Interface + getBoundingRect: function () {}, + + /** + * If displayable element contain coord x, y + * @param {number} x + * @param {number} y + * @return {boolean} + */ + contain: function (x, y) { + return this.rectContain(x, y); + }, + + /** + * @param {Function} cb + * @param {} context + */ + traverse: function (cb, context) { + cb.call(context, this); + }, + + /** + * If bounding rect of element contain coord x, y + * @param {number} x + * @param {number} y + * @return {boolean} + */ + rectContain: function (x, y) { + var coord = this.transformCoordToLocal(x, y); + var rect = this.getBoundingRect(); + return rect.contain(coord[0], coord[1]); + }, + + /** + * Mark displayable element dirty and refresh next frame + */ + dirty: function () { + this.__dirty = this.__dirtyText = true; + this._rect = null; + this.__zr && this.__zr.refresh(); + }, + + /** + * If displayable object binded any event + * @return {boolean} + */ + // TODO, events bound by bind + // isSilent: function () { + // return !( + // this.hoverable || this.draggable + // || this.onmousemove || this.onmouseover || this.onmouseout + // || this.onmousedown || this.onmouseup || this.onclick + // || this.ondragenter || this.ondragover || this.ondragleave + // || this.ondrop + // ); + // }, + + /** + * Alias for animate('style') + * @param {boolean} loop + */ + animateStyle: function (loop) { + return this.animate('style', loop); + }, + attrKV: function (key, value) { + if (key !== 'style') { + Element.prototype.attrKV.call(this, key, value); + } else { + this.style.set(value); + } + }, + + /** + * @param {Object|string} key + * @param {*} value + */ + setStyle: function (key, value) { + this.style.set(key, value); + this.dirty(false); + return this; + }, + + /** + * Use given style object + * @param {Object} obj + */ + useStyle: function (obj) { + this.style = new Style(obj, this); + this.dirty(false); + return this; + }, + + /** + * The string value of `textPosition` needs to be calculated to a real postion. + * For example, `'inside'` is calculated to `[rect.width/2, rect.height/2]` + * by default. See `contain/text.js#calculateTextPosition` for more details. + * But some coutom shapes like "pin", "flag" have center that is not exactly + * `[width/2, height/2]`. So we provide this hook to customize the calculation + * for those shapes. It will be called if the `style.textPosition` is a string. + * @param {Obejct} [out] Prepared out object. If not provided, this method should + * be responsible for creating one. + * @param {module:zrender/graphic/Style} style + * @param {Object} rect {x, y, width, height} + * @return {Obejct} out The same as the input out. + * { + * x: number. mandatory. + * y: number. mandatory. + * textAlign: string. optional. use style.textAlign by default. + * textVerticalAlign: string. optional. use style.textVerticalAlign by default. + * } + */ + calculateTextPosition: null +}; +zrUtil.inherits(Displayable, Element); +zrUtil.mixin(Displayable, RectText); // zrUtil.mixin(Displayable, Stateful); + +var _default = Displayable; +module.exports = _default; + +/***/ }), + +/***/ "1ab3": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var graphic = __webpack_require__("2306"); + +var ChartView = __webpack_require__("e887"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @param {module:echarts/model/Series} seriesModel + * @param {boolean} hasAnimation + * @inner + */ +function updateDataSelected(uid, seriesModel, hasAnimation, api) { + var data = seriesModel.getData(); + var dataIndex = this.dataIndex; + var name = data.getName(dataIndex); + var selectedOffset = seriesModel.get('selectedOffset'); + api.dispatchAction({ + type: 'pieToggleSelect', + from: uid, + name: name, + seriesId: seriesModel.id + }); + data.each(function (idx) { + toggleItemSelected(data.getItemGraphicEl(idx), data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), selectedOffset, hasAnimation); + }); +} +/** + * @param {module:zrender/graphic/Sector} el + * @param {Object} layout + * @param {boolean} isSelected + * @param {number} selectedOffset + * @param {boolean} hasAnimation + * @inner + */ + + +function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) { + var midAngle = (layout.startAngle + layout.endAngle) / 2; + var dx = Math.cos(midAngle); + var dy = Math.sin(midAngle); + var offset = isSelected ? selectedOffset : 0; + var position = [dx * offset, dy * offset]; + hasAnimation // animateTo will stop revious animation like update transition + ? el.animate().when(200, { + position: position + }).start('bounceOut') : el.attr('position', position); +} +/** + * Piece of pie including Sector, Label, LabelLine + * @constructor + * @extends {module:zrender/graphic/Group} + */ + + +function PiePiece(data, idx) { + graphic.Group.call(this); + var sector = new graphic.Sector({ + z2: 2 + }); + var polyline = new graphic.Polyline(); + var text = new graphic.Text(); + this.add(sector); + this.add(polyline); + this.add(text); + this.updateData(data, idx, true); +} + +var piePieceProto = PiePiece.prototype; + +piePieceProto.updateData = function (data, idx, firstCreate) { + var sector = this.childAt(0); + var labelLine = this.childAt(1); + var labelText = this.childAt(2); + var seriesModel = data.hostModel; + var itemModel = data.getItemModel(idx); + var layout = data.getItemLayout(idx); + var sectorShape = zrUtil.extend({}, layout); + sectorShape.label = null; + var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate'); + + if (firstCreate) { + sector.setShape(sectorShape); + var animationType = seriesModel.getShallow('animationType'); + + if (animationType === 'scale') { + sector.shape.r = layout.r0; + graphic.initProps(sector, { + shape: { + r: layout.r + } + }, seriesModel, idx); + } // Expansion + else { + sector.shape.endAngle = layout.startAngle; + graphic.updateProps(sector, { + shape: { + endAngle: layout.endAngle + } + }, seriesModel, idx); + } + } else { + if (animationTypeUpdate === 'expansion') { + // Sectors are set to be target shape and an overlaying clipPath is used for animation + sector.setShape(sectorShape); + } else { + // Transition animation from the old shape + graphic.updateProps(sector, { + shape: sectorShape + }, seriesModel, idx); + } + } // Update common style + + + var visualColor = data.getItemVisual(idx, 'color'); + sector.useStyle(zrUtil.defaults({ + lineJoin: 'bevel', + fill: visualColor + }, itemModel.getModel('itemStyle').getItemStyle())); + sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle(); + var cursorStyle = itemModel.getShallow('cursor'); + cursorStyle && sector.attr('cursor', cursorStyle); // Toggle selected + + toggleItemSelected(this, data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), seriesModel.get('selectedOffset'), seriesModel.get('animation')); // Label and text animation should be applied only for transition type animation when update + + var withAnimation = !firstCreate && animationTypeUpdate === 'transition'; + + this._updateLabel(data, idx, withAnimation); + + this.highDownOnUpdate = !seriesModel.get('silent') ? function (fromState, toState) { + var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation'); + + if (toState === 'emphasis') { + labelLine.ignore = labelLine.hoverIgnore; + labelText.ignore = labelText.hoverIgnore; // Sector may has animation of updating data. Force to move to the last frame + // Or it may stopped on the wrong shape + + if (hasAnimation) { + sector.stopAnimation(true); + sector.animateTo({ + shape: { + r: layout.r + seriesModel.get('hoverOffset') + } + }, 300, 'elasticOut'); + } + } else { + labelLine.ignore = labelLine.normalIgnore; + labelText.ignore = labelText.normalIgnore; + + if (hasAnimation) { + sector.stopAnimation(true); + sector.animateTo({ + shape: { + r: layout.r + } + }, 300, 'elasticOut'); + } + } + } : null; + graphic.setHoverStyle(this); +}; + +piePieceProto._updateLabel = function (data, idx, withAnimation) { + var labelLine = this.childAt(1); + var labelText = this.childAt(2); + var seriesModel = data.hostModel; + var itemModel = data.getItemModel(idx); + var layout = data.getItemLayout(idx); + var labelLayout = layout.label; + var visualColor = data.getItemVisual(idx, 'color'); + + if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) { + labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore = labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true; + return; + } + + var targetLineShape = { + points: labelLayout.linePoints || [[labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]] + }; + var targetTextStyle = { + x: labelLayout.x, + y: labelLayout.y + }; + + if (withAnimation) { + graphic.updateProps(labelLine, { + shape: targetLineShape + }, seriesModel, idx); + graphic.updateProps(labelText, { + style: targetTextStyle + }, seriesModel, idx); + } else { + labelLine.attr({ + shape: targetLineShape + }); + labelText.attr({ + style: targetTextStyle + }); + } + + labelText.attr({ + rotation: labelLayout.rotation, + origin: [labelLayout.x, labelLayout.y], + z2: 10 + }); + var labelModel = itemModel.getModel('label'); + var labelHoverModel = itemModel.getModel('emphasis.label'); + var labelLineModel = itemModel.getModel('labelLine'); + var labelLineHoverModel = itemModel.getModel('emphasis.labelLine'); + var visualColor = data.getItemVisual(idx, 'color'); + graphic.setLabelStyle(labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel, { + labelFetcher: data.hostModel, + labelDataIndex: idx, + defaultText: labelLayout.text, + autoColor: visualColor, + useInsideStyle: !!labelLayout.inside + }, { + textAlign: labelLayout.textAlign, + textVerticalAlign: labelLayout.verticalAlign, + opacity: data.getItemVisual(idx, 'opacity') + }); + labelText.ignore = labelText.normalIgnore = !labelModel.get('show'); + labelText.hoverIgnore = !labelHoverModel.get('show'); + labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show'); + labelLine.hoverIgnore = !labelLineHoverModel.get('show'); // Default use item visual color + + labelLine.setStyle({ + stroke: visualColor, + opacity: data.getItemVisual(idx, 'opacity') + }); + labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle()); + labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle(); + var smooth = labelLineModel.get('smooth'); + + if (smooth && smooth === true) { + smooth = 0.4; + } + + labelLine.setShape({ + smooth: smooth + }); +}; + +zrUtil.inherits(PiePiece, graphic.Group); // Pie view + +var PieView = ChartView.extend({ + type: 'pie', + init: function () { + var sectorGroup = new graphic.Group(); + this._sectorGroup = sectorGroup; + }, + render: function (seriesModel, ecModel, api, payload) { + if (payload && payload.from === this.uid) { + return; + } + + var data = seriesModel.getData(); + var oldData = this._data; + var group = this.group; + var hasAnimation = ecModel.get('animation'); + var isFirstRender = !oldData; + var animationType = seriesModel.get('animationType'); + var animationTypeUpdate = seriesModel.get('animationTypeUpdate'); + var onSectorClick = zrUtil.curry(updateDataSelected, this.uid, seriesModel, hasAnimation, api); + var selectedMode = seriesModel.get('selectedMode'); + data.diff(oldData).add(function (idx) { + var piePiece = new PiePiece(data, idx); // Default expansion animation + + if (isFirstRender && animationType !== 'scale') { + piePiece.eachChild(function (child) { + child.stopAnimation(true); + }); + } + + selectedMode && piePiece.on('click', onSectorClick); + data.setItemGraphicEl(idx, piePiece); + group.add(piePiece); + }).update(function (newIdx, oldIdx) { + var piePiece = oldData.getItemGraphicEl(oldIdx); + + if (!isFirstRender && animationTypeUpdate !== 'transition') { + piePiece.eachChild(function (child) { + child.stopAnimation(true); + }); + } + + piePiece.updateData(data, newIdx); + piePiece.off('click'); + selectedMode && piePiece.on('click', onSectorClick); + group.add(piePiece); + data.setItemGraphicEl(newIdx, piePiece); + }).remove(function (idx) { + var piePiece = oldData.getItemGraphicEl(idx); + group.remove(piePiece); + }).execute(); + + if (hasAnimation && data.count() > 0 && (isFirstRender ? animationType !== 'scale' : animationTypeUpdate !== 'transition')) { + var shape = data.getItemLayout(0); + + for (var s = 1; isNaN(shape.startAngle) && s < data.count(); ++s) { + shape = data.getItemLayout(s); + } + + var r = Math.max(api.getWidth(), api.getHeight()) / 2; + var removeClipPath = zrUtil.bind(group.removeClipPath, group); + group.setClipPath(this._createClipPath(shape.cx, shape.cy, r, shape.startAngle, shape.clockwise, removeClipPath, seriesModel, isFirstRender)); + } else { + // clipPath is used in first-time animation, so remove it when otherwise. See: #8994 + group.removeClipPath(); + } + + this._data = data; + }, + dispose: function () {}, + _createClipPath: function (cx, cy, r, startAngle, clockwise, cb, seriesModel, isFirstRender) { + var clipPath = new graphic.Sector({ + shape: { + cx: cx, + cy: cy, + r0: 0, + r: r, + startAngle: startAngle, + endAngle: startAngle, + clockwise: clockwise + } + }); + var initOrUpdate = isFirstRender ? graphic.initProps : graphic.updateProps; + initOrUpdate(clipPath, { + shape: { + endAngle: startAngle + (clockwise ? 1 : -1) * Math.PI * 2 + } + }, seriesModel, cb); + return clipPath; + }, + + /** + * @implement + */ + containPoint: function (point, seriesModel) { + var data = seriesModel.getData(); + var itemLayout = data.getItemLayout(0); + + if (itemLayout) { + var dx = point[0] - itemLayout.cx; + var dy = point[1] - itemLayout.cy; + var radius = Math.sqrt(dx * dx + dy * dy); + return radius <= itemLayout.r && radius >= itemLayout.r0; + } + } +}); +var _default = PieView; +module.exports = _default; + +/***/ }), + +/***/ "1be4": +/***/ (function(module, exports, __webpack_require__) { + +var getBuiltIn = __webpack_require__("d066"); + +module.exports = getBuiltIn('document', 'documentElement'); + + +/***/ }), + +/***/ "1c0b": +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; +}; + + +/***/ }), + +/***/ "1c5f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var vec2 = __webpack_require__("401b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function simpleLayout(seriesModel) { + var coordSys = seriesModel.coordinateSystem; + + if (coordSys && coordSys.type !== 'view') { + return; + } + + var graph = seriesModel.getGraph(); + graph.eachNode(function (node) { + var model = node.getModel(); + node.setLayout([+model.get('x'), +model.get('y')]); + }); + simpleLayoutEdge(graph); +} + +function simpleLayoutEdge(graph) { + graph.eachEdge(function (edge) { + var curveness = edge.getModel().get('lineStyle.curveness') || 0; + var p1 = vec2.clone(edge.node1.getLayout()); + var p2 = vec2.clone(edge.node2.getLayout()); + var points = [p1, p2]; + + if (+curveness) { + points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]); + } + + edge.setLayout(points); + }); +} + +exports.simpleLayout = simpleLayout; +exports.simpleLayoutEdge = simpleLayoutEdge; + +/***/ }), + +/***/ "1c7e": +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__("b622"); + +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; + +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + // eslint-disable-next-line no-throw-literal + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } + +module.exports = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; +}; + + +/***/ }), + +/***/ "1ccf": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var zrUtil = __webpack_require__("6d8b"); + +var Polar = __webpack_require__("fd27"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _axisHelper = __webpack_require__("697e"); + +var createScaleByModel = _axisHelper.createScaleByModel; +var niceScaleExtent = _axisHelper.niceScaleExtent; + +var CoordinateSystem = __webpack_require__("2039"); + +var _dataStackHelper = __webpack_require__("ee1a"); + +var getStackedDimension = _dataStackHelper.getStackedDimension; + +__webpack_require__("78f0"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO Axis scale + +/** + * Resize method bound to the polar + * @param {module:echarts/coord/polar/PolarModel} polarModel + * @param {module:echarts/ExtensionAPI} api + */ +function resizePolar(polar, polarModel, api) { + var center = polarModel.get('center'); + var width = api.getWidth(); + var height = api.getHeight(); + polar.cx = parsePercent(center[0], width); + polar.cy = parsePercent(center[1], height); + var radiusAxis = polar.getRadiusAxis(); + var size = Math.min(width, height) / 2; + var radius = polarModel.get('radius'); + + if (radius == null) { + radius = [0, '100%']; + } else if (!zrUtil.isArray(radius)) { + // r0 = 0 + radius = [0, radius]; + } + + radius = [parsePercent(radius[0], size), parsePercent(radius[1], size)]; + radiusAxis.inverse ? radiusAxis.setExtent(radius[1], radius[0]) : radiusAxis.setExtent(radius[0], radius[1]); +} +/** + * Update polar + */ + + +function updatePolarScale(ecModel, api) { + var polar = this; + var angleAxis = polar.getAngleAxis(); + var radiusAxis = polar.getRadiusAxis(); // Reset scale + + angleAxis.scale.setExtent(Infinity, -Infinity); + radiusAxis.scale.setExtent(Infinity, -Infinity); + ecModel.eachSeries(function (seriesModel) { + if (seriesModel.coordinateSystem === polar) { + var data = seriesModel.getData(); + zrUtil.each(data.mapDimension('radius', true), function (dim) { + radiusAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim)); + }); + zrUtil.each(data.mapDimension('angle', true), function (dim) { + angleAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim)); + }); + } + }); + niceScaleExtent(angleAxis.scale, angleAxis.model); + niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis + + if (angleAxis.type === 'category' && !angleAxis.onBand) { + var extent = angleAxis.getExtent(); + var diff = 360 / angleAxis.scale.count(); + angleAxis.inverse ? extent[1] += diff : extent[1] -= diff; + angleAxis.setExtent(extent[0], extent[1]); + } +} +/** + * Set common axis properties + * @param {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis} + * @param {module:echarts/coord/polar/AxisModel} + * @inner + */ + + +function setAxis(axis, axisModel) { + axis.type = axisModel.get('type'); + axis.scale = createScaleByModel(axisModel); + axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category'; + axis.inverse = axisModel.get('inverse'); + + if (axisModel.mainType === 'angleAxis') { + axis.inverse ^= axisModel.get('clockwise'); + var startAngle = axisModel.get('startAngle'); + axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360)); + } // Inject axis instance + + + axisModel.axis = axis; + axis.model = axisModel; +} + +var polarCreator = { + dimensions: Polar.prototype.dimensions, + create: function (ecModel, api) { + var polarList = []; + ecModel.eachComponent('polar', function (polarModel, idx) { + var polar = new Polar(idx); // Inject resize and update method + + polar.update = updatePolarScale; + var radiusAxis = polar.getRadiusAxis(); + var angleAxis = polar.getAngleAxis(); + var radiusAxisModel = polarModel.findAxisModel('radiusAxis'); + var angleAxisModel = polarModel.findAxisModel('angleAxis'); + setAxis(radiusAxis, radiusAxisModel); + setAxis(angleAxis, angleAxisModel); + resizePolar(polar, polarModel, api); + polarList.push(polar); + polarModel.coordinateSystem = polar; + polar.model = polarModel; + }); // Inject coordinateSystem to series + + ecModel.eachSeries(function (seriesModel) { + if (seriesModel.get('coordinateSystem') === 'polar') { + var polarModel = ecModel.queryComponents({ + mainType: 'polar', + index: seriesModel.get('polarIndex'), + id: seriesModel.get('polarId') + })[0]; + seriesModel.coordinateSystem = polarModel.coordinateSystem; + } + }); + return polarList; + } +}; +CoordinateSystem.register('polar', polarCreator); + +/***/ }), + +/***/ "1cdc": +/***/ (function(module, exports, __webpack_require__) { + +var userAgent = __webpack_require__("342f"); + +module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent); + + +/***/ }), + +/***/ "1d80": +/***/ (function(module, exports) { + +// `RequireObjectCoercible` abstract operation +// https://tc39.github.io/ecma262/#sec-requireobjectcoercible +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ "1dde": +/***/ (function(module, exports, __webpack_require__) { + +var fails = __webpack_require__("d039"); +var wellKnownSymbol = __webpack_require__("b622"); +var V8_VERSION = __webpack_require__("2d00"); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; + + +/***/ }), + +/***/ "1e32": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; + +var _dataStackHelper = __webpack_require__("ee1a"); + +var isDimensionStacked = _dataStackHelper.isDimensionStacked; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function getSeriesStackId(seriesModel) { + return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex; +} + +function getAxisKey(polar, axis) { + return axis.dim + polar.model.componentIndex; +} +/** + * @param {string} seriesType + * @param {module:echarts/model/Global} ecModel + * @param {module:echarts/ExtensionAPI} api + */ + + +function barLayoutPolar(seriesType, ecModel, api) { + var lastStackCoords = {}; + var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) { + return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar'; + })); + ecModel.eachSeriesByType(seriesType, function (seriesModel) { + // Check series coordinate, do layout for polar only + if (seriesModel.coordinateSystem.type !== 'polar') { + return; + } + + var data = seriesModel.getData(); + var polar = seriesModel.coordinateSystem; + var baseAxis = polar.getBaseAxis(); + var axisKey = getAxisKey(polar, baseAxis); + var stackId = getSeriesStackId(seriesModel); + var columnLayoutInfo = barWidthAndOffset[axisKey][stackId]; + var columnOffset = columnLayoutInfo.offset; + var columnWidth = columnLayoutInfo.width; + var valueAxis = polar.getOtherAxis(baseAxis); + var cx = seriesModel.coordinateSystem.cx; + var cy = seriesModel.coordinateSystem.cy; + var barMinHeight = seriesModel.get('barMinHeight') || 0; + var barMinAngle = seriesModel.get('barMinAngle') || 0; + lastStackCoords[stackId] = lastStackCoords[stackId] || []; + var valueDim = data.mapDimension(valueAxis.dim); + var baseDim = data.mapDimension(baseAxis.dim); + var stacked = isDimensionStacked(data, valueDim + /*, baseDim*/ + ); + var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true); + var valueAxisStart = valueAxis.getExtent()[0]; + + for (var idx = 0, len = data.count(); idx < len; idx++) { + var value = data.get(valueDim, idx); + var baseValue = data.get(baseDim, idx); + var sign = value >= 0 ? 'p' : 'n'; + var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in + // stackResultDimension directly. + // Only ordinal axis can be stacked. + + if (stacked) { + if (!lastStackCoords[stackId][baseValue]) { + lastStackCoords[stackId][baseValue] = { + p: valueAxisStart, + // Positive stack + n: valueAxisStart // Negative stack + + }; + } // Should also consider #4243 + + + baseCoord = lastStackCoords[stackId][baseValue][sign]; + } + + var r0; + var r; + var startAngle; + var endAngle; // radial sector + + if (valueAxis.dim === 'radius') { + var radiusSpan = valueAxis.dataToRadius(value) - valueAxisStart; + var angle = baseAxis.dataToAngle(baseValue); + + if (Math.abs(radiusSpan) < barMinHeight) { + radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight; + } + + r0 = baseCoord; + r = baseCoord + radiusSpan; + startAngle = angle - columnOffset; + endAngle = startAngle - columnWidth; + stacked && (lastStackCoords[stackId][baseValue][sign] = r); + } // tangential sector + else { + var angleSpan = valueAxis.dataToAngle(value, clampLayout) - valueAxisStart; + var radius = baseAxis.dataToRadius(baseValue); + + if (Math.abs(angleSpan) < barMinAngle) { + angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle; + } + + r0 = radius + columnOffset; + r = r0 + columnWidth; + startAngle = baseCoord; + endAngle = baseCoord + angleSpan; // if the previous stack is at the end of the ring, + // add a round to differentiate it from origin + // var extent = angleAxis.getExtent(); + // var stackCoord = angle; + // if (stackCoord === extent[0] && value > 0) { + // stackCoord = extent[1]; + // } + // else if (stackCoord === extent[1] && value < 0) { + // stackCoord = extent[0]; + // } + + stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle); + } + + data.setItemLayout(idx, { + cx: cx, + cy: cy, + r0: r0, + r: r, + // Consider that positive angle is anti-clockwise, + // while positive radian of sector is clockwise + startAngle: -startAngle * Math.PI / 180, + endAngle: -endAngle * Math.PI / 180 + }); + } + }, this); +} +/** + * Calculate bar width and offset for radial bar charts + */ + + +function calRadialBar(barSeries, api) { + // Columns info on each category axis. Key is polar name + var columnsMap = {}; + zrUtil.each(barSeries, function (seriesModel, idx) { + var data = seriesModel.getData(); + var polar = seriesModel.coordinateSystem; + var baseAxis = polar.getBaseAxis(); + var axisKey = getAxisKey(polar, baseAxis); + var axisExtent = baseAxis.getExtent(); + var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count(); + var columnsOnAxis = columnsMap[axisKey] || { + bandWidth: bandWidth, + remainedWidth: bandWidth, + autoWidthCount: 0, + categoryGap: '20%', + gap: '30%', + stacks: {} + }; + var stacks = columnsOnAxis.stacks; + columnsMap[axisKey] = columnsOnAxis; + var stackId = getSeriesStackId(seriesModel); + + if (!stacks[stackId]) { + columnsOnAxis.autoWidthCount++; + } + + stacks[stackId] = stacks[stackId] || { + width: 0, + maxWidth: 0 + }; + var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth); + var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth); + var barGap = seriesModel.get('barGap'); + var barCategoryGap = seriesModel.get('barCategoryGap'); + + if (barWidth && !stacks[stackId].width) { + barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth); + stacks[stackId].width = barWidth; + columnsOnAxis.remainedWidth -= barWidth; + } + + barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth); + barGap != null && (columnsOnAxis.gap = barGap); + barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap); + }); + var result = {}; + zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) { + result[coordSysName] = {}; + var stacks = columnsOnAxis.stacks; + var bandWidth = columnsOnAxis.bandWidth; + var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth); + var barGapPercent = parsePercent(columnsOnAxis.gap, 1); + var remainedWidth = columnsOnAxis.remainedWidth; + var autoWidthCount = columnsOnAxis.autoWidthCount; + var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); + autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth + + zrUtil.each(stacks, function (column, stack) { + var maxWidth = column.maxWidth; + + if (maxWidth && maxWidth < autoWidth) { + maxWidth = Math.min(maxWidth, remainedWidth); + + if (column.width) { + maxWidth = Math.min(maxWidth, column.width); + } + + remainedWidth -= maxWidth; + column.width = maxWidth; + autoWidthCount--; + } + }); // Recalculate width again + + autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); + autoWidth = Math.max(autoWidth, 0); + var widthSum = 0; + var lastColumn; + zrUtil.each(stacks, function (column, idx) { + if (!column.width) { + column.width = autoWidth; + } + + lastColumn = column; + widthSum += column.width * (1 + barGapPercent); + }); + + if (lastColumn) { + widthSum -= lastColumn.width * barGapPercent; + } + + var offset = -widthSum / 2; + zrUtil.each(stacks, function (column, stackId) { + result[coordSysName][stackId] = result[coordSysName][stackId] || { + offset: offset, + width: column.width + }; + offset += column.width * (1 + barGapPercent); + }); + }); + return result; +} + +var _default = barLayoutPolar; +module.exports = _default; + +/***/ }), + +/***/ "1f0e": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var Path = __webpack_require__("cbe5"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = Path.extend({ + type: 'echartsGaugePointer', + shape: { + angle: 0, + width: 10, + r: 10, + x: 0, + y: 0 + }, + buildPath: function (ctx, shape) { + var mathCos = Math.cos; + var mathSin = Math.sin; + var r = shape.r; + var width = shape.width; + var angle = shape.angle; + var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2); + var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2); + angle = shape.angle - Math.PI / 2; + ctx.moveTo(x, y); + ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width); + ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r); + ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width); + ctx.lineTo(x, y); + return; + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "1f1a": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var modelUtil = __webpack_require__("e0d3"); + +var ComponentModel = __webpack_require__("6cb7"); + +var Model = __webpack_require__("4319"); + +var selectableMixin = __webpack_require__("7023"); + +var geoCreator = __webpack_require__("eeea"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var GeoModel = ComponentModel.extend({ + type: 'geo', + + /** + * @type {module:echarts/coord/geo/Geo} + */ + coordinateSystem: null, + layoutMode: 'box', + init: function (option) { + ComponentModel.prototype.init.apply(this, arguments); // Default label emphasis `show` + + modelUtil.defaultEmphasis(option, 'label', ['show']); + }, + optionUpdated: function () { + var option = this.option; + var self = this; + option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap); + this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) { + if (regionOpt.name) { + optionModelMap.set(regionOpt.name, new Model(regionOpt, self)); + } + + return optionModelMap; + }, zrUtil.createHashMap()); + this.updateSelectedMap(option.regions); + }, + defaultOption: { + zlevel: 0, + z: 0, + show: true, + left: 'center', + top: 'center', + // width:, + // height:, + // right + // bottom + // Aspect is width / height. Inited to be geoJson bbox aspect + // This parameter is used for scale this aspect + // If svg used, aspectScale is 1 by default. + // aspectScale: 0.75, + aspectScale: null, + ///// Layout with center and size + // If you wan't to put map in a fixed size box with right aspect ratio + // This two properties may more conveninet + // layoutCenter: [50%, 50%] + // layoutSize: 100 + silent: false, + // Map type + map: '', + // Define left-top, right-bottom coords to control view + // For example, [ [180, 90], [-180, -90] ] + boundingCoords: null, + // Default on center of map + center: null, + zoom: 1, + scaleLimit: null, + // selectedMode: false + label: { + show: false, + color: '#000' + }, + itemStyle: { + // color: 各异, + borderWidth: 0.5, + borderColor: '#444', + color: '#eee' + }, + emphasis: { + label: { + show: true, + color: 'rgb(100,0,0)' + }, + itemStyle: { + color: 'rgba(255,215,0,0.8)' + } + }, + regions: [] + }, + + /** + * Get model of region + * @param {string} name + * @return {module:echarts/model/Model} + */ + getRegionModel: function (name) { + return this._optionModelMap.get(name) || new Model(null, this, this.ecModel); + }, + + /** + * Format label + * @param {string} name Region name + * @param {string} [status='normal'] 'normal' or 'emphasis' + * @return {string} + */ + getFormattedLabel: function (name, status) { + var regionModel = this.getRegionModel(name); + var formatter = regionModel.get('label' + (status === 'normal' ? '.' : status + '.') + 'formatter'); + var params = { + name: name + }; + + if (typeof formatter === 'function') { + params.status = status; + return formatter(params); + } else if (typeof formatter === 'string') { + return formatter.replace('{a}', name != null ? name : ''); + } + }, + setZoom: function (zoom) { + this.option.zoom = zoom; + }, + setCenter: function (center) { + this.option.center = center; + } +}); +zrUtil.mixin(GeoModel, selectableMixin); +var _default = GeoModel; +module.exports = _default; + +/***/ }), + +/***/ "1fab": +/***/ (function(module, exports) { + +/** + * Event Mixin + * @module zrender/mixin/Eventful + * @author Kener (@Kener-林峰, kener.linfeng@gmail.com) + * pissang (https://www.github.com/pissang) + */ +var arrySlice = Array.prototype.slice; +/** + * Event dispatcher. + * + * @alias module:zrender/mixin/Eventful + * @constructor + * @param {Object} [eventProcessor] The object eventProcessor is the scope when + * `eventProcessor.xxx` called. + * @param {Function} [eventProcessor.normalizeQuery] + * param: {string|Object} Raw query. + * return: {string|Object} Normalized query. + * @param {Function} [eventProcessor.filter] Event will be dispatched only + * if it returns `true`. + * param: {string} eventType + * param: {string|Object} query + * return: {boolean} + * @param {Function} [eventProcessor.afterTrigger] Called after all handlers called. + * param: {string} eventType + */ + +var Eventful = function (eventProcessor) { + this._$handlers = {}; + this._$eventProcessor = eventProcessor; +}; + +Eventful.prototype = { + constructor: Eventful, + + /** + * The handler can only be triggered once, then removed. + * + * @param {string} event The event name. + * @param {string|Object} [query] Condition used on event filter. + * @param {Function} handler The event handler. + * @param {Object} context + */ + one: function (event, query, handler, context) { + return on(this, event, query, handler, context, true); + }, + + /** + * Bind a handler. + * + * @param {string} event The event name. + * @param {string|Object} [query] Condition used on event filter. + * @param {Function} handler The event handler. + * @param {Object} [context] + */ + on: function (event, query, handler, context) { + return on(this, event, query, handler, context, false); + }, + + /** + * Whether any handler has bound. + * + * @param {string} event + * @return {boolean} + */ + isSilent: function (event) { + var _h = this._$handlers; + return !_h[event] || !_h[event].length; + }, + + /** + * Unbind a event. + * + * @param {string} [event] The event name. + * If no `event` input, "off" all listeners. + * @param {Function} [handler] The event handler. + * If no `handler` input, "off" all listeners of the `event`. + */ + off: function (event, handler) { + var _h = this._$handlers; + + if (!event) { + this._$handlers = {}; + return this; + } + + if (handler) { + if (_h[event]) { + var newList = []; + + for (var i = 0, l = _h[event].length; i < l; i++) { + if (_h[event][i].h !== handler) { + newList.push(_h[event][i]); + } + } + + _h[event] = newList; + } + + if (_h[event] && _h[event].length === 0) { + delete _h[event]; + } + } else { + delete _h[event]; + } + + return this; + }, + + /** + * Dispatch a event. + * + * @param {string} type The event name. + */ + trigger: function (type) { + var _h = this._$handlers[type]; + var eventProcessor = this._$eventProcessor; + + if (_h) { + var args = arguments; + var argLen = args.length; + + if (argLen > 3) { + args = arrySlice.call(args, 1); + } + + var len = _h.length; + + for (var i = 0; i < len;) { + var hItem = _h[i]; + + if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) { + i++; + continue; + } // Optimize advise from backbone + + + switch (argLen) { + case 1: + hItem.h.call(hItem.ctx); + break; + + case 2: + hItem.h.call(hItem.ctx, args[1]); + break; + + case 3: + hItem.h.call(hItem.ctx, args[1], args[2]); + break; + + default: + // have more than 2 given arguments + hItem.h.apply(hItem.ctx, args); + break; + } + + if (hItem.one) { + _h.splice(i, 1); + + len--; + } else { + i++; + } + } + } + + eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type); + return this; + }, + + /** + * Dispatch a event with context, which is specified at the last parameter. + * + * @param {string} type The event name. + */ + triggerWithContext: function (type) { + var _h = this._$handlers[type]; + var eventProcessor = this._$eventProcessor; + + if (_h) { + var args = arguments; + var argLen = args.length; + + if (argLen > 4) { + args = arrySlice.call(args, 1, args.length - 1); + } + + var ctx = args[args.length - 1]; + var len = _h.length; + + for (var i = 0; i < len;) { + var hItem = _h[i]; + + if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) { + i++; + continue; + } // Optimize advise from backbone + + + switch (argLen) { + case 1: + hItem.h.call(ctx); + break; + + case 2: + hItem.h.call(ctx, args[1]); + break; + + case 3: + hItem.h.call(ctx, args[1], args[2]); + break; + + default: + // have more than 2 given arguments + hItem.h.apply(ctx, args); + break; + } + + if (hItem.one) { + _h.splice(i, 1); + + len--; + } else { + i++; + } + } + } + + eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type); + return this; + } +}; + +function normalizeQuery(host, query) { + var eventProcessor = host._$eventProcessor; + + if (query != null && eventProcessor && eventProcessor.normalizeQuery) { + query = eventProcessor.normalizeQuery(query); + } + + return query; +} + +function on(eventful, event, query, handler, context, isOnce) { + var _h = eventful._$handlers; + + if (typeof query === 'function') { + context = handler; + handler = query; + query = null; + } + + if (!handler || !event) { + return eventful; + } + + query = normalizeQuery(eventful, query); + + if (!_h[event]) { + _h[event] = []; + } + + for (var i = 0; i < _h[event].length; i++) { + if (_h[event][i].h === handler) { + return eventful; + } + } + + var wrap = { + h: handler, + one: isOnce, + query: query, + ctx: context || eventful, + // FIXME + // Do not publish this feature util it is proved that it makes sense. + callAtLast: handler.zrEventfulCallAtLast + }; + var lastIndex = _h[event].length - 1; + var lastWrap = _h[event][lastIndex]; + lastWrap && lastWrap.callAtLast ? _h[event].splice(lastIndex, 0, wrap) : _h[event].push(wrap); + return eventful; +} // ---------------------- +// The events in zrender +// ---------------------- + +/** + * @event module:zrender/mixin/Eventful#onclick + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmouseover + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmouseout + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmousemove + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmousewheel + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmousedown + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#onmouseup + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondrag + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragstart + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragend + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragenter + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragleave + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondragover + * @type {Function} + * @default null + */ + +/** + * @event module:zrender/mixin/Eventful#ondrop + * @type {Function} + * @default null + */ + + +var _default = Eventful; +module.exports = _default; + +/***/ }), + +/***/ "2023": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// import * as axisHelper from './axisHelper'; +var _default = { + /** + * @param {boolean} origin + * @return {number|string} min value or 'dataMin' or null/undefined (means auto) or NaN + */ + getMin: function (origin) { + var option = this.option; + var min = !origin && option.rangeStart != null ? option.rangeStart : option.min; + + if (this.axis && min != null && min !== 'dataMin' && typeof min !== 'function' && !zrUtil.eqNaN(min)) { + min = this.axis.scale.parse(min); + } + + return min; + }, + + /** + * @param {boolean} origin + * @return {number|string} max value or 'dataMax' or null/undefined (means auto) or NaN + */ + getMax: function (origin) { + var option = this.option; + var max = !origin && option.rangeEnd != null ? option.rangeEnd : option.max; + + if (this.axis && max != null && max !== 'dataMax' && typeof max !== 'function' && !zrUtil.eqNaN(max)) { + max = this.axis.scale.parse(max); + } + + return max; + }, + + /** + * @return {boolean} + */ + getNeedCrossZero: function () { + var option = this.option; + return option.rangeStart != null || option.rangeEnd != null ? false : !option.scale; + }, + + /** + * Should be implemented by each axis model if necessary. + * @return {module:echarts/model/Component} coordinate system model + */ + getCoordSysModel: zrUtil.noop, + + /** + * @param {number} rangeStart Can only be finite number or null/undefined or NaN. + * @param {number} rangeEnd Can only be finite number or null/undefined or NaN. + */ + setRange: function (rangeStart, rangeEnd) { + this.option.rangeStart = rangeStart; + this.option.rangeEnd = rangeEnd; + }, + + /** + * Reset range + */ + resetRange: function () { + // rangeStart and rangeEnd is readonly. + this.option.rangeStart = this.option.rangeEnd = null; + } +}; +module.exports = _default; + +/***/ }), + +/***/ "2039": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var coordinateSystemCreators = {}; + +function CoordinateSystemManager() { + this._coordinateSystems = []; +} + +CoordinateSystemManager.prototype = { + constructor: CoordinateSystemManager, + create: function (ecModel, api) { + var coordinateSystems = []; + zrUtil.each(coordinateSystemCreators, function (creater, type) { + var list = creater.create(ecModel, api); + coordinateSystems = coordinateSystems.concat(list || []); + }); + this._coordinateSystems = coordinateSystems; + }, + update: function (ecModel, api) { + zrUtil.each(this._coordinateSystems, function (coordSys) { + coordSys.update && coordSys.update(ecModel, api); + }); + }, + getCoordinateSystems: function () { + return this._coordinateSystems.slice(); + } +}; + +CoordinateSystemManager.register = function (type, coordinateSystemCreator) { + coordinateSystemCreators[type] = coordinateSystemCreator; +}; + +CoordinateSystemManager.get = function (type) { + return coordinateSystemCreators[type]; +}; + +var _default = CoordinateSystemManager; +module.exports = _default; + +/***/ }), + +/***/ "20c8": +/***/ (function(module, exports, __webpack_require__) { + +var curve = __webpack_require__("4a3f"); + +var vec2 = __webpack_require__("401b"); + +var bbox = __webpack_require__("e263"); + +var BoundingRect = __webpack_require__("9850"); + +var _config = __webpack_require__("2cf4"); + +var dpr = _config.devicePixelRatio; + +/** + * Path 代理,可以在`buildPath`中用于替代`ctx`, 会保存每个path操作的命令到pathCommands属性中 + * 可以用于 isInsidePath 判断以及获取boundingRect + * + * @module zrender/core/PathProxy + * @author Yi Shen (http://www.github.com/pissang) + */ +// TODO getTotalLength, getPointAtLength + +/* global Float32Array */ +var CMD = { + M: 1, + L: 2, + C: 3, + Q: 4, + A: 5, + Z: 6, + // Rect + R: 7 +}; // var CMD_MEM_SIZE = { +// M: 3, +// L: 3, +// C: 7, +// Q: 5, +// A: 9, +// R: 5, +// Z: 1 +// }; + +var min = []; +var max = []; +var min2 = []; +var max2 = []; +var mathMin = Math.min; +var mathMax = Math.max; +var mathCos = Math.cos; +var mathSin = Math.sin; +var mathSqrt = Math.sqrt; +var mathAbs = Math.abs; +var hasTypedArray = typeof Float32Array !== 'undefined'; +/** + * @alias module:zrender/core/PathProxy + * @constructor + */ + +var PathProxy = function (notSaveData) { + this._saveData = !(notSaveData || false); + + if (this._saveData) { + /** + * Path data. Stored as flat array + * @type {Array.} + */ + this.data = []; + } + + this._ctx = null; +}; +/** + * 快速计算Path包围盒(并不是最小包围盒) + * @return {Object} + */ + + +PathProxy.prototype = { + constructor: PathProxy, + _xi: 0, + _yi: 0, + _x0: 0, + _y0: 0, + // Unit x, Unit y. Provide for avoiding drawing that too short line segment + _ux: 0, + _uy: 0, + _len: 0, + _lineDash: null, + _dashOffset: 0, + _dashIdx: 0, + _dashSum: 0, + + /** + * @readOnly + */ + setScale: function (sx, sy, segmentIgnoreThreshold) { + // Compat. Previously there is no segmentIgnoreThreshold. + segmentIgnoreThreshold = segmentIgnoreThreshold || 0; + this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0; + this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0; + }, + getContext: function () { + return this._ctx; + }, + + /** + * @param {CanvasRenderingContext2D} ctx + * @return {module:zrender/core/PathProxy} + */ + beginPath: function (ctx) { + this._ctx = ctx; + ctx && ctx.beginPath(); + ctx && (this.dpr = ctx.dpr); // Reset + + if (this._saveData) { + this._len = 0; + } + + if (this._lineDash) { + this._lineDash = null; + this._dashOffset = 0; + } + + return this; + }, + + /** + * @param {number} x + * @param {number} y + * @return {module:zrender/core/PathProxy} + */ + moveTo: function (x, y) { + this.addData(CMD.M, x, y); + this._ctx && this._ctx.moveTo(x, y); // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用 + // xi, yi 记录当前点, x0, y0 在 closePath 的时候回到起始点。 + // 有可能在 beginPath 之后直接调用 lineTo,这时候 x0, y0 需要 + // 在 lineTo 方法中记录,这里先不考虑这种情况,dashed line 也只在 IE10- 中不支持 + + this._x0 = x; + this._y0 = y; + this._xi = x; + this._yi = y; + return this; + }, + + /** + * @param {number} x + * @param {number} y + * @return {module:zrender/core/PathProxy} + */ + lineTo: function (x, y) { + var exceedUnit = mathAbs(x - this._xi) > this._ux || mathAbs(y - this._yi) > this._uy // Force draw the first segment + || this._len < 5; + this.addData(CMD.L, x, y); + + if (this._ctx && exceedUnit) { + this._needsDash() ? this._dashedLineTo(x, y) : this._ctx.lineTo(x, y); + } + + if (exceedUnit) { + this._xi = x; + this._yi = y; + } + + return this; + }, + + /** + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @return {module:zrender/core/PathProxy} + */ + bezierCurveTo: function (x1, y1, x2, y2, x3, y3) { + this.addData(CMD.C, x1, y1, x2, y2, x3, y3); + + if (this._ctx) { + this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3) : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); + } + + this._xi = x3; + this._yi = y3; + return this; + }, + + /** + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @return {module:zrender/core/PathProxy} + */ + quadraticCurveTo: function (x1, y1, x2, y2) { + this.addData(CMD.Q, x1, y1, x2, y2); + + if (this._ctx) { + this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2) : this._ctx.quadraticCurveTo(x1, y1, x2, y2); + } + + this._xi = x2; + this._yi = y2; + return this; + }, + + /** + * @param {number} cx + * @param {number} cy + * @param {number} r + * @param {number} startAngle + * @param {number} endAngle + * @param {boolean} anticlockwise + * @return {module:zrender/core/PathProxy} + */ + arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) { + this.addData(CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1); + this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise); + this._xi = mathCos(endAngle) * r + cx; + this._yi = mathSin(endAngle) * r + cy; + return this; + }, + // TODO + arcTo: function (x1, y1, x2, y2, radius) { + if (this._ctx) { + this._ctx.arcTo(x1, y1, x2, y2, radius); + } + + return this; + }, + // TODO + rect: function (x, y, w, h) { + this._ctx && this._ctx.rect(x, y, w, h); + this.addData(CMD.R, x, y, w, h); + return this; + }, + + /** + * @return {module:zrender/core/PathProxy} + */ + closePath: function () { + this.addData(CMD.Z); + var ctx = this._ctx; + var x0 = this._x0; + var y0 = this._y0; + + if (ctx) { + this._needsDash() && this._dashedLineTo(x0, y0); + ctx.closePath(); + } + + this._xi = x0; + this._yi = y0; + return this; + }, + + /** + * Context 从外部传入,因为有可能是 rebuildPath 完之后再 fill。 + * stroke 同样 + * @param {CanvasRenderingContext2D} ctx + * @return {module:zrender/core/PathProxy} + */ + fill: function (ctx) { + ctx && ctx.fill(); + this.toStatic(); + }, + + /** + * @param {CanvasRenderingContext2D} ctx + * @return {module:zrender/core/PathProxy} + */ + stroke: function (ctx) { + ctx && ctx.stroke(); + this.toStatic(); + }, + + /** + * 必须在其它绘制命令前调用 + * Must be invoked before all other path drawing methods + * @return {module:zrender/core/PathProxy} + */ + setLineDash: function (lineDash) { + if (lineDash instanceof Array) { + this._lineDash = lineDash; + this._dashIdx = 0; + var lineDashSum = 0; + + for (var i = 0; i < lineDash.length; i++) { + lineDashSum += lineDash[i]; + } + + this._dashSum = lineDashSum; + } + + return this; + }, + + /** + * 必须在其它绘制命令前调用 + * Must be invoked before all other path drawing methods + * @return {module:zrender/core/PathProxy} + */ + setLineDashOffset: function (offset) { + this._dashOffset = offset; + return this; + }, + + /** + * + * @return {boolean} + */ + len: function () { + return this._len; + }, + + /** + * 直接设置 Path 数据 + */ + setData: function (data) { + var len = data.length; + + if (!(this.data && this.data.length === len) && hasTypedArray) { + this.data = new Float32Array(len); + } + + for (var i = 0; i < len; i++) { + this.data[i] = data[i]; + } + + this._len = len; + }, + + /** + * 添加子路径 + * @param {module:zrender/core/PathProxy|Array.} path + */ + appendPath: function (path) { + if (!(path instanceof Array)) { + path = [path]; + } + + var len = path.length; + var appendSize = 0; + var offset = this._len; + + for (var i = 0; i < len; i++) { + appendSize += path[i].len(); + } + + if (hasTypedArray && this.data instanceof Float32Array) { + this.data = new Float32Array(offset + appendSize); + } + + for (var i = 0; i < len; i++) { + var appendPathData = path[i].data; + + for (var k = 0; k < appendPathData.length; k++) { + this.data[offset++] = appendPathData[k]; + } + } + + this._len = offset; + }, + + /** + * 填充 Path 数据。 + * 尽量复用而不申明新的数组。大部分图形重绘的指令数据长度都是不变的。 + */ + addData: function (cmd) { + if (!this._saveData) { + return; + } + + var data = this.data; + + if (this._len + arguments.length > data.length) { + // 因为之前的数组已经转换成静态的 Float32Array + // 所以不够用时需要扩展一个新的动态数组 + this._expandData(); + + data = this.data; + } + + for (var i = 0; i < arguments.length; i++) { + data[this._len++] = arguments[i]; + } + + this._prevCmd = cmd; + }, + _expandData: function () { + // Only if data is Float32Array + if (!(this.data instanceof Array)) { + var newData = []; + + for (var i = 0; i < this._len; i++) { + newData[i] = this.data[i]; + } + + this.data = newData; + } + }, + + /** + * If needs js implemented dashed line + * @return {boolean} + * @private + */ + _needsDash: function () { + return this._lineDash; + }, + _dashedLineTo: function (x1, y1) { + var dashSum = this._dashSum; + var offset = this._dashOffset; + var lineDash = this._lineDash; + var ctx = this._ctx; + var x0 = this._xi; + var y0 = this._yi; + var dx = x1 - x0; + var dy = y1 - y0; + var dist = mathSqrt(dx * dx + dy * dy); + var x = x0; + var y = y0; + var dash; + var nDash = lineDash.length; + var idx; + dx /= dist; + dy /= dist; + + if (offset < 0) { + // Convert to positive offset + offset = dashSum + offset; + } + + offset %= dashSum; + x -= offset * dx; + y -= offset * dy; + + while (dx > 0 && x <= x1 || dx < 0 && x >= x1 || dx === 0 && (dy > 0 && y <= y1 || dy < 0 && y >= y1)) { + idx = this._dashIdx; + dash = lineDash[idx]; + x += dx * dash; + y += dy * dash; + this._dashIdx = (idx + 1) % nDash; // Skip positive offset + + if (dx > 0 && x < x0 || dx < 0 && x > x0 || dy > 0 && y < y0 || dy < 0 && y > y0) { + continue; + } + + ctx[idx % 2 ? 'moveTo' : 'lineTo'](dx >= 0 ? mathMin(x, x1) : mathMax(x, x1), dy >= 0 ? mathMin(y, y1) : mathMax(y, y1)); + } // Offset for next lineTo + + + dx = x - x1; + dy = y - y1; + this._dashOffset = -mathSqrt(dx * dx + dy * dy); + }, + // Not accurate dashed line to + _dashedBezierTo: function (x1, y1, x2, y2, x3, y3) { + var dashSum = this._dashSum; + var offset = this._dashOffset; + var lineDash = this._lineDash; + var ctx = this._ctx; + var x0 = this._xi; + var y0 = this._yi; + var t; + var dx; + var dy; + var cubicAt = curve.cubicAt; + var bezierLen = 0; + var idx = this._dashIdx; + var nDash = lineDash.length; + var x; + var y; + var tmpLen = 0; + + if (offset < 0) { + // Convert to positive offset + offset = dashSum + offset; + } + + offset %= dashSum; // Bezier approx length + + for (t = 0; t < 1; t += 0.1) { + dx = cubicAt(x0, x1, x2, x3, t + 0.1) - cubicAt(x0, x1, x2, x3, t); + dy = cubicAt(y0, y1, y2, y3, t + 0.1) - cubicAt(y0, y1, y2, y3, t); + bezierLen += mathSqrt(dx * dx + dy * dy); + } // Find idx after add offset + + + for (; idx < nDash; idx++) { + tmpLen += lineDash[idx]; + + if (tmpLen > offset) { + break; + } + } + + t = (tmpLen - offset) / bezierLen; + + while (t <= 1) { + x = cubicAt(x0, x1, x2, x3, t); + y = cubicAt(y0, y1, y2, y3, t); // Use line to approximate dashed bezier + // Bad result if dash is long + + idx % 2 ? ctx.moveTo(x, y) : ctx.lineTo(x, y); + t += lineDash[idx] / bezierLen; + idx = (idx + 1) % nDash; + } // Finish the last segment and calculate the new offset + + + idx % 2 !== 0 && ctx.lineTo(x3, y3); + dx = x3 - x; + dy = y3 - y; + this._dashOffset = -mathSqrt(dx * dx + dy * dy); + }, + _dashedQuadraticTo: function (x1, y1, x2, y2) { + // Convert quadratic to cubic using degree elevation + var x3 = x2; + var y3 = y2; + x2 = (x2 + 2 * x1) / 3; + y2 = (y2 + 2 * y1) / 3; + x1 = (this._xi + 2 * x1) / 3; + y1 = (this._yi + 2 * y1) / 3; + + this._dashedBezierTo(x1, y1, x2, y2, x3, y3); + }, + + /** + * 转成静态的 Float32Array 减少堆内存占用 + * Convert dynamic array to static Float32Array + */ + toStatic: function () { + var data = this.data; + + if (data instanceof Array) { + data.length = this._len; + + if (hasTypedArray) { + this.data = new Float32Array(data); + } + } + }, + + /** + * @return {module:zrender/core/BoundingRect} + */ + getBoundingRect: function () { + min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE; + max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE; + var data = this.data; + var xi = 0; + var yi = 0; + var x0 = 0; + var y0 = 0; + + for (var i = 0; i < data.length;) { + var cmd = data[i++]; + + if (i === 1) { + // 如果第一个命令是 L, C, Q + // 则 previous point 同绘制命令的第一个 point + // + // 第一个命令为 Arc 的情况下会在后面特殊处理 + xi = data[i]; + yi = data[i + 1]; + x0 = xi; + y0 = yi; + } + + switch (cmd) { + case CMD.M: + // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点 + // 在 closePath 的时候使用 + x0 = data[i++]; + y0 = data[i++]; + xi = x0; + yi = y0; + min2[0] = x0; + min2[1] = y0; + max2[0] = x0; + max2[1] = y0; + break; + + case CMD.L: + bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2); + xi = data[i++]; + yi = data[i++]; + break; + + case CMD.C: + bbox.fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2); + xi = data[i++]; + yi = data[i++]; + break; + + case CMD.Q: + bbox.fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2); + xi = data[i++]; + yi = data[i++]; + break; + + case CMD.A: + // TODO Arc 判断的开销比较大 + var cx = data[i++]; + var cy = data[i++]; + var rx = data[i++]; + var ry = data[i++]; + var startAngle = data[i++]; + var endAngle = data[i++] + startAngle; // TODO Arc 旋转 + + i += 1; + var anticlockwise = 1 - data[i++]; + + if (i === 1) { + // 直接使用 arc 命令 + // 第一个命令起点还未定义 + x0 = mathCos(startAngle) * rx + cx; + y0 = mathSin(startAngle) * ry + cy; + } + + bbox.fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2); + xi = mathCos(endAngle) * rx + cx; + yi = mathSin(endAngle) * ry + cy; + break; + + case CMD.R: + x0 = xi = data[i++]; + y0 = yi = data[i++]; + var width = data[i++]; + var height = data[i++]; // Use fromLine + + bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2); + break; + + case CMD.Z: + xi = x0; + yi = y0; + break; + } // Union + + + vec2.min(min, min, min2); + vec2.max(max, max, max2); + } // No data + + + if (i === 0) { + min[0] = min[1] = max[0] = max[1] = 0; + } + + return new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]); + }, + + /** + * Rebuild path from current data + * Rebuild path will not consider javascript implemented line dash. + * @param {CanvasRenderingContext2D} ctx + */ + rebuildPath: function (ctx) { + var d = this.data; + var x0; + var y0; + var xi; + var yi; + var x; + var y; + var ux = this._ux; + var uy = this._uy; + var len = this._len; + + for (var i = 0; i < len;) { + var cmd = d[i++]; + + if (i === 1) { + // 如果第一个命令是 L, C, Q + // 则 previous point 同绘制命令的第一个 point + // + // 第一个命令为 Arc 的情况下会在后面特殊处理 + xi = d[i]; + yi = d[i + 1]; + x0 = xi; + y0 = yi; + } + + switch (cmd) { + case CMD.M: + x0 = xi = d[i++]; + y0 = yi = d[i++]; + ctx.moveTo(xi, yi); + break; + + case CMD.L: + x = d[i++]; + y = d[i++]; // Not draw too small seg between + + if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) { + ctx.lineTo(x, y); + xi = x; + yi = y; + } + + break; + + case CMD.C: + ctx.bezierCurveTo(d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]); + xi = d[i - 2]; + yi = d[i - 1]; + break; + + case CMD.Q: + ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]); + xi = d[i - 2]; + yi = d[i - 1]; + break; + + case CMD.A: + var cx = d[i++]; + var cy = d[i++]; + var rx = d[i++]; + var ry = d[i++]; + var theta = d[i++]; + var dTheta = d[i++]; + var psi = d[i++]; + var fs = d[i++]; + var r = rx > ry ? rx : ry; + var scaleX = rx > ry ? 1 : rx / ry; + var scaleY = rx > ry ? ry / rx : 1; + var isEllipse = Math.abs(rx - ry) > 1e-3; + var endAngle = theta + dTheta; + + if (isEllipse) { + ctx.translate(cx, cy); + ctx.rotate(psi); + ctx.scale(scaleX, scaleY); + ctx.arc(0, 0, r, theta, endAngle, 1 - fs); + ctx.scale(1 / scaleX, 1 / scaleY); + ctx.rotate(-psi); + ctx.translate(-cx, -cy); + } else { + ctx.arc(cx, cy, r, theta, endAngle, 1 - fs); + } + + if (i === 1) { + // 直接使用 arc 命令 + // 第一个命令起点还未定义 + x0 = mathCos(theta) * rx + cx; + y0 = mathSin(theta) * ry + cy; + } + + xi = mathCos(endAngle) * rx + cx; + yi = mathSin(endAngle) * ry + cy; + break; + + case CMD.R: + x0 = xi = d[i]; + y0 = yi = d[i + 1]; + ctx.rect(d[i++], d[i++], d[i++], d[i++]); + break; + + case CMD.Z: + ctx.closePath(); + xi = x0; + yi = y0; + } + } + } +}; +PathProxy.CMD = CMD; +var _default = PathProxy; +module.exports = _default; + +/***/ }), + +/***/ "2145": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var features = {}; + +function register(name, ctor) { + features[name] = ctor; +} + +function get(name) { + return features[name]; +} + +exports.register = register; +exports.get = get; + +/***/ }), + +/***/ "2163": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var SeriesModel = __webpack_require__("4f85"); + +var Tree = __webpack_require__("06c7"); + +var _format = __webpack_require__("eda2"); + +var encodeHTML = _format.encodeHTML; + +var Model = __webpack_require__("4319"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = SeriesModel.extend({ + type: 'series.tree', + layoutInfo: null, + // can support the position parameters 'left', 'top','right','bottom', 'width', + // 'height' in the setOption() with 'merge' mode normal. + layoutMode: 'box', + + /** + * Init a tree data structure from data in option series + * @param {Object} option the object used to config echarts view + * @return {module:echarts/data/List} storage initial data + */ + getInitialData: function (option) { + //create an virtual root + var root = { + name: option.name, + children: option.data + }; + var leaves = option.leaves || {}; + var leavesModel = new Model(leaves, this, this.ecModel); + var tree = Tree.createTree(root, this, {}, beforeLink); + + function beforeLink(nodeData) { + nodeData.wrapMethod('getItemModel', function (model, idx) { + var node = tree.getNodeByDataIndex(idx); + + if (!node.children.length || !node.isExpand) { + model.parentModel = leavesModel; + } + + return model; + }); + } + + var treeDepth = 0; + tree.eachNode('preorder', function (node) { + if (node.depth > treeDepth) { + treeDepth = node.depth; + } + }); + var expandAndCollapse = option.expandAndCollapse; + var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth; + tree.root.eachNode('preorder', function (node) { + var item = node.hostTree.data.getRawDataItem(node.dataIndex); // Add item.collapsed != null, because users can collapse node original in the series.data. + + node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth; + }); + return tree.data; + }, + + /** + * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'. + * @returns {string} orient + */ + getOrient: function () { + var orient = this.get('orient'); + + if (orient === 'horizontal') { + orient = 'LR'; + } else if (orient === 'vertical') { + orient = 'TB'; + } + + return orient; + }, + setZoom: function (zoom) { + this.option.zoom = zoom; + }, + setCenter: function (center) { + this.option.center = center; + }, + + /** + * @override + * @param {number} dataIndex + */ + formatTooltip: function (dataIndex) { + var tree = this.getData().tree; + var realRoot = tree.root.children[0]; + var node = tree.getNodeByDataIndex(dataIndex); + var value = node.getValue(); + var name = node.name; + + while (node && node !== realRoot) { + name = node.parentNode.name + '.' + name; + node = node.parentNode; + } + + return encodeHTML(name + (isNaN(value) || value == null ? '' : ' : ' + value)); + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: 'view', + // the position of the whole view + left: '12%', + top: '12%', + right: '12%', + bottom: '12%', + // the layout of the tree, two value can be selected, 'orthogonal' or 'radial' + layout: 'orthogonal', + // value can be 'polyline' + edgeShape: 'curve', + edgeForkPosition: '50%', + // true | false | 'move' | 'scale', see module:component/helper/RoamController. + roam: false, + // Symbol size scale ratio in roam + nodeScaleRatio: 0.4, + // Default on center of graph + center: null, + zoom: 1, + // The orient of orthoginal layout, can be setted to 'LR', 'TB', 'RL', 'BT'. + // and the backward compatibility configuration 'horizontal = LR', 'vertical = TB'. + orient: 'LR', + symbol: 'emptyCircle', + symbolSize: 7, + expandAndCollapse: true, + initialTreeDepth: 2, + lineStyle: { + color: '#ccc', + width: 1.5, + curveness: 0.5 + }, + itemStyle: { + color: 'lightsteelblue', + borderColor: '#c23531', + borderWidth: 1.5 + }, + label: { + show: true, + color: '#555' + }, + leaves: { + label: { + show: true + } + }, + animationEasing: 'linear', + animationDuration: 700, + animationDurationUpdate: 1000 + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "216a": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var numberUtil = __webpack_require__("3842"); + +var formatUtil = __webpack_require__("eda2"); + +var scaleHelper = __webpack_require__("944e"); + +var IntervalScale = __webpack_require__("89e3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* A third-party license is embeded for some of the code in this file: +* The "scaleLevels" was originally copied from "d3.js" with some +* modifications made for this project. +* (See more details in the comment on the definition of "scaleLevels" below.) +* The use of the source code of this file is also subject to the terms +* and consitions of the license of "d3.js" (BSD-3Clause, see +* ). +*/ +// [About UTC and local time zone]: +// In most cases, `number.parseDate` will treat input data string as local time +// (except time zone is specified in time string). And `format.formateTime` returns +// local time by default. option.useUTC is false by default. This design have +// concidered these common case: +// (1) Time that is persistent in server is in UTC, but it is needed to be diplayed +// in local time by default. +// (2) By default, the input data string (e.g., '2011-01-02') should be displayed +// as its original time, without any time difference. +var intervalScaleProto = IntervalScale.prototype; +var mathCeil = Math.ceil; +var mathFloor = Math.floor; +var ONE_SECOND = 1000; +var ONE_MINUTE = ONE_SECOND * 60; +var ONE_HOUR = ONE_MINUTE * 60; +var ONE_DAY = ONE_HOUR * 24; // FIXME 公用? + +var bisect = function (a, x, lo, hi) { + while (lo < hi) { + var mid = lo + hi >>> 1; + + if (a[mid][1] < x) { + lo = mid + 1; + } else { + hi = mid; + } + } + + return lo; +}; +/** + * @alias module:echarts/coord/scale/Time + * @constructor + */ + + +var TimeScale = IntervalScale.extend({ + type: 'time', + + /** + * @override + */ + getLabel: function (val) { + var stepLvl = this._stepLvl; + var date = new Date(val); + return formatUtil.formatTime(stepLvl[0], date, this.getSetting('useUTC')); + }, + + /** + * @override + */ + niceExtent: function (opt) { + var extent = this._extent; // If extent start and end are same, expand them + + if (extent[0] === extent[1]) { + // Expand extent + extent[0] -= ONE_DAY; + extent[1] += ONE_DAY; + } // If there are no data and extent are [Infinity, -Infinity] + + + if (extent[1] === -Infinity && extent[0] === Infinity) { + var d = new Date(); + extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate()); + extent[0] = extent[1] - ONE_DAY; + } + + this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // var extent = this._extent; + + var interval = this._interval; + + if (!opt.fixMin) { + extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval); + } + + if (!opt.fixMax) { + extent[1] = numberUtil.round(mathCeil(extent[1] / interval) * interval); + } + }, + + /** + * @override + */ + niceTicks: function (approxTickNum, minInterval, maxInterval) { + approxTickNum = approxTickNum || 10; + var extent = this._extent; + var span = extent[1] - extent[0]; + var approxInterval = span / approxTickNum; + + if (minInterval != null && approxInterval < minInterval) { + approxInterval = minInterval; + } + + if (maxInterval != null && approxInterval > maxInterval) { + approxInterval = maxInterval; + } + + var scaleLevelsLen = scaleLevels.length; + var idx = bisect(scaleLevels, approxInterval, 0, scaleLevelsLen); + var level = scaleLevels[Math.min(idx, scaleLevelsLen - 1)]; + var interval = level[1]; // Same with interval scale if span is much larger than 1 year + + if (level[0] === 'year') { + var yearSpan = span / interval; // From "Nice Numbers for Graph Labels" of Graphic Gems + // var niceYearSpan = numberUtil.nice(yearSpan, false); + + var yearStep = numberUtil.nice(yearSpan / approxTickNum, true); + interval *= yearStep; + } + + var timezoneOffset = this.getSetting('useUTC') ? 0 : new Date(+extent[0] || +extent[1]).getTimezoneOffset() * 60 * 1000; + var niceExtent = [Math.round(mathCeil((extent[0] - timezoneOffset) / interval) * interval + timezoneOffset), Math.round(mathFloor((extent[1] - timezoneOffset) / interval) * interval + timezoneOffset)]; + scaleHelper.fixExtent(niceExtent, extent); + this._stepLvl = level; // Interval will be used in getTicks + + this._interval = interval; + this._niceExtent = niceExtent; + }, + parse: function (val) { + // val might be float. + return +numberUtil.parseDate(val); + } +}); +zrUtil.each(['contain', 'normalize'], function (methodName) { + TimeScale.prototype[methodName] = function (val) { + return intervalScaleProto[methodName].call(this, this.parse(val)); + }; +}); +/** + * This implementation was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + */ + +var scaleLevels = [// Format interval +['hh:mm:ss', ONE_SECOND], // 1s +['hh:mm:ss', ONE_SECOND * 5], // 5s +['hh:mm:ss', ONE_SECOND * 10], // 10s +['hh:mm:ss', ONE_SECOND * 15], // 15s +['hh:mm:ss', ONE_SECOND * 30], // 30s +['hh:mm\nMM-dd', ONE_MINUTE], // 1m +['hh:mm\nMM-dd', ONE_MINUTE * 5], // 5m +['hh:mm\nMM-dd', ONE_MINUTE * 10], // 10m +['hh:mm\nMM-dd', ONE_MINUTE * 15], // 15m +['hh:mm\nMM-dd', ONE_MINUTE * 30], // 30m +['hh:mm\nMM-dd', ONE_HOUR], // 1h +['hh:mm\nMM-dd', ONE_HOUR * 2], // 2h +['hh:mm\nMM-dd', ONE_HOUR * 6], // 6h +['hh:mm\nMM-dd', ONE_HOUR * 12], // 12h +['MM-dd\nyyyy', ONE_DAY], // 1d +['MM-dd\nyyyy', ONE_DAY * 2], // 2d +['MM-dd\nyyyy', ONE_DAY * 3], // 3d +['MM-dd\nyyyy', ONE_DAY * 4], // 4d +['MM-dd\nyyyy', ONE_DAY * 5], // 5d +['MM-dd\nyyyy', ONE_DAY * 6], // 6d +['week', ONE_DAY * 7], // 7d +['MM-dd\nyyyy', ONE_DAY * 10], // 10d +['week', ONE_DAY * 14], // 2w +['week', ONE_DAY * 21], // 3w +['month', ONE_DAY * 31], // 1M +['week', ONE_DAY * 42], // 6w +['month', ONE_DAY * 62], // 2M +['week', ONE_DAY * 70], // 10w +['quarter', ONE_DAY * 95], // 3M +['month', ONE_DAY * 31 * 4], // 4M +['month', ONE_DAY * 31 * 5], // 5M +['half-year', ONE_DAY * 380 / 2], // 6M +['month', ONE_DAY * 31 * 8], // 8M +['month', ONE_DAY * 31 * 10], // 10M +['year', ONE_DAY * 380] // 1Y +]; +/** + * @param {module:echarts/model/Model} + * @return {module:echarts/scale/Time} + */ + +TimeScale.create = function (model) { + return new TimeScale({ + useUTC: model.ecModel.get('useUTC') + }); +}; + +var _default = TimeScale; +module.exports = _default; + +/***/ }), + +/***/ "217b": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var createListFromArray = __webpack_require__("3301"); + +var SeriesModel = __webpack_require__("4f85"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = SeriesModel.extend({ + type: 'series.line', + dependencies: ['grid', 'polar'], + getInitialData: function (option, ecModel) { + return createListFromArray(this.getSource(), this, { + useEncodeDefaulter: true + }); + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: 'cartesian2d', + legendHoverLink: true, + hoverAnimation: true, + // stack: null + // xAxisIndex: 0, + // yAxisIndex: 0, + // polarIndex: 0, + // If clip the overflow value + clip: true, + // cursor: null, + label: { + position: 'top' + }, + // itemStyle: { + // }, + lineStyle: { + width: 2, + type: 'solid' + }, + // areaStyle: { + // origin of areaStyle. Valid values: + // `'auto'/null/undefined`: from axisLine to data + // `'start'`: from min to data + // `'end'`: from data to max + // origin: 'auto' + // }, + // false, 'start', 'end', 'middle' + step: false, + // Disabled if step is true + smooth: false, + smoothMonotone: null, + symbol: 'emptyCircle', + symbolSize: 4, + symbolRotate: null, + showSymbol: true, + // `false`: follow the label interval strategy. + // `true`: show all symbols. + // `'auto'`: If possible, show all symbols, otherwise + // follow the label interval strategy. + showAllSymbol: 'auto', + // Whether to connect break point. + connectNulls: false, + // Sampling for large data. Can be: 'average', 'max', 'min', 'sum'. + sampling: 'none', + animationEasing: 'linear', + // Disable progressive + progressive: 0, + hoverLayerThreshold: Infinity + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "217c": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var Component = __webpack_require__("6cb7"); + +__webpack_require__("df3a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = Component.extend({ + type: 'parallel', + dependencies: ['parallelAxis'], + + /** + * @type {module:echarts/coord/parallel/Parallel} + */ + coordinateSystem: null, + + /** + * Each item like: 'dim0', 'dim1', 'dim2', ... + * @type {Array.} + * @readOnly + */ + dimensions: null, + + /** + * Coresponding to dimensions. + * @type {Array.} + * @readOnly + */ + parallelAxisIndex: null, + layoutMode: 'box', + defaultOption: { + zlevel: 0, + z: 0, + left: 80, + top: 60, + right: 80, + bottom: 60, + // width: {totalWidth} - left - right, + // height: {totalHeight} - top - bottom, + layout: 'horizontal', + // 'horizontal' or 'vertical' + // FIXME + // naming? + axisExpandable: false, + axisExpandCenter: null, + axisExpandCount: 0, + axisExpandWidth: 50, + // FIXME '10%' ? + axisExpandRate: 17, + axisExpandDebounce: 50, + // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full. + // Do not doc to user until necessary. + axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4], + axisExpandTriggerOn: 'click', + // 'mousemove' or 'click' + parallelAxisDefault: null + }, + + /** + * @override + */ + init: function () { + Component.prototype.init.apply(this, arguments); + this.mergeOption({}); + }, + + /** + * @override + */ + mergeOption: function (newOption) { + var thisOption = this.option; + newOption && zrUtil.merge(thisOption, newOption, true); + + this._initDimensions(); + }, + + /** + * Whether series or axis is in this coordinate system. + * @param {module:echarts/model/Series|module:echarts/coord/parallel/AxisModel} model + * @param {module:echarts/model/Global} ecModel + */ + contains: function (model, ecModel) { + var parallelIndex = model.get('parallelIndex'); + return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this; + }, + setAxisExpand: function (opt) { + zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) { + if (opt.hasOwnProperty(name)) { + this.option[name] = opt[name]; + } + }, this); + }, + + /** + * @private + */ + _initDimensions: function () { + var dimensions = this.dimensions = []; + var parallelAxisIndex = this.parallelAxisIndex = []; + var axisModels = zrUtil.filter(this.dependentModels.parallelAxis, function (axisModel) { + // Can not use this.contains here, because + // initialization has not been completed yet. + return (axisModel.get('parallelIndex') || 0) === this.componentIndex; + }, this); + zrUtil.each(axisModels, function (axisModel) { + dimensions.push('dim' + axisModel.get('dim')); + parallelAxisIndex.push(axisModel.componentIndex); + }); + } +}); + +module.exports = _default; + +/***/ }), + +/***/ "2266": +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__("825a"); +var isArrayIteratorMethod = __webpack_require__("e95a"); +var toLength = __webpack_require__("50c4"); +var bind = __webpack_require__("0366"); +var getIteratorMethod = __webpack_require__("35a1"); +var callWithSafeIterationClosing = __webpack_require__("9bdd"); + +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; + +var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { + var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1); + var iterator, iterFn, index, length, result, next, step; + + if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = toLength(iterable.length); length > index; index++) { + result = AS_ENTRIES + ? boundFunction(anObject(step = iterable[index])[0], step[1]) + : boundFunction(iterable[index]); + if (result && result instanceof Result) return result; + } return new Result(false); + } + iterator = iterFn.call(iterable); + } + + next = iterator.next; + while (!(step = next.call(iterator)).done) { + result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); + if (typeof result == 'object' && result && result instanceof Result) return result; + } return new Result(false); +}; + +iterate.stop = function (result) { + return new Result(true, result); +}; + + +/***/ }), + +/***/ "22d1": +/***/ (function(module, exports) { + +/** + * echarts设备环境识别 + * + * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。 + * @author firede[firede@firede.us] + * @desc thanks zepto. + */ + +/* global wx */ +var env = {}; + +if (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') { + // In Weixin Application + env = { + browser: {}, + os: {}, + node: false, + wxa: true, + // Weixin Application + canvasSupported: true, + svgSupported: false, + touchEventsSupported: true, + domSupported: false + }; +} else if (typeof document === 'undefined' && typeof self !== 'undefined') { + // In worker + env = { + browser: {}, + os: {}, + node: false, + worker: true, + canvasSupported: true, + domSupported: false + }; +} else if (typeof navigator === 'undefined') { + // In node + env = { + browser: {}, + os: {}, + node: true, + worker: false, + // Assume canvas is supported + canvasSupported: true, + svgSupported: true, + domSupported: false + }; +} else { + env = detect(navigator.userAgent); +} + +var _default = env; // Zepto.js +// (c) 2010-2013 Thomas Fuchs +// Zepto.js may be freely distributed under the MIT license. + +function detect(ua) { + var os = {}; + var browser = {}; // var webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/); + // var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); + // var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + // var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + // var iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/); + // var webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/); + // var touchpad = webos && ua.match(/TouchPad/); + // var kindle = ua.match(/Kindle\/([\d.]+)/); + // var silk = ua.match(/Silk\/([\d._]+)/); + // var blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/); + // var bb10 = ua.match(/(BB10).*Version\/([\d.]+)/); + // var rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/); + // var playbook = ua.match(/PlayBook/); + // var chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/); + + var firefox = ua.match(/Firefox\/([\d.]+)/); // var safari = webkit && ua.match(/Mobile\//) && !chrome; + // var webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome; + + var ie = ua.match(/MSIE\s([\d.]+)/) // IE 11 Trident/7.0; rv:11.0 + || ua.match(/Trident\/.+?rv:(([\d.]+))/); + var edge = ua.match(/Edge\/([\d.]+)/); // IE 12 and 12+ + + var weChat = /micromessenger/i.test(ua); // Todo: clean this up with a better OS/browser seperation: + // - discern (more) between multiple browsers on android + // - decide if kindle fire in silk mode is android or not + // - Firefox on Android doesn't specify the Android version + // - possibly devide in os, device and browser hashes + // if (browser.webkit = !!webkit) browser.version = webkit[1]; + // if (android) os.android = true, os.version = android[2]; + // if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.'); + // if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.'); + // if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null; + // if (webos) os.webos = true, os.version = webos[2]; + // if (touchpad) os.touchpad = true; + // if (blackberry) os.blackberry = true, os.version = blackberry[2]; + // if (bb10) os.bb10 = true, os.version = bb10[2]; + // if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2]; + // if (playbook) browser.playbook = true; + // if (kindle) os.kindle = true, os.version = kindle[1]; + // if (silk) browser.silk = true, browser.version = silk[1]; + // if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true; + // if (chrome) browser.chrome = true, browser.version = chrome[1]; + + if (firefox) { + browser.firefox = true; + browser.version = firefox[1]; + } // if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true; + // if (webview) browser.webview = true; + + + if (ie) { + browser.ie = true; + browser.version = ie[1]; + } + + if (edge) { + browser.edge = true; + browser.version = edge[1]; + } // It is difficult to detect WeChat in Win Phone precisely, because ua can + // not be set on win phone. So we do not consider Win Phone. + + + if (weChat) { + browser.weChat = true; + } // os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) || + // (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/))); + // os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || + // (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) || + // (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/)))); + + + return { + browser: browser, + os: os, + node: false, + // 原生canvas支持,改极端点了 + // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9) + canvasSupported: !!document.createElement('canvas').getContext, + svgSupported: typeof SVGRect !== 'undefined', + // works on most browsers + // IE10/11 does not support touch event, and MS Edge supports them but not by + // default, so we dont check navigator.maxTouchPoints for them here. + touchEventsSupported: 'ontouchstart' in window && !browser.ie && !browser.edge, + // . + pointerEventsSupported: // (1) Firefox supports pointer but not by default, only MS browsers are reliable on pointer + // events currently. So we dont use that on other browsers unless tested sufficiently. + // For example, in iOS 13 Mobile Chromium 78, if the touching behavior starts page + // scroll, the `pointermove` event can not be fired any more. That will break some + // features like "pan horizontally to move something and pan vertically to page scroll". + // The horizontal pan probably be interrupted by the casually triggered page scroll. + // (2) Although IE 10 supports pointer event, it use old style and is different from the + // standard. So we exclude that. (IE 10 is hardly used on touch device) + 'onpointerdown' in window && (browser.edge || browser.ie && browser.version >= 11), + // passiveSupported: detectPassiveSupport() + domSupported: typeof document !== 'undefined' + }; +} // See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection +// function detectPassiveSupport() { +// // Test via a getter in the options object to see if the passive property is accessed +// var supportsPassive = false; +// try { +// var opts = Object.defineProperty({}, 'passive', { +// get: function() { +// supportsPassive = true; +// } +// }); +// window.addEventListener('testPassive', function() {}, opts); +// } catch (e) { +// } +// return supportsPassive; +// } + + +module.exports = _default; + +/***/ }), + +/***/ "22da": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var layout = __webpack_require__("f934"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* A third-party license is embeded for some of the code in this file: +* The tree layoutHelper implementation was originally copied from +* "d3.js"(https://github.com/d3/d3-hierarchy) with +* some modifications made for this project. +* (see more details in the comment of the specific method below.) +* The use of the source code of this file is also subject to the terms +* and consitions of the licence of "d3.js" (BSD-3Clause, see +* ). +*/ + +/** + * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing + * the tree. + */ + +/** + * Initialize all computational message for following algorithm. + * + * @param {module:echarts/data/Tree~TreeNode} root The virtual root of the tree. + */ +function init(root) { + root.hierNode = { + defaultAncestor: null, + ancestor: root, + prelim: 0, + modifier: 0, + change: 0, + shift: 0, + i: 0, + thread: null + }; + var nodes = [root]; + var node; + var children; + + while (node = nodes.pop()) { + // jshint ignore:line + children = node.children; + + if (node.isExpand && children.length) { + var n = children.length; + + for (var i = n - 1; i >= 0; i--) { + var child = children[i]; + child.hierNode = { + defaultAncestor: null, + ancestor: child, + prelim: 0, + modifier: 0, + change: 0, + shift: 0, + i: i, + thread: null + }; + nodes.push(child); + } + } + } +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * Computes a preliminary x coordinate for node. Before that, this function is + * applied recursively to the children of node, as well as the function + * apportion(). After spacing out the children by calling executeShifts(), the + * node is placed to the midpoint of its outermost children. + * + * @param {module:echarts/data/Tree~TreeNode} node + * @param {Function} separation + */ + + +function firstWalk(node, separation) { + var children = node.isExpand ? node.children : []; + var siblings = node.parentNode.children; + var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null; + + if (children.length) { + executeShifts(node); + var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2; + + if (subtreeW) { + node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); + node.hierNode.modifier = node.hierNode.prelim - midPoint; + } else { + node.hierNode.prelim = midPoint; + } + } else if (subtreeW) { + node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); + } + + node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation); +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * Computes all real x-coordinates by summing up the modifiers recursively. + * + * @param {module:echarts/data/Tree~TreeNode} node + */ + + +function secondWalk(node) { + var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier; + node.setLayout({ + x: nodeX + }, true); + node.hierNode.modifier += node.parentNode.hierNode.modifier; +} + +function separation(cb) { + return arguments.length ? cb : defaultSeparation; +} +/** + * Transform the common coordinate to radial coordinate. + * + * @param {number} x + * @param {number} y + * @return {Object} + */ + + +function radialCoordinate(x, y) { + var radialCoor = {}; + x -= Math.PI / 2; + radialCoor.x = y * Math.cos(x); + radialCoor.y = y * Math.sin(x); + return radialCoor; +} +/** + * Get the layout position of the whole view. + * + * @param {module:echarts/model/Series} seriesModel the model object of sankey series + * @param {module:echarts/ExtensionAPI} api provide the API list that the developer can call + * @return {module:zrender/core/BoundingRect} size of rect to draw the sankey view + */ + + +function getViewRect(seriesModel, api) { + return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + }); +} +/** + * All other shifts, applied to the smaller subtrees between w- and w+, are + * performed by this function. + * + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * @param {module:echarts/data/Tree~TreeNode} node + */ + + +function executeShifts(node) { + var children = node.children; + var n = children.length; + var shift = 0; + var change = 0; + + while (--n >= 0) { + var child = children[n]; + child.hierNode.prelim += shift; + child.hierNode.modifier += shift; + change += child.hierNode.change; + shift += child.hierNode.shift + change; + } +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * The core of the algorithm. Here, a new subtree is combined with the + * previous subtrees. Threads are used to traverse the inside and outside + * contours of the left and right subtree up to the highest common level. + * Whenever two nodes of the inside contours conflict, we compute the left + * one of the greatest uncommon ancestors using the function nextAncestor() + * and call moveSubtree() to shift the subtree and prepare the shifts of + * smaller subtrees. Finally, we add a new thread (if necessary). + * + * @param {module:echarts/data/Tree~TreeNode} subtreeV + * @param {module:echarts/data/Tree~TreeNode} subtreeW + * @param {module:echarts/data/Tree~TreeNode} ancestor + * @param {Function} separation + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function apportion(subtreeV, subtreeW, ancestor, separation) { + if (subtreeW) { + var nodeOutRight = subtreeV; + var nodeInRight = subtreeV; + var nodeOutLeft = nodeInRight.parentNode.children[0]; + var nodeInLeft = subtreeW; + var sumOutRight = nodeOutRight.hierNode.modifier; + var sumInRight = nodeInRight.hierNode.modifier; + var sumOutLeft = nodeOutLeft.hierNode.modifier; + var sumInLeft = nodeInLeft.hierNode.modifier; + + while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) { + nodeOutRight = nextRight(nodeOutRight); + nodeOutLeft = nextLeft(nodeOutLeft); + nodeOutRight.hierNode.ancestor = subtreeV; + var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight); + + if (shift > 0) { + moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift); + sumInRight += shift; + sumOutRight += shift; + } + + sumInLeft += nodeInLeft.hierNode.modifier; + sumInRight += nodeInRight.hierNode.modifier; + sumOutRight += nodeOutRight.hierNode.modifier; + sumOutLeft += nodeOutLeft.hierNode.modifier; + } + + if (nodeInLeft && !nextRight(nodeOutRight)) { + nodeOutRight.hierNode.thread = nodeInLeft; + nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight; + } + + if (nodeInRight && !nextLeft(nodeOutLeft)) { + nodeOutLeft.hierNode.thread = nodeInRight; + nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft; + ancestor = subtreeV; + } + } + + return ancestor; +} +/** + * This function is used to traverse the right contour of a subtree. + * It returns the rightmost child of node or the thread of node. The function + * returns null if and only if node is on the highest depth of its subtree. + * + * @param {module:echarts/data/Tree~TreeNode} node + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function nextRight(node) { + var children = node.children; + return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread; +} +/** + * This function is used to traverse the left contour of a subtree (or a subforest). + * It returns the leftmost child of node or the thread of node. The function + * returns null if and only if node is on the highest depth of its subtree. + * + * @param {module:echarts/data/Tree~TreeNode} node + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function nextLeft(node) { + var children = node.children; + return children.length && node.isExpand ? children[0] : node.hierNode.thread; +} +/** + * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor. + * Otherwise, returns the specified ancestor. + * + * @param {module:echarts/data/Tree~TreeNode} nodeInLeft + * @param {module:echarts/data/Tree~TreeNode} node + * @param {module:echarts/data/Tree~TreeNode} ancestor + * @return {module:echarts/data/Tree~TreeNode} + */ + + +function nextAncestor(nodeInLeft, node, ancestor) { + return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor; +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + * + * Shifts the current subtree rooted at wr. + * This is done by increasing prelim(w+) and modifier(w+) by shift. + * + * @param {module:echarts/data/Tree~TreeNode} wl + * @param {module:echarts/data/Tree~TreeNode} wr + * @param {number} shift [description] + */ + + +function moveSubtree(wl, wr, shift) { + var change = shift / (wr.hierNode.i - wl.hierNode.i); + wr.hierNode.change -= change; + wr.hierNode.shift += shift; + wr.hierNode.modifier += shift; + wr.hierNode.prelim += shift; + wl.hierNode.change += change; +} +/** + * The implementation of this function was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. + */ + + +function defaultSeparation(node1, node2) { + return node1.parentNode === node2.parentNode ? 1 : 2; +} + +exports.init = init; +exports.firstWalk = firstWalk; +exports.secondWalk = secondWalk; +exports.separation = separation; +exports.radialCoordinate = radialCoordinate; +exports.getViewRect = getViewRect; + +/***/ }), + +/***/ "2306": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var pathTool = __webpack_require__("342d"); + +var colorTool = __webpack_require__("41ef"); + +var matrix = __webpack_require__("1687"); + +var vector = __webpack_require__("401b"); + +var Path = __webpack_require__("cbe5"); + +var Transformable = __webpack_require__("0cde"); + +var ZImage = __webpack_require__("0da8"); + +exports.Image = ZImage; + +var Group = __webpack_require__("e1fc"); + +exports.Group = Group; + +var Text = __webpack_require__("76a5"); + +exports.Text = Text; + +var Circle = __webpack_require__("d9fc"); + +exports.Circle = Circle; + +var Sector = __webpack_require__("4aa2"); + +exports.Sector = Sector; + +var Ring = __webpack_require__("4573"); + +exports.Ring = Ring; + +var Polygon = __webpack_require__("87b1"); + +exports.Polygon = Polygon; + +var Polyline = __webpack_require__("d498"); + +exports.Polyline = Polyline; + +var Rect = __webpack_require__("c7a2"); + +exports.Rect = Rect; + +var Line = __webpack_require__("cb11"); + +exports.Line = Line; + +var BezierCurve = __webpack_require__("ac0f"); + +exports.BezierCurve = BezierCurve; + +var Arc = __webpack_require__("8d32"); + +exports.Arc = Arc; + +var CompoundPath = __webpack_require__("d4c6"); + +exports.CompoundPath = CompoundPath; + +var LinearGradient = __webpack_require__("48a9"); + +exports.LinearGradient = LinearGradient; + +var RadialGradient = __webpack_require__("dded"); + +exports.RadialGradient = RadialGradient; + +var BoundingRect = __webpack_require__("9850"); + +exports.BoundingRect = BoundingRect; + +var IncrementalDisplayable = __webpack_require__("392f"); + +exports.IncrementalDisplayable = IncrementalDisplayable; + +var subPixelOptimizeUtil = __webpack_require__("9cf9"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var mathMax = Math.max; +var mathMin = Math.min; +var EMPTY_OBJ = {}; +var Z2_EMPHASIS_LIFT = 1; // key: label model property nane, value: style property name. + +var CACHED_LABEL_STYLE_PROPERTIES = { + color: 'textFill', + textBorderColor: 'textStroke', + textBorderWidth: 'textStrokeWidth' +}; +var EMPHASIS = 'emphasis'; +var NORMAL = 'normal'; // Reserve 0 as default. + +var _highlightNextDigit = 1; +var _highlightKeyMap = {}; +var _customShapeMap = {}; +/** + * Extend shape with parameters + */ + +function extendShape(opts) { + return Path.extend(opts); +} +/** + * Extend path + */ + + +function extendPath(pathData, opts) { + return pathTool.extendFromString(pathData, opts); +} +/** + * Register a user defined shape. + * The shape class can be fetched by `getShapeClass` + * This method will overwrite the registered shapes, including + * the registered built-in shapes, if using the same `name`. + * The shape can be used in `custom series` and + * `graphic component` by declaring `{type: name}`. + * + * @param {string} name + * @param {Object} ShapeClass Can be generated by `extendShape`. + */ + + +function registerShape(name, ShapeClass) { + _customShapeMap[name] = ShapeClass; +} +/** + * Find shape class registered by `registerShape`. Usually used in + * fetching user defined shape. + * + * [Caution]: + * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared + * to use user registered shapes. + * Because the built-in shape (see `getBuiltInShape`) will be registered by + * `registerShape` by default. That enables users to get both built-in + * shapes as well as the shapes belonging to themsleves. But users can overwrite + * the built-in shapes by using names like 'circle', 'rect' via calling + * `registerShape`. So the echarts inner featrues should not fetch shapes from here + * in case that it is overwritten by users, except that some features, like + * `custom series`, `graphic component`, do it deliberately. + * + * (2) In the features like `custom series`, `graphic component`, the user input + * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic + * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names + * are reserved names, that is, if some user register a shape named `'image'`, + * the shape will not be used. If we intending to add some more reserved names + * in feature, that might bring break changes (disable some existing user shape + * names). But that case probably rearly happen. So we dont make more mechanism + * to resolve this issue here. + * + * @param {string} name + * @return {Object} The shape class. If not found, return nothing. + */ + + +function getShapeClass(name) { + if (_customShapeMap.hasOwnProperty(name)) { + return _customShapeMap[name]; + } +} +/** + * Create a path element from path data string + * @param {string} pathData + * @param {Object} opts + * @param {module:zrender/core/BoundingRect} rect + * @param {string} [layout=cover] 'center' or 'cover' + */ + + +function makePath(pathData, opts, rect, layout) { + var path = pathTool.createFromString(pathData, opts); + + if (rect) { + if (layout === 'center') { + rect = centerGraphic(rect, path.getBoundingRect()); + } + + resizePath(path, rect); + } + + return path; +} +/** + * Create a image element from image url + * @param {string} imageUrl image url + * @param {Object} opts options + * @param {module:zrender/core/BoundingRect} rect constrain rect + * @param {string} [layout=cover] 'center' or 'cover' + */ + + +function makeImage(imageUrl, rect, layout) { + var path = new ZImage({ + style: { + image: imageUrl, + x: rect.x, + y: rect.y, + width: rect.width, + height: rect.height + }, + onload: function (img) { + if (layout === 'center') { + var boundingRect = { + width: img.width, + height: img.height + }; + path.setStyle(centerGraphic(rect, boundingRect)); + } + } + }); + return path; +} +/** + * Get position of centered element in bounding box. + * + * @param {Object} rect element local bounding box + * @param {Object} boundingRect constraint bounding box + * @return {Object} element position containing x, y, width, and height + */ + + +function centerGraphic(rect, boundingRect) { + // Set rect to center, keep width / height ratio. + var aspect = boundingRect.width / boundingRect.height; + var width = rect.height * aspect; + var height; + + if (width <= rect.width) { + height = rect.height; + } else { + width = rect.width; + height = width / aspect; + } + + var cx = rect.x + rect.width / 2; + var cy = rect.y + rect.height / 2; + return { + x: cx - width / 2, + y: cy - height / 2, + width: width, + height: height + }; +} + +var mergePath = pathTool.mergePath; +/** + * Resize a path to fit the rect + * @param {module:zrender/graphic/Path} path + * @param {Object} rect + */ + +function resizePath(path, rect) { + if (!path.applyTransform) { + return; + } + + var pathRect = path.getBoundingRect(); + var m = pathRect.calculateTransform(rect); + path.applyTransform(m); +} +/** + * Sub pixel optimize line for canvas + * + * @param {Object} param + * @param {Object} [param.shape] + * @param {number} [param.shape.x1] + * @param {number} [param.shape.y1] + * @param {number} [param.shape.x2] + * @param {number} [param.shape.y2] + * @param {Object} [param.style] + * @param {number} [param.style.lineWidth] + * @return {Object} Modified param + */ + + +function subPixelOptimizeLine(param) { + subPixelOptimizeUtil.subPixelOptimizeLine(param.shape, param.shape, param.style); + return param; +} +/** + * Sub pixel optimize rect for canvas + * + * @param {Object} param + * @param {Object} [param.shape] + * @param {number} [param.shape.x] + * @param {number} [param.shape.y] + * @param {number} [param.shape.width] + * @param {number} [param.shape.height] + * @param {Object} [param.style] + * @param {number} [param.style.lineWidth] + * @return {Object} Modified param + */ + + +function subPixelOptimizeRect(param) { + subPixelOptimizeUtil.subPixelOptimizeRect(param.shape, param.shape, param.style); + return param; +} +/** + * Sub pixel optimize for canvas + * + * @param {number} position Coordinate, such as x, y + * @param {number} lineWidth Should be nonnegative integer. + * @param {boolean=} positiveOrNegative Default false (negative). + * @return {number} Optimized position. + */ + + +var subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize; + +function hasFillOrStroke(fillOrStroke) { + return fillOrStroke != null && fillOrStroke !== 'none'; +} // Most lifted color are duplicated. + + +var liftedColorMap = zrUtil.createHashMap(); +var liftedColorCount = 0; + +function liftColor(color) { + if (typeof color !== 'string') { + return color; + } + + var liftedColor = liftedColorMap.get(color); + + if (!liftedColor) { + liftedColor = colorTool.lift(color, -0.1); + + if (liftedColorCount < 10000) { + liftedColorMap.set(color, liftedColor); + liftedColorCount++; + } + } + + return liftedColor; +} + +function cacheElementStl(el) { + if (!el.__hoverStlDirty) { + return; + } + + el.__hoverStlDirty = false; + var hoverStyle = el.__hoverStl; + + if (!hoverStyle) { + el.__cachedNormalStl = el.__cachedNormalZ2 = null; + return; + } + + var normalStyle = el.__cachedNormalStl = {}; + el.__cachedNormalZ2 = el.z2; + var elStyle = el.style; + + for (var name in hoverStyle) { + // See comment in `singleEnterEmphasis`. + if (hoverStyle[name] != null) { + normalStyle[name] = elStyle[name]; + } + } // Always cache fill and stroke to normalStyle for lifting color. + + + normalStyle.fill = elStyle.fill; + normalStyle.stroke = elStyle.stroke; +} + +function singleEnterEmphasis(el) { + var hoverStl = el.__hoverStl; + + if (!hoverStl || el.__highlighted) { + return; + } + + var zr = el.__zr; + var useHoverLayer = el.useHoverLayer && zr && zr.painter.type === 'canvas'; + el.__highlighted = useHoverLayer ? 'layer' : 'plain'; + + if (el.isGroup || !zr && el.useHoverLayer) { + return; + } + + var elTarget = el; + var targetStyle = el.style; + + if (useHoverLayer) { + elTarget = zr.addHover(el); + targetStyle = elTarget.style; + } + + rollbackDefaultTextStyle(targetStyle); + + if (!useHoverLayer) { + cacheElementStl(elTarget); + } // styles can be: + // { + // label: { + // show: false, + // position: 'outside', + // fontSize: 18 + // }, + // emphasis: { + // label: { + // show: true + // } + // } + // }, + // where properties of `emphasis` may not appear in `normal`. We previously use + // module:echarts/util/model#defaultEmphasis to merge `normal` to `emphasis`. + // But consider rich text and setOption in merge mode, it is impossible to cover + // all properties in merge. So we use merge mode when setting style here. + // But we choose the merge strategy that only properties that is not `null/undefined`. + // Because when making a textStyle (espacially rich text), it is not easy to distinguish + // `hasOwnProperty` and `null/undefined` in code, so we trade them as the same for simplicity. + // But this strategy brings a trouble that `null/undefined` can not be used to remove + // style any more in `emphasis`. Users can both set properties directly on normal and + // emphasis to avoid this issue, or we might support `'none'` for this case if required. + + + targetStyle.extendFrom(hoverStl); + setDefaultHoverFillStroke(targetStyle, hoverStl, 'fill'); + setDefaultHoverFillStroke(targetStyle, hoverStl, 'stroke'); + applyDefaultTextStyle(targetStyle); + + if (!useHoverLayer) { + el.dirty(false); + el.z2 += Z2_EMPHASIS_LIFT; + } +} + +function setDefaultHoverFillStroke(targetStyle, hoverStyle, prop) { + if (!hasFillOrStroke(hoverStyle[prop]) && hasFillOrStroke(targetStyle[prop])) { + targetStyle[prop] = liftColor(targetStyle[prop]); + } +} + +function singleEnterNormal(el) { + var highlighted = el.__highlighted; + + if (!highlighted) { + return; + } + + el.__highlighted = false; + + if (el.isGroup) { + return; + } + + if (highlighted === 'layer') { + el.__zr && el.__zr.removeHover(el); + } else { + var style = el.style; + var normalStl = el.__cachedNormalStl; + + if (normalStl) { + rollbackDefaultTextStyle(style); + el.setStyle(normalStl); + applyDefaultTextStyle(style); + } // `__cachedNormalZ2` will not be reset if calling `setElementHoverStyle` + // when `el` is on emphasis state. So here by comparing with 1, we try + // hard to make the bug case rare. + + + var normalZ2 = el.__cachedNormalZ2; + + if (normalZ2 != null && el.z2 - normalZ2 === Z2_EMPHASIS_LIFT) { + el.z2 = normalZ2; + } + } +} + +function traverseUpdate(el, updater, commonParam) { + // If root is group, also enter updater for `highDownOnUpdate`. + var fromState = NORMAL; + var toState = NORMAL; + var trigger; // See the rule of `highDownOnUpdate` on `graphic.setAsHighDownDispatcher`. + + el.__highlighted && (fromState = EMPHASIS, trigger = true); + updater(el, commonParam); + el.__highlighted && (toState = EMPHASIS, trigger = true); + el.isGroup && el.traverse(function (child) { + !child.isGroup && updater(child, commonParam); + }); + trigger && el.__highDownOnUpdate && el.__highDownOnUpdate(fromState, toState); +} +/** + * Set hover style (namely "emphasis style") of element, based on the current + * style of the given `el`. + * This method should be called after all of the normal styles have been adopted + * to the `el`. See the reason on `setHoverStyle`. + * + * @param {module:zrender/Element} el Should not be `zrender/container/Group`. + * @param {Object} [el.hoverStyle] Can be set on el or its descendants, + * e.g., `el.hoverStyle = ...; graphic.setHoverStyle(el); `. + * Often used when item group has a label element and it's hoverStyle is different. + * @param {Object|boolean} [hoverStl] The specified hover style. + * If set as `false`, disable the hover style. + * Similarly, The `el.hoverStyle` can alse be set + * as `false` to disable the hover style. + * Otherwise, use the default hover style if not provided. + */ + + +function setElementHoverStyle(el, hoverStl) { + // For performance consideration, it might be better to make the "hover style" only the + // difference properties from the "normal style", but not a entire copy of all styles. + hoverStl = el.__hoverStl = hoverStl !== false && (el.hoverStyle || hoverStl || {}); + el.__hoverStlDirty = true; // FIXME + // It is not completely right to save "normal"/"emphasis" flag on elements. + // It probably should be saved on `data` of series. Consider the cases: + // (1) A highlighted elements are moved out of the view port and re-enter + // again by dataZoom. + // (2) call `setOption` and replace elements totally when they are highlighted. + + if (el.__highlighted) { + // Consider the case: + // The styles of a highlighted `el` is being updated. The new "emphasis style" + // should be adapted to the `el`. Notice here new "normal styles" should have + // been set outside and the cached "normal style" is out of date. + el.__cachedNormalStl = null; // Do not clear `__cachedNormalZ2` here, because setting `z2` is not a constraint + // of this method. In most cases, `z2` is not set and hover style should be able + // to rollback. Of course, that would bring bug, but only in a rare case, see + // `doSingleLeaveHover` for details. + + singleEnterNormal(el); + singleEnterEmphasis(el); + } +} + +function onElementMouseOver(e) { + !shouldSilent(this, e) // "emphasis" event highlight has higher priority than mouse highlight. + && !this.__highByOuter && traverseUpdate(this, singleEnterEmphasis); +} + +function onElementMouseOut(e) { + !shouldSilent(this, e) // "emphasis" event highlight has higher priority than mouse highlight. + && !this.__highByOuter && traverseUpdate(this, singleEnterNormal); +} + +function onElementEmphasisEvent(highlightDigit) { + this.__highByOuter |= 1 << (highlightDigit || 0); + traverseUpdate(this, singleEnterEmphasis); +} + +function onElementNormalEvent(highlightDigit) { + !(this.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdate(this, singleEnterNormal); +} + +function shouldSilent(el, e) { + return el.__highDownSilentOnTouch && e.zrByTouch; +} +/** + * Set hover style (namely "emphasis style") of element, + * based on the current style of the given `el`. + * + * (1) + * **CONSTRAINTS** for this method: + * This method MUST be called after all of the normal styles having been adopted + * to the `el`. + * The input `hoverStyle` (that is, "emphasis style") MUST be the subset of the + * "normal style" having been set to the el. + * `color` MUST be one of the "normal styles" (because color might be lifted as + * a default hover style). + * + * The reason: this method treat the current style of the `el` as the "normal style" + * and cache them when enter/update the "emphasis style". Consider the case: the `el` + * is in "emphasis" state and `setOption`/`dispatchAction` trigger the style updating + * logic, where the el should shift from the original emphasis style to the new + * "emphasis style" and should be able to "downplay" back to the new "normal style". + * + * Indeed, it is error-prone to make a interface has so many constraints, but I have + * not found a better solution yet to fit the backward compatibility, performance and + * the current programming style. + * + * (2) + * Call the method for a "root" element once. Do not call it for each descendants. + * If the descendants elemenets of a group has itself hover style different from the + * root group, we can simply mount the style on `el.hoverStyle` for them, but should + * not call this method for them. + * + * (3) These input parameters can be set directly on `el`: + * + * @param {module:zrender/Element} el + * @param {Object} [el.hoverStyle] See `graphic.setElementHoverStyle`. + * @param {boolean} [el.highDownSilentOnTouch=false] See `graphic.setAsHighDownDispatcher`. + * @param {Function} [el.highDownOnUpdate] See `graphic.setAsHighDownDispatcher`. + * @param {Object|boolean} [hoverStyle] See `graphic.setElementHoverStyle`. + */ + + +function setHoverStyle(el, hoverStyle) { + setAsHighDownDispatcher(el, true); + traverseUpdate(el, setElementHoverStyle, hoverStyle); +} +/** + * @param {module:zrender/Element} el + * @param {Function} [el.highDownOnUpdate] Called when state updated. + * Since `setHoverStyle` has the constraint that it must be called after + * all of the normal style updated, `highDownOnUpdate` is not needed to + * trigger if both `fromState` and `toState` is 'normal', and needed to + * trigger if both `fromState` and `toState` is 'emphasis', which enables + * to sync outside style settings to "emphasis" state. + * @this {string} This dispatcher `el`. + * @param {string} fromState Can be "normal" or "emphasis". + * `fromState` might equal to `toState`, + * for example, when this method is called when `el` is + * on "emphasis" state. + * @param {string} toState Can be "normal" or "emphasis". + * + * FIXME + * CAUTION: Do not expose `highDownOnUpdate` outside echarts. + * Because it is not a complete solution. The update + * listener should not have been mount in element, + * and the normal/emphasis state should not have + * mantained on elements. + * + * @param {boolean} [el.highDownSilentOnTouch=false] + * In touch device, mouseover event will be trigger on touchstart event + * (see module:zrender/dom/HandlerProxy). By this mechanism, we can + * conveniently use hoverStyle when tap on touch screen without additional + * code for compatibility. + * But if the chart/component has select feature, which usually also use + * hoverStyle, there might be conflict between 'select-highlight' and + * 'hover-highlight' especially when roam is enabled (see geo for example). + * In this case, `highDownSilentOnTouch` should be used to disable + * hover-highlight on touch device. + * @param {boolean} [asDispatcher=true] If `false`, do not set as "highDownDispatcher". + */ + + +function setAsHighDownDispatcher(el, asDispatcher) { + var disable = asDispatcher === false; // Make `highDownSilentOnTouch` and `highDownOnUpdate` only work after + // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly. + + el.__highDownSilentOnTouch = el.highDownSilentOnTouch; + el.__highDownOnUpdate = el.highDownOnUpdate; // Simple optimize, since this method might be + // called for each elements of a group in some cases. + + if (!disable || el.__highDownDispatcher) { + var method = disable ? 'off' : 'on'; // Duplicated function will be auto-ignored, see Eventful.js. + + el[method]('mouseover', onElementMouseOver)[method]('mouseout', onElementMouseOut); // Emphasis, normal can be triggered manually by API or other components like hover link. + + el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent); // Also keep previous record. + + el.__highByOuter = el.__highByOuter || 0; + el.__highDownDispatcher = !disable; + } +} +/** + * @param {module:zrender/src/Element} el + * @return {boolean} + */ + + +function isHighDownDispatcher(el) { + return !!(el && el.__highDownDispatcher); +} +/** + * Support hightlight/downplay record on each elements. + * For the case: hover highlight/downplay (legend, visualMap, ...) and + * user triggerred hightlight/downplay should not conflict. + * Only all of the highlightDigit cleared, return to normal. + * @param {string} highlightKey + * @return {number} highlightDigit + */ + + +function getHighlightDigit(highlightKey) { + var highlightDigit = _highlightKeyMap[highlightKey]; + + if (highlightDigit == null && _highlightNextDigit <= 32) { + highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++; + } + + return highlightDigit; +} +/** + * See more info in `setTextStyleCommon`. + * @param {Object|module:zrender/graphic/Style} normalStyle + * @param {Object} emphasisStyle + * @param {module:echarts/model/Model} normalModel + * @param {module:echarts/model/Model} emphasisModel + * @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props. + * @param {string|Function} [opt.defaultText] + * @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by + * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {number} [opt.labelDataIndex] Fetch text by + * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {number} [opt.labelDimIndex] Fetch text by + * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {string} [opt.labelProp] Fetch text by + * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)` + * @param {Object} [normalSpecified] + * @param {Object} [emphasisSpecified] + */ + + +function setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisModel, opt, normalSpecified, emphasisSpecified) { + opt = opt || EMPTY_OBJ; + var labelFetcher = opt.labelFetcher; + var labelDataIndex = opt.labelDataIndex; + var labelDimIndex = opt.labelDimIndex; + var labelProp = opt.labelProp; // This scenario, `label.normal.show = true; label.emphasis.show = false`, + // is not supported util someone requests. + + var showNormal = normalModel.getShallow('show'); + var showEmphasis = emphasisModel.getShallow('show'); // Consider performance, only fetch label when necessary. + // If `normal.show` is `false` and `emphasis.show` is `true` and `emphasis.formatter` is not set, + // label should be displayed, where text is fetched by `normal.formatter` or `opt.defaultText`. + + var baseText; + + if (showNormal || showEmphasis) { + if (labelFetcher) { + baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp); + } + + if (baseText == null) { + baseText = zrUtil.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText; + } + } + + var normalStyleText = showNormal ? baseText : null; + var emphasisStyleText = showEmphasis ? zrUtil.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp) : null, baseText) : null; // Optimize: If style.text is null, text will not be drawn. + + if (normalStyleText != null || emphasisStyleText != null) { + // Always set `textStyle` even if `normalStyle.text` is null, because default + // values have to be set on `normalStyle`. + // If we set default values on `emphasisStyle`, consider case: + // Firstly, `setOption(... label: {normal: {text: null}, emphasis: {show: true}} ...);` + // Secondly, `setOption(... label: {noraml: {show: true, text: 'abc', color: 'red'} ...);` + // Then the 'red' will not work on emphasis. + setTextStyle(normalStyle, normalModel, normalSpecified, opt); + setTextStyle(emphasisStyle, emphasisModel, emphasisSpecified, opt, true); + } + + normalStyle.text = normalStyleText; + emphasisStyle.text = emphasisStyleText; +} +/** + * Modify label style manually. + * Only works after `setLabelStyle` and `setElementHoverStyle` called. + * + * @param {module:zrender/src/Element} el + * @param {Object} [normalStyleProps] optional + * @param {Object} [emphasisStyleProps] optional + */ + + +function modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) { + var elStyle = el.style; + + if (normalStyleProps) { + rollbackDefaultTextStyle(elStyle); + el.setStyle(normalStyleProps); + applyDefaultTextStyle(elStyle); + } + + elStyle = el.__hoverStl; + + if (emphasisStyleProps && elStyle) { + rollbackDefaultTextStyle(elStyle); + zrUtil.extend(elStyle, emphasisStyleProps); + applyDefaultTextStyle(elStyle); + } +} +/** + * Set basic textStyle properties. + * See more info in `setTextStyleCommon`. + * @param {Object|module:zrender/graphic/Style} textStyle + * @param {module:echarts/model/Model} model + * @param {Object} [specifiedTextStyle] Can be overrided by settings in model. + * @param {Object} [opt] See `opt` of `setTextStyleCommon`. + * @param {boolean} [isEmphasis] + */ + + +function setTextStyle(textStyle, textStyleModel, specifiedTextStyle, opt, isEmphasis) { + setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis); + specifiedTextStyle && zrUtil.extend(textStyle, specifiedTextStyle); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false); + + return textStyle; +} +/** + * Set text option in the style. + * See more info in `setTextStyleCommon`. + * @deprecated + * @param {Object} textStyle + * @param {module:echarts/model/Model} labelModel + * @param {string|boolean} defaultColor Default text color. + * If set as false, it will be processed as a emphasis style. + */ + + +function setText(textStyle, labelModel, defaultColor) { + var opt = { + isRectText: true + }; + var isEmphasis; + + if (defaultColor === false) { + isEmphasis = true; + } else { + // Support setting color as 'auto' to get visual color. + opt.autoColor = defaultColor; + } + + setTextStyleCommon(textStyle, labelModel, opt, isEmphasis); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false); +} +/** + * The uniform entry of set text style, that is, retrieve style definitions + * from `model` and set to `textStyle` object. + * + * Never in merge mode, but in overwrite mode, that is, all of the text style + * properties will be set. (Consider the states of normal and emphasis and + * default value can be adopted, merge would make the logic too complicated + * to manage.) + * + * The `textStyle` object can either be a plain object or an instance of + * `zrender/src/graphic/Style`, and either be the style of normal or emphasis. + * After this mothod called, the `textStyle` object can then be used in + * `el.setStyle(textStyle)` or `el.hoverStyle = textStyle`. + * + * Default value will be adopted and `insideRollbackOpt` will be created. + * See `applyDefaultTextStyle` `rollbackDefaultTextStyle` for more details. + * + * opt: { + * disableBox: boolean, Whether diable drawing box of block (outer most). + * isRectText: boolean, + * autoColor: string, specify a color when color is 'auto', + * for textFill, textStroke, textBackgroundColor, and textBorderColor. + * If autoColor specified, it is used as default textFill. + * useInsideStyle: + * `true`: Use inside style (textFill, textStroke, textStrokeWidth) + * if `textFill` is not specified. + * `false`: Do not use inside style. + * `null/undefined`: use inside style if `isRectText` is true and + * `textFill` is not specified and textPosition contains `'inside'`. + * forceRich: boolean + * } + */ + + +function setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis) { + // Consider there will be abnormal when merge hover style to normal style if given default value. + opt = opt || EMPTY_OBJ; + + if (opt.isRectText) { + var textPosition; + + if (opt.getTextPosition) { + textPosition = opt.getTextPosition(textStyleModel, isEmphasis); + } else { + textPosition = textStyleModel.getShallow('position') || (isEmphasis ? null : 'inside'); // 'outside' is not a valid zr textPostion value, but used + // in bar series, and magric type should be considered. + + textPosition === 'outside' && (textPosition = 'top'); + } + + textStyle.textPosition = textPosition; + textStyle.textOffset = textStyleModel.getShallow('offset'); + var labelRotate = textStyleModel.getShallow('rotate'); + labelRotate != null && (labelRotate *= Math.PI / 180); + textStyle.textRotation = labelRotate; + textStyle.textDistance = zrUtil.retrieve2(textStyleModel.getShallow('distance'), isEmphasis ? null : 5); + } + + var ecModel = textStyleModel.ecModel; + var globalTextStyle = ecModel && ecModel.option.textStyle; // Consider case: + // { + // data: [{ + // value: 12, + // label: { + // rich: { + // // no 'a' here but using parent 'a'. + // } + // } + // }], + // rich: { + // a: { ... } + // } + // } + + var richItemNames = getRichItemNames(textStyleModel); + var richResult; + + if (richItemNames) { + richResult = {}; + + for (var name in richItemNames) { + if (richItemNames.hasOwnProperty(name)) { + // Cascade is supported in rich. + var richTextStyle = textStyleModel.getModel(['rich', name]); // In rich, never `disableBox`. + // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`, + // the default color `'blue'` will not be adopted if no color declared in `rich`. + // That might confuses users. So probably we should put `textStyleModel` as the + // root ancestor of the `richTextStyle`. But that would be a break change. + + setTokenTextStyle(richResult[name] = {}, richTextStyle, globalTextStyle, opt, isEmphasis); + } + } + } + + textStyle.rich = richResult; + setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, true); + + if (opt.forceRich && !opt.textStyle) { + opt.textStyle = {}; + } + + return textStyle; +} // Consider case: +// { +// data: [{ +// value: 12, +// label: { +// rich: { +// // no 'a' here but using parent 'a'. +// } +// } +// }], +// rich: { +// a: { ... } +// } +// } + + +function getRichItemNames(textStyleModel) { + // Use object to remove duplicated names. + var richItemNameMap; + + while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { + var rich = (textStyleModel.option || EMPTY_OBJ).rich; + + if (rich) { + richItemNameMap = richItemNameMap || {}; + + for (var name in rich) { + if (rich.hasOwnProperty(name)) { + richItemNameMap[name] = 1; + } + } + } + + textStyleModel = textStyleModel.parentModel; + } + + return richItemNameMap; +} + +function setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, isBlock) { + // In merge mode, default value should not be given. + globalTextStyle = !isEmphasis && globalTextStyle || EMPTY_OBJ; + textStyle.textFill = getAutoColor(textStyleModel.getShallow('color'), opt) || globalTextStyle.color; + textStyle.textStroke = getAutoColor(textStyleModel.getShallow('textBorderColor'), opt) || globalTextStyle.textBorderColor; + textStyle.textStrokeWidth = zrUtil.retrieve2(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth); + + if (!isEmphasis) { + if (isBlock) { + textStyle.insideRollbackOpt = opt; + applyDefaultTextStyle(textStyle); + } // Set default finally. + + + if (textStyle.textFill == null) { + textStyle.textFill = opt.autoColor; + } + } // Do not use `getFont` here, because merge should be supported, where + // part of these properties may be changed in emphasis style, and the + // others should remain their original value got from normal style. + + + textStyle.fontStyle = textStyleModel.getShallow('fontStyle') || globalTextStyle.fontStyle; + textStyle.fontWeight = textStyleModel.getShallow('fontWeight') || globalTextStyle.fontWeight; + textStyle.fontSize = textStyleModel.getShallow('fontSize') || globalTextStyle.fontSize; + textStyle.fontFamily = textStyleModel.getShallow('fontFamily') || globalTextStyle.fontFamily; + textStyle.textAlign = textStyleModel.getShallow('align'); + textStyle.textVerticalAlign = textStyleModel.getShallow('verticalAlign') || textStyleModel.getShallow('baseline'); + textStyle.textLineHeight = textStyleModel.getShallow('lineHeight'); + textStyle.textWidth = textStyleModel.getShallow('width'); + textStyle.textHeight = textStyleModel.getShallow('height'); + textStyle.textTag = textStyleModel.getShallow('tag'); + + if (!isBlock || !opt.disableBox) { + textStyle.textBackgroundColor = getAutoColor(textStyleModel.getShallow('backgroundColor'), opt); + textStyle.textPadding = textStyleModel.getShallow('padding'); + textStyle.textBorderColor = getAutoColor(textStyleModel.getShallow('borderColor'), opt); + textStyle.textBorderWidth = textStyleModel.getShallow('borderWidth'); + textStyle.textBorderRadius = textStyleModel.getShallow('borderRadius'); + textStyle.textBoxShadowColor = textStyleModel.getShallow('shadowColor'); + textStyle.textBoxShadowBlur = textStyleModel.getShallow('shadowBlur'); + textStyle.textBoxShadowOffsetX = textStyleModel.getShallow('shadowOffsetX'); + textStyle.textBoxShadowOffsetY = textStyleModel.getShallow('shadowOffsetY'); + } + + textStyle.textShadowColor = textStyleModel.getShallow('textShadowColor') || globalTextStyle.textShadowColor; + textStyle.textShadowBlur = textStyleModel.getShallow('textShadowBlur') || globalTextStyle.textShadowBlur; + textStyle.textShadowOffsetX = textStyleModel.getShallow('textShadowOffsetX') || globalTextStyle.textShadowOffsetX; + textStyle.textShadowOffsetY = textStyleModel.getShallow('textShadowOffsetY') || globalTextStyle.textShadowOffsetY; +} + +function getAutoColor(color, opt) { + return color !== 'auto' ? color : opt && opt.autoColor ? opt.autoColor : null; +} +/** + * Give some default value to the input `textStyle` object, based on the current settings + * in this `textStyle` object. + * + * The Scenario: + * when text position is `inside` and `textFill` is not specified, we show + * text border by default for better view. But it should be considered that text position + * might be changed when hovering or being emphasis, where the `insideRollback` is used to + * restore the style. + * + * Usage (& NOTICE): + * When a style object (eithor plain object or instance of `zrender/src/graphic/Style`) is + * about to be modified on its text related properties, `rollbackDefaultTextStyle` should + * be called before the modification and `applyDefaultTextStyle` should be called after that. + * (For the case that all of the text related properties is reset, like `setTextStyleCommon` + * does, `rollbackDefaultTextStyle` is not needed to be called). + */ + + +function applyDefaultTextStyle(textStyle) { + var textPosition = textStyle.textPosition; + var opt = textStyle.insideRollbackOpt; + var insideRollback; + + if (opt && textStyle.textFill == null) { + var autoColor = opt.autoColor; + var isRectText = opt.isRectText; + var useInsideStyle = opt.useInsideStyle; + var useInsideStyleCache = useInsideStyle !== false && (useInsideStyle === true || isRectText && textPosition // textPosition can be [10, 30] + && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0); + var useAutoColorCache = !useInsideStyleCache && autoColor != null; // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached. + + if (useInsideStyleCache || useAutoColorCache) { + insideRollback = { + textFill: textStyle.textFill, + textStroke: textStyle.textStroke, + textStrokeWidth: textStyle.textStrokeWidth + }; + } + + if (useInsideStyleCache) { + textStyle.textFill = '#fff'; // Consider text with #fff overflow its container. + + if (textStyle.textStroke == null) { + textStyle.textStroke = autoColor; + textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2); + } + } + + if (useAutoColorCache) { + textStyle.textFill = autoColor; + } + } // Always set `insideRollback`, so that the previous one can be cleared. + + + textStyle.insideRollback = insideRollback; +} +/** + * Consider the case: in a scatter, + * label: { + * normal: {position: 'inside'}, + * emphasis: {position: 'top'} + * } + * In the normal state, the `textFill` will be set as '#fff' for pretty view (see + * `applyDefaultTextStyle`), but when switching to emphasis state, the `textFill` + * should be retured to 'autoColor', but not keep '#fff'. + */ + + +function rollbackDefaultTextStyle(style) { + var insideRollback = style.insideRollback; + + if (insideRollback) { + // Reset all of the props in `CACHED_LABEL_STYLE_PROPERTIES`. + style.textFill = insideRollback.textFill; + style.textStroke = insideRollback.textStroke; + style.textStrokeWidth = insideRollback.textStrokeWidth; + style.insideRollback = null; + } +} + +function getFont(opt, ecModel) { + var gTextStyleModel = ecModel && ecModel.getModel('textStyle'); + return zrUtil.trim([// FIXME in node-canvas fontWeight is before fontStyle + opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' ')); +} + +function animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb) { + if (typeof dataIndex === 'function') { + cb = dataIndex; + dataIndex = null; + } // Do not check 'animation' property directly here. Consider this case: + // animation model is an `itemModel`, whose does not have `isAnimationEnabled` + // but its parent model (`seriesModel`) does. + + + var animationEnabled = animatableModel && animatableModel.isAnimationEnabled(); + + if (animationEnabled) { + var postfix = isUpdate ? 'Update' : ''; + var duration = animatableModel.getShallow('animationDuration' + postfix); + var animationEasing = animatableModel.getShallow('animationEasing' + postfix); + var animationDelay = animatableModel.getShallow('animationDelay' + postfix); + + if (typeof animationDelay === 'function') { + animationDelay = animationDelay(dataIndex, animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null); + } + + if (typeof duration === 'function') { + duration = duration(dataIndex); + } + + duration > 0 ? el.animateTo(props, duration, animationDelay || 0, animationEasing, cb, !!cb) : (el.stopAnimation(), el.attr(props), cb && cb()); + } else { + el.stopAnimation(); + el.attr(props); + cb && cb(); + } +} +/** + * Update graphic element properties with or without animation according to the + * configuration in series. + * + * Caution: this method will stop previous animation. + * So do not use this method to one element twice before + * animation starts, unless you know what you are doing. + * + * @param {module:zrender/Element} el + * @param {Object} props + * @param {module:echarts/model/Model} [animatableModel] + * @param {number} [dataIndex] + * @param {Function} [cb] + * @example + * graphic.updateProps(el, { + * position: [100, 100] + * }, seriesModel, dataIndex, function () { console.log('Animation done!'); }); + * // Or + * graphic.updateProps(el, { + * position: [100, 100] + * }, seriesModel, function () { console.log('Animation done!'); }); + */ + + +function updateProps(el, props, animatableModel, dataIndex, cb) { + animateOrSetProps(true, el, props, animatableModel, dataIndex, cb); +} +/** + * Init graphic element properties with or without animation according to the + * configuration in series. + * + * Caution: this method will stop previous animation. + * So do not use this method to one element twice before + * animation starts, unless you know what you are doing. + * + * @param {module:zrender/Element} el + * @param {Object} props + * @param {module:echarts/model/Model} [animatableModel] + * @param {number} [dataIndex] + * @param {Function} cb + */ + + +function initProps(el, props, animatableModel, dataIndex, cb) { + animateOrSetProps(false, el, props, animatableModel, dataIndex, cb); +} +/** + * Get transform matrix of target (param target), + * in coordinate of its ancestor (param ancestor) + * + * @param {module:zrender/mixin/Transformable} target + * @param {module:zrender/mixin/Transformable} [ancestor] + */ + + +function getTransform(target, ancestor) { + var mat = matrix.identity([]); + + while (target && target !== ancestor) { + matrix.mul(mat, target.getLocalTransform(), mat); + target = target.parent; + } + + return mat; +} +/** + * Apply transform to an vertex. + * @param {Array.} target [x, y] + * @param {Array.|TypedArray.|Object} transform Can be: + * + Transform matrix: like [1, 0, 0, 1, 0, 0] + * + {position, rotation, scale}, the same as `zrender/Transformable`. + * @param {boolean=} invert Whether use invert matrix. + * @return {Array.} [x, y] + */ + + +function applyTransform(target, transform, invert) { + if (transform && !zrUtil.isArrayLike(transform)) { + transform = Transformable.getLocalTransform(transform); + } + + if (invert) { + transform = matrix.invert([], transform); + } + + return vector.applyTransform([], target, transform); +} +/** + * @param {string} direction 'left' 'right' 'top' 'bottom' + * @param {Array.} transform Transform matrix: like [1, 0, 0, 1, 0, 0] + * @param {boolean=} invert Whether use invert matrix. + * @return {string} Transformed direction. 'left' 'right' 'top' 'bottom' + */ + + +function transformDirection(direction, transform, invert) { + // Pick a base, ensure that transform result will not be (0, 0). + var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]); + var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]); + var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0]; + vertex = applyTransform(vertex, transform, invert); + return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top'; +} +/** + * Apply group transition animation from g1 to g2. + * If no animatableModel, no animation. + */ + + +function groupTransition(g1, g2, animatableModel, cb) { + if (!g1 || !g2) { + return; + } + + function getElMap(g) { + var elMap = {}; + g.traverse(function (el) { + if (!el.isGroup && el.anid) { + elMap[el.anid] = el; + } + }); + return elMap; + } + + function getAnimatableProps(el) { + var obj = { + position: vector.clone(el.position), + rotation: el.rotation + }; + + if (el.shape) { + obj.shape = zrUtil.extend({}, el.shape); + } + + return obj; + } + + var elMap1 = getElMap(g1); + g2.traverse(function (el) { + if (!el.isGroup && el.anid) { + var oldEl = elMap1[el.anid]; + + if (oldEl) { + var newProp = getAnimatableProps(el); + el.attr(getAnimatableProps(oldEl)); + updateProps(el, newProp, animatableModel, el.dataIndex); + } // else { + // if (el.previousProps) { + // graphic.updateProps + // } + // } + + } + }); +} +/** + * @param {Array.>} points Like: [[23, 44], [53, 66], ...] + * @param {Object} rect {x, y, width, height} + * @return {Array.>} A new clipped points. + */ + + +function clipPointsByRect(points, rect) { + // FIXME: this way migth be incorrect when grpahic clipped by a corner. + // and when element have border. + return zrUtil.map(points, function (point) { + var x = point[0]; + x = mathMax(x, rect.x); + x = mathMin(x, rect.x + rect.width); + var y = point[1]; + y = mathMax(y, rect.y); + y = mathMin(y, rect.y + rect.height); + return [x, y]; + }); +} +/** + * @param {Object} targetRect {x, y, width, height} + * @param {Object} rect {x, y, width, height} + * @return {Object} A new clipped rect. If rect size are negative, return undefined. + */ + + +function clipRectByRect(targetRect, rect) { + var x = mathMax(targetRect.x, rect.x); + var x2 = mathMin(targetRect.x + targetRect.width, rect.x + rect.width); + var y = mathMax(targetRect.y, rect.y); + var y2 = mathMin(targetRect.y + targetRect.height, rect.y + rect.height); // If the total rect is cliped, nothing, including the border, + // should be painted. So return undefined. + + if (x2 >= x && y2 >= y) { + return { + x: x, + y: y, + width: x2 - x, + height: y2 - y + }; + } +} +/** + * @param {string} iconStr Support 'image://' or 'path://' or direct svg path. + * @param {Object} [opt] Properties of `module:zrender/Element`, except `style`. + * @param {Object} [rect] {x, y, width, height} + * @return {module:zrender/Element} Icon path or image element. + */ + + +function createIcon(iconStr, opt, rect) { + opt = zrUtil.extend({ + rectHover: true + }, opt); + var style = opt.style = { + strokeNoScale: true + }; + rect = rect || { + x: -1, + y: -1, + width: 2, + height: 2 + }; + + if (iconStr) { + return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), zrUtil.defaults(style, rect), new ZImage(opt)) : makePath(iconStr.replace('path://', ''), opt, rect, 'center'); + } +} +/** + * Return `true` if the given line (line `a`) and the given polygon + * are intersect. + * Note that we do not count colinear as intersect here because no + * requirement for that. We could do that if required in future. + * + * @param {number} a1x + * @param {number} a1y + * @param {number} a2x + * @param {number} a2y + * @param {Array.>} points Points of the polygon. + * @return {boolean} + */ + + +function linePolygonIntersect(a1x, a1y, a2x, a2y, points) { + for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) { + var p = points[i]; + + if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) { + return true; + } + + p2 = p; + } +} +/** + * Return `true` if the given two lines (line `a` and line `b`) + * are intersect. + * Note that we do not count colinear as intersect here because no + * requirement for that. We could do that if required in future. + * + * @param {number} a1x + * @param {number} a1y + * @param {number} a2x + * @param {number} a2y + * @param {number} b1x + * @param {number} b1y + * @param {number} b2x + * @param {number} b2y + * @return {boolean} + */ + + +function lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { + // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`. + var mx = a2x - a1x; + var my = a2y - a1y; + var nx = b2x - b1x; + var ny = b2y - b1y; // `vec_m` and `vec_n` are parallel iff + // exising `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`. + + var nmCrossProduct = crossProduct2d(nx, ny, mx, my); + + if (nearZero(nmCrossProduct)) { + return false; + } // `vec_m` and `vec_n` are intersect iff + // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`, + // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)` + // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`. + + + var b1a1x = a1x - b1x; + var b1a1y = a1y - b1y; + var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct; + + if (q < 0 || q > 1) { + return false; + } + + var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct; + + if (p < 0 || p > 1) { + return false; + } + + return true; +} +/** + * Cross product of 2-dimension vector. + */ + + +function crossProduct2d(x1, y1, x2, y2) { + return x1 * y2 - x2 * y1; +} + +function nearZero(val) { + return val <= 1e-6 && val >= -1e-6; +} // Register built-in shapes. These shapes might be overwirtten +// by users, although we do not recommend that. + + +registerShape('circle', Circle); +registerShape('sector', Sector); +registerShape('ring', Ring); +registerShape('polygon', Polygon); +registerShape('polyline', Polyline); +registerShape('rect', Rect); +registerShape('line', Line); +registerShape('bezierCurve', BezierCurve); +registerShape('arc', Arc); +exports.Z2_EMPHASIS_LIFT = Z2_EMPHASIS_LIFT; +exports.CACHED_LABEL_STYLE_PROPERTIES = CACHED_LABEL_STYLE_PROPERTIES; +exports.extendShape = extendShape; +exports.extendPath = extendPath; +exports.registerShape = registerShape; +exports.getShapeClass = getShapeClass; +exports.makePath = makePath; +exports.makeImage = makeImage; +exports.mergePath = mergePath; +exports.resizePath = resizePath; +exports.subPixelOptimizeLine = subPixelOptimizeLine; +exports.subPixelOptimizeRect = subPixelOptimizeRect; +exports.subPixelOptimize = subPixelOptimize; +exports.setElementHoverStyle = setElementHoverStyle; +exports.setHoverStyle = setHoverStyle; +exports.setAsHighDownDispatcher = setAsHighDownDispatcher; +exports.isHighDownDispatcher = isHighDownDispatcher; +exports.getHighlightDigit = getHighlightDigit; +exports.setLabelStyle = setLabelStyle; +exports.modifyLabelStyle = modifyLabelStyle; +exports.setTextStyle = setTextStyle; +exports.setText = setText; +exports.getFont = getFont; +exports.updateProps = updateProps; +exports.initProps = initProps; +exports.getTransform = getTransform; +exports.applyTransform = applyTransform; +exports.transformDirection = transformDirection; +exports.groupTransition = groupTransition; +exports.clipPointsByRect = clipPointsByRect; +exports.clipRectByRect = clipRectByRect; +exports.createIcon = createIcon; +exports.linePolygonIntersect = linePolygonIntersect; +exports.lineLineIntersect = lineLineIntersect; + +/***/ }), + +/***/ "2325": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var eventTool = __webpack_require__("607d"); + +var graphic = __webpack_require__("2306"); + +var throttle = __webpack_require__("88b3"); + +var DataZoomView = __webpack_require__("7dcf"); + +var numberUtil = __webpack_require__("3842"); + +var layout = __webpack_require__("f934"); + +var sliderMove = __webpack_require__("ef6a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var Rect = graphic.Rect; +var linearMap = numberUtil.linearMap; +var asc = numberUtil.asc; +var bind = zrUtil.bind; +var each = zrUtil.each; // Constants + +var DEFAULT_LOCATION_EDGE_GAP = 7; +var DEFAULT_FRAME_BORDER_WIDTH = 1; +var DEFAULT_FILLER_SIZE = 30; +var HORIZONTAL = 'horizontal'; +var VERTICAL = 'vertical'; +var LABEL_GAP = 5; +var SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter']; +var SliderZoomView = DataZoomView.extend({ + type: 'dataZoom.slider', + init: function (ecModel, api) { + /** + * @private + * @type {Object} + */ + this._displayables = {}; + /** + * @private + * @type {string} + */ + + this._orient; + /** + * [0, 100] + * @private + */ + + this._range; + /** + * [coord of the first handle, coord of the second handle] + * @private + */ + + this._handleEnds; + /** + * [length, thick] + * @private + * @type {Array.} + */ + + this._size; + /** + * @private + * @type {number} + */ + + this._handleWidth; + /** + * @private + * @type {number} + */ + + this._handleHeight; + /** + * @private + */ + + this._location; + /** + * @private + */ + + this._dragging; + /** + * @private + */ + + this._dataShadowInfo; + this.api = api; + }, + + /** + * @override + */ + render: function (dataZoomModel, ecModel, api, payload) { + SliderZoomView.superApply(this, 'render', arguments); + throttle.createOrUpdate(this, '_dispatchZoomAction', this.dataZoomModel.get('throttle'), 'fixRate'); + this._orient = dataZoomModel.get('orient'); + + if (this.dataZoomModel.get('show') === false) { + this.group.removeAll(); + return; + } // Notice: this._resetInterval() should not be executed when payload.type + // is 'dataZoom', origin this._range should be maintained, otherwise 'pan' + // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction, + + + if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) { + this._buildView(); + } + + this._updateView(); + }, + + /** + * @override + */ + remove: function () { + SliderZoomView.superApply(this, 'remove', arguments); + throttle.clear(this, '_dispatchZoomAction'); + }, + + /** + * @override + */ + dispose: function () { + SliderZoomView.superApply(this, 'dispose', arguments); + throttle.clear(this, '_dispatchZoomAction'); + }, + _buildView: function () { + var thisGroup = this.group; + thisGroup.removeAll(); + + this._resetLocation(); + + this._resetInterval(); + + var barGroup = this._displayables.barGroup = new graphic.Group(); + + this._renderBackground(); + + this._renderHandle(); + + this._renderDataShadow(); + + thisGroup.add(barGroup); + + this._positionGroup(); + }, + + /** + * @private + */ + _resetLocation: function () { + var dataZoomModel = this.dataZoomModel; + var api = this.api; // If some of x/y/width/height are not specified, + // auto-adapt according to target grid. + + var coordRect = this._findCoordRect(); + + var ecSize = { + width: api.getWidth(), + height: api.getHeight() + }; // Default align by coordinate system rect. + + var positionInfo = this._orient === HORIZONTAL ? { + // Why using 'right', because right should be used in vertical, + // and it is better to be consistent for dealing with position param merge. + right: ecSize.width - coordRect.x - coordRect.width, + top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP, + width: coordRect.width, + height: DEFAULT_FILLER_SIZE + } : { + // vertical + right: DEFAULT_LOCATION_EDGE_GAP, + top: coordRect.y, + width: DEFAULT_FILLER_SIZE, + height: coordRect.height + }; // Do not write back to option and replace value 'ph', because + // the 'ph' value should be recalculated when resize. + + var layoutParams = layout.getLayoutParams(dataZoomModel.option); // Replace the placeholder value. + + zrUtil.each(['right', 'top', 'width', 'height'], function (name) { + if (layoutParams[name] === 'ph') { + layoutParams[name] = positionInfo[name]; + } + }); + var layoutRect = layout.getLayoutRect(layoutParams, ecSize, dataZoomModel.padding); + this._location = { + x: layoutRect.x, + y: layoutRect.y + }; + this._size = [layoutRect.width, layoutRect.height]; + this._orient === VERTICAL && this._size.reverse(); + }, + + /** + * @private + */ + _positionGroup: function () { + var thisGroup = this.group; + var location = this._location; + var orient = this._orient; // Just use the first axis to determine mapping. + + var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel(); + var inverse = targetAxisModel && targetAxisModel.get('inverse'); + var barGroup = this._displayables.barGroup; + var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse; // Transform barGroup. + + barGroup.attr(orient === HORIZONTAL && !inverse ? { + scale: otherAxisInverse ? [1, 1] : [1, -1] + } : orient === HORIZONTAL && inverse ? { + scale: otherAxisInverse ? [-1, 1] : [-1, -1] + } : orient === VERTICAL && !inverse ? { + scale: otherAxisInverse ? [1, -1] : [1, 1], + rotation: Math.PI / 2 // Dont use Math.PI, considering shadow direction. + + } : { + scale: otherAxisInverse ? [-1, -1] : [-1, 1], + rotation: Math.PI / 2 + }); // Position barGroup + + var rect = thisGroup.getBoundingRect([barGroup]); + thisGroup.attr('position', [location.x - rect.x, location.y - rect.y]); + }, + + /** + * @private + */ + _getViewExtent: function () { + return [0, this._size[0]]; + }, + _renderBackground: function () { + var dataZoomModel = this.dataZoomModel; + var size = this._size; + var barGroup = this._displayables.barGroup; + barGroup.add(new Rect({ + silent: true, + shape: { + x: 0, + y: 0, + width: size[0], + height: size[1] + }, + style: { + fill: dataZoomModel.get('backgroundColor') + }, + z2: -40 + })); // Click panel, over shadow, below handles. + + barGroup.add(new Rect({ + shape: { + x: 0, + y: 0, + width: size[0], + height: size[1] + }, + style: { + fill: 'transparent' + }, + z2: 0, + onclick: zrUtil.bind(this._onClickPanelClick, this) + })); + }, + _renderDataShadow: function () { + var info = this._dataShadowInfo = this._prepareDataShadowInfo(); + + if (!info) { + return; + } + + var size = this._size; + var seriesModel = info.series; + var data = seriesModel.getRawData(); + var otherDim = seriesModel.getShadowDim ? seriesModel.getShadowDim() // @see candlestick + : info.otherDim; + + if (otherDim == null) { + return; + } + + var otherDataExtent = data.getDataExtent(otherDim); // Nice extent. + + var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3; + otherDataExtent = [otherDataExtent[0] - otherOffset, otherDataExtent[1] + otherOffset]; + var otherShadowExtent = [0, size[1]]; + var thisShadowExtent = [0, size[0]]; + var areaPoints = [[size[0], 0], [0, 0]]; + var linePoints = []; + var step = thisShadowExtent[1] / (data.count() - 1); + var thisCoord = 0; // Optimize for large data shadow + + var stride = Math.round(data.count() / size[0]); + var lastIsEmpty; + data.each([otherDim], function (value, index) { + if (stride > 0 && index % stride) { + thisCoord += step; + return; + } // FIXME + // Should consider axis.min/axis.max when drawing dataShadow. + // FIXME + // 应该使用统一的空判断?还是在list里进行空判断? + + + var isEmpty = value == null || isNaN(value) || value === ''; // See #4235. + + var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent, otherShadowExtent, true); // Attempt to draw data shadow precisely when there are empty value. + + if (isEmpty && !lastIsEmpty && index) { + areaPoints.push([areaPoints[areaPoints.length - 1][0], 0]); + linePoints.push([linePoints[linePoints.length - 1][0], 0]); + } else if (!isEmpty && lastIsEmpty) { + areaPoints.push([thisCoord, 0]); + linePoints.push([thisCoord, 0]); + } + + areaPoints.push([thisCoord, otherCoord]); + linePoints.push([thisCoord, otherCoord]); + thisCoord += step; + lastIsEmpty = isEmpty; + }); + var dataZoomModel = this.dataZoomModel; // var dataBackgroundModel = dataZoomModel.getModel('dataBackground'); + + this._displayables.barGroup.add(new graphic.Polygon({ + shape: { + points: areaPoints + }, + style: zrUtil.defaults({ + fill: dataZoomModel.get('dataBackgroundColor') + }, dataZoomModel.getModel('dataBackground.areaStyle').getAreaStyle()), + silent: true, + z2: -20 + })); + + this._displayables.barGroup.add(new graphic.Polyline({ + shape: { + points: linePoints + }, + style: dataZoomModel.getModel('dataBackground.lineStyle').getLineStyle(), + silent: true, + z2: -19 + })); + }, + _prepareDataShadowInfo: function () { + var dataZoomModel = this.dataZoomModel; + var showDataShadow = dataZoomModel.get('showDataShadow'); + + if (showDataShadow === false) { + return; + } // Find a representative series. + + + var result; + var ecModel = this.ecModel; + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) { + var seriesModels = dataZoomModel.getAxisProxy(dimNames.name, axisIndex).getTargetSeriesModels(); + zrUtil.each(seriesModels, function (seriesModel) { + if (result) { + return; + } + + if (showDataShadow !== true && zrUtil.indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) { + return; + } + + var thisAxis = ecModel.getComponent(dimNames.axis, axisIndex).axis; + var otherDim = getOtherDim(dimNames.name); + var otherAxisInverse; + var coordSys = seriesModel.coordinateSystem; + + if (otherDim != null && coordSys.getOtherAxis) { + otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse; + } + + otherDim = seriesModel.getData().mapDimension(otherDim); + result = { + thisAxis: thisAxis, + series: seriesModel, + thisDim: dimNames.name, + otherDim: otherDim, + otherAxisInverse: otherAxisInverse + }; + }, this); + }, this); + return result; + }, + _renderHandle: function () { + var displaybles = this._displayables; + var handles = displaybles.handles = []; + var handleLabels = displaybles.handleLabels = []; + var barGroup = this._displayables.barGroup; + var size = this._size; + var dataZoomModel = this.dataZoomModel; + barGroup.add(displaybles.filler = new Rect({ + draggable: true, + cursor: getCursor(this._orient), + drift: bind(this._onDragMove, this, 'all'), + ondragstart: bind(this._showDataInfo, this, true), + ondragend: bind(this._onDragEnd, this), + onmouseover: bind(this._showDataInfo, this, true), + onmouseout: bind(this._showDataInfo, this, false), + style: { + fill: dataZoomModel.get('fillerColor'), + textPosition: 'inside' + } + })); // Frame border. + + barGroup.add(new Rect({ + silent: true, + subPixelOptimize: true, + shape: { + x: 0, + y: 0, + width: size[0], + height: size[1] + }, + style: { + stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'), + lineWidth: DEFAULT_FRAME_BORDER_WIDTH, + fill: 'rgba(0,0,0,0)' + } + })); + each([0, 1], function (handleIndex) { + var path = graphic.createIcon(dataZoomModel.get('handleIcon'), { + cursor: getCursor(this._orient), + draggable: true, + drift: bind(this._onDragMove, this, handleIndex), + ondragend: bind(this._onDragEnd, this), + onmouseover: bind(this._showDataInfo, this, true), + onmouseout: bind(this._showDataInfo, this, false) + }, { + x: -1, + y: 0, + width: 2, + height: 2 + }); + var bRect = path.getBoundingRect(); + this._handleHeight = numberUtil.parsePercent(dataZoomModel.get('handleSize'), this._size[1]); + this._handleWidth = bRect.width / bRect.height * this._handleHeight; + path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle()); + var handleColor = dataZoomModel.get('handleColor'); // Compatitable with previous version + + if (handleColor != null) { + path.style.fill = handleColor; + } + + barGroup.add(handles[handleIndex] = path); + var textStyleModel = dataZoomModel.textStyleModel; + this.group.add(handleLabels[handleIndex] = new graphic.Text({ + silent: true, + invisible: true, + style: { + x: 0, + y: 0, + text: '', + textVerticalAlign: 'middle', + textAlign: 'center', + textFill: textStyleModel.getTextColor(), + textFont: textStyleModel.getFont() + }, + z2: 10 + })); + }, this); + }, + + /** + * @private + */ + _resetInterval: function () { + var range = this._range = this.dataZoomModel.getPercentRange(); + + var viewExtent = this._getViewExtent(); + + this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)]; + }, + + /** + * @private + * @param {(number|string)} handleIndex 0 or 1 or 'all' + * @param {number} delta + * @return {boolean} changed + */ + _updateInterval: function (handleIndex, delta) { + var dataZoomModel = this.dataZoomModel; + var handleEnds = this._handleEnds; + + var viewExtend = this._getViewExtent(); + + var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); + var percentExtent = [0, 100]; + sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null); + var lastRange = this._range; + var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]); + return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1]; + }, + + /** + * @private + */ + _updateView: function (nonRealtime) { + var displaybles = this._displayables; + var handleEnds = this._handleEnds; + var handleInterval = asc(handleEnds.slice()); + var size = this._size; + each([0, 1], function (handleIndex) { + // Handles + var handle = displaybles.handles[handleIndex]; + var handleHeight = this._handleHeight; + handle.attr({ + scale: [handleHeight / 2, handleHeight / 2], + position: [handleEnds[handleIndex], size[1] / 2 - handleHeight / 2] + }); + }, this); // Filler + + displaybles.filler.setShape({ + x: handleInterval[0], + y: 0, + width: handleInterval[1] - handleInterval[0], + height: size[1] + }); + + this._updateDataInfo(nonRealtime); + }, + + /** + * @private + */ + _updateDataInfo: function (nonRealtime) { + var dataZoomModel = this.dataZoomModel; + var displaybles = this._displayables; + var handleLabels = displaybles.handleLabels; + var orient = this._orient; + var labelTexts = ['', '']; // FIXME + // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter) + + if (dataZoomModel.get('showDetail')) { + var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); + + if (axisProxy) { + var axis = axisProxy.getAxisModel().axis; + var range = this._range; + var dataInterval = nonRealtime // See #4434, data and axis are not processed and reset yet in non-realtime mode. + ? axisProxy.calculateDataWindow({ + start: range[0], + end: range[1] + }).valueWindow : axisProxy.getDataValueWindow(); + labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)]; + } + } + + var orderedHandleEnds = asc(this._handleEnds.slice()); + setLabel.call(this, 0); + setLabel.call(this, 1); + + function setLabel(handleIndex) { + // Label + // Text should not transform by barGroup. + // Ignore handlers transform + var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group); + var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform); + var offset = this._handleWidth / 2 + LABEL_GAP; + var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform); + handleLabels[handleIndex].setStyle({ + x: textPoint[0], + y: textPoint[1], + textVerticalAlign: orient === HORIZONTAL ? 'middle' : direction, + textAlign: orient === HORIZONTAL ? direction : 'center', + text: labelTexts[handleIndex] + }); + } + }, + + /** + * @private + */ + _formatLabel: function (value, axis) { + var dataZoomModel = this.dataZoomModel; + var labelFormatter = dataZoomModel.get('labelFormatter'); + var labelPrecision = dataZoomModel.get('labelPrecision'); + + if (labelPrecision == null || labelPrecision === 'auto') { + labelPrecision = axis.getPixelPrecision(); + } + + var valueStr = value == null || isNaN(value) ? '' // FIXME Glue code + : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel(Math.round(value)) // param of toFixed should less then 20. + : value.toFixed(Math.min(labelPrecision, 20)); + return zrUtil.isFunction(labelFormatter) ? labelFormatter(value, valueStr) : zrUtil.isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr; + }, + + /** + * @private + * @param {boolean} showOrHide true: show, false: hide + */ + _showDataInfo: function (showOrHide) { + // Always show when drgging. + showOrHide = this._dragging || showOrHide; + var handleLabels = this._displayables.handleLabels; + handleLabels[0].attr('invisible', !showOrHide); + handleLabels[1].attr('invisible', !showOrHide); + }, + _onDragMove: function (handleIndex, dx, dy, event) { + this._dragging = true; // For mobile device, prevent screen slider on the button. + + eventTool.stop(event.event); // Transform dx, dy to bar coordination. + + var barTransform = this._displayables.barGroup.getLocalTransform(); + + var vertex = graphic.applyTransform([dx, dy], barTransform, true); + + var changed = this._updateInterval(handleIndex, vertex[0]); + + var realtime = this.dataZoomModel.get('realtime'); + + this._updateView(!realtime); // Avoid dispatch dataZoom repeatly but range not changed, + // which cause bad visual effect when progressive enabled. + + + changed && realtime && this._dispatchZoomAction(); + }, + _onDragEnd: function () { + this._dragging = false; + + this._showDataInfo(false); // While in realtime mode and stream mode, dispatch action when + // drag end will cause the whole view rerender, which is unnecessary. + + + var realtime = this.dataZoomModel.get('realtime'); + !realtime && this._dispatchZoomAction(); + }, + _onClickPanelClick: function (e) { + var size = this._size; + + var localPoint = this._displayables.barGroup.transformCoordToLocal(e.offsetX, e.offsetY); + + if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) { + return; + } + + var handleEnds = this._handleEnds; + var center = (handleEnds[0] + handleEnds[1]) / 2; + + var changed = this._updateInterval('all', localPoint[0] - center); + + this._updateView(); + + changed && this._dispatchZoomAction(); + }, + + /** + * This action will be throttled. + * @private + */ + _dispatchZoomAction: function () { + var range = this._range; + this.api.dispatchAction({ + type: 'dataZoom', + from: this.uid, + dataZoomId: this.dataZoomModel.id, + start: range[0], + end: range[1] + }); + }, + + /** + * @private + */ + _findCoordRect: function () { + // Find the grid coresponding to the first axis referred by dataZoom. + var rect; + each(this.getTargetCoordInfo(), function (coordInfoList) { + if (!rect && coordInfoList.length) { + var coordSys = coordInfoList[0].model.coordinateSystem; + rect = coordSys.getRect && coordSys.getRect(); + } + }); + + if (!rect) { + var width = this.api.getWidth(); + var height = this.api.getHeight(); + rect = { + x: width * 0.2, + y: height * 0.2, + width: width * 0.6, + height: height * 0.6 + }; + } + + return rect; + } +}); + +function getOtherDim(thisDim) { + // FIXME + // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好 + var map = { + x: 'y', + y: 'x', + radius: 'angle', + angle: 'radius' + }; + return map[thisDim]; +} + +function getCursor(orient) { + return orient === 'vertical' ? 'ns-resize' : 'ew-resize'; +} + +var _default = SliderZoomView; +module.exports = _default; + +/***/ }), + +/***/ "237f": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var List = __webpack_require__("6179"); + +var Graph = __webpack_require__("7368"); + +var linkList = __webpack_require__("31d9"); + +var createDimensions = __webpack_require__("b1d4"); + +var CoordinateSystem = __webpack_require__("2039"); + +var createListFromArray = __webpack_require__("3301"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function _default(nodes, edges, seriesModel, directed, beforeLink) { + // ??? TODO + // support dataset? + var graph = new Graph(directed); + + for (var i = 0; i < nodes.length; i++) { + graph.addNode(zrUtil.retrieve( // Id, name, dataIndex + nodes[i].id, nodes[i].name, i), i); + } + + var linkNameList = []; + var validEdges = []; + var linkCount = 0; + + for (var i = 0; i < edges.length; i++) { + var link = edges[i]; + var source = link.source; + var target = link.target; // addEdge may fail when source or target not exists + + if (graph.addEdge(source, target, linkCount)) { + validEdges.push(link); + linkNameList.push(zrUtil.retrieve(link.id, source + ' > ' + target)); + linkCount++; + } + } + + var coordSys = seriesModel.get('coordinateSystem'); + var nodeData; + + if (coordSys === 'cartesian2d' || coordSys === 'polar') { + nodeData = createListFromArray(nodes, seriesModel); + } else { + var coordSysCtor = CoordinateSystem.get(coordSys); + var coordDimensions = coordSysCtor && coordSysCtor.type !== 'view' ? coordSysCtor.dimensions || [] : []; // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs + // `value` dimension, but graph need `value` dimension. It's better to + // uniform this behavior. + + if (zrUtil.indexOf(coordDimensions, 'value') < 0) { + coordDimensions.concat(['value']); + } + + var dimensionNames = createDimensions(nodes, { + coordDimensions: coordDimensions + }); + nodeData = new List(dimensionNames, seriesModel); + nodeData.initData(nodes); + } + + var edgeData = new List(['value'], seriesModel); + edgeData.initData(validEdges, linkNameList); + beforeLink && beforeLink(nodeData, edgeData); + linkList({ + mainData: nodeData, + struct: graph, + structAttr: 'graph', + datas: { + node: nodeData, + edge: edgeData + }, + datasAttr: { + node: 'data', + edge: 'edgeData' + } + }); // Update dataIndex of nodes and edges because invalid edge may be removed + + graph.update(); + return graph; +} + +module.exports = _default; + +/***/ }), + +/***/ "23cb": +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__("a691"); + +var max = Math.max; +var min = Math.min; + +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). +module.exports = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; + + +/***/ }), + +/***/ "23e0": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var IndicatorAxis = __webpack_require__("7887"); + +var IntervalScale = __webpack_require__("89e3"); + +var numberUtil = __webpack_require__("3842"); + +var _axisHelper = __webpack_require__("697e"); + +var getScaleExtent = _axisHelper.getScaleExtent; +var niceScaleExtent = _axisHelper.niceScaleExtent; + +var CoordinateSystem = __webpack_require__("2039"); + +var LogScale = __webpack_require__("8c2a"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO clockwise +function Radar(radarModel, ecModel, api) { + this._model = radarModel; + /** + * Radar dimensions + * @type {Array.} + */ + + this.dimensions = []; + this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) { + var dim = 'indicator_' + idx; + var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale()); + indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis + + indicatorAxis.model = indicatorModel; + indicatorModel.axis = indicatorAxis; + this.dimensions.push(dim); + return indicatorAxis; + }, this); + this.resize(radarModel, api); + /** + * @type {number} + * @readOnly + */ + + this.cx; + /** + * @type {number} + * @readOnly + */ + + this.cy; + /** + * @type {number} + * @readOnly + */ + + this.r; + /** + * @type {number} + * @readOnly + */ + + this.r0; + /** + * @type {number} + * @readOnly + */ + + this.startAngle; +} + +Radar.prototype.getIndicatorAxes = function () { + return this._indicatorAxes; +}; + +Radar.prototype.dataToPoint = function (value, indicatorIndex) { + var indicatorAxis = this._indicatorAxes[indicatorIndex]; + return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex); +}; + +Radar.prototype.coordToPoint = function (coord, indicatorIndex) { + var indicatorAxis = this._indicatorAxes[indicatorIndex]; + var angle = indicatorAxis.angle; + var x = this.cx + coord * Math.cos(angle); + var y = this.cy - coord * Math.sin(angle); + return [x, y]; +}; + +Radar.prototype.pointToData = function (pt) { + var dx = pt[0] - this.cx; + var dy = pt[1] - this.cy; + var radius = Math.sqrt(dx * dx + dy * dy); + dx /= radius; + dy /= radius; + var radian = Math.atan2(-dy, dx); // Find the closest angle + // FIXME index can calculated directly + + var minRadianDiff = Infinity; + var closestAxis; + var closestAxisIdx = -1; + + for (var i = 0; i < this._indicatorAxes.length; i++) { + var indicatorAxis = this._indicatorAxes[i]; + var diff = Math.abs(radian - indicatorAxis.angle); + + if (diff < minRadianDiff) { + closestAxis = indicatorAxis; + closestAxisIdx = i; + minRadianDiff = diff; + } + } + + return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))]; +}; + +Radar.prototype.resize = function (radarModel, api) { + var center = radarModel.get('center'); + var viewWidth = api.getWidth(); + var viewHeight = api.getHeight(); + var viewSize = Math.min(viewWidth, viewHeight) / 2; + this.cx = numberUtil.parsePercent(center[0], viewWidth); + this.cy = numberUtil.parsePercent(center[1], viewHeight); + this.startAngle = radarModel.get('startAngle') * Math.PI / 180; // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']` + + var radius = radarModel.get('radius'); + + if (typeof radius === 'string' || typeof radius === 'number') { + radius = [0, radius]; + } + + this.r0 = numberUtil.parsePercent(radius[0], viewSize); + this.r = numberUtil.parsePercent(radius[1], viewSize); + zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) { + indicatorAxis.setExtent(this.r0, this.r); + var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length; // Normalize to [-PI, PI] + + angle = Math.atan2(Math.sin(angle), Math.cos(angle)); + indicatorAxis.angle = angle; + }, this); +}; + +Radar.prototype.update = function (ecModel, api) { + var indicatorAxes = this._indicatorAxes; + var radarModel = this._model; + zrUtil.each(indicatorAxes, function (indicatorAxis) { + indicatorAxis.scale.setExtent(Infinity, -Infinity); + }); + ecModel.eachSeriesByType('radar', function (radarSeries, idx) { + if (radarSeries.get('coordinateSystem') !== 'radar' || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) { + return; + } + + var data = radarSeries.getData(); + zrUtil.each(indicatorAxes, function (indicatorAxis) { + indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim)); + }); + }, this); + var splitNumber = radarModel.get('splitNumber'); + + function increaseInterval(interval) { + var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval + + var f = interval / exp10; + + if (f === 2) { + f = 5; + } else { + // f is 2 or 5 + f *= 2; + } + + return f * exp10; + } // Force all the axis fixing the maxSplitNumber. + + + zrUtil.each(indicatorAxes, function (indicatorAxis, idx) { + var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent; + niceScaleExtent(indicatorAxis.scale, indicatorAxis.model); + var axisModel = indicatorAxis.model; + var scale = indicatorAxis.scale; + var fixedMin = axisModel.getMin(); + var fixedMax = axisModel.getMax(); + var interval = scale.getInterval(); + + if (fixedMin != null && fixedMax != null) { + // User set min, max, divide to get new interval + scale.setExtent(+fixedMin, +fixedMax); + scale.setInterval((fixedMax - fixedMin) / splitNumber); + } else if (fixedMin != null) { + var max; // User set min, expand extent on the other side + + do { + max = fixedMin + interval * splitNumber; + scale.setExtent(+fixedMin, max); // Interval must been set after extent + // FIXME + + scale.setInterval(interval); + interval = increaseInterval(interval); + } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])); + } else if (fixedMax != null) { + var min; // User set min, expand extent on the other side + + do { + min = fixedMax - interval * splitNumber; + scale.setExtent(min, +fixedMax); + scale.setInterval(interval); + interval = increaseInterval(interval); + } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])); + } else { + var nicedSplitNumber = scale.getTicks().length - 1; + + if (nicedSplitNumber > splitNumber) { + interval = increaseInterval(interval); + } // TODO + + + var max = Math.ceil(rawExtent[1] / interval) * interval; + var min = numberUtil.round(max - interval * splitNumber); + scale.setExtent(min, max); + scale.setInterval(interval); + } + }); +}; +/** + * Radar dimensions is based on the data + * @type {Array} + */ + + +Radar.dimensions = []; + +Radar.create = function (ecModel, api) { + var radarList = []; + ecModel.eachComponent('radar', function (radarModel) { + var radar = new Radar(radarModel, ecModel, api); + radarList.push(radar); + radarModel.coordinateSystem = radar; + }); + ecModel.eachSeriesByType('radar', function (radarSeries) { + if (radarSeries.get('coordinateSystem') === 'radar') { + // Inject coordinate system + radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0]; + } + }); + return radarList; +}; + +CoordinateSystem.register('radar', Radar); +var _default = Radar; +module.exports = _default; + +/***/ }), + +/***/ "23e7": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var getOwnPropertyDescriptor = __webpack_require__("06cf").f; +var createNonEnumerableProperty = __webpack_require__("9112"); +var redefine = __webpack_require__("6eeb"); +var setGlobal = __webpack_require__("ce4e"); +var copyConstructorProperties = __webpack_require__("e893"); +var isForced = __webpack_require__("94ca"); + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target +*/ +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } +}; + + +/***/ }), + +/***/ "23ee": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("879e"); + +__webpack_require__("9704"); + +__webpack_require__("d747"); + +var categoryFilter = __webpack_require__("675a"); + +var visualSymbol = __webpack_require__("7f96"); + +var categoryVisual = __webpack_require__("2943"); + +var edgeVisual = __webpack_require__("de6e"); + +var simpleLayout = __webpack_require__("d357"); + +var circularLayout = __webpack_require__("adda"); + +var forceLayout = __webpack_require__("5866"); + +var createView = __webpack_require__("7b0c"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerProcessor(categoryFilter); +echarts.registerVisual(visualSymbol('graph', 'circle', null)); +echarts.registerVisual(categoryVisual); +echarts.registerVisual(edgeVisual); +echarts.registerLayout(simpleLayout); +echarts.registerLayout(echarts.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout); +echarts.registerLayout(forceLayout); // Graph view coordinate system + +echarts.registerCoordinateSystem('graphView', { + create: createView +}); + +/***/ }), + +/***/ "241c": +/***/ (function(module, exports, __webpack_require__) { + +var internalObjectKeys = __webpack_require__("ca84"); +var enumBugKeys = __webpack_require__("7839"); + +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + +// `Object.getOwnPropertyNames` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertynames +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ "2449": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var echarts = __webpack_require__("3eba"); + +var zrUtil = __webpack_require__("6d8b"); + +var env = __webpack_require__("22d1"); + +var modelUtil = __webpack_require__("e0d3"); + +var formatUtil = __webpack_require__("eda2"); + +var dataFormatMixin = __webpack_require__("38a2"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var addCommas = formatUtil.addCommas; +var encodeHTML = formatUtil.encodeHTML; + +function fillLabel(opt) { + modelUtil.defaultEmphasis(opt, 'label', ['show']); +} + +var MarkerModel = echarts.extendComponentModel({ + type: 'marker', + dependencies: ['series', 'grid', 'polar', 'geo'], + + /** + * @overrite + */ + init: function (option, parentModel, ecModel) { + this.mergeDefaultAndTheme(option, ecModel); + + this._mergeOption(option, ecModel, false, true); + }, + + /** + * @return {boolean} + */ + isAnimationEnabled: function () { + if (env.node) { + return false; + } + + var hostSeries = this.__hostSeries; + return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled(); + }, + + /** + * @overrite + */ + mergeOption: function (newOpt, ecModel) { + this._mergeOption(newOpt, ecModel, false, false); + }, + _mergeOption: function (newOpt, ecModel, createdBySelf, isInit) { + var MarkerModel = this.constructor; + var modelPropName = this.mainType + 'Model'; + + if (!createdBySelf) { + ecModel.eachSeries(function (seriesModel) { + var markerOpt = seriesModel.get(this.mainType, true); + var markerModel = seriesModel[modelPropName]; + + if (!markerOpt || !markerOpt.data) { + seriesModel[modelPropName] = null; + return; + } + + if (!markerModel) { + if (isInit) { + // Default label emphasis `position` and `show` + fillLabel(markerOpt); + } + + zrUtil.each(markerOpt.data, function (item) { + // FIXME Overwrite fillLabel method ? + if (item instanceof Array) { + fillLabel(item[0]); + fillLabel(item[1]); + } else { + fillLabel(item); + } + }); + markerModel = new MarkerModel(markerOpt, this, ecModel); + zrUtil.extend(markerModel, { + mainType: this.mainType, + // Use the same series index and name + seriesIndex: seriesModel.seriesIndex, + name: seriesModel.name, + createdBySelf: true + }); + markerModel.__hostSeries = seriesModel; + } else { + markerModel._mergeOption(markerOpt, ecModel, true); + } + + seriesModel[modelPropName] = markerModel; + }, this); + } + }, + formatTooltip: function (dataIndex) { + var data = this.getData(); + var value = this.getRawValue(dataIndex); + var formattedValue = zrUtil.isArray(value) ? zrUtil.map(value, addCommas).join(', ') : addCommas(value); + var name = data.getName(dataIndex); + var html = encodeHTML(this.name); + + if (value != null || name) { + html += '
'; + } + + if (name) { + html += encodeHTML(name); + + if (value != null) { + html += ' : '; + } + } + + if (value != null) { + html += encodeHTML(formattedValue); + } + + return html; + }, + getData: function () { + return this._data; + }, + setData: function (data) { + this._data = data; + } +}); +zrUtil.mixin(MarkerModel, dataFormatMixin); +var _default = MarkerModel; +module.exports = _default; + +/***/ }), + +/***/ "24b9": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var layout = __webpack_require__("f934"); + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; +var linearMap = _number.linearMap; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function getViewRect(seriesModel, api) { + return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + }); +} + +function getSortedIndices(data, sort) { + var valueDim = data.mapDimension('value'); + var valueArr = data.mapArray(valueDim, function (val) { + return val; + }); + var indices = []; + var isAscending = sort === 'ascending'; + + for (var i = 0, len = data.count(); i < len; i++) { + indices[i] = i; + } // Add custom sortable function & none sortable opetion by "options.sort" + + + if (typeof sort === 'function') { + indices.sort(sort); + } else if (sort !== 'none') { + indices.sort(function (a, b) { + return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a]; + }); + } + + return indices; +} + +function labelLayout(data) { + data.each(function (idx) { + var itemModel = data.getItemModel(idx); + var labelModel = itemModel.getModel('label'); + var labelPosition = labelModel.get('position'); + var labelLineModel = itemModel.getModel('labelLine'); + var layout = data.getItemLayout(idx); + var points = layout.points; + var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight'; + var textAlign; + var textX; + var textY; + var linePoints; + + if (isLabelInside) { + if (labelPosition === 'insideLeft') { + textX = (points[0][0] + points[3][0]) / 2 + 5; + textY = (points[0][1] + points[3][1]) / 2; + textAlign = 'left'; + } else if (labelPosition === 'insideRight') { + textX = (points[1][0] + points[2][0]) / 2 - 5; + textY = (points[1][1] + points[2][1]) / 2; + textAlign = 'right'; + } else { + textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4; + textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4; + textAlign = 'center'; + } + + linePoints = [[textX, textY], [textX, textY]]; + } else { + var x1; + var y1; + var x2; + var labelLineLen = labelLineModel.get('length'); + + if (labelPosition === 'left') { + // Left side + x1 = (points[3][0] + points[0][0]) / 2; + y1 = (points[3][1] + points[0][1]) / 2; + x2 = x1 - labelLineLen; + textX = x2 - 5; + textAlign = 'right'; + } else if (labelPosition === 'right') { + // Right side + x1 = (points[1][0] + points[2][0]) / 2; + y1 = (points[1][1] + points[2][1]) / 2; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'left'; + } else if (labelPosition === 'rightTop') { + // RightTop side + x1 = points[1][0]; + y1 = points[1][1]; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'top'; + } else if (labelPosition === 'rightBottom') { + // RightBottom side + x1 = points[2][0]; + y1 = points[2][1]; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'bottom'; + } else if (labelPosition === 'leftTop') { + // LeftTop side + x1 = points[0][0]; + y1 = points[1][1]; + x2 = x1 - labelLineLen; + textX = x2 - 5; + textAlign = 'right'; + } else if (labelPosition === 'leftBottom') { + // LeftBottom side + x1 = points[3][0]; + y1 = points[2][1]; + x2 = x1 - labelLineLen; + textX = x2 - 5; + textAlign = 'right'; + } else { + // Right side + x1 = (points[1][0] + points[2][0]) / 2; + y1 = (points[1][1] + points[2][1]) / 2; + x2 = x1 + labelLineLen; + textX = x2 + 5; + textAlign = 'left'; + } + + var y2 = y1; + linePoints = [[x1, y1], [x2, y2]]; + textY = y2; + } + + layout.label = { + linePoints: linePoints, + x: textX, + y: textY, + verticalAlign: 'middle', + textAlign: textAlign, + inside: isLabelInside + }; + }); +} + +function _default(ecModel, api, payload) { + ecModel.eachSeriesByType('funnel', function (seriesModel) { + var data = seriesModel.getData(); + var valueDim = data.mapDimension('value'); + var sort = seriesModel.get('sort'); + var viewRect = getViewRect(seriesModel, api); + var indices = getSortedIndices(data, sort); + var sizeExtent = [parsePercent(seriesModel.get('minSize'), viewRect.width), parsePercent(seriesModel.get('maxSize'), viewRect.width)]; + var dataExtent = data.getDataExtent(valueDim); + var min = seriesModel.get('min'); + var max = seriesModel.get('max'); + + if (min == null) { + min = Math.min(dataExtent[0], 0); + } + + if (max == null) { + max = dataExtent[1]; + } + + var funnelAlign = seriesModel.get('funnelAlign'); + var gap = seriesModel.get('gap'); + var itemHeight = (viewRect.height - gap * (data.count() - 1)) / data.count(); + var y = viewRect.y; + + var getLinePoints = function (idx, offY) { + // End point index is data.count() and we assign it 0 + var val = data.get(valueDim, idx) || 0; + var itemWidth = linearMap(val, [min, max], sizeExtent, true); + var x0; + + switch (funnelAlign) { + case 'left': + x0 = viewRect.x; + break; + + case 'center': + x0 = viewRect.x + (viewRect.width - itemWidth) / 2; + break; + + case 'right': + x0 = viewRect.x + viewRect.width - itemWidth; + break; + } + + return [[x0, offY], [x0 + itemWidth, offY]]; + }; + + if (sort === 'ascending') { + // From bottom to top + itemHeight = -itemHeight; + gap = -gap; + y += viewRect.height; + indices = indices.reverse(); + } + + for (var i = 0; i < indices.length; i++) { + var idx = indices[i]; + var nextIdx = indices[i + 1]; + var itemModel = data.getItemModel(idx); + var height = itemModel.get('itemStyle.height'); + + if (height == null) { + height = itemHeight; + } else { + height = parsePercent(height, viewRect.height); + + if (sort === 'ascending') { + height = -height; + } + } + + var start = getLinePoints(idx, y); + var end = getLinePoints(nextIdx, y + height); + y += height + gap; + data.setItemLayout(idx, { + points: start.concat(end.slice().reverse()) + }); + } + + labelLayout(data); + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "255c": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var _poly = __webpack_require__("d4d1"); + +var Polygon = _poly.Polygon; + +var graphic = __webpack_require__("2306"); + +var _util = __webpack_require__("6d8b"); + +var bind = _util.bind; +var extend = _util.extend; + +var DataDiffer = __webpack_require__("80f0"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var _default = echarts.extendChartView({ + type: 'themeRiver', + init: function () { + this._layers = []; + }, + render: function (seriesModel, ecModel, api) { + var data = seriesModel.getData(); + var group = this.group; + var layerSeries = seriesModel.getLayerSeries(); + var layoutInfo = data.getLayout('layoutInfo'); + var rect = layoutInfo.rect; + var boundaryGap = layoutInfo.boundaryGap; + group.attr('position', [0, rect.y + boundaryGap[0]]); + + function keyGetter(item) { + return item.name; + } + + var dataDiffer = new DataDiffer(this._layersSeries || [], layerSeries, keyGetter, keyGetter); + var newLayersGroups = {}; + dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute(); + + function process(status, idx, oldIdx) { + var oldLayersGroups = this._layers; + + if (status === 'remove') { + group.remove(oldLayersGroups[idx]); + return; + } + + var points0 = []; + var points1 = []; + var color; + var indices = layerSeries[idx].indices; + + for (var j = 0; j < indices.length; j++) { + var layout = data.getItemLayout(indices[j]); + var x = layout.x; + var y0 = layout.y0; + var y = layout.y; + points0.push([x, y0]); + points1.push([x, y0 + y]); + color = data.getItemVisual(indices[j], 'color'); + } + + var polygon; + var text; + var textLayout = data.getItemLayout(indices[0]); + var itemModel = data.getItemModel(indices[j - 1]); + var labelModel = itemModel.getModel('label'); + var margin = labelModel.get('margin'); + + if (status === 'add') { + var layerGroup = newLayersGroups[idx] = new graphic.Group(); + polygon = new Polygon({ + shape: { + points: points0, + stackedOnPoints: points1, + smooth: 0.4, + stackedOnSmooth: 0.4, + smoothConstraint: false + }, + z2: 0 + }); + text = new graphic.Text({ + style: { + x: textLayout.x - margin, + y: textLayout.y0 + textLayout.y / 2 + } + }); + layerGroup.add(polygon); + layerGroup.add(text); + group.add(layerGroup); + polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () { + polygon.removeClipPath(); + })); + } else { + var layerGroup = oldLayersGroups[oldIdx]; + polygon = layerGroup.childAt(0); + text = layerGroup.childAt(1); + group.add(layerGroup); + newLayersGroups[idx] = layerGroup; + graphic.updateProps(polygon, { + shape: { + points: points0, + stackedOnPoints: points1 + } + }, seriesModel); + graphic.updateProps(text, { + style: { + x: textLayout.x - margin, + y: textLayout.y0 + textLayout.y / 2 + } + }, seriesModel); + } + + var hoverItemStyleModel = itemModel.getModel('emphasis.itemStyle'); + var itemStyleModel = itemModel.getModel('itemStyle'); + graphic.setTextStyle(text.style, labelModel, { + text: labelModel.get('show') ? seriesModel.getFormattedLabel(indices[j - 1], 'normal') || data.getName(indices[j - 1]) : null, + textVerticalAlign: 'middle' + }); + polygon.setStyle(extend({ + fill: color + }, itemStyleModel.getItemStyle(['color']))); + graphic.setHoverStyle(polygon, hoverItemStyleModel.getItemStyle()); + } + + this._layersSeries = layerSeries; + this._layers = newLayersGroups; + }, + dispose: function () {} +}); // add animation to the view + + +function createGridClipShape(rect, seriesModel, cb) { + var rectEl = new graphic.Rect({ + shape: { + x: rect.x - 10, + y: rect.y - 10, + width: 0, + height: rect.height + 20 + } + }); + graphic.initProps(rectEl, { + shape: { + width: rect.width + 20, + height: rect.height + 20 + } + }, seriesModel, cb); + return rectEl; +} + +module.exports = _default; + +/***/ }), + +/***/ "25f0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefine = __webpack_require__("6eeb"); +var anObject = __webpack_require__("825a"); +var fails = __webpack_require__("d039"); +var flags = __webpack_require__("ad6d"); + +var TO_STRING = 'toString'; +var RegExpPrototype = RegExp.prototype; +var nativeToString = RegExpPrototype[TO_STRING]; + +var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); +// FF44- RegExp#toString has a wrong name +var INCORRECT_NAME = nativeToString.name != TO_STRING; + +// `RegExp.prototype.toString` method +// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring +if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = String(R.source); + var rf = R.flags; + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); +} + + +/***/ }), + +/***/ "2626": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var getBuiltIn = __webpack_require__("d066"); +var definePropertyModule = __webpack_require__("9bf2"); +var wellKnownSymbol = __webpack_require__("b622"); +var DESCRIPTORS = __webpack_require__("83ab"); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = definePropertyModule.f; + + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineProperty(Constructor, SPECIES, { + configurable: true, + get: function () { return this; } + }); + } +}; + + +/***/ }), + +/***/ "26e1": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var modelUtil = __webpack_require__("e0d3"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var each = zrUtil.each; +var isObject = zrUtil.isObject; +var POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine']; + +function compatEC2ItemStyle(opt) { + var itemStyleOpt = opt && opt.itemStyle; + + if (!itemStyleOpt) { + return; + } + + for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) { + var styleName = POSSIBLE_STYLES[i]; + var normalItemStyleOpt = itemStyleOpt.normal; + var emphasisItemStyleOpt = itemStyleOpt.emphasis; + + if (normalItemStyleOpt && normalItemStyleOpt[styleName]) { + opt[styleName] = opt[styleName] || {}; + + if (!opt[styleName].normal) { + opt[styleName].normal = normalItemStyleOpt[styleName]; + } else { + zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]); + } + + normalItemStyleOpt[styleName] = null; + } + + if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) { + opt[styleName] = opt[styleName] || {}; + + if (!opt[styleName].emphasis) { + opt[styleName].emphasis = emphasisItemStyleOpt[styleName]; + } else { + zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]); + } + + emphasisItemStyleOpt[styleName] = null; + } + } +} + +function convertNormalEmphasis(opt, optType, useExtend) { + if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) { + var normalOpt = opt[optType].normal; + var emphasisOpt = opt[optType].emphasis; + + if (normalOpt) { + // Timeline controlStyle has other properties besides normal and emphasis + if (useExtend) { + opt[optType].normal = opt[optType].emphasis = null; + zrUtil.defaults(opt[optType], normalOpt); + } else { + opt[optType] = normalOpt; + } + } + + if (emphasisOpt) { + opt.emphasis = opt.emphasis || {}; + opt.emphasis[optType] = emphasisOpt; + } + } +} + +function removeEC3NormalStatus(opt) { + convertNormalEmphasis(opt, 'itemStyle'); + convertNormalEmphasis(opt, 'lineStyle'); + convertNormalEmphasis(opt, 'areaStyle'); + convertNormalEmphasis(opt, 'label'); + convertNormalEmphasis(opt, 'labelLine'); // treemap + + convertNormalEmphasis(opt, 'upperLabel'); // graph + + convertNormalEmphasis(opt, 'edgeLabel'); +} + +function compatTextStyle(opt, propName) { + // Check whether is not object (string\null\undefined ...) + var labelOptSingle = isObject(opt) && opt[propName]; + var textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle; + + if (textStyle) { + for (var i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) { + var propName = modelUtil.TEXT_STYLE_OPTIONS[i]; + + if (textStyle.hasOwnProperty(propName)) { + labelOptSingle[propName] = textStyle[propName]; + } + } + } +} + +function compatEC3CommonStyles(opt) { + if (opt) { + removeEC3NormalStatus(opt); + compatTextStyle(opt, 'label'); + opt.emphasis && compatTextStyle(opt.emphasis, 'label'); + } +} + +function processSeries(seriesOpt) { + if (!isObject(seriesOpt)) { + return; + } + + compatEC2ItemStyle(seriesOpt); + removeEC3NormalStatus(seriesOpt); + compatTextStyle(seriesOpt, 'label'); // treemap + + compatTextStyle(seriesOpt, 'upperLabel'); // graph + + compatTextStyle(seriesOpt, 'edgeLabel'); + + if (seriesOpt.emphasis) { + compatTextStyle(seriesOpt.emphasis, 'label'); // treemap + + compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph + + compatTextStyle(seriesOpt.emphasis, 'edgeLabel'); + } + + var markPoint = seriesOpt.markPoint; + + if (markPoint) { + compatEC2ItemStyle(markPoint); + compatEC3CommonStyles(markPoint); + } + + var markLine = seriesOpt.markLine; + + if (markLine) { + compatEC2ItemStyle(markLine); + compatEC3CommonStyles(markLine); + } + + var markArea = seriesOpt.markArea; + + if (markArea) { + compatEC3CommonStyles(markArea); + } + + var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option, + // then the backward compat based on option type will not be performed. + + if (seriesOpt.type === 'graph') { + data = data || seriesOpt.nodes; + var edgeData = seriesOpt.links || seriesOpt.edges; + + if (edgeData && !zrUtil.isTypedArray(edgeData)) { + for (var i = 0; i < edgeData.length; i++) { + compatEC3CommonStyles(edgeData[i]); + } + } + + zrUtil.each(seriesOpt.categories, function (opt) { + removeEC3NormalStatus(opt); + }); + } + + if (data && !zrUtil.isTypedArray(data)) { + for (var i = 0; i < data.length; i++) { + compatEC3CommonStyles(data[i]); + } + } // mark point data + + + var markPoint = seriesOpt.markPoint; + + if (markPoint && markPoint.data) { + var mpData = markPoint.data; + + for (var i = 0; i < mpData.length; i++) { + compatEC3CommonStyles(mpData[i]); + } + } // mark line data + + + var markLine = seriesOpt.markLine; + + if (markLine && markLine.data) { + var mlData = markLine.data; + + for (var i = 0; i < mlData.length; i++) { + if (zrUtil.isArray(mlData[i])) { + compatEC3CommonStyles(mlData[i][0]); + compatEC3CommonStyles(mlData[i][1]); + } else { + compatEC3CommonStyles(mlData[i]); + } + } + } // Series + + + if (seriesOpt.type === 'gauge') { + compatTextStyle(seriesOpt, 'axisLabel'); + compatTextStyle(seriesOpt, 'title'); + compatTextStyle(seriesOpt, 'detail'); + } else if (seriesOpt.type === 'treemap') { + convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle'); + zrUtil.each(seriesOpt.levels, function (opt) { + removeEC3NormalStatus(opt); + }); + } else if (seriesOpt.type === 'tree') { + removeEC3NormalStatus(seriesOpt.leaves); + } // sunburst starts from ec4, so it does not need to compat levels. + +} + +function toArr(o) { + return zrUtil.isArray(o) ? o : o ? [o] : []; +} + +function toObj(o) { + return (zrUtil.isArray(o) ? o[0] : o) || {}; +} + +function _default(option, isTheme) { + each(toArr(option.series), function (seriesOpt) { + isObject(seriesOpt) && processSeries(seriesOpt); + }); + var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar']; + isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis'); + each(axes, function (axisName) { + each(toArr(option[axisName]), function (axisOpt) { + if (axisOpt) { + compatTextStyle(axisOpt, 'axisLabel'); + compatTextStyle(axisOpt.axisPointer, 'label'); + } + }); + }); + each(toArr(option.parallel), function (parallelOpt) { + var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault; + compatTextStyle(parallelAxisDefault, 'axisLabel'); + compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label'); + }); + each(toArr(option.calendar), function (calendarOpt) { + convertNormalEmphasis(calendarOpt, 'itemStyle'); + compatTextStyle(calendarOpt, 'dayLabel'); + compatTextStyle(calendarOpt, 'monthLabel'); + compatTextStyle(calendarOpt, 'yearLabel'); + }); // radar.name.textStyle + + each(toArr(option.radar), function (radarOpt) { + compatTextStyle(radarOpt, 'name'); + }); + each(toArr(option.geo), function (geoOpt) { + if (isObject(geoOpt)) { + compatEC3CommonStyles(geoOpt); + each(toArr(geoOpt.regions), function (regionObj) { + compatEC3CommonStyles(regionObj); + }); + } + }); + each(toArr(option.timeline), function (timelineOpt) { + compatEC3CommonStyles(timelineOpt); + convertNormalEmphasis(timelineOpt, 'label'); + convertNormalEmphasis(timelineOpt, 'itemStyle'); + convertNormalEmphasis(timelineOpt, 'controlStyle', true); + var data = timelineOpt.data; + zrUtil.isArray(data) && zrUtil.each(data, function (item) { + if (zrUtil.isObject(item)) { + convertNormalEmphasis(item, 'label'); + convertNormalEmphasis(item, 'itemStyle'); + } + }); + }); + each(toArr(option.toolbox), function (toolboxOpt) { + convertNormalEmphasis(toolboxOpt, 'iconStyle'); + each(toolboxOpt.feature, function (featureOpt) { + convertNormalEmphasis(featureOpt, 'iconStyle'); + }); + }); + compatTextStyle(toObj(option.axisPointer), 'label'); + compatTextStyle(toObj(option.tooltip).axisPointer, 'label'); +} + +module.exports = _default; + +/***/ }), + +/***/ "282b": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO Parse shadow style +// TODO Only shallow path support +function _default(properties) { + // Normalize + for (var i = 0; i < properties.length; i++) { + if (!properties[i][1]) { + properties[i][1] = properties[i][0]; + } + } + + return function (model, excludes, includes) { + var style = {}; + + for (var i = 0; i < properties.length; i++) { + var propName = properties[i][1]; + + if (excludes && zrUtil.indexOf(excludes, propName) >= 0 || includes && zrUtil.indexOf(includes, propName) < 0) { + continue; + } + + var val = model.getShallow(propName); + + if (val != null) { + style[properties[i][0]] = val; + } + } + + return style; + }; +} + +module.exports = _default; + +/***/ }), + +/***/ "2877": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent ( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier, /* server only */ + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { + injectStyles.call( + this, + (options.functional ? this.parent : this).$root.$options.shadowRoot + ) + } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + + +/***/ }), + +/***/ "292e": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _number = __webpack_require__("3842"); + +var parsePercent = _number.parsePercent; +var linearMap = _number.linearMap; + +var layout = __webpack_require__("f934"); + +var labelLayout = __webpack_require__("bb70"); + +var zrUtil = __webpack_require__("6d8b"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +var PI2 = Math.PI * 2; +var RADIAN = Math.PI / 180; + +function getViewRect(seriesModel, api) { + return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), { + width: api.getWidth(), + height: api.getHeight() + }); +} + +function _default(seriesType, ecModel, api, payload) { + ecModel.eachSeriesByType(seriesType, function (seriesModel) { + var data = seriesModel.getData(); + var valueDim = data.mapDimension('value'); + var viewRect = getViewRect(seriesModel, api); + var center = seriesModel.get('center'); + var radius = seriesModel.get('radius'); + + if (!zrUtil.isArray(radius)) { + radius = [0, radius]; + } + + if (!zrUtil.isArray(center)) { + center = [center, center]; + } + + var width = parsePercent(viewRect.width, api.getWidth()); + var height = parsePercent(viewRect.height, api.getHeight()); + var size = Math.min(width, height); + var cx = parsePercent(center[0], width) + viewRect.x; + var cy = parsePercent(center[1], height) + viewRect.y; + var r0 = parsePercent(radius[0], size / 2); + var r = parsePercent(radius[1], size / 2); + var startAngle = -seriesModel.get('startAngle') * RADIAN; + var minAngle = seriesModel.get('minAngle') * RADIAN; + var validDataCount = 0; + data.each(valueDim, function (value) { + !isNaN(value) && validDataCount++; + }); + var sum = data.getSum(valueDim); // Sum may be 0 + + var unitRadian = Math.PI / (sum || validDataCount) * 2; + var clockwise = seriesModel.get('clockwise'); + var roseType = seriesModel.get('roseType'); + var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max] + + var extent = data.getDataExtent(valueDim); + extent[0] = 0; // In the case some sector angle is smaller than minAngle + + var restAngle = PI2; + var valueSumLargerThanMinAngle = 0; + var currentAngle = startAngle; + var dir = clockwise ? 1 : -1; + data.each(valueDim, function (value, idx) { + var angle; + + if (isNaN(value)) { + data.setItemLayout(idx, { + angle: NaN, + startAngle: NaN, + endAngle: NaN, + clockwise: clockwise, + cx: cx, + cy: cy, + r0: r0, + r: roseType ? NaN : r, + viewRect: viewRect + }); + return; + } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样? + + + if (roseType !== 'area') { + angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian; + } else { + angle = PI2 / validDataCount; + } + + if (angle < minAngle) { + angle = minAngle; + restAngle -= minAngle; + } else { + valueSumLargerThanMinAngle += value; + } + + var endAngle = currentAngle + dir * angle; + data.setItemLayout(idx, { + angle: angle, + startAngle: currentAngle, + endAngle: endAngle, + clockwise: clockwise, + cx: cx, + cy: cy, + r0: r0, + r: roseType ? linearMap(value, extent, [r0, r]) : r, + viewRect: viewRect + }); + currentAngle = endAngle; + }); // Some sector is constrained by minAngle + // Rest sectors needs recalculate angle + + if (restAngle < PI2 && validDataCount) { + // Average the angle if rest angle is not enough after all angles is + // Constrained by minAngle + if (restAngle <= 1e-3) { + var angle = PI2 / validDataCount; + data.each(valueDim, function (value, idx) { + if (!isNaN(value)) { + var layout = data.getItemLayout(idx); + layout.angle = angle; + layout.startAngle = startAngle + dir * idx * angle; + layout.endAngle = startAngle + dir * (idx + 1) * angle; + } + }); + } else { + unitRadian = restAngle / valueSumLargerThanMinAngle; + currentAngle = startAngle; + data.each(valueDim, function (value, idx) { + if (!isNaN(value)) { + var layout = data.getItemLayout(idx); + var angle = layout.angle === minAngle ? minAngle : value * unitRadian; + layout.startAngle = currentAngle; + layout.endAngle = currentAngle + dir * angle; + currentAngle += dir * angle; + } + }); + } + } + + labelLayout(seriesModel, r, viewRect.width, viewRect.height, viewRect.x, viewRect.y); + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "2943": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +function _default(ecModel) { + var paletteScope = {}; + ecModel.eachSeriesByType('graph', function (seriesModel) { + var categoriesData = seriesModel.getCategoriesData(); + var data = seriesModel.getData(); + var categoryNameIdxMap = {}; + categoriesData.each(function (idx) { + var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype. + + categoryNameIdxMap['ec-' + name] = idx; + var itemModel = categoriesData.getItemModel(idx); + var color = itemModel.get('itemStyle.color') || seriesModel.getColorFromPalette(name, paletteScope); + categoriesData.setItemVisual(idx, 'color', color); + var itemStyleList = ['opacity', 'symbol', 'symbolSize', 'symbolKeepAspect']; + + for (var i = 0; i < itemStyleList.length; i++) { + var itemStyle = itemModel.getShallow(itemStyleList[i], true); + + if (itemStyle != null) { + categoriesData.setItemVisual(idx, itemStyleList[i], itemStyle); + } + } + }); // Assign category color to visual + + if (categoriesData.count()) { + data.each(function (idx) { + var model = data.getItemModel(idx); + var category = model.getShallow('category'); + + if (category != null) { + if (typeof category === 'string') { + category = categoryNameIdxMap['ec-' + category]; + } + + var itemStyleList = ['color', 'opacity', 'symbol', 'symbolSize', 'symbolKeepAspect']; + + for (var i = 0; i < itemStyleList.length; i++) { + if (data.getItemVisual(idx, itemStyleList[i], true) == null) { + data.setItemVisual(idx, itemStyleList[i], categoriesData.getItemVisual(category, itemStyleList[i])); + } + } + } + }); + } + }); +} + +module.exports = _default; + +/***/ }), + +/***/ "29a8": +/***/ (function(module, exports) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * Language: (Simplified) Chinese. + */ +var _default = { + 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: '旭日图' + } + }, + 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: '' + } + } + } +}; +module.exports = _default; + +/***/ }), + +/***/ "29a9": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var preprocessor = __webpack_require__("b336"); + +__webpack_require__("bc5f"); + +__webpack_require__("ab05"); + +__webpack_require__("06ea"); + +__webpack_require__("004f"); + +__webpack_require__("d6ef"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * DataZoom component entry + */ +echarts.registerPreprocessor(preprocessor); + +/***/ }), + +/***/ "2b17": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var _config = __webpack_require__("4e08"); + +var __DEV__ = _config.__DEV__; + +var _util = __webpack_require__("6d8b"); + +var isTypedArray = _util.isTypedArray; +var extend = _util.extend; +var assert = _util.assert; +var each = _util.each; +var isObject = _util.isObject; + +var _model = __webpack_require__("e0d3"); + +var getDataItemValue = _model.getDataItemValue; +var isDataItemOption = _model.isDataItemOption; + +var _number = __webpack_require__("3842"); + +var parseDate = _number.parseDate; + +var Source = __webpack_require__("ec6f"); + +var _sourceType = __webpack_require__("93d0"); + +var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY; +var SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS; +var SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL; +var SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +// TODO +// ??? refactor? check the outer usage of data provider. +// merge with defaultDimValueGetter? + +/** + * If normal array used, mutable chunk size is supported. + * If typed array used, chunk size must be fixed. + */ +function DefaultDataProvider(source, dimSize) { + if (!Source.isInstance(source)) { + source = Source.seriesDataToSource(source); + } + + this._source = source; + var data = this._data = source.data; + var sourceFormat = source.sourceFormat; // Typed array. TODO IE10+? + + if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { + this._offset = 0; + this._dimSize = dimSize; + this._data = data; + } + + var methods = providerMethods[sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + source.seriesLayoutBy : sourceFormat]; + extend(this, methods); +} + +var providerProto = DefaultDataProvider.prototype; // If data is pure without style configuration + +providerProto.pure = false; // If data is persistent and will not be released after use. + +providerProto.persistent = true; // ???! FIXME legacy data provider do not has method getSource + +providerProto.getSource = function () { + return this._source; +}; + +var providerMethods = { + 'arrayRows_column': { + pure: true, + count: function () { + return Math.max(0, this._data.length - this._source.startIndex); + }, + getItem: function (idx) { + return this._data[idx + this._source.startIndex]; + }, + appendData: appendDataSimply + }, + 'arrayRows_row': { + pure: true, + count: function () { + var row = this._data[0]; + return row ? Math.max(0, row.length - this._source.startIndex) : 0; + }, + getItem: function (idx) { + idx += this._source.startIndex; + var item = []; + var data = this._data; + + for (var i = 0; i < data.length; i++) { + var row = data[i]; + item.push(row ? row[idx] : null); + } + + return item; + }, + appendData: function () { + throw new Error('Do not support appendData when set seriesLayoutBy: "row".'); + } + }, + 'objectRows': { + pure: true, + count: countSimply, + getItem: getItemSimply, + appendData: appendDataSimply + }, + 'keyedColumns': { + pure: true, + count: function () { + var dimName = this._source.dimensionsDefine[0].name; + var col = this._data[dimName]; + return col ? col.length : 0; + }, + getItem: function (idx) { + var item = []; + var dims = this._source.dimensionsDefine; + + for (var i = 0; i < dims.length; i++) { + var col = this._data[dims[i].name]; + item.push(col ? col[idx] : null); + } + + return item; + }, + appendData: function (newData) { + var data = this._data; + each(newData, function (newCol, key) { + var oldCol = data[key] || (data[key] = []); + + for (var i = 0; i < (newCol || []).length; i++) { + oldCol.push(newCol[i]); + } + }); + } + }, + 'original': { + count: countSimply, + getItem: getItemSimply, + appendData: appendDataSimply + }, + 'typedArray': { + persistent: false, + pure: true, + count: function () { + return this._data ? this._data.length / this._dimSize : 0; + }, + getItem: function (idx, out) { + idx = idx - this._offset; + out = out || []; + var offset = this._dimSize * idx; + + for (var i = 0; i < this._dimSize; i++) { + out[i] = this._data[offset + i]; + } + + return out; + }, + appendData: function (newData) { + this._data = newData; + }, + // Clean self if data is already used. + clean: function () { + // PENDING + this._offset += this.count(); + this._data = null; + } + } +}; + +function countSimply() { + return this._data.length; +} + +function getItemSimply(idx) { + return this._data[idx]; +} + +function appendDataSimply(newData) { + for (var i = 0; i < newData.length; i++) { + this._data.push(newData[i]); + } +} + +var rawValueGetters = { + arrayRows: getRawValueSimply, + objectRows: function (dataItem, dataIndex, dimIndex, dimName) { + return dimIndex != null ? dataItem[dimName] : dataItem; + }, + keyedColumns: getRawValueSimply, + original: function (dataItem, dataIndex, dimIndex, dimName) { + // FIXME + // In some case (markpoint in geo (geo-map.html)), dataItem + // is {coord: [...]} + var value = getDataItemValue(dataItem); + return dimIndex == null || !(value instanceof Array) ? value : value[dimIndex]; + }, + typedArray: getRawValueSimply +}; + +function getRawValueSimply(dataItem, dataIndex, dimIndex, dimName) { + return dimIndex != null ? dataItem[dimIndex] : dataItem; +} + +var defaultDimValueGetters = { + arrayRows: getDimValueSimply, + objectRows: function (dataItem, dimName, dataIndex, dimIndex) { + return converDataValue(dataItem[dimName], this._dimensionInfos[dimName]); + }, + keyedColumns: getDimValueSimply, + original: function (dataItem, dimName, dataIndex, dimIndex) { + // Performance sensitive, do not use modelUtil.getDataItemValue. + // If dataItem is an plain object with no value field, the var `value` + // will be assigned with the object, but it will be tread correctly + // in the `convertDataValue`. + var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value); // If any dataItem is like { value: 10 } + + if (!this._rawData.pure && isDataItemOption(dataItem)) { + this.hasItemOption = true; + } + + return converDataValue(value instanceof Array ? value[dimIndex] // If value is a single number or something else not array. + : value, this._dimensionInfos[dimName]); + }, + typedArray: function (dataItem, dimName, dataIndex, dimIndex) { + return dataItem[dimIndex]; + } +}; + +function getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) { + return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]); +} +/** + * This helper method convert value in data. + * @param {string|number|Date} value + * @param {Object|string} [dimInfo] If string (like 'x'), dimType defaults 'number'. + * If "dimInfo.ordinalParseAndSave", ordinal value can be parsed. + */ + + +function converDataValue(value, dimInfo) { + // Performance sensitive. + var dimType = dimInfo && dimInfo.type; + + if (dimType === 'ordinal') { + // If given value is a category string + var ordinalMeta = dimInfo && dimInfo.ordinalMeta; + return ordinalMeta ? ordinalMeta.parseAndCollect(value) : value; + } + + if (dimType === 'time' // spead up when using timestamp + && typeof value !== 'number' && value != null && value !== '-') { + value = +parseDate(value); + } // dimType defaults 'number'. + // If dimType is not ordinal and value is null or undefined or NaN or '-', + // parse to NaN. + + + return value == null || value === '' ? NaN // If string (like '-'), using '+' parse to NaN + // If object, also parse to NaN + : +value; +} // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem, +// Consider persistent. +// Caution: why use raw value to display on label or tooltip? +// A reason is to avoid format. For example time value we do not know +// how to format is expected. More over, if stack is used, calculated +// value may be 0.91000000001, which have brings trouble to display. +// TODO: consider how to treat null/undefined/NaN when display? + +/** + * @param {module:echarts/data/List} data + * @param {number} dataIndex + * @param {string|number} [dim] dimName or dimIndex + * @return {Array.|string|number} can be null/undefined. + */ + + +function retrieveRawValue(data, dataIndex, dim) { + if (!data) { + return; + } // Consider data may be not persistent. + + + var dataItem = data.getRawDataItem(dataIndex); + + if (dataItem == null) { + return; + } + + var sourceFormat = data.getProvider().getSource().sourceFormat; + var dimName; + var dimIndex; + var dimInfo = data.getDimensionInfo(dim); + + if (dimInfo) { + dimName = dimInfo.name; + dimIndex = dimInfo.index; + } + + return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName); +} +/** + * Compatible with some cases (in pie, map) like: + * data: [{name: 'xx', value: 5, selected: true}, ...] + * where only sourceFormat is 'original' and 'objectRows' supported. + * + * ??? TODO + * Supported detail options in data item when using 'arrayRows'. + * + * @param {module:echarts/data/List} data + * @param {number} dataIndex + * @param {string} attr like 'selected' + */ + + +function retrieveRawAttr(data, dataIndex, attr) { + if (!data) { + return; + } + + var sourceFormat = data.getProvider().getSource().sourceFormat; + + if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) { + return; + } + + var dataItem = data.getRawDataItem(dataIndex); + + if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) { + dataItem = null; + } + + if (dataItem) { + return dataItem[attr]; + } +} + +exports.DefaultDataProvider = DefaultDataProvider; +exports.defaultDimValueGetters = defaultDimValueGetters; +exports.retrieveRawValue = retrieveRawValue; +exports.retrieveRawAttr = retrieveRawAttr; + +/***/ }), + +/***/ "2b61": +/***/ (function(module, exports, __webpack_require__) { + +var fixShadow = __webpack_require__("7d6d"); + +var _constant = __webpack_require__("82eb"); + +var ContextCachedBy = _constant.ContextCachedBy; +var STYLE_COMMON_PROPS = [['shadowBlur', 0], ['shadowOffsetX', 0], ['shadowOffsetY', 0], ['shadowColor', '#000'], ['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10]]; // var SHADOW_PROPS = STYLE_COMMON_PROPS.slice(0, 4); +// var LINE_PROPS = STYLE_COMMON_PROPS.slice(4); + +var Style = function (opts) { + this.extendFrom(opts, false); +}; + +function createLinearGradient(ctx, obj, rect) { + var x = obj.x == null ? 0 : obj.x; + var x2 = obj.x2 == null ? 1 : obj.x2; + var y = obj.y == null ? 0 : obj.y; + var y2 = obj.y2 == null ? 0 : obj.y2; + + if (!obj.global) { + x = x * rect.width + rect.x; + x2 = x2 * rect.width + rect.x; + y = y * rect.height + rect.y; + y2 = y2 * rect.height + rect.y; + } // Fix NaN when rect is Infinity + + + x = isNaN(x) ? 0 : x; + x2 = isNaN(x2) ? 1 : x2; + y = isNaN(y) ? 0 : y; + y2 = isNaN(y2) ? 0 : y2; + var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); + return canvasGradient; +} + +function createRadialGradient(ctx, obj, rect) { + var width = rect.width; + var height = rect.height; + var min = Math.min(width, height); + var x = obj.x == null ? 0.5 : obj.x; + var y = obj.y == null ? 0.5 : obj.y; + var r = obj.r == null ? 0.5 : obj.r; + + if (!obj.global) { + x = x * width + rect.x; + y = y * height + rect.y; + r = r * min; + } + + var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); + return canvasGradient; +} + +Style.prototype = { + constructor: Style, + + /** + * @type {string} + */ + fill: '#000', + + /** + * @type {string} + */ + stroke: null, + + /** + * @type {number} + */ + opacity: 1, + + /** + * @type {number} + */ + fillOpacity: null, + + /** + * @type {number} + */ + strokeOpacity: null, + + /** + * `true` is not supported. + * `false`/`null`/`undefined` are the same. + * `false` is used to remove lineDash in some + * case that `null`/`undefined` can not be set. + * (e.g., emphasis.lineStyle in echarts) + * @type {Array.|boolean} + */ + lineDash: null, + + /** + * @type {number} + */ + lineDashOffset: 0, + + /** + * @type {number} + */ + shadowBlur: 0, + + /** + * @type {number} + */ + shadowOffsetX: 0, + + /** + * @type {number} + */ + shadowOffsetY: 0, + + /** + * @type {number} + */ + lineWidth: 1, + + /** + * If stroke ignore scale + * @type {Boolean} + */ + strokeNoScale: false, + // Bounding rect text configuration + // Not affected by element transform + + /** + * @type {string} + */ + text: null, + + /** + * If `fontSize` or `fontFamily` exists, `font` will be reset by + * `fontSize`, `fontStyle`, `fontWeight`, `fontFamily`. + * So do not visit it directly in upper application (like echarts), + * but use `contain/text#makeFont` instead. + * @type {string} + */ + font: null, + + /** + * The same as font. Use font please. + * @deprecated + * @type {string} + */ + textFont: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * @type {string} + */ + fontStyle: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * @type {string} + */ + fontWeight: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * Should be 12 but not '12px'. + * @type {number} + */ + fontSize: null, + + /** + * It helps merging respectively, rather than parsing an entire font string. + * @type {string} + */ + fontFamily: null, + + /** + * Reserved for special functinality, like 'hr'. + * @type {string} + */ + textTag: null, + + /** + * @type {string} + */ + textFill: '#000', + + /** + * @type {string} + */ + textStroke: null, + + /** + * @type {number} + */ + textWidth: null, + + /** + * Only for textBackground. + * @type {number} + */ + textHeight: null, + + /** + * textStroke may be set as some color as a default + * value in upper applicaion, where the default value + * of textStrokeWidth should be 0 to make sure that + * user can choose to do not use text stroke. + * @type {number} + */ + textStrokeWidth: 0, + + /** + * @type {number} + */ + textLineHeight: null, + + /** + * 'inside', 'left', 'right', 'top', 'bottom' + * [x, y] + * Based on x, y of rect. + * @type {string|Array.} + * @default 'inside' + */ + textPosition: 'inside', + + /** + * If not specified, use the boundingRect of a `displayable`. + * @type {Object} + */ + textRect: null, + + /** + * [x, y] + * @type {Array.} + */ + textOffset: null, + + /** + * @type {string} + */ + textAlign: null, + + /** + * @type {string} + */ + textVerticalAlign: null, + + /** + * @type {number} + */ + textDistance: 5, + + /** + * @type {string} + */ + textShadowColor: 'transparent', + + /** + * @type {number} + */ + textShadowBlur: 0, + + /** + * @type {number} + */ + textShadowOffsetX: 0, + + /** + * @type {number} + */ + textShadowOffsetY: 0, + + /** + * @type {string} + */ + textBoxShadowColor: 'transparent', + + /** + * @type {number} + */ + textBoxShadowBlur: 0, + + /** + * @type {number} + */ + textBoxShadowOffsetX: 0, + + /** + * @type {number} + */ + textBoxShadowOffsetY: 0, + + /** + * Whether transform text. + * Only available in Path and Image element, + * where the text is called as `RectText`. + * @type {boolean} + */ + transformText: false, + + /** + * Text rotate around position of Path or Image. + * The origin of the rotation can be specified by `textOrigin`. + * Only available in Path and Image element, + * where the text is called as `RectText`. + */ + textRotation: 0, + + /** + * Text origin of text rotation. + * Useful in the case like label rotation of circular symbol. + * Only available in Path and Image element, where the text is called + * as `RectText` and the element is called as "host element". + * The value can be: + * + If specified as a coordinate like `[10, 40]`, it is the `[x, y]` + * base on the left-top corner of the rect of its host element. + * + If specified as a string `center`, it is the center of the rect of + * its host element. + * + By default, this origin is the `textPosition`. + * @type {string|Array.} + */ + textOrigin: null, + + /** + * @type {string} + */ + textBackgroundColor: null, + + /** + * @type {string} + */ + textBorderColor: null, + + /** + * @type {number} + */ + textBorderWidth: 0, + + /** + * @type {number} + */ + textBorderRadius: 0, + + /** + * Can be `2` or `[2, 4]` or `[2, 3, 4, 5]` + * @type {number|Array.} + */ + textPadding: null, + + /** + * Text styles for rich text. + * @type {Object} + */ + rich: null, + + /** + * {outerWidth, outerHeight, ellipsis, placeholder} + * @type {Object} + */ + truncate: null, + + /** + * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * @type {string} + */ + blend: null, + + /** + * @param {CanvasRenderingContext2D} ctx + */ + bind: function (ctx, el, prevEl) { + var style = this; + var prevStyle = prevEl && prevEl.style; // If no prevStyle, it means first draw. + // Only apply cache if the last time cachced by this function. + + var notCheckCache = !prevStyle || ctx.__attrCachedBy !== ContextCachedBy.STYLE_BIND; + ctx.__attrCachedBy = ContextCachedBy.STYLE_BIND; + + for (var i = 0; i < STYLE_COMMON_PROPS.length; i++) { + var prop = STYLE_COMMON_PROPS[i]; + var styleName = prop[0]; + + if (notCheckCache || style[styleName] !== prevStyle[styleName]) { + // FIXME Invalid property value will cause style leak from previous element. + ctx[styleName] = fixShadow(ctx, styleName, style[styleName] || prop[1]); + } + } + + if (notCheckCache || style.fill !== prevStyle.fill) { + ctx.fillStyle = style.fill; + } + + if (notCheckCache || style.stroke !== prevStyle.stroke) { + ctx.strokeStyle = style.stroke; + } + + if (notCheckCache || style.opacity !== prevStyle.opacity) { + ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; + } + + if (notCheckCache || style.blend !== prevStyle.blend) { + ctx.globalCompositeOperation = style.blend || 'source-over'; + } + + if (this.hasStroke()) { + var lineWidth = style.lineWidth; + ctx.lineWidth = lineWidth / (this.strokeNoScale && el && el.getLineScale ? el.getLineScale() : 1); + } + }, + hasFill: function () { + var fill = this.fill; + return fill != null && fill !== 'none'; + }, + hasStroke: function () { + var stroke = this.stroke; + return stroke != null && stroke !== 'none' && this.lineWidth > 0; + }, + + /** + * Extend from other style + * @param {zrender/graphic/Style} otherStyle + * @param {boolean} overwrite true: overwrirte any way. + * false: overwrite only when !target.hasOwnProperty + * others: overwrite when property is not null/undefined. + */ + extendFrom: function (otherStyle, overwrite) { + if (otherStyle) { + for (var name in otherStyle) { + if (otherStyle.hasOwnProperty(name) && (overwrite === true || (overwrite === false ? !this.hasOwnProperty(name) : otherStyle[name] != null))) { + this[name] = otherStyle[name]; + } + } + } + }, + + /** + * Batch setting style with a given object + * @param {Object|string} obj + * @param {*} [obj] + */ + set: function (obj, value) { + if (typeof obj === 'string') { + this[obj] = value; + } else { + this.extendFrom(obj, true); + } + }, + + /** + * Clone + * @return {zrender/graphic/Style} [description] + */ + clone: function () { + var newStyle = new this.constructor(); + newStyle.extendFrom(this, true); + return newStyle; + }, + getGradient: function (ctx, obj, rect) { + var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient; + var canvasGradient = method(ctx, obj, rect); + var colorStops = obj.colorStops; + + for (var i = 0; i < colorStops.length; i++) { + canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color); + } + + return canvasGradient; + } +}; +var styleProto = Style.prototype; + +for (var i = 0; i < STYLE_COMMON_PROPS.length; i++) { + var prop = STYLE_COMMON_PROPS[i]; + + if (!(prop[0] in styleProto)) { + styleProto[prop[0]] = prop[1]; + } +} // Provide for others + + +Style.getGradient = styleProto.getGradient; +var _default = Style; +module.exports = _default; + +/***/ }), + +/***/ "2b8c": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var zrUtil = __webpack_require__("6d8b"); + +var VisualMapping = __webpack_require__("5f14"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +/** + * @file Visual solution, for consistent option specification. + */ +var each = zrUtil.each; + +function hasKeys(obj) { + if (obj) { + for (var name in obj) { + if (obj.hasOwnProperty(name)) { + return true; + } + } + } +} +/** + * @param {Object} option + * @param {Array.} stateList + * @param {Function} [supplementVisualOption] + * @return {Object} visualMappings > + */ + + +function createVisualMappings(option, stateList, supplementVisualOption) { + var visualMappings = {}; + each(stateList, function (state) { + var mappings = visualMappings[state] = createMappings(); + each(option[state], function (visualData, visualType) { + if (!VisualMapping.isValidType(visualType)) { + return; + } + + var mappingOption = { + type: visualType, + visual: visualData + }; + supplementVisualOption && supplementVisualOption(mappingOption, state); + mappings[visualType] = new VisualMapping(mappingOption); // Prepare a alpha for opacity, for some case that opacity + // is not supported, such as rendering using gradient color. + + if (visualType === 'opacity') { + mappingOption = zrUtil.clone(mappingOption); + mappingOption.type = 'colorAlpha'; + mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption); + } + }); + }); + return visualMappings; + + function createMappings() { + var Creater = function () {}; // Make sure hidden fields will not be visited by + // object iteration (with hasOwnProperty checking). + + + Creater.prototype.__hidden = Creater.prototype; + var obj = new Creater(); + return obj; + } +} +/** + * @param {Object} thisOption + * @param {Object} newOption + * @param {Array.} keys + */ + + +function replaceVisualOption(thisOption, newOption, keys) { + // Visual attributes merge is not supported, otherwise it + // brings overcomplicated merge logic. See #2853. So if + // newOption has anyone of these keys, all of these keys + // will be reset. Otherwise, all keys remain. + var has; + zrUtil.each(keys, function (key) { + if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { + has = true; + } + }); + has && zrUtil.each(keys, function (key) { + if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { + thisOption[key] = zrUtil.clone(newOption[key]); + } else { + delete thisOption[key]; + } + }); +} +/** + * @param {Array.} stateList + * @param {Object} visualMappings > + * @param {module:echarts/data/List} list + * @param {Function} getValueState param: valueOrIndex, return: state. + * @param {object} [scope] Scope for getValueState + * @param {string} [dimension] Concrete dimension, if used. + */ +// ???! handle brush? + + +function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) { + var visualTypesMap = {}; + zrUtil.each(stateList, function (state) { + var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); + visualTypesMap[state] = visualTypes; + }); + var dataIndex; + + function getVisual(key) { + return data.getItemVisual(dataIndex, key); + } + + function setVisual(key, value) { + data.setItemVisual(dataIndex, key, value); + } + + if (dimension == null) { + data.each(eachItem); + } else { + data.each([dimension], eachItem); + } + + function eachItem(valueOrIndex, index) { + dataIndex = dimension == null ? valueOrIndex : index; + var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance + + if (rawDataItem && rawDataItem.visualMap === false) { + return; + } + + var valueState = getValueState.call(scope, valueOrIndex); + var mappings = visualMappings[valueState]; + var visualTypes = visualTypesMap[valueState]; + + for (var i = 0, len = visualTypes.length; i < len; i++) { + var type = visualTypes[i]; + mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual); + } + } +} +/** + * @param {module:echarts/data/List} data + * @param {Array.} stateList + * @param {Object} visualMappings > + * @param {Function} getValueState param: valueOrIndex, return: state. + * @param {number} [dim] dimension or dimension index. + */ + + +function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) { + var visualTypesMap = {}; + zrUtil.each(stateList, function (state) { + var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); + visualTypesMap[state] = visualTypes; + }); + + function progress(params, data) { + if (dim != null) { + dim = data.getDimension(dim); + } + + function getVisual(key) { + return data.getItemVisual(dataIndex, key); + } + + function setVisual(key, value) { + data.setItemVisual(dataIndex, key, value); + } + + var dataIndex; + + while ((dataIndex = params.next()) != null) { + var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance + + if (rawDataItem && rawDataItem.visualMap === false) { + continue; + } + + var value = dim != null ? data.get(dim, dataIndex, true) : dataIndex; + var valueState = getValueState(value); + var mappings = visualMappings[valueState]; + var visualTypes = visualTypesMap[valueState]; + + for (var i = 0, len = visualTypes.length; i < len; i++) { + var type = visualTypes[i]; + mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual); + } + } + } + + return { + progress: progress + }; +} + +exports.createVisualMappings = createVisualMappings; +exports.replaceVisualOption = replaceVisualOption; +exports.applyVisual = applyVisual; +exports.incrementalApplyVisual = incrementalApplyVisual; + +/***/ }), + +/***/ "2c17": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +var _util = __webpack_require__("6d8b"); + +var createHashMap = _util.createHashMap; +var each = _util.each; + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.registerProcessor({ + // `dataZoomProcessor` will only be performed in needed series. Consider if + // there is a line series and a pie series, it is better not to update the + // line series if only pie series is needed to be updated. + getTargetSeries: function (ecModel) { + var seriesModelMap = createHashMap(); + ecModel.eachComponent('dataZoom', function (dataZoomModel) { + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) { + var axisProxy = dataZoomModel.getAxisProxy(dimNames.name, axisIndex); + each(axisProxy.getTargetSeriesModels(), function (seriesModel) { + seriesModelMap.set(seriesModel.uid, seriesModel); + }); + }); + }); + return seriesModelMap; + }, + modifyOutputEnd: true, + // Consider appendData, where filter should be performed. Because data process is + // in block mode currently, it is not need to worry about that the overallProgress + // execute every frame. + overallReset: function (ecModel, api) { + ecModel.eachComponent('dataZoom', function (dataZoomModel) { + // We calculate window and reset axis here but not in model + // init stage and not after action dispatch handler, because + // reset should be called after seriesData.restoreData. + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) { + dataZoomModel.getAxisProxy(dimNames.name, axisIndex).reset(dataZoomModel, api); + }); // Caution: data zoom filtering is order sensitive when using + // percent range and no min/max/scale set on axis. + // For example, we have dataZoom definition: + // [ + // {xAxisIndex: 0, start: 30, end: 70}, + // {yAxisIndex: 0, start: 20, end: 80} + // ] + // In this case, [20, 80] of y-dataZoom should be based on data + // that have filtered by x-dataZoom using range of [30, 70], + // but should not be based on full raw data. Thus sliding + // x-dataZoom will change both ranges of xAxis and yAxis, + // while sliding y-dataZoom will only change the range of yAxis. + // So we should filter x-axis after reset x-axis immediately, + // and then reset y-axis and filter y-axis. + + dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) { + dataZoomModel.getAxisProxy(dimNames.name, axisIndex).filterData(dataZoomModel, api); + }); + }); + ecModel.eachComponent('dataZoom', function (dataZoomModel) { + // Fullfill all of the range props so that user + // is able to get them from chart.getOption(). + var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); + var percentRange = axisProxy.getDataPercentWindow(); + var valueRange = axisProxy.getDataValueWindow(); + dataZoomModel.setCalculatedRange({ + start: percentRange[0], + end: percentRange[1], + startValue: valueRange[0], + endValue: valueRange[1] + }); + }); + } +}); + +/***/ }), + +/***/ "2cf4": +/***/ (function(module, exports) { + +var dpr = 1; // If in browser environment + +if (typeof window !== 'undefined') { + dpr = Math.max(window.devicePixelRatio || 1, 1); +} +/** + * config默认配置项 + * @exports zrender/config + * @author Kener (@Kener-林峰, kener.linfeng@gmail.com) + */ + +/** + * Debug log mode: + * 0: Do nothing, for release. + * 1: console.error, for debug. + */ + + +var debugMode = 0; // retina 屏幕优化 + +var devicePixelRatio = dpr; +exports.debugMode = debugMode; +exports.devicePixelRatio = devicePixelRatio; + +/***/ }), + +/***/ "2cf49": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var fails = __webpack_require__("d039"); +var classof = __webpack_require__("c6b6"); +var bind = __webpack_require__("0366"); +var html = __webpack_require__("1be4"); +var createElement = __webpack_require__("cc12"); +var IS_IOS = __webpack_require__("1cdc"); + +var location = global.location; +var set = global.setImmediate; +var clear = global.clearImmediate; +var process = global.process; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; + +var run = function (id) { + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; + +var runner = function (id) { + return function () { + run(id); + }; +}; + +var listener = function (event) { + run(event.data); +}; + +var post = function (id) { + // old engines have not location.origin + global.postMessage(id + '', location.protocol + '//' + location.host); +}; + +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!set || !clear) { + set = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); + }; + defer(counter); + return counter; + }; + clear = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (classof(process) == 'process') { + defer = function (id) { + process.nextTick(runner(id)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(runner(id)); + }; + // Browsers with MessageChannel, includes WebWorkers + // except iOS - https://github.com/zloirock/core-js/issues/624 + } else if (MessageChannel && !IS_IOS) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = bind(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if ( + global.addEventListener && + typeof postMessage == 'function' && + !global.importScripts && + !fails(post) && + location.protocol !== 'file:' + ) { + defer = post; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in createElement('script')) { + defer = function (id) { + html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(runner(id), 0); + }; + } +} + +module.exports = { + set: set, + clear: clear +}; + + +/***/ }), + +/***/ "2cfc": +/***/ (function(module, exports, __webpack_require__) { + + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +var echarts = __webpack_require__("3eba"); + +__webpack_require__("4338"); + +__webpack_require__("bcbe"); + +__webpack_require__("c62c"); + +__webpack_require__("cb8f"); + +__webpack_require__("f138"); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +echarts.extendComponentView({ + type: 'single' +}); + +/***/ }), + +/***/ "2d00": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("da84"); +var userAgent = __webpack_require__("342f"); + +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8; +var match, version; + +if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; +} else if (userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } +} + +module.exports = version && +version; + + +/***/ }), + +/***/ "2ef0": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = true && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSetting.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSetting.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartSetting.vue?vue&type=template&id=07b78e5c&\"\nimport script from \"./ChartSetting.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartSetting.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChartSetting.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export const ENABLE_ACTIVE = 'ENABLE_ACTIVE';\r\nexport const DISABLE_ACTIVE = 'DISABLE_ACTIVE';\r\nexport const UPDATE_CHART_ITEM = 'UPDATE_CHART_ITEM';\r\n\r\nexport default {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n UPDATE_CHART_ITEM,\r\n}","import types from './mutation-types';\r\n\r\nexport default {\r\n setActive({commit, state}, {id}) {\r\n for (let i = 0, l = state.chartLists.length; i < l; i++) {\r\n if (i === id) {\r\n commit(types.ENABLE_ACTIVE, i);\r\n continue;\r\n }\r\n\r\n commit(types.DISABLE_ACTIVE, i);\r\n }\r\n },\r\n unsetActive({commit}, {id}) {\r\n commit(types.DISABLE_ACTIVE, id);\r\n },\r\n updateChartItem({commit}, updateObj) {\r\n commit(types.UPDATE_CHART_ITEM, updateObj);\r\n }\r\n};","export default {\r\n getActive: state => {\r\n for (let i = 0, l = state.chartLists.length; i < l; i++) {\r\n let chartList = state.chartLists[i];\r\n\r\n if (chartList.active) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n}","import { transTextStyle } from '@/utils/chartUtil'\r\n/**\r\n * echarts title transform\r\n * \r\n */\r\nconst transformTitle = function (chartAllTypeArray, title, subtitle) {\r\n const chartPro = chartAllTypeArray[0];\r\n const chartType = chartAllTypeArray[1];\r\n const chartStyle = chartAllTypeArray[2];\r\n\r\n // init object\r\n let resultTitle = {\r\n show: true,\r\n text: '',\r\n left: 'auto',\r\n top: 'auto',\r\n textStyle: {\r\n fontSize: 12,\r\n color: '#333',\r\n fontFamily: 'sans-serif',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n },\r\n subtextStyle: {\r\n fontSize: 12,\r\n color: '#aaa',\r\n fontFamily: 'sans-serif',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n },\r\n subtext: '',\r\n itemGap: 10\r\n };\r\n\r\n // title.show\r\n resultTitle.show = title.show;\r\n\r\n // title.text\r\n resultTitle.text = title.text;\r\n resultTitle.subtext = subtitle.text\r\n\r\n // textstyle\r\n transTextStyle(title , resultTitle , 'textStyle' , 'text')\r\n transTextStyle(subtitle , resultTitle , 'subtextStyle' , 'subtext')\r\n\r\n // title.position\r\n if (title.position.value === 'custom') {\r\n resultTitle.left = title.position.offsetX + '%'\r\n resultTitle.top = title.position.offsetY + '%'\r\n } else {\r\n resultTitle.left = title.position.value.split('-')[0]\r\n resultTitle.top = title.position.value.split('-')[1]\r\n }\r\n\r\n // title.itemgap\r\n let actions = new Map([\r\n ['auto' , 10],\r\n ['far' , 30],\r\n ['close' , 5],\r\n ['normal' , 20],\r\n ['custom' , subtitle.distance.cusGap]\r\n ])\r\n resultTitle.itemGap = actions.get(subtitle.distance.value)\r\n\r\n return resultTitle\r\n}\r\n\r\nexport default transformTitle","/**\r\n * legend转换\r\n */\r\nimport { transTextStyle } from '@/utils/chartUtil'\r\nconst transformLegend = function(chartAllTypeArray , legend){\r\n let resLegend = {\r\n show: true,\r\n textStyle: {\r\n color: '#333',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 12\r\n },\r\n left: 'auto',\r\n top: 'auto',\r\n orient: 'horizontal',\r\n itemWidth: 25,\r\n itemGap: 10\r\n }\r\n // legend.show\r\n resLegend.show = legend.show\r\n // legend.textStyle\r\n transTextStyle(legend , resLegend , 'textStyle')\r\n // legend.position\r\n if (legend.position.value === 'custom') {\r\n resLegend.left = legend.position.offsetX \r\n resLegend.top = legend.position.offsetY \r\n } else {\r\n resLegend.left = legend.position.value.split('-')[0]\r\n resLegend.top = legend.position.value.split('-')[1]\r\n }\r\n // legend.orient\r\n resLegend.orient = legend.position.direction\r\n // legend.itemWidth\r\n let width = new Map([\r\n ['auto' , 25],\r\n ['big' , 45],\r\n ['medium' , 18],\r\n ['small' , 10],\r\n ['custom' , legend.width.cusSize]\r\n ])\r\n let height = new Map([\r\n ['auto' , 14],\r\n ['big' , 30],\r\n ['medium' , 20],\r\n ['small' , 10],\r\n ['custom' , legend.height.cusSize]\r\n ])\r\n resLegend.itemWidth = width.get(legend.width.value)\r\n resLegend.itemHeight = height.get(legend.height.value)\r\n // legend.itemGap\r\n let distance = new Map([\r\n ['auto' , 10],\r\n ['far' , 20],\r\n ['near' , 5],\r\n ['general' , 15],\r\n ['custom' , legend.distance.cusGap]\r\n ])\r\n resLegend.itemGap = distance.get(legend.distance.value) \r\n\r\n return resLegend\r\n}\r\n\r\nexport default transformLegend","/**\r\n * 鼠标提示转换\r\n */\r\nimport { transTextStyle , floatTool} from '@/utils/chartUtil'\r\nconst transformTooltip = function (chartAllTypeArray, tooltip) {\r\n const resTooltip = {\r\n show: true,\r\n trigger: 'item',\r\n textStyle: {\r\n color: '#fff',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 14\r\n },\r\n backgroundColor: 'rgba(50,50,50,0.7)',\r\n triggerOn: 'mousemove|click',\r\n axisPointer: {\r\n type: 'line',\r\n lineStyle: {\r\n type: 'solid',\r\n width: 1,\r\n color: '#555'\r\n }\r\n },\r\n position: 'right'\r\n }\r\n // tooltip.show\r\n resTooltip.show = tooltip.show\r\n // 触发类型\r\n resTooltip.trigger = tooltip.triggerType\r\n // 触发条件\r\n resTooltip.triggerOn = tooltip.triggerOn\r\n // 文字样式\r\n transTextStyle(tooltip, resTooltip, 'textStyle')\r\n // 背景色\r\n resTooltip.backgroundColor = tooltip.backgroundColor\r\n // 指示器配置\r\n resTooltip.axisPointer.lineStyle = tooltip.axisPointer.style\r\n resTooltip.axisPointer.type = tooltip.axisPointer.type\r\n // 提示框位置\r\n resTooltip.position = tooltip.position == 'auto' ? null : tooltip.position\r\n // 提示formatter\r\n let format = tooltip.format\r\n let formatter1 = function (params) {\r\n console.dir(params)\r\n let str = params[0].name + \"
\"\r\n for (var i = 0; i < params.length; i++) {\r\n if(format[params[i].seriesIndex].digit == 'auto'){\r\n params[i].value = floatTool.multiply(+params[i].value,format[params[i].seriesIndex].ratio) + format[params[i].seriesIndex].suffix\r\n }else{\r\n params[i].value = floatTool.multiply(+params[i].value,format[params[i].seriesIndex].ratio).toFixed(format[params[i].seriesIndex].digit) + format[params[i].seriesIndex].suffix\r\n }\r\n\r\n str += \"
 \" + params[i].seriesName + \":  \" + params[i].value + \"
\";\r\n }\r\n return str\r\n }\r\n\r\n let formatter2 = function (params) {\r\n if(format[params.seriesIndex].digit == 'auto'){\r\n params.value = floatTool.multiply(+params.value, format[params.seriesIndex].ratio) + format[params.seriesIndex].suffix\r\n }else{\r\n params.value = floatTool.multiply(+params.value, format[params.seriesIndex].ratio).toFixed(format[params.seriesIndex].digit) + format[params.seriesIndex].suffix\r\n }\r\n let str = params.seriesName + \"
    \" + params.name + \":  \" + params.value;\r\n return str\r\n }\r\n\r\n let actions = new Map([\r\n ['item' , formatter2],\r\n ['axis' , formatter1]\r\n ]) \r\n resTooltip.formatter = actions.get(resTooltip.trigger)\r\n\r\n return resTooltip\r\n}\r\n\r\nexport default transformTooltip","/**\r\n * 坐标轴转换\r\n */\r\nimport { transTextStyle , transLineStyle , floatTool ,transCustom } from '@/utils/chartUtil'\r\nimport { deepCopy } from '@/utils/util'\r\nconst transformAxis = function(chartAllTypeArray , axis){\r\n let chartType = chartAllTypeArray[1]\r\n let option = {\r\n show: true,\r\n name: '',\r\n nameTextStyle: {\r\n color: '#333',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 12\r\n },\r\n nameLocation: 'end',\r\n inverse: false,\r\n interval: null,\r\n nameGap: 15,\r\n nameRotate: null,\r\n axisLine: {\r\n show: true,\r\n lineStyle: {\r\n color: '#333',\r\n width: 1\r\n }\r\n },\r\n axisTick: {\r\n show: true,\r\n inside: false,\r\n length: 5,\r\n lineStyle: {\r\n width: 1,\r\n type: 'solid',\r\n color: null\r\n }\r\n },\r\n axisLabel: {\r\n show: true,\r\n rotate: 0,\r\n formatter: null\r\n },\r\n min: null,\r\n max: null,\r\n splitLine: {\r\n show: true,\r\n lineStyle: {\r\n color: '#ccc',\r\n width: 1,\r\n type: 'solid'\r\n },\r\n interval: 'auto'\r\n },\r\n splitArea: {\r\n show: false,\r\n areaStyle: {\r\n color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']\r\n }\r\n }\r\n }\r\n\r\n let transAxis = function(res , ori){\r\n let origin = axis[ori]\r\n // axis.show\r\n res.show = origin.show\r\n // axis.name\r\n res.name = origin.title.text\r\n // axis.label\r\n transTextStyle(origin.title , res , 'nameTextStyle')\r\n res.nameLocation = origin.title.fzPosition\r\n // 反向坐标轴\r\n res.inverse = origin.inverse\r\n // 坐标轴间隔个数\r\n res.interval = origin.tickLabel.optimize\r\n // 标题与轴线距离\r\n res.nameGap = origin.title.rotate\r\n // 刻度线设置\r\n res.axisLine.show = origin.tickLine.show\r\n res.axisLine.lineStyle = transLineStyle(origin.tickLine.width , origin.tickLine.color)\r\n // 刻度设置\r\n res.axisTick.show = origin.tick.show\r\n res.axisTick.lineStyle = transLineStyle(origin.tick.width , origin.tick.color)\r\n res.axisTick.inside = origin.tick.position == 'inside' ? true : false\r\n res.axisTick.length = origin.tick.length\r\n // 刻度标签\r\n res.axisLabel.show = origin.tickLabel.show\r\n res.axisLabel.rotate = origin.tickLabel.rotate\r\n // 标签formatter\r\n if((chartType == 'bar' && ori.slice(0,1) == 'x') || (chartType != 'bar' && ori.slice(0,1) == 'y')){\r\n res.min = origin.tickLabel.min\r\n res.max = origin.tickLabel.max\r\n res.axisLabel.formatter = function(params){\r\n if(origin.tickLabel.digit == 'auto'){\r\n return origin.tickLabel.prefix + floatTool.multiply(+params , origin.tickLabel.ratio) + origin.tickLabel.suffix\r\n }else{\r\n return origin.tickLabel.prefix + floatTool.multiply(+params , origin.tickLabel.ratio).toFixed(origin.tickLabel.digit) + origin.tickLabel.suffix\r\n }\r\n }\r\n }else{\r\n res.axisLabel.formatter = function(params){\r\n return origin.tickLabel.prefix + params + origin.tickLabel.suffix\r\n }\r\n }\r\n // 网格线\r\n res.splitLine.show = origin.netLine.show\r\n res.splitLine.lineStyle = transLineStyle(origin.netLine.width , origin.netLine.color , origin.netLine.type)\r\n res.splitLine.interval = transCustom(origin.netLine.interval.value , origin.netLine.interval.cusNumber)\r\n // 网格区域\r\n res.splitArea.show = origin.netArea.show\r\n res.splitArea.interval = transCustom(origin.netArea.interval.value , origin.netArea.interval.cusNumber)\r\n res.splitArea.areaStyle.color = [origin.netArea.colorOne == 'auto' ? 'rgba(250,250,250,0.3)' : origin.netArea.colorOne , origin.netArea.colorTwo == 'auto' ? 'rgba(200,200,200,0.3)' : origin.netArea.colorTwo]\r\n\r\n return res\r\n }\r\n\r\n return {\r\n xAxisUp: transAxis(deepCopy(option) , 'xAxisUp'),\r\n xAxisDown: transAxis(deepCopy(option) , 'xAxisDown'),\r\n yAxisLeft: transAxis(deepCopy(option) , 'yAxisLeft'),\r\n yAxisRight: transAxis(deepCopy(option) , 'yAxisRight')\r\n }\r\n}\r\n\r\nexport default transformAxis","/**\r\n * echarts转换引擎\r\n */\r\n\r\nimport transformTitle from './transformTitle'\r\nimport transformLegend from './transformLegend'\r\nimport transformTooltip from './transformTooltip'\r\nimport transformAxis from './transformAxis'\r\n\r\nconst echartsEngine = function (chartOptions) {\r\n //TODO: chartOptions 转换后导出\r\n\r\n const chartAllTypeArray = chartOptions.chartAllType.split('|');\r\n const chartPro = chartAllTypeArray[0];\r\n const chartType = chartAllTypeArray[1];\r\n const chartStyle = chartAllTypeArray[2];\r\n\r\n const titleOption = transformTitle(chartAllTypeArray , chartOptions.defaultOption.title,chartOptions.defaultOption.subtitle)\r\n // const configOption = transformConfig(chartOptions.defaultOption.config);\r\n const legendOption = transformLegend(chartAllTypeArray , chartOptions.defaultOption.legend)\r\n const tooltipOption = transformTooltip(chartAllTypeArray , chartOptions.defaultOption.tooltip)\r\n const axisOption = transformAxis(chartAllTypeArray , chartOptions.defaultOption.axis)\r\n axisOption.xAxisDown.data = chartOptions.defaultOption.axis.xAxisDown.data\r\n\r\n const option = {\r\n title:{...titleOption},\r\n tooltip: {\r\n ...tooltipOption\r\n },\r\n legend: {\r\n ...legendOption\r\n },\r\n xAxis: [{\r\n ...axisOption.xAxisDown\r\n },{\r\n ...axisOption.xAxisUp\r\n }],\r\n yAxis: [\r\n axisOption.yAxisLeft,\r\n axisOption.yAxisRight\r\n ],\r\n series: chartOptions.defaultOption.series\r\n };\r\n // 饼图去掉XY轴\r\n if(chartType == 'pie'){\r\n delete option.xAxis\r\n delete option.yAxis\r\n }\r\n\r\n console.dir(option)\r\n console.dir(JSON.stringify(option))\r\n return option;\r\n}\r\n\r\nexport default echartsEngine","import echartsEngine from '@/utils/echartsEngine/index'\r\n// import highchartsEngine from './highchartsEngine'\r\nconst echarts = require('echarts');\r\n\r\n\r\n/**\r\n * update main object's subject attribute by router\r\n * @param {Object} chartOptions main object\r\n * @param {String} router router\r\n * @param {Object} updateObj subject attribute\r\n */\r\nconst setChartOptionsByRouter = function (chartOptions, router, updateObj) {\r\n if (chartOptions == undefined || router == undefined) {\r\n return chartOptions;\r\n }\r\n\r\n let routerArray = router.split('/');\r\n const defaultOption = chartOptions.defaultOption;\r\n\r\n //递归获取内部属性\r\n function deepFind(curObj) {\r\n if (routerArray.length != 0) {\r\n return deepFind(curObj[routerArray.shift()])\r\n } else {\r\n Object.assign(curObj, updateObj)\r\n return curObj\r\n }\r\n\r\n }\r\n deepFind(defaultOption);\r\n return chartOptions;\r\n}\r\n\r\n/**\r\n * 渲染图表的方法,拿到store的配置json(对应于chartJson中的数据格式,可能是初始化图表的数据,也可能是后台传输来的特定配置的数据),执行转换引擎后,渲染到图表插件中,独立于vue组件.可用于编辑器和预览端\r\n * \r\n */\r\nconst renderChart = function (renderChartObj, ele) {\r\n const { chart_id, chartOptions } = renderChartObj;\r\n const chartAllTypeArray = chartOptions.chartAllType.split('|');\r\n const chartPro = chartAllTypeArray[0];\r\n // const container = ele || document.getElementById(chart_id);\r\n const container = document.getElementById(chart_id);\r\n\r\n if (chartPro === 'echarts') {\r\n const options = echartsEngine(chartOptions);\r\n\r\n let chart = echarts.getInstanceByDom(container);\r\n if (chart == null) {\r\n chart = echarts.init(container)\r\n }\r\n\r\n chart.setOption(options, true);\r\n\r\n setTimeout(() => {\r\n echarts.getInstanceById(container.getAttribute('_echarts_instance_')).resize();\r\n }, 0);\r\n }\r\n}\r\n\r\n/**\r\n * textStyle转化\r\n */\r\nconst transTextStyle = function(origin , result , attr , attr1){\r\n // fontGroup\r\n let fontGroupList = ['bold', 'vertical', 'italic'];\r\n origin.label.fontGroup.forEach(element => {\r\n if (fontGroupList.includes(element)) {\r\n switch (element) {\r\n case 'bold':\r\n result[attr].fontWeight = element;\r\n break;\r\n case 'vertical':\r\n // TODO: '标题01'\r\n result[attr1] = origin.text.replace(/\\B/g, '\\n');\r\n break;\r\n case 'italic':\r\n result[attr].fontStyle = element;\r\n break;\r\n }\r\n }\r\n });\r\n // fontColor\r\n result[attr].color = origin.label.color\r\n // fontSize\r\n result[attr].fontSize = transCustom(origin.label.fontSize , origin.label.cusFontSize)\r\n}\r\n\r\n// 解决精度\r\nconst floatTool = function() {\r\n \r\n /*\r\n * 判断obj是否为一个整数\r\n */\r\n function isInteger(obj) {\r\n return Math.floor(obj) === obj;\r\n }\r\n \r\n /*\r\n * 将一个浮点数转成整数,返回整数和倍数。如 3.14 >> 314,倍数是 100\r\n * @param floatNum {number} 小数\r\n * @return {object}\r\n * {times:100, num: 314}\r\n */\r\n function toInteger(floatNum) {\r\n var ret = {times: 1, num: 0};\r\n\r\n if (isInteger(floatNum)) {\r\n ret.num = floatNum;\r\n return ret;\r\n }\r\n\r\n var strfi = floatNum + '';\r\n var dotPos = strfi.indexOf('.');\r\n var len = strfi.substr(dotPos + 1).length;\r\n var times = Math.pow(10, len);\r\n var intNum = parseInt(floatNum * times + 0.5, 10);\r\n\r\n ret.times = times;\r\n ret.num = intNum;\r\n\r\n return ret;\r\n }\r\n \r\n /*\r\n * 核心方法,实现加减乘除运算,确保不丢失精度\r\n * 思路:把小数放大为整数(乘),进行算术运算,再缩小为小数(除)\r\n *\r\n * @param a {number} 运算数1\r\n * @param b {number} 运算数2\r\n * @param digits {number} 精度,保留的小数点数,比如 2, 即保留为两位小数\r\n * @param op {string} 运算类型,有加减乘除(add/subtract/multiply/divide)\r\n *\r\n */\r\n function operation(a, b, op) {\r\n var o1 = toInteger(a);\r\n var o2 = toInteger(b);\r\n var n1 = o1.num;\r\n var n2 = o2.num;\r\n var t1 = o1.times;\r\n var t2 = o2.times;\r\n var max = t1 > t2 ? t1 : t2;\r\n var result = null;\r\n\r\n switch (op) {\r\n case 'add':\r\n if (t1 === t2) { // 两个小数位数相同\r\n result = n1 + n2;\r\n } \r\n else if (t1 > t2) { // o1 小数位 大于 o2\r\n result = n1 + n2 * (t1 / t2);\r\n } \r\n else { // o1 小数位 小于 o2\r\n result = n1 * (t2 / t1) + n2;\r\n }\r\n\r\n return result / max;\r\n case 'subtract':\r\n if (t1 === t2) {\r\n result = n1 - n2;\r\n } \r\n else if (t1 > t2) {\r\n result = n1 - n2 * (t1 / t2);\r\n } \r\n else {\r\n result = n1 * (t2 / t1) - n2;\r\n }\r\n\r\n return result / max;\r\n case 'multiply':\r\n result = (n1 * n2) / (t1 * t2);\r\n \r\n return result;\r\n case 'divide':\r\n return result = function() {\r\n var r1 = n1 / n2;\r\n var r2 = t2 / t1;\r\n return operation(r1, r2, 'multiply');\r\n }();\r\n }\r\n }\r\n \r\n // 加减乘除的四个接口\r\n function add(a, b) {\r\n return operation(a, b, 'add');\r\n }\r\n function subtract(a, b) {\r\n return operation(a, b, 'subtract');\r\n }\r\n function multiply(a, b) {\r\n return operation(a, b, 'multiply');\r\n }\r\n function divide(a, b) {\r\n return operation(a, b, 'divide');\r\n }\r\n \r\n // exports\r\n return {\r\n add: add,\r\n subtract: subtract,\r\n multiply: multiply,\r\n divide: divide\r\n };\r\n}();\r\n\r\n/**\r\n * lineStyle转化\r\n */\r\nconst transLineStyle = function (width , color , type='solid'){\r\n return {\r\n width,\r\n color,\r\n type \r\n }\r\n}\r\n\r\n/**\r\n 自定义* custom数据\r\n */\r\nconst transCustom = function (a , b){\r\n if(a != 'custom'){\r\n return a\r\n }else{\r\n return b\r\n }\r\n}\r\n\r\n\r\nexport {\r\n setChartOptionsByRouter,\r\n renderChart,\r\n transTextStyle,\r\n floatTool,\r\n transLineStyle,\r\n transCustom\r\n}","import {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n UPDATE_CHART_ITEM,\r\n IS_UPDATE\r\n} from './mutation-types';\r\nimport { setChartOptionsByRouter } from '@/utils/chartUtil';\r\n\r\nexport default {\r\n [ENABLE_ACTIVE](state, id) {\r\n // 1. set active\r\n state.chartLists[id].active = true;\r\n\r\n // 2. set current chart index\r\n state.currentChartIndex = id;\r\n },\r\n [DISABLE_ACTIVE](state, id) {\r\n state.chartLists[id].active = false;\r\n },\r\n /**\r\n *根据对象属性的路径, 更新图表子属性的方法\r\n //自定义一种类型'router',updateObj内部也是采用颗粒更新的模式,防止全部替换chartOptions造成的chartsetting内部组件全局重刷\r\n params:{\r\n updateSubObj:{label:{},show:true,...} //子属性新的值\r\n router:'title/label' //属性路径\r\n }\r\n */\r\n [UPDATE_CHART_ITEM](state,params) {\r\n //子组件设置更新到chartOptions上后再更新到fabric组件上\r\n console.info('updateObj', params)\r\n const { router , updateObj } = params\r\n const currentChartOptions = state.chartLists[state.currentChartIndex].chartOptions;\r\n\r\n setChartOptionsByRouter(currentChartOptions,router , updateObj); //更新到子对象\r\n }\r\n};","import { merge, cloneDeep } from 'lodash';\r\nimport { chartOptions } from '@/data/chartJson';\r\nexport default {\r\n // store all chart objects\r\n chartLists:[\r\n {\r\n 'chart_id': 'chart_a_001',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n {\r\n 'chart_id': 'chart_a_002',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n {\r\n 'chart_id': 'chart_a_003',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n ],\r\n // store current chart index\r\n currentChartIndex: null,\r\n // current chart objects, bind to chartSetting component\r\n // currentChart: {},\r\n};","import actions from './actions';\r\nimport getters from './getters';\r\nimport mutations from './mutations';\r\nimport state from './state';\r\n\r\nexport default {\r\n namespaced: true,\r\n actions,\r\n getters,\r\n mutations,\r\n state\r\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"chartRender\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartRender.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartRender.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartRender.vue?vue&type=template&id=296f5725&scoped=true&\"\nimport script from \"./ChartRender.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartRender.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"296f5725\",\n null\n \n)\n\nexport default component.exports","export const ENABLE_ACTIVE = 'ENABLE_ACTIVE';\r\nexport const DISABLE_ACTIVE = 'DISABLE_ACTIVE';\r\n\r\nexport const ENABLE_DRAGGABLE = 'ENABLE_DRAGGABLE';\r\nexport const DISABLE_DRAGGABLE = 'DISABLE_DRAGGABLE';\r\n\r\nexport const ENABLE_RESIZABLE = 'ENABLE_RESIZABLE';\r\nexport const DISABLE_RESIZABLE = 'DISABLE_RESIZABLE';\r\n\r\nexport const ENABLE_PARENT_LIMITATION = 'ENABLE_PARENT_LIMITATION';\r\nexport const DISABLE_PARENT_LIMITATION = 'DISABLE_PARENT_LIMITATION';\r\n\r\nexport const ENABLE_SNAP_TO_GRID = 'ENABLE_SNAP_TO_GRID';\r\nexport const DISABLE_SNAP_TO_GRID = 'DISABLE_SNAP_TO_GRID';\r\n\r\nexport const ENABLE_ASPECT = 'ENABLE_ASPECT';\r\nexport const DISABLE_ASPECT = 'DISABLE_ASPECT';\r\n\r\nexport const ENABLE_X_AXIS = 'ENABLE_X_AXIS';\r\nexport const ENABLE_Y_AXIS = 'ENABLE_Y_AXIS';\r\nexport const ENABLE_BOTH_AXIS = 'ENABLE_BOTH_AXIS';\r\nexport const ENABLE_NONE_AXIS = 'ENABLE_NONE_AXIS';\r\n\r\nexport const CHANGE_ZINDEX = 'CHANGE_ZINDEX';\r\n\r\nexport const CHANGE_MINW = 'CHANGE_MINW';\r\nexport const CHANGE_MINH = 'CHANGE_MINH';\r\n\r\nexport const CHANGE_WIDTH = 'CHANGE_WIDTH';\r\nexport const CHANGE_HEIGHT = 'CHANGE_HEIGHT';\r\nexport const CHANGE_TOP = 'CHANGE_TOP';\r\nexport const CHANGE_LEFT = 'CHANGE_LEFT';\r\n\r\nexport default {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n ENABLE_DRAGGABLE,\r\n DISABLE_DRAGGABLE,\r\n ENABLE_RESIZABLE,\r\n DISABLE_RESIZABLE,\r\n ENABLE_PARENT_LIMITATION,\r\n DISABLE_PARENT_LIMITATION,\r\n ENABLE_SNAP_TO_GRID,\r\n DISABLE_SNAP_TO_GRID,\r\n ENABLE_ASPECT,\r\n DISABLE_ASPECT,\r\n ENABLE_X_AXIS,\r\n ENABLE_Y_AXIS,\r\n ENABLE_NONE_AXIS,\r\n ENABLE_BOTH_AXIS,\r\n CHANGE_ZINDEX,\r\n CHANGE_MINW,\r\n CHANGE_MINH,\r\n CHANGE_WIDTH,\r\n CHANGE_HEIGHT,\r\n CHANGE_TOP,\r\n CHANGE_LEFT\r\n}","import types, {CHANGE_ZINDEX} from './mutation-types';\r\n\r\nexport default {\r\n setActive({commit, state}, {id}) {\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i === id) {\r\n commit(types.ENABLE_ACTIVE, i);\r\n continue;\r\n }\r\n\r\n commit(types.DISABLE_ACTIVE, i);\r\n }\r\n },\r\n unsetActive({commit}, {id}) {\r\n commit(types.DISABLE_ACTIVE, id);\r\n },\r\n\r\n toggleDraggable({commit, state}, {id}) {\r\n if (!state.rects[id].draggable) {\r\n commit(types.ENABLE_DRAGGABLE, id);\r\n } else {\r\n commit(types.DISABLE_DRAGGABLE, id);\r\n }\r\n },\r\n\r\n toggleResizable({commit, state}, {id}) {\r\n if (!state.rects[id].resizable) {\r\n commit(types.ENABLE_RESIZABLE, id);\r\n } else {\r\n commit(types.DISABLE_RESIZABLE, id);\r\n }\r\n },\r\n\r\n toggleParentLimitation({commit, state}, {id}) {\r\n if (!state.rects[id].parentLim) {\r\n commit(types.ENABLE_PARENT_LIMITATION, id);\r\n } else {\r\n commit(types.DISABLE_PARENT_LIMITATION, id);\r\n }\r\n },\r\n\r\n toggleSnapToGrid({commit, state}, {id}) {\r\n if (!state.rects[id].snapToGrid) {\r\n commit(types.ENABLE_SNAP_TO_GRID, id);\r\n } else {\r\n commit(types.DISABLE_SNAP_TO_GRID, id);\r\n }\r\n },\r\n\r\n setAspect({commit}, {id}) {\r\n commit(types.ENABLE_ASPECT, id);\r\n },\r\n unsetAspect({commit}, {id}) {\r\n commit(types.DISABLE_ASPECT, id);\r\n },\r\n\r\n setWidth({commit}, {id, width}) {\r\n commit(types.CHANGE_WIDTH, {id, width});\r\n },\r\n\r\n setHeight({commit}, {id, height}) {\r\n commit(types.CHANGE_HEIGHT, {id, height});\r\n },\r\n\r\n setTop({commit}, {id, top}) {\r\n commit(types.CHANGE_TOP, {id, top});\r\n },\r\n\r\n setLeft({commit}, {id, left}) {\r\n commit(types.CHANGE_LEFT, {id, left});\r\n },\r\n\r\n changeXLock({commit, state}, {id}) {\r\n switch (state.rects[id].axis) {\r\n case 'both':\r\n commit(types.ENABLE_Y_AXIS, id);\r\n break;\r\n case 'x':\r\n commit(types.ENABLE_NONE_AXIS, id);\r\n break;\r\n case 'y':\r\n commit(types.ENABLE_BOTH_AXIS, id);\r\n break;\r\n case 'none':\r\n commit(types.ENABLE_X_AXIS, id);\r\n break;\r\n }\r\n },\r\n\r\n changeYLock({commit, state}, {id}) {\r\n switch (state.rects[id].axis) {\r\n case 'both':\r\n commit(types.ENABLE_X_AXIS, id);\r\n break;\r\n case 'x':\r\n commit(types.ENABLE_BOTH_AXIS, id);\r\n break;\r\n case 'y':\r\n commit(types.ENABLE_NONE_AXIS, id);\r\n break;\r\n case 'none':\r\n commit(types.ENABLE_Y_AXIS, id);\r\n break;\r\n }\r\n },\r\n\r\n changeZToBottom({commit, state}, {id}) {\r\n if (state.rects[id].zIndex === 1) {\r\n return\r\n }\r\n\r\n commit(types.CHANGE_ZINDEX, {id, zIndex: 1});\r\n\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i !== id) {\r\n if(state.rects[i].zIndex === state.rects.length){\r\n continue\r\n }\r\n commit(types.CHANGE_ZINDEX, {id: i, zIndex: state.rects[i].zIndex + 1});\r\n }\r\n }\r\n },\r\n\r\n changeZToTop({commit, state}, {id}) {\r\n if (state.rects[id].zIndex === state.rects.length) {\r\n return\r\n }\r\n\r\n commit(types.CHANGE_ZINDEX, {id, zIndex: state.rects.length});\r\n\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i !== id) {\r\n if(state.rects[i].zIndex === 1){\r\n continue\r\n }\r\n commit(types.CHANGE_ZINDEX, {id: i, zIndex: state.rects[i].zIndex - 1});\r\n }\r\n }\r\n },\r\n\r\n setMinWidth({commit}, {id, width}) {\r\n commit(types.CHANGE_MINW, {id, minw:width});\r\n },\r\n\r\n setMinHeight({commit}, {id, height}) {\r\n commit(types.CHANGE_MINH, {id, minh:height});\r\n }\r\n};\r\n","export default {\r\n getActive: state => {\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n let rect = state.rects[i];\r\n\r\n if (rect.active) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n}","import {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n ENABLE_ASPECT,\r\n DISABLE_ASPECT,\r\n ENABLE_DRAGGABLE,\r\n DISABLE_DRAGGABLE,\r\n ENABLE_RESIZABLE,\r\n DISABLE_RESIZABLE,\r\n ENABLE_PARENT_LIMITATION,\r\n DISABLE_PARENT_LIMITATION,\r\n ENABLE_SNAP_TO_GRID,\r\n DISABLE_SNAP_TO_GRID,\r\n CHANGE_ZINDEX,\r\n ENABLE_BOTH_AXIS,\r\n ENABLE_X_AXIS,\r\n ENABLE_Y_AXIS,\r\n ENABLE_NONE_AXIS,\r\n CHANGE_HEIGHT,\r\n CHANGE_LEFT,\r\n CHANGE_MINH,\r\n CHANGE_MINW,\r\n CHANGE_TOP,\r\n CHANGE_WIDTH\r\n} from './mutation-types';\r\n\r\nexport default {\r\n [ENABLE_ACTIVE](state, id) {\r\n state.rects[id].active = true;\r\n },\r\n [DISABLE_ACTIVE](state, id) {\r\n state.rects[id].active = false;\r\n },\r\n\r\n [ENABLE_ASPECT](state, id) {\r\n state.rects[id].aspectRatio = true;\r\n },\r\n [DISABLE_ASPECT](state, id) {\r\n state.rects[id].aspectRatio = false;\r\n },\r\n\r\n [ENABLE_DRAGGABLE](state, id) {\r\n state.rects[id].draggable = true;\r\n },\r\n [DISABLE_DRAGGABLE](state, id) {\r\n state.rects[id].draggable = false;\r\n },\r\n\r\n [ENABLE_RESIZABLE](state, id) {\r\n state.rects[id].resizable = true;\r\n },\r\n [DISABLE_RESIZABLE](state, id) {\r\n state.rects[id].resizable = false;\r\n },\r\n\r\n [ENABLE_SNAP_TO_GRID](state, id) {\r\n state.rects[id].snapToGrid = true;\r\n },\r\n [DISABLE_SNAP_TO_GRID](state, id) {\r\n state.rects[id].snapToGrid = false;\r\n },\r\n\r\n [ENABLE_BOTH_AXIS](state, id) {\r\n state.rects[id].axis = 'both';\r\n },\r\n [ENABLE_NONE_AXIS](state, id) {\r\n state.rects[id].axis = 'none';\r\n },\r\n [ENABLE_X_AXIS](state, id) {\r\n state.rects[id].axis = 'x';\r\n },\r\n [ENABLE_Y_AXIS](state, id) {\r\n state.rects[id].axis = 'y';\r\n },\r\n\r\n [ENABLE_PARENT_LIMITATION](state, id) {\r\n state.rects[id].parentLim = true;\r\n },\r\n [DISABLE_PARENT_LIMITATION](state, id) {\r\n state.rects[id].parentLim = false;\r\n },\r\n\r\n [CHANGE_ZINDEX](state, payload) {\r\n state.rects[payload.id].zIndex = payload.zIndex;\r\n },\r\n\r\n [CHANGE_HEIGHT](state, payload) {\r\n state.rects[payload.id].height = payload.height;\r\n },\r\n\r\n [CHANGE_WIDTH](state, payload) {\r\n state.rects[payload.id].width = payload.width;\r\n },\r\n\r\n [CHANGE_TOP](state, payload) {\r\n state.rects[payload.id].top = payload.top;\r\n },\r\n\r\n [CHANGE_LEFT](state, payload) {\r\n state.rects[payload.id].left = payload.left;\r\n },\r\n\r\n [CHANGE_MINH](state, payload) {\r\n\r\n state.rects[payload.id].minh = payload.minh;\r\n },\r\n\r\n [CHANGE_MINW](state, payload) {\r\n state.rects[payload.id].minw = payload.minw;\r\n }\r\n};","export default {\r\n 'rects': [\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 10,\r\n 'left': 10,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 1,\r\n 'color': '#EF9A9A',\r\n 'active': false,\r\n 'chart_id': 'chart_a_001',\r\n },\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 10,\r\n 'left': 220,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 2,\r\n 'color': '#AED581',\r\n 'active': false,\r\n 'chart_id': 'chart_a_002',\r\n },\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 170,\r\n 'left': 10,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 3,\r\n 'color': '#81D4FA',\r\n 'active': false,\r\n 'chart_id': 'chart_a_003',\r\n }\r\n ]\r\n};\r\n","import actions from './actions';\r\nimport getters from './getters';\r\nimport mutations from './mutations';\r\nimport state from './state';\r\n\r\nexport default {\r\n namespaced: true,\r\n actions,\r\n getters,\r\n mutations,\r\n state\r\n};\r\n","// use vuex modules\r\n\r\n//chart display box\r\nconst chartRender = {\r\n state: () => ({\r\n //show or hide\r\n isShow: true\r\n }),\r\n getters: {\r\n\r\n },\r\n mutations: {\r\n\r\n },\r\n actions: {\r\n\r\n }\r\n}\r\n\r\nexport default chartRender","import Vue from 'vue'\r\nimport Vuex from 'vuex'\r\nimport rect from './modules/rect'\r\nimport chartRender from './modules/chartRender'\r\nimport chartSetting from './modules/chartSetting'\r\n\r\nVue.use(Vuex)\r\n\r\nconst store = new Vuex.Store()\r\n\r\nexport { store }\r\n\r\n\r\n\r\nconst debug = process.env.NODE_ENV !== 'production';\r\n\r\nexport default new Vuex.Store({\r\n /**\r\n * Assign the modules to the store\r\n */\r\n modules: {\r\n 'rect': rect,\r\n 'chartRender': chartRender,\r\n 'chartSetting': chartSetting\r\n },\r\n\r\n /**\r\n * If strict mode should be enabled\r\n */\r\n strict: debug\r\n});\r\n","import store from '../store'\r\nimport Vue from 'vue'\r\nimport { generateRandomKey, deepCopy, replaceHtml, getRowColCheck, getRangeSplitArray, getChartDataCache , getChartDataSeriesOrder , addDataToOption } from '../utils/util'\r\nimport { chartOptions } from '../data/chartJson'\r\n\r\nfunction initChart(outDom) {\r\n let dom = document.createElement('div')\r\n dom.id = 'chartmix'\r\n outDom.appendChild(dom);\r\n\r\n new Vue({\r\n el: '#chartmix',\r\n store,\r\n computed: {\r\n chartOptions() {\r\n if (!store.state.chartSetting.currentChartIndex) {\r\n return null\r\n }\r\n return store.state.chartSetting.chartLists[store.state.chartSetting.currentChartIndex].chartOptions\r\n }\r\n },\r\n template: ``\r\n })\r\n\r\n}\r\n\r\n// 创建图表,返回dom便于后续操作\r\nfunction createChart(outDom, chartData) {\r\n\r\n let chart_id = generateRandomKey('chart')\r\n\r\n chartOptions.defaultOption.series = []\r\n\r\n // 随机生成图表\r\n let ratio = Math.random()*10\r\n if(ratio > 5){\r\n chartOptions.chartAllType = 'echarts|pie|default'\r\n }else{\r\n chartOptions.chartAllType = 'echarts|line|default'\r\n }\r\n\r\n // 生成图表数据机构\r\n let chartOption = insertNewChart(chartOptions , chart_id , chartOptions.chartAllType , chartData)\r\n\r\n let renderDom = document.createElement('div')\r\n renderDom.id = 'render' + chart_id\r\n\r\n let modelChartShowHTML =\r\n '
${content}
'\r\n\r\n let chart_id_c = chart_id + '_c'\r\n\r\n let $t = $(\r\n replaceHtml(modelChartShowHTML, {\r\n id: chart_id_c,\r\n addclass: 'jfgrid-data-visualization-chart',\r\n title: '图表生成',\r\n content: ''\r\n })\r\n ).appendTo($(outDom))\r\n\r\n $t.find('.jfgrid-modal-dialog-content').attr('id', chart_id)\r\n\r\n $('.jfgrid-modal-dialog-content').append(renderDom)\r\n\r\n store.state.chartSetting.currentChartIndex = store.state.chartSetting.chartLists.length\r\n store.state.chartSetting.chartLists.push({\r\n 'chart_id': chart_id,\r\n 'active': true,\r\n 'chartOptions': deepCopy(chartOption)\r\n })\r\n\r\n console.dir(chartOption)\r\n\r\n new Vue({\r\n el: '#render' + chart_id,\r\n store,\r\n data() {\r\n return {\r\n chart_id\r\n }\r\n },\r\n computed: {\r\n options() {\r\n console.dir(this.chart_id)\r\n return store.state.chartSetting.chartLists.find(item => item.chart_id == this.chart_id).chartOptions\r\n },\r\n active() {\r\n return store.state.chartSetting.chartLists.find(item => item.chart_id == this.chart_id).active\r\n }\r\n },\r\n template: ``\r\n })\r\n\r\n let render = document.getElementById(chart_id)\r\n let container = document.getElementById(chart_id + '_c')\r\n return {\r\n container,\r\n render\r\n }\r\n}\r\n\r\n// insertChart\r\nfunction insertNewChart (\r\n chartOptions,\r\n chart_id,\r\n chartAllType,\r\n chartData,\r\n chartTheme,\r\n height,\r\n width,\r\n left,\r\n top\r\n) {\r\n var chart_json = {}\r\n\r\n var chartAllTypeArray = chartAllType.split('|')\r\n\r\n var chartPro = chartAllTypeArray[0],\r\n chartType = chartAllTypeArray[1],\r\n chartStyle = chartAllTypeArray[2]\r\n\r\n chart_json.chart_id = chart_id\r\n chart_json.chartAllType = chartAllType\r\n chart_json.chartPro = chartPro\r\n chart_json.chartType = chartType\r\n chart_json.chartStyle = chartStyle\r\n\r\n chart_json.height = height\r\n chart_json.width = width\r\n chart_json.left = left\r\n chart_json.top = top\r\n\r\n //按照图表类型得到图表的默认设置\r\n var defaultOptionIni = chartOptions.defaultOption\r\n //数据的sheet索引\r\n chart_json.chartData = chartData\r\n\r\n //根据数据集得到按钮状态,rangeColCheck表示首列是否标题,rangeRowCheck表示首行是否标题,rangeConfigCheck表示是否转置。\r\n var rowColCheck = getRowColCheck(chartData)\r\n var rangeRowCheck = rowColCheck[0],\r\n rangeColCheck = rowColCheck[1],\r\n rangeConfigCheck = false\r\n\r\n chart_json.rangeColCheck = rangeColCheck\r\n chart_json.rangeRowCheck = rangeRowCheck\r\n chart_json.rangeConfigCheck = rangeConfigCheck\r\n\r\n //按照数据范围文字得到具体数据范围\r\n var rangeSplitArray = getRangeSplitArray(\r\n chartData,\r\n rangeColCheck,\r\n rangeRowCheck\r\n )\r\n chart_json.rangeSplitArray = rangeSplitArray\r\n\r\n //根据数据集、功能按钮状态、图表类型,得到图表可操作的数据格式,例如:{ \"x\":[], \"y\":[], series:[] },可以按照次格式渲染数据页中的系列和轴控件。\r\n //数据为一行且为汉字的时候,chartDataCache的series为空数组\r\n var chartDataCache = getChartDataCache(\r\n chartData,\r\n rangeSplitArray,\r\n chartPro,\r\n chartType,\r\n chartStyle\r\n )\r\n chart_json.chartDataCache = chartDataCache\r\n\r\n //生成默认的系列顺序,默认根据series数组的位置,用户可以在界面上操作更改这个位置。\r\n var chartDataSeriesOrder = getChartDataSeriesOrder(\r\n chartDataCache.series[0].length\r\n )\r\n\r\n chart_json.chartDataSeriesOrder = chartDataSeriesOrder\r\n\r\n //设置图表皮肤\r\n chart_json.chartTheme = chartTheme\r\n\r\n //根据图表的默认设置、图表数据、图表系列顺序,等到一个完整的图表配置串。\r\n var defaultOption = addDataToOption(\r\n defaultOptionIni,\r\n chartDataCache,\r\n chartDataSeriesOrder,\r\n chartPro,\r\n chartType,\r\n chartStyle\r\n )\r\n\r\n //根据图表厂商选择渲染引擎,并根据设置渲染出图表\r\n chart_json.defaultOption = defaultOption\r\n return chart_json\r\n}\r\n\r\n// highlight current chart\r\nfunction highlightChart(id){\r\n let index = store.state.chartSetting.chartLists.findIndex(item => item.chart_id == id)\r\n store.state.chartSetting.currentChartIndex = index\r\n}\r\n\r\n\r\nexport {\r\n initChart,\r\n createChart,\r\n highlightChart\r\n}","// import single vue component\r\nimport ChartSetting from './ChartMix/ChartSetting.vue'\r\nimport chartSetting from '../store/modules/chartSetting'\r\nimport ChartRender from './ChartMix/ChartRender.vue'\r\nimport { initChart , createChart , highlightChart } from '../utils/exportUtil'\r\n\r\n// all components\r\nconst components = [\r\n ChartSetting,\r\n ChartRender\r\n]\r\n\r\n/**\r\n * define install function\r\n *\r\n * @param {Object} Vue \r\n * @param {Object} [options={}] \r\n */\r\nconst install = function (Vue, options = {}) {\r\n if (!install.componentInstalled) {\r\n // map and register all global components\r\n components.map(component => {\r\n Vue.component(component.name, component)\r\n })\r\n\r\n install.componentInstalled = true\r\n }\r\n\r\n if (!install.storeRegistered) {\r\n // register store\r\n if (!options.store) {\r\n console.log('Please provide a store!!')\r\n } else {\r\n options.store.registerModule('chartSetting', chartSetting)\r\n\r\n install.storeRegistered = true;\r\n }\r\n }\r\n\r\n}\r\n\r\nif (typeof window !== 'undefined' && window.Vue) {\r\n install(window.Vue)\r\n}\r\n\r\nexport default {\r\n // must use install function\r\n install,\r\n // components list\r\n ...components,\r\n initChart,\r\n createChart,\r\n highlightChart\r\n // ChartSetting,\r\n // ChartRender\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Eventful = require(\"zrender/lib/mixin/Eventful\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar interactionMutex = require(\"./interactionMutex\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar map = zrUtil.map;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: 'rgba(0,0,0,0.3)',\n fill: 'rgba(0,0,0,0.1)'\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * @alias module:echarts/component/helper/BrushController\n * @constructor\n * @mixin {module:zrender/mixin/Eventful}\n * @event module:echarts/component/helper/BrushController#brush\n * params:\n * areas: Array., coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n *\n * @param {module:zrender/zrender~ZRender} zr\n */\n\nfunction BrushController(zr) {\n Eventful.call(this);\n /**\n * @type {module:zrender/zrender~ZRender}\n * @private\n */\n\n this._zr = zr;\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n\n this.group = new graphic.Group();\n /**\n * Only for drawing (after enabledBrush).\n * 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * Only for drawing (after enabledBrush).\n *\n * @private\n * @type {Object}\n */\n\n this._brushOption;\n /**\n * @private\n * @type {Object}\n */\n\n this._panels;\n /**\n * @private\n * @type {Array.}\n */\n\n this._track = [];\n /**\n * @private\n * @type {boolean}\n */\n\n this._dragging;\n /**\n * @private\n * @type {Array}\n */\n\n this._covers = [];\n /**\n * @private\n * @type {moudule:zrender/container/Group}\n */\n\n this._creatingCover;\n /**\n * `true` means global panel\n * @private\n * @type {module:zrender/container/Group|boolean}\n */\n\n this._creatingPanel;\n /**\n * @private\n * @type {boolean}\n */\n\n this._enableGlobalPan;\n /**\n * @private\n * @type {boolean}\n */\n\n /**\n * @private\n * @type {string}\n */\n this._uid = 'brushController_' + baseUID++;\n /**\n * @private\n * @type {Object}\n */\n\n this._handlers = {};\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = zrUtil.bind(handler, this);\n }, this);\n}\n\nBrushController.prototype = {\n constructor: BrushController,\n\n /**\n * If set to null/undefined/false, select disabled.\n * @param {Object} brushOption\n * @param {string|boolean} brushOption.brushType 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType.\n * ('auto' can not be used in global panel)\n * @param {number} [brushOption.brushMode='single'] 'single' or 'multiple'\n * @param {boolean} [brushOption.transformable=true]\n * @param {boolean} [brushOption.removeOnClick=false]\n * @param {Object} [brushOption.brushStyle]\n * @param {number} [brushOption.brushStyle.width]\n * @param {number} [brushOption.brushStyle.lineWidth]\n * @param {string} [brushOption.brushStyle.stroke]\n * @param {string} [brushOption.brushStyle.fill]\n * @param {number} [brushOption.z]\n */\n enableBrush: function (brushOption) {\n this._brushType && doDisableBrush(this);\n brushOption.brushType && doEnableBrush(this, brushOption);\n return this;\n },\n\n /**\n * @param {Array.} panelOpts If not pass, it is global brush.\n * Each items: {\n * panelId, // mandatory.\n * clipPath, // mandatory. function.\n * isTargetByCursor, // mandatory. function.\n * defaultBrushType, // optional, only used when brushType is 'auto'.\n * getLinearBrushOtherExtent, // optional. function.\n * }\n */\n setPanels: function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels = this._panels = {};\n zrUtil.each(panelOpts, function (panelOpts) {\n panels[panelOpts.panelId] = zrUtil.clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n\n return this;\n },\n\n /**\n * @param {Object} [opt]\n * @return {boolean} [opt.enableGlobalPan=false]\n */\n mount: function (opt) {\n opt = opt || {};\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n\n this._zr.add(thisGroup);\n\n thisGroup.attr({\n position: opt.position || [0, 0],\n rotation: opt.rotation || 0,\n scale: opt.scale || [1, 1]\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n },\n eachCover: function (cb, context) {\n each(this._covers, cb, context);\n },\n\n /**\n * Update covers.\n * @param {Array.} brushOptionList Like:\n * [\n * {id: 'xx', brushType: 'line', range: [23, 44], brushStyle, transformable},\n * {id: 'yy', brushType: 'rect', range: [[23, 44], [23, 54]]},\n * ...\n * ]\n * `brushType` is required in each cover info. (can not be 'auto')\n * `id` is not mandatory.\n * `brushStyle`, `transformable` is not mandatory, use DEFAULT_BRUSH_OPT by default.\n * If brushOptionList is null/undefined, all covers removed.\n */\n updateCovers: function (brushOptionList) {\n brushOptionList = zrUtil.map(brushOptionList, function (brushOption) {\n return zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushOption = brushOptionList[newIndex]; // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbiden.\n\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushOption, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushOption));\n updateCoverAfterCreation(controller, cover);\n }\n }\n\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n },\n unmount: function () {\n this.enableBrush(false); // container may 'removeAll' outside.\n\n clearCovers(this);\n\n this._zr.remove(this.group);\n\n return this;\n },\n dispose: function () {\n this.unmount();\n this.off();\n }\n};\nzrUtil.mixin(BrushController, Eventful);\n\nfunction doEnableBrush(controller, brushOption) {\n var zr = controller._zr; // Consider roam, which takes globalPan too.\n\n if (!controller._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid);\n }\n\n mountHandlers(zr, controller._handlers);\n controller._brushType = brushOption.brushType;\n controller._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n}\n\nfunction doDisableBrush(controller) {\n var zr = controller._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid);\n unmountHandlers(zr, controller._handlers);\n controller._brushType = controller._brushOption = null;\n}\n\nfunction mountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n}\n\nfunction unmountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n}\n\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\n\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n\n return creatingCover;\n}\n\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\n\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\n\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\n\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n} // return target panel or `true` (means global panel)\n\n\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n} // Return a panel or true\n\n\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panelId = cover.__brushOption.panelId; // User may give cover without coord sys info,\n // which is then treated as global panel.\n\n return panelId != null ? panels[panelId] : true;\n}\n\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\n\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = zrUtil.clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', areas, {\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\n\nfunction shouldShowCover(controller) {\n var track = controller._track;\n\n if (!track.length) {\n return false;\n }\n\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\n\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n\nfunction createBaseRectCover(doDrift, controller, brushOption, edgeNames) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(doDrift, controller, cover, 'nswe'),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNames, function (name) {\n cover.add(new graphic.Rect({\n name: name,\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(doDrift, controller, cover, name),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\n\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\n\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each(['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], function (name) {\n var el = cover.childOfName(name);\n var globalDir = getGlobalDirection(controller, name);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\n\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\n\nfunction makeStyle(brushOption) {\n return zrUtil.defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\n\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], // x range\n [min[1], max[1]] // y range\n ];\n}\n\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\n\nfunction getGlobalDirection(controller, localDirection) {\n if (localDirection.length > 1) {\n localDirection = localDirection.split('');\n var globalDir = [getGlobalDirection(controller, localDirection[0]), getGlobalDirection(controller, localDirection[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n } else {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var globalDir = graphic.transformDirection(map[localDirection], getTransform(controller));\n return inverseMap[globalDir];\n }\n}\n\nfunction driftRect(toRectRange, fromRectRange, controller, cover, name, dx, dy, e) {\n var brushOption = cover.__brushOption;\n var rectRange = toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(name.split(''), function (namePart) {\n var ind = DIRECTION_MAP[namePart];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction driftPolygon(controller, cover, dx, dy, e) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\n\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== true ? panel.clipPath(data, controller._transform) : zrUtil.clone(data);\n}\n\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\n\nfunction resetCursor(controller, e, localCursorPoint) {\n if ( // Check active\n !controller._brushType // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e)) {\n return;\n }\n\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint); // Check whether in covers.\n\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n\n if (currPanel && (currPanel === true || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n\n currPanel && zr.setCursorStyle('crosshair');\n}\n\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\n\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\n\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n\n controller._track.push(localCursorPoint.slice());\n\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = zrUtil.clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === true ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n\n controller._covers.push(creatingCover);\n }\n\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n\n return eventParams;\n}\n\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n return panel.defaultBrushType;\n }\n\n return brushType;\n}\n\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mose out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\n\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null; // trigger event shoule be at final, after procedure will be nested.\n\n eventParams && trigger(controller, eventParams);\n }\n}\n\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n * @type {Object}\n */\n\n\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n return range;\n }, function (range) {\n return range;\n }), controller, brushOption, ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw']);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape.\n\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\n\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n }, function (rectRange) {\n return rectRange[xyIndex];\n }), controller, brushOption, [['w', 'e'], ['n', 's']][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent; // If brushWidth not specified, fit the panel.\n\n var panel = getPanelByCover(controller, cover);\n\n if (panel !== true && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex, controller._transform);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\n\nvar _default = BrushController;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar RadiusAxis = require(\"./RadiusAxis\");\n\nvar AngleAxis = require(\"./AngleAxis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @module echarts/coord/polar/Polar\n */\n\n/**\n * @alias {module:echarts/coord/polar/Polar}\n * @constructor\n * @param {string} name\n */\nvar Polar = function (name) {\n /**\n * @type {string}\n */\n this.name = name || '';\n /**\n * x of polar center\n * @type {number}\n */\n\n this.cx = 0;\n /**\n * y of polar center\n * @type {number}\n */\n\n this.cy = 0;\n /**\n * @type {module:echarts/coord/polar/RadiusAxis}\n * @private\n */\n\n this._radiusAxis = new RadiusAxis();\n /**\n * @type {module:echarts/coord/polar/AngleAxis}\n * @private\n */\n\n this._angleAxis = new AngleAxis();\n this._radiusAxis.polar = this._angleAxis.polar = this;\n};\n\nPolar.prototype = {\n type: 'polar',\n axisPointerEnabled: true,\n constructor: Polar,\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['radius', 'angle'],\n\n /**\n * @type {module:echarts/coord/PolarModel}\n */\n model: null,\n\n /**\n * If contain coord\n * @param {Array.} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n },\n\n /**\n * If contain data\n * @param {Array.} data\n * @return {boolean}\n */\n containData: function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n },\n\n /**\n * @param {string} dim\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxis: function (dim) {\n return this['_' + dim + 'Axis'];\n },\n\n /**\n * @return {Array.}\n */\n getAxes: function () {\n return [this._radiusAxis, this._angleAxis];\n },\n\n /**\n * Get axes by type of scale\n * @param {string} scaleType\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxesByScale: function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n },\n\n /**\n * @return {module:echarts/coord/polar/AngleAxis}\n */\n getAngleAxis: function () {\n return this._angleAxis;\n },\n\n /**\n * @return {module:echarts/coord/polar/RadiusAxis}\n */\n getRadiusAxis: function () {\n return this._radiusAxis;\n },\n\n /**\n * @param {module:echarts/coord/polar/Axis}\n * @return {module:echarts/coord/polar/Axis}\n */\n getOtherAxis: function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n },\n\n /**\n * Base axis will be used on stacking.\n *\n * @return {module:echarts/coord/polar/Axis}\n */\n getBaseAxis: function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n },\n\n /**\n * @param {string} [dim] 'radius' or 'angle' or 'auto' or null/undefined\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n getTooltipAxes: function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n },\n\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n * @param {Array.} data\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n dataToPoint: function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n },\n\n /**\n * Convert a (x, y) point to data\n * @param {Array.} point\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n pointToData: function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n },\n\n /**\n * Convert a (x, y) point to (radius, angle) coord\n * @param {Array.} point\n * @return {Array.}\n */\n pointToCoord: function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]); // Fix fixed extent in polarCreator\n // FIXME\n\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180; // move to angleExtent\n\n var dir = radian < minAngle ? 1 : -1;\n\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n\n return [radius, radian];\n },\n\n /**\n * Convert a (radius, angle) coord to (x, y) point\n * @param {Array.} coord\n * @return {Array.}\n */\n coordToPoint: function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx; // Inverse the y\n\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n },\n\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n * @return {Ring}\n */\n getArea: function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n var d2 = dx * dx + dy * dy;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n }\n};\nvar _default = Polar;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Gradient = require(\"zrender/lib/graphic/Gradient\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isFunction = _util.isFunction;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = {\n createOnAllSeries: true,\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.color').split('.'); // Set in itemStyle\n\n var color = seriesModel.get(colorAccessPath);\n var colorCallback = isFunction(color) && !(color instanceof Gradient) ? color : null; // Default color\n\n if (!color || colorCallback) {\n color = seriesModel.getColorFromPalette( // TODO series count changed.\n seriesModel.name, null, ecModel.getSeriesCount());\n }\n\n data.setVisual('color', color);\n var borderColorAccessPath = (seriesModel.visualBorderColorAccessPath || 'itemStyle.borderColor').split('.');\n var borderColor = seriesModel.get(borderColorAccessPath);\n data.setVisual('borderColor', borderColor); // Only visible series has each data be visual encoded\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n if (colorCallback) {\n data.each(function (idx) {\n data.setItemVisual(idx, 'color', colorCallback(seriesModel.getDataParams(idx)));\n });\n } // itemStyle in each data item\n\n\n var dataEach = function (data, idx) {\n var itemModel = data.getItemModel(idx);\n var color = itemModel.get(colorAccessPath, true);\n var borderColor = itemModel.get(borderColorAccessPath, true);\n\n if (color != null) {\n data.setItemVisual(idx, 'color', color);\n }\n\n if (borderColor != null) {\n data.setItemVisual(idx, 'borderColor', borderColor);\n }\n };\n\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n }\n};\nmodule.exports = _default;","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n } // Return NaN if count is 0\n\n\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(min) ? min : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\n\nvar indexSampler = function (frame, value) {\n return Math.round(frame.length / 2);\n};\n\nfunction _default(seriesType) {\n return {\n seriesType: seriesType,\n modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem; // Only cartesian2d support down sampling\n\n if (coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent(); // Coordinste system has been resized\n\n var size = extent[1] - extent[0];\n var rate = Math.round(data.count() / size);\n\n if (rate > 1) {\n var sampler;\n\n if (typeof sampling === 'string') {\n sampler = samplers[sampling];\n } else if (typeof sampling === 'function') {\n sampler = sampling;\n }\n\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar graphicUtil = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PATH_COLOR = ['textStyle', 'color'];\nvar _default = {\n /**\n * Get color property or get color from option.textStyle.color\n * @param {boolean} [isEmphasis]\n * @return {string}\n */\n getTextColor: function (isEmphasis) {\n var ecModel = this.ecModel;\n return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);\n },\n\n /**\n * Create font string from fontStyle, fontWeight, fontSize, fontFamily\n * @return {string}\n */\n getFont: function () {\n return graphicUtil.getFont({\n fontStyle: this.getShallow('fontStyle'),\n fontWeight: this.getShallow('fontWeight'),\n fontSize: this.getShallow('fontSize'),\n fontFamily: this.getShallow('fontFamily')\n }, this.ecModel);\n },\n getTextRect: function (text) {\n return textContain.getBoundingRect(text, this.getFont(), this.getShallow('align'), this.getShallow('verticalAlign') || this.getShallow('baseline'), this.getShallow('padding'), this.getShallow('lineHeight'), this.getShallow('rich'), this.getShallow('truncateText'));\n }\n};\nmodule.exports = _default;","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar _whiskerBoxCommon = require(\"../helper/whiskerBoxCommon\");\n\nvar seriesModelMixin = _whiskerBoxCommon.seriesModelMixin;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar BoxplotSeries = SeriesModel.extend({\n type: 'series.boxplot',\n dependencies: ['xAxis', 'yAxis', 'grid'],\n // TODO\n // box width represents group size, so dimension should have 'size'.\n\n /**\n * @see \n * The meanings of 'min' and 'max' depend on user,\n * and echarts do not need to know it.\n * @readOnly\n */\n defaultValueDimensions: [{\n name: 'min',\n defaultTooltip: true\n }, {\n name: 'Q1',\n defaultTooltip: true\n }, {\n name: 'median',\n defaultTooltip: true\n }, {\n name: 'Q3',\n defaultTooltip: true\n }, {\n name: 'max',\n defaultTooltip: true\n }],\n\n /**\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * @override\n */\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n // 'horizontal' or 'vertical'\n boxWidth: [7, 50],\n // [min, max] can be percent of band width.\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\n emphasis: {\n itemStyle: {\n borderWidth: 2,\n shadowBlur: 5,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(0,0,0,0.4)'\n }\n },\n animationEasing: 'elasticOut',\n animationDuration: 800\n }\n});\nzrUtil.mixin(BoxplotSeries, seriesModelMixin, true);\nvar _default = BoxplotSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar featureManager = require(\"../featureManager\");\n\nvar lang = require(\"../../../lang\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar brushLang = lang.toolbox.brush;\n\nfunction Brush(model, ecModel, api) {\n this.model = model;\n this.ecModel = ecModel;\n this.api = api;\n /**\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * @private\n * @type {string}\n */\n\n this._brushMode;\n}\n\nBrush.defaultOption = {\n show: true,\n type: ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'],\n icon: {\n /* eslint-disable */\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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' // jshint ignore:line\n\n /* eslint-enable */\n\n },\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: zrUtil.clone(brushLang.title)\n};\nvar proto = Brush.prototype; // proto.updateLayout = function (featureModel, ecModel, api) {\n\n/* eslint-disable */\n\nproto.render =\n/* eslint-enable */\nproto.updateView = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed |= brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n};\n\nproto.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n};\n\nproto.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n};\n\nfeatureManager.register('brush', Brush);\nvar _default = Brush;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar AxisBuilder = require(\"../axis/AxisBuilder\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {module:echarts/model/Model} axisPointerModel\n */\nfunction buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\n\n\nfunction buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get('label.precision'),\n formatter: axisPointerModel.get('label.formatter')\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2]; // Adjust by align.\n\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2); // Not overflow ec container\n\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get('axisLine.lineStyle.color');\n }\n\n elOption.label = {\n shape: {\n x: 0,\n y: 0,\n width: width,\n height: height,\n r: labelModel.get('borderRadius')\n },\n position: position.slice(),\n // TODO: rich\n style: {\n text: text,\n textFont: font,\n textFill: labelModel.getTextColor(),\n textPosition: 'inside',\n textPadding: paddings,\n fill: bgColor,\n stroke: labelModel.get('borderColor') || 'transparent',\n lineWidth: labelModel.get('borderWidth') || 0,\n shadowBlur: labelModel.get('shadowBlur'),\n shadowColor: labelModel.get('shadowColor'),\n shadowOffsetX: labelModel.get('shadowOffsetX'),\n shadowOffsetY: labelModel.get('shadowOffsetY')\n },\n // Lable should be over axisPointer.\n z2: 10\n };\n} // Do not overflow ec container\n\n\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\n/**\n * @param {number} value\n * @param {module:echarts/coord/Axis} axis\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} opt\n * @param {Array.} seriesDataIndices\n * @param {number|string} opt.precision 'auto' or a number\n * @param {string|Function} opt.formatter label formatter\n */\n\n\nfunction getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel( // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n value, {\n precision: opt.precision\n });\n var formatter = opt.formatter;\n\n if (formatter) {\n var params = {\n value: axisHelper.getAxisRawValue(axis, value),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params.seriesData.push(dataParams);\n });\n\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params);\n }\n }\n\n return text;\n}\n/**\n * @param {module:echarts/coord/Axis} axis\n * @param {number} value\n * @param {Object} layoutInfo {\n * rotation, position, labelOffset, labelDirection, labelMargin\n * }\n */\n\n\nfunction getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\n\nfunction buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get('label.margin');\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\n/**\n * @param {Array.} p1\n * @param {Array.} p2\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\n/**\n * @param {Array.} xy\n * @param {Array.} wh\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\n\nfunction makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}\n\nexports.buildElStyle = buildElStyle;\nexports.buildLabelElOption = buildLabelElOption;\nexports.getValueLabel = getValueLabel;\nexports.getTransformedPosition = getTransformedPosition;\nexports.buildCartesianSingleLabelElOption = buildCartesianSingleLabelElOption;\nexports.makeLineShape = makeLineShape;\nexports.makeRectShape = makeRectShape;\nexports.makeSectorShape = makeSectorShape;"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.0.js b/src/expendPlugins/chart/chartmix.umd.min.0.js new file mode 100644 index 000000000..cd51c7253 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.0.js @@ -0,0 +1,8 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[0],{"2f62":function(t,e,n){"use strict";(function(t){ +/*! + * vuex v3.4.0 + * (c) 2020 Evan You + * @license MIT + */ +function r(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:r});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,n.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}n.d(e,"a",(function(){return A}));var i="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},o=i.__VUE_DEVTOOLS_GLOBAL_HOOK__;function s(t){o&&(t._devtoolHook=o,o.emit("vuex:init",t),o.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){o.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){o.emit("vuex:action",t,e)}),{prepend:!0}))}function c(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function a(t){return null!==t&&"object"===typeof t}function u(t){return t&&"function"===typeof t.then}function f(t,e){return function(){return t(e)}}var h=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},h.prototype.addChild=function(t,e){this._children[t]=e},h.prototype.removeChild=function(t){delete this._children[t]},h.prototype.getChild=function(t){return this._children[t]},h.prototype.hasChild=function(t){return t in this._children},h.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},h.prototype.forEachChild=function(t){c(this._children,t)},h.prototype.forEachGetter=function(t){this._rawModule.getters&&c(this._rawModule.getters,t)},h.prototype.forEachAction=function(t){this._rawModule.actions&&c(this._rawModule.actions,t)},h.prototype.forEachMutation=function(t){this._rawModule.mutations&&c(this._rawModule.mutations,t)},Object.defineProperties(h.prototype,p);var l=function(t){this.register([],t,!1)};function d(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return void 0;d(t.concat(r),e.getChild(r),n.modules[r])}}l.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},l.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},l.prototype.update=function(t){d([],this.root,t)},l.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=new h(e,n);if(0===t.length)this.root=i;else{var o=this.get(t.slice(0,-1));o.addChild(t[t.length-1],i)}e.modules&&c(e.modules,(function(e,i){r.register(t.concat(i),e,n)}))},l.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)},l.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return e.hasChild(n)};var m;var v=function(t){var e=this;void 0===t&&(t={}),!m&&"undefined"!==typeof window&&window.Vue&&G(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new l(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m,this._makeLocalGettersCache=Object.create(null);var i=this,o=this,c=o.dispatch,a=o.commit;this.dispatch=function(t,e){return c.call(i,t,e)},this.commit=function(t,e,n){return a.call(i,t,e,n)},this.strict=r;var u=this._modules.root.state;w(this,u,[],this._modules.root),b(this,u),n.forEach((function(t){return t(e)}));var f=void 0!==t.devtools?t.devtools:m.config.devtools;f&&s(this)},_={state:{configurable:!0}};function y(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function g(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;w(t,n,[],t._modules.root,!0),b(t,n,e)}function b(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,o={};c(i,(function(e,n){o[n]=f(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=m.config.silent;m.config.silent=!0,t._vm=new m({data:{$$state:e},computed:o}),m.config.silent=s,t.strict&&j(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),m.nextTick((function(){return r.$destroy()})))}function w(t,e,n,r,i){var o=!n.length,s=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[s],t._modulesNamespaceMap[s]=r),!o&&!i){var c=k(e,n.slice(0,-1)),a=n[n.length-1];t._withCommit((function(){m.set(c,a,r.state)}))}var u=r.context=$(t,s,n);r.forEachMutation((function(e,n){var r=s+n;O(t,r,e,u)})),r.forEachAction((function(e,n){var r=e.root?n:s+n,i=e.handler||e;M(t,r,i,u)})),r.forEachGetter((function(e,n){var r=s+n;E(t,r,e,u)})),r.forEachChild((function(r,o){w(t,e,n.concat(o),r,i)}))}function $(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=x(n,r,i),s=o.payload,c=o.options,a=o.type;return c&&c.root||(a=e+a),t.dispatch(a,s)},commit:r?t.commit:function(n,r,i){var o=x(n,r,i),s=o.payload,c=o.options,a=o.type;c&&c.root||(a=e+a),t.commit(a,s,c)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return C(t,e)}},state:{get:function(){return k(t.state,n)}}}),i}function C(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function O(t,e,n,r){var i=t._mutations[e]||(t._mutations[e]=[]);i.push((function(e){n.call(t,r.state,e)}))}function M(t,e,n,r){var i=t._actions[e]||(t._actions[e]=[]);i.push((function(e){var i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return u(i)||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}function E(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function j(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function k(t,e){return e.reduce((function(t,e){return t[e]}),t)}function x(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function G(t){m&&t===m||(m=t,r(m))}_.state.get=function(){return this._vm._data.$$state},_.state.set=function(t){0},v.prototype.commit=function(t,e,n){var r=this,i=x(t,e,n),o=i.type,s=i.payload,c=(i.options,{type:o,payload:s}),a=this._mutations[o];a&&(this._withCommit((function(){a.forEach((function(t){t(s)}))})),this._subscribers.slice().forEach((function(t){return t(c,r.state)})))},v.prototype.dispatch=function(t,e){var n=this,r=x(t,e),i=r.type,o=r.payload,s={type:i,payload:o},c=this._actions[i];if(c){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(s,n.state)}))}catch(u){0}var a=c.length>1?Promise.all(c.map((function(t){return t(o)}))):c[0](o);return new Promise((function(t,e){a.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(s,n.state)}))}catch(u){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(s,n.state,t)}))}catch(u){0}e(t)}))}))}},v.prototype.subscribe=function(t,e){return y(t,this._subscribers,e)},v.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return y(n,this._actionSubscribers,e)},v.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},v.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},v.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),w(this,this.state,t,this._modules.get(t),n.preserveState),b(this,this.state)},v.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=k(e.state,t.slice(0,-1));m.delete(n,t[t.length-1])})),g(this)},v.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},v.prototype.hotUpdate=function(t){this._modules.update(t),g(this,!0)},v.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(v.prototype,_);N((function(t,e){var n={};return S(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=P(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"===typeof i?i.call(this,e,n):e[i]},n[r].vuex=!0})),n})),N((function(t,e){var n={};return S(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=P(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"===typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n})),N((function(t,e){var n={};return S(e).forEach((function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||P(this.$store,"mapGetters",t))return this.$store.getters[i]},n[r].vuex=!0})),n}));var A=N((function(t,e){var n={};return S(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var o=P(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"===typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n}));function S(t){return L(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function L(t){return Array.isArray(t)||a(t)}function N(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function P(t,e,n){var r=t._modulesNamespaceMap[n];return r}}).call(this,n("c8ba"))}}]); +//# sourceMappingURL=chartmix.umd.min.0.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.0.js.map b/src/expendPlugins/chart/chartmix.umd.min.0.js.map new file mode 100644 index 000000000..a12b9ca8e --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.0.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./node_modules/vuex/dist/vuex.esm.js"],"names":["applyMixin","Vue","version","Number","split","mixin","beforeCreate","vuexInit","_init","prototype","options","init","concat","call","this","$options","store","$store","parent","target","window","global","devtoolHook","__VUE_DEVTOOLS_GLOBAL_HOOK__","devtoolPlugin","_devtoolHook","emit","on","targetState","replaceState","subscribe","mutation","state","prepend","subscribeAction","action","forEachValue","obj","fn","Object","keys","forEach","key","isObject","isPromise","val","then","partial","arg","Module","rawModule","runtime","_children","create","_rawModule","rawState","prototypeAccessors","namespaced","configurable","get","addChild","module","removeChild","getChild","hasChild","update","actions","mutations","getters","forEachChild","forEachGetter","forEachAction","forEachMutation","defineProperties","ModuleCollection","rawRootModule","register","path","targetModule","newModule","modules","reduce","root","getNamespace","namespace","this$1","length","slice","rawChildModule","unregister","isRegistered","Store","install","plugins","strict","_committing","_actions","_actionSubscribers","_mutations","_wrappedGetters","_modules","_modulesNamespaceMap","_subscribers","_watcherVM","_makeLocalGettersCache","ref","dispatch","commit","type","payload","installModule","resetStoreVM","plugin","useDevtools","undefined","devtools","config","prototypeAccessors$1","genericSubscribe","subs","indexOf","unshift","push","i","splice","resetStore","hot","oldVm","_vm","wrappedGetters","computed","defineProperty","enumerable","silent","data","$$state","enableStrictMode","_withCommit","_data","nextTick","$destroy","rootState","isRoot","parentState","getNestedState","moduleName","set","local","context","makeLocalContext","namespacedType","registerMutation","handler","registerAction","getter","registerGetter","child","noNamespace","_type","_payload","_options","args","unifyObjectStyle","makeLocalGetters","gettersProxy","splitPos","localType","entry","res","rootGetters","Promise","resolve","catch","err","rawGetter","$watch","deep","sync","_Vue","v","sub","filter","before","e","result","all","map","reject","after","error","watch","cb","registerModule","preserveState","unregisterModule","delete","hasModule","hotUpdate","newOptions","committing","normalizeNamespace","states","normalizeMap","getModuleByNamespace","vuex","len","arguments","apply","mapActions","isValidMap","Array","isArray","charAt","helper"],"mappings":"kLAAA;;;;;;AAKA,SAASA,EAAYC,GACnB,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4D,EAAI5D,IAEd2H,EAAI9H,GAAO,WACT,IAAIuH,EAAO,GAAI4C,EAAMC,UAAUxH,OAC/B,MAAQuH,IAAQ5C,EAAM4C,GAAQC,UAAWD,GAGzC,IAAInG,EAAW5F,KAAKG,OAAOyF,SAC3B,GAAItB,EAAW,CACb,IAAIvB,EAAS8I,EAAqB7L,KAAKG,OAAQ,aAAcmE,GAC7D,IAAKvB,EACH,OAEF6C,EAAW7C,EAAOuF,QAAQ1C,SAE5B,MAAsB,oBAAR7D,EACVA,EAAIkK,MAAMjM,KAAM,CAAC4F,GAAU9F,OAAOqJ,IAClCvD,EAASqG,MAAMjM,KAAKG,OAAQ,CAAC4B,GAAKjC,OAAOqJ,QAG1CO,KAsBT,SAASkC,EAAchB,GACrB,OAAKuB,EAAWvB,GAGTwB,MAAMC,QAAQzB,GACjBA,EAAIA,KAAI,SAAUhJ,GAAO,MAAO,CAAGA,IAAKA,EAAKG,IAAKH,MAClDH,OAAOC,KAAKkJ,GAAKA,KAAI,SAAUhJ,GAAO,MAAO,CAAGA,IAAKA,EAAKG,IAAK6I,EAAIhJ,OAJ9D,GAYX,SAASuK,EAAYvB,GACnB,OAAOwB,MAAMC,QAAQzB,IAAQ/I,EAAS+I,GAQxC,SAASc,EAAoBlK,GAC3B,OAAO,SAAU8C,EAAWsG,GAO1B,MANyB,kBAAdtG,GACTsG,EAAMtG,EACNA,EAAY,IACwC,MAA3CA,EAAUgI,OAAOhI,EAAUE,OAAS,KAC7CF,GAAa,KAER9C,EAAG8C,EAAWsG,IAWzB,SAASiB,EAAsB3L,EAAOqM,EAAQjI,GAC5C,IAAIvB,EAAS7C,EAAMqF,qBAAqBjB,GAIxC,OAAOvB,K","file":"chartmix.umd.min.0.js","sourcesContent":["/*!\n * vuex v3.4.0\n * (c) 2020 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.hasChild = function hasChild (key) {\n return key in this._children\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nModuleCollection.prototype.isRegistered = function isRegistered (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n\n return parent.hasChild(key)\n};\n\nfunction update (path, targetModule, newModule) {\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n this._makeLocalGettersCache = Object.create(null);\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n\n this._subscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n (process.env.NODE_ENV !== 'production') &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return new Promise(function (resolve, reject) {\n result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n resolve(res);\n }, function (error) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.error; })\n .forEach(function (sub) { return sub.error(action, this$1.state, error); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in error action subscribers: \");\n console.error(e);\n }\n }\n reject(error);\n });\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn, options) {\n return genericSubscribe(fn, this._subscribers, options)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn, options) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers, options)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hasModule = function hasModule (path) {\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n return this._modules.isRegistered(path)\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs, options) {\n if (subs.indexOf(fn) < 0) {\n options && options.prepend\n ? subs.unshift(fn)\n : subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n // reset local getters cache\n store._makeLocalGettersCache = Object.create(null);\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldVm.\n // using partial to return function with only arguments preserved in closure environment.\n computed[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n if (store._modulesNamespaceMap[namespace] && (process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate namespace \" + namespace + \" for the namespaced module \" + (path.join('/'))));\n }\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n if ((process.env.NODE_ENV !== 'production')) {\n if (moduleName in parentState) {\n console.warn(\n (\"[vuex] state field \\\"\" + moduleName + \"\\\" was overridden by a module with the same name at \\\"\" + (path.join('.')) + \"\\\"\")\n );\n }\n }\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n if (!store._makeLocalGettersCache[namespace]) {\n var gettersProxy = {};\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n store._makeLocalGettersCache[namespace] = gettersProxy;\n }\n\n return store._makeLocalGettersCache[namespace]\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.reduce(function (state, key) { return state[key]; }, state)\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(states)) {\n console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(mutations)) {\n console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(getters)) {\n console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if ((process.env.NODE_ENV !== 'production') && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(actions)) {\n console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n if (!isValidMap(map)) {\n return []\n }\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Validate whether given map is valid or not\n * @param {*} map\n * @return {Boolean}\n */\nfunction isValidMap (map) {\n return Array.isArray(map) || isObject(map)\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if ((process.env.NODE_ENV !== 'production') && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index = {\n Store: Store,\n install: install,\n version: '3.4.0',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\nexport default index;\nexport { Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState };\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.1.js b/src/expendPlugins/chart/chartmix.umd.min.1.js new file mode 100644 index 000000000..df1fc1353 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.1.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[1],{1847:function(module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("a9e3"),core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__);__webpack_exports__["a"]={name:"chart-base-slider",props:{baseSliderOption:Number,unit:String,min:{type:Number,default:0},max:{type:Number,default:100},content:{type:String,default:"滑动修改值大小"},hideCol:!1,format:[Function,String]},data:function(){return{baseSliderData:12}},mounted:function(){this.baseSliderData=this.baseSliderOption},methods:{handlerChange:function(t){this.$emit("update:baseSliderOption",t)},formatter:function formatter(val){eval(this.format)}}}},6999:function(t,e,a){},9470:function(t,e,a){"use strict";var n=a("6999"),s=a.n(n);s.a},b57e:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.hideCol?a("el-row",{staticClass:"chart-base-slider",staticStyle:{"margin-top":"15px"}},[a("el-col",{attrs:{span:6}},[t._t("title")],2),a("el-col",{attrs:{span:17}},[a("el-tooltip",{attrs:{"open-delay":500,content:t.content,placement:"top"}},[a("el-slider",{staticStyle:{"padding-left":"12px"},attrs:{"show-input-controls":!1,min:t.min,max:t.max,"input-size":"mini","show-input":"","format-tooltip":t.format?t.formatter:null},on:{change:t.handlerChange},model:{value:t.baseSliderData,callback:function(e){t.baseSliderData=e},expression:"baseSliderData"}})],1)],1),a("el-col",{staticClass:"input_content",attrs:{span:1}},[t._v(t._s(t.unit))])],1):a("el-row",{staticClass:"chart-base-slider",staticStyle:{"margin-top":"15px"}},[a("el-col",{attrs:{span:22}},[a("el-tooltip",{attrs:{"open-delay":500,content:t.content,placement:"top"}},[a("el-slider",{staticStyle:{"padding-left":"12px"},attrs:{"show-input-controls":!1,min:t.min,max:t.max,"input-size":"mini","show-input":"","format-tooltip":t.format?t.formatter:null},on:{change:t.handlerChange},model:{value:t.baseSliderData,callback:function(e){t.baseSliderData=e},expression:"baseSliderData"}})],1)],1),a("el-col",{staticClass:"input_content",attrs:{span:1}},[t._v(t._s(t.unit))])],1)],1)},s=[],i=a("1847"),r=i["a"],l=(a("9470"),a("2877")),o=Object(l["a"])(r,n,s,!1,null,null,null);e["default"]=o.exports}}]); +//# sourceMappingURL=chartmix.umd.min.1.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.1.js.map b/src/expendPlugins/chart/chartmix.umd.min.1.js.map new file mode 100644 index 000000000..1c63bc09e --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.1.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?135a","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?4399","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue?dbc7","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSlider.vue"],"names":["name","props","baseSliderOption","Number","unit","String","min","type","default","max","content","hideCol","format","Function","data","baseSliderData","mounted","this","methods","handlerChange","$emit","value","formatter","eval","render","_vm","_h","$createElement","_c","_self","staticClass","staticStyle","attrs","_t","on","model","callback","$$v","expression","_v","_s","staticRenderFns","component"],"mappings":"geA2CA,0BACEA,KAAM,oBACNC,MAAO,CACLC,iBAAkBC,OAClBC,KAAMC,OACNC,IAAK,CACHC,KAAMJ,OACNK,QAAS,GAEXC,IAAK,CACHF,KAAMJ,OACNK,QAAS,KAEXE,QAAS,CACPH,KAAMF,OACNG,QAAS,WAEXG,SAAS,EACTC,OAAQ,CAACC,SAAb,SAEEC,KApBF,WAqBI,MAAO,CACLC,eAAgB,KA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ACkB,EAAG,YAAY,CAACG,YAAY,CAAC,eAAe,QAAQC,MAAM,CAAC,uBAAsB,EAAM,IAAMP,EAAInB,IAAI,IAAMmB,EAAIhB,IAAI,aAAa,OAAO,aAAa,GAAG,iBAAiBgB,EAAIb,OAAOa,EAAIH,UAAU,MAAMY,GAAG,CAAC,OAAST,EAAIN,eAAegB,MAAM,CAACd,MAAOI,EAAkB,eAAEW,SAAS,SAAUC,GAAMZ,EAAIV,eAAesB,GAAKC,WAAW,qBAAqB,IAAI,GAAGV,EAAG,SAAS,CAACE,YAAY,gBAAgBE,MAAM,CAAC,KAAO,IAAI,CAACP,EAAIc,GAAGd,EAAIe,GAAGf,EAAIrB,UAAU,IAA0rB,IAC96CqC,EAAkB,G,YCDgX,S,wBCQlYC,EAAY,eACd,EACAlB,EACAiB,GACA,EACA,KACA,KACA,MAIa,aAAAC,E","file":"chartmix.umd.min.1.js","sourcesContent":["\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticClass:\"chart-base-slider\",staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":_vm.content,\"placement\":\"top\"}},[_c('el-slider',{staticStyle:{\"padding-left\":\"12px\"},attrs:{\"show-input-controls\":false,\"min\":_vm.min,\"max\":_vm.max,\"input-size\":\"mini\",\"show-input\":\"\",\"format-tooltip\":_vm.format?_vm.formatter:null},on:{\"change\":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:\"baseSliderData\"}})],1)],1),_c('el-col',{staticClass:\"input_content\",attrs:{\"span\":1}},[_vm._v(_vm._s(_vm.unit))])],1):_c('el-row',{staticClass:\"chart-base-slider\",staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":17}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":_vm.content,\"placement\":\"top\"}},[_c('el-slider',{staticStyle:{\"padding-left\":\"12px\"},attrs:{\"show-input-controls\":false,\"min\":_vm.min,\"max\":_vm.max,\"input-size\":\"mini\",\"show-input\":\"\",\"format-tooltip\":_vm.format?_vm.formatter:null},on:{\"change\":_vm.handlerChange},model:{value:(_vm.baseSliderData),callback:function ($$v) {_vm.baseSliderData=$$v},expression:\"baseSliderData\"}})],1)],1),_c('el-col',{staticClass:\"input_content\",attrs:{\"span\":1}},[_vm._v(_vm._s(_vm.unit))])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSlider.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSlider.vue?vue&type=template&id=609b7952&\"\nimport script from \"./ChartBaseSlider.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSlider.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChartBaseSlider.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.10.js b/src/expendPlugins/chart/chartmix.umd.min.10.js new file mode 100644 index 000000000..6005d6baa --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.10.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[10],{"138b":function(e,t,l){"use strict";l.r(t);var n=function(){var e=this,t=e.$createElement,l=e._self._c||t;return e.hideCol?l("el-tooltip",{attrs:{disabled:!e.tooltip,"open-delay":500,content:e.tooltip,effect:"dark",placement:"bottom"}},[l("el-select",{attrs:{size:"mini"},on:{change:e.changeSelect},model:{value:e.select,callback:function(t){e.select=t},expression:"select"}},e._l(e.selectOption,(function(e,t){return l("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1):l("el-row",{staticStyle:{"margin-top":"15px"}},[l("el-col",{staticClass:"title",attrs:{span:8}},[e._t("select")],2),l("el-col",{attrs:{span:16}},[l("el-tooltip",{attrs:{disabled:!e.tooltip,"open-delay":500,content:e.tooltip,effect:"dark",placement:"bottom"}},[l("el-select",{attrs:{size:"mini"},on:{change:e.changeSelect},model:{value:e.select,callback:function(t){e.select=t},expression:"select"}},e._l(e.selectOption,(function(e,t){return l("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1)},a=[],o=(l("a9e3"),{props:{selectOption:Array,tooltip:String,selectValue:[String,Number,Array],hideCol:Boolean},data:function(){return{select:""}},mounted:function(){this.select=this.selectValue},methods:{changeSelect:function(e){this.$emit("update:selectValue",e)}}}),s=o,c=l("2877"),i=Object(c["a"])(s,n,a,!1,null,null,null);t["default"]=i.exports}}]); +//# sourceMappingURL=chartmix.umd.min.10.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.10.js.map b/src/expendPlugins/chart/chartmix.umd.min.10.js.map new file mode 100644 index 000000000..ae075408c --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.10.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?57e3","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue?da35","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSelect.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","hideCol","attrs","tooltip","on","changeSelect","model","value","callback","$$v","select","expression","_l","item","i","key","label","staticStyle","staticClass","_t","staticRenderFns","component"],"mappings":"yLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAASF,EAAIM,QAA0kBF,EAAG,aAAa,CAACG,MAAM,CAAC,UAAYP,EAAIQ,QAAQ,aAAa,IAAI,QAAUR,EAAIQ,QAAQ,OAAS,OAA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A,KACA,KACA,MAIa,aAAAC,E","file":"chartmix.umd.min.10.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.hideCol)?_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"select\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-tooltip',{attrs:{\"disabled\":!_vm.tooltip,\"open-delay\":500,\"content\":_vm.tooltip,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-select',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:\"select\"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{\"label\":item.label,\"value\":item.value}})}),1)],1)],1)],1):_c('el-tooltip',{attrs:{\"disabled\":!_vm.tooltip,\"open-delay\":500,\"content\":_vm.tooltip,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-select',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeSelect},model:{value:(_vm.select),callback:function ($$v) {_vm.select=$$v},expression:\"select\"}},_vm._l((_vm.selectOption),function(item,i){return _c('el-option',{key:i,attrs:{\"label\":item.label,\"value\":item.value}})}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSelect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSelect.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSelect.vue?vue&type=template&id=6331a3cc&\"\nimport script from \"./ChartBaseSelect.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSelect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.11.js b/src/expendPlugins/chart/chartmix.umd.min.11.js new file mode 100644 index 000000000..4b44b272e --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.11.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[11],{"9e1a":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-row",{staticStyle:{"margin-top":"15px"}},[a("el-col",{staticClass:"title",attrs:{span:8}},[t._t("title")],2),a("el-col",{attrs:{span:16}},[a("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#d8d8d8"},on:{change:t.changeSwitch},model:{value:t.switchData,callback:function(e){t.switchData=e},expression:"switchData"}})],1)],1)},c=[],i={name:"chart-base-switch",props:{switchValue:{type:Boolean,default:!1}},data:function(){return{switchData:!1}},mounted:function(){this.switchData=!!this.switchValue&&this.switchValue},methods:{changeSwitch:function(t){this.$emit("update:switchValue",t)}}},n=i,l=a("2877"),h=Object(l["a"])(n,s,c,!1,null,null,null);e["default"]=h.exports}}]); +//# sourceMappingURL=chartmix.umd.min.11.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.11.js.map b/src/expendPlugins/chart/chartmix.umd.min.11.js.map new file mode 100644 index 000000000..94cce2000 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.11.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?d947","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?b3a8","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticStyle","staticClass","attrs","_t","on","changeSwitch","model","value","callback","$$v","switchData","expression","staticRenderFns","name","props","switchValue","type","Boolean","default","data","mounted","methods","$emit","val","component"],"mappings":"yLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,YAAY,CAAC,aAAa,SAAS,CAACF,EAAG,SAAS,CAACG,YAAY,QAAQC,MAAM,CAAC,KAAO,IAAI,CAACR,EAAIS,GAAG,UAAU,GAAGL,EAAG,SAAS,CAACI,MAAM,CAAC,KAAO,KAAK,CAACJ,EAAG,YAAY,CAACI,MAAM,CAAC,eAAe,UAAU,iBAAiB,WAAWE,GAAG,CAAC,OAASV,EAAIW,cAAcC,MAAM,CAACC,MAAOb,EAAc,WAAEc,SAAS,SAAUC,GAAMf,EAAIgB,WAAWD,GAAKE,WAAW,iBAAiB,IAAI,IAC5cC,EAAkB,GCatB,GACEC,KAAM,oBACNC,MAAO,CACLC,YAAa,CACXC,KAAMC,QACNC,SAAS,IAGbC,KARF,WASI,MAAO,CACLT,YAAY,IAGhBU,QAbF,WAcIzB,KAAKe,aAAaf,KAAKoB,aAAcpB,KAAKoB,aAE5CM,QAAS,CACPhB,aADJ,SACA,GACMV,KAAK2B,MAAM,qBAAsBC,MChC+V,I,YCOlYC,EAAY,eACd,EACA/B,EACAmB,GACA,EACA,KACA,KACA,MAIa,aAAAY,E","file":"chartmix.umd.min.11.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-switch',{attrs:{\"active-color\":\"#13ce66\",\"inactive-color\":\"#d8d8d8\"},on:{\"change\":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:\"switchData\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSwitch.vue?vue&type=template&id=c152a4dc&\"\nimport script from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.12.js b/src/expendPlugins/chart/chartmix.umd.min.12.js new file mode 100644 index 000000000..91d3d5e55 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.12.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[12],{"9e1a":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-row",{staticStyle:{"margin-top":"15px"}},[a("el-col",{staticClass:"title",attrs:{span:8}},[t._t("title")],2),a("el-col",{attrs:{span:16}},[a("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#d8d8d8"},on:{change:t.changeSwitch},model:{value:t.switchData,callback:function(e){t.switchData=e},expression:"switchData"}})],1)],1)},c=[],i={name:"chart-base-switch",props:{switchValue:{type:Boolean,default:!1}},data:function(){return{switchData:!1}},mounted:function(){this.switchData=!!this.switchValue&&this.switchValue},methods:{changeSwitch:function(t){this.$emit("update:switchValue",t)}}},n=i,l=a("2877"),h=Object(l["a"])(n,s,c,!1,null,null,null);e["default"]=h.exports}}]); +//# sourceMappingURL=chartmix.umd.min.12.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.12.js.map b/src/expendPlugins/chart/chartmix.umd.min.12.js.map new file mode 100644 index 000000000..23ea515dc --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.12.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?d947","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue?b3a8","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseSwitch.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticStyle","staticClass","attrs","_t","on","changeSwitch","model","value","callback","$$v","switchData","expression","staticRenderFns","name","props","switchValue","type","Boolean","default","data","mounted","methods","$emit","val","component"],"mappings":"yLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,YAAY,CAAC,aAAa,SAAS,CAACF,EAAG,SAAS,CAACG,YAAY,QAAQC,MAAM,CAAC,KAAO,IAAI,CAACR,EAAIS,GAAG,UAAU,GAAGL,EAAG,SAAS,CAACI,MAAM,CAAC,KAAO,KAAK,CAACJ,EAAG,YAAY,CAACI,MAAM,CAAC,eAAe,UAAU,iBAAiB,WAAWE,GAAG,CAAC,OAASV,EAAIW,cAAcC,MAAM,CAACC,MAAOb,EAAc,WAAEc,SAAS,SAAUC,GAAMf,EAAIgB,WAAWD,GAAKE,WAAW,iBAAiB,IAAI,IAC5cC,EAAkB,GCatB,GACEC,KAAM,oBACNC,MAAO,CACLC,YAAa,CACXC,KAAMC,QACNC,SAAS,IAGbC,KARF,WASI,MAAO,CACLT,YAAY,IAGhBU,QAbF,WAcIzB,KAAKe,aAAaf,KAAKoB,aAAcpB,KAAKoB,aAE5CM,QAAS,CACPhB,aADJ,SACA,GACMV,KAAK2B,MAAM,qBAAsBC,MChC+V,I,YCOlYC,EAAY,eACd,EACA/B,EACAmB,GACA,EACA,KACA,KACA,MAIa,aAAAY,E","file":"chartmix.umd.min.12.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-switch',{attrs:{\"active-color\":\"#13ce66\",\"inactive-color\":\"#d8d8d8\"},on:{\"change\":_vm.changeSwitch},model:{value:(_vm.switchData),callback:function ($$v) {_vm.switchData=$$v},expression:\"switchData\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseSwitch.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseSwitch.vue?vue&type=template&id=c152a4dc&\"\nimport script from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseSwitch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.2.js b/src/expendPlugins/chart/chartmix.umd.min.2.js new file mode 100644 index 000000000..0b83464ba --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.2.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[2],{"02ce":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",{staticStyle:{"margin-top":"15px"}},[a("el-col",{staticClass:"title",attrs:{span:8}},[t._t("title")],2),a("el-col",{attrs:{span:16}},[a("chart-base-box",{attrs:{boxData:t.baseLabelOptionData.fontGroup,checkboxOption:t.fontStyleObj},on:{"update:boxData":function(e){return t.$set(t.baseLabelOptionData,"fontGroup",e)},"update:box-data":function(e){return t.$set(t.baseLabelOptionData,"fontGroup",e)}}}),a("el-row",{staticStyle:{"margin-top":"5px"}},[a("el-col",{attrs:{span:12}},[a("chart-base-select",{attrs:{hideCol:!0,tooltip:"选择字体大小",selectOption:t.fontSizeList,selectValue:t.baseLabelOptionData.fontSize},on:{"update:selectValue":function(e){return t.$set(t.baseLabelOptionData,"fontSize",e)},"update:select-value":function(e){return t.$set(t.baseLabelOptionData,"fontSize",e)}}})],1),a("el-col",{attrs:{span:8,offset:2}},[a("el-color-picker",{attrs:{size:"mini"},on:{change:t.changeStyle},model:{value:t.baseLabelOptionData.color,callback:function(e){t.$set(t.baseLabelOptionData,"color",e)},expression:"baseLabelOptionData.color"}})],1)],1)],1)],1),"custom"===t.baseLabelOptionData.fontSize?a("chart-base-slider",{attrs:{baseSliderOption:t.baseLabelOptionData.cusFontSize,unit:"px",content:"滑动修改字体大小"},on:{"update:baseSliderOption":function(e){return t.$set(t.baseLabelOptionData,"cusFontSize",e)},"update:base-slider-option":function(e){return t.$set(t.baseLabelOptionData,"cusFontSize",e)}}}):t._e()],1)},o=[],s=(a("caad"),a("2532"),a("5530")),i=a("1540"),r=a("b4cc"),l={name:"chart-base-label",props:{router:String,baseLabelOption:Object},components:{"chart-base-slider":i["ChartBaseSlider"],"chart-base-select":i["ChartBaseSelect"],"chart-base-box":i["ChartBaseBox"]},data:function(){return{baseLabelOptionData:{},fontSizeList:i["deepCopy"](r["e"]),fontStyleObj:{}}},watch:{baseLabelOption:{handler:function(t){i["isEqual"](this.baseLabelOptionData,t)||(this.baseLabelOptionData=i["deepCopy"](t),this.router.includes("title")?this.fontStyleObj=i["deepCopy"](r["h"]):this.fontStyleObj=i["deepCopy"](r["g"]))},immediate:!0,deep:!0},baseLabelOptionData:{handler:function(t,e){e&&this.changeStyle()},immediate:!0,deep:!0}},methods:Object(s["a"])(Object(s["a"])({},i["mapActions"]("chartSetting",["updateChartItem"])),{},{changeStyle:function(){var t={updateObj:i["deepCopy"](this.baseLabelOptionData),router:this.router};this.updateChartItem(t)}})},c=l,p=a("2877"),b=Object(p["a"])(c,n,o,!1,null,null,null);e["default"]=b.exports},2532:function(t,e,a){"use strict";var n=a("23e7"),o=a("5a34"),s=a("1d80"),i=a("ab13");n({target:"String",proto:!0,forced:!i("includes")},{includes:function(t){return!!~String(s(this)).indexOf(o(t),arguments.length>1?arguments[1]:void 0)}})},"5a34":function(t,e,a){var n=a("44e7");t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},ab13:function(t,e,a){var n=a("b622"),o=n("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(a){try{return e[o]=!1,"/./"[t](e)}catch(n){}}return!1}}}]); +//# sourceMappingURL=chartmix.umd.min.2.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.2.js.map b/src/expendPlugins/chart/chartmix.umd.min.2.js.map new file mode 100644 index 000000000..fc9e05b5c --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?eeeb","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue?3060","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseLabel.vue","webpack://chartmix/./node_modules/core-js/modules/es.string.includes.js","webpack://chartmix/./node_modules/core-js/internals/not-a-regexp.js","webpack://chartmix/./node_modules/core-js/internals/correct-is-regexp-logic.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticStyle","staticClass","attrs","_t","baseLabelOptionData","fontGroup","fontStyleObj","on","$event","$set","fontSizeList","fontSize","changeStyle","model","value","callback","$$v","expression","cusFontSize","_e","staticRenderFns","component","$","notARegExp","requireObjectCoercible","correctIsRegExpLogic","target","proto","forced","includes","searchString","String","indexOf","arguments","length","undefined","isRegExp","module","exports","it","TypeError","wellKnownSymbol","MATCH","METHOD_NAME","regexp","e","f"],"mappings":"wLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,SAAS,CAACE,YAAY,CAAC,aAAa,SAAS,CAACF,EAAG,SAAS,CAACG,YAAY,QAAQC,MAAM,CAAC,KAAO,IAAI,CAACR,EAAIS,GAAG,UAAU,GAAGL,EAAG,SAAS,CAACI,MAAM,CAAC,KAAO,KAAK,CAACJ,EAAG,iBAAiB,CAACI,MAAM,CAAC,QAAUR,EAAIU,oBAAoBC,UAAU,eAAiBX,EAAIY,cAAcC,GAAG,CAAC,iBAAiB,SAASC,GAAQ,OAAOd,EAAIe,KAAKf,EAAIU,oBAAqB,YAAaI,IAAS,kBAAkB,SAASA,GAAQ,OAAOd,EAAIe,KAAKf,EAAIU,oBAAqB,YAAaI,OAAYV,EAAG,SAAS,CAACE,YAAY,CAAC,aAAa,QAAQ,CAACF,EAAG,SAAS,CAACI,MAAM,CAAC,KAAO,KAAK,CAACJ,EAAG,oBAAoB,CAACI,MAAM,CAAC,SAAU,EAAK,QAAU,SAAS,aAAeR,EAAIgB,aAAa,YAAchB,EAAIU,oBAAoBO,UAAUJ,GAAG,CAAC,qBAAqB,SAASC,GAAQ,OAAOd,EAAIe,KAAKf,EAAIU,oBAAqB,WAAYI,IAAS,sBAAsB,SAASA,GAAQ,OAAOd,EAAIe,KAAKf,EAAIU,oBAAqB,WAAYI,QAAa,GAAGV,EAAG,SAAS,CAACI,MAAM,CAAC,KAAO,EAAE,OAAS,IAAI,CAACJ,EAAG,kBAAkB,CAACI,MAAM,CAAC,KAAO,QAAQK,GAAG,CAAC,OAASb,EAAIkB,aAAaC,MAAM,CAACC,MAAOpB,EAAIU,oBAAyB,MAAEW,SAA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AAQ,QAEvBC,EAAOC,QAAU,SAAUC,GACzB,GAAIH,EAASG,GACX,MAAMC,UAAU,iDAChB,OAAOD,I,qBCLX,IAAIE,EAAkB,EAAQ,QAE1BC,EAAQD,EAAgB,SAE5BJ,EAAOC,QAAU,SAAUK,GACzB,IAAIC,EAAS,IACb,IACE,MAAMD,GAAaC,GACnB,MAAOC,GACP,IAEE,OADAD,EAAOF,IAAS,EACT,MAAMC,GAAaC,GAC1B,MAAOE,KACT,OAAO","file":"chartmix.umd.min.2.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"title\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('chart-base-box',{attrs:{\"boxData\":_vm.baseLabelOptionData.fontGroup,\"checkboxOption\":_vm.fontStyleObj},on:{\"update:boxData\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontGroup\", $event)},\"update:box-data\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontGroup\", $event)}}}),_c('el-row',{staticStyle:{\"margin-top\":\"5px\"}},[_c('el-col',{attrs:{\"span\":12}},[_c('chart-base-select',{attrs:{\"hideCol\":true,\"tooltip\":'选择字体大小',\"selectOption\":_vm.fontSizeList,\"selectValue\":_vm.baseLabelOptionData.fontSize},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontSize\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"fontSize\", $event)}}})],1),_c('el-col',{attrs:{\"span\":8,\"offset\":2}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeStyle},model:{value:(_vm.baseLabelOptionData.color),callback:function ($$v) {_vm.$set(_vm.baseLabelOptionData, \"color\", $$v)},expression:\"baseLabelOptionData.color\"}})],1)],1)],1)],1),(_vm.baseLabelOptionData.fontSize === 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.baseLabelOptionData.cusFontSize,\"unit\":'px',\"content\":'滑动修改字体大小'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"cusFontSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.baseLabelOptionData, \"cusFontSize\", $event)}}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseLabel.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseLabel.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseLabel.vue?vue&type=template&id=e2628114&\"\nimport script from \"./ChartBaseLabel.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseLabel.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.3.js b/src/expendPlugins/chart/chartmix.umd.min.3.js new file mode 100644 index 000000000..5aff043a8 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.3.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[3],{1540:function(e,t,s){"use strict";s.r(t),s.d(t,"ChartBaseLabel",(function(){return r})),s.d(t,"ChartBaseSwitch",(function(){return l})),s.d(t,"ChartBaseInput",(function(){return o})),s.d(t,"ChartBaseSelect",(function(){return u})),s.d(t,"ChartBaseSlider",(function(){return c})),s.d(t,"ChartBaseBox",(function(){return p})),s.d(t,"importComp",(function(){return d}));s("d3b7"),s("e6cf");var i=s("2f62");s.d(t,"mapActions",(function(){return i["b"]}));var n=s("ca00");s.d(t,"deepCopy",(function(){return n["b"]}));var a=s("2ef0");s.d(t,"isEqual",(function(){return a["isEqual"]}));var r=function(){return s.e(2).then(s.bind(null,"02ce"))},l=function(){return s.e(11).then(s.bind(null,"9e1a"))},o=function(){return s.e(9).then(s.bind(null,"37cd"))},u=function(){return s.e(10).then(s.bind(null,"138b"))},c=function(){return s.e(1).then(s.bind(null,"b57e"))},p=function(){return s.e(8).then(s.bind(null,"3f9f"))},d=function(e){return{"chart-base-label":e.ChartBaseLabel,"chart-base-input":e.ChartBaseInput,"chart-base-switch":e.ChartBaseSwitch,"chart-base-slider":e.ChartBaseSlider,"chart-base-select":e.ChartBaseSelect}}},e078:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-collapse-item",{attrs:{name:"6",title:"XY轴设置"}},[s("chart-base-select",{attrs:{selectOption:e.axisGroup,selectValue:e.axis.axisType},on:{"update:selectValue":function(t){return e.$set(e.axis,"axisType",t)},"update:select-value":function(t){return e.$set(e.axis,"axisType",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("选择坐标轴")])]),s("chart-base-switch",{attrs:{switchValue:e.series.show},on:{"update:switchValue":function(t){return e.$set(e.series,"show",t)},"update:switch-value":function(t){return e.$set(e.series,"show",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(e.series.name))])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.series.show,expression:"series.show"}]},[s("chart-base-input",{attrs:{inputValue:e.series.title.text,placeholder:"请输入标题内容"},on:{"update:inputValue":function(t){return e.$set(e.series.title,"text",t)},"update:input-value":function(t){return e.$set(e.series.title,"text",t)}}},[s("div",{attrs:{slot:"input"},slot:"input"},[e._v("标题内容")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.series.title.text,expression:"series.title.text"}],staticStyle:{"margin-top":"15px"}},[s("chart-base-label",{attrs:{router:e.router+"/label",baseLabelOption:e.series.title.label},on:{"update:baseLabelOption":function(t){return e.$set(e.series.title,"label",t)},"update:base-label-option":function(t){return e.$set(e.series.title,"label",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("文本样式")])]),s("chart-base-select",{attrs:{selectOption:e.fzPosOption,selectValue:e.series.title.fzPosition},on:{"update:selectValue":function(t){return e.$set(e.series.title,"fzPosition",t)},"update:select-value":function(t){return e.$set(e.series.title,"fzPosition",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("文本对齐方式")])])],1),s("chart-base-switch",{attrs:{switchValue:e.series.inverse},on:{"update:switchValue":function(t){return e.$set(e.series,"inverse",t)},"update:switch-value":function(t){return e.$set(e.series,"inverse",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("反向坐标轴")])]),s("chart-base-slider",{attrs:{hideCol:!0,max:10,baseSliderOption:e.series.tickLabel.optimize,unit:"个",content:"滑动修改坐标轴间隔个数"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.tickLabel,"optimize",t)},"update:base-slider-option":function(t){return e.$set(e.series.tickLabel,"optimize",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("坐标轴间隔个数")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.series.title.text,expression:"series.title.text"}]},[s("chart-base-slider",{attrs:{hideCol:!0,baseSliderOption:e.series.title.nameGap,unit:"px",content:"滑动修改标题与轴线距离"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.title,"nameGap",t)},"update:base-slider-option":function(t){return e.$set(e.series.title,"nameGap",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("标题与轴线距离")])]),s("chart-base-slider",{attrs:{hideCol:!0,format:e.formatRotation+"",max:180,min:-180,baseSliderOption:e.series.title.rotate,unit:"°",content:"滑动修改标题与轴线距离"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.title,"rotate",t)},"update:base-slider-option":function(t){return e.$set(e.series.title,"rotate",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("倾斜轴标题")])])],1),s("chart-base-switch",{attrs:{switchValue:e.series.tickLine.show},on:{"update:switchValue":function(t){return e.$set(e.series.tickLine,"show",t)},"update:switch-value":function(t){return e.$set(e.series.tickLine,"show",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("显示刻度线")])]),s("chart-base-slider",{attrs:{hideCol:!0,min:1,baseSliderOption:e.series.tickLine.width,unit:"px",content:"滑动修改刻度线宽度"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.tickLine,"width",t)},"update:base-slider-option":function(t){return e.$set(e.series.tickLine,"width",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("刻度线宽度")])]),s("el-row",{staticStyle:{"margin-top":"15px"}},[s("el-col",{staticClass:"title",attrs:{span:7}},[e._v("刻度线颜色")]),s("el-col",{attrs:{push:14,span:3}},[s("el-tooltip",{attrs:{"open-delay":500,content:"刻度线颜色",effect:"dark",placement:"bottom"}},[s("el-color-picker",{attrs:{size:"mini"},model:{value:e.series.tickLine.color,callback:function(t){e.$set(e.series.tickLine,"color",t)},expression:"series.tickLine.color"}})],1)],1)],1),s("chart-base-switch",{attrs:{switchValue:e.series.tick.show},on:{"update:switchValue":function(t){return e.$set(e.series.tick,"show",t)},"update:switch-value":function(t){return e.$set(e.series.tick,"show",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("显示刻度")])]),s("chart-base-select",{attrs:{selectOption:e.orient,selectValue:e.series.tick.position},on:{"update:selectValue":function(t){return e.$set(e.series.tick,"position",t)},"update:select-value":function(t){return e.$set(e.series.tick,"position",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("刻度位置")])]),s("chart-base-slider",{attrs:{hideCol:!0,min:1,baseSliderOption:e.series.tick.length,unit:"px",content:"滑动修改刻度长度"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.tick,"length",t)},"update:base-slider-option":function(t){return e.$set(e.series.tick,"length",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("刻度长度")])]),s("chart-base-slider",{attrs:{hideCol:!0,max:20,min:1,baseSliderOption:e.series.tick.width,unit:"px",content:"滑动修改刻度宽度"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.tick,"width",t)},"update:base-slider-option":function(t){return e.$set(e.series.tick,"width",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("刻度宽度")])]),s("el-row",{staticStyle:{"margin-top":"15px"}},[s("el-col",{staticClass:"title",attrs:{span:6}},[e._v("刻度颜色")]),s("el-col",{attrs:{push:14,span:4}},[s("el-tooltip",{attrs:{"open-delay":500,content:"刻度颜色",effect:"dark",placement:"bottom"}},[s("el-color-picker",{attrs:{size:"mini"},model:{value:e.series.tick.color,callback:function(t){e.$set(e.series.tick,"color",t)},expression:"series.tick.color"}})],1)],1)],1),s("chart-base-switch",{attrs:{switchValue:e.series.tickLabel.show},on:{"update:switchValue":function(t){return e.$set(e.series.tickLabel,"show",t)},"update:switch-value":function(t){return e.$set(e.series.tickLabel,"show",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("显示刻度标签")])]),s("chart-base-slider",{attrs:{hideCol:!0,format:e.formatRotation,max:180,min:-180,baseSliderOption:e.series.tickLabel.rotate,unit:"°",content:"滑动修改标签倾斜角度"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.tickLabel,"rotate",t)},"update:base-slider-option":function(t){return e.$set(e.series.tickLabel,"rotate",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("倾斜标签")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showLabel,expression:"showLabel"}]},[s("chart-base-input",{attrs:{type:"text",inputValue:e.series.tickLabel.min,placeholder:"请输入刻度最小值"},on:{"update:inputValue":function(t){return e.$set(e.series.tickLabel,"min",t)},"update:input-value":function(t){return e.$set(e.series.tickLabel,"min",t)}}},[s("div",{attrs:{slot:"input"},slot:"input"},[e._v("刻度最小值")])]),s("chart-base-input",{attrs:{type:"text",inputValue:e.series.tickLabel.max,placeholder:"请输入刻度最大值且最大值不能小于最小值"},on:{"update:inputValue":function(t){return e.$set(e.series.tickLabel,"max",t)},"update:input-value":function(t){return e.$set(e.series.tickLabel,"max",t)}}},[s("div",{attrs:{slot:"input"},slot:"input"},[e._v("刻度最大值")])]),s("chart-base-select",{attrs:{selectOption:e.ratioOption,selectValue:e.series.tickLabel.ratio},on:{"update:selectValue":function(t){return e.$set(e.series.tickLabel,"ratio",t)},"update:select-value":function(t){return e.$set(e.series.tickLabel,"ratio",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("数值缩放比例")])]),s("chart-base-select",{attrs:{selectOption:e.digitOption,selectValue:e.series.tickLabel.digit},on:{"update:selectValue":function(t){return e.$set(e.series.tickLabel,"digit",t)},"update:select-value":function(t){return e.$set(e.series.tickLabel,"digit",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("小数位数")])])],1),s("chart-base-input",{attrs:{inputValue:e.series.tickLabel.prefix,placeholder:"请输入标签前缀"},on:{"update:inputValue":function(t){return e.$set(e.series.tickLabel,"prefix",t)},"update:input-value":function(t){return e.$set(e.series.tickLabel,"prefix",t)}}},[s("div",{attrs:{slot:"input"},slot:"input"},[e._v("标签前缀")])]),s("chart-base-input",{attrs:{inputValue:e.series.tickLabel.suffix,placeholder:"请输入标签后缀"},on:{"update:inputValue":function(t){return e.$set(e.series.tickLabel,"suffix",t)},"update:input-value":function(t){return e.$set(e.series.tickLabel,"suffix",t)}}},[s("div",{attrs:{slot:"input"},slot:"input"},[e._v("标签后缀")])]),s("chart-base-switch",{attrs:{switchValue:e.series.netLine.show},on:{"update:switchValue":function(t){return e.$set(e.series.netLine,"show",t)},"update:switch-value":function(t){return e.$set(e.series.netLine,"show",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("显示网格线")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.series.netLine.show,expression:"series.netLine.show"}]},[s("chart-base-slider",{attrs:{hideCol:!0,max:20,min:1,baseSliderOption:e.series.netLine.width,unit:"px",content:"滑动修改网格线宽度"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.netLine,"width",t)},"update:base-slider-option":function(t){return e.$set(e.series.netLine,"width",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("网格线宽度")])]),s("chart-base-select",{attrs:{selectOption:e.lineStyleOption,selectValue:e.series.netLine.type},on:{"update:selectValue":function(t){return e.$set(e.series.netLine,"type",t)},"update:select-value":function(t){return e.$set(e.series.netLine,"type",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("网格线类型")])]),s("el-row",{staticStyle:{"margin-top":"15px"}},[s("el-col",{staticClass:"title",attrs:{span:8}},[e._v("网格线颜色")]),s("el-col",{attrs:{push:13,span:3}},[s("el-tooltip",{attrs:{"open-delay":500,content:"网格线颜色",effect:"dark",placement:"bottom"}},[s("el-color-picker",{attrs:{label:!0,size:"mini"},model:{value:e.series.netLine.color,callback:function(t){e.$set(e.series.netLine,"color",t)},expression:"series.netLine.color"}})],1)],1)],1),s("chart-base-select",{attrs:{selectOption:e.intervalOption,selectValue:e.series.netLine.interval.value},on:{"update:selectValue":function(t){return e.$set(e.series.netLine.interval,"value",t)},"update:select-value":function(t){return e.$set(e.series.netLine.interval,"value",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("网格线分割间隔数")])]),"custom"==e.series.netLine.interval.value?s("chart-base-slider",{attrs:{baseSliderOption:e.series.netLine.interval.cusNumber,unit:"个",content:"滑动修改间隔数"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.netLine.interval,"cusNumber",t)},"update:base-slider-option":function(t){return e.$set(e.series.netLine.interval,"cusNumber",t)}}}):e._e()],1),s("chart-base-switch",{attrs:{switchValue:e.series.netArea.show},on:{"update:switchValue":function(t){return e.$set(e.series.netArea,"show",t)},"update:switch-value":function(t){return e.$set(e.series.netArea,"show",t)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[e._v("显示网格区域")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.series.netArea.show,expression:"series.netArea.show"}]},[s("chart-base-select",{attrs:{selectOption:e.intervalOption,selectValue:e.series.netArea.interval.value},on:{"update:selectValue":function(t){return e.$set(e.series.netArea.interval,"value",t)},"update:select-value":function(t){return e.$set(e.series.netArea.interval,"value",t)}}},[s("div",{attrs:{slot:"select"},slot:"select"},[e._v("网格区域分割间隔数")])]),"custom"==e.series.netArea.interval.value?s("chart-base-slider",{attrs:{baseSliderOption:e.series.netArea.interval.cusNumber,unit:"个",content:"滑动修改间隔数"},on:{"update:baseSliderOption":function(t){return e.$set(e.series.netArea.interval,"cusNumber",t)},"update:base-slider-option":function(t){return e.$set(e.series.netArea.interval,"cusNumber",t)}}}):e._e(),s("el-row",{staticStyle:{"margin-top":"15px"}},[s("el-col",{attrs:{span:6}},[e._v("网格区域第一颜色")]),s("el-col",{attrs:{span:3}},[s("el-color-picker",{attrs:{size:"mini"},model:{value:e.series.netArea.colorOne,callback:function(t){e.$set(e.series.netArea,"colorOne",t)},expression:"series.netArea.colorOne"}})],1),s("el-col",{attrs:{span:6}},[e._v("网格区域第二颜色")]),s("el-col",{attrs:{span:3}},[s("el-color-picker",{attrs:{size:"mini"},model:{value:e.series.netArea.colorTwo,callback:function(t){e.$set(e.series.netArea,"colorTwo",t)},expression:"series.netArea.colorTwo"}})],1)],1)],1)],1)],1)},n=[],a=(s("fb6a"),s("ac1f"),s("1276"),s("5530")),r=s("1540"),l=s("b4cc"),o={name:"ChartXaxis",props:{chartAllType:String,axisOption:Object,router:String},components:Object(a["a"])({},r["importComp"](r)),data:function(){return{axis:{},series:{},fontSizeOption:"",lineStyleOption:"",ratioOption:"",digitOption:"",fzPosOption:[{value:"middle",label:"居中"},{value:"start",label:"头部"},{value:"end",label:"尾部"},{value:"hidden",label:"隐藏"}],orient:[{label:"朝内",value:"inside"},{label:"朝外",value:"outside"}],formatRotation:function(e){return e+" °"}}},watch:{axisOption:{handler:function(e){r["isEqual"](this.axis,this.axisOption)||(this.axis=r["deepCopy"](this.axisOption),this.series=this.axis[e.axisType],this.fontSizeOption=r["deepCopy"](l["f"]),this.lineStyleOption=r["deepCopy"](l["j"]),this.intervalOption=r["deepCopy"](l["i"]),this.ratioOption=r["deepCopy"](l["n"]),this.digitOption=r["deepCopy"](l["c"]))},immediate:!0,deep:!0},series:{handler:function(e,t){t&&this.changeAxis()},deep:!0,immediate:!0}},computed:{chartType:function(){return this.chartAllType.split("|")[1]},chartStyle:function(){return this.chartAllType.split("|")[2]},axisGroup:function(){return"bar"==this.chartType&&"compare"!=this.chartStyle?[{value:"xAxisDown",label:"Y轴(左侧垂直)"},{value:"xAxisUp",label:"Y轴(左侧垂直)"},{value:"yAxisLeft",label:"X轴(下方水平)"},{value:"yAxisRight",label:"X轴(上方水平)"}]:"compare"==this.chartStyle?[{value:"xAxisDown",label:"Y轴(右侧坐标轴)"},{value:"xAxisUp",label:"Y轴(左侧坐标轴)"},{value:"yAxisLeft",label:"X轴(右侧坐标轴)"},{value:"yAxisRight",label:"X轴(左侧坐标轴)"}]:[{value:"xAxisDown",label:"X轴(下方水平)"},{value:"xAxisUp",label:"X轴(上方水平)"},{value:"yAxisLeft",label:"Y轴(左侧垂直)"},{value:"yAxisRight",label:"Y轴(右侧垂直)"}]},showLabel:function(){if("bar"==this.chartType&&"x"==this.axis.axisType.slice(0,1)||"bar"!=this.chartType&&"y"==this.axis.axisType.slice(0,1))return!0}},methods:Object(a["a"])(Object(a["a"])({},r["mapActions"]("chartSetting",["updateChartItem"])),{},{changeAxis:function(){var e={updateObj:r["deepCopy"](this.series),router:this.router+"/"+this.axis.axisType};this.updateChartItem(e)}})},u=o,c=s("2877"),p=Object(c["a"])(u,i,n,!1,null,null,null);t["default"]=p.exports}}]); +//# sourceMappingURL=chartmix.umd.min.3.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.3.js.map b/src/expendPlugins/chart/chartmix.umd.min.3.js.map new file mode 100644 index 000000000..c13db4ee4 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?76b7","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartAxis.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue?5c0a","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartAxis.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t","render","_vm","this","_h","$createElement","_c","_self","attrs","axisGroup","axis","axisType","on","$event","$set","slot","_v","series","show","_s","name","directives","rawName","value","expression","title","text","staticStyle","router","label","fzPosOption","fzPosition","inverse","tickLabel","optimize","nameGap","formatRotation","rotate","tickLine","width","staticClass","model","callback","$$v","tick","orient","position","length","min","max","ratioOption","ratio","digitOption","digit","prefix","suffix","netLine","lineStyleOption","type","intervalOption","interval","cusNumber","_e","netArea","staticRenderFns","component"],"mappings":"itBACA,IAAMA,EAAiB,kBAAM,kCACvBC,EAAkB,kBAAM,mCACxBC,EAAiB,kBAAM,kCACvBC,EAAkB,kBAAM,mCACxBC,EAAkB,kBAAM,kCACxBC,EAAe,kBAAM,kCAKrBC,EAAa,SAASC,GACxB,MAAO,CACH,mBAAoBA,EAAEP,eACtB,mBAAoBO,EAAEL,eACtB,oBAAqBK,EAAEN,gBACvB,oBAAqBM,EAAEH,gBACvB,oBAAqBG,EAAEJ,mB,yCCjB/B,IAAIK,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,mBAAmB,CAACE,MAAM,CAAC,KAAO,IAAI,MAAQ,UAAU,CAACF,EAAG,oBAAoB,CAACE,MAAM,CAAC,aAAeN,EAAIO,UAAU,YAAcP,EAAIQ,KAAKC,UAAUC,GAAG,CAAC,qBAAqB,SAASC,GAAQ,OAAOX,EAAIY,KAAKZ,EAAIQ,KAAM,WAAYG,IAAS,sBAAsB,SAASA,GAAQ,OAAOX,EAAIY,KAAKZ,EAAIQ,KAAM,WAAYG,MAAW,CAACP,EAAG,MAAM,CAACE,MAAM,CAAC,KAAO,UAAUO,KAAK,UAAU,CAACb,EAAIc,GAAG,aAAaV,EAAG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AAV,aAAU,MAAV,cAII,UA/BJ,WAgCM,GAAN,qHACQ,OAAR,IAIE,QAAF,iCACA,qDADA,IAEI,WAFJ,WAGM,IAAN,GACQ,UAAR,2BACQ,OAAR,oCAEM,KAAN,uBC9SgY,I,YCO5XC,EAAY,eACd,EACAhE,EACA+D,GACA,EACA,KACA,KACA,MAIa,aAAAC,E","file":"chartmix.umd.min.3.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"6\",\"title\":\"XY轴设置\"}},[_c('chart-base-select',{attrs:{\"selectOption\":_vm.axisGroup,\"selectValue\":_vm.axis.axisType},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.axis, \"axisType\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.axis, \"axisType\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"选择坐标轴\")])]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(_vm._s(_vm.series.name))])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.show),expression:\"series.show\"}]},[_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.title.text,\"placeholder\":'请输入标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.title, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.title, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标题内容\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.title.text),expression:\"series.title.text\"}],staticStyle:{\"margin-top\":\"15px\"}},[_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.series.title.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.series.title, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.series.title, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.fzPosOption,\"selectValue\":_vm.series.title.fzPosition},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.title, \"fzPosition\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.title, \"fzPosition\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"文本对齐方式\")])])],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.inverse},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series, \"inverse\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series, \"inverse\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"反向坐标轴\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":10,\"baseSliderOption\":_vm.series.tickLabel.optimize,\"unit\":'个',\"content\":'滑动修改坐标轴间隔个数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLabel, \"optimize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLabel, \"optimize\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"坐标轴间隔个数\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.title.text),expression:\"series.title.text\"}]},[_c('chart-base-slider',{attrs:{\"hideCol\":true,\"baseSliderOption\":_vm.series.title.nameGap,\"unit\":'px',\"content\":'滑动修改标题与轴线距离'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.title, \"nameGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.title, \"nameGap\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"标题与轴线距离\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"format\":_vm.formatRotation+'',\"max\":180,\"min\":-180,\"baseSliderOption\":_vm.series.title.rotate,\"unit\":'°',\"content\":'滑动修改标题与轴线距离'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.title, \"rotate\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.title, \"rotate\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"倾斜轴标题\")])])],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tickLine.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tickLine, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tickLine, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度线\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"min\":1,\"baseSliderOption\":_vm.series.tickLine.width,\"unit\":'px',\"content\":'滑动修改刻度线宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLine, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLine, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度线宽度\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":7}},[_vm._v(\"刻度线颜色\")]),_c('el-col',{attrs:{\"push\":14,\"span\":3}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"刻度线颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.tickLine.color),callback:function ($$v) {_vm.$set(_vm.series.tickLine, \"color\", $$v)},expression:\"series.tickLine.color\"}})],1)],1)],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tick.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tick, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tick, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.orient,\"selectValue\":_vm.series.tick.position},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tick, \"position\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tick, \"position\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"刻度位置\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"min\":1,\"baseSliderOption\":_vm.series.tick.length,\"unit\":'px',\"content\":'滑动修改刻度长度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tick, \"length\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tick, \"length\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度长度\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":20,\"min\":1,\"baseSliderOption\":_vm.series.tick.width,\"unit\":'px',\"content\":'滑动修改刻度宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tick, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tick, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"刻度宽度\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":6}},[_vm._v(\"刻度颜色\")]),_c('el-col',{attrs:{\"push\":14,\"span\":4}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"刻度颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.tick.color),callback:function ($$v) {_vm.$set(_vm.series.tick, \"color\", $$v)},expression:\"series.tick.color\"}})],1)],1)],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.tickLabel.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示刻度标签\")])]),_c('chart-base-slider',{attrs:{\"hideCol\":true,\"format\":_vm.formatRotation,\"max\":180,\"min\":-180,\"baseSliderOption\":_vm.series.tickLabel.rotate,\"unit\":'°',\"content\":'滑动修改标签倾斜角度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.tickLabel, \"rotate\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.tickLabel, \"rotate\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"倾斜标签\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showLabel),expression:\"showLabel\"}]},[_c('chart-base-input',{attrs:{\"type\":'text',\"inputValue\":_vm.series.tickLabel.min,\"placeholder\":'请输入刻度最小值'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"min\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"min\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"刻度最小值\")])]),_c('chart-base-input',{attrs:{\"type\":'text',\"inputValue\":_vm.series.tickLabel.max,\"placeholder\":'请输入刻度最大值且最大值不能小于最小值'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"max\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"max\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"刻度最大值\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.ratioOption,\"selectValue\":_vm.series.tickLabel.ratio},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"ratio\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"ratio\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"数值缩放比例\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.digitOption,\"selectValue\":_vm.series.tickLabel.digit},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"digit\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"digit\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"小数位数\")])])],1),_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.tickLabel.prefix,\"placeholder\":'请输入标签前缀'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"prefix\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"prefix\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标签前缀\")])]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.series.tickLabel.suffix,\"placeholder\":'请输入标签后缀'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.series.tickLabel, \"suffix\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.series.tickLabel, \"suffix\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"标签后缀\")])]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.netLine.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.netLine, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.netLine, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示网格线\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.netLine.show),expression:\"series.netLine.show\"}]},[_c('chart-base-slider',{attrs:{\"hideCol\":true,\"max\":20,\"min\":1,\"baseSliderOption\":_vm.series.netLine.width,\"unit\":'px',\"content\":'滑动修改网格线宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netLine, \"width\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netLine, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"网格线宽度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineStyleOption,\"selectValue\":_vm.series.netLine.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netLine, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netLine, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格线类型\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._v(\"网格线颜色\")]),_c('el-col',{attrs:{\"push\":13,\"span\":3}},[_c('el-tooltip',{attrs:{\"open-delay\":500,\"content\":\"网格线颜色\",\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-color-picker',{attrs:{\"label\":true,\"size\":\"mini\"},model:{value:(_vm.series.netLine.color),callback:function ($$v) {_vm.$set(_vm.series.netLine, \"color\", $$v)},expression:\"series.netLine.color\"}})],1)],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.intervalOption,\"selectValue\":_vm.series.netLine.interval.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netLine.interval, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netLine.interval, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格线分割间隔数\")])]),(_vm.series.netLine.interval.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.series.netLine.interval.cusNumber,\"unit\":'个',\"content\":'滑动修改间隔数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netLine.interval, \"cusNumber\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netLine.interval, \"cusNumber\", $event)}}}):_vm._e()],1),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.series.netArea.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.series.netArea, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.series.netArea, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示网格区域\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.series.netArea.show),expression:\"series.netArea.show\"}]},[_c('chart-base-select',{attrs:{\"selectOption\":_vm.intervalOption,\"selectValue\":_vm.series.netArea.interval.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.series.netArea.interval, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.series.netArea.interval, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"网格区域分割间隔数\")])]),(_vm.series.netArea.interval.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.series.netArea.interval.cusNumber,\"unit\":'个',\"content\":'滑动修改间隔数'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.series.netArea.interval, \"cusNumber\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.series.netArea.interval, \"cusNumber\", $event)}}}):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"网格区域第一颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.netArea.colorOne),callback:function ($$v) {_vm.$set(_vm.series.netArea, \"colorOne\", $$v)},expression:\"series.netArea.colorOne\"}})],1),_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"网格区域第二颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.series.netArea.colorTwo),callback:function ($$v) {_vm.$set(_vm.series.netArea, \"colorTwo\", $$v)},expression:\"series.netArea.colorTwo\"}})],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartAxis.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartAxis.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartAxis.vue?vue&type=template&id=728665dc&\"\nimport script from \"./ChartAxis.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartAxis.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.4.js b/src/expendPlugins/chart/chartmix.umd.min.4.js new file mode 100644 index 000000000..4023362dc --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.4.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[4],{1540:function(t,e,r){"use strict";r.r(e),r.d(e,"ChartBaseLabel",(function(){return a})),r.d(e,"ChartBaseSwitch",(function(){return l})),r.d(e,"ChartBaseInput",(function(){return i})),r.d(e,"ChartBaseSelect",(function(){return c})),r.d(e,"ChartBaseSlider",(function(){return u})),r.d(e,"ChartBaseBox",(function(){return p})),r.d(e,"importComp",(function(){return d}));r("d3b7"),r("e6cf");var s=r("2f62");r.d(e,"mapActions",(function(){return s["b"]}));var o=r("ca00");r.d(e,"deepCopy",(function(){return o["b"]}));var n=r("2ef0");r.d(e,"isEqual",(function(){return n["isEqual"]}));var a=function(){return r.e(2).then(r.bind(null,"02ce"))},l=function(){return r.e(11).then(r.bind(null,"9e1a"))},i=function(){return r.e(9).then(r.bind(null,"37cd"))},c=function(){return r.e(10).then(r.bind(null,"138b"))},u=function(){return r.e(1).then(r.bind(null,"b57e"))},p=function(){return r.e(8).then(r.bind(null,"3f9f"))},d=function(t){return{"chart-base-label":t.ChartBaseLabel,"chart-base-input":t.ChartBaseInput,"chart-base-switch":t.ChartBaseSwitch,"chart-base-slider":t.ChartBaseSlider,"chart-base-select":t.ChartBaseSelect}}},"9b10":function(t,e,r){"use strict";r.r(e);var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-collapse-item",{attrs:{name:"4",title:"鼠标提示"}},[r("chart-base-switch",{attrs:{switchValue:t.cursor.show},on:{"update:switchValue":function(e){return t.$set(t.cursor,"show",e)},"update:switch-value":function(e){return t.$set(t.cursor,"show",e)}}},[r("div",{attrs:{slot:"title"},slot:"title"},[t._v("显示提示框")])]),r("chart-base-label",{attrs:{router:t.router+"/label",baseLabelOption:t.cursor.label}},[r("div",{attrs:{slot:"title"},slot:"title"},[t._v("鼠标提示样式")])]),r("el-row",{staticStyle:{"margin-top":"10px"}},[r("el-col",{attrs:{span:6}},[t._v("背景颜色")]),r("el-col",{attrs:{span:3}},[r("el-color-picker",{attrs:{size:"mini"},model:{value:t.cursor.backgroundColor,callback:function(e){t.$set(t.cursor,"backgroundColor",e)},expression:"cursor.backgroundColor"}})],1)],1),r("chart-base-select",{attrs:{selectOption:t.triggerMethodArr,selectValue:t.cursor.triggerOn},on:{"update:selectValue":function(e){return t.$set(t.cursor,"triggerOn",e)},"update:select-value":function(e){return t.$set(t.cursor,"triggerOn",e)}}},[r("div",{attrs:{slot:"select"},slot:"select"},[t._v("提示触发条件")])]),r("chart-base-select",{attrs:{selectOption:t.triggerTypeArr,selectValue:t.cursor.triggerType},on:{"update:selectValue":function(e){return t.$set(t.cursor,"triggerType",e)},"update:select-value":function(e){return t.$set(t.cursor,"triggerType",e)}}},[r("div",{attrs:{slot:"select"},slot:"select"},[t._v("提示触发类型")])]),"item"!=t.cursor.triggerType?r("div",[r("chart-base-select",{attrs:{selectOption:t.lineStyleOption,selectValue:t.cursor.axisPointer.style.type},on:{"update:selectValue":function(e){return t.$set(t.cursor.axisPointer.style,"type",e)},"update:select-value":function(e){return t.$set(t.cursor.axisPointer.style,"type",e)}}},[r("div",{attrs:{slot:"select"},slot:"select"},[t._v("指示器线类型")])]),r("chart-base-select",{attrs:{selectOption:t.lineWeightOption,selectValue:t.cursor.axisPointer.style.width},on:{"update:selectValue":function(e){return t.$set(t.cursor.axisPointer.style,"width",e)},"update:select-value":function(e){return t.$set(t.cursor.axisPointer.style,"width",e)}}},[r("div",{attrs:{slot:"select"},slot:"select"},[t._v("指示器线宽")])]),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",{attrs:{span:6}},[t._v("线条颜色")]),r("el-col",{attrs:{span:3}},[r("el-color-picker",{attrs:{size:"mini"},model:{value:t.cursor.axisPointer.style.color,callback:function(e){t.$set(t.cursor.axisPointer.style,"color",e)},expression:"cursor.axisPointer.style.color"}})],1)],1),r("chart-base-select",{attrs:{selectOption:t.axisPointerArr,selectValue:t.cursor.axisPointer.type},on:{"update:selectValue":function(e){return t.$set(t.cursor.axisPointer,"type",e)},"update:select-value":function(e){return t.$set(t.cursor.axisPointer,"type",e)}}},[r("div",{attrs:{slot:"select"},slot:"select"},[t._v("指示器类型")])])],1):t._e(),"item"==t.cursor.triggerType?r("chart-base-select",{attrs:{selectOption:t.posOption,selectValue:t.cursor.position},on:{"update:selectValue":function(e){return t.$set(t.cursor,"position",e)},"update:select-value":function(e){return t.$set(t.cursor,"position",e)}}},[r("div",{attrs:{slot:"select"},slot:"select"},[t._v("提示框浮层位置")])]):t._e(),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",{attrs:{span:2}},[r("i",{staticClass:"el-icon-menu"})]),r("el-col",{attrs:{span:8}},[t._v("鼠标提示后缀")])],1),t._l(t.seriesOption,(function(e,s){return r("el-row",{key:s,staticStyle:{"margin-top":"15px"}},[r("el-col",{attrs:{span:6}},[t._v(t._s(e))]),r("el-col",{attrs:{span:4}},[r("chart-base-input",{attrs:{hideCol:!0,placeholder:"后缀"}})],1),r("el-col",{attrs:{span:6}},[r("chart-base-select",{attrs:{tooltip:"数值比例",selectOption:t.ratioOption,selectValue:t.cursor.format[s].ratio,hideCol:!0},on:{"update:selectValue":function(e){return t.$set(t.cursor.format[s],"ratio",e)},"update:select-value":function(e){return t.$set(t.cursor.format[s],"ratio",e)}}})],1),r("el-col",{attrs:{span:6}},[r("chart-base-select",{attrs:{tooltip:"小数位数",selectOption:t.digitOption,selectValue:t.cursor.format[s].digit,hideCol:!0},on:{"update:selectValue":function(e){return t.$set(t.cursor.format[s],"digit",e)},"update:select-value":function(e){return t.$set(t.cursor.format[s],"digit",e)}}})],1)],1)}))],2)},o=[],n=r("5530"),a=r("1540"),l=r("b4cc"),i={components:Object(n["a"])({},a["importComp"](a)),props:{router:String,chartAllType:String,cursorOption:Object},data:function(){return{cursor:{},fontSizeOption:a["deepCopy"](l["f"]),lineStyleOption:a["deepCopy"](l["j"]),lineWeightOption:a["deepCopy"](l["k"]),posOption:a["deepCopy"](l["l"]),ratioOption:a["deepCopy"](l["n"]),digitOption:a["deepCopy"](l["c"]),triggerTypeArr:[{value:"item",label:"数据项图形触发"},{value:"axis",label:"坐标轴触发"}],axisPointerArr:[{value:"line",label:"直线指示器"},{value:"shadow",label:"阴影指示器"},{value:"cross",label:"十字准星指示器"}],triggerMethodArr:[{value:"mousemove",label:"鼠标移动"},{value:"click",label:"单击左键/鼠标划过"},{value:"mousemove|click",label:"同时触发"}]}},watch:{cursorOption:{handler:function(t){a["isEqual"](this.cursor,t)||(this.cursor=a["deepCopy"](t))},immediate:!0,deep:!0},cursor:{handler:function(t,e){e&&this.changeCursor()},deep:!0,immediate:!0}},computed:{seriesOption:function(){for(var t=[],e=0;e import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"4\",\"title\":\"鼠标提示\"}},[_c('chart-base-switch',{attrs:{\"switchValue\":_vm.cursor.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.cursor, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.cursor, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示提示框\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.cursor.label}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"鼠标提示样式\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"10px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"背景颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.cursor.backgroundColor),callback:function ($$v) {_vm.$set(_vm.cursor, \"backgroundColor\", $$v)},expression:\"cursor.backgroundColor\"}})],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.triggerMethodArr,\"selectValue\":_vm.cursor.triggerOn},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"triggerOn\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"triggerOn\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示触发条件\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.triggerTypeArr,\"selectValue\":_vm.cursor.triggerType},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"triggerType\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"triggerType\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示触发类型\")])]),(_vm.cursor.triggerType != 'item')?_c('div',[_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineStyleOption,\"selectValue\":_vm.cursor.axisPointer.style.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器线类型\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.lineWeightOption,\"selectValue\":_vm.cursor.axisPointer.style.width},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"width\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer.style, \"width\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器线宽\")])]),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(\"线条颜色\")]),_c('el-col',{attrs:{\"span\":3}},[_c('el-color-picker',{attrs:{\"size\":\"mini\"},model:{value:(_vm.cursor.axisPointer.style.color),callback:function ($$v) {_vm.$set(_vm.cursor.axisPointer.style, \"color\", $$v)},expression:\"cursor.axisPointer.style.color\"}})],1)],1),_c('chart-base-select',{attrs:{\"selectOption\":_vm.axisPointerArr,\"selectValue\":_vm.cursor.axisPointer.type},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.axisPointer, \"type\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.axisPointer, \"type\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"指示器类型\")])])],1):_vm._e(),(_vm.cursor.triggerType == 'item')?_c('chart-base-select',{attrs:{\"selectOption\":_vm.posOption,\"selectValue\":_vm.cursor.position},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor, \"position\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor, \"position\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"提示框浮层位置\")])]):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":2}},[_c('i',{staticClass:\"el-icon-menu\"})]),_c('el-col',{attrs:{\"span\":8}},[_vm._v(\"鼠标提示后缀\")])],1),_vm._l((_vm.seriesOption),function(item,i){return _c('el-row',{key:i,staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{attrs:{\"span\":6}},[_vm._v(_vm._s(item))]),_c('el-col',{attrs:{\"span\":4}},[_c('chart-base-input',{attrs:{\"hideCol\":true,\"placeholder\":'后缀'}})],1),_c('el-col',{attrs:{\"span\":6}},[_c('chart-base-select',{attrs:{\"tooltip\":'数值比例',\"selectOption\":_vm.ratioOption,\"selectValue\":_vm.cursor.format[i].ratio,\"hideCol\":true},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.format[i], \"ratio\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.format[i], \"ratio\", $event)}}})],1),_c('el-col',{attrs:{\"span\":6}},[_c('chart-base-select',{attrs:{\"tooltip\":'小数位数',\"selectOption\":_vm.digitOption,\"selectValue\":_vm.cursor.format[i].digit,\"hideCol\":true},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.cursor.format[i], \"digit\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.cursor.format[i], \"digit\", $event)}}})],1)],1)})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartCursor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartCursor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartCursor.vue?vue&type=template&id=1ee52ff0&\"\nimport script from \"./ChartCursor.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartCursor.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.5.js b/src/expendPlugins/chart/chartmix.umd.min.5.js new file mode 100644 index 000000000..bf465bd1f --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.5.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[5],{1540:function(e,t,n){"use strict";n.r(t),n.d(t,"ChartBaseLabel",(function(){return a})),n.d(t,"ChartBaseSwitch",(function(){return r})),n.d(t,"ChartBaseInput",(function(){return o})),n.d(t,"ChartBaseSelect",(function(){return u})),n.d(t,"ChartBaseSlider",(function(){return c})),n.d(t,"ChartBaseBox",(function(){return d})),n.d(t,"importComp",(function(){return p}));n("d3b7"),n("e6cf");var s=n("2f62");n.d(t,"mapActions",(function(){return s["b"]}));var i=n("ca00");n.d(t,"deepCopy",(function(){return i["b"]}));var l=n("2ef0");n.d(t,"isEqual",(function(){return l["isEqual"]}));var a=function(){return n.e(2).then(n.bind(null,"02ce"))},r=function(){return n.e(11).then(n.bind(null,"9e1a"))},o=function(){return n.e(9).then(n.bind(null,"37cd"))},u=function(){return n.e(10).then(n.bind(null,"138b"))},c=function(){return n.e(1).then(n.bind(null,"b57e"))},d=function(){return n.e(8).then(n.bind(null,"3f9f"))},p=function(e){return{"chart-base-label":e.ChartBaseLabel,"chart-base-input":e.ChartBaseInput,"chart-base-switch":e.ChartBaseSwitch,"chart-base-slider":e.ChartBaseSlider,"chart-base-select":e.ChartBaseSelect}}},"954f":function(e,t,n){"use strict";n.r(t);var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-collapse-item",{attrs:{name:"3",title:"图例设置"}},[n("chart-base-switch",{attrs:{switchValue:e.legend.show},on:{"update:switchValue":function(t){return e.$set(e.legend,"show",t)},"update:switch-value":function(t){return e.$set(e.legend,"show",t)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[e._v("显示图例")])]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.legend.show,expression:"legend.show"}]},[n("chart-base-label",{attrs:{router:e.router+"/label",baseLabelOption:e.legend.label},on:{"update:baseLabelOption":function(t){return e.$set(e.legend,"label",t)},"update:base-label-option":function(t){return e.$set(e.legend,"label",t)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[e._v("图例样式")])]),n("chart-base-select",{attrs:{selectOption:e.positionOption,selectValue:e.legend.position.value},on:{"update:selectValue":function(t){return e.$set(e.legend.position,"value",t)},"update:select-value":function(t){return e.$set(e.legend.position,"value",t)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[e._v("图例位置")])]),"custom"===e.legend.position.value?n("el-row",[n("chart-base-slider",{attrs:{baseSliderOption:e.legend.position.offsetX,unit:"%",content:"滑动修改水平偏移量"},on:{"update:baseSliderOption":function(t){return e.$set(e.legend.position,"offsetX",t)},"update:base-slider-option":function(t){return e.$set(e.legend.position,"offsetX",t)}}}),n("chart-base-slider",{attrs:{baseSliderOption:e.legend.position.offsetY,unit:"%",content:"滑动修改垂直偏移量"},on:{"update:baseSliderOption":function(t){return e.$set(e.legend.position,"offsetY",t)},"update:base-slider-option":function(t){return e.$set(e.legend.position,"offsetY",t)}}})],1):e._e(),n("chart-base-select",{attrs:{selectOption:e.dirOptions,selectValue:e.legend.position.direction},on:{"update:selectValue":function(t){return e.$set(e.legend.position,"direction",t)},"update:select-value":function(t){return e.$set(e.legend.position,"direction",t)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[e._v("图例朝向")])]),n("chart-base-select",{attrs:{selectOption:e.sizeOption,selectValue:e.legend.width.value},on:{"update:selectValue":function(t){return e.$set(e.legend.width,"value",t)},"update:select-value":function(t){return e.$set(e.legend.width,"value",t)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[e._v("图例宽度")])]),n("chart-base-select",{attrs:{selectOption:e.sizeOption,selectValue:e.legend.height.value},on:{"update:selectValue":function(t){return e.$set(e.legend.height,"value",t)},"update:select-value":function(t){return e.$set(e.legend.height,"value",t)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[e._v("图例高度")])]),"custom"==e.legend.width.value?n("chart-base-slider",{attrs:{baseSliderOption:e.legend.width.cusSize,unit:"px",content:"滑动修改图例宽度"},on:{"update:baseSliderOption":function(t){return e.$set(e.legend.width,"cusSize",t)},"update:base-slider-option":function(t){return e.$set(e.legend.width,"cusSize",t)}}}):e._e(),"custom"==e.legend.height.value?n("chart-base-slider",{attrs:{baseSliderOption:e.legend.height.cusSize,unit:"px",content:"滑动修改图例高度"},on:{"update:baseSliderOption":function(t){return e.$set(e.legend.height,"cusSize",t)},"update:base-slider-option":function(t){return e.$set(e.legend.height,"cusSize",t)}}}):e._e(),n("chart-base-select",{attrs:{selectOption:e.distanceOption,selectValue:e.legend.distance.value},on:{"update:selectValue":function(t){return e.$set(e.legend.distance,"value",t)},"update:select-value":function(t){return e.$set(e.legend.distance,"value",t)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[e._v("图例间距")])]),"custom"==e.legend.distance.value?n("chart-base-slider",{attrs:{baseSliderOption:e.legend.distance.cusGap,unit:"px",content:"滑动修改图例间距"},on:{"update:baseSliderOption":function(t){return e.$set(e.legend.distance,"cusGap",t)},"update:base-slider-option":function(t){return e.$set(e.legend.distance,"cusGap",t)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[e._v("图例样式")])]):e._e()],1)],1)},i=[],l=n("5530"),a=n("b4cc"),r=n("1540"),o={props:{legendOption:Object,chartAllType:String,router:String},data:function(){return{legend:{},positionOption:r["deepCopy"](a["m"]),sizeOption:r["deepCopy"](a["o"]),distanceOption:r["deepCopy"](a["d"]),dirOptions:[{value:"horizontal",label:"水平"},{value:"vertical",label:"垂直"}]}},components:Object(l["a"])({},r["importComp"](r)),watch:{legendOption:{handler:function(e){r["isEqual"](this.legend,e)||(this.legend=r["deepCopy"](e))},immediate:!0,deep:!0},legend:{handler:function(e,t){t&&this.changeLegend()},deep:!0,immediate:!0}},methods:Object(l["a"])(Object(l["a"])({},r["mapActions"]("chartSetting",["updateChartItem"])),{},{changeLegend:function(){var e={updateObj:r["deepCopy"](this.legend),router:this.router};this.updateChartItem(e)}})},u=o,c=n("2877"),d=Object(c["a"])(u,s,i,!1,null,null,null);t["default"]=d.exports}}]); +//# sourceMappingURL=chartmix.umd.min.5.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.5.js.map b/src/expendPlugins/chart/chartmix.umd.min.5.js.map new file mode 100644 index 000000000..954fc3346 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.5.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?b74c","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartLegend.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue?3100","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartLegend.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t","render","_vm","this","_h","$createElement","_c","_self","attrs","legend","show","on","$event","$set","slot","_v","directives","name","rawName","value","expression","router","label","positionOption","position","offsetX","offsetY","_e","dirOptions","direction","sizeOption","width","height","cusSize","distanceOption","distance","cusGap","staticRenderFns","props","legendOption","Object","chartAllType","String","data","components","watch","handler","immediate","deep","oldVal","changeLegend","methods","updateObj","updateChartItem","component"],"mappings":"itBACA,IAAMA,EAAiB,kBAAM,kCACvBC,EAAkB,kBAAM,mCACxBC,EAAiB,kBAAM,kCACvBC,EAAkB,kBAAM,mCACxBC,EAAkB,kBAAM,kCACxBC,EAAe,kBAAM,kCAKrBC,EAAa,SAASC,GACxB,MAAO,CACH,mBAAoBA,EAAEP,eACtB,mBAAoBO,EAAEL,eACtB,oBAAqBK,EAAEN,gBACvB,oBAAqBM,EAAEH,gBACvB,oBAAqBG,EAAEJ,mB,2CCjB/B,IAAIK,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,mBAAmB,CAACE,MAAM,CAAC,KAAO,IAAI,MAAQ,SAAS,C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件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"3\",\"title\":\"图例设置\"}},[_c('chart-base-switch',{attrs:{\"switchValue\":_vm.legend.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.legend, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.legend, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示图例\")])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.legend.show),expression:\"legend.show\"}]},[_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.legend.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.legend, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.legend, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"图例样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.positionOption,\"selectValue\":_vm.legend.position.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.position, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.position, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例位置\")])]),(_vm.legend.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.position.offsetX,\"unit\":'%',\"content\":'滑动修改水平偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.position, \"offsetX\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.position, \"offsetX\", $event)}}}),_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.position.offsetY,\"unit\":'%',\"content\":'滑动修改垂直偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.position, \"offsetY\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.position, \"offsetY\", $event)}}})],1):_vm._e(),_c('chart-base-select',{attrs:{\"selectOption\":_vm.dirOptions,\"selectValue\":_vm.legend.position.direction},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.position, \"direction\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.position, \"direction\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例朝向\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.sizeOption,\"selectValue\":_vm.legend.width.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.width, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.width, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例宽度\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.sizeOption,\"selectValue\":_vm.legend.height.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.height, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.height, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例高度\")])]),(_vm.legend.width.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.width.cusSize,\"unit\":'px',\"content\":'滑动修改图例宽度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.width, \"cusSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.width, \"cusSize\", $event)}}}):_vm._e(),(_vm.legend.height.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.height.cusSize,\"unit\":'px',\"content\":'滑动修改图例高度'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.height, \"cusSize\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.height, \"cusSize\", $event)}}}):_vm._e(),_c('chart-base-select',{attrs:{\"selectOption\":_vm.distanceOption,\"selectValue\":_vm.legend.distance.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.legend.distance, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.legend.distance, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"图例间距\")])]),(_vm.legend.distance.value == 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.legend.distance.cusGap,\"unit\":'px',\"content\":'滑动修改图例间距'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.legend.distance, \"cusGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.legend.distance, \"cusGap\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"图例样式\")])]):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartLegend.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartLegend.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartLegend.vue?vue&type=template&id=9e7569a0&\"\nimport script from \"./ChartLegend.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartLegend.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.6.js b/src/expendPlugins/chart/chartmix.umd.min.6.js new file mode 100644 index 000000000..1baaa6ead --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.6.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[6],{1540:function(t,e,n){"use strict";n.r(e),n.d(e,"ChartBaseLabel",(function(){return r})),n.d(e,"ChartBaseSwitch",(function(){return s})),n.d(e,"ChartBaseInput",(function(){return l})),n.d(e,"ChartBaseSelect",(function(){return c})),n.d(e,"ChartBaseSlider",(function(){return o})),n.d(e,"ChartBaseBox",(function(){return d})),n.d(e,"importComp",(function(){return p}));n("d3b7"),n("e6cf");var a=n("2f62");n.d(e,"mapActions",(function(){return a["b"]}));var i=n("ca00");n.d(e,"deepCopy",(function(){return i["b"]}));var u=n("2ef0");n.d(e,"isEqual",(function(){return u["isEqual"]}));var r=function(){return n.e(2).then(n.bind(null,"02ce"))},s=function(){return n.e(11).then(n.bind(null,"9e1a"))},l=function(){return n.e(9).then(n.bind(null,"37cd"))},c=function(){return n.e(10).then(n.bind(null,"138b"))},o=function(){return n.e(1).then(n.bind(null,"b57e"))},d=function(){return n.e(8).then(n.bind(null,"3f9f"))},p=function(t){return{"chart-base-label":t.ChartBaseLabel,"chart-base-input":t.ChartBaseInput,"chart-base-switch":t.ChartBaseSwitch,"chart-base-slider":t.ChartBaseSlider,"chart-base-select":t.ChartBaseSelect}}},"969a":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-collapse-item",{attrs:{name:"2"}},[n("template",{slot:"title"},[t._v(" 副标题设置 "),n("i",{staticClass:"iconfont icon-biaoti"})]),n("chart-base-input",{attrs:{inputValue:t.subTitle.text,placeholder:"请输入副标题内容"},on:{"update:inputValue":function(e){return t.$set(t.subTitle,"text",e)},"update:input-value":function(e){return t.$set(t.subTitle,"text",e)}}},[n("div",{attrs:{slot:"input"},slot:"input"},[t._v("副标题内容")])]),n("chart-base-label",{attrs:{router:t.router+"/label",baseLabelOption:t.subTitle.label}},[n("div",{attrs:{slot:"title"},slot:"title"},[t._v("文本样式")])]),n("chart-base-select",{attrs:{selectOption:t.distanceOption,selectValue:t.subTitle.distance.value},on:{"update:selectValue":function(e){return t.$set(t.subTitle.distance,"value",e)},"update:select-value":function(e){return t.$set(t.subTitle.distance,"value",e)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[t._v("主副标题间距")])]),"custom"===t.subTitle.distance.value?n("chart-base-slider",{attrs:{baseSliderOption:t.subTitle.distance.cusGap,unit:"px",content:"滑动修改间距"},on:{"update:baseSliderOption":function(e){return t.$set(t.subTitle.distance,"cusGap",e)},"update:base-slider-option":function(e){return t.$set(t.subTitle.distance,"cusGap",e)}}}):t._e()],2)},i=[],u=n("5530"),r=n("1540"),s=n("b4cc"),l={name:"ChartSubTitle",props:{router:String,chartAllType:String,subTitleOption:Object},components:Object(u["a"])({},r["importComp"](r)),data:function(){return{subTitle:{},distanceOption:r["deepCopy"](s["d"])}},watch:{subTitleOption:{handler:function(t){r["isEqual"](this.subTitle,t)||(this.subTitle=r["deepCopy"](t))},immediate:!0,deep:!0},subTitle:{handler:function(t,e){e&&this.changeTitle()},deep:!0,immediate:!0}},methods:Object(u["a"])(Object(u["a"])({},r["mapActions"]("chartSetting",["updateChartItem"])),{},{changeTitle:function(){var t={updateObj:r["deepCopy"](this.subTitle),router:this.router};this.updateChartItem(t)}})},c=l,o=n("2877"),d=Object(o["a"])(c,a,i,!1,null,null,null);e["default"]=d.exports}}]); +//# sourceMappingURL=chartmix.umd.min.6.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.6.js.map b/src/expendPlugins/chart/chartmix.umd.min.6.js.map new file mode 100644 index 000000000..c1e0eb5f2 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.6.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?5555","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue?bf82","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartSubTitle.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t","render","_vm","this","_h","$createElement","_c","_self","attrs","slot","_v","staticClass","subTitle","text","on","$event","$set","router","label","distanceO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IU,SAASQ,SAAU,QAASL,IAAS,sBAAsB,SAASA,GAAQ,OAAOb,EAAIc,KAAKd,EAAIU,SAASQ,SAAU,QAASL,MAAW,CAACT,EAAG,MAAM,CAACE,MAAM,CAAC,KAAO,UAAUC,KAAK,UAAU,CAACP,EAAIQ,GAAG,cAA+C,WAAhCR,EAAIU,SAASQ,SAASC,MAAoBf,EAAG,oBAAoB,CAACE,MAAM,CAAC,iBAAmBN,EAAIU,SAASQ,SAASE,OAAO,KAAO,KAAK,QAAU,UAAUR,GAAG,CAAC,0BAA0B,SAASC,GAAQ,OAAOb,EAAIc,KAAKd,EAAIU,SAASQ,SAAU,SAAUL,IAAS,4BAA4B,SAASA,GAAQ,OAAOb,EAAIc,KAAKd,EAAIU,SAASQ,SAAU,SAAUL,OAAYb,EAAIqB,MAAM,IAC18CC,EAAkB,G,oCC+BtB,GACE,KAAF,gBACE,MAAF,CACI,OAAJ,OACI,aAAJ,OACI,eAAJ,QAEE,WAAF,kBACA,oBAEE,KAAF,WACI,MAAJ,CACM,SAAN,GACM,eAAN,wBAGE,MAAF,CACI,eAAJ,CACM,QAAN,YAEA,gCAGQ,KAAR,4BAEM,WAAN,EACM,MAAN,GAEI,SAAJ,CACM,QAAN,cAEA,GACU,KAAV,eAGM,MAAN,EACM,WAAN,IAGE,QAAF,iCACA,qDADA,IAEI,YAFJ,WAGM,IAAN,GACQ,UAAR,6BACQ,OAAR,aAEM,KAAN,uBC9EoY,I,YCOhYC,EAAY,eACd,EACAxB,EACAuB,GACA,EACA,KACA,KACA,MAIa,aAAAC,E","file":"chartmix.umd.min.6.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"2\"}},[_c('template',{slot:\"title\"},[_vm._v(\" 副标题设置 \"),_c('i',{staticClass:\"iconfont icon-biaoti\"})]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.subTitle.text,\"placeholder\":'请输入副标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.subTitle, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.subTitle, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"副标题内容\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.subTitle.label}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.distanceOption,\"selectValue\":_vm.subTitle.distance.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.subTitle.distance, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.subTitle.distance, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"主副标题间距\")])]),(_vm.subTitle.distance.value === 'custom')?_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.subTitle.distance.cusGap,\"unit\":'px',\"content\":'滑动修改间距'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.subTitle.distance, \"cusGap\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.subTitle.distance, \"cusGap\", $event)}}}):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSubTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSubTitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartSubTitle.vue?vue&type=template&id=60e525b6&\"\nimport script from \"./ChartSubTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartSubTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.7.js b/src/expendPlugins/chart/chartmix.umd.min.7.js new file mode 100644 index 000000000..4fe9981c3 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.7.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[7],{1540:function(t,e,n){"use strict";n.r(e),n.d(e,"ChartBaseLabel",(function(){return s})),n.d(e,"ChartBaseSwitch",(function(){return l})),n.d(e,"ChartBaseInput",(function(){return o})),n.d(e,"ChartBaseSelect",(function(){return u})),n.d(e,"ChartBaseSlider",(function(){return c})),n.d(e,"ChartBaseBox",(function(){return p})),n.d(e,"importComp",(function(){return d}));n("d3b7"),n("e6cf");var i=n("2f62");n.d(e,"mapActions",(function(){return i["b"]}));var a=n("ca00");n.d(e,"deepCopy",(function(){return a["b"]}));var r=n("2ef0");n.d(e,"isEqual",(function(){return r["isEqual"]}));var s=function(){return n.e(2).then(n.bind(null,"02ce"))},l=function(){return n.e(11).then(n.bind(null,"9e1a"))},o=function(){return n.e(9).then(n.bind(null,"37cd"))},u=function(){return n.e(10).then(n.bind(null,"138b"))},c=function(){return n.e(1).then(n.bind(null,"b57e"))},p=function(){return n.e(8).then(n.bind(null,"3f9f"))},d=function(t){return{"chart-base-label":t.ChartBaseLabel,"chart-base-input":t.ChartBaseInput,"chart-base-switch":t.ChartBaseSwitch,"chart-base-slider":t.ChartBaseSlider,"chart-base-select":t.ChartBaseSelect}}},"450b":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-collapse-item",{attrs:{name:"1"}},[n("template",{slot:"title"},[t._v(" 标题设置 "),n("i",{staticClass:"iconfont icon-biaoti"})]),n("chart-base-switch",{attrs:{switchValue:t.title.show},on:{"update:switchValue":function(e){return t.$set(t.title,"show",e)},"update:switch-value":function(e){return t.$set(t.title,"show",e)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[t._v("显示主标题")])]),n("chart-base-input",{attrs:{inputValue:t.title.text,placeholder:"请输入标题内容"},on:{"update:inputValue":function(e){return t.$set(t.title,"text",e)},"update:input-value":function(e){return t.$set(t.title,"text",e)}}},[n("div",{attrs:{slot:"input"},slot:"input"},[t._v("主标题内容")])]),n("chart-base-label",{attrs:{router:t.router+"/label",baseLabelOption:t.title.label},on:{"update:baseLabelOption":function(e){return t.$set(t.title,"label",e)},"update:base-label-option":function(e){return t.$set(t.title,"label",e)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[t._v("文本样式")])]),n("chart-base-select",{attrs:{selectOption:t.positionData,selectValue:t.title.position.value},on:{"update:selectValue":function(e){return t.$set(t.title.position,"value",e)},"update:select-value":function(e){return t.$set(t.title.position,"value",e)}}},[n("div",{attrs:{slot:"select"},slot:"select"},[t._v("主标题位置")])]),"custom"===t.title.position.value?n("el-row",[n("chart-base-slider",{attrs:{baseSliderOption:t.title.position.offsetX,unit:"%",content:"滑动修改左边距偏移量"},on:{"update:baseSliderOption":function(e){return t.$set(t.title.position,"offsetX",e)},"update:base-slider-option":function(e){return t.$set(t.title.position,"offsetX",e)}}}),n("chart-base-slider",{attrs:{baseSliderOption:t.title.position.offsetY,unit:"%",content:"滑动修改上边距偏移量"},on:{"update:baseSliderOption":function(e){return t.$set(t.title.position,"offsetY",e)},"update:base-slider-option":function(e){return t.$set(t.title.position,"offsetY",e)}}})],1):t._e()],2)},a=[],r=n("5530"),s=n("1540"),l=n("b4cc"),o={name:"ChartTitle",props:{router:String,chartAllType:String,titleOption:Object},components:Object(r["a"])({},s["importComp"](s)),data:function(){return{title:"",positionData:l["m"]}},watch:{titleOption:{handler:function(t,e){s["isEqual"](this.title,t)||(this.title=s["deepCopy"](t))},deep:!0,immediate:!0},title:{handler:function(t,e){e&&this.changeTitle()},deep:!0,immediate:!0}},methods:Object(r["a"])(Object(r["a"])({},s["mapActions"]("chartSetting",["updateChartItem"])),{},{changeTitle:function(){var t={updateObj:s["deepCopy"](this.title),router:this.router};this.updateChartItem(t)}})},u=o,c=n("2877"),p=Object(c["a"])(u,i,a,!1,null,null,null);e["default"]=p.exports}}]); +//# sourceMappingURL=chartmix.umd.min.7.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.7.js.map b/src/expendPlugins/chart/chartmix.umd.min.7.js.map new file mode 100644 index 000000000..47e66a982 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.7.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/utils/importUtil.js","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?a624","webpack://chartmix/src/packages/ChartMix/chartChips/chart/ChartTitle.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue?3ba4","webpack://chartmix/./src/packages/ChartMix/chartChips/chart/ChartTitle.vue"],"names":["ChartBaseLabel","ChartBaseSwitch","ChartBaseInput","ChartBaseSelect","ChartBaseSlider","ChartBaseBox","importComp","t","render","_vm","this","_h","$createElement","_c","_self","attrs","slot","_v","staticClass","title","show","on","$event","$set","text","router","label","positionData","position","value","offsetX","offsetY","_e","staticRenderFns","name","props","String","chartAllType","titleOption","Object","components","data","watch","handler","deep","immediate","changeTitle","methods","updateObj","updateChartItem","component"],"mappings":"itBACA,IAAMA,EAAiB,kBAAM,kCACvBC,EAAkB,kBAAM,mCACxBC,EAAiB,kBAAM,kCACvBC,EAAkB,kBAAM,mCACxBC,EAAkB,kBAAM,kCACxBC,EAAe,kBAAM,kCAKrBC,EAAa,SAASC,GACxB,MAAO,CACH,mBAAoBA,EAAEP,eACtB,mBAAoBO,EAAEL,eACtB,oBAAqBK,EAAEN,gBACvB,oBAAqBM,EAAEH,gBACvB,oBAAqBG,EAAEJ,mB,2CCjB/B,IAAIK,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,mBAAmB,CAACE,MAAM,CAAC,KAAO,MAAM,CAACF,EAAG,WAAW,CAACG,KAAK,SAAS,CAACP,EAAIQ,GAAG,UAAUJ,EA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ACA,KACA,KACA,MAIa,aAAAiB,E","file":"chartmix.umd.min.7.js","sourcesContent":["// 复用的组件和方法\r\nconst ChartBaseLabel = () => import('@/packages/ChartMix/chartChips/base/ChartBaseLabel')\r\nconst ChartBaseSwitch = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSwitch')\r\nconst ChartBaseInput = () => import('@/packages/ChartMix/chartChips/base/ChartBaseInput')\r\nconst ChartBaseSelect = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSelect')\r\nconst ChartBaseSlider = () => import('@/packages/ChartMix/chartChips/base/ChartBaseSlider')\r\nconst ChartBaseBox = () => import('@/packages/ChartMix/chartChips/base/ChartBaseBox')\r\nimport { mapActions } from 'vuex'\r\nimport { deepCopy } from '@/utils/util'\r\nimport { isEqual } from 'lodash'\r\n// 重复引入的组件\r\nconst importComp = function(t){\r\n return {\r\n 'chart-base-label': t.ChartBaseLabel,\r\n 'chart-base-input': t.ChartBaseInput,\r\n 'chart-base-switch': t.ChartBaseSwitch,\r\n 'chart-base-slider': t.ChartBaseSlider,\r\n 'chart-base-select': t.ChartBaseSelect\r\n }\r\n}\r\n\r\nexport {\r\n ChartBaseLabel,\r\n ChartBaseSwitch,\r\n ChartBaseInput,\r\n ChartBaseSelect,\r\n ChartBaseSlider,\r\n ChartBaseBox,\r\n deepCopy,\r\n isEqual,\r\n importComp,\r\n mapActions\r\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-collapse-item',{attrs:{\"name\":\"1\"}},[_c('template',{slot:\"title\"},[_vm._v(\" 标题设置 \"),_c('i',{staticClass:\"iconfont icon-biaoti\"})]),_c('chart-base-switch',{attrs:{\"switchValue\":_vm.title.show},on:{\"update:switchValue\":function($event){return _vm.$set(_vm.title, \"show\", $event)},\"update:switch-value\":function($event){return _vm.$set(_vm.title, \"show\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"显示主标题\")])]),_c('chart-base-input',{attrs:{\"inputValue\":_vm.title.text,\"placeholder\":'请输入标题内容'},on:{\"update:inputValue\":function($event){return _vm.$set(_vm.title, \"text\", $event)},\"update:input-value\":function($event){return _vm.$set(_vm.title, \"text\", $event)}}},[_c('div',{attrs:{\"slot\":\"input\"},slot:\"input\"},[_vm._v(\"主标题内容\")])]),_c('chart-base-label',{attrs:{\"router\":_vm.router + '/label',\"baseLabelOption\":_vm.title.label},on:{\"update:baseLabelOption\":function($event){return _vm.$set(_vm.title, \"label\", $event)},\"update:base-label-option\":function($event){return _vm.$set(_vm.title, \"label\", $event)}}},[_c('div',{attrs:{\"slot\":\"title\"},slot:\"title\"},[_vm._v(\"文本样式\")])]),_c('chart-base-select',{attrs:{\"selectOption\":_vm.positionData,\"selectValue\":_vm.title.position.value},on:{\"update:selectValue\":function($event){return _vm.$set(_vm.title.position, \"value\", $event)},\"update:select-value\":function($event){return _vm.$set(_vm.title.position, \"value\", $event)}}},[_c('div',{attrs:{\"slot\":\"select\"},slot:\"select\"},[_vm._v(\"主标题位置\")])]),(_vm.title.position.value === 'custom')?_c('el-row',[_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.title.position.offsetX,\"unit\":'%',\"content\":'滑动修改左边距偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.title.position, \"offsetX\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.title.position, \"offsetX\", $event)}}}),_c('chart-base-slider',{attrs:{\"baseSliderOption\":_vm.title.position.offsetY,\"unit\":'%',\"content\":'滑动修改上边距偏移量'},on:{\"update:baseSliderOption\":function($event){return _vm.$set(_vm.title.position, \"offsetY\", $event)},\"update:base-slider-option\":function($event){return _vm.$set(_vm.title.position, \"offsetY\", $event)}}})],1):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartTitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartTitle.vue?vue&type=template&id=3cf11da3&\"\nimport script from \"./ChartTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.8.js b/src/expendPlugins/chart/chartmix.umd.min.8.js new file mode 100644 index 000000000..5b879d99c --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.8.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[8],{"3f9f":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-row",[a("el-checkbox-group",{attrs:{size:"mini"},on:{change:e.changeStyle},model:{value:e.boxValue,callback:function(t){e.boxValue=t},expression:"boxValue"}},e._l(e.checkboxOption,(function(t,o){return a("el-tooltip",{key:o,attrs:{"open-delay":500,content:t.des,effect:"dark",placement:"bottom"}},[a("el-checkbox-button",{attrs:{label:o}},[e._v(" "+e._s(t.text)+" ")])],1)})),1)],1)},n=[],l=a("ca00"),c={props:{checkboxOption:[Object,Array],boxData:{type:Array,default:[]}},data:function(){return{boxValue:""}},mounted:function(){this.boxValue=this.boxData?Object(l["b"])(this.boxData):[]},methods:{changeStyle:function(e){this.$emit("update:boxData",e)}}},u=c,s=a("2877"),i=Object(s["a"])(u,o,n,!1,null,null,null);t["default"]=i.exports}}]); +//# sourceMappingURL=chartmix.umd.min.8.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.8.js.map b/src/expendPlugins/chart/chartmix.umd.min.8.js.map new file mode 100644 index 000000000..5441c58da --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.8.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?6065","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseBox.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue?5317","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseBox.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","on","changeStyle","model","value","callback","$$v","boxValue","expression","_l","name","key","des","_v","_s","text","staticRenderFns","component"],"mappings":"wLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACA,EAAG,oBAAoB,CAACE,MAAM,CAAC,KAAO,QAAQC,GAAG,CAAC,OAASP,EAAIQ,aAAaC,MAAM,CAACC,MAAOV,EAAY,SAAEW,SAAS,SAAUC,GAAMZ,EAAIa,SAASD,GAAKE,WAAW,aAAad,EAAIe,GAAIf,EAAkB,gBAAE,SAASU,EAAMM,GAAM,OAAOZ,EAAG,aAAa,CAACa,IAAID,EAAKV,MAAM,CAAC,aAAa,IAAI,QAAUI,EAAMQ,IAAI,OAAS,OAAO,UAAY,WAAW,CAACd,EAAG,qBAAqB,CAACE,MAAM,CAAC,MAAQU,IAAO,CAAChB,EAAImB,GAAG,IAAInB,EAAIoB,GAAGV,EAAMW,MAAM,QAAQ,MAAK,IAAI,IACzhBC,EAAkB,G,YCWtB,GACE,MAAF,CACI,eAAJ,eACI,QAAJ,CACM,KAAN,MACM,QAAN,KAGE,KARF,WASI,MAAJ,CACM,SAAN,KAGE,QAbF,WAcI,KAAJ,uDAEE,QAAF,CACI,YADJ,SACA,GACM,KAAN,6BC9BmY,I,YCO/XC,EAAY,eACd,EACAxB,EACAuB,GACA,EACA,KACA,KACA,MAIa,aAAAC,E","file":"chartmix.umd.min.8.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',[_c('el-checkbox-group',{attrs:{\"size\":\"mini\"},on:{\"change\":_vm.changeStyle},model:{value:(_vm.boxValue),callback:function ($$v) {_vm.boxValue=$$v},expression:\"boxValue\"}},_vm._l((_vm.checkboxOption),function(value,name){return _c('el-tooltip',{key:name,attrs:{\"open-delay\":500,\"content\":value.des,\"effect\":\"dark\",\"placement\":\"bottom\"}},[_c('el-checkbox-button',{attrs:{\"label\":name}},[_vm._v(\" \"+_vm._s(value.text)+\" \")])],1)}),1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseBox.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseBox.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseBox.vue?vue&type=template&id=78fe7fa8&\"\nimport script from \"./ChartBaseBox.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseBox.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.9.js b/src/expendPlugins/chart/chartmix.umd.min.9.js new file mode 100644 index 000000000..bc762881f --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.9.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]=("undefined"!==typeof self?self:this)["webpackJsonpchartmix"]||[]).push([[9],{"37cd":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.hideCol?n("el-input",{attrs:{type:t.type?t.type:"text",placeholder:t.placeholder,size:"mini"},on:{change:t.changeInput},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}}):n("el-row",{staticStyle:{"margin-top":"15px"}},[n("el-col",{staticClass:"title",attrs:{span:8}},[t._t("input")],2),n("el-col",{attrs:{span:16}},[n("el-input",{attrs:{placeholder:t.placeholder,size:"mini","suffix-icon":"el-icon-edit",type:t.type?t.type:"text"},on:{change:t.changeInput},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}})],1)],1)],1)},l=[],p={name:"chart-base-input",props:{placeholder:{type:String,default:""},inputValue:"",hideCol:Boolean,type:String},data:function(){return{input:""}},mounted:function(){this.input=this.inputValue?this.inputValue:""},methods:{changeInput:function(t){this.$emit("update:inputValue",t)}}},a=p,u=n("2877"),s=Object(u["a"])(a,i,l,!1,null,null,null);e["default"]=s.exports}}]); +//# sourceMappingURL=chartmix.umd.min.9.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.9.js.map b/src/expendPlugins/chart/chartmix.umd.min.9.js.map new file mode 100644 index 000000000..f00b26d68 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.9.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?3385","webpack://chartmix/src/packages/ChartMix/chartChips/base/ChartBaseInput.vue","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue?20e7","webpack://chartmix/./src/packages/ChartMix/chartChips/base/ChartBaseInput.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","hideCol","attrs","type","placeholder","on","changeInput","model","value","callback","$$v","input","expression","staticStyle","staticClass","_t","staticRenderFns","name","props","String","default","inputValue","Boolean","data","mounted","methods","$emit","component"],"mappings":"wLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAAGJ,EAAIM,QAAgaF,EAAG,WAAW,CAACG,MAAM,CAAC,KAAOP,EAAIQ,KAAKR,EAAIQ,KAAK,OAAO,YAAcR,EAAIS,YAAY,KAAO,QAAQC,GAAG,CAAC,OAASV,EAAIW,aAAaC,MAAM,CAACC,MAAOb,EAAS,MAAEc,SAAS,SAAUC,GAAMf,EAAIgB,MAAMD,GAAKE,WAAW,WAApmBb,EAAG,SAAS,CAACc,YAAY,CAAC,aAAa,SAAS,CAACd,EAAG,SAAS,CAACe,YAAY,QAAQZ,MAAM,CAAC,KAAO,IAAI,CAACP,EAAIoB,GAAG,UAAU,GAAGhB,EAAG,SAAS,CAACG,MAAM,CAAC,KAAO,KAAK,CAACH,EAAG,WAAW,CAACG,MAAM,CAAC,YAAcP,EAAIS,YAAY,KAAO,OAAO,cAAc,eAAe,KAAOT,EAAIQ,KAAKR,EAAIQ,KAAK,QAAQE,GAAG,CAAC,OAASV,EAAIW,aAAaC,MAAM,CAACC,MAAOb,EAAS,MAAEc,SAAS,SAAUC,GAAMf,EAAIgB,MAAMD,GAAKE,WAAW,YAAY,IAAI,IAA4N,IACruBI,EAAkB,GCoBtB,GACEC,KAAM,mBACNC,MAAO,CACLd,YAAa,CACXD,KAAMgB,OACNC,QAAS,IAEXC,WAAY,GACZpB,QAASqB,QACTnB,KAAMgB,QAERI,KAXF,WAYI,MAAO,CACLZ,MAAO,KAGXa,QAhBF,WAiBI5B,KAAKe,MAAQf,KAAKyB,WAAazB,KAAKyB,WAAa,IAEnDI,QAAS,CACPnB,YADJ,SACA,GACMV,KAAK8B,MAAM,oBAAjB,MC1CqY,I,YCOjYC,EAAY,eACd,EACAjC,EACAsB,GACA,EACA,KACA,KACA,MAIa,aAAAW,E","file":"chartmix.umd.min.9.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.hideCol)?_c('el-row',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-col',{staticClass:\"title\",attrs:{\"span\":8}},[_vm._t(\"input\")],2),_c('el-col',{attrs:{\"span\":16}},[_c('el-input',{attrs:{\"placeholder\":_vm.placeholder,\"size\":\"mini\",\"suffix-icon\":\"el-icon-edit\",\"type\":_vm.type?_vm.type:'text'},on:{\"change\":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:\"input\"}})],1)],1):_c('el-input',{attrs:{\"type\":_vm.type?_vm.type:'text',\"placeholder\":_vm.placeholder,\"size\":\"mini\"},on:{\"change\":_vm.changeInput},model:{value:(_vm.input),callback:function ($$v) {_vm.input=$$v},expression:\"input\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseInput.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartBaseInput.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartBaseInput.vue?vue&type=template&id=0f2b52c7&\"\nimport script from \"./ChartBaseInput.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartBaseInput.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.js b/src/expendPlugins/chart/chartmix.umd.min.js new file mode 100644 index 000000000..b9ad86739 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.js @@ -0,0 +1,16 @@ +(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["chartmix"]=e(require("vue")):t["chartmix"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){function e(e){for(var n,i,a=e[0],o=e[1],s=0,l=[];s=n)e|=1&t,t>>=1;return t+e}function a(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){while(r=0)r++;return r-e}function o(t,e,n){n--;while(e>>1,r(o,t[a])<0?l=a:s=a+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:while(u>0)t[s+u]=t[s+u-1],u--}t[s]=o}}function l(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){s=i-r;while(l0)o=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{s=r+1;while(ls&&(l=s);var u=o;o=r-l,l=r-u}o++;while(o>>1);a(t,e[n+c])>0?o=c+1:l=c}return l}function u(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){s=r+1;while(ls&&(l=s);var u=o;o=r-l,l=r-u}else{s=i-r;while(l=0)o=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}o++;while(o>>1);a(t,e[n+c])<0?l=c:o=c+1}return l}function c(t,e){var n,r,a=i,o=0,s=0;o=t.length;var c=[];function h(t,e){n[s]=t,r[s]=e,s+=1}function d(){while(s>1){var t=s-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;p(t)}}function f(){while(s>1){var t=s-2;t>0&&r[t-1]=i||v>=i);if(m)break;y<0&&(y=0),y+=2}if(a=y,a<1&&(a=1),1===r){for(h=0;h=0;h--)t[v+h]=t[g+h];if(0===r){_=!0;break}}if(t[p--]=c[f--],1===--s){_=!0;break}if(x=s-l(t[d],c,0,s,s-1,e),0!==x){for(p-=x,f-=x,s-=x,v=p+1,g=f+1,h=0;h=i||x>=i);if(_)break;m<0&&(m=0),m+=2}if(a=m,a<1&&(a=1),1===s){for(p-=r,d-=r,v=p+1,g=d+1,h=r-1;h>=0;h--)t[v+h]=t[g+h];t[p]=c[f]}else{if(0===s)throw new Error;for(g=p-(s-1),h=0;h=0;h--)t[v+h]=t[g+h];t[p]=c[f]}else for(g=p-(s-1),h=0;hd&&(f=d),s(t,i,i+f,i+u,e),u=f}h.pushRun(i,u),h.mergeRuns(),l-=u,i+=u}while(0!==l);h.forceMergeRuns()}}t.exports=h},"057f":function(t,e,n){var i=n("fc6a"),r=n("241c").f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(e){return o.slice()}};t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?s(t):r(i(t))}},"0655":function(t,e,n){var i=n("8728"),r=1e-8;function a(t,e){return Math.abs(t-e).5?e:t}function d(t,e,n,i,r){var a=t.length;if(1===r)for(var o=0;or;if(a)t.length=r;else for(var o=i;o=0;n--)if(C[n]<=e)break;n=Math.min(n,b-2)}else{for(n=H;ne)break;n=Math.min(n-1,b-2)}H=n,W=e;var i=C[n+1]-C[n];if(0!==i)if(z=(e-C[n])/i,_)if(V=D[n],B=D[0===n?n:n-1],G=D[n>b-2?b-1:n+1],F=D[n>b-3?b-1:n+2],M)g(B,V,G,F,z,z*z,z*z*z,u(t,s),T);else{if(A)r=g(B,V,G,F,z,z*z,z*z*z,j,1),r=y(j);else{if(I)return h(V,G,z);r=v(B,V,G,F,z,z*z,z*z*z)}m(t,s,r)}else if(M)d(D[n],D[n+1],z,u(t,s),T);else{var r;if(A)d(D[n],D[n+1],z,j,1),r=y(j);else{if(I)return h(D[n],D[n+1],z);r=c(D[n],D[n+1],z)}m(t,s,r)}},Z=new i({target:t._target,life:w,loop:t._loop,delay:t._delay,onframe:U,ondestroy:n});return e&&"spline"!==e&&(Z.easing=e),Z}}}var b=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||l,this._setter=i||u,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};b.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:m(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;te&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,n=e.data.getItemModel(this.dataIndex),i=this.getLevelModel();return i?n.getModel(t,i.getModel(t)):n.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){var e=t.parentNode;while(e){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},u.prototype={constructor:u,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=r.clone(t)},getValueState:function(t){var e=o.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),(function(e,n){var r=o.findPieceIndex(e,this._pieceList);r===t&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],n=[],i=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return r.each(a,(function(t){var e=t.interval;e&&(e[0]>s&&l([s,e[0]],"outOfRange"),l(e.slice()),s=e[1])}),this),{stops:e,outerColors:n}}function l(r,a){var o=i.getRepresentValue({interval:r});a||(a=i.getValueState(o));var s=t(o,a);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}}}),h={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;var o=(i[1]-i[0])/a;while(+o.toFixed(n)!==o&&n<5)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,i[0]],close:[0,0]});for(var s=0,l=i[0];s","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function d(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var f=c;t.exports=f},"07d7":function(t,e,n){var i=n("6d8b"),r=n("41ef"),a=n("607d"),o=n("65ed"),s=n("22d1"),l=n("eda2"),u=i.each,c=l.toCamelCase,h=["","-webkit-","-moz-","-o-"],d="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function f(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return i.map(h,(function(t){return t+"transition:"+n})).join(";")}function p(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),u(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}function g(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),a=t.getModel("textStyle"),o=t.get("padding");return n&&e.push(f(n)),i&&(s.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+r.toHex(i)),e.push("filter:alpha(opacity=70)"))),u(["width","color","radius"],(function(n){var i="border-"+n,r=c(i),a=t.get(r);null!=a&&e.push(i+":"+a+("color"===n?"":"px"))})),e.push(p(a)),null!=o&&e.push("padding:"+l.normalizeCssArray(o).join("px ")+"px"),e.join(";")+";"}function v(t,e,n,i,r){var a=e&&e.painter;if(n){var s=a&&a.getViewportRoot();s&&o.transformLocalCoord(t,s,document.body,i,r)}else{t[0]=i,t[1]=r;var l=a&&a.getViewportRootOffset();l&&(t[0]+=l.offsetLeft,t[1]+=l.offsetTop)}}function m(t,e,n){if(s.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],v(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var l=this;i.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!l._enterable){var e=r.handler,n=r.painter.getViewportRoot();a.normalizeEvent(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}}m.prototype={constructor:m,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,n=this._styleCoord;e.style.cssText=d+g(t)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n=this._styleCoord;v(n,this._zr,this._appendToBody,t,e);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(i.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}};var y=m;t.exports=y},"07e6":function(t,e,n){n("4d85"),n("a753")},"0817":function(t,e,n){var i=n("3eba");n("f306"),n("0046"),n("60d7");var r=n("ab71");i.registerVisual(r)},"085d":function(t,e,n){var i=n("3eba");n("bd92"),n("19e2");var r=n("eabf"),a=n("4c99"),o=n("09b1");i.registerPreprocessor(r),i.registerVisual(a),i.registerLayout(o)},"08c3":function(t,e,n){var i=n("6d8b"),r=n("84ce"),a=function(t,e,n,i){r.call(this,t,e,n),this.type=i||"value",this.model=null};a.prototype={constructor:a,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},i.inherits(a,r);var o=a;t.exports=o},"09b1":function(t,e,n){var i=n("2306"),r=i.subPixelOptimize,a=n("cccd"),o=n("3842"),s=o.parsePercent,l=n("6d8b"),u=l.retrieve2,c="undefined"!==typeof Float32Array?Float32Array:Array,h={seriesType:"candlestick",plan:a(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=f(t,n),a=0,o=1,s=["x","y"],l=n.mapDimension(s[a]),u=n.mapDimension(s[o],!0),h=u[0],p=u[1],g=u[2],v=u[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==l||u.length<4))return{progress:t.pipelineContext.large?y:m};function m(t,n){var s;while(null!=(s=t.next())){var u=n.get(l,s),c=n.get(h,s),f=n.get(p,s),m=n.get(g,s),y=n.get(v,s),x=Math.min(c,f),_=Math.max(c,f),b=I(x,u),w=I(_,u),S=I(m,u),M=I(y,u),A=[];T(A,w,0),T(A,b,1),A.push(D(M),D(w),D(S),D(b)),n.setItemLayout(s,{sign:d(n,s,c,f,p),initBaseline:c>f?w[o]:b[o],ends:A,brushRect:C(m,y,u)})}function I(t,n){var i=[];return i[a]=n,i[o]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function T(t,e,n){var o=e.slice(),s=e.slice();o[a]=r(o[a]+i/2,1,!1),s[a]=r(s[a]-i/2,1,!0),n?t.push(o,s):t.push(s,o)}function C(t,e,n){var r=I(t,n),s=I(e,n);return r[a]-=i/2,s[a]-=i/2,{x:r[0],y:r[1],width:o?i:s[0]-r[0],height:o?s[1]-r[1]:i}}function D(t){return t[a]=r(t[a],1),t}}function y(t,n){var i,r,s=new c(4*t.count),u=0,f=[],m=[];while(null!=(r=t.next())){var y=n.get(l,r),x=n.get(h,r),_=n.get(p,r),b=n.get(g,r),w=n.get(v,r);isNaN(y)||isNaN(b)||isNaN(w)?(s[u++]=NaN,u+=3):(s[u++]=d(n,r,x,_,p),f[a]=y,f[o]=b,i=e.dataToPoint(f,null,m),s[u++]=i?i[0]:NaN,s[u++]=i?i[1]:NaN,f[o]=w,i=e.dataToPoint(f,null,m),s[u++]=i?i[1]:NaN)}n.setLayout("largePoints",s)}}};function d(t,e,n,i,r){var a;return a=n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1,a}function f(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=s(u(t.get("barMaxWidth"),r),r),o=s(u(t.get("barMinWidth"),1),r),l=t.get("barWidth");return null!=l?s(l,r):Math.max(Math.min(r/2,a),o)}t.exports=h},"0a6d":function(t,e,n){n("e4d1"),n("7f72")},"0b44":function(t,e,n){var i=n("607d"),r=function(){this._track=[]};function a(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function o(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}r.prototype={constructor:r,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var r=t.touches;if(r){for(var a={points:[],touches:[],target:e,event:t},o=0,s=r.length;o1&&i&&i.length>1){var s=a(i)/a(r);!isFinite(s)&&(s=1),e.pinchScale=s;var l=o(i);return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}},l=r;t.exports=l},"0b4b":function(t,e,n){n("d28f"),n("f14c"),n("0ee7"),n("ebf9")},"0c12":function(t,e){function n(){}function i(t,e,n,i){for(var r=0,a=e.length,o=0,s=0;r=o&&h+1>=s){for(var d=[],f=0;f=o&&f+1>=s)return i(a,u.components,e,t);c[n]=u}else c[n]=void 0}l++}while(l<=u){var g=p();if(g)return g}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){var r=e.length,a=n.length,o=t.newPos,s=o-i,l=0;while(o+1=0)&&(E=t);var R=new l.Text({position:D(e.center.slice()),scale:[1/v.scale[0],1/v.scale[1]],z2:10,silent:!0});if(l.setLabelStyle(R.style,R.hoverStyle={},x,_,{labelFetcher:E,labelDataIndex:N,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!y){var z=[1/c[0],1/c[1]];l.updateProps(R,{scale:z},t)}n.add(R)}if(s)s.setItemGraphicEl(a,n);else{u=t.getRegionModel(e.name);r.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:u&&u.option||{}}}var B=n.__regions||(n.__regions=[]);B.push(e),n.highDownSilentOnTouch=!!t.get("selectedMode"),l.setHoverStyle(n,m),h.add(n)})),this._updateController(t,e,n),p(this,t,h,n,r),g(t,h)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&u.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&i.each(u.makeGraphic(e,this.uid),(function(t){this._backgroundGroup.add(t)}),this),this._mapName=e},_updateController:function(t,e,n){var r=t.coordinateSystem,o=this._controller,l=this._controllerHost;l.zoomLimit=t.get("scaleLimit"),l.zoom=r.getZoom(),o.enable(t.get("roam")||!1);var u=t.mainType;function c(){var e={type:"geoRoam",componentType:u};return e[u+"Id"]=t.id,e}o.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,a.updateViewOnPan(l,t.dx,t.dy),n.dispatchAction(i.extend(c(),{dx:t.dx,dy:t.dy}))}),this),o.off("zoom").on("zoom",(function(t){if(this._mouseDownFlag=!1,a.updateViewOnZoom(l,t.scale,t.originX,t.originY),n.dispatchAction(i.extend(c(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse((function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))}}),this),o.setPointerChecker((function(e,i,a){return r.getViewRectAfterRoam().contain(i,a)&&!s(e,n,t)}))}};var m=v;t.exports=m},"0cde":function(t,e,n){var i=n("1687"),r=n("401b"),a=i.identity,o=5e-5;function s(t){return t>o||t<-o}var l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},u=l.prototype;u.transform=null,u.needLocalTransform=function(){return s(this.rotation)||s(this.position[0])||s(this.position[1])||s(this.scale[0]-1)||s(this.scale[1]-1)};var c=[];u.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),r=this.transform;if(n||e){r=r||i.create(),n?this.getLocalTransform(r):a(r),e&&(n?i.mul(r,t.transform,r):i.copy(r,t.transform)),this.transform=r;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(c);var s=c[0]<0?-1:1,l=c[1]<0?-1:1,u=((c[0]-s)*o+s)/c[0]||0,h=((c[1]-l)*o+l)/c[1]||0;r[0]*=u,r[1]*=u,r[2]*=h,r[3]*=h}this.invTransform=this.invTransform||i.create(),i.invert(this.invTransform,r)}else r&&a(r)},u.getLocalTransform=function(t){return l.getLocalTransform(this,t)},u.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},u.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var h=[],d=i.create();u.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;s(e-1)&&(e=Math.sqrt(e)),s(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},u.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(h,t.invTransform,e),e=h);var n=this.origin;n&&(n[0]||n[1])&&(d[4]=n[0],d[5]=n[1],i.mul(h,e,d),h[4]-=n[0],h[5]-=n[1],e=h),this.setLocalTransform(e)}},u.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},u.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.applyTransform(n,n,i),n},u.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.applyTransform(n,n,i),n},l.getLocalTransform=function(t,e){e=e||[],a(e);var n=t.origin,r=t.scale||[1,1],o=t.rotation||0,s=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),i.scale(e,e,r),o&&i.rotate(e,e,o),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=s[0],e[5]+=s[1],e};var f=l;t.exports=f},"0cfb":function(t,e,n){var i=n("83ab"),r=n("d039"),a=n("cc12");t.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"0da8":function(t,e,n){var i=n("19eb"),r=n("9850"),a=n("6d8b"),o=n("5e76");function s(t){i.call(this,t)}s.prototype={constructor:s,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=o.createOrUpdateImage(i,this._image,this,this.onload);if(r&&o.isImageReady(r)){var a=n.x||0,s=n.y||0,l=n.width,u=n.height,c=r.width/r.height;if(null==l&&null!=u?l=u*c:null==u&&null!=l?u=l/c:null==l&&null==u&&(l=r.width,u=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var h=n.sx||0,d=n.sy||0;t.drawImage(r,h,d,n.sWidth,n.sHeight,a,s,l,u)}else if(n.sx&&n.sy){h=n.sx,d=n.sy;var f=l-h,p=u-d;t.drawImage(r,h,d,f,p,a,s,l,u)}else t.drawImage(r,a,s,l,u);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new r(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},a.inherits(s,i);var l=s;t.exports=l},"0e0f":function(t,e,n){var i=n("5f14"),r=n("6d8b");function a(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph(),n=e.nodes;if(n.length){var a=1/0,o=-1/0;r.each(n,(function(t){var e=t.getLayout().value;eo&&(o=e)})),r.each(n,(function(e){var n=new i({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),r=n.mapValueToVisual(e.getLayout().value),s=e.getModel().get("itemStyle.color");null!=s?e.setVisual("color",s):e.setVisual("color",r)}))}}))}t.exports=a},"0ee7":function(t,e,n){var i=n("6d8b"),r=n("2306"),a=n("f934"),o=n("5e97"),s=r.Group,l=["width","height"],u=["x","y"],c=o.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){c.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new s),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new s),this._showController},resetInner:function(){c.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,n,a,o,s,l){var u=this;c.superCall(this,"renderInner",t,e,n,a,o,s,l);var h=this._controllerGroup,d=e.get("pageIconSize",!0);i.isArray(d)||(d=[d,d]),p("pagePrev",0);var f=e.getModel("pageTextStyle");function p(t,n){var o=t+"DataIndex",s=r.createIcon(e.get("pageIcons",!0)[e.getOrient().name][n],{onclick:i.bind(u._pageGo,u,o,e,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});s.name=t,h.add(s)}h.add(new r.Text({name:"pageText",style:{textFill:f.getTextColor(),font:f.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),p("pageNext",1)},layoutInner:function(t,e,n,r,o,s){var c=this.getSelectorGroup(),h=t.getOrient().index,d=l[h],f=u[h],p=l[1-h],g=u[1-h];o&&a.box("horizontal",c,t.get("selectorItemGap",!0));var v=t.get("selectorButtonGap",!0),m=c.getBoundingRect(),y=[-m.x,-m.y],x=i.clone(n);o&&(x[d]=n[d]-m[d]-v);var _=this._layoutContentAndController(t,r,x,h,d,p,g);if(o){if("end"===s)y[h]+=_[d]+v;else{var b=m[d]+v;y[h]-=b,_[f]-=b}_[d]+=m[d]+v,y[1-h]+=_[g]+_[p]/2-m[p]/2,_[p]=Math.max(_[p],m[p]),_[g]=Math.min(_[g],m[g]+y[1-h]),c.attr("position",y)}return _},_layoutContentAndController:function(t,e,n,o,s,l,u){var c=this.getContentGroup(),h=this._containerGroup,d=this._controllerGroup;a.box(t.get("orient"),c,t.get("itemGap"),o?n.width:null,o?null:n.height),a.box("horizontal",d,t.get("pageButtonItemGap",!0));var f=c.getBoundingRect(),p=d.getBoundingRect(),g=this._showController=f[s]>n[s],v=[-f.x,-f.y];e||(v[o]=c.position[o]);var m=[0,0],y=[-p.x,-p.y],x=i.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var _=t.get("pageButtonPosition",!0);"end"===_?y[o]+=n[s]-p[s]:m[o]+=p[s]+x}y[1-o]+=f[l]/2-p[l]/2,c.attr("position",v),h.attr("position",m),d.attr("position",y);var b={x:0,y:0};if(b[s]=g?n[s]:f[s],b[l]=Math.max(f[l],p[l]),b[u]=Math.min(0,p[u]+y[1-o]),h.__rectSize=n[s],g){var w={x:0,y:0};w[s]=Math.max(n[s]-p[s]-x,0),w[l]=b[l],h.setClipPath(new r.Rect({shape:w})),h.__rectSize=w[s]}else d.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(t);return null!=S.pageIndex&&r.updateProps(c,{position:S.contentPosition},!!g&&t),this._updatePageInfoView(t,S),b},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;i.each(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")}));var r=n.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,s=null!=o?o+1:0,l=e.pageCount;r&&a&&r.setStyle("text",i.isString(a)?a.replace("{current}",s).replace("{total}",l):a({current:s,total:l}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,a=l[r],o=u[r],s=this._findTargetItemIndex(e),c=n.children(),h=c[s],d=c.length,f=d?1:0,p={contentPosition:n.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=_(h);p.contentPosition[r]=-g.s;for(var v=s+1,m=g,y=g,x=null;v<=d;++v)x=_(c[v]),(!x&&y.e>m.s+i||x&&!b(x,m.s))&&(m=y.i>m.i?y:x,m&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=x;for(v=s-1,m=g,y=g,x=null;v>=-1;--v)x=_(c[v]),x&&b(y,x.s)||!(m.i=e&&t.s<=e+i}},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,n,i=this.getContentGroup();return i.eachChild((function(i,r){var a=i.__legendDataIndex;null==n&&null!=a&&(n=r),a===t&&(e=r)})),null!=e?e:n}}),h=c;t.exports=h},"0f55":function(t,e,n){var i=n("6d8b"),r=n("84ce"),a=function(t,e,n,i,a){r.call(this,t,e,n),this.type=i||"value",this.axisIndex=a};a.prototype={constructor:a,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},i.inherits(a,r);var o=a;t.exports=o},"0f99":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("e0d3")),a=r.makeInner,o=r.getDataItemValue,s=n("6d8b"),l=s.createHashMap,u=s.each,c=s.map,h=s.isArray,d=s.isString,f=s.isObject,p=s.isTypedArray,g=s.isArrayLike,v=s.extend,m=(s.assert,n("ec6f")),y=n("93d0"),x=y.SOURCE_FORMAT_ORIGINAL,_=y.SOURCE_FORMAT_ARRAY_ROWS,b=y.SOURCE_FORMAT_OBJECT_ROWS,w=y.SOURCE_FORMAT_KEYED_COLUMNS,S=y.SOURCE_FORMAT_UNKNOWN,M=y.SOURCE_FORMAT_TYPED_ARRAY,A=y.SERIES_LAYOUT_BY_ROW,I={Must:1,Might:2,Not:3},T=a();function C(t){var e=t.option.source,n=S;if(p(e))n=M;else if(h(e)){0===e.length&&(n=_);for(var i=0,r=e.length;i0&&(s=this.getLineLength(i)/u*1e3),s!==this._period||l!==this._loop){i.stopAnimation();var d=c;h&&(d=c(n)),i.__t>0&&(d=-s*i.__t),i.__t=0;var f=i.animate("",l).when(s,{__t:1}).delay(d).during((function(){r.updateSymbolPosition(i)}));l||f.done((function(){r.remove(i)})),f.start()}this._period=s,this._loop=l}},h.getLineLength=function(t){return l.dist(t.__p1,t.__cp1)+l.dist(t.__cp1,t.__p2)},h.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},h.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},h.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,a=t.position,o=[a[0],a[1]],s=u.quadraticAt,c=u.quadraticDerivativeAt;a[0]=s(e[0],i[0],n[0],r),a[1]=s(e[1],i[1],n[1],r);var h=c(e[0],i[0],n[0],r),d=c(e[1],i[1],n[1],r);if(t.rotation=-Math.atan2(d,h)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastTe[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&w(e)}};function w(t){return new a(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}e.layoutCovers=p},1111:function(t,e,n){var i=n("3eba");n("67a8"),n("4784");var r=n("7f96"),a=n("87c3");i.registerVisual(r("effectScatter","circle")),i.registerLayout(a("effectScatter"))},1148:function(t,e,n){"use strict";var i=n("a691"),r=n("1d80");t.exports="".repeat||function(t){var e=String(r(this)),n="",a=i(t);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},1276:function(t,e,n){"use strict";var i=n("d784"),r=n("44e7"),a=n("825a"),o=n("1d80"),s=n("4840"),l=n("8aa5"),u=n("50c4"),c=n("14c3"),h=n("9263"),d=n("d039"),f=[].push,p=Math.min,g=4294967295,v=!d((function(){return!RegExp(g,"y")}));i("split",2,(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(o(this)),a=void 0===n?g:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!r(t))return e.call(i,t,a);var s,l,u,c=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,v=new RegExp(t.source,d+"g");while(s=h.call(v,i)){if(l=v.lastIndex,l>p&&(c.push(i.slice(p,s.index)),s.length>1&&s.index=a))break;v.lastIndex===s.index&&v.lastIndex++}return p===i.length?!u&&v.test("")||c.push(""):c.push(i.slice(p)),c.length>a?c.slice(0,a):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var r=o(this),a=void 0==e?void 0:e[t];return void 0!==a?a.call(e,r,n):i.call(String(r),e,n)},function(t,r){var o=n(i,t,this,r,i!==e);if(o.done)return o.value;var h=a(t),d=String(this),f=s(h,RegExp),m=h.unicode,y=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(v?"y":"g"),x=new f(v?h:"^(?:"+h.source+")",y),_=void 0===r?g:r>>>0;if(0===_)return[];if(0===d.length)return null===c(x,d)?[d]:[];var b=0,w=0,S=[];while(w0&&!g.min?g.min=0:null!=g.min&&g.min<0&&!g.max&&(g.max=0);var v=c;if(null!=g.color&&(v=r.defaults({color:g.color},c)),g=r.merge(r.clone(g),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:a,axisType:l,axisLabel:u,name:g.text,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:p},!1),h||(g.name=""),"string"===typeof d){var m=g.name;g.name=d.replace("{value}",null!=m?m:"")}else"function"===typeof d&&(g.name=d(g.name,g));var y=r.extend(new o(g,null,this.ecModel),s);return y.mainType="radar",y.componentIndex=this.componentIndex,y}),this);this.getIndicatorModels=function(){return g}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:r.merge({lineStyle:{color:"#bbb"}},l.axisLine),axisLabel:u(l.axisLabel,!1),axisTick:u(l.axisTick,!1),axisType:"interval",splitLine:u(l.splitLine,!0),splitArea:u(l.splitArea,!0),indicator:[]}}),h=c;t.exports=h},1792:function(t,e){var n={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};function i(t,e){if("china"===t){var i=n[e.name];if(i){var r=e.center;r[0]+=i[0]/10.5,r[1]+=-i[1]/14}}}t.exports=i},"17b8":function(t,e,n){var i=n("3014"),r=i.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},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}}});t.exports=r},"17c2":function(t,e,n){"use strict";var i=n("b727").forEach,r=n("a640"),a=n("ae40"),o=r("forEach"),s=a("forEach");t.exports=o&&s?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},"17d6":function(t,e,n){var i=n("6d8b"),r=n("22d1"),a=n("e0d3"),o=a.makeInner,s=o(),l=i.each;function u(t,e,n){if(!r.node){var i=e.getZr();s(i).records||(s(i).records={}),c(i,e);var a=s(i).records[t]||(s(i).records[t]={});a.handler=n}}function c(t,e){function n(n,i){t.on(n,(function(n){var r=p(e);l(s(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),h(r.pendings,e)}))}s(t).initialized||(s(t).initialized=!0,n("click",i.curry(f,"click")),n("mousemove",i.curry(f,"mousemove")),n("globalout",d))}function h(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function d(t,e,n){t.handler("leave",null,n)}function f(t,e,n,i){e.handler(t,n,i)}function p(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function g(t,e){if(!r.node){var n=e.getZr(),i=(s(n).records||{})[t];i&&(s(n).records[t]=null)}}e.register=u,e.unregister=g},"18c0":function(t,e,n){var i=n("6d8b"),r=n("e0d8"),a=n("8e43"),o=r.prototype,s=r.extend({type:"ordinal",init:function(t,e){t&&!i.isArray(t)||(t=new a({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"===typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),o.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return o.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(o.scale.call(this,t))},getTicks:function(){var t=[],e=this._extent,n=e[0];while(n<=e[1])t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:i.noop,niceExtent:i.noop});s.create=function(){return new s};var l=s;t.exports=l},1953:function(t,e,n){var i=n("2449"),r=i.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],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.exports=r},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"19e2":function(t,e,n){var i=n("6d8b"),r=n("e887"),a=n("2306"),o=n("cbe5"),s=n("b0af"),l=s.createClipPath,u=["itemStyle"],c=["emphasis","itemStyle"],h=["color","color0","borderColor","borderColor0"],d=r.extend({type:"candlestick",render:function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),s=t.coordinateSystem,l=s.getArea&&s.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var s,u=e.getItemLayout(n);if(o&&g(l,u))return;s=p(u,n,!0),a.initProps(s,{shape:{points:u.ends}},t,n),v(s,e,n,r),i.add(s),e.setItemGraphicEl(n,s)}})).update((function(s,u){var c=n.getItemGraphicEl(u);if(e.hasValue(s)){var h=e.getItemLayout(s);o&&g(l,h)?i.remove(c):(c?a.updateProps(c,{shape:{points:h.ends}},t,s):c=p(h,s),v(c,e,s,r),i.add(c),e.setItemGraphicEl(s,c))}else i.remove(c)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},_renderLarge:function(t){this._clear(),x(t,this.group);var e=t.get("clip",!0)?l(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){var n,i=e.getData(),r=i.getLayout("isSimpleBox");while(null!=(n=t.next())){var a,o=i.getItemLayout(n);a=p(o,n),v(a,i,n,r),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){x(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:i.noop}),f=o.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))}});function p(t,e,n){var i=t.ends;return new f({shape:{points:n?m(i,t):i},z2:100})}function g(t,e){for(var n=!0,i=0;i0?"P":"N",a=i.getVisual("borderColor"+r)||i.getVisual("color"+r),o=n.getModel(u).getItemStyle(h);e.useStyle(o),e.style.fill=null,e.style.stroke=a}var b=d;t.exports=b},"19eb":function(t,e,n){var i=n("6d8b"),r=n("2b61"),a=n("d5b7"),o=n("9e2e");function s(t){for(var e in t=t||{},a.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new r(t.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return i.contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?a.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new r(t,this),this.dirty(!1),this},calculateTextPosition:null},i.inherits(s,a),i.mixin(s,o);var l=s;t.exports=l},"1ab3":function(t,e,n){var i=n("6d8b"),r=n("2306"),a=n("e887");function o(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),l=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each((function(t){s(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),l,n)}))}function s(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=n?i:0,u=[o*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function l(t,e){r.Group.call(this);var n=new r.Sector({z2:2}),i=new r.Polyline,a=new r.Text;this.add(n),this.add(i),this.add(a),this.updateData(t,e,!0)}var u=l.prototype;u.updateData=function(t,e,n){var a=this.childAt(0),o=this.childAt(1),l=this.childAt(2),u=t.hostModel,c=t.getItemModel(e),h=t.getItemLayout(e),d=i.extend({},h);d.label=null;var f=u.getShallow("animationTypeUpdate");if(n){a.setShape(d);var p=u.getShallow("animationType");"scale"===p?(a.shape.r=h.r0,r.initProps(a,{shape:{r:h.r}},u,e)):(a.shape.endAngle=h.startAngle,r.updateProps(a,{shape:{endAngle:h.endAngle}},u,e))}else"expansion"===f?a.setShape(d):r.updateProps(a,{shape:d},u,e);var g=t.getItemVisual(e,"color");a.useStyle(i.defaults({lineJoin:"bevel",fill:g},c.getModel("itemStyle").getItemStyle())),a.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle();var v=c.getShallow("cursor");v&&a.attr("cursor",v),s(this,t.getItemLayout(e),u.isSelected(t.getName(e)),u.get("selectedOffset"),u.get("animation"));var m=!n&&"transition"===f;this._updateLabel(t,e,m),this.highDownOnUpdate=u.get("silent")?null:function(t,e){var n=u.isAnimationEnabled()&&c.get("hoverAnimation");"emphasis"===e?(o.ignore=o.hoverIgnore,l.ignore=l.hoverIgnore,n&&(a.stopAnimation(!0),a.animateTo({shape:{r:h.r+u.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,l.ignore=l.normalIgnore,n&&(a.stopAnimation(!0),a.animateTo({shape:{r:h.r}},300,"elasticOut")))},r.setHoverStyle(this)},u._updateLabel=function(t,e,n){var i=this.childAt(1),a=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=l.label,c=t.getItemVisual(e,"color");if(!u||isNaN(u.x)||isNaN(u.y))a.ignore=a.normalIgnore=a.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var h={points:u.linePoints||[[u.x,u.y],[u.x,u.y],[u.x,u.y]]},d={x:u.x,y:u.y};n?(r.updateProps(i,{shape:h},o,e),r.updateProps(a,{style:d},o,e)):(i.attr({shape:h}),a.attr({style:d})),a.attr({rotation:u.rotation,origin:[u.x,u.y],z2:10});var f=s.getModel("label"),p=s.getModel("emphasis.label"),g=s.getModel("labelLine"),v=s.getModel("emphasis.labelLine");c=t.getItemVisual(e,"color");r.setLabelStyle(a.style,a.hoverStyle={},f,p,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:u.text,autoColor:c,useInsideStyle:!!u.inside},{textAlign:u.textAlign,textVerticalAlign:u.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),a.ignore=a.normalIgnore=!f.get("show"),a.hoverIgnore=!p.get("show"),i.ignore=i.normalIgnore=!g.get("show"),i.hoverIgnore=!v.get("show"),i.setStyle({stroke:c,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(g.getModel("lineStyle").getLineStyle()),i.hoverStyle=v.getModel("lineStyle").getLineStyle();var m=g.get("smooth");m&&!0===m&&(m=.4),i.setShape({smooth:m})}},i.inherits(l,r.Group);var c=a.extend({type:"pie",init:function(){var t=new r.Group;this._sectorGroup=t},render:function(t,e,n,r){if(!r||r.from!==this.uid){var a=t.getData(),s=this._data,u=this.group,c=e.get("animation"),h=!s,d=t.get("animationType"),f=t.get("animationTypeUpdate"),p=i.curry(o,this.uid,t,c,n),g=t.get("selectedMode");if(a.diff(s).add((function(t){var e=new l(a,t);h&&"scale"!==d&&e.eachChild((function(t){t.stopAnimation(!0)})),g&&e.on("click",p),a.setItemGraphicEl(t,e),u.add(e)})).update((function(t,e){var n=s.getItemGraphicEl(e);h||"transition"===f||n.eachChild((function(t){t.stopAnimation(!0)})),n.updateData(a,t),n.off("click"),g&&n.on("click",p),u.add(n),a.setItemGraphicEl(t,n)})).remove((function(t){var e=s.getItemGraphicEl(t);u.remove(e)})).execute(),c&&a.count()>0&&(h?"scale"!==d:"transition"!==f)){for(var v=a.getItemLayout(0),m=1;isNaN(v.startAngle)&&m=i.r0}}}),h=c;t.exports=h},"1be4":function(t,e,n){var i=n("d066");t.exports=i("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c5f":function(t,e,n){var i=n("401b");function r(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),a(n)}}function a(t){t.eachEdge((function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=i.clone(t.node1.getLayout()),r=i.clone(t.node2.getLayout()),a=[n,r];+e&&a.push([(n[0]+r[0])/2-(n[1]-r[1])*e,(n[1]+r[1])/2-(r[0]-n[0])*e]),t.setLayout(a)}))}e.simpleLayout=r,e.simpleLayoutEdge=a},"1c7e":function(t,e,n){var i=n("b622"),r=i("iterator"),a=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){a=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(l){}t.exports=function(t,e){if(!e&&!a)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(l){}return n}},"1ccf":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=n("fd27"),o=n("3842"),s=o.parsePercent,l=n("697e"),u=l.createScaleByModel,c=l.niceScaleExtent,h=n("2039"),d=n("ee1a"),f=d.getStackedDimension;function p(t,e,n){var i=e.get("center"),a=n.getWidth(),o=n.getHeight();t.cx=s(i[0],a),t.cy=s(i[1],o);var l=t.getRadiusAxis(),u=Math.min(a,o)/2,c=e.get("radius");null==c?c=[0,"100%"]:r.isArray(c)||(c=[0,c]),c=[s(c[0],u),s(c[1],u)],l.inverse?l.setExtent(c[1],c[0]):l.setExtent(c[0],c[1])}function g(t,e){var n=this,i=n.getAngleAxis(),a=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();r.each(e.mapDimension("radius",!0),(function(t){a.scale.unionExtentFromData(e,f(e,t))})),r.each(e.mapDimension("angle",!0),(function(t){i.scale.unionExtentFromData(e,f(e,t))}))}})),c(i.scale,i.model),c(a.scale,a.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),s=360/i.scale.count();i.inverse?o[1]+=s:o[1]-=s,i.setExtent(o[0],o[1])}}function v(t,e){if(t.type=e.get("type"),t.scale=u(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}n("78f0");var m={dimensions:a.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new a(i);r.update=g;var o=r.getRadiusAxis(),s=r.getAngleAxis(),l=t.findAxisModel("radiusAxis"),u=t.findAxisModel("angleAxis");v(o,l),v(s,u),p(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var n=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=n.coordinateSystem}})),n}};h.register("polar",m)},"1cdc":function(t,e,n){var i=n("342f");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var i=n("d039"),r=n("b622"),a=n("2d00"),o=r("species");t.exports=function(t){return a>=51||!i((function(){var e=[],n=e.constructor={};return n[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"1e32":function(t,e,n){var i=n("6d8b"),r=n("3842"),a=r.parsePercent,o=n("ee1a"),s=o.isDimensionStacked;function l(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function u(t,e){return e.dim+t.model.componentIndex}function c(t,e,n){var r={},a=h(i.filter(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));e.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=u(n,i),c=l(t),h=a[o][c],d=h.offset,f=h.width,p=n.getOtherAxis(i),g=t.coordinateSystem.cx,v=t.coordinateSystem.cy,m=t.get("barMinHeight")||0,y=t.get("barMinAngle")||0;r[c]=r[c]||[];for(var x=e.mapDimension(p.dim),_=e.mapDimension(i.dim),b=s(e,x),w="radius"!==i.dim||!t.get("roundCap",!0),S=p.getExtent()[0],M=0,A=e.count();M=0?"p":"n",O=S;if(b&&(r[c][P]||(r[c][P]={p:S,n:S}),O=r[c][P][k]),"radius"===p.dim){var E=p.dataToRadius(L)-S,N=i.dataToAngle(P);Math.abs(E)=r/3?1:2),l=e.y-i(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(o)*a,e.y+i(o)*a),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(o)*a,e.y-i(o)*a),t.lineTo(s,l)}});t.exports=r},"1f1a":function(t,e,n){var i=n("6d8b"),r=n("e0d3"),a=n("6cb7"),o=n("4319"),s=n("7023"),l=n("eeea"),u=a.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){a.prototype.init.apply(this,arguments),r.defaultEmphasis(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=l.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=i.reduce(t.regions||[],(function(t,n){return n.name&&t.set(n.name,new o(n,e)),t}),i.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,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",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new o(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t),i=n.get("label"+("normal"===e?".":e+".")+"formatter"),r={name:t};return"function"===typeof i?(r.status=e,i(r)):"string"===typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});i.mixin(u,s);var c=u;t.exports=c},"1fab":function(t,e){var n=Array.prototype.slice,i=function(t){this._$handlers={},this._$eventProcessor=t};function r(t,e){var n=t._$eventProcessor;return null!=e&&n&&n.normalizeQuery&&(e=n.normalizeQuery(e)),e}function a(t,e,n,i,a,o){var s=t._$handlers;if("function"===typeof n&&(a=i,i=n,n=null),!i||!e)return t;n=r(t,n),s[e]||(s[e]=[]);for(var l=0;l3&&(r=n.call(r,1));for(var o=e.length,s=0;s4&&(r=n.call(r,1,r.length-1));for(var o=r[r.length-1],s=e.length,l=0;lthis._ux||x(e-this._yi)>this._uy||this._len<5;return this.addData(u.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(u.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(u.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(u.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=v(r)*n+t,this._yi=m(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(u.R,t,e,n,i),this},closePath:function(){this.addData(u.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;n0&&f<=t||c<0&&f>=t||0===c&&(h>0&&v<=e||h<0&&v>=e))i=this._dashIdx,n=o[i],f+=c*n,v+=h*n,this._dashIdx=(i+1)%m,c>0&&fl||h>0&&vu||s[i%2?"moveTo":"lineTo"](c>=0?p(f,t):g(f,t),h>=0?p(v,e):g(v,e));c=f-t,h=v-e,this._dashOffset=-y(c*c+h*h)},_dashedBezierTo:function(t,e,n,r,a,o){var s,l,u,c,h,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,m=this._yi,x=i.cubicAt,_=0,b=this._dashIdx,w=p.length,S=0;for(f<0&&(f=d+f),f%=d,s=0;s<1;s+=.1)l=x(v,t,n,a,s+.1)-x(v,t,n,a,s),u=x(m,e,r,o,s+.1)-x(m,e,r,o,s),_+=y(l*l+u*u);for(;bf)break;s=(S-f)/_;while(s<=1)c=x(v,t,n,a,s),h=x(m,e,r,o,s),b%2?g.moveTo(c,h):g.lineTo(c,h),s+=p[b]/_,b=(b+1)%w;b%2!==0&&g.lineTo(a,o),l=a-c,u=o-h,this._dashOffset=-y(l*l+u*u)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,_&&(this.data=new Float32Array(t)))},getBoundingRect:function(){c[0]=c[1]=d[0]=d[1]=Number.MAX_VALUE,h[0]=h[1]=f[0]=f[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,s=0,l=0;ll||x(o-r)>c||d===h-1)&&(t.lineTo(a,o),i=a,r=o);break;case u.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),i=s[d-2],r=s[d-1];break;case u.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),i=s[d-2],r=s[d-1];break;case u.A:var p=s[d++],g=s[d++],y=s[d++],_=s[d++],b=s[d++],w=s[d++],S=s[d++],M=s[d++],A=y>_?y:_,I=y>_?1:y/_,T=y>_?_/y:1,C=Math.abs(y-_)>.001,D=b+w;C?(t.translate(p,g),t.rotate(S),t.scale(I,T),t.arc(0,0,A,b,D,1-M),t.scale(1/I,1/T),t.rotate(-S),t.translate(-p,-g)):t.arc(p,g,A,b,D,1-M),1===d&&(e=v(b)*y+p,n=m(b)*_+g),i=v(D)*y+p,r=m(D)*_+g;break;case u.R:e=i=s[d],n=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case u.Z:t.closePath(),i=e,r=n}}}},b.CMD=u;var w=b;t.exports=w},2145:function(t,e){var n={};function i(t,e){n[t]=e}function r(t){return n[t]}e.register=i,e.get=r},2163:function(t,e,n){var i=n("4f85"),r=n("06c7"),a=n("eda2"),o=a.encodeHTML,s=n("4319"),l=i.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new s(n,this,this.ecModel),a=r.createTree(e,this,{},o);function o(t){t.wrapMethod("getItemModel",(function(t,e){var n=a.getNodeByDataIndex(e);return n.children.length&&n.isExpand||(t.parentModel=i),t}))}var l=0;a.eachNode("preorder",(function(t){t.depth>l&&(l=t.depth)}));var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=c})),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),r=i.getValue(),a=i.name;while(i&&i!==n)a=i.parentNode.name+"."+a,i=i.parentNode;return o(a+(isNaN(r)||null==r?"":" : "+r))},defaultOption:{zlevel:0,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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});t.exports=l},"216a":function(t,e,n){var i=n("6d8b"),r=n("3842"),a=n("eda2"),o=n("944e"),s=n("89e3"),l=s.prototype,u=Math.ceil,c=Math.floor,h=1e3,d=60*h,f=60*d,p=24*f,g=function(t,e,n,i){while(n>>1;t[r][1]n&&(s=n);var l=m.length,h=g(m,s,0,l),d=m[Math.min(h,l-1)],f=d[1];if("year"===d[0]){var p=a/f,v=r.nice(p/t,!0);f*=v}var y=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,x=[Math.round(u((i[0]-y)/f)*f+y),Math.round(c((i[1]-y)/f)*f+y)];o.fixExtent(x,i),this._stepLvl=d,this._interval=f,this._niceExtent=x},parse:function(t){return+r.parseDate(t)}});i.each(["contain","normalize"],(function(t){v.prototype[t]=function(e){return l[t].call(this,this.parse(e))}}));var m=[["hh:mm:ss",h],["hh:mm:ss",5*h],["hh:mm:ss",10*h],["hh:mm:ss",15*h],["hh:mm:ss",30*h],["hh:mm\nMM-dd",d],["hh:mm\nMM-dd",5*d],["hh:mm\nMM-dd",10*d],["hh:mm\nMM-dd",15*d],["hh:mm\nMM-dd",30*d],["hh:mm\nMM-dd",f],["hh:mm\nMM-dd",2*f],["hh:mm\nMM-dd",6*f],["hh:mm\nMM-dd",12*f],["MM-dd\nyyyy",p],["MM-dd\nyyyy",2*p],["MM-dd\nyyyy",3*p],["MM-dd\nyyyy",4*p],["MM-dd\nyyyy",5*p],["MM-dd\nyyyy",6*p],["week",7*p],["MM-dd\nyyyy",10*p],["week",14*p],["week",21*p],["month",31*p],["week",42*p],["month",62*p],["week",70*p],["quarter",95*p],["month",31*p*4],["month",31*p*5],["half-year",380*p/2],["month",31*p*8],["month",31*p*10],["year",380*p]];v.create=function(t){return new v({useUTC:t.ecModel.get("useUTC")})};var y=v;t.exports=y},"217b":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("3301")),a=n("4f85"),o=a.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return r(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},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}});t.exports=o},"217c":function(t,e,n){var i=n("6d8b"),r=n("6cb7");n("df3a");var a=r.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&i.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},setAxisExpand:function(t){i.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=i.filter(this.dependentModels.parallelAxis,(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);i.each(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))}});t.exports=a},2266:function(t,e,n){var i=n("825a"),r=n("e95a"),a=n("50c4"),o=n("0366"),s=n("35a1"),l=n("9bdd"),u=function(t,e){this.stopped=t,this.result=e},c=t.exports=function(t,e,n,c,h){var d,f,p,g,v,m,y,x=o(e,n,c?2:1);if(h)d=t;else{if(f=s(t),"function"!=typeof f)throw TypeError("Target is not iterable");if(r(f)){for(p=0,g=a(t.length);g>p;p++)if(v=c?x(i(y=t[p])[0],y[1]):x(t[p]),v&&v instanceof u)return v;return new u(!1)}d=f.call(t)}m=d.next;while(!(y=m.call(d)).done)if(v=l(d,x,y.value,c),"object"==typeof v&&v&&v instanceof u)return v;return new u(!1)};c.stop=function(t){return new u(!0,t)}},"22d1":function(t,e){var n={};n="object"===typeof wx&&"function"===typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"===typeof document&&"undefined"!==typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"===typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:r(navigator.userAgent);var i=n;function r(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),a&&(n.edge=!0,n.version=a[1]),o&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!==typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!==typeof document}}t.exports=i},"22da":function(t,e,n){var i=n("f934");function r(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};var e,n,i=[t];while(e=i.pop())if(n=e.children,e.isExpand&&n.length)for(var r=n.length,a=r-1;a>=0;a--){var o=n[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(o)}}function a(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,r=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){c(t);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=h(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function o(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function s(t){return arguments.length?t:v}function l(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function u(t,e){return i.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function c(t){var e=t.children,n=e.length,i=0,r=0;while(--n>=0){var a=e[n];a.hierNode.prelim+=i,a.hierNode.modifier+=i,r+=a.hierNode.change,i+=a.hierNode.shift+r}}function h(t,e,n,i){if(e){var r=t,a=t,o=a.parentNode.children[0],s=e,l=r.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;while(s=d(s),a=f(a),s&&a){r=d(r),o=f(o),r.hierNode.ancestor=t;var v=s.hierNode.prelim+h-a.hierNode.prelim-u+i(s,a);v>0&&(g(p(s,t,n),t,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=r.hierNode.modifier,c+=o.hierNode.modifier}s&&!d(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=h-l),a&&!f(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,n=t)}return n}function d(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function f(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function p(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function g(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function v(t,e){return t.parentNode===e.parentNode?1:2}e.init=r,e.firstWalk=a,e.secondWalk=o,e.separation=s,e.radialCoordinate=l,e.getViewRect=u},2306:function(t,e,n){var i=n("6d8b"),r=n("342d"),a=n("41ef"),o=n("1687"),s=n("401b"),l=n("cbe5"),u=n("0cde"),c=n("0da8");e.Image=c;var h=n("e1fc");e.Group=h;var d=n("76a5");e.Text=d;var f=n("d9fc");e.Circle=f;var p=n("4aa2");e.Sector=p;var g=n("4573");e.Ring=g;var v=n("87b1");e.Polygon=v;var m=n("d498");e.Polyline=m;var y=n("c7a2");e.Rect=y;var x=n("cb11");e.Line=x;var _=n("ac0f");e.BezierCurve=_;var b=n("8d32");e.Arc=b;var w=n("d4c6");e.CompoundPath=w;var S=n("48a9");e.LinearGradient=S;var M=n("dded");e.RadialGradient=M;var A=n("9850");e.BoundingRect=A;var I=n("392f");e.IncrementalDisplayable=I;var T=n("9cf9"),C=Math.max,D=Math.min,L={},P=1,k={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},O="emphasis",E="normal",N=1,R={},z={};function B(t){return l.extend(t)}function V(t,e){return r.extendFromString(t,e)}function G(t,e){z[t]=e}function F(t){if(z.hasOwnProperty(t))return z[t]}function H(t,e,n,i){var a=r.createFromString(t,e);return n&&("center"===i&&(n=j(n,a.getBoundingRect())),Z(a,n)),a}function W(t,e,n){var i=new c({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(j(e,r))}}});return i}function j(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-r/2,y:o-n/2,width:r,height:n}}var U=r.mergePath;function Z(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function Y(t){return T.subPixelOptimizeLine(t.shape,t.shape,t.style),t}function X(t){return T.subPixelOptimizeRect(t.shape,t.shape,t.style),t}var q=T.subPixelOptimize;function $(t){return null!=t&&"none"!==t}var K=i.createHashMap(),J=0;function Q(t){if("string"!==typeof t)return t;var e=K.get(t);return e||(e=a.lift(t,-.1),J<1e4&&(K.set(t,e),J++)),e}function tt(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}function et(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.__zr,i=t.useHoverLayer&&n&&"canvas"===n.painter.type;if(t.__highlighted=i?"layer":"plain",!(t.isGroup||!n&&t.useHoverLayer)){var r=t,a=t.style;i&&(r=n.addHover(t),a=r.style),Mt(a),i||tt(r),a.extendFrom(e),nt(a,e,"fill"),nt(a,e,"stroke"),St(a),i||(t.dirty(!1),t.z2+=P)}}}function nt(t,e,n){!$(e[n])&&$(t[n])&&(t[n]=Q(t[n]))}function it(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var n=t.style,i=t.__cachedNormalStl;i&&(Mt(n),t.setStyle(i),St(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===P&&(t.z2=r)}}function rt(t,e,n){var i,r=E,a=E;t.__highlighted&&(r=O,i=!0),e(t,n),t.__highlighted&&(a=O,i=!0),t.isGroup&&t.traverse((function(t){!t.isGroup&&e(t,n)})),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function at(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,it(t),et(t))}function ot(t){!ct(this,t)&&!this.__highByOuter&&rt(this,et)}function st(t){!ct(this,t)&&!this.__highByOuter&&rt(this,it)}function lt(t){this.__highByOuter|=1<<(t||0),rt(this,et)}function ut(t){!(this.__highByOuter&=~(1<<(t||0)))&&rt(this,it)}function ct(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function ht(t,e){dt(t,!0),rt(t,at,e)}function dt(t,e){var n=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!n||t.__highDownDispatcher){var i=n?"off":"on";t[i]("mouseover",ot)[i]("mouseout",st),t[i]("emphasis",lt)[i]("normal",ut),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function ft(t){return!(!t||!t.__highDownDispatcher)}function pt(t){var e=R[t];return null==e&&N<=32&&(e=R[t]=N++),e}function gt(t,e,n,r,a,o,s){a=a||L;var l,u=a.labelFetcher,c=a.labelDataIndex,h=a.labelDimIndex,d=a.labelProp,f=n.getShallow("show"),p=r.getShallow("show");(f||p)&&(u&&(l=u.getFormattedLabel(c,"normal",null,h,d)),null==l&&(l=i.isFunction(a.defaultText)?a.defaultText(c,a):a.defaultText));var g=f?l:null,v=p?i.retrieve2(u?u.getFormattedLabel(c,"emphasis",null,h,d):null,l):null;null==g&&null==v||(mt(t,n,o,a),mt(e,r,s,a,!0)),t.text=g,e.text=v}function vt(t,e,n){var r=t.style;e&&(Mt(r),t.setStyle(e),St(r)),r=t.__hoverStl,n&&r&&(Mt(r),i.extend(r,n),St(r))}function mt(t,e,n,r,a){return xt(t,e,r,a),n&&i.extend(t,n),t}function yt(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,xt(t,e,r,i)}function xt(t,e,n,r){if(n=n||L,n.isRectText){var a;n.getTextPosition?a=n.getTextPosition(e,r):(a=e.getShallow("position")||(r?null:"inside"),"outside"===a&&(a="top")),t.textPosition=a,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=i.retrieve2(e.getShallow("distance"),r?null:5)}var s,l=e.ecModel,u=l&&l.option.textStyle,c=_t(e);if(c)for(var h in s={},c)if(c.hasOwnProperty(h)){var d=e.getModel(["rich",h]);bt(s[h]={},d,u,n,r)}return t.rich=s,bt(t,e,u,n,r,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function _t(t){var e;while(t&&t!==t.ecModel){var n=(t.option||L).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}function bt(t,e,n,r,a,o){n=!a&&n||L,t.textFill=wt(e.getShallow("color"),r)||n.color,t.textStroke=wt(e.getShallow("textBorderColor"),r)||n.textBorderColor,t.textStrokeWidth=i.retrieve2(e.getShallow("textBorderWidth"),n.textBorderWidth),a||(o&&(t.insideRollbackOpt=r,St(t)),null==t.textFill&&(t.textFill=r.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&r.disableBox||(t.textBackgroundColor=wt(e.getShallow("backgroundColor"),r),t.textPadding=e.getShallow("padding"),t.textBorderColor=wt(e.getShallow("borderColor"),r),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function wt(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function St(t){var e,n=t.textPosition,i=t.insideRollbackOpt;if(i&&null==t.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||a&&n&&"string"===typeof n&&n.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function Mt(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function At(t,e){var n=e&&e.getModel("textStyle");return i.trim([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function It(t,e,n,i,r,a){"function"===typeof r&&(a=r,r=null);var o=i&&i.isAnimationEnabled();if(o){var s=t?"Update":"",l=i.getShallow("animationDuration"+s),u=i.getShallow("animationEasing"+s),c=i.getShallow("animationDelay"+s);"function"===typeof c&&(c=c(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"===typeof l&&(l=l(r)),l>0?e.animateTo(n,l,c||0,u,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function Tt(t,e,n,i,r){It(!0,t,e,n,i,r)}function Ct(t,e,n,i,r){It(!1,t,e,n,i,r)}function Dt(t,e){var n=o.identity([]);while(t&&t!==e)o.mul(n,t.getLocalTransform(),n),t=t.parent;return n}function Lt(t,e,n){return e&&!i.isArrayLike(e)&&(e=u.getLocalTransform(e)),n&&(e=o.invert([],e)),s.applyTransform([],t,e)}function Pt(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Lt(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function kt(t,e,n,r){if(t&&e){var a=o(t);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=l(t);t.attr(l(e)),Tt(t,i,n,t.dataIndex)}}}))}function o(t){var e={};return t.traverse((function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)})),e}function l(t){var e={position:s.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=i.extend({},t.shape)),e}}function Ot(t,e){return i.map(t,(function(t){var n=t[0];n=C(n,e.x),n=D(n,e.x+e.width);var i=t[1];return i=C(i,e.y),i=D(i,e.y+e.height),[n,i]}))}function Et(t,e){var n=C(t.x,e.x),i=D(t.x+t.width,e.x+e.width),r=C(t.y,e.y),a=D(t.y+t.height,e.y+e.height);if(i>=n&&a>=r)return{x:n,y:r,width:i-n,height:a-r}}function Nt(t,e,n){e=i.extend({rectHover:!0},e);var r=e.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),i.defaults(r,n),new c(e)):H(t.replace("path://",""),e,n,"center")}function Rt(t,e,n,i,r){for(var a=0,o=r[r.length-1];a1)return!1;var v=Bt(f,p,c,h)/d;return!(v<0||v>1)}function Bt(t,e,n,i){return t*i-n*e}function Vt(t){return t<=1e-6&&t>=-1e-6}G("circle",f),G("sector",p),G("ring",g),G("polygon",v),G("polyline",m),G("rect",y),G("line",x),G("bezierCurve",_),G("arc",b),e.Z2_EMPHASIS_LIFT=P,e.CACHED_LABEL_STYLE_PROPERTIES=k,e.extendShape=B,e.extendPath=V,e.registerShape=G,e.getShapeClass=F,e.makePath=H,e.makeImage=W,e.mergePath=U,e.resizePath=Z,e.subPixelOptimizeLine=Y,e.subPixelOptimizeRect=X,e.subPixelOptimize=q,e.setElementHoverStyle=at,e.setHoverStyle=ht,e.setAsHighDownDispatcher=dt,e.isHighDownDispatcher=ft,e.getHighlightDigit=pt,e.setLabelStyle=gt,e.modifyLabelStyle=vt,e.setTextStyle=mt,e.setText=yt,e.getFont=At,e.updateProps=Tt,e.initProps=Ct,e.getTransform=Dt,e.applyTransform=Lt,e.transformDirection=Pt,e.groupTransition=kt,e.clipPointsByRect=Ot,e.clipRectByRect=Et,e.createIcon=Nt,e.linePolygonIntersect=Rt,e.lineLineIntersect=zt},2325:function(t,e,n){var i=n("6d8b"),r=n("607d"),a=n("2306"),o=n("88b3"),s=n("7dcf"),l=n("3842"),u=n("f934"),c=n("ef6a"),h=a.Rect,d=l.linearMap,f=l.asc,p=i.bind,g=i.each,v=7,m=1,y=30,x="horizontal",_="vertical",b=5,w=["line","bar","candlestick","scatter"],S=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){S.superApply(this,"render",arguments),o.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){S.superApply(this,"remove",arguments),o.clear(this,"_dispatchZoomAction")},dispose:function(){S.superApply(this,"dispose",arguments),o.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},a=this._orient===x?{right:r.width-n.x-n.width,top:r.height-y-v,width:n.width,height:y}:{right:v,top:n.y,width:y,height:n.height},o=u.getLayoutParams(t.option);i.each(["right","top","width","height"],(function(t){"ph"===o[t]&&(o[t]=a[t])}));var s=u.getLayoutRect(o,r,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===_&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n!==x||r?n===x&&r?{scale:o?[-1,1]:[-1,-1]}:n!==_||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new h({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new h({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:i.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,n=t.series,r=n.getRawData(),o=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=o){var s=r.getDataExtent(o),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var u,c=[0,e[1]],h=[0,e[0]],f=[[e[0],0],[0,0]],p=[],g=h[1]/(r.count()-1),v=0,m=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(m>0&&e%m)v+=g;else{var n=null==t||isNaN(t)||""===t,i=n?0:d(t,s,c,!0);n&&!u&&e?(f.push([f[f.length-1][0],0]),p.push([p[p.length-1][0],0])):!n&&u&&(f.push([v,0]),p.push([v,0])),f.push([v,i]),p.push([v,i]),v+=g,u=n}}));var y=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:f},style:i.defaults({fill:y.get("dataBackgroundColor")},y.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new a.Polyline({shape:{points:p},style:y.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,r=this.ecModel;return t.eachTargetAxis((function(a,o){var s=t.getAxisProxy(a.name,o).getTargetSeriesModels();i.each(s,(function(t){if(!n&&!(!0!==e&&i.indexOf(w,t.get("type"))<0)){var s,l=r.getComponent(a.axis,o).axis,u=M(a.name),c=t.coordinateSystem;null!=u&&c.getOtherAxis&&(s=c.getOtherAxis(l).inverse),u=t.getData().mapDimension(u),n={thisAxis:l,series:t,thisDim:a.name,otherDim:u,otherAxisInverse:s}}}),this)}),this),n}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],n=t.handleLabels=[],i=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;i.add(t.filler=new h({draggable:!0,cursor:A(this._orient),drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),i.add(new h({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:m,fill:"rgba(0,0,0,0)"}})),g([0,1],(function(t){var r=a.createIcon(o.get("handleIcon"),{cursor:A(this._orient),draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),s=r.getBoundingRect();this._handleHeight=l.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=s.width/s.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var u=o.get("handleColor");null!=u&&(r.style.fill=u),i.add(e[t]=r);var c=o.textStyleModel;this.group.add(n[t]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:c.getTextColor(),textFont:c.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[d(t[0],[0,100],e,!0),d(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];c(e,i,r,n.get("zoomLock")?"all":t,null!=a.minSpan?d(a.minSpan,o,r,!0):null,null!=a.maxSpan?d(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=f([d(i[0],r,o,!0),d(i[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,n=this._handleEnds,i=f(n.slice()),r=this._size;g([0,1],(function(t){var i=e.handles[t],a=this._handleHeight;i.attr({scale:[a/2,a/2],position:[n[t],r[1]/2-a/2]})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,n=this._displayables,i=n.handleLabels,r=this._orient,o=["",""];if(e.get("showDetail")){var s=e.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,c=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();o=[this._formatLabel(c[0],l),this._formatLabel(c[1],l)]}}var h=f(this._handleEnds.slice());function d(t){var e=a.getTransform(n.handles[t].parent,this.group),s=a.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+b,u=a.applyTransform([h[t]+(0===t?-l:l),this._size[1]/2],e);i[t].setStyle({x:u[0],y:u[1],textVerticalAlign:r===x?"middle":s,textAlign:r===x?s:"center",text:o[t]})}d.call(this,0),d.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,r=n.get("labelFormatter"),a=n.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return i.isFunction(r)?r(t,o):i.isString(r)?r.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n,i){this._dragging=!0,r.stop(i.event);var o=this._displayables.barGroup.getLocalTransform(),s=a.applyTransform([e,n],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,n=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,a=this._updateInterval("all",n[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(g(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}})),!t){var e=this.api.getWidth(),n=this.api.getHeight();t={x:.2*e,y:.2*n,width:.6*e,height:.6*n}}return t}});function M(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function A(t){return"vertical"===t?"ns-resize":"ew-resize"}var I=S;t.exports=I},"237f":function(t,e,n){var i=n("6d8b"),r=n("6179"),a=n("7368"),o=n("31d9"),s=n("b1d4"),l=n("2039"),u=n("3301");function c(t,e,n,c,h){for(var d=new a(c),f=0;f "+x)),v++)}var _,b=n.get("coordinateSystem");if("cartesian2d"===b||"polar"===b)_=u(t,n);else{var w=l.get(b),S=w&&"view"!==w.type&&w.dimensions||[];i.indexOf(S,"value")<0&&S.concat(["value"]);var M=s(t,{coordDimensions:S});_=new r(M,n),_.initData(t)}var A=new r(["value"],n);return A.initData(g,p),h&&h(_,A),o({mainData:_,struct:d,structAttr:"graph",datas:{node:_,edge:A},datasAttr:{node:"data",edge:"edgeData"}}),d.update(),d}t.exports=c},"23cb":function(t,e,n){var i=n("a691"),r=Math.max,a=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):a(n,e)}},"23e0":function(t,e,n){var i=n("6d8b"),r=n("7887"),a=n("89e3"),o=n("3842"),s=n("697e"),l=s.getScaleExtent,u=s.niceScaleExtent,c=n("2039"),h=n("8c2a");function d(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=i.map(t.getIndicatorModels(),(function(t,e){var n="indicator_"+e,i=new r(n,"log"===t.get("axisType")?new h:new a);return i.name=t.get("name"),i.model=t,t.axis=i,this.dimensions.push(n),i}),this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}d.prototype.getIndicatorAxes=function(){return this._indicatorAxes},d.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},d.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e],i=n.angle,r=this.cx+t*Math.cos(i),a=this.cy-t*Math.sin(i);return[r,a]},d.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var r,a=Math.atan2(-n,e),o=1/0,s=-1,l=0;ln[0]&&isFinite(g)&&isFinite(n[0]))}else{var f=r.getTicks().length-1;f>a&&(d=s(d));var p=Math.ceil(n[1]/d)*d,g=o.round(p-d*a);r.setExtent(g,p),r.setInterval(d)}}))},d.dimensions=[],d.create=function(t,e){var n=[];return t.eachComponent("radar",(function(i){var r=new d(i,t,e);n.push(r),i.coordinateSystem=r})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("radarIndex")||0])})),n},c.register("radar",d);var f=d;t.exports=f},"23e7":function(t,e,n){var i=n("da84"),r=n("06cf").f,a=n("9112"),o=n("6eeb"),s=n("ce4e"),l=n("e893"),u=n("94ca");t.exports=function(t,e){var n,c,h,d,f,p,g=t.target,v=t.global,m=t.stat;if(c=v?i:m?i[g]||s(g,{}):(i[g]||{}).prototype,c)for(h in e){if(f=e[h],t.noTargetGet?(p=r(c,h),d=p&&p.value):d=c[h],n=u(v?h:g+(m?".":"#")+h,t.forced),!n&&void 0!==d){if(typeof f===typeof d)continue;l(f,d)}(t.sham||d&&d.sham)&&a(f,"sham",!0),o(c,h,f,t)}}},"23ee":function(t,e,n){var i=n("3eba");n("879e"),n("9704"),n("d747");var r=n("675a"),a=n("7f96"),o=n("2943"),s=n("de6e"),l=n("d357"),u=n("adda"),c=n("5866"),h=n("7b0c");i.registerProcessor(r),i.registerVisual(a("graph","circle",null)),i.registerVisual(o),i.registerVisual(s),i.registerLayout(l),i.registerLayout(i.PRIORITY.VISUAL.POST_CHART_LAYOUT,u),i.registerLayout(c),i.registerCoordinateSystem("graphView",{create:h})},"241c":function(t,e,n){var i=n("ca84"),r=n("7839"),a=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,a)}},2449:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("6d8b"),o=n("22d1"),s=n("e0d3"),l=n("eda2"),u=n("38a2"),c=l.addCommas,h=l.encodeHTML;function d(t){s.defaultEmphasis(t,"label",["show"])}var f=r.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},isAnimationEnabled:function(){if(o.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,n,i){var r=this.constructor,o=this.mainType+"Model";n||e.eachSeries((function(t){var n=t.get(this.mainType,!0),s=t[o];n&&n.data?(s?s._mergeOption(n,e,!0):(i&&d(n),a.each(n.data,(function(t){t instanceof Array?(d(t[0]),d(t[1])):d(t)})),s=new r(n,this,e),a.extend(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[o]=s):t[o]=null}),this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=a.isArray(n)?a.map(n,c).join(", "):c(n),r=e.getName(t),o=h(this.name);return(null!=n||r)&&(o+="
"),r&&(o+=h(r),null!=n&&(o+=" : ")),null!=n&&(o+=h(i)),o},getData:function(){return this._data},setData:function(t){this._data=t}});a.mixin(f,u);var p=f;t.exports=p},"24b9":function(t,e,n){var i=n("f934"),r=n("3842"),a=r.parsePercent,o=r.linearMap;function s(t,e){return i.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function l(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],a="ascending"===e,o=0,s=t.count();o=0||r&&i.indexOf(r,s)<0)){var l=e.getShallow(s);null!=l&&(a[t[o][0]]=l)}}return a}}t.exports=r},2877:function(t,e,n){"use strict";function i(t,e,n,i,r,a,o,s){var l,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),o?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:u}}n.d(e,"a",(function(){return i}))},"292e":function(t,e,n){var i=n("3842"),r=i.parsePercent,a=i.linearMap,o=n("f934"),s=n("bb70"),l=n("6d8b"),u=2*Math.PI,c=Math.PI/180;function h(t,e){return o.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function d(t,e,n,i){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),o=h(t,n),d=t.get("center"),f=t.get("radius");l.isArray(f)||(f=[0,f]),l.isArray(d)||(d=[d,d]);var p=r(o.width,n.getWidth()),g=r(o.height,n.getHeight()),v=Math.min(p,g),m=r(d[0],p)+o.x,y=r(d[1],g)+o.y,x=r(f[0],v/2),_=r(f[1],v/2),b=-t.get("startAngle")*c,w=t.get("minAngle")*c,S=0;e.each(i,(function(t){!isNaN(t)&&S++}));var M=e.getSum(i),A=Math.PI/(M||S)*2,I=t.get("clockwise"),T=t.get("roseType"),C=t.get("stillShowZeroSum"),D=e.getDataExtent(i);D[0]=0;var L=u,P=0,k=b,O=I?1:-1;if(e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:I,cx:m,cy:y,r0:x,r:T?NaN:_,viewRect:o});else{i="area"!==T?0===M&&C?A:t*A:u/S,i0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"===typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i="radial"===e.type?u:l,r=i(t,e,n),a=e.colorStops,o=0;on)e.push(arguments[n++]);return _[++x]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(x),x},g=function(t){delete _[t]},"process"==l(v)?i=function(t){v.nextTick(S(t))}:y&&y.now?i=function(t){y.now(S(t))}:m&&!d?(r=new m,a=r.port2,r.port1.onmessage=M,i=u(a.postMessage,a,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(A)||"file:"===f.protocol?i=b in h("script")?function(t){c.appendChild(h("script"))[b]=function(){c.removeChild(this),w(t)}}:function(t){setTimeout(S(t),0)}:(i=A,o.addEventListener("message",M,!1))),t.exports={set:p,clear:g}},"2cfc":function(t,e,n){var i=n("3eba");n("4338"),n("bcbe"),n("c62c"),n("cb8f"),n("f138"),i.extendComponentView({type:"single"})},"2d00":function(t,e,n){var i,r,a=n("da84"),o=n("342f"),s=a.process,l=s&&s.versions,u=l&&l.v8;u?(i=u.split("."),r=i[0]+i[1]):o&&(i=o.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/),i&&(r=i[1]))),t.exports=r&&+r},"2ef0":function(t,e,n){(function(t,i){var r; +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(){var a,o="4.17.15",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",f=1,p=2,g=4,v=1,m=2,y=1,x=2,_=4,b=8,w=16,S=32,M=64,A=128,I=256,T=512,C=30,D="...",L=800,P=16,k=1,O=2,E=3,N=1/0,R=9007199254740991,z=17976931348623157e292,B=NaN,V=4294967295,G=V-1,F=V>>>1,H=[["ary",A],["bind",y],["bindKey",x],["curry",b],["curryRight",w],["flip",T],["partial",S],["partialRight",M],["rearg",I]],W="[object Arguments]",j="[object Array]",U="[object AsyncFunction]",Z="[object Boolean]",Y="[object Date]",X="[object DOMException]",q="[object Error]",$="[object Function]",K="[object GeneratorFunction]",J="[object Map]",Q="[object Number]",tt="[object Null]",et="[object Object]",nt="[object Promise]",it="[object Proxy]",rt="[object RegExp]",at="[object Set]",ot="[object String]",st="[object Symbol]",lt="[object Undefined]",ut="[object WeakMap]",ct="[object WeakSet]",ht="[object ArrayBuffer]",dt="[object DataView]",ft="[object Float32Array]",pt="[object Float64Array]",gt="[object Int8Array]",vt="[object Int16Array]",mt="[object Int32Array]",yt="[object Uint8Array]",xt="[object Uint8ClampedArray]",_t="[object Uint16Array]",bt="[object Uint32Array]",wt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,Mt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,At=/&(?:amp|lt|gt|quot|#39);/g,It=/[&<>"']/g,Tt=RegExp(At.source),Ct=RegExp(It.source),Dt=/<%-([\s\S]+?)%>/g,Lt=/<%([\s\S]+?)%>/g,Pt=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(Nt.source),zt=/^\s+|\s+$/g,Bt=/^\s+/,Vt=/\s+$/,Gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ft=/\{\n\/\* \[wrapped with (.+)\] \*/,Ht=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jt=/\\(\\)?/g,Ut=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zt=/\w*$/,Yt=/^[-+]0x[0-9a-f]+$/i,Xt=/^0b[01]+$/i,qt=/^\[object .+?Constructor\]$/,$t=/^0o[0-7]+$/i,Kt=/^(?:0|[1-9]\d*)$/,Jt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",ne="\\u0300-\\u036f",ie="\\ufe20-\\ufe2f",re="\\u20d0-\\u20ff",ae=ne+ie+re,oe="\\u2700-\\u27bf",se="a-z\\xdf-\\xf6\\xf8-\\xff",le="\\xac\\xb1\\xd7\\xf7",ue="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ce="\\u2000-\\u206f",he=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",de="A-Z\\xc0-\\xd6\\xd8-\\xde",fe="\\ufe0e\\ufe0f",pe=le+ue+ce+he,ge="['’]",ve="["+ee+"]",me="["+pe+"]",ye="["+ae+"]",xe="\\d+",_e="["+oe+"]",be="["+se+"]",we="[^"+ee+pe+xe+oe+se+de+"]",Se="\\ud83c[\\udffb-\\udfff]",Me="(?:"+ye+"|"+Se+")",Ae="[^"+ee+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Te="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+de+"]",De="\\u200d",Le="(?:"+be+"|"+we+")",Pe="(?:"+Ce+"|"+we+")",ke="(?:"+ge+"(?:d|ll|m|re|s|t|ve))?",Oe="(?:"+ge+"(?:D|LL|M|RE|S|T|VE))?",Ee=Me+"?",Ne="["+fe+"]?",Re="(?:"+De+"(?:"+[Ae,Ie,Te].join("|")+")"+Ne+Ee+")*",ze="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Be="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ve=Ne+Ee+Re,Ge="(?:"+[_e,Ie,Te].join("|")+")"+Ve,Fe="(?:"+[Ae+ye+"?",ye,Ie,Te,ve].join("|")+")",He=RegExp(ge,"g"),We=RegExp(ye,"g"),je=RegExp(Se+"(?="+Se+")|"+Fe+Ve,"g"),Ue=RegExp([Ce+"?"+be+"+"+ke+"(?="+[me,Ce,"$"].join("|")+")",Pe+"+"+Oe+"(?="+[me,Ce+Le,"$"].join("|")+")",Ce+"?"+Le+"+"+ke,Ce+"+"+Oe,Be,ze,xe,Ge].join("|"),"g"),Ze=RegExp("["+De+ee+ae+fe+"]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qe=-1,$e={};$e[ft]=$e[pt]=$e[gt]=$e[vt]=$e[mt]=$e[yt]=$e[xt]=$e[_t]=$e[bt]=!0,$e[W]=$e[j]=$e[ht]=$e[Z]=$e[dt]=$e[Y]=$e[q]=$e[$]=$e[J]=$e[Q]=$e[et]=$e[rt]=$e[at]=$e[ot]=$e[ut]=!1;var Ke={};Ke[W]=Ke[j]=Ke[ht]=Ke[dt]=Ke[Z]=Ke[Y]=Ke[ft]=Ke[pt]=Ke[gt]=Ke[vt]=Ke[mt]=Ke[J]=Ke[Q]=Ke[et]=Ke[rt]=Ke[at]=Ke[ot]=Ke[st]=Ke[yt]=Ke[xt]=Ke[_t]=Ke[bt]=!0,Ke[q]=Ke[$]=Ke[ut]=!1;var Je={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Qe={"&":"&","<":"<",">":">",'"':""","'":"'"},tn={"&":"&","<":"<",">":">",""":'"',"'":"'"},en={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,an="object"==typeof t&&t&&t.Object===Object&&t,on="object"==typeof self&&self&&self.Object===Object&&self,sn=an||on||Function("return this")(),ln=e&&!e.nodeType&&e,un=ln&&"object"==typeof i&&i&&!i.nodeType&&i,cn=un&&un.exports===ln,hn=cn&&an.process,dn=function(){try{var t=un&&un.require&&un.require("util").types;return t||hn&&hn.binding&&hn.binding("util")}catch(e){}}(),fn=dn&&dn.isArrayBuffer,pn=dn&&dn.isDate,gn=dn&&dn.isMap,vn=dn&&dn.isRegExp,mn=dn&&dn.isSet,yn=dn&&dn.isTypedArray;function xn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function _n(t,e,n,i){var r=-1,a=null==t?0:t.length;while(++r-1}function In(t,e,n){var i=-1,r=null==t?0:t.length;while(++i-1);return n}function Jn(t,e){var n=t.length;while(n--&&zn(e,t[n],0)>-1);return n}function Qn(t,e){var n=t.length,i=0;while(n--)t[n]===e&&++i;return i}var ti=Hn(Je),ei=Hn(Qe);function ni(t){return"\\"+en[t]}function ii(t,e){return null==t?a:t[e]}function ri(t){return Ze.test(t)}function ai(t){return Ye.test(t)}function oi(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function si(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function li(t,e){return function(n){return t(e(n))}}function ui(t,e){var n=-1,i=t.length,r=0,a=[];while(++n-1}function Gi(t,e){var n=this.__data__,i=lr(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Fi(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e=e?t:e)),t}function gr(t,e,n,i,r,o){var s,l=e&f,u=e&p,c=e&g;if(n&&(s=r?n(t,i,r,o):n(t)),s!==a)return s;if(!wc(t))return t;var h=oc(t);if(h){if(s=Qo(t),!l)return eo(t,s)}else{var d=qo(t),v=d==$||d==K;if(hc(t))return Ua(t,l);if(d==et||d==W||v&&!r){if(s=u||v?{}:ts(t),!l)return u?ro(t,hr(s,t)):io(t,cr(s,t))}else{if(!Ke[d])return r?t:{};s=es(t,d,l)}}o||(o=new $i);var m=o.get(t);if(m)return m;o.set(t,s),Nc(t)?t.forEach((function(i){s.add(gr(i,e,n,i,t,o))})):Mc(t)&&t.forEach((function(i,r){s.set(r,gr(i,e,n,r,t,o))}));var y=c?u?Bo:zo:u?bh:_h,x=h?a:y(t);return bn(x||t,(function(i,r){x&&(r=i,i=t[r]),sr(s,r,gr(i,e,n,r,t,o))})),s}function vr(t){var e=_h(t);return function(n){return mr(n,t,e)}}function mr(t,e,n){var i=n.length;if(null==t)return!i;t=ne(t);while(i--){var r=n[i],o=e[r],s=t[r];if(s===a&&!(r in t)||!o(s))return!1}return!0}function yr(t,e,n){if("function"!=typeof t)throw new ae(u);return Ss((function(){t.apply(a,n)}),e)}function xr(t,e,n,i){var r=-1,a=An,o=!0,l=t.length,u=[],c=e.length;if(!l)return u;n&&(e=Tn(e,Xn(n))),i?(a=In,o=!1):e.length>=s&&(a=$n,o=!1,e=new Yi(e));t:while(++rr?0:r+n),i=i===a||i>r?r:Zc(i),i<0&&(i+=r),i=n>i?0:Yc(i);while(n0&&n(s)?e>1?Ir(s,e-1,n,i,r):Cn(r,s):i||(r[r.length]=s)}return r}var Tr=lo(),Cr=lo(!0);function Dr(t,e){return t&&Tr(t,e,_h)}function Lr(t,e){return t&&Cr(t,e,_h)}function Pr(t,e){return Mn(e,(function(e){return xc(t[e])}))}function kr(t,e){e=Fa(e,t);var n=0,i=e.length;while(null!=t&&ne}function Rr(t,e){return null!=t&&he.call(t,e)}function zr(t,e){return null!=t&&e in ne(t)}function Br(t,e,n){return t>=Fe(e,n)&&t=120&&d.length>=120)?new Yi(l&&d):a}d=t[0];var f=-1,p=u[0];t:while(++f-1)s!==t&&Ae.call(s,l,1),Ae.call(t,l,1)}return t}function pa(t,e){var n=t?e.length:0,i=n-1;while(n--){var r=e[n];if(n==i||r!==a){var a=r;rs(r)?Ae.call(t,r,1):Oa(t,r)}}return t}function ga(t,e){return t+Ee(Ze()*(e-t+1))}function va(t,e,i,r){var a=-1,o=Ge(Oe((e-t)/(i||1)),0),s=n(o);while(o--)s[r?o:++a]=t,t+=i;return s}function ma(t,e){var n="";if(!t||e<1||e>R)return n;do{e%2&&(n+=t),e=Ee(e/2),e&&(t+=t)}while(e);return n}function ya(t,e){return Ms(ys(t,e,Cd),t+"")}function xa(t){return ir(Vh(t))}function _a(t,e){var n=Vh(t);return Ts(n,pr(e,0,n.length))}function ba(t,e,n,i){if(!wc(t))return t;e=Fa(e,t);var r=-1,o=e.length,s=o-1,l=t;while(null!=l&&++ra?0:a+e),i=i>a?a:i,i<0&&(i+=a),a=e>i?0:i-e>>>0,e>>>=0;var o=n(a);while(++r>>1,o=t[a];null!==o&&!zc(o)&&(n?o<=e:o=s){var c=e?null:To(t);if(c)return ci(c);o=!1,r=$n,u=new Yi}else u=e?[]:l;t:while(++i=i?t:Aa(t,e,n)}var ja=Le||function(t){return sn.clearTimeout(t)};function Ua(t,e){if(e)return t.slice();var n=t.length,i=be?be(n):new t.constructor(n);return t.copy(i),i}function Za(t){var e=new t.constructor(t.byteLength);return new _e(e).set(new _e(t)),e}function Ya(t,e){var n=e?Za(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Xa(t){var e=new t.constructor(t.source,Zt.exec(t));return e.lastIndex=t.lastIndex,e}function qa(t){return mi?ne(mi.call(t)):{}}function $a(t,e){var n=e?Za(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ka(t,e){if(t!==e){var n=t!==a,i=null===t,r=t===t,o=zc(t),s=e!==a,l=null===e,u=e===e,c=zc(e);if(!l&&!c&&!o&&t>e||o&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!r)return 1;if(!i&&!o&&!c&&t=s)return l;var u=n[i];return l*("desc"==u?-1:1)}}return t.index-e.index}function Qa(t,e,i,r){var a=-1,o=t.length,s=i.length,l=-1,u=e.length,c=Ge(o-s,0),h=n(u+c),d=!r;while(++l1?n[r-1]:a,s=r>2?n[2]:a;o=t.length>3&&"function"==typeof o?(r--,o):a,s&&as(n[0],n[1],s)&&(o=r<3?a:o,r=1),e=ne(e);while(++i-1?r[o?e[s]:s]:a}}function vo(t){return Ro((function(e){var n=e.length,i=n,r=Mi.prototype.thru;t&&e.reverse();while(i--){var o=e[i];if("function"!=typeof o)throw new ae(u);if(r&&!s&&"wrapper"==Go(o))var s=new Mi([],!0)}i=s?i:n;while(++i1&&y.reverse(),d&&cl))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var h=-1,d=!0,f=n&m?new Yi:a;o.set(t,e),o.set(e,t);while(++h1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(Gt,"{\n/* [wrapped with "+e+"] */\n")}function is(t){return oc(t)||ac(t)||!!(Ie&&t&&t[Ie])}function rs(t,e){var n=typeof t;return e=null==e?R:e,!!e&&("number"==n||"symbol"!=n&&Kt.test(t))&&t>-1&&t%1==0&&t0){if(++e>=L)return arguments[0]}else e=0;return t.apply(a,arguments)}}function Ts(t,e){var n=-1,i=t.length,r=i-1;e=e===a?i:e;while(++n1?t[e-1]:a;return n="function"==typeof n?(t.pop(),n):a,El(t,n)}));function Wl(t){var e=_i(t);return e.__chain__=!0,e}function jl(t,e){return e(t),t}function Ul(t,e){return e(t)}var Zl=Ro((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,r=function(e){return fr(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Ai&&rs(n)?(i=i.slice(n,+n+(e?1:0)),i.__actions__.push({func:Ul,args:[r],thisArg:a}),new Mi(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(a),t}))):this.thru(r)}));function Yl(){return Wl(this)}function Xl(){return new Mi(this.value(),this.__chain__)}function ql(){this.__values__===a&&(this.__values__=jc(this.value()));var t=this.__index__>=this.__values__.length,e=t?a:this.__values__[this.__index__++];return{done:t,value:e}}function $l(){return this}function Kl(t){var e,n=this;while(n instanceof Si){var i=ks(n);i.__index__=0,i.__values__=a,e?r.__wrapped__=i:e=i;var r=i;n=n.__wrapped__}return r.__wrapped__=t,e}function Jl(){var t=this.__wrapped__;if(t instanceof Ai){var e=t;return this.__actions__.length&&(e=new Ai(this)),e=e.reverse(),e.__actions__.push({func:Ul,args:[dl],thisArg:a}),new Mi(e,this.__chain__)}return this.thru(dl)}function Ql(){return Ra(this.__wrapped__,this.__actions__)}var tu=ao((function(t,e,n){he.call(t,n)?++t[n]:dr(t,n,1)}));function eu(t,e,n){var i=oc(t)?Sn:wr;return n&&as(t,e,n)&&(e=a),i(t,Ho(e,3))}function nu(t,e){var n=oc(t)?Mn:Ar;return n(t,Ho(e,3))}var iu=go(js),ru=go(Us);function au(t,e){return Ir(pu(t,e),1)}function ou(t,e){return Ir(pu(t,e),N)}function su(t,e,n){return n=n===a?1:Zc(n),Ir(pu(t,e),n)}function lu(t,e){var n=oc(t)?bn:_r;return n(t,Ho(e,3))}function uu(t,e){var n=oc(t)?wn:br;return n(t,Ho(e,3))}var cu=ao((function(t,e,n){he.call(t,n)?t[n].push(e):dr(t,n,[e])}));function hu(t,e,n,i){t=lc(t)?t:Vh(t),n=n&&!i?Zc(n):0;var r=t.length;return n<0&&(n=Ge(r+n,0)),Rc(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&zn(t,e,n)>-1}var du=ya((function(t,e,i){var r=-1,a="function"==typeof e,o=lc(t)?n(t.length):[];return _r(t,(function(t){o[++r]=a?xn(e,t,i):Fr(t,e,i)})),o})),fu=ao((function(t,e,n){dr(t,n,e)}));function pu(t,e){var n=oc(t)?Tn:ia;return n(t,Ho(e,3))}function gu(t,e,n,i){return null==t?[]:(oc(e)||(e=null==e?[]:[e]),n=i?a:n,oc(n)||(n=null==n?[]:[n]),ua(t,e,n))}var vu=ao((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));function mu(t,e,n){var i=oc(t)?Dn:Wn,r=arguments.length<3;return i(t,Ho(e,4),n,r,_r)}function yu(t,e,n){var i=oc(t)?Ln:Wn,r=arguments.length<3;return i(t,Ho(e,4),n,r,br)}function xu(t,e){var n=oc(t)?Mn:Ar;return n(t,Vu(Ho(e,3)))}function _u(t){var e=oc(t)?ir:xa;return e(t)}function bu(t,e,n){e=(n?as(t,e,n):e===a)?1:Zc(e);var i=oc(t)?rr:_a;return i(t,e)}function wu(t){var e=oc(t)?ar:Ma;return e(t)}function Su(t){if(null==t)return 0;if(lc(t))return Rc(t)?pi(t):t.length;var e=qo(t);return e==J||e==at?t.size:ta(t).length}function Mu(t,e,n){var i=oc(t)?Pn:Ia;return n&&as(t,e,n)&&(e=a),i(t,Ho(e,3))}var Au=ya((function(t,e){if(null==t)return[];var n=e.length;return n>1&&as(t,e[0],e[1])?e=[]:n>2&&as(e[0],e[1],e[2])&&(e=[e[0]]),ua(t,Ir(e,1),[])})),Iu=Pe||function(){return sn.Date.now()};function Tu(t,e){if("function"!=typeof e)throw new ae(u);return t=Zc(t),function(){if(--t<1)return e.apply(this,arguments)}}function Cu(t,e,n){return e=n?a:e,e=t&&null==e?t.length:e,Do(t,A,a,a,a,a,e)}function Du(t,e){var n;if("function"!=typeof e)throw new ae(u);return t=Zc(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=a),n}}var Lu=ya((function(t,e,n){var i=y;if(n.length){var r=ui(n,Fo(Lu));i|=S}return Do(t,i,e,n,r)})),Pu=ya((function(t,e,n){var i=y|x;if(n.length){var r=ui(n,Fo(Pu));i|=S}return Do(e,i,t,n,r)}));function ku(t,e,n){e=n?a:e;var i=Do(t,b,a,a,a,a,a,e);return i.placeholder=ku.placeholder,i}function Ou(t,e,n){e=n?a:e;var i=Do(t,w,a,a,a,a,a,e);return i.placeholder=Ou.placeholder,i}function Eu(t,e,n){var i,r,o,s,l,c,h=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new ae(u);function g(e){var n=i,o=r;return i=r=a,h=e,s=t.apply(o,n),s}function v(t){return h=t,l=Ss(x,e),d?g(t):s}function m(t){var n=t-c,i=t-h,r=e-n;return f?Fe(r,o-i):r}function y(t){var n=t-c,i=t-h;return c===a||n>=e||n<0||f&&i>=o}function x(){var t=Iu();if(y(t))return _(t);l=Ss(x,m(t))}function _(t){return l=a,p&&i?g(t):(i=r=a,s)}function b(){l!==a&&ja(l),h=0,i=c=r=l=a}function w(){return l===a?s:_(Iu())}function S(){var t=Iu(),n=y(t);if(i=arguments,r=this,c=t,n){if(l===a)return v(c);if(f)return ja(l),l=Ss(x,e),g(c)}return l===a&&(l=Ss(x,e)),s}return e=Xc(e)||0,wc(n)&&(d=!!n.leading,f="maxWait"in n,o=f?Ge(Xc(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),S.cancel=b,S.flush=w,S}var Nu=ya((function(t,e){return yr(t,1,e)})),Ru=ya((function(t,e,n){return yr(t,Xc(e)||0,n)}));function zu(t){return Do(t,T)}function Bu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ae(u);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var o=t.apply(this,i);return n.cache=a.set(r,o)||a,o};return n.cache=new(Bu.Cache||Fi),n}function Vu(t){if("function"!=typeof t)throw new ae(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Gu(t){return Du(2,t)}Bu.Cache=Fi;var Fu=Ha((function(t,e){e=1==e.length&&oc(e[0])?Tn(e[0],Xn(Ho())):Tn(Ir(e,1),Xn(Ho()));var n=e.length;return ya((function(i){var r=-1,a=Fe(i.length,n);while(++r=e})),ac=Hr(function(){return arguments}())?Hr:function(t){return Sc(t)&&he.call(t,"callee")&&!Me.call(t,"callee")},oc=n.isArray,sc=fn?Xn(fn):Wr;function lc(t){return null!=t&&bc(t.length)&&!xc(t)}function uc(t){return Sc(t)&&lc(t)}function cc(t){return!0===t||!1===t||Sc(t)&&Er(t)==Z}var hc=Re||Zd,dc=pn?Xn(pn):jr;function fc(t){return Sc(t)&&1===t.nodeType&&!kc(t)}function pc(t){if(null==t)return!0;if(lc(t)&&(oc(t)||"string"==typeof t||"function"==typeof t.splice||hc(t)||Bc(t)||ac(t)))return!t.length;var e=qo(t);if(e==J||e==at)return!t.size;if(hs(t))return!ta(t).length;for(var n in t)if(he.call(t,n))return!1;return!0}function gc(t,e){return Ur(t,e)}function vc(t,e,n){n="function"==typeof n?n:a;var i=n?n(t,e):a;return i===a?Ur(t,e,a,n):!!i}function mc(t){if(!Sc(t))return!1;var e=Er(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!kc(t)}function yc(t){return"number"==typeof t&&ze(t)}function xc(t){if(!wc(t))return!1;var e=Er(t);return e==$||e==K||e==U||e==it}function _c(t){return"number"==typeof t&&t==Zc(t)}function bc(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=R}function wc(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Sc(t){return null!=t&&"object"==typeof t}var Mc=gn?Xn(gn):Yr;function Ac(t,e){return t===e||Xr(t,e,jo(e))}function Ic(t,e,n){return n="function"==typeof n?n:a,Xr(t,e,jo(e),n)}function Tc(t){return Pc(t)&&t!=+t}function Cc(t){if(cs(t))throw new r(l);return qr(t)}function Dc(t){return null===t}function Lc(t){return null==t}function Pc(t){return"number"==typeof t||Sc(t)&&Er(t)==Q}function kc(t){if(!Sc(t)||Er(t)!=et)return!1;var e=we(t);if(null===e)return!0;var n=he.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ce.call(n)==ge}var Oc=vn?Xn(vn):$r;function Ec(t){return _c(t)&&t>=-R&&t<=R}var Nc=mn?Xn(mn):Kr;function Rc(t){return"string"==typeof t||!oc(t)&&Sc(t)&&Er(t)==ot}function zc(t){return"symbol"==typeof t||Sc(t)&&Er(t)==st}var Bc=yn?Xn(yn):Jr;function Vc(t){return t===a}function Gc(t){return Sc(t)&&qo(t)==ut}function Fc(t){return Sc(t)&&Er(t)==ct}var Hc=Mo(na),Wc=Mo((function(t,e){return t<=e}));function jc(t){if(!t)return[];if(lc(t))return Rc(t)?gi(t):eo(t);if(Te&&t[Te])return oi(t[Te]());var e=qo(t),n=e==J?si:e==at?ci:Vh;return n(t)}function Uc(t){if(!t)return 0===t?t:0;if(t=Xc(t),t===N||t===-N){var e=t<0?-1:1;return e*z}return t===t?t:0}function Zc(t){var e=Uc(t),n=e%1;return e===e?n?e-n:e:0}function Yc(t){return t?pr(Zc(t),0,V):0}function Xc(t){if("number"==typeof t)return t;if(zc(t))return B;if(wc(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=wc(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(zt,"");var n=Xt.test(t);return n||$t.test(t)?rn(t.slice(2),n?2:8):Yt.test(t)?B:+t}function qc(t){return no(t,bh(t))}function $c(t){return t?pr(Zc(t),-R,R):0===t?t:0}function Kc(t){return null==t?"":Pa(t)}var Jc=oo((function(t,e){if(hs(e)||lc(e))no(e,_h(e),t);else for(var n in e)he.call(e,n)&&sr(t,n,e[n])})),Qc=oo((function(t,e){no(e,bh(e),t)})),th=oo((function(t,e,n,i){no(e,bh(e),t,i)})),eh=oo((function(t,e,n,i){no(e,_h(e),t,i)})),nh=Ro(fr);function ih(t,e){var n=wi(t);return null==e?n:cr(n,e)}var rh=ya((function(t,e){t=ne(t);var n=-1,i=e.length,r=i>2?e[2]:a;r&&as(e[0],e[1],r)&&(i=1);while(++n1),e})),no(t,Bo(t),n),i&&(n=gr(n,f|p|g,ko));var r=e.length;while(r--)Oa(n,e[r]);return n}));function Th(t,e){return Dh(t,Vu(Ho(e)))}var Ch=Ro((function(t,e){return null==t?{}:ca(t,e)}));function Dh(t,e){if(null==t)return{};var n=Tn(Bo(t),(function(t){return[t]}));return e=Ho(e),ha(t,n,(function(t,n){return e(t,n[0])}))}function Lh(t,e,n){e=Fa(e,t);var i=-1,r=e.length;r||(r=1,t=a);while(++ie){var i=t;t=e,e=i}if(n||t%1||e%1){var r=Ze();return Fe(t+r*(e-t+nn("1e-"+((r+"").length-1))),e)}return ga(t,e)}var jh=ho((function(t,e,n){return e=e.toLowerCase(),t+(n?Uh(e):e)}));function Uh(t){return yd(Kc(t).toLowerCase())}function Zh(t){return t=Kc(t),t&&t.replace(Jt,ti).replace(We,"")}function Yh(t,e,n){t=Kc(t),e=Pa(e);var i=t.length;n=n===a?i:pr(Zc(n),0,i);var r=n;return n-=e.length,n>=0&&t.slice(n,r)==e}function Xh(t){return t=Kc(t),t&&Ct.test(t)?t.replace(It,ei):t}function qh(t){return t=Kc(t),t&&Rt.test(t)?t.replace(Nt,"\\$&"):t}var $h=ho((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Kh=ho((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Jh=co("toLowerCase");function Qh(t,e,n){t=Kc(t),e=Zc(e);var i=e?pi(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return bo(Ee(r),n)+t+bo(Oe(r),n)}function td(t,e,n){t=Kc(t),e=Zc(e);var i=e?pi(t):0;return e&&i>>0,n?(t=Kc(t),t&&("string"==typeof e||null!=e&&!Oc(e))&&(e=Pa(e),!e&&ri(t))?Wa(gi(t),0,n):t.split(e,n)):[]}var sd=ho((function(t,e,n){return t+(n?" ":"")+yd(e)}));function ld(t,e,n){return t=Kc(t),n=null==n?0:pr(Zc(n),0,t.length),e=Pa(e),t.slice(n,n+e.length)==e}function ud(t,e,n){var i=_i.templateSettings;n&&as(t,e,n)&&(e=a),t=Kc(t),e=th({},e,i,Lo);var r,o,s=th({},e.imports,i.imports,Lo),l=_h(s),u=qn(s,l),c=0,h=e.interpolate||Qt,d="__p += '",f=ie((e.escape||Qt).source+"|"+h.source+"|"+(h===Pt?Ut:Qt).source+"|"+(e.evaluate||Qt).source+"|$","g"),p="//# sourceURL="+(he.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++qe+"]")+"\n";t.replace(f,(function(e,n,i,a,s,l){return i||(i=a),d+=t.slice(c,l).replace(te,ni),n&&(r=!0,d+="' +\n__e("+n+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+e.length,e})),d+="';\n";var g=he.call(e,"variable")&&e.variable;g||(d="with (obj) {\n"+d+"\n}\n"),d=(o?d.replace(wt,""):d).replace(St,"$1").replace(Mt,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=_d((function(){return Wt(l,p+"return "+d).apply(a,u)}));if(v.source=d,mc(v))throw v;return v}function cd(t){return Kc(t).toLowerCase()}function hd(t){return Kc(t).toUpperCase()}function dd(t,e,n){if(t=Kc(t),t&&(n||e===a))return t.replace(zt,"");if(!t||!(e=Pa(e)))return t;var i=gi(t),r=gi(e),o=Kn(i,r),s=Jn(i,r)+1;return Wa(i,o,s).join("")}function fd(t,e,n){if(t=Kc(t),t&&(n||e===a))return t.replace(Vt,"");if(!t||!(e=Pa(e)))return t;var i=gi(t),r=Jn(i,gi(e))+1;return Wa(i,0,r).join("")}function pd(t,e,n){if(t=Kc(t),t&&(n||e===a))return t.replace(Bt,"");if(!t||!(e=Pa(e)))return t;var i=gi(t),r=Kn(i,gi(e));return Wa(i,r).join("")}function gd(t,e){var n=C,i=D;if(wc(e)){var r="separator"in e?e.separator:r;n="length"in e?Zc(e.length):n,i="omission"in e?Pa(e.omission):i}t=Kc(t);var o=t.length;if(ri(t)){var s=gi(t);o=s.length}if(n>=o)return t;var l=n-pi(i);if(l<1)return i;var u=s?Wa(s,0,l).join(""):t.slice(0,l);if(r===a)return u+i;if(s&&(l+=u.length-l),Oc(r)){if(t.slice(l).search(r)){var c,h=u;r.global||(r=ie(r.source,Kc(Zt.exec(r))+"g")),r.lastIndex=0;while(c=r.exec(h))var d=c.index;u=u.slice(0,d===a?l:d)}}else if(t.indexOf(Pa(r),l)!=l){var f=u.lastIndexOf(r);f>-1&&(u=u.slice(0,f))}return u+i}function vd(t){return t=Kc(t),t&&Tt.test(t)?t.replace(At,vi):t}var md=ho((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),yd=co("toUpperCase");function xd(t,e,n){return t=Kc(t),e=n?a:e,e===a?ai(t)?xi(t):En(t):t.match(e)||[]}var _d=ya((function(t,e){try{return xn(t,a,e)}catch(n){return mc(n)?n:new r(n)}})),bd=Ro((function(t,e){return bn(e,(function(e){e=Ds(e),dr(t,e,Lu(t[e],t))})),t}));function wd(t){var e=null==t?0:t.length,n=Ho();return t=e?Tn(t,(function(t){if("function"!=typeof t[1])throw new ae(u);return[n(t[0]),t[1]]})):[],ya((function(n){var i=-1;while(++iR)return[];var n=V,i=Fe(t,V);e=Ho(e),t-=V;var r=Zn(i,e);while(++n0||e<0)?new Ai(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==a&&(e=Zc(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},Ai.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ai.prototype.toArray=function(){return this.take(V)},Dr(Ai.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),r=_i[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);r&&(_i.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,l=e instanceof Ai,u=s[0],c=l||oc(e),h=function(t){var e=r.apply(_i,Cn([t],s));return i&&d?e[0]:e};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,f=!!this.__actions__.length,p=o&&!d,g=l&&!f;if(!o&&c){e=g?e:new Ai(this);var v=t.apply(e,s);return v.__actions__.push({func:Ul,args:[h],thisArg:a}),new Mi(v,d)}return p&&g?t.apply(this,s):(v=this.thru(h),p?i?v.value()[0]:v.value():v)})})),bn(["pop","push","shift","sort","splice","unshift"],(function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);_i.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(oc(r)?r:[],t)}return this[n]((function(n){return e.apply(oc(n)?n:[],t)}))}})),Dr(Ai.prototype,(function(t,e){var n=_i[e];if(n){var i=n.name+"";he.call(un,i)||(un[i]=[]),un[i].push({name:e,func:n})}})),un[mo(a,x).name]=[{name:"wrapper",func:a}],Ai.prototype.clone=Ii,Ai.prototype.reverse=Ti,Ai.prototype.value=Ci,_i.prototype.at=Zl,_i.prototype.chain=Yl,_i.prototype.commit=Xl,_i.prototype.next=ql,_i.prototype.plant=Kl,_i.prototype.reverse=Jl,_i.prototype.toJSON=_i.prototype.valueOf=_i.prototype.value=Ql,_i.prototype.first=_i.prototype.head,Te&&(_i.prototype[Te]=$l),_i},bi=_i();sn._=bi,r=function(){return bi}.call(e,n,e,i),r===a||(i.exports=r)}).call(this)}).call(this,n("c8ba"),n("62e4")(t))},"2f31":function(t,e,n){var i=n("3eba"),r=n("ae75");n("10cc"),n("f31f"),n("c2dd"),n("b8ec"),n("fecb"),i.registerPreprocessor(r)},"2f45":function(t,e,n){var i=n("6d8b"),r=i.each,a=i.createHashMap,o=(i.assert,n("4e08")),s=(o.__DEV__,a(["tooltip","label","itemName","itemId","seriesName"]));function l(t){var e={},n=e.encode={},i=a(),o=[],l=[],c=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};r(t.dimensions,(function(e){var r=t.getDimensionInfo(e),a=r.coordDim;if(a){var d=r.coordDimIndex;u(n,a)[d]=e,r.isExtraCoord||(i.set(a,1),h(r.type)&&(o[0]=e),u(c.encode,a)[d]=r.index),r.defaultTooltip&&l.push(e)}s.each((function(t,e){var i=u(n,e),a=r.otherDims[e];null!=a&&!1!==a&&(i[a]=r.name)}))}));var d=[],f={};i.each((function(t,e){var i=n[e];f[e]=i[0],d=d.concat(i)})),e.dataDimsOnCoord=d,e.encodeFirstDimNotExtra=f;var p=n.label;p&&p.length&&(o=p.slice());var g=n.tooltip;return g&&g.length?l=g.slice():l.length||(l=o.slice()),n.defaultedLabel=o,n.defaultedTooltip=l,e}function u(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function c(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function h(t){return!("ordinal"===t||"time"===t)}e.OTHER_DIMENSIONS=s,e.summarizeDimensions=l,e.getDimensionTypeByAxis=c},"2f62":function(t,e,n){"use strict";(function(t){ +/*! + * vuex v3.4.0 + * (c) 2020 Evan You + * @license MIT + */ +function i(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:i});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[i].concat(t.init):i,n.call(this,t)}}function i(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}n.d(e,"b",(function(){return E}));var r="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},a=r.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(t){a&&(t._devtoolHook=a,a.emit("vuex:init",t),a.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){a.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){a.emit("vuex:action",t,e)}),{prepend:!0}))}function s(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function l(t){return null!==t&&"object"===typeof t}function u(t){return t&&"function"===typeof t.then}function c(t,e){return function(){return t(e)}}var h=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},d={namespaced:{configurable:!0}};d.namespaced.get=function(){return!!this._rawModule.namespaced},h.prototype.addChild=function(t,e){this._children[t]=e},h.prototype.removeChild=function(t){delete this._children[t]},h.prototype.getChild=function(t){return this._children[t]},h.prototype.hasChild=function(t){return t in this._children},h.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},h.prototype.forEachChild=function(t){s(this._children,t)},h.prototype.forEachGetter=function(t){this._rawModule.getters&&s(this._rawModule.getters,t)},h.prototype.forEachAction=function(t){this._rawModule.actions&&s(this._rawModule.actions,t)},h.prototype.forEachMutation=function(t){this._rawModule.mutations&&s(this._rawModule.mutations,t)},Object.defineProperties(h.prototype,d);var f=function(t){this.register([],t,!1)};function p(t,e,n){if(e.update(n),n.modules)for(var i in n.modules){if(!e.getChild(i))return void 0;p(t.concat(i),e.getChild(i),n.modules[i])}}f.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},f.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},f.prototype.update=function(t){p([],this.root,t)},f.prototype.register=function(t,e,n){var i=this;void 0===n&&(n=!0);var r=new h(e,n);if(0===t.length)this.root=r;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],r)}e.modules&&s(e.modules,(function(e,r){i.register(t.concat(r),e,n)}))},f.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)},f.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return e.hasChild(n)};var g;var v=function(t){var e=this;void 0===t&&(t={}),!g&&"undefined"!==typeof window&&window.Vue&&L(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new g,this._makeLocalGettersCache=Object.create(null);var r=this,a=this,s=a.dispatch,l=a.commit;this.dispatch=function(t,e){return s.call(r,t,e)},this.commit=function(t,e,n){return l.call(r,t,e,n)},this.strict=i;var u=this._modules.root.state;b(this,u,[],this._modules.root),_(this,u),n.forEach((function(t){return t(e)}));var c=void 0!==t.devtools?t.devtools:g.config.devtools;c&&o(this)},m={state:{configurable:!0}};function y(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function x(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;b(t,n,[],t._modules.root,!0),_(t,n,e)}function _(t,e,n){var i=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var r=t._wrappedGetters,a={};s(r,(function(e,n){a[n]=c(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var o=g.config.silent;g.config.silent=!0,t._vm=new g({data:{$$state:e},computed:a}),g.config.silent=o,t.strict&&T(t),i&&(n&&t._withCommit((function(){i._data.$$state=null})),g.nextTick((function(){return i.$destroy()})))}function b(t,e,n,i,r){var a=!n.length,o=t._modules.getNamespace(n);if(i.namespaced&&(t._modulesNamespaceMap[o],t._modulesNamespaceMap[o]=i),!a&&!r){var s=C(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit((function(){g.set(s,l,i.state)}))}var u=i.context=w(t,o,n);i.forEachMutation((function(e,n){var i=o+n;M(t,i,e,u)})),i.forEachAction((function(e,n){var i=e.root?n:o+n,r=e.handler||e;A(t,i,r,u)})),i.forEachGetter((function(e,n){var i=o+n;I(t,i,e,u)})),i.forEachChild((function(i,a){b(t,e,n.concat(a),i,r)}))}function w(t,e,n){var i=""===e,r={dispatch:i?t.dispatch:function(n,i,r){var a=D(n,i,r),o=a.payload,s=a.options,l=a.type;return s&&s.root||(l=e+l),t.dispatch(l,o)},commit:i?t.commit:function(n,i,r){var a=D(n,i,r),o=a.payload,s=a.options,l=a.type;s&&s.root||(l=e+l),t.commit(l,o,s)}};return Object.defineProperties(r,{getters:{get:i?function(){return t.getters}:function(){return S(t,e)}},state:{get:function(){return C(t.state,n)}}}),r}function S(t,e){if(!t._makeLocalGettersCache[e]){var n={},i=e.length;Object.keys(t.getters).forEach((function(r){if(r.slice(0,i)===e){var a=r.slice(i);Object.defineProperty(n,a,{get:function(){return t.getters[r]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function M(t,e,n,i){var r=t._mutations[e]||(t._mutations[e]=[]);r.push((function(e){n.call(t,i.state,e)}))}function A(t,e,n,i){var r=t._actions[e]||(t._actions[e]=[]);r.push((function(e){var r=n.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e);return u(r)||(r=Promise.resolve(r)),t._devtoolHook?r.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):r}))}function I(t,e,n,i){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(i.state,i.getters,t.state,t.getters)})}function T(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function C(t,e){return e.reduce((function(t,e){return t[e]}),t)}function D(t,e,n){return l(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function L(t){g&&t===g||(g=t,i(g))}m.state.get=function(){return this._vm._data.$$state},m.state.set=function(t){0},v.prototype.commit=function(t,e,n){var i=this,r=D(t,e,n),a=r.type,o=r.payload,s=(r.options,{type:a,payload:o}),l=this._mutations[a];l&&(this._withCommit((function(){l.forEach((function(t){t(o)}))})),this._subscribers.slice().forEach((function(t){return t(s,i.state)})))},v.prototype.dispatch=function(t,e){var n=this,i=D(t,e),r=i.type,a=i.payload,o={type:r,payload:a},s=this._actions[r];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(o,n.state)}))}catch(u){0}var l=s.length>1?Promise.all(s.map((function(t){return t(a)}))):s[0](a);return new Promise((function(t,e){l.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(o,n.state)}))}catch(u){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(o,n.state,t)}))}catch(u){0}e(t)}))}))}},v.prototype.subscribe=function(t,e){return y(t,this._subscribers,e)},v.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return y(n,this._actionSubscribers,e)},v.prototype.watch=function(t,e,n){var i=this;return this._watcherVM.$watch((function(){return t(i.state,i.getters)}),e,n)},v.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},v.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),b(this,this.state,t,this._modules.get(t),n.preserveState),_(this,this.state)},v.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=C(e.state,t.slice(0,-1));g.delete(n,t[t.length-1])})),x(this)},v.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},v.prototype.hotUpdate=function(t){this._modules.update(t),x(this,!0)},v.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(v.prototype,m);var P=B((function(t,e){var n={};return R(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var i=V(this.$store,"mapState",t);if(!i)return;e=i.context.state,n=i.context.getters}return"function"===typeof r?r.call(this,e,n):e[r]},n[i].vuex=!0})),n})),k=B((function(t,e){var n={};return R(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var i=this.$store.commit;if(t){var a=V(this.$store,"mapMutations",t);if(!a)return;i=a.context.commit}return"function"===typeof r?r.apply(this,[i].concat(e)):i.apply(this.$store,[r].concat(e))}})),n})),O=B((function(t,e){var n={};return R(e).forEach((function(e){var i=e.key,r=e.val;r=t+r,n[i]=function(){if(!t||V(this.$store,"mapGetters",t))return this.$store.getters[r]},n[i].vuex=!0})),n})),E=B((function(t,e){var n={};return R(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var i=this.$store.dispatch;if(t){var a=V(this.$store,"mapActions",t);if(!a)return;i=a.context.dispatch}return"function"===typeof r?r.apply(this,[i].concat(e)):i.apply(this.$store,[r].concat(e))}})),n})),N=function(t){return{mapState:P.bind(null,t),mapGetters:O.bind(null,t),mapMutations:k.bind(null,t),mapActions:E.bind(null,t)}};function R(t){return z(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function z(t){return Array.isArray(t)||l(t)}function B(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function V(t,e,n){var i=t._modulesNamespaceMap[n];return i}var G={Store:v,install:L,version:"3.4.0",mapState:P,mapMutations:k,mapGetters:O,mapActions:E,createNamespacedHelpers:N};e["a"]=G}).call(this,n("c8ba"))},"2f73":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("1e32");n("1ccf"),n("f5e6"),n("792e"),n("cb8f"),n("6acf"),i.registerLayout(r.curry(a,"bar")),i.extendComponentView({type:"polar"})},"2f91":function(t,e){var n=["itemStyle","borderColor"];function i(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",(function(e){var r=i[e.seriesIndex%i.length],a=e.getData();a.setVisual({legendSymbol:"roundRect",color:e.get(n)||r}),t.isSeriesFiltered(e)||a.each((function(t){var e=a.getItemModel(t);a.setItemVisual(t,{color:e.get(n,!0)})}))}))}t.exports=i},3014:function(t,e,n){var i=n("4f85"),r=n("3301"),a=i.extend({type:"series.__base_bar__",getInitialData:function(t,e){return r(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),a=i.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return n[o]+=r+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});t.exports=a},3041:function(t,e,n){var i=n("e1fc"),r=n("0da8"),a=n("76a5"),o=n("d9fc"),s=n("c7a2"),l=n("ae69"),u=n("cb11"),c=n("cbe5"),h=n("87b1"),d=n("d498"),f=n("48a9"),p=n("2b61"),g=n("1687"),v=n("342d"),m=v.createFromString,y=n("6d8b"),x=y.isString,_=y.extend,b=y.defaults,w=y.trim,S=y.each,M=/[\s,]+/;function A(t){if(x(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}9===t.nodeType&&(t=t.firstChild);while("svg"!==t.nodeName.toLowerCase()||1!==t.nodeType)t=t.nextSibling;return t}function I(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}I.prototype.parse=function(t,e){e=e||{};var n=A(t);if(!n)throw new Error("Illegal svg");var r=new i;this._root=r;var a=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||e.width),l=parseFloat(n.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),O(n,r,null,!0);var u,c,h=n.firstChild;while(h)this._parseNode(h,r),h=h.nextSibling;if(a){var d=w(a).split(M);d.length>=4&&(u={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(u&&null!=o&&null!=l&&(c=G(u,o,l),!e.ignoreViewBox)){var f=r;r=new i,r.add(f),f.scale=c.scale.slice(),f.position=c.position.slice()}return e.ignoreRootClip||null==o||null==l||r.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:r,width:o,height:l,viewBoxRect:u,viewBoxTransform:c}},I.prototype._parseNode=function(t,e){var n,i=t.nodeName.toLowerCase();if("defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0),this._isDefine){var r=C[i];if(r){var a=r.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else{r=T[i];r&&(n=r.call(this,t,e),e.add(n))}var s=t.firstChild;while(s)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},I.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new a({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});L(e,r),O(t,r,this._defs);var o=r.style.fontSize;o&&o<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=o/9,r.scale[1]*=o/9);var s=r.getBoundingRect();return this._textX+=s.width,e.add(r),r};var T={g:function(t,e){var n=new i;return L(e,n),O(t,n,this._defs),n},rect:function(t,e){var n=new s;return L(e,n),O(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new o;return L(e,n),O(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new u;return L(e,n),O(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new l;return L(e,n),O(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=P(n));var i=new h({shape:{points:n||[]}});return L(e,i),O(t,i,this._defs),i},polyline:function(t,e){var n=new c;L(e,n),O(t,n,this._defs);var i=t.getAttribute("points");i&&(i=P(i));var r=new d({shape:{points:i||[]}});return r},image:function(t,e){var n=new r;return L(e,n),O(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,r=t.getAttribute("y")||0,a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(r)+parseFloat(o);var s=new i;return L(e,s),O(t,s,this._defs),s},tspan:function(t,e){var n=t.getAttribute("x"),r=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,s=new i;return L(e,s),O(t,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(t,e){var n=t.getAttribute("d")||"",i=m(n);return L(e,i),O(t,i,this._defs),i}},C={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new f(e,n,i,r);return D(t,a),a},radialgradient:function(t){}};function D(t,e){var n=t.firstChild;while(n){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}function L(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),b(e.__inheritedStyle,t.__inheritedStyle))}function P(t){for(var e=w(t).split(M),n=[],i=0;i0;a-=2){var o=r[a],s=r[a-1];switch(i=i||g.create(),s){case"translate":o=w(o).split(M),g.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=w(o).split(M),g.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=w(o).split(M),g.rotate(i,i,parseFloat(o[0]));break;case"skew":o=w(o).split(M),console.warn("Skew transform is not supported yet");break;case"matrix":o=w(o).split(M);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5]);break}}e.setLocalTransform(i)}}var B=/([^\s:;]+)\s*:\s*([^:;]+)/g;function V(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};B.lastIndex=0;while(null!=(i=B.exec(e)))r[i[1]]=i[2];for(var a in k)k.hasOwnProperty(a)&&null!=r[a]&&(n[k[a]]=r[a]);return n}function G(t,e,n){var i=e/t.width,r=n/t.height,a=Math.min(i,r),o=[a,a],s=[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2];return{scale:o,position:s}}function F(t,e){var n=new I;return n.parse(t,e)}e.parseXML=A,e.makeViewBoxTransform=G,e.parseSVG=F},"307a":function(t,e,n){var i=n("6d8b"),r=n("eaea"),a=n("3842"),o=[20,140],s=r.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){s.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=o[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=o[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):i.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){r.prototype.completeVisualOption.apply(this,arguments),i.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)}),this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=a.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},getVisualMeta:function(t){var e=l(this,"outOfRange",this.getExtent()),n=l(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var a=0,o=0,s=n.length,u=e.length;o=0&&"number"===typeof u&&(u=+u.toFixed(Math.min(m,20))),g.coord[f]=v.coord[f]=u,r=[g,v,{type:s,valueIndex:r.valueIndex,value:u}]}return r=[o.dataTransform(t,r[0]),o.dataTransform(t,r[1]),i.extend({},r[2])],r[2].type=r[2].type||"",i.merge(r[2],r[0]),i.merge(r[2],r[1]),r};function d(t){return!isNaN(t)&&!isFinite(t)}function f(t,e,n,i){var r=1-t,a=i.dimensions[t];return d(e[r])&&d(n[r])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function p(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(f(1,n,i,t)||f(0,n,i,t)))return!0}return o.dataFilter(t,e[0])&&o.dataFilter(t,e[1])}function g(t,e,n,i,r){var o,s=i.coordinateSystem,l=t.getItemModel(e),u=a.parsePercent(l.get("x"),r.getWidth()),c=a.parsePercent(l.get("y"),r.getHeight());if(isNaN(u)||isNaN(c)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=s.dimensions,f=t.get(h[0],e),p=t.get(h[1],e);o=s.dataToPoint([f,p])}if("cartesian2d"===s.type){var g=s.getAxis("x"),v=s.getAxis("y");h=s.dimensions;d(t.get(h[0],e))?o[0]=g.toGlobalCoord(g.getExtent()[n?0:1]):d(t.get(h[1],e))&&(o[1]=v.toGlobalCoord(v.getExtent()[n?0:1]))}isNaN(u)||(o[0]=u),isNaN(c)||(o[1]=c)}else o=[u,c];t.setItemLayout(e,o)}var v=l.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries((function(t){var e=t.markLineModel;if(e){var i=e.getData(),r=e.__from,a=e.__to;r.each((function(e){g(r,e,!0,t,n),g(a,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),a.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,n,r){var a=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,new s);this.group.add(c.group);var h=m(a,t,e),d=h.from,f=h.to,p=h.line;e.__from=d,e.__to=f,e.setData(p);var v=e.get("symbol"),y=e.get("symbolSize");function x(e,n,i){var a=e.getItemModel(n);g(e,n,i,t,r),e.setItemVisual(n,{symbolSize:a.get("symbolSize")||y[i?0:1],symbol:a.get("symbol",!0)||v[i?0:1],color:a.get("itemStyle.color")||l.getVisual("color")})}i.isArray(v)||(v=[v,v]),"number"===typeof y&&(y=[y,y]),h.from.each((function(t){x(d,t,!0),x(f,t,!1)})),p.each((function(t){var e=p.getItemModel(t).get("lineStyle.color");p.setItemVisual(t,{color:e||d.getItemVisual(t,"color")}),p.setItemLayout(t,[d.getItemLayout(t),f.getItemLayout(t)]),p.setItemVisual(t,{fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolSize:f.getItemVisual(t,"symbolSize"),toSymbol:f.getItemVisual(t,"symbol")})})),c.updateData(p),h.line.eachItemGraphicEl((function(t,n){t.traverse((function(t){t.dataModel=e}))})),c.__keep=!0,c.group.silent=e.get("silent")||t.get("silent")}});function m(t,e,n){var a;a=t?i.map(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return i.defaults({name:t},n)})):[{name:"value",type:"float"}];var s=new r(a,n),l=new r(a,n),u=new r([],n),c=i.map(n.get("data"),i.curry(h,e,t,n));t&&(c=i.filter(c,i.curry(p,t)));var d=t?o.dimValueGetter:function(t){return t.value};return s.initData(i.map(c,(function(t){return t[0]})),null,d),l.initData(i.map(c,(function(t){return t[1]})),null,d),u.initData(i.map(c,(function(t){return t[2]}))),u.hasItemOption=!0,{from:s,to:l,line:u}}t.exports=v},"30a3":function(t,e,n){var i=n("6d8b"),r=n("607d"),a=r.Dispatcher,o=n("98b7"),s=n("06ad"),l=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,a.call(this)};l.prototype={constructor:l,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0],c=Math.max(1/i.scale,0);o[0]=(o[0]-u)*c+u,o[1]=(o[1]-u)*c+u;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return a(0,o,[0,100],0,d.minSpan,d.maxSpan),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:c((function(t,e,n,i,r,a){var o=h[i]([a.oldX,a.oldY],[a.newX,a.newY],e,r,n);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength})),scrollMove:c((function(t,e,n,i,r,a){var o=h[i]([0,0],[a.scrollDelta,a.scrollDelta],e,r,n);return o.signal*(t[1]-t[0])*a.scrollDelta}))};function c(t){return function(e,n,i,r){var o=this._range,s=o.slice(),l=e.axisModels[0];if(l){var u=t(s,l,e,n,i,r);return a(u,s,[0,100],"all"),this._range=s,o[0]!==s[0]||o[1]!==s[1]?s:void 0}}}var h={grid:function(t,e,n,i,r){var a=n.axis,o={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,n,i,r){var a=n.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,n,i,r){var a=n.axis,o=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},d=l;t.exports=d},3301:function(t,e,n){var i=n("6d8b"),r=n("6179"),a=n("b1d4"),o=n("93d0"),s=o.SOURCE_FORMAT_ORIGINAL,l=n("2f45"),u=l.getDimensionTypeByAxis,c=n("e0d3"),h=c.getDataItemValue,d=n("2039"),f=n("8b7f"),p=f.getCoordSysInfoBySeries,g=n("ec6f"),v=n("ee1a"),m=v.enableDataStack,y=n("0f99"),x=y.makeSeriesEncodeForAxisCoordSys;function _(t,e,n){n=n||{},g.isInstance(t)||(t=g.seriesDataToSource(t));var o,s=e.get("coordinateSystem"),l=d.get(s),c=p(e);c&&(o=i.map(c.coordSysDims,(function(t){var e={name:t},n=c.axisMap.get(t);if(n){var i=n.get("type");e.type=u(i)}return e}))),o||(o=l&&(l.getDimensionsInfo?l.getDimensionsInfo():l.dimensions.slice())||["x","y"]);var h,f,v=a(t,{coordDimensions:o,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?i.curry(x,o,e):null});c&&i.each(v,(function(t,e){var n=t.coordDim,i=c.categoryAxisMap.get(n);i&&(null==h&&(h=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(f=!0)})),f||null==h||(v[h].otherDims.itemName=0);var y=m(e,v),_=new r(v,e);_.setCalculationInfo(y);var w=null!=h&&b(t)?function(t,e,n,i){return i===h?n:this.defaultDimValueGetter(t,e,n,i)}:null;return _.hasItemOption=!1,_.initData(t,null,w),_}function b(t){if(t.sourceFormat===s){var e=w(t.data||[]);return null!=e&&!i.isArray(h(e))}}function w(t){var e=0;while(e0?1:o<0?-1:0}function x(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function _(t,e,n,i,a,o,s,l,c,h){var d=c.valueDim,f=c.categoryDim,p=Math.abs(n[f.wh]),g=t.getItemVisual(e,"symbolSize");r.isArray(g)?g=g.slice():(null==g&&(g="100%"),g=[g,g]),g[f.index]=u(g[f.index],p),g[d.index]=u(g[d.index],i?p:Math.abs(o)),h.symbolSize=g;var v=h.symbolScale=[g[0]/l,g[1]/l];v[d.index]*=(c.isHorizontal?-1:1)*s}function b(t,e,n,i,r){var a=t.get(f)||0;a&&(g.attr({scale:e.slice(),rotation:n}),g.updateTransform(),a/=g.getLineScale(),a*=e[i.valueDim.index]),r.valueLineWidth=a}function w(t,e,n,i,a,o,s,l,h,d,f,p){var g=f.categoryDim,v=f.valueDim,m=p.pxSign,y=Math.max(e[v.index]+l,0),x=y;if(i){var _=Math.abs(h),b=r.retrieve(t.get("symbolMargin"),"15%")+"",w=!1;b.lastIndexOf("!")===b.length-1&&(w=!0,b=b.slice(0,b.length-1)),b=u(b,e[v.index]);var S=Math.max(y+2*b,0),M=w?0:2*b,A=c(i),I=A?i:V((_+M)/S),T=_-I*y;b=T/2/(w?I:I-1),S=y+2*b,M=w?0:2*b,A||"fixed"===i||(I=d?V((Math.abs(d)+M)/S):0),x=I*S-M,p.repeatTimes=I,p.symbolMargin=b}var C=m*(x/2),D=p.pathPosition=[];D[g.index]=n[g.wh]/2,D[v.index]="start"===s?C:"end"===s?h-C:h/2,o&&(D[0]+=o[0],D[1]+=o[1]);var L=p.bundlePosition=[];L[g.index]=n[g.xy],L[v.index]=n[v.xy];var P=p.barRectShape=r.extend({},n);P[v.wh]=m*Math.max(Math.abs(n[v.wh]),Math.abs(D[v.index]+C)),P[g.wh]=n[g.wh];var k=p.clipShape={};k[g.xy]=-n[g.xy],k[g.wh]=f.ecSize[g.wh],k[v.xy]=0,k[v.wh]=n[v.wh]}function S(t){var e=t.symbolPatternSize,n=s(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function M(t,e,n,i){var r=t.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,c=0,h=a[e.valueDim.index]+o+2*n.symbolMargin;for(R(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c0:i<0)&&(r=u-1-t),e[l.index]=h*(r-u/2+.5)+s[l.index],{position:e,scale:n.symbolScale.slice(),rotation:n.rotation}}function g(){R(t,(function(t){t.trigger("emphasis")}))}function v(){R(t,(function(t){t.trigger("normal")}))}}function A(t,e,n,i){var r=t.__pictorialBundle,a=t.__pictorialMainPath;function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}a?z(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(a=t.__pictorialMainPath=S(n),r.add(a),z(a,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),a.on("mouseover",o).on("mouseout",s)),P(a,n)}function I(t,e,n){var i=r.extend({},e.barRectShape),o=t.__pictorialBarRect;o?z(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new a.Rect({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function T(t,e,n,i){if(n.symbolClip){var o=t.__pictorialClipPath,s=r.extend({},n.clipShape),l=e.valueDim,u=n.animationModel,c=n.dataIndex;if(o)a.updateProps(o,{shape:s},u,c);else{s[l.wh]=0,o=new a.Rect({shape:s}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var h={};h[l.wh]=n.clipShape[l.wh],a[i?"updateProps":"initProps"](o,{shape:h},u,c)}}}function C(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=D,n.isAnimationEnabled=L,n}function D(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function L(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function P(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:n.slice()},400,"elasticOut")}))}function k(t,e,n,i){var r=new a.Group,o=new a.Group;return r.add(o),r.__pictorialBundle=o,o.attr("position",n.bundlePosition.slice()),n.symbolRepeat?M(r,e,n):A(r,e,n),I(r,n,i),T(r,e,n,i),r.__pictorialShapeStr=N(t,n),r.__pictorialSymbolMeta=n,r}function O(t,e,n){var i=n.animationModel,r=n.dataIndex,o=t.__pictorialBundle;a.updateProps(o,{position:n.bundlePosition.slice()},i,r),n.symbolRepeat?M(t,e,n,!0):A(t,e,n,!0),I(t,n,!0),T(t,e,n,!0)}function E(t,e,n,i){var o=i.__pictorialBarRect;o&&(o.style.text=null);var s=[];R(i,(function(t){s.push(t)})),i.__pictorialMainPath&&s.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),r.each(s,(function(t){a.updateProps(t,{scale:[0,0]},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function N(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function R(t,e,n){r.each(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function z(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&a[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function B(t,e,n){var i=n.color,o=n.dataIndex,s=n.itemModel,l=s.getModel("itemStyle").getItemStyle(["color"]),u=s.getModel("emphasis.itemStyle").getItemStyle(),c=s.getShallow("cursor");R(t,(function(t){t.setColor(i),t.setStyle(r.defaults({fill:i,opacity:n.opacity},l)),a.setHoverStyle(t,u),c&&(t.cursor=c),t.z2=n.z2}));var h={},f=e.valueDim.posDesc[+(n.boundingLength>0)],p=t.__pictorialBarRect;d(p.style,h,s,i,e.seriesModel,o,f),a.setHoverStyle(p,h)}function V(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var G=v;t.exports=G},"340d":function(t,e,n){var i=n("6d8b"),r=n("e887"),a=n("4e47"),o=n("80f0"),s=n("eda2"),l=s.windowOpen,u="sunburstRootToNode",c=r.extend({type:"sunburst",init:function(){},render:function(t,e,n,r){var s=this;this.seriesModel=t,this.api=n,this.ecModel=e;var l=t.getData(),u=l.tree.root,c=t.getViewRoot(),h=this.group,d=t.get("renderLabelForZeroData"),f=[];c.eachNode((function(t){f.push(t)}));var p=this._oldChildren||[];if(m(f,p),_(u,c),r&&r.highlight&&r.highlight.piece){var g=t.getShallow("highlightPolicy");r.highlight.piece.onEmphasis(g)}else if(r&&r.unhighlight){var v=this.virtualPiece;!v&&u.children.length&&(v=u.children[0].piece),v&&v.onNormal()}function m(t,e){function n(t){return t.getId()}function r(n,i){var r=null==n?null:t[n],a=null==i?null:e[i];y(r,a)}0===t.length&&0===e.length||new o(e,t,n,n).add(r).update(r).remove(i.curry(r,null)).execute()}function y(n,i){if(d||!n||n.getValue()||(n=null),n!==u&&i!==u)if(i&&i.piece)n?(i.piece.updateData(!1,n,"normal",t,e),l.setItemGraphicEl(n.dataIndex,i.piece)):x(i);else if(n){var r=new a(n,t,e);h.add(r),l.setItemGraphicEl(n.dataIndex,r)}}function x(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}function _(n,i){if(i.depth>0){s.virtualPiece?s.virtualPiece.updateData(!1,n,"normal",t,e):(s.virtualPiece=new a(n,t,e),h.add(s.virtualPiece)),i.piece._onclickEvent&&i.piece.off("click",i.piece._onclickEvent);var r=function(t){s._rootToNode(i.parentNode)};i.piece._onclickEvent=r,s.virtualPiece.on("click",r)}else s.virtualPiece&&(h.remove(s.virtualPiece),s.virtualPiece=null)}this._initEvents(),this._oldChildren=f},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode((function(i){if(!n&&i.piece&&i.piece.childAt(0)===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var a=i.getModel(),o=a.get("link");if(o){var s=a.get("target",!0)||"_blank";l(o,s)}}n=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:u,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData(),i=n.getItemLayout(0);if(i){var r=t[0]-i.cx,a=t[1]-i.cy,o=Math.sqrt(r*r+a*a);return o<=i.r&&o>=i.r0}}}),h=c;t.exports=h},"342d":function(t,e,n){var i=n("cbe5"),r=n("20c8"),a=n("ee84"),o=Math.sqrt,s=Math.sin,l=Math.cos,u=Math.PI,c=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},h=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(c(t)*c(e))},d=function(t,e){return(t[0]*e[1]1&&(c*=o(_),f*=o(_));var b=(r===a?-1:1)*o((c*c*(f*f)-c*c*(x*x)-f*f*(y*y))/(c*c*(x*x)+f*f*(y*y)))||0,w=b*c*x/f,S=b*-f*y/c,M=(t+n)/2+l(m)*w-s(m)*S,A=(e+i)/2+s(m)*w+l(m)*S,I=d([1,0],[(y-w)/c,(x-S)/f]),T=[(y-w)/c,(x-S)/f],C=[(-1*y-w)/c,(-1*x-S)/f],D=d(T,C);h(T,C)<=-1&&(D=u),h(T,C)>=1&&(D=0),0===a&&D>0&&(D-=2*u),1===a&&D<0&&(D+=2*u),v.addData(g,M,A,c,f,I,D,m,a)}var p=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,g=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function v(t){if(!t)return new r;for(var e,n=0,i=0,a=n,o=i,s=new r,l=r.CMD,u=t.match(p),c=0;c=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:y/2},d="vertical"===i?r.height:r.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,v=p?f.get("itemGap"):0,m=g+v,x=t.get("label.rotate")||0;x=x*y/180;var b=f.get("position",!0),w=p&&f.get("showPlayBtn",!0),S=p&&f.get("showPrevBtn",!0),M=p&&f.get("showNextBtn",!0),A=0,I=d;return"left"===b||"bottom"===b?(w&&(a=[0,0],A+=m),S&&(o=[A,0],A+=m),M&&(s=[I-g,0],I-=m)):(w&&(a=[I-g,0],I-=m),S&&(o=[0,0],A+=m),M&&(s=[I-g,0],I-=m)),l=[A,I],t.get("inverse")&&l.reverse(),{viewRect:r,mainLength:d,orient:i,rotation:h[i],labelRotation:x,labelPosOpt:n,labelAlign:t.get("label.align")||u[i],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||c[i],playPosition:a,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:v}},_position:function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=a.create(),s=r.x,l=r.y+r.height;a.translate(o,o,[-s,-l]),a.rotate(o,o,-y/2),a.translate(o,o,[s,l]),r=r.clone(),r.applyTransform(o)}var u=m(r),c=m(n.getBoundingRect()),h=m(i.getBoundingRect()),d=n.position,f=i.position;f[0]=d[0]=u[0][0];var p=t.labelPosOpt;if(isNaN(p)){var g="+"===p?0:1;x(d,c,u,1,g),x(f,h,u,1,1-g)}else{g=p>=0?0:1;x(d,c,u,1,g),f[1]=d[1]+p}function v(t){var e=t.position;t.origin=[u[0][0]-e[0],u[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function x(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.attr("position",d),i.attr("position",f),n.rotation=i.rotation=t.rotation,v(n),v(i)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),r=d.createScaleByModel(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return t}))};var a=n.getDataExtent("value");r.setExtent(a[0],a[1]),r.niceTicks();var o=new u("value",r,t.axisExtent,i);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new o.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,n,r){var a=n.getExtent();r.get("lineStyle.show")&&e.add(new o.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:i.extend({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,n,i){var r=i.getData(),a=n.scale.getTicks();m(a,(function(t){var a=n.dataToCoord(t),s=r.getItemModel(t),l=s.getModel("itemStyle"),u=s.getModel("emphasis.itemStyle"),c={position:[a,0],onclick:v(this._changeTimeline,this,t)},h=w(s,l,e,c);o.setHoverStyle(h,u.getItemStyle()),s.get("tooltip")?(h.dataIndex=t,h.dataModel=i):h.dataIndex=h.dataModel=null}),this)},_renderAxisLabel:function(t,e,n,i){var r=n.getLabelModel();if(r.get("show")){var a=i.getData(),s=n.getViewLabels();m(s,(function(i){var r=i.tickValue,s=a.getItemModel(r),l=s.getModel("label"),u=s.getModel("emphasis.label"),c=n.dataToCoord(i.tickValue),h=new o.Text({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:v(this._changeTimeline,this,r),silent:!1});o.setTextStyle(h.style,l,{text:i.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),o.setHoverStyle(h,o.setTextStyle({},u))}),this)}},_renderControl:function(t,e,n,i){var r=t.controlSize,a=t.rotation,s=i.getModel("controlStyle").getItemStyle(),l=i.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-r/2,r,r],c=i.getPlayState(),h=i.get("inverse",!0);function d(t,n,c,h){if(t){var d={position:t,origin:[r/2,0],rotation:h?-a:0,rectHover:!0,style:s,onclick:c},f=b(i,n,u,d);e.add(f),o.setHoverStyle(f,l)}}d(t.nextBtnPosition,"controlStyle.nextIcon",v(this._changeTimeline,this,h?"-":"+")),d(t.prevBtnPosition,"controlStyle.prevIcon",v(this._changeTimeline,this,h?"+":"-")),d(t.playPosition,"controlStyle."+(c?"stopIcon":"playIcon"),v(this._handlePlayClick,this,!c),!0)},_renderCurrentPointer:function(t,e,n,i){var r=i.getData(),a=i.getCurrentIndex(),o=r.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=v(s._handlePointerDrag,s),t.ondragend=v(s._handlePointerDragend,s),S(t,a,n,i,!0)},onUpdate:function(t){S(t,a,n,i)}};this._currentPointer=w(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,r=f.asc(i.getExtent().slice());n>r[1]&&(n=r[1]),nl)r.f(t,n=i[l++],e[n]);return t}},3842:function(t,e,n){var i=n("6d8b"),r=1e-4;function a(t){return t.replace(/^\s+|\s+$/g,"")}function o(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function s(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return"string"===typeof t?a(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function l(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function u(t){return t.sort((function(t,e){return t-e})),t}function c(t){if(t=+t,isNaN(t))return 0;var e=1,n=0;while(Math.round(t*e)/e!==t)e*=10,n++;return n}function h(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function d(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function f(t,e,n){if(!t[e])return 0;var r=i.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;var a=Math.pow(10,n),o=i.map(t,(function(t){return(isNaN(t)?0:t)/r*a*100})),s=100*a,l=i.map(o,(function(t){return Math.floor(t)})),u=i.reduce(l,(function(t,e){return t+e}),0),c=i.map(o,(function(t,e){return t-l[e]}));while(uh&&(h=c[f],d=f);++l[d],c[d]=0,++u}return l[e]/a}var p=9007199254740991;function g(t){var e=2*Math.PI;return(t%e+e)%e}function v(t){return t>-r&&t=10&&e++,e}function b(t,e){var n,i=_(t),r=Math.pow(10,i),a=t/r;return n=e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10,t=n*r,i>=-20?+t.toFixed(i<0?-i:0):t}function w(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],a=n-i;return a?r+a*(t[i]-r):r}function S(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0}e.linearMap=o,e.parsePercent=s,e.round=l,e.asc=u,e.getPrecision=c,e.getPrecisionSafe=h,e.getPixelPrecision=d,e.getPercentWithPrecision=f,e.MAX_SAFE_INTEGER=p,e.remRadian=g,e.isRadianAroundZero=v,e.parseDate=y,e.quantity=x,e.quantityExponent=_,e.nice=b,e.quantile=w,e.reformIntervals=S,e.isNumeric=M},"38a2":function(t,e,n){var i=n("2b17"),r=i.retrieveRawValue,a=n("eda2"),o=a.getTooltipMarker,s=a.formatTpl,l=n("e0d3"),u=l.getTooltipRenderMode,c=/\{@(.+?)\}/g,h={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),a=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"color"),c=n.getItemVisual(t,"borderColor"),h=this.ecModel.getComponent("tooltip"),d=h&&h.get("renderMode"),f=u(d),p=this.mainType,g="series"===p,v=n.userOutput;return{componentType:p,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:g?this.subType:null,seriesIndex:this.seriesIndex,seriesId:g?this.id:null,seriesName:g?this.name:null,name:a,dataIndex:r,data:s,dataType:e,value:i,color:l,borderColor:c,dimensionNames:v?v.dimensionNames:null,encode:v?v.encode:null,marker:o({color:l,renderMode:f}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,n,i,a){e=e||"normal";var o=this.getData(n),l=o.getItemModel(t),u=this.getDataParams(t,n);null!=i&&u.value instanceof Array&&(u.value=u.value[i]);var h=l.get("normal"===e?[a||"label","formatter"]:[e,a||"label","formatter"]);if("function"===typeof h)return u.status=e,u.dimensionIndex=i,h(u);if("string"===typeof h){var d=s(h,u);return d.replace(c,(function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),r(o,t,n)}))}},getRawValue:function(t,e){return r(this.getData(e),t)},formatTooltip:function(){}};t.exports=h},3901:function(t,e,n){var i=n("282b"),r=i([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),a={getLineStyle:function(t){var e=r(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[i,i]:[n,n])}};t.exports=a},"392f":function(t,e,n){var i=n("6d8b"),r=i.inherits,a=n("19eb"),o=n("9850");function s(t){a.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}s.prototype.incremental=!0,s.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},s.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},s.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n0?100:20}},getFirstTargetAxisModel:function(){var t;return h((function(e){if(null==t){var n=this.get(e.axisIndex);n.length&&(t=this.dependentModels[e.axis][n[0]])}}),this),t},eachTargetAxis:function(t,e){var n=this.ecModel;h((function(i){c(this.get(i.axisIndex),(function(r){t.call(e,i,r,this,n)}),this)}),this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(t){var e=this.option,n=this.settledOption;c([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),p(this,t)},setCalculatedRange:function(t){var e=this.option;c(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}});function f(t){var e={};return c(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}function p(t,e){var n=t._rangePropMode,i=t.get("rangeMode");c([["start","startValue"],["end","endValue"]],(function(t,r){var a=null!=e[t[0]],o=null!=e[t[1]];a&&!o?n[r]="percent":!a&&o?n[r]="value":i?n[r]=i[r]:a&&(n[r]="percent")}))}var g=d;t.exports=g},"3bbe":function(t,e,n){var i=n("861d");t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var i=n("6547").charAt,r=n("69f3"),a=n("7dd0"),o="String Iterator",s=r.set,l=r.getterFor(o);a(String,"String",(function(t){s(this,{type:o,string:String(t),index:0})}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=i(n,r),e.index+=t.length,{value:t,done:!1})}))},"3cd6":function(t,e,n){var i=n("6d8b"),r=n("48a9"),a=n("607d"),o=n("72b6"),s=n("2306"),l=n("3842"),u=n("ef6a"),c=n("cbb0"),h=n("e0d3"),d=l.linearMap,f=i.each,p=Math.min,g=Math.max,v=12,m=6,y=o.extend({type:"visualMap.continuous",init:function(){y.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var r=this.visualMapModel,a=r.get("textGap"),o=r.itemSize,l=this._shapes.barGroup,u=this._applyTransform([o[0]/2,0===n?-a:o[1]+a],l),c=this._applyTransform(0===n?"bottom":"top",l),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new s.Text({style:{x:u[0],y:u[1],textVerticalAlign:"horizontal"===h?"middle":c,textAlign:"horizontal"===h?c:"center",text:i,textFont:d.getFont(),textFill:d.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,r=e.itemSize,a=this._orient,o=this._useHandle,s=c.getItemAlign(e,this.api,r),l=n.barGroup=this._createBarGroup(s);l.add(n.outOfRange=x()),l.add(n.inRange=x(null,o?M(this._orient):null,i.bind(this._dragHandle,this,"all",!1),i.bind(this._dragHandle,this,"all",!0)));var u=e.textStyleModel.getTextRect("国"),h=g(u.width,u.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(l,0,r,h,a,s),this._createHandle(l,1,r,h,a,s)),this._createIndicator(l,r,h,a),t.add(l)},_createHandle:function(t,e,n,r,o){var l=i.bind(this._dragHandle,this,e,!1),u=i.bind(this._dragHandle,this,e,!0),c=x(_(e,r),M(this._orient),l,u);c.position[0]=n[0],t.add(c);var h=this.visualMapModel.textStyleModel,d=new s.Text({draggable:!0,drift:l,onmousemove:function(t){a.stop(t.event)},ondragend:u,style:{x:0,y:0,text:"",textFont:h.getFont(),textFill:h.getTextColor()}});this.group.add(d);var f=["horizontal"===o?r/2:1.5*r,"horizontal"===o?0===e?-1.5*r:1.5*r:0===e?-r/2:r/2],p=this._shapes;p.handleThumbs[e]=c,p.handleLabelPoints[e]=f,p.handleLabels[e]=d},_createIndicator:function(t,e,n,i){var r=x([[0,0]],"move");r.position[0]=e[0],r.attr({invisible:!0,silent:!0}),t.add(r);var a=this.visualMapModel.textStyleModel,o=new s.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(o);var l=["horizontal"===i?n/2:m+3,0],u=this._shapes;u.indicator=r,u.indicatorLabel=o,u.indicatorLabelPoint=l},_dragHandle:function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(t,r[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():S(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[d(e[0],n,i,!0),d(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,r=[0,n.itemSize[1]];u(e,i,r,t,0);var a=n.getExtent();this._dataInterval=[d(i[0],r,a,!0),d(i[1],r,a,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,r=[0,e.itemSize[1]],a=t?r:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,"inRange"),s=this._createBarVisual(n,n,r,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,o)},_createBarVisual:function(t,e,n,i){var a={forceState:i,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,a),s=[this.getControllerVisual(t[0],"symbolSize",a),this.getControllerVisual(t[1],"symbolSize",a)],l=this._createBarPoints(n,s);return{barColor:new r(0,0,0,1,o),barPoints:l,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var n=100,i=[],r=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var a=1;at[1])break;i.push({color:this.getControllerVisual(o,"color",e),offset:a/n})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new s.Group("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,a=n.handleLabels;f([0,1],(function(o){var l=r[o];l.setStyle("fill",e.handlesColor[o]),l.position[1]=t[o];var u=s.applyTransform(n.handleLabelPoints[o],s.getTransform(l,this.group));a[o].setStyle({x:u[0],y:u[1],text:i.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",n.barGroup)})}),this)}},_showIndicator:function(t,e,n,i){var r=this.visualMapModel,a=r.getExtent(),o=r.itemSize,l=[0,o[1]],u=d(t,a,l,!0),c=this._shapes,h=c.indicator;if(h){h.position[1]=u,h.attr("invisible",!1),h.setShape("points",b(!!n,i,u,o[1]));var f={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",f);h.setStyle("fill",p);var g=s.applyTransform(c.indicatorLabelPoint,s.getTransform(h,this.group)),v=c.indicatorLabel;v.attr("invisible",!1);var m=this._applyTransform("left",c.barGroup),y=this._orient;v.setStyle({text:(n||"")+r.formatValueText(e),textVerticalAlign:"horizontal"===y?m:"middle",textAlign:"horizontal"===y?"center":m,x:g[0],y:g[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);i[1]=p(g(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var r=[0,i[1]],a=n.getExtent();t=p(g(r[0],t),r[1]);var o=w(n,a,r),s=[t-o,t+o],l=d(t,r,a,!0),u=[d(s[0],r,a,!0),d(s[1],r,a,!0)];s[0]r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var f=this._hoverLinkDataIndices,v=[];(e||S(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var m=h.compressBatches(f,v);this._dispatchHighDown("downplay",c.makeHighDownBatch(m[0],n)),this._dispatchHighDown("highlight",c.makeHighDownBatch(m[1],n))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=e.dataIndex){var i=this.ecModel.getSeriesByIndex(e.seriesIndex);if(n.isTargetSeries(i)){var r=i.getData(e.dataType),a=r.get(n.getDataDimension(r),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",c.makeHighDownBatch(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,r){var a=s.getTransform(e,r?null:this.group);return s[i.isArray(t)?"applyTransform":"transformDirection"](t,a,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function x(t,e,n,i){return new s.Polygon({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){a.stop(t.event)},ondragend:i})}function _(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function b(t,e,n,i){return t?[[0,-p(e,g(n,0))],[m,0],[0,p(e,g(i-n,0))]]:[[0,0],[5,-5],[5,5]]}function w(t,e,n){var i=v/2,r=t.get("hoverLinkDataSize");return r&&(i=d(r,e,n,!0)/2),i}function S(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function M(t){return"vertical"===t?"ns-resize":"ew-resize"}var A=y;t.exports=A},"3eba":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("697e7")),a=n("6d8b"),o=n("41ef"),s=n("22d1"),l=n("04f6"),u=n("1fab"),c=n("7e63"),h=n("843e"),d=n("2039"),f=n("ca98"),p=n("fb05"),g=n("d15d"),v=n("6cb7"),m=n("4f85"),y=n("b12f"),x=n("e887"),_=n("2306"),b=n("e0d3"),w=n("88b3"),S=w.throttle,M=n("fd63"),A=n("b809"),I=n("998c"),T=n("69ff"),C=n("c533"),D=n("f219");n("0352");var L=n("ec34"),P=a.assert,k=a.each,O=a.isFunction,E=a.isObject,N=v.parseClassType,R="4.8.0",z={zrender:"4.3.1"},B=1,V=1e3,G=800,F=900,H=5e3,W=1e3,j=1100,U=2e3,Z=3e3,Y=3500,X=4e3,q=5e3,$={PROCESSOR:{FILTER:V,SERIES_FILTER:G,STATISTIC:H},VISUAL:{LAYOUT:W,PROGRESSIVE_LAYOUT:j,GLOBAL:U,CHART:Z,POST_CHART_LAYOUT:Y,COMPONENT:X,BRUSH:q}},K="__flagInMainProcess",J="__optionUpdated",Q=/^[a-zA-Z0-9_]+$/;function tt(t,e){return function(n,i,r){e||!this._disposed?(n=n&&n.toLowerCase(),u.prototype[t].call(this,n,i,r)):_t(this.id)}}function et(){u.call(this)}function nt(t,e,n){n=n||{},"string"===typeof e&&(e=kt[e]),this.id,this.group,this._dom=t;var i="canvas",o=this._zr=r.init(t,{renderer:n.renderer||i,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=S(a.bind(o.flush,o),17);e=a.clone(e);e&&p(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new d;var s=this._api=Mt(this);function c(t,e){return t.__prio-e.__prio}l(Pt,c),l(Ct,c),this._scheduler=new T(this,s,Ct,Pt),u.call(this,this._ecEventProcessor=new At),this._messageCenter=new et,this._initEvents(),this.resize=a.bind(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),dt(o,this),a.setAsPrimitive(this)}et.prototype.on=tt("on",!0),et.prototype.off=tt("off",!0),et.prototype.one=tt("one",!0),a.mixin(et,u);var it=nt.prototype;function rt(t,e,n){if(this._disposed)_t(this.id);else{var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=b.parseFinder(r,e);for(var o=0;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},it.getDom=function(){return this._dom},it.getZr=function(){return this._zr},it.setOption=function(t,e,n){if(this._disposed)_t(this.id);else{var i;if(E(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[K]=!0,!this._model||e){var r=new f(this._api),a=this._theme,o=this._model=new c;o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,Dt),n?(this[J]={silent:i},this[K]=!1):(ot(this),at.update.call(this),this._zr.flush(),this[J]=!1,this[K]=!1,ct.call(this,i),ht.call(this,i))}},it.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},it.getModel=function(){return this._model},it.getOption=function(){return this._model&&this._model.getOption()},it.getWidth=function(){return this._zr.getWidth()},it.getHeight=function(){return this._zr.getHeight()},it.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},it.getRenderedCanvas=function(t){if(s.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},it.getSvgDataURL=function(){if(s.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return a.each(e,(function(t){t.stopAnimation(!0)})),t.painter.toDataURL()}},it.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;k(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return k(i,(function(t){t.group.ignore=!1})),a}_t(this.id)},it.getConnectedDataURL=function(t){if(this._disposed)_t(this.id);else if(s.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,o=Math.max,l=1/0;if(Nt[n]){var u=l,c=l,h=-l,d=-l,f=[],p=t&&t.pixelRatio||1;a.each(Et,(function(r,s){if(r.group===n){var l=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(a.clone(t)),p=r.getDom().getBoundingClientRect();u=i(p.left,u),c=i(p.top,c),h=o(p.right,h),d=o(p.bottom,d),f.push({dom:l,left:p.left,top:p.top})}})),u*=p,c*=p,h*=p,d*=p;var g=h-u,v=d-c,m=a.createCanvas(),y=r.init(m,{renderer:e?"svg":"canvas"});if(y.resize({width:g,height:v}),e){var x="";return k(f,(function(t){var e=t.left-u,n=t.top-c;x+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=x,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new _.Rect({shape:{x:0,y:0,width:g,height:v},style:{fill:t.connectedBackgroundColor}})),k(f,(function(t){var e=new _.Image({style:{x:t.left*p-u,y:t.top*p-c,image:t.dom}});y.add(e)})),y.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},it.convertToPixel=a.curry(rt,"convertToPixel"),it.convertFromPixel=a.curry(rt,"convertFromPixel"),it.containPixel=function(t,e){if(!this._disposed){var n,i=this._model;return t=b.parseFinder(i,t),a.each(t,(function(t,i){i.indexOf("Models")>=0&&a.each(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}}),this)}),this),!!n}_t(this.id)},it.getVisual=function(t,e){var n=this._model;t=b.parseFinder(n,t,{defaultMainType:"series"});var i=t.seriesModel,r=i.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=a?r.getItemVisual(a,e):r.getVisual(e)},it.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},it.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var at={prepareAndUpdate:function(t){ot(this),at.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),lt(this,e),r.update(e,n),pt(e),a.performVisualTasks(e,t),gt(this,e,n,t);var l=e.get("backgroundColor")||"transparent";if(s.canvasSupported)i.setBackgroundColor(l);else{var u=o.parse(l);l=o.stringify(u,"rgb"),0===u[3]&&(l="transparent")}yt(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent((function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)}));var o=a.createHashMap();e.eachSeries((function(r){var a=n._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,i,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)})),pt(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),mt(n,e,i,t,o),yt(e,this._api)}},updateView:function(t){var e=this._model;e&&(x.markUpdateMethod(t,"updateView"),pt(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),gt(this,this._model,this._api,t),yt(e,this._api))},updateVisual:function(t){at.update.call(this,t)},updateLayout:function(t){at.update.call(this,t)}};function ot(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),ft(t,"component",e,n),ft(t,"chart",e,n),n.plan()}function st(t,e,n,i,r){var o=t._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u=n.excludeSeriesId;null!=u&&(u=a.createHashMap(b.normalizeToArray(u))),o&&o.eachComponent(l,(function(e){u&&null!=u.get(e.id)||c(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else k(t._componentsViews.concat(t._chartsViews),c);function c(i){i&&i.__alive&&i[e]&&i[e](i.__model,o,t._api,n)}}function lt(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries((function(t){i.updateStreamModes(t,n[t.__viewId])}))}function ut(t,e){var n=t.type,i=t.escapeConnect,r=It[n],o=r.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&N(s[0]),this[K]=!0;var u=[t],c=!1;t.batch&&(c=!0,u=a.map(t.batch,(function(e){return e=a.defaults(a.extend({},e),t),e.batch=null,e})));var h,d=[],f="highlight"===n||"downplay"===n;k(u,(function(t){h=r.action(t,this._model,this._api),h=h||a.extend({},t),h.type=o.event||h.type,d.push(h),f?st(this,l,t,"series"):s&&st(this,l,t,s.main,s.sub)}),this),"none"===l||f||s||(this[J]?(ot(this),at.update.call(this,t),this[J]=!1):at[l].call(this,t)),h=c?{type:o.event||n,escapeConnect:i,batch:d}:d[0],this[K]=!1,!e&&this._messageCenter.trigger(h.type,h)}function ct(t){var e=this._pendingActions;while(e.length){var n=e.shift();ut.call(this,n,t)}}function ht(t){!t&&this.trigger("updated")}function dt(t,e){t.on("rendered",(function(){e.trigger("rendered"),!t.animation.isFinished()||e[J]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))}function ft(t,e,n,i){for(var r="component"===e,a=r?t._componentsViews:t._chartsViews,o=r?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;ue.get("hoverLayerThreshold")&&!s.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.useHoverLayer=!0}))}}))}function wt(t,e){var n=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.setStyle("blend",n)}))}))}function St(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}function Mt(t){var e=t._coordSysMgr;return a.extend(new h(t),{getCoordinateSystems:a.bind(e.getCoordinateSystems,e),getComponentByElement:function(e){while(e){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function At(){this.eventInfo}it._initEvents=function(){k(xt,(function(t){var e=function(e){var n,i=this.getModel(),r=e.target,o="globalout"===t;if(o)n={};else if(r&&null!=r.dataIndex){var s=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=s&&s.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=a.extend({},r.eventData));if(n){var l=n.componentType,u=n.componentIndex;"markLine"!==l&&"markPoint"!==l&&"markArea"!==l||(l="series",u=n.seriesIndex);var c=l&&null!=u&&i.getComponent(l,u),h=c&&this["series"===c.mainType?"_chartsMap":"_componentsMap"][c.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:c,view:h},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),k(Tt,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},it.isDisposed=function(){return this._disposed},it.clear=function(){this._disposed?_t(this.id):this.setOption({series:[]},!0)},it.dispose=function(){if(this._disposed)_t(this.id);else{this._disposed=!0,b.setAttribute(this.getDom(),Bt,"");var t=this._api,e=this._model;k(this._componentsViews,(function(n){n.dispose(e,t)})),k(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete Et[this.id]}},a.mixin(nt,u),At.prototype={constructor:At,normalizeQuery:function(t){var e={},n={},i={};if(a.isString(t)){var r=N(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};a.each(t,(function(t,r){for(var a=!1,l=0;l0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,a=!0)}}s.hasOwnProperty(r)&&(n[r]=t,a=!0),a||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a));function c(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var It={},Tt={},Ct=[],Dt=[],Lt=[],Pt=[],kt={},Ot={},Et={},Nt={},Rt=new Date-0,zt=new Date-0,Bt="_echarts_instance_";function Vt(t){var e=0,n=1,i=2,r="__connectUpdateStatus";function a(t,e){for(var n=0;n-_}function S(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==f}function M(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==f}function A(t,e){e&&I(t,"transform","matrix("+d.call(e,",")+")")}function I(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function T(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function C(t,e,n,i){if(S(e,n)){var r=n?e.textFill:e.fill;r="transparent"===r?f:r,I(t,"fill",r),I(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else I(t,"fill",f);if(M(e,n)){var a=n?e.textStroke:e.stroke;a="transparent"===a?f:a,I(t,"stroke",a);var o=n?e.textStrokeWidth:e.lineWidth,s=!n&&e.strokeNoScale?i.getLineScale():1;I(t,"stroke-width",o/s),I(t,"paint-order",n?"stroke":"fill"),I(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(I(t,"stroke-dasharray",e.lineDash.join(",")),I(t,"stroke-dashoffset",p(e.lineDashOffset||0))):I(t,"stroke-dasharray",""),e.lineCap&&I(t,"stroke-linecap",e.lineCap),e.lineJoin&&I(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&I(t,"stroke-miterlimit",e.miterLimit)}else I(t,"stroke",f)}function D(t){for(var e=[],n=t.data,i=t.len(),r=0;r=y:-_>=y),T=_>0?_%y:_%y+y,C=!1;C=!!I||!w(A)&&T>=m===!!M;var D=b(l+c*v(f)),L=b(u+d*g(f));I&&(_=M?y-1e-4:1e-4-y,C=!0,9===r&&e.push("M",D,L));var P=b(l+c*v(f+_)),k=b(u+d*g(f+_));e.push("A",b(c),b(d),p(S*x),+C,+M,P,k);break;case h.Z:o="Z";break;case h.R:P=b(n[r++]),k=b(n[r++]);var O=b(n[r++]),E=b(n[r++]);e.push("M",P,k,"L",P+O,k,"L",P+O,k+E,"L",P,k+E,"L",P,k);break}o&&e.push(o);for(var N=0;Nk){for(;L255?255:t}function o(t){return t=Math.round(t),t<0?0:t>360?360:t}function s(t){return t<0?0:t>1?1:t}function l(t){return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function u(t){return t.length&&"%"===t.charAt(t.length-1)?s(parseFloat(t)/100):s(parseFloat(t))}function c(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function h(t,e,n){return t+(e-t)*n}function d(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i(20),g=null;function v(t,e){g&&f(g,e),g=p.put(t,g||e.slice())}function m(t,e){if(t){e=e||[];var n=p.get(t);if(n)return f(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in r)return f(e,r[i]),v(t,e),e;if("#"!==i.charAt(0)){var a=i.indexOf("("),o=i.indexOf(")");if(-1!==a&&o+1===i.length){var s=i.substr(0,a),c=i.substr(a+1,o-(a+1)).split(","),h=1;switch(s){case"rgba":if(4!==c.length)return void d(e,0,0,0,1);h=u(c.pop());case"rgb":return 3!==c.length?void d(e,0,0,0,1):(d(e,l(c[0]),l(c[1]),l(c[2]),h),v(t,e),e);case"hsla":return 4!==c.length?void d(e,0,0,0,1):(c[3]=u(c[3]),y(c,e),v(t,e),e);case"hsl":return 3!==c.length?void d(e,0,0,0,1):(y(c,e),v(t,e),e);default:return}}d(e,0,0,0,1)}else{if(4===i.length){var g=parseInt(i.substr(1),16);return g>=0&&g<=4095?(d(e,(3840&g)>>4|(3840&g)>>8,240&g|(240&g)>>4,15&g|(15&g)<<4,1),v(t,e),e):void d(e,0,0,0,1)}if(7===i.length){g=parseInt(i.substr(1),16);return g>=0&&g<=16777215?(d(e,(16711680&g)>>16,(65280&g)>>8,255&g,1),v(t,e),e):void d(e,0,0,0,1)}}}}function y(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=u(t[1]),r=u(t[2]),o=r<=.5?r*(i+1):r+i-r*i,s=2*r-o;return e=e||[],d(e,a(255*c(s,o,n+1/3)),a(255*c(s,o,n)),a(255*c(s,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function x(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-h:r===s?e=1/3+c-d:a===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function _(t,e){var n=m(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return C(n,4===n.length?"rgba":"rgb")}}function b(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function w(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),l=e[r],u=e[o],c=i-r;return n[0]=a(h(l[0],u[0],c)),n[1]=a(h(l[1],u[1],c)),n[2]=a(h(l[2],u[2],c)),n[3]=s(h(l[3],u[3],c)),n}}var S=w;function M(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),l=m(e[r]),u=m(e[o]),c=i-r,d=C([a(h(l[0],u[0],c)),a(h(l[1],u[1],c)),a(h(l[2],u[2],c)),s(h(l[3],u[3],c))],"rgba");return n?{color:d,leftIndex:r,rightIndex:o,value:i}:d}}var A=M;function I(t,e,n,i){if(t=m(t),t)return t=x(t),null!=e&&(t[0]=o(e)),null!=n&&(t[1]=u(n)),null!=i&&(t[2]=u(i)),C(y(t),"rgba")}function T(t,e){if(t=m(t),t&&null!=e)return t[3]=s(e),C(t,"rgba")}function C(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}e.parse=m,e.lift=_,e.toHex=b,e.fastLerp=w,e.fastMapToColor=S,e.lerp=M,e.mapToColor=A,e.modifyHSL=I,e.modifyAlpha=T,e.stringify=C},"428f":function(t,e,n){var i=n("da84");t.exports=i},"42e5":function(t,e){var n=function(t){this.colorStops=t||[]};n.prototype={constructor:n,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var i=n;t.exports=i},"42f6":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("22d1"),o=n("07d7"),s=n("82f9"),l=n("eda2"),u=n("3842"),c=n("2306"),h=n("133d"),d=n("f934"),f=n("4319"),p=n("17d6"),g=n("697e"),v=n("ff2e"),m=n("e0d3"),y=m.getTooltipRenderMode,x=r.bind,_=r.each,b=u.parsePercent,w=new c.Rect({shape:{x:-1,y:-1,width:2,height:2}}),S=i.extendComponentView({type:"tooltip",init:function(t,e){if(!a.node){var n,i=t.getComponent("tooltip"),r=i.get("renderMode");this._renderMode=y(r),"html"===this._renderMode?(n=new o(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="
"):(n=new s(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,n){if(!a.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");p.register("itemTooltip",this._api,x((function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!a.node){var r=A(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=w;s.position=[i.x,i.y],s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=h(i,e),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(A(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s){var l=s.getData();t=M([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}}},_tryShow:function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=r.bind(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],s=[],u=M([e.tooltipOption,i]),c=this._renderMode,h=this._newLine,d={};_(t,(function(t){_(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,a=[];if(e&&null!=i){var u=v.getValueLabel(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);r.each(t.seriesDataIndices,(function(o){var l=n.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,f=l&&l.getDataParams(h);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=g.getAxisRawValue(e.axis,i),f.axisValueLabel=u,f){s.push(f);var p,v=l.formatTooltip(h,!0,null,c);if(r.isObject(v)){p=v.html;var m=v.markers;r.merge(d,m)}else p=v;a.push(p)}}));var f=u;"html"!==c?o.push(a.join(h)):o.push((f?l.encodeHTML(f)+h:"")+a.join(h))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(u,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(u,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(u,o,s,Math.random(),a[0],a[1],f,void 0,d)}))},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,a=e.seriesIndex,o=i.getSeriesByIndex(a),s=e.dataModel||o,l=e.dataIndex,u=e.dataType,c=s.getData(u),h=M([c.getItemModel(l),s,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),d=h.get("trigger");if(null==d||"item"===d){var f,p,g=s.getDataParams(l,u),v=s.formatTooltip(l,!1,u,this._renderMode);r.isObject(v)?(f=v.html,p=v.markers):(f=v,p=null);var m="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,f,g,m,t.offsetX,t.offsetY,t.position,t.target,p)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"===typeof i){var r=i;i={content:r,formatter:r}}var a=new f(i,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,o,s,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var c=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var d=e;if(h&&"string"===typeof h)d=l.formatTpl(h,n,!0);else if("function"===typeof h){var f=x((function(e,i){e===this._ticket&&(c.setContent(i,u,t),this._updatePosition(t,o,r,a,c,n,s))}),this);this._ticket=i,d=h(n,i,f)}c.setContent(d,u,t),c.show(t),this._updatePosition(t,o,r,a,c,n,s)}},_updatePosition:function(t,e,n,i,a,o,s){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var c=a.getSize(),h=t.get("align"),f=t.get("verticalAlign"),p=s&&s.getBoundingRect().clone();if(s&&p.applyTransform(s.transform),"function"===typeof e&&(e=e([n,i],o,a.el,p,{viewSize:[l,u],contentSize:c.slice()})),r.isArray(e))n=b(e[0],l),i=b(e[1],u);else if(r.isObject(e)){e.width=c[0],e.height=c[1];var g=d.getLayoutRect(e,{width:l,height:u});n=g.x,i=g.y,h=null,f=null}else if("string"===typeof e&&s){var v=C(e,p,c);n=v[0],i=v[1]}else{v=I(n,i,a,l,u,h?null:20,f?null:20);n=v[0],i=v[1]}if(h&&(n-=D(h)?c[0]/2:"right"===h?c[0]:0),f&&(i-=D(f)?c[1]/2:"bottom"===f?c[1]:0),t.get("confine")){v=T(n,i,a,l,u);n=v[0],i=v[1]}a.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&_(e,(function(e,i){var r=e.dataByAxis||{},a=t[i]||{},o=a.dataByAxis||[];n&=r.length===o.length,n&&_(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length,n&&_(r,(function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){a.node||(this._tooltipContent.dispose(),p.unregister("itemTooltip",e))}});function M(t){var e=t.pop();while(t.length){var n=t.pop();n&&(f.isInstance(n)&&(n=n.get("tooltip",!0)),"string"===typeof n&&(n={formatter:n}),e=new f(n,e,e.ecModel))}return e}function A(t,e){return t.dispatchAction||r.bind(e.dispatchAction,e)}function I(t,e,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>i?t-=l+a:t+=a),null!=o&&(e+u+o>r?e-=u+o:e+=o),[t,e]}function T(t,e,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,i)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function C(t,e,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":o=e.x+l/2-i/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-i/2,s=e.y+u+a;break;case"left":o=e.x-i-a,s=e.y+u/2-r/2;break;case"right":o=e.x+l+a,s=e.y+u/2-r/2}return[o,s]}function D(t){return"center"===t||"middle"===t}t.exports=S},4319:function(t,e,n){var i=n("6d8b"),r=n("22d1"),a=n("e0d3"),o=a.makeInner,s=n("625e"),l=s.enableClassExtend,u=s.enableClassCheck,c=n("3901"),h=n("9bdb"),d=n("fe21"),f=n("551f"),p=i.mixin,g=o();function v(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function m(t,e,n){for(var i=0;i=0;i--){o=e[i].interval;if(o[0]<=t&&t<=o[1]){a=i;break}}return i>=0&&i=e[0]&&t<=e[1]}}function c(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var h=r.extendChartView({type:"heatmap",render:function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):c(r)&&this._renderOnGeo(r,t,i,n)},incrementalPrepareRender:function(t,e,n){this.group.removeAll()},incrementalRender:function(t,e,n,i){var r=e.coordinateSystem;r&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,n,i,r){var o,l,u=t.coordinateSystem;if("cartesian2d"===u.type){var c=u.getAxis("x"),h=u.getAxis("y");o=c.getBandWidth(),l=h.getBandWidth()}for(var d=this.group,f=t.getData(),p="itemStyle",g="emphasis.itemStyle",v="label",m="emphasis.label",y=t.getModel(p).getItemStyle(["color"]),x=t.getModel(g).getItemStyle(),_=t.getModel(v),b=t.getModel(m),w=u.type,S="cartesian2d"===w?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;M=0?i+=g:i-=g:_>=0?i-=g:i+=g}return i}function p(t,e){var n=[],a=i.quadraticSubdivide,s=[[],[],[]],l=[[],[]],u=[];e/=2,t.eachEdge((function(t,i){var c=t.getLayout(),h=t.getVisual("fromSymbol"),d=t.getVisual("toSymbol");c.__original||(c.__original=[r.clone(c[0]),r.clone(c[1])],c[2]&&c.__original.push(r.clone(c[2])));var p=c.__original;if(null!=c[2]){if(r.copy(s[0],p[0]),r.copy(s[1],p[2]),r.copy(s[2],p[1]),h&&"none"!==h){var g=o(t.node1),v=f(s,p[0],g*e);a(s[0][0],s[1][0],s[2][0],v,n),s[0][0]=n[3],s[1][0]=n[4],a(s[0][1],s[1][1],s[2][1],v,n),s[0][1]=n[3],s[1][1]=n[4]}if(d&&"none"!==d){g=o(t.node2),v=f(s,p[1],g*e);a(s[0][0],s[1][0],s[2][0],v,n),s[1][0]=n[1],s[2][0]=n[2],a(s[0][1],s[1][1],s[2][1],v,n),s[1][1]=n[1],s[2][1]=n[2]}r.copy(c[0],s[0]),r.copy(c[1],s[2]),r.copy(c[2],s[1])}else{if(r.copy(l[0],p[0]),r.copy(l[1],p[1]),r.sub(u,l[1],l[0]),r.normalize(u,u),h&&"none"!==h){g=o(t.node1);r.scaleAndAdd(l[0],l[0],u,g*e)}if(d&&"none"!==d){g=o(t.node2);r.scaleAndAdd(l[1],l[1],u,-g*e)}r.copy(c[0],l[0]),r.copy(c[1],l[1])}}))}t.exports=p},4840:function(t,e,n){var i=n("825a"),r=n("1c0b"),a=n("b622"),o=a("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||void 0==(n=i(a)[o])?e:r(n)}},"48a9":function(t,e,n){var i=n("6d8b"),r=n("42e5"),a=function(t,e,n,i,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=o||!1,r.call(this,a)};a.prototype={constructor:a},i.inherits(a,r);var o=a;t.exports=o},"48ac":function(t,e,n){var i=n("3eba"),r=i.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),a=r;t.exports=a},"48c7":function(t,e,n){var i=n("6d8b"),r=n("6cb7"),a=n("9e47"),o=n("2023"),s=r.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function l(t,e){return e.type||(e.data?"category":"value")}i.merge(s.prototype,o);var u={offset:0};a("x",s,l,u),a("y",s,l,u);var c=s;t.exports=c},4930:function(t,e,n){var i=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},4942:function(t,e,n){var i=n("2cf4"),r=i.debugMode,a=function(){};1===r&&(a=console.error);var o=a;t.exports=o},"49e8":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("d81e"),o=a.updateCenterAndZoom;i.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){var i=e.coordinateSystem;if("geo"===i.type){var a=o(i,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===n&&r.each(e.seriesGroup,(function(t){t.setCenter(a.center),t.setZoom(a.zoom)}))}}))}))},"4a01":function(t,e,n){var i=n("6d8b"),r=n("1fab"),a=n("607d"),o=n("a4fe");function s(t){this.pointerChecker,this._zr=t,this._opt={};var e=i.bind,n=e(l,this),a=e(u,this),o=e(c,this),s=e(h,this),f=e(d,this);r.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,r){this.disable(),this._opt=i.defaults(i.clone(r)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",a),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",f))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",f)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function l(t){if(!(a.isMiddleOrRightButtonOnMouseUpDown(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function u(t){if(this._dragging&&g("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!o.isTaken(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,s=e-i,l=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&a.stop(t.event),p(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:r,newX:e,newY:n})}}function c(t){a.isMiddleOrRightButtonOnMouseUpDown(t)||(this._dragging=!1)}function h(t){var e=g("zoomOnMouseWheel",t,this._opt),n=g("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),a=t.offsetX,o=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1,l=i>0?s:1/s;f(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:a,originY:o})}if(n){var u=Math.abs(i),c=(i>0?1:-1)*(u>3?.4:u>1?.15:.05);f(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:a,originY:o})}}}function d(t){if(!o.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;f(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function f(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(a.stop(i.event),p(t,e,n,i,r))}function p(t,e,n,r,a){a.isAvailableBehavior=i.bind(g,null,n,r),t.trigger(e,a)}function g(t,e,n){var r=n[t];return!t||r&&(!i.isString(r)||e.event[r+"Key"])}i.mixin(s,r);var v=s;t.exports=v},"4a3f":function(t,e,n){var i=n("401b"),r=i.create,a=i.distSquare,o=Math.pow,s=Math.sqrt,l=1e-8,u=1e-4,c=s(3),h=1/3,d=r(),f=r(),p=r();function g(t){return t>-l&&tl||t<-l}function m(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function y(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function x(t,e,n,i,r,a){var l=i+3*(e-n)-t,u=3*(n-2*e+t),d=3*(e-t),f=t-r,p=u*u-3*l*d,v=u*d-9*l*f,m=d*d-3*u*f,y=0;if(g(p)&&g(v))if(g(u))a[0]=0;else{var x=-d/u;x>=0&&x<=1&&(a[y++]=x)}else{var _=v*v-4*p*m;if(g(_)){var b=v/p,w=(x=-u/l+b,-b/2);x>=0&&x<=1&&(a[y++]=x),w>=0&&w<=1&&(a[y++]=w)}else if(_>0){var S=s(_),M=p*u+1.5*l*(-v+S),A=p*u+1.5*l*(-v-S);M=M<0?-o(-M,h):o(M,h),A=A<0?-o(-A,h):o(A,h);x=(-u-(M+A))/(3*l);x>=0&&x<=1&&(a[y++]=x)}else{var I=(2*p*u-3*l*v)/(2*s(p*p*p)),T=Math.acos(I)/3,C=s(p),D=Math.cos(T),L=(x=(-u-2*C*D)/(3*l),w=(-u+C*(D+c*Math.sin(T)))/(3*l),(-u+C*(D-c*Math.sin(T)))/(3*l));x>=0&&x<=1&&(a[y++]=x),w>=0&&w<=1&&(a[y++]=w),L>=0&&L<=1&&(a[y++]=L)}}return y}function _(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(g(o)){if(v(a)){var c=-l/a;c>=0&&c<=1&&(r[u++]=c)}}else{var h=a*a-4*o*l;if(g(h))r[0]=-a/(2*o);else if(h>0){var d=s(h),f=(c=(-a+d)/(2*o),(-a-d)/(2*o));c>=0&&c<=1&&(r[u++]=c),f>=0&&f<=1&&(r[u++]=f)}}return u}function b(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-o)*r+o,c=(l-s)*r+s,h=(c-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=i}function w(t,e,n,i,r,o,l,c,h,g,v){var y,x,_,b,w,S=.005,M=1/0;d[0]=h,d[1]=g;for(var A=0;A<1;A+=.05)f[0]=m(t,n,r,l,A),f[1]=m(e,i,o,c,A),b=a(d,f),b=0&&b=0&&c<=1&&(r[u++]=c)}}else{var h=o*o-4*a*l;if(g(h)){c=-o/(2*a);c>=0&&c<=1&&(r[u++]=c)}else if(h>0){var d=s(h),f=(c=(-o+d)/(2*a),(-o-d)/(2*a));c>=0&&c<=1&&(r[u++]=c),f>=0&&f<=1&&(r[u++]=f)}}return u}function I(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function T(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function C(t,e,n,i,r,o,l,c,h){var g,v=.005,m=1/0;d[0]=l,d[1]=c;for(var y=0;y<1;y+=.05){f[0]=S(t,n,r,y),f[1]=S(e,i,o,y);var x=a(d,f);x=0&&x=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},g.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"===typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},g.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},g.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},g.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return a.each(this._tagNames,(function(n){var i=t.getElementsByTagName(n);e=e.concat([].slice.call(i))})),e},g.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;a.each(t,(function(t){t[e._markLabel]=f}))},g.prototype.markUsed=function(t){t&&(t[this._markLabel]=p)},g.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),n=this;a.each(e,(function(e){e[n._markLabel]!==p&&t.removeChild(e)}))}},g.prototype.getSvgProxy=function(t){return t instanceof o?c:t instanceof s?h:t instanceof l?d:c},g.prototype.getTextSvgElement=function(t){return t.__textSvgEl},g.prototype.getSvgElement=function(t){return t.__svgEl};var v=g;t.exports=v},"4b08":function(t,e,n){var i=n("7dcf"),r=i.extend({type:"dataZoom.select"});t.exports=r},"4bf6":function(t,e,n){var i=n("66fc"),r=n("697e"),a=n("f934"),o=a.getLayoutRect,s=n("6d8b"),l=s.each;function u(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}u.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:u,_init:function(t,e,n){var a=this.dimension,o=new i(a,r.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),s="category"===o.type;o.onBand=s&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();l(e.mapDimension(this.dimension,!0),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),r.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=o({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(i[r],i[1-r]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),i=n[0]+n[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return i-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),n=this.getAxis(),i=n.orient;return"horizontal"===i?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i}};var c=u;t.exports=c},"4c86":function(t,e,n){var i=n("6d8b"),r=i.each,a=n("bda7"),o=n("e0d3"),s=o.makeInner,l=n("320a"),u=n("1792"),c=n("6bd4"),h=n("a7f2"),d=s(),f={load:function(t,e,n){var i=d(e).parsed;if(i)return i;var o,s=e.specialAreas||{},f=e.geoJSON;try{o=f?a(f,n):[]}catch(g){throw new Error("Invalid geoJson format\n"+g.message)}return l(t,o),r(o,(function(e){var n=e.name;u(t,e),c(t,e),h(t,e);var i=s[n];i&&e.transformTo(i.left,i.top,i.width,i.height)})),d(e).parsed={regions:o,boundingRect:p(o)}}};function p(t){for(var e,n=0;n0?o:s)}function c(t,e){return e.get(t>0?r:a)}}};t.exports=l},"4d62":function(t,e,n){var i=n("2306"),r=n("6d8b"),a=n("e887");function o(t,e){i.Group.call(this);var n=new i.Polygon,r=new i.Polyline,a=new i.Text;this.add(n),this.add(r),this.add(a),this.highDownOnUpdate=function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(t,e,!0)}var s=o.prototype,l=["itemStyle","opacity"];s.updateData=function(t,e,n){var a=this.childAt(0),o=t.hostModel,s=t.getItemModel(e),u=t.getItemLayout(e),c=t.getItemModel(e).get(l);c=null==c?1:c,a.useStyle({}),n?(a.setShape({points:u.points}),a.setStyle({opacity:0}),i.initProps(a,{style:{opacity:c}},o,e)):i.updateProps(a,{style:{opacity:c},shape:{points:u.points}},o,e);var h=s.getModel("itemStyle"),d=t.getItemVisual(e,"color");a.setStyle(r.defaults({lineJoin:"round",fill:d},h.getItemStyle(["opacity"]))),a.hoverStyle=h.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),i.setHoverStyle(this)},s._updateLabel=function(t,e){var n=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");i.updateProps(n,{shape:{points:l.linePoints||l.linePoints}},a,e),i.updateProps(r,{style:{x:l.x,y:l.y}},a,e),r.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var c=o.getModel("label"),h=o.getModel("emphasis.label"),d=o.getModel("labelLine"),f=o.getModel("emphasis.labelLine");u=t.getItemVisual(e,"color");i.setLabelStyle(r.style,r.hoverStyle={},c,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign}),r.ignore=r.normalIgnore=!c.get("show"),r.hoverIgnore=!h.get("show"),n.ignore=n.normalIgnore=!d.get("show"),n.hoverIgnore=!f.get("show"),n.setStyle({stroke:u}),n.setStyle(d.getModel("lineStyle").getLineStyle()),n.hoverStyle=f.getModel("lineStyle").getLineStyle()},r.inherits(o,i.Group);var u=a.extend({type:"funnel",render:function(t,e,n){var i=t.getData(),r=this._data,a=this.group;i.diff(r).add((function(t){var e=new o(i,t);i.setItemGraphicEl(t,e),a.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),a.add(n),i.setItemGraphicEl(t,n)})).remove((function(t){var e=r.getItemGraphicEl(t);a.remove(e)})).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),c=u;t.exports=c},"4d63":function(t,e,n){var i=n("83ab"),r=n("da84"),a=n("94ca"),o=n("7156"),s=n("9bf2").f,l=n("241c").f,u=n("44e7"),c=n("ad6d"),h=n("9f7f"),d=n("6eeb"),f=n("d039"),p=n("69f3").set,g=n("2626"),v=n("b622"),m=v("match"),y=r.RegExp,x=y.prototype,_=/a/g,b=/a/g,w=new y(_)!==_,S=h.UNSUPPORTED_Y,M=i&&a("RegExp",!w||S||f((function(){return b[m]=!1,y(_)!=_||y(b)==b||"/a/i"!=y(_,"i")})));if(M){var A=function(t,e){var n,i=this instanceof A,r=u(t),a=void 0===e;if(!i&&r&&t.constructor===A&&a)return t;w?r&&!a&&(t=t.source):t instanceof A&&(a&&(e=c.call(t)),t=t.source),S&&(n=!!e&&e.indexOf("y")>-1,n&&(e=e.replace(/y/g,"")));var s=o(w?new y(t,e):y(t,e),i?this:x,A);return S&&n&&p(s,{sticky:n}),s},I=function(t){t in A||s(A,t,{configurable:!0,get:function(){return y[t]},set:function(e){y[t]=e}})},T=l(y),C=0;while(T.length>C)I(T[C++]);x.constructor=A,A.prototype=x,d(r,"RegExp",A)}g("RegExp")},"4d64":function(t,e,n){var i=n("fc6a"),r=n("50c4"),a=n("23cb"),o=function(t){return function(e,n,o){var s,l=i(e),u=r(l.length),c=a(o,u);if(t&&n!=n){while(u>c)if(s=l[c++],s!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4d85":function(t,e,n){var i=n("e46b"),r=n("4f85"),a=r.extend({type:"series.gauge",getInitialData:function(t,e){return i(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),o=a;t.exports=o},"4de4":function(t,e,n){"use strict";var i=n("23e7"),r=n("b727").filter,a=n("1dde"),o=n("ae40"),s=a("filter"),l=o("filter");i({target:"Array",proto:!0,forced:!s||!l},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,n){"use strict";var i=n("0366"),r=n("7b0b"),a=n("9bdd"),o=n("e95a"),s=n("50c4"),l=n("8418"),u=n("35a1");t.exports=function(t){var e,n,c,h,d,f,p=r(t),g="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,y=void 0!==m,x=u(p),_=0;if(y&&(m=i(m,v>2?arguments[2]:void 0,2)),void 0==x||g==Array&&o(x))for(e=s(p.length),n=new g(e);e>_;_++)f=y?m(p[_],_):p[_],l(n,_,f);else for(h=x.call(p),d=h.next,n=new g;!(c=d.call(h)).done;_++)f=y?a(h,m,[c.value,_],!0):c.value,l(n,_,f);return n.length=_,n}},"4e08":function(t,e,n){(function(t){var n;"undefined"!==typeof window?n=window.__DEV__:"undefined"!==typeof t&&(n=t.__DEV__),"undefined"===typeof n&&(n=!0);var i=n;e.__DEV__=i}).call(this,n("c8ba"))},"4e10":function(t,e,n){var i=n("6d8b"),r=n("e46b"),a=n("4f85"),o=n("eda2"),s=o.encodeHTML,l=o.addCommas,u=n("7023"),c=n("2b17"),h=c.retrieveRawAttr,d=n("5b87"),f=n("0f99"),p=f.makeSeriesEncodeForNameBased,g=a.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=r(this,{coordDimensions:["value"],encodeDefaulter:i.curry(p,this)}),n=e.mapDimension("value"),a=i.createHashMap(),o=[],s=[],l=0,u=e.count();l"+s(i+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}},nameProperty:"name"}});i.mixin(g,u);var v=g;t.exports=v},"4e47":function(t,e,n){var i=n("6d8b"),r=n("2306"),a={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},o=2,s=4;function l(t,e,n){r.Group.call(this);var i=new r.Sector({z2:o});i.seriesIndex=e.seriesIndex;var a=new r.Text({z2:s,silent:t.getModel("label").get("silent")});function l(){a.ignore=a.hoverIgnore}function u(){a.ignore=a.normalIgnore}this.add(i),this.add(a),this.updateData(!0,t,"normal",e,n),this.on("emphasis",l).on("normal",u).on("mouseover",l).on("mouseout",u)}var u=l.prototype;u.updateData=function(t,e,n,a,o){this.node=e,e.piece=this,a=a||this._seriesModel,o=o||this._ecModel;var s=this.childAt(0);s.dataIndex=e.dataIndex;var l=e.getModel(),u=e.getLayout(),c=i.extend({},u);c.label=null;var d=h(e,a,o);p(e,a,d);var f,g=l.getModel("itemStyle").getItemStyle();if("normal"===n)f=g;else{var v=l.getModel(n+".itemStyle").getItemStyle();f=i.merge(v,g)}f=i.defaults({lineJoin:"bevel",fill:f.fill||d},f),t?(s.setShape(c),s.shape.r=u.r0,r.updateProps(s,{shape:{r:u.r}},a,e.dataIndex),s.useStyle(f)):"object"===typeof f.fill&&f.fill.type||"object"===typeof s.style.fill&&s.style.fill.type?(r.updateProps(s,{shape:c},a),s.useStyle(f)):r.updateProps(s,{shape:c,style:f},a),this._updateLabel(a,d,n);var m=l.getShallow("cursor");if(m&&s.attr("cursor",m),t){var y=a.getShallow("highlightPolicy");this._initEvents(s,e,a,y)}this._seriesModel=a||this._seriesModel,this._ecModel=o||this._ecModel,r.setHoverStyle(this)},u.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode((function(n){n.piece&&(e.node===n?n.piece.updateData(!1,n,"emphasis"):f(n,e.node,t)?n.piece.childAt(0).trigger("highlight"):t!==a.NONE&&n.piece.childAt(0).trigger("downplay"))}))},u.onNormal=function(){this.node.hostTree.root.eachNode((function(t){t.piece&&t.piece.updateData(!1,t,"normal")}))},u.onHighlight=function(){this.updateData(!1,this.node,"highlight")},u.onDownplay=function(){this.updateData(!1,this.node,"downplay")},u._updateLabel=function(t,e,n){var a=this.node.getModel(),o=a.getModel("label"),s="normal"===n||"emphasis"===n?o:a.getModel(n+".label"),l=a.getModel("emphasis.label"),u=i.retrieve(t.getFormattedLabel(this.node.dataIndex,n,null,null,"label"),this.node.name);!1===A("show")&&(u="");var c=this.node.getLayout(),h=s.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var d=c.endAngle-c.startAngle;null!=h&&Math.abs(d)Math.PI/2?"right":"left"):_&&"center"!==_?"left"===_?(p=c.r0+x,g>Math.PI/2&&(_="right")):"right"===_&&(p=c.r-x,g>Math.PI/2&&(_="left")):(p=(c.r+c.r0)/2,_="center"),f.attr("style",{text:u,textAlign:_,textVerticalAlign:A("verticalAlign")||"middle",opacity:A("opacity")});var b=p*v+c.cx,w=p*m+c.cy;f.attr("position",[b,w]);var S=A("rotate"),M=0;function A(t){var e=s.get(t);return null==e?o.get(t):e}"radial"===S?(M=-g,M<-Math.PI/2&&(M+=Math.PI)):"tangential"===S?(M=Math.PI/2-g,M>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI)):"number"===typeof S&&(M=S*Math.PI/180),f.attr("rotation",M)},u._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,a=function(){r.onEmphasis(i)},o=function(){r.onNormal()},s=function(){r.onDownplay()},l=function(){r.onHighlight()};n.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",s).on("highlight",l)},i.inherits(l,r.Group);var c=l;function h(t,e,n){var i=t.getVisual("color"),r=t.getVisual("visualMeta");r&&0!==r.length||(i=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(i)return i;if(0===t.depth)return n.option.color[0];var o=n.option.color.length;return a=n.option.color[d(t)%o],a}function d(t){var e=t;while(e.depth>1)e=e.parentNode;var n=t.getAncestors()[0];return i.indexOf(n.children,e)}function f(t,e,n){return n!==a.NONE&&(n===a.SELF?t===e:n===a.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function p(t,e,n){var i=e.getData();i.setItemVisual(t.dataIndex,"color",n)}t.exports=c},"4e9f":function(t,e,n){var i=n("22d1"),r=n("29a8"),a=n("2145"),o=r.toolbox.saveAsImage;function s(t){this.model=t}s.defaultOption={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:o.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:o.lang.slice()},s.prototype.unusable=!i.canvasSupported;var l=s.prototype;l.onclick=function(t,e){var n=this.model,r=n.get("name")||t.get("title.0.text")||"echarts",a="svg"===e.getZr().painter.getType(),o=a?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!==typeof MouseEvent||i.browser.ie||i.browser.edge)if(window.navigator.msSaveOrOpenBlob){var l=atob(s.split(",")[1]),u=l.length,c=new Uint8Array(u);while(u--)c[u]=l.charCodeAt(u);var h=new Blob([c]);window.navigator.msSaveOrOpenBlob(h,r+"."+o)}else{var d=n.get("lang"),f='',p=window.open();p.document.write(f)}else{var g=document.createElement("a");g.download=r+"."+o,g.target="_blank",g.href=s;var v=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});g.dispatchEvent(v)}},a.register("saveAsImage",s);var u=s;t.exports=u},"4ec9":function(t,e,n){"use strict";var i=n("6d61"),r=n("6566");t.exports=i("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r)},"4f85":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=n("22d1"),o=n("eda2"),s=o.formatTime,l=o.encodeHTML,u=o.addCommas,c=o.getTooltipMarker,h=n("e0d3"),d=n("6cb7"),f=n("e47b"),p=n("38a2"),g=n("f934"),v=g.getLayoutParams,m=g.mergeLayoutParam,y=n("f47d"),x=y.createTask,_=n("0f99"),b=_.prepareSource,w=_.getSource,S=n("2b17"),M=S.retrieveRawValue,A=h.makeInner(),I=d.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=x({count:D,reset:L}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),b(this);var r=this.getInitialData(t,n);k(r,this),this.dataTask.context.data=r,A(this).dataBeforeProcessed=r,T(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?v(t):{},a=this.subType;d.hasClass(a)&&(a+="Series"),r.merge(t,e.getTheme().get(this.subType)),r.merge(t,this.getDefaultOption()),h.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&m(t,i,n)},mergeOption:function(t,e){t=r.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&m(this.option,t,n),b(this);var i=this.getInitialData(t,e);k(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,A(this).dataBeforeProcessed=i,T(this)},fillDataTextStyle:function(t){if(t&&!r.isTypedArray(t))for(var e=["show"],n=0;n":"\n",d="richText"===i,f={},p=0;function g(n){var o=r.reduce(n,(function(t,e,n){var i=m.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),h=[];function g(t,n){var r=m.getDimensionInfo(n);if(r&&!1!==r.otherDims.tooltip){var g=r.type,v="sub"+a.seriesIndex+"at"+p,y=c({color:w,type:"subItem",renderMode:i,markerId:v}),x="string"===typeof y?y:y.content,_=(o?x+l(r.displayName||"-")+": ":"")+l("ordinal"===g?t+"":"time"===g?e?"":s("yyyy/MM/dd hh:mm:ss",t):u(t));_&&h.push(_),d&&(f[v]=w,++p)}}y.length?r.each(y,(function(e){g(M(m,t,e),e)})):r.each(n,g);var v=o?d?"\n":"
":"",x=v+h.join(v||", ");return{renderMode:i,content:x,style:f}}function v(t){return{renderMode:i,content:l(u(t)),style:f}}var m=this.getData(),y=m.mapDimension("defaultedTooltip",!0),x=y.length,_=this.getRawValue(t),b=r.isArray(_),w=m.getItemVisual(t,"color");r.isObject(w)&&w.colorStops&&(w=(w.colorStops[0]||{}).color),w=w||"transparent";var S=x>1||b&&!x?g(_):v(x?M(m,t,y[0]):b?_[0]:_),A=S.content,I=a.seriesIndex+"at"+p,T=c({color:w,type:"item",renderMode:i,markerId:I});f[I]=w,++p;var C=m.getName(t),D=this.name;h.isNameSpecified(this)||(D=""),D=D?l(D)+(e?": ":o):"";var L="string"===typeof T?T:T.content,P=e?L+D+A:D+L+(C?l(C)+": "+A:A);return{html:P,markers:f}},isAnimationEnabled:function(){if(a.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=f.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function T(t){var e=t.name;h.isNameSpecified(t)||(t.name=C(t)||e)}function C(t){var e=t.getRawData(),n=e.mapDimension("seriesName",!0),i=[];return r.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}function D(t){return t.model.getRawData().count()}function L(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),P}function P(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function k(t,e){r.each(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,r.curry(O,e))}))}function O(t){var e=E(t);e&&e.setOutputEnd(this.count())}function E(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.mixin(I,p),r.mixin(I,f);var N=I;t.exports=N},"4fac":function(t,e,n){var i=n("620b"),r=n("9c2c");function a(t,e,n){var a=e.points,o=e.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=r(a,o,n,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,u=0;u<(n?l:l-1);u++){var c=s[2*u],h=s[2*u+1],d=a[(u+1)%l];t.bezierCurveTo(c[0],c[1],h[0],h[1],d[0],d[1])}}else{"spline"===o&&(a=i(a,n)),t.moveTo(a[0][0],a[0][1]);u=1;for(var f=a.length;u0?r(i(t),9007199254740991):0}},"50e5":function(t,e,n){var i=n("6d8b"),r=n("eda2"),a=["x","y","z","radius","angle","single"],o=["cartesian2d","polar","singleAxis"];function s(t){return i.indexOf(o,t)>=0}function l(t,e){t=t.slice();var n=i.map(t,r.capitalFirst);e=(e||[]).slice();var a=i.map(e,r.capitalFirst);return function(r,o){i.each(t,(function(t,i){for(var s={name:t,capital:n[i]},l=0;l=0}function a(t,r){var a=!1;return e((function(e){i.each(n(t,e)||[],(function(t){r.records[e.name][t]&&(a=!0)}))})),a}function o(t,r){r.nodes.push(t),e((function(e){i.each(n(t,e)||[],(function(t){r.records[e.name][t]=!0}))}))}}e.isCoordSupported=s,e.createNameEach=l,e.eachAxisDim=u,e.createLinkedNodesFinder=c},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"527a":function(t,e,n){var i=n("6d8b"),r=n("3842");function a(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),n=t.coordinateSystem,i={},a=n.getRect();i.rect=a;var s=t.get("boundaryGap"),l=n.getAxis();if(i.boundaryGap=s,"horizontal"===l.orient){s[0]=r.parsePercent(s[0],a.height),s[1]=r.parsePercent(s[1],a.height);var u=a.height-s[0]-s[1];o(e,t,u)}else{s[0]=r.parsePercent(s[0],a.width),s[1]=r.parsePercent(s[1],a.width);var c=a.width-s[0]-s[1];o(e,t,c)}e.setLayout("layoutInfo",i)}))}function o(t,e,n){if(t.count())for(var r,a=e.coordinateSystem,o=e.getLayerSeries(),l=t.mapDimension("single"),u=t.mapDimension("value"),c=i.map(o,(function(e){return i.map(e.indices,(function(e){var n=a.dataToPoint(t.get(l,e));return n[1]=t.get(u,e),n}))})),h=s(c),d=h.y0,f=n/h.max,p=o.length,g=o[0].indices.length,v=0;va&&(a=u),i.push(u)}for(var c=0;ca&&(a=d)}return o.y0=r,o.max=a,o}t.exports=a},5319:function(t,e,n){"use strict";var i=n("d784"),r=n("825a"),a=n("7b0b"),o=n("50c4"),s=n("a691"),l=n("1d80"),u=n("8aa5"),c=n("14c3"),h=Math.max,d=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g,v=function(t){return void 0===t?t:String(t)};i("replace",2,(function(t,e,n,i){var m=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,y=i.REPLACE_KEEPS_$0,x=m?"$":"$0";return[function(n,i){var r=l(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,r,i):e.call(String(r),n,i)},function(t,i){if(!m&&y||"string"===typeof i&&-1===i.indexOf(x)){var a=n(e,t,this,i);if(a.done)return a.value}var l=r(t),f=String(this),p="function"===typeof i;p||(i=String(i));var g=l.global;if(g){var b=l.unicode;l.lastIndex=0}var w=[];while(1){var S=c(l,f);if(null===S)break;if(w.push(S),!g)break;var M=String(S[0]);""===M&&(l.lastIndex=u(f,o(l.lastIndex),b))}for(var A="",I=0,T=0;T=I&&(A+=f.slice(I,D)+E,I=D+C.length)}return A+f.slice(I)}];function _(t,n,i,r,o,s){var l=i+t.length,u=r.length,c=g;return void 0!==o&&(o=a(o),c=p),e.call(s,c,(function(e,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,i);case"'":return n.slice(l);case"<":s=o[a.slice(1,-1)];break;default:var c=+a;if(0===c)return e;if(c>u){var h=f(c/10);return 0===h?e:h<=u?void 0===r[h-1]?a.charAt(1):r[h-1]+a.charAt(1):e}s=r[c-1]}return void 0===s?"":s}))}}))},"53f3":function(t,e){function n(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,i=e.scale,r=i&&i[0]||1,a=e.getZoom(),o=(a-1)*n+1;return o/r}function i(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}e.getNodeGlobalScale=n,e.getSymbolSize=i},5450:function(t,e,n){n("7419"),n("29a9")},"54fb":function(t,e){function n(t){t.eachSeriesByType("map",(function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),r=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:r})}))}t.exports=n},"551f":function(t,e,n){var i=n("282b"),r=i([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),a={getItemStyle:function(t,e){var n=r(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}};t.exports=a},5522:function(t,e,n){n("23e0"),n("1748"),n("6c12")},5530:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");var i=n("ade3");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;er[n+e]&&(e=o),a&=i.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}e.register=s,e.unregister=l,e.generateCoordId=u},"55ac":function(t,e,n){var i=n("6d8b");function r(t,e,n){if(t&&i.indexOf(e,t.type)>=0){var r=n.getData().tree.root,a=t.targetNode;if("string"===typeof a&&(a=r.getNodeById(a)),a&&r.contains(a))return{node:a};var o=t.targetNodeId;if(null!=o&&(a=r.getNodeById(o)))return{node:a}}}function a(t){var e=[];while(t)t=t.parentNode,t&&e.push(t);return e.reverse()}function o(t,e){var n=a(t);return i.indexOf(n,e)>=0}function s(t,e){var n=[];while(t){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}e.retrieveTargetInfo=r,e.getPathToRoot=a,e.aboveViewRoot=o,e.wrapTreePathInfo=s},"562e":function(t,e,n){var i=n("6d8b");function r(t){null!=t&&i.extend(this,t),this.otherDims={}}var a=r;t.exports=a},5692:function(t,e,n){var i=n("c430"),r=n("c6cd");(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},5693:function(t,e){function n(t,e){var n,i,r,a,o,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"===typeof h?n=i=r=a=h:h instanceof Array?1===h.length?n=i=r=a=h[0]:2===h.length?(n=r=h[0],i=a=h[1]):3===h.length?(n=h[0],i=a=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],a=h[3]):n=i=r=a=0,n+i>u&&(o=n+i,n*=u/o,i*=u/o),r+a>u&&(o=r+a,r*=u/o,a*=u/o),i+r>c&&(o=i+r,i*=c/o,r*=c/o),n+a>c&&(o=n+a,n*=c/o,a*=c/o),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+a,l+c),0!==a&&t.arc(s+a,l+c-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}e.buildPath=n},"56ef":function(t,e,n){var i=n("d066"),r=n("241c"),a=n("7418"),o=n("825a");t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(o(t)),n=a.f;return n?e.concat(n(t)):e}},5866:function(t,e,n){var i=n("ef2b"),r=i.forceLayout,a=n("1c5f"),o=a.simpleLayout,s=n("94e4"),l=s.circularLayout,u=n("3842"),c=u.linearMap,h=n("401b"),d=n("6d8b");function f(t){t.eachSeriesByType("graph",(function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var n=t.preservedPoints||{},i=t.getGraph(),a=i.data,s=i.edgeData,u=t.getModel("force"),f=u.get("initLayout");t.preservedPoints?a.each((function(t){var e=a.getId(t);a.setItemLayout(t,n[e]||[NaN,NaN])})):f&&"none"!==f?"circular"===f&&l(t,"value"):o(t);var p=a.getDataExtent("value"),g=s.getDataExtent("value"),v=u.get("repulsion"),m=u.get("edgeLength");d.isArray(v)||(v=[v,v]),d.isArray(m)||(m=[m,m]),m=[m[1],m[0]];var y=a.mapArray("value",(function(t,e){var n=a.getItemLayout(e),i=c(t,p,v);return isNaN(i)&&(i=(v[0]+v[1])/2),{w:i,rep:i,fixed:a.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),x=s.mapArray("value",(function(t,e){var n=i.getEdgeByIndex(e),r=c(t,g,m);isNaN(r)&&(r=(m[0]+m[1])/2);var a=n.getModel();return{n1:y[n.node1.dataIndex],n2:y[n.node2.dataIndex],d:r,curveness:a.get("lineStyle.curveness")||0,ignoreForceLayout:a.get("ignoreForceLayout")}})),_=(e=t.coordinateSystem,e.getBoundingRect()),b=r(y,x,{rect:_,gravity:u.get("gravity"),friction:u.get("friction")}),w=b.step;b.step=function(t){for(var e=0,r=y.length;e=0;o--)null==n[o]&&(delete r[e[o]],e.pop())}function p(t,e){var n=t.visual,r=[];i.isObject(n)?s(n,(function(t){r.push(t)})):null!=n&&r.push(n);var a={color:1,symbol:1};e||1!==r.length||a.hasOwnProperty(t.type)||(r[1]=r[0]),w(t,r)}function g(t){return{applyVisual:function(e,n,i){e=this.mapValueToVisual(e),i("color",t(n("color"),e))},_doMap:_([0,1])}}function v(t){var e=this.option.visual;return e[Math.round(o(t,[0,1],[0,e.length-1],!0))]||{}}function m(t){return function(e,n,i){i(t,this.mapValueToVisual(e))}}function y(t){var e=this.option.visual;return e[this.option.loop&&t!==u?t%e.length:t]}function x(){return this.option.visual[0]}function _(t){return{linear:function(e){return o(e,t,this.option.visual,!0)},category:y,piecewise:function(e,n){var i=b.call(this,n);return null==i&&(i=o(e,t,this.option.visual,!0)),i},fixed:x}}function b(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=c.findPieceIndex(t,n),r=n[i];if(r&&r.visual)return r.visual[this.type]}}function w(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=i.map(e,(function(t){return r.parse(t)}))),e}var S={linear:function(t){return o(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=c.findPieceIndex(t,e,!0);if(null!=n)return o(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?u:e},fixed:i.noop};function M(t,e,n){return t?e<=n:e=0;if(r){var a="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];a&&h(t,a,e,n)}else h(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&u.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function g(t,e,n,i){l?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}function v(t,e,n,i){l?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)}var m=l?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function y(t){return 2===t.which||3===t.which}function x(t){return t.which>1}e.clientToLocal=h,e.getNativeEvent=f,e.normalizeEvent=p,e.addEventListener=g,e.removeEventListener=v,e.stop=m,e.isMiddleOrRightButtonOnMouseUpDown=y,e.notLeftMouse=x},"60d7":function(t,e,n){var i=n("2306"),r=n("e887"),a=.3,o=r.extend({type:"parallel",init:function(){this._dataGroup=new i.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,n,r){var a=this._dataGroup,o=t.getData(),d=this._data,f=t.coordinateSystem,p=f.dimensions,g=c(t);function v(t){var e=u(o,a,t,p,f);h(e,o,t,g)}function m(e,n){var a=d.getItemGraphicEl(n),s=l(o,e,p,f);o.setItemGraphicEl(e,a);var u=r&&!1===r.animation?null:t;i.updateProps(a,{shape:{points:s}},u,e),h(a,o,e,g)}function y(t){var e=d.getItemGraphicEl(t);a.remove(e)}if(o.diff(d).add(v).update(m).remove(y).execute(),!this._initialized){this._initialized=!0;var x=s(f,t,(function(){setTimeout((function(){a.removeClipPath()}))}));a.setClipPath(x)}this._data=o},incrementalPrepareRender:function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,n){for(var i=e.getData(),r=e.coordinateSystem,a=r.dimensions,o=c(e),s=t.start;sc){var f,p=u(arguments[c++]),g=h?a(p).concat(h(p)):a(p),v=g.length,m=0;while(v>m)f=g[m++],i&&!d.call(p,f)||(n[f]=p[f])}return n}:c},"60e3":function(t,e,n){var i=n("6d8b"),r={get:function(t,e,n){var r=i.clone((a[t]||{})[e]);return n&&i.isArray(r)?r[r.length-1]:r}},a={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]}},o=r;t.exports=o},6179:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=n("4319"),o=n("80f0"),s=n("ec6f"),l=n("2b17"),u=l.defaultDimValueGetters,c=l.DefaultDataProvider,h=n("2f45"),d=h.summarizeDimensions,f=n("562e"),p=r.isObject,g="undefined",v=-1,m="e\0\0",y={float:typeof Float64Array===g?Array:Float64Array,int:typeof Int32Array===g?Array:Int32Array,ordinal:Array,number:Array,time:Array},x=typeof Uint32Array===g?Array:Uint32Array,_=typeof Int32Array===g?Array:Int32Array,b=typeof Uint16Array===g?Array:Uint16Array;function w(t){return t._rawCount>65535?x:b}function S(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var M=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],A=["_extent","_approximateExtent","_rawExtent"];function I(t,e){r.each(M.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,r.each(A,(function(n){t[n]=r.clone(e[n])})),t._calculationInfo=r.extend(e._calculationInfo)}var T=function(t,e){t=t||["x","y"];for(var n={},i=[],a={},o=0;o=0?this._indices[t]:-1}function E(t,e){var n=t._idList[e];return null==n&&(n=P(t,t._idDimIdx,e)),null==n&&(n=m+e),n}function N(t){return r.isArray(t)||(t=[t]),t}function R(t,e){var n=t.dimensions,i=new T(r.map(n,t.getDimensionInfo,t),t.hostModel);I(i,t);for(var a=i._storage={},o=t._storage,s=0;s=0?(a[l]=z(o[l]),i._rawExtent[l]=B(),i._extent[l]=null):a[l]=o[l])}return i}function z(t){for(var e=new Array(t.length),n=0;nx[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},L(this)},C._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,h=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!r.pure){var A=u[y];if(m&&null==A)if(null!=m.name)u[y]=A=m.name;else if(null!=n){var I=o[n],T=a[I][x];if(T){A=T[_];var C=l[I].ordinalMeta;C&&C.categories.length&&(A=C.categories[A])}}var P=null==m?null:m.id;null==P&&null!=A&&(d[A]=d[A]||0,P=A,d[A]>0&&(P+="__ec__"+d[A]),d[A]++),null!=P&&(c[y]=P)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},L(this)}},C.count=function(){return this._count},C.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){r=new e(n);for(var i=0;i=0&&e=0&&es&&(s=u)}return i=[o,s],this._extent[t]=i,i},C.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},C.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},C.getCalculationInfo=function(t){return this._calculationInfo[t]},C.setCalculationInfo=function(t,e){p(t)?r.extend(this._calculationInfo,t):this._calculationInfo[t]=e},C.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();i=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return a;r=a-1}}return-1},C.indicesOfNearest=function(t,e,n){var i=this._storage,r=i[t],a=[];if(!r)return a;null==n&&(n=1/0);for(var o=1/0,s=-1,l=0,u=0,c=this.count();u=0&&s<0)&&(o=d,s=h,l=0),h===s&&(a[l++]=u))}return a.length=l,a},C.getRawIndex=k,C.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=u&&y<=c||isNaN(y))&&(o[s++]=d),d++}h=!0}else if(2===i){f=this._storage[l];var x=this._storage[e[1]],_=t[e[1]][0],b=t[e[1]][1];for(p=0;p=u&&y<=c||isNaN(y))&&(M>=_&&M<=b||isNaN(M))&&(o[s++]=d),d++}}h=!0}}if(!h)if(1===i)for(m=0;m=u&&y<=c||isNaN(y))&&(o[s++]=A)}else for(m=0;mt[T][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return sw[1]&&(w[1]=b)}}}return a},C.downSample=function(t,e,n,i){for(var r=R(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),c=this._chunkSize,h=r._rawExtent[t],d=new(w(this))(u),f=0,p=0;pu-p&&(s=u-p,o.length=s);for(var g=0;gh[1]&&(h[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=O,r},C.getItemModel=function(t){var e=this.hostModel;return new a(this.getRawDataItem(t),e,e&&e.ecModel)},C.diff=function(t){var e=this;return new o(t?t.getIndices():[],this.getIndices(),(function(e){return E(t,e)}),(function(t){return E(e,t)}))},C.getVisual=function(t){var e=this._visual;return e&&e[t]},C.setVisual=function(t,e){if(p(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},C.setLayout=function(t,e){if(p(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},C.getLayout=function(t){return this._layout[t]},C.getItemLayout=function(t){return this._itemLayouts[t]},C.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?r.extend(this._itemLayouts[t]||{},e):e},C.clearItemLayouts=function(){this._itemLayouts.length=0},C.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},C.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,p(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},C.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var V=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};C.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(V,e)),this._graphicEls[t]=e},C.getItemGraphicEl=function(t){return this._graphicEls[t]},C.eachItemGraphicEl=function(t,e){r.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},C.cloneShallow=function(t){if(!t){var e=r.map(this.dimensions,this.getDimensionInfo,this);t=new T(e,this.hostModel)}if(t._storage=this._storage,I(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?O:k,t},C.wrapMethod=function(t,e){var n=this[t];"function"===typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(r.slice(arguments)))})},C.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],C.CHANGABLE_METHODS=["filterSelf","selectRange"];var G=T;t.exports=G},"620b":function(t,e,n){var i=n("401b"),r=i.distance;function a(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function o(t,e){for(var n=t.length,i=[],o=0,s=1;sn-2?n-1:f+1],h=t[f>n-3?n-1:f+2]);var v=p*p,m=p*v;i.push([a(u[0],g[0],c[0],h[0],p,v,m),a(u[1],g[1],c[1],h[1],p,v,m)])}return i}t.exports=o},"625e":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=".",o="___EC__COMPONENT__CONTAINER___";function s(t){var e={main:"",sub:""};return t&&(t=t.split(a),e.main=t[0]||"",e.sub=t[1]||""),e}function l(t){r.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function u(t,e){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return r.extend(n.prototype,t),n.extend=this.extend,n.superCall=d,n.superApply=f,r.inherits(n,this),n.superClass=e,n}}var c=0;function h(t){var e=["__\0is_clz",c++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function d(t,e){var n=r.slice(arguments,2);return this.superClass.prototype[e].apply(t,n)}function f(t,e,n){return this.superClass.prototype[e].apply(t,n)}function p(t,e){e=e||{};var n={};function i(t){var e=n[t.main];return e&&e[o]||(e=n[t.main]={},e[o]=!0),e}if(t.registerClass=function(t,e){if(e)if(l(e),e=s(e),e.sub){if(e.sub!==o){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[o]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=s(t);var e=[],i=n[t.main];return i&&i[o]?r.each(i,(function(t,n){n!==o&&e.push(t)})):e.push(i),e},t.hasClass=function(t){return t=s(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return r.each(n,(function(e,n){t.push(n)})),t},t.hasSubTypes=function(t){t=s(t);var e=n[t.main];return e&&e[o]},t.parseClassType=s,e.registerWhenExtend){var a=t.extend;a&&(t.extend=function(e){var n=a.call(this,e);return t.registerClass(n,e.type)})}return t}function g(t,e){}e.parseClassType=s,e.enableClassExtend=u,e.enableClassCheck=h,e.enableClassManagement=p,e.setReadOnly=g},"627c":function(t,e,n){var i=n("6d8b"),r=n("3eba"),a=n("2306"),o=n("f934"),s=o.getLayoutRect,l=n("eda2"),u=l.windowOpen;r.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),r.extendComponentView({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var r=this.group,o=t.getModel("textStyle"),l=t.getModel("subtextStyle"),c=t.get("textAlign"),h=i.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),d=new a.Text({style:a.setTextStyle({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),f=d.getBoundingRect(),p=t.get("subtext"),g=new a.Text({style:a.setTextStyle({},l,{text:p,textFill:l.getTextColor(),y:f.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),v=t.get("link"),m=t.get("sublink"),y=t.get("triggerEvent",!0);d.silent=!v&&!y,g.silent=!m&&!y,v&&d.on("click",(function(){u(v,"_"+t.get("target"))})),m&&g.on("click",(function(){u(v,"_"+t.get("subtarget"))})),d.eventData=g.eventData=y?{componentType:"title",componentIndex:t.componentIndex}:null,r.add(d),p&&r.add(g);var x=r.getBoundingRect(),_=t.getBoxLayoutParams();_.width=x.width,_.height=x.height;var b=s(_,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));c||(c=t.get("left")||t.get("right"),"middle"===c&&(c="center"),"right"===c?b.x+=b.width:"center"===c&&(b.x+=b.width/2)),h||(h=t.get("top")||t.get("bottom"),"center"===h&&(h="middle"),"bottom"===h?b.y+=b.height:"middle"===h&&(b.y+=b.height/2),h=h||"top"),r.attr("position",[b.x,b.y]);var w={textAlign:c,textVerticalAlign:h};d.setStyle(w),g.setStyle(w),x=r.getBoundingRect();var S=b.margin,M=t.getItemStyle(["color","opacity"]);M.fill=t.get("backgroundColor");var A=new a.Rect({shape:{x:x.x-S[3],y:x.y-S[0],width:x.width+S[1]+S[3],height:x.height+S[0]+S[2],r:t.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});r.add(A)}}})},"62e4":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},6547:function(t,e,n){var i=n("a691"),r=n("1d80"),a=function(t){return function(e,n){var a,o,s=String(r(e)),l=i(n),u=s.length;return l<0||l>=u?t?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?t?s.charAt(l):a:t?s.slice(l,l+2):o-56320+(a-55296<<10)+65536)}};t.exports={codeAt:a(!1),charAt:a(!0)}},6566:function(t,e,n){"use strict";var i=n("9bf2").f,r=n("7c73"),a=n("e2cc"),o=n("0366"),s=n("19aa"),l=n("2266"),u=n("7dd0"),c=n("2626"),h=n("83ab"),d=n("f183").fastKey,f=n("69f3"),p=f.set,g=f.getterFor;t.exports={getConstructor:function(t,e,n,u){var c=t((function(t,i){s(t,c,e),p(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),h||(t.size=0),void 0!=i&&l(i,t[u],t,n)})),f=g(e),v=function(t,e,n){var i,r,a=f(t),o=m(t,e);return o?o.value=n:(a.last=o={index:r=d(e,!0),key:e,value:n,previous:i=a.last,next:void 0,removed:!1},a.first||(a.first=o),i&&(i.next=o),h?a.size++:t.size++,"F"!==r&&(a.index[r]=o)),t},m=function(t,e){var n,i=f(t),r=d(e);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==e)return n};return a(c.prototype,{clear:function(){var t=this,e=f(t),n=e.index,i=e.first;while(i)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete n[i.index],i=i.next;e.first=e.last=void 0,h?e.size=0:t.size=0},delete:function(t){var e=this,n=f(e),i=m(e,t);if(i){var r=i.next,a=i.previous;delete n.index[i.index],i.removed=!0,a&&(a.next=r),r&&(r.previous=a),n.first==i&&(n.first=r),n.last==i&&(n.last=a),h?n.size--:e.size--}return!!i},forEach:function(t){var e,n=f(this),i=o(t,arguments.length>1?arguments[1]:void 0,3);while(e=e?e.next:n.first){i(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!m(this,t)}}),a(c.prototype,n?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),h&&i(c.prototype,"size",{get:function(){return f(this).size}}),c},setStrong:function(t,e,n){var i=e+" Iterator",r=g(e),a=g(i);u(t,e,(function(t,e){p(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){var t=a(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(e)}}},6569:function(t,e,n){var i=n("6d8b"),r=n("e0d3");function a(t){o(t),s(t)}function o(t){if(!t.parallel){var e=!1;i.each(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}}function s(t){var e=r.normalizeToArray(t.parallelAxis);i.each(e,(function(e){if(i.isObject(e)){var n=e.parallelIndex||0,a=r.normalizeToArray(t.parallel)[n];a&&a.parallelAxisDefault&&i.merge(e,a.parallelAxisDefault,!1)}}))}t.exports=a},6582:function(t,e,n){var i=n("cccd"),r={seriesType:"lines",plan:i(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),i=t.pipelineContext.large;function r(r,a){var o=[];if(i){var s,l=r.end-r.start;if(n){for(var u=0,c=r.start;c>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),n.push(o)}return n}function h(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=!0,l=[],u=[],c=0;c<4;c++){var h=t[c].getBoundingClientRect(),d=2*c,f=h.left,p=h.top;l.push(f,p),s=s&&o&&f===o[d]&&p===o[d+1],u.push(t[c].offsetLeft,t[c].offsetTop)}return s&&r?r:(e.srcCoords=l,e[i]=n?a(u,l):a(l,u))}function d(t){return"CANVAS"===t.nodeName.toUpperCase()}e.transformLocalCoord=l,e.transformCoordWithViewport=u,e.isCanvasEl=d},"65f0":function(t,e,n){var i=n("861d"),r=n("e8b5"),a=n("b622"),o=a("species");t.exports=function(t,e){var n;return r(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)?i(n)&&(n=n[o],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},6679:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("cd33"),o=r.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&a.fixValue(t),o.superApply(this,"render",arguments),s(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i,r){s(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),o.superApply(this,"remove",arguments)},dispose:function(t,e){l(this,e),o.superApply(this,"dispose",arguments)}});function s(t,e,n,i,r,s){var u=o.getAxisPointerClass(t.axisPointerClass);if(u){var c=a.getAxisPointerModel(e);c?(t._axisPointer||(t._axisPointer=new u)).render(e,c,i,s):l(t,i)}}function l(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}var u=[];o.registerAxisPointerClass=function(t,e){u[t]=e},o.getAxisPointerClass=function(t){return t&&u[t]};var c=o;t.exports=c},"66a4":function(t,e,n){var i=n("6d8b");function r(t){var e=t&&t.timeline;i.isArray(e)||(e=e?[e]:[]),i.each(e,(function(t){t&&a(t)}))}function a(t){var e=t.type,n={number:"value",time:"time"};if(n[e]&&(t.axisType=n[e],delete t.type),o(t),s(t,"controlPosition")){var r=t.controlStyle||(t.controlStyle={});s(r,"position")||(r.position=t.controlPosition),"none"!==r.position||s(r,"show")||(r.show=!1,delete r.position),delete t.controlPosition}i.each(t.data||[],(function(t){i.isObject(t)&&!i.isArray(t)&&(!s(t,"value")&&s(t,"name")&&(t.value=t.name),o(t))}))}function o(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),r=t.label||t.label||{},a=r.normal||(r.normal={}),o={normal:1,emphasis:1};i.each(r,(function(t,e){o[e]||s(a,e)||(a[e]=t)})),n.label&&!s(r,"emphasis")&&(r.emphasis=n.label,delete n.label)}function s(t,e){return t.hasOwnProperty(e)}t.exports=r},"66fc":function(t,e,n){var i=n("6d8b"),r=n("84ce"),a=function(t,e,n,i,a){r.call(this,t,e,n),this.type=i||"value",this.position=a||"bottom",this.orient=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},i.inherits(a,r);var o=a;t.exports=o},"675a":function(t,e){function n(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),i=t.getGraph(),r=i.data,a=n.mapArray(n.getName);r.filterSelf((function(t){var n=r.getItemModel(t),i=n.getShallow("category");if(null!=i){"number"===typeof i&&(i=a[i]);for(var o=0;o0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function D(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function L(t,e,n,i,r,s,u,c){var h=e.getItemVisual(n,"color"),d=e.getItemVisual(n,"opacity"),f=e.getVisual("borderColor"),p=i.getModel("itemStyle"),g=i.getModel("emphasis.itemStyle").getBarItemStyle();c||t.setShape("r",p.get("barBorderRadius")||0),t.useStyle(a.defaults({stroke:D(r)?"none":f,fill:D(r)?"none":h,opacity:d},p.getBarItemStyle()));var v=i.getShallow("cursor");v&&t.attr("cursor",v);var m=u?r.height>0?"bottom":"top":r.width>0?"left":"right";c||l(t.style,g,i,h,s,n,m),D(r)&&(g.fill=g.stroke="none"),o.setHoverStyle(t,g)}function P(t,e){var n=t.get(y)||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,r)}var k=h.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,a=0;a=0?n:null}),30,!1);function N(t,e,n){var i=t.__baseDimIdx,r=1-i,a=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];x[0]=e,x[1]=n;for(var u=x[i],c=x[1-i],h=u-s,d=u+s,f=0,p=a.length/2;f=h&&v<=d&&(l<=m?c>=l&&c<=m:c>=m&&c<=l))return o[f]}return-1}function R(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function z(t,e,n){var i=e.get("borderColor")||e.get("color"),r=e.getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function B(t,e,n){var i,r="polar"===n.type;return i=r?n.getArea():n.grid.getRect(),r?{cx:i.cx,cy:i.cy,r0:t?i.r0:e.r0,r:t?i.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:i.x,y:t?i.y:e.y,width:t?e.width:i.width,height:t?i.height:e.height}}function V(t,e,n){var i="polar"===t.type?o.Sector:o.Rect;return new i({shape:B(e,n,t),silent:!0,z2:0})}t.exports=b},"68ab":function(t,e,n){var i=n("4a3f"),r=i.quadraticProjectPoint;function a(t,e,n,i,a,o,s,l,u){if(0===s)return!1;var c=s;if(u>e+c&&u>i+c&&u>o+c||ut+c&&l>n+c&&l>a+c||l0&&u>0&&!f&&(s=0),s<0&&u<0&&!p&&(u=0));var v=e.ecModel;if(v&&"time"===o){var m,y=c("bar",v);if(r.each(y,(function(t){m|=t.getBaseAxis()===e.axis})),m){var x=h(y),_=g(s,u,e,x);s=_.min,u=_.max}}return{extent:[s,u],fixMin:f,fixMax:p}}function g(t,e,n,i){var a=n.axis.getExtent(),o=a[1]-a[0],s=d(i,n.axis);if(void 0===s)return{min:t,max:e};var l=1/0;r.each(s,(function(t){l=Math.min(t.offset,l)}));var u=-1/0;r.each(s,(function(t){u=Math.max(t.offset+t.width,u)})),l=Math.abs(l),u=Math.abs(u);var c=l+u,h=e-t,f=1-(l+u)/o,p=h/f-h;return e+=p*(u/c),t-=p*(l/c),{min:t,max:e}}function v(t,e){var n=p(t,e),i=n.extent,r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var o=e.get("interval");null!=o&&t.setInterval&&t.setInterval(o)}function m(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new a(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new o;default:return(s.getClass(e)||o).create(t)}}function y(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function x(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"===typeof e?(e=function(e){return function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}}(e),e):"function"===typeof e?function(i,r){return null!=n&&(r=i-n),e(_(t,i),r)}:function(e){return t.scale.getLabel(e)}}function _(t,e){return"category"===t.type?t.scale.getLabel(e):e}function b(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===t.type,o=n.getExtent();a?r=n.count():(i=n.getTicks(),r=i.length);var s,l=t.getLabelModel(),u=x(t),c=1;r>40&&(c=Math.ceil(r/40));for(var h=0;hn.blockIndex,a=r?n.step:null,o=i&&i.modDataCount,s=null!=o?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},y.getPipeline=function(t){return this._pipelineMap.get(t)},y.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),a=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:a,modDataCount:s,large:o}},y.restorePipelines=function(t){var e=this,n=e._pipelineMap=s();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),k(e,t,t.dataTask)}))},y.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;r(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&b(this,i,r,e,n),i.overallReset&&w(this,i,r,e,n)}),this)},y.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,k(this,e,r)},y.performDataProcessorTasks=function(t,e){x(this,this._dataProcessorHandlers,t,e,{block:!0})},y.performVisualTasks=function(t,e,n){x(this,this._visualHandlers,t,e,n)},y.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},y.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var _=y.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function b(t,e,n,i,r){var a=n.seriesTaskMap||(n.seriesTaskMap=s()),o=e.seriesType,l=e.getTargetSeries;function u(n){var o=n.uid,s=a.get(o)||a.set(o,c({plan:T,reset:C,count:P}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},k(t,n,s)}e.createOnAllSeries?i.eachRawSeries(u):o?i.eachRawSeriesByType(o,u):l&&l(i,r).each(u);var h=t._pipelineMap;a.each((function(t,e){h.get(e)||(t.dispose(),a.removeKey(e))}))}function w(t,e,n,i,a){var o=n.overallTask=n.overallTask||c({reset:S});o.context={ecModel:i,api:a,overallReset:e.overallReset,scheduler:t};var l=o.agentStubMap=o.agentStubMap||s(),u=e.seriesType,h=e.getTargetSeries,d=!0,f=e.modifyOutputEnd;function p(e){var n=e.uid,i=l.get(n);i||(i=l.set(n,c({reset:M,onDirty:I})),o.dirty()),i.context={model:e,overallProgress:d,modifyOutputEnd:f},i.agent=o,i.__block=d,k(t,e,i)}u?i.eachRawSeriesByType(u,p):h?h(i,a).each(p):(d=!1,r(i.getSeries(),p));var g=t._pipelineMap;l.each((function(t,e){g.get(e)||(t.dispose(),o.dirty(),l.removeKey(e))}))}function S(t){t.overallReset(t.ecModel,t.api,t.payload)}function M(t,e){return t.overallProgress&&A}function A(){this.agent.dirty(),this.getDownstream().dirty()}function I(){this.agent&&this.agent.dirty()}function T(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function C(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=v(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?a(e,(function(t,e){return L(e)})):D}var D=L(0);function L(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a=0;l--)if(i[l]<=e)break;l=Math.min(l,r-2)}else{for(var l=a;le)break;l=Math.min(l-1,r-2)}o.lerp(t.position,n[l],n[l+1],(e-i[l])/(i[l+1]-i[l]));var u=n[l+1][0]-n[l][0],c=n[l+1][1]-n[l][1];t.rotation=-Math.atan2(c,u)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=e,t.ignore=!1}},r.inherits(s,a);var u=s;t.exports=u},"6acf":function(t,e,n){var i=n("eda2"),r=n("dcb3"),a=n("2306"),o=n("ff2e"),s=n("1687"),l=n("fab2"),u=n("6679"),c=r.extend({makeElOption:function(t,e,n,r,a){var s=n.axis;"angle"===s.dim&&(this.animationThreshold=Math.PI/18);var l,u=s.polar,c=u.getOtherAxis(s),f=c.getExtent();l=s["dataTo"+i.capitalFirst(s.dim)](e);var p=r.get("type");if(p&&"none"!==p){var g=o.buildElStyle(r),v=d[p](s,u,l,f,g);v.style=g,t.graphicKey=v.type,t.pointer=v}var m=r.get("label.margin"),y=h(e,n,r,u,m);o.buildLabelElOption(t,n,r,a,y)}});function h(t,e,n,i,r){var o=e.axis,u=o.dataToCoord(t),c=i.getAngleAxis().getExtent()[0];c=c/180*Math.PI;var h,d,f,p=i.getRadiusAxis().getExtent();if("radius"===o.dim){var g=s.create();s.rotate(g,g,c),s.translate(g,g,[i.cx,i.cy]),h=a.applyTransform([u,-r],g);var v=e.getModel("axisLabel").get("rotate")||0,m=l.innerTextLayout(c,v*Math.PI/180,-1);d=m.textAlign,f=m.textVerticalAlign}else{var y=p[1];h=i.coordToPoint([y+r,u]);var x=i.cx,_=i.cy;d=Math.abs(h[0]-x)/y<.3?"center":h[0]>x?"left":"right",f=Math.abs(h[1]-_)/y<.3?"middle":h[1]>_?"top":"bottom"}return{position:h,align:d,verticalAlign:f}}var d={line:function(t,e,n,i,r){return"angle"===t.dim?{type:"Line",shape:o.makeLineShape(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i,r){var a=Math.max(1,t.getBandWidth()),s=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:o.makeSectorShape(e.cx,e.cy,i[0],i[1],(-n-a/2)*s,(a/2-n)*s)}:{type:"Sector",shape:o.makeSectorShape(e.cx,e.cy,n-a/2,n+a/2,0,2*Math.PI)}}};u.registerAxisPointerClass("PolarAxisPointer",c);var f=c;t.exports=f},"6bd4":function(t,e){var n={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};function i(t,e){if("world"===t){var i=n[e.name];if(i){var r=e.center;r[0]=i[0],r[1]=i[1]}}}t.exports=i},"6c12":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("6d8b"),o=n("fab2"),s=n("2306"),l=["axisLine","axisTickLabel","axisName"],u=r.extendComponentView({type:"radar",render:function(t,e,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=a.map(n,(function(t){var n=new o(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n}));a.each(i,(function(t){a.each(l,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),l=r.getModel("lineStyle"),u=o.getModel("areaStyle"),c=r.get("show"),h=o.get("show"),d=l.get("color"),f=u.get("color");d=a.isArray(d)?d:[d],f=a.isArray(f)?f:[f];var p=[],g=[];if("circle"===i)for(var v=n[0].getTicksCoords(),m=e.cx,y=e.cy,x=0;x=0;o--)a=i.merge(a,e[o],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function g(t){var e=[];return i.each(p.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=i.map(e,(function(t){return l(t).main})),"dataset"!==t&&i.indexOf(e,"dataset")<=0&&e.unshift("dataset"),e}s(p,{registerWhenExtend:!0}),a.enableSubTypeDefaulter(p),a.enableTopologicalTravel(p,g),i.mixin(p,d);var v=p;t.exports=v},"6cc5":function(t,e,n){var i=n("6d8b"),r=n("401b"),a=n("1687"),o=n("9850"),s=n("0cde"),l=r.applyTransform;function u(){s.call(this)}function c(t){this.name=t,this.zoomLimit,s.call(this),this._roamTransformable=new u,this._rawTransformable=new u,this._center,this._zoom}function h(t,e,n,i){var r=n.seriesModel,a=r?r.coordinateSystem:null;return a===this?a[t](i):null}i.mixin(u,s),c.prototype={constructor:c,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new o(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new o(t,e,n,i)},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=this._rawTransformable;a.transform=r.calculateTransform(new o(t,e,n,i)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,n=t.y+t.height/2;return[e,n]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),a=this.getZoom();i=r.applyTransform([],i,t),n=r.applyTransform([],n,t),e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),a.copy(this.transform||(this.transform=[]),e.transform||a.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?i.slice(t):a.create(),rawScale:i.slice(e.scale),rawPosition:i.slice(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?l(n,t,i):r.copy(n,t)},pointToData:function(t){var e=this.invTransform;return e?l([],t,e):[t[0],t[1]]},convertToPixel:i.curry(h,"dataToPoint"),convertFromPixel:i.curry(h,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},i.mixin(c,s);var d=c;t.exports=d},"6cd8":function(t,e,n){var i=n("6d8b"),r=n("2306"),a=n("1418"),o=n("22da"),s=o.radialCoordinate,l=n("3eba"),u=n("e263"),c=n("6cc5"),h=n("01ef"),d=n("4a01"),f=n("c526"),p=f.onIrrelevantElement,g=n("4e08"),v=(g.__DEV__,n("3842")),m=v.parsePercent,y=r.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,a=n[0],o=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=m(e.forkPosition,1),h=[];h[l]=r[l],h[u]=r[u]+(o[u]-r[u])*c,t.moveTo(r[0],r[1]),t.lineTo(h[0],h[1]),t.moveTo(a[0],a[1]),h[l]=a[l],t.lineTo(h[0],h[1]),h[l]=o[l],t.lineTo(h[0],h[1]),t.lineTo(o[0],o[1]);for(var d=1;dw.x,x||(y-=Math.PI));var I=x?"left":"right",T=s.labelModel.get("rotate"),C=T*(Math.PI/180);m.setStyle({textPosition:s.labelModel.get("position")||I,textRotation:null==T?-y:C,textOrigin:"center",verticalAlign:"middle"})}S(o,u,h,n,g,p,v,i,s)}function S(t,e,n,a,o,s,l,u,c){var h=c.edgeShape,d=a.__edge;if("curve"===h)e.parentNode&&e.parentNode!==n&&(d||(d=a.__edge=new r.BezierCurve({shape:A(c,o,o),style:i.defaults({opacity:0,strokeNoScale:!0},c.lineStyle)})),r.updateProps(d,{shape:A(c,s,l),style:{opacity:1}},t));else if("polyline"===h&&"orthogonal"===c.layout&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var f=e.children,p=[],g=0;g=0;a--)i.push(r[a])}}e.eachAfter=n,e.eachBefore=i},"6eeb":function(t,e,n){var i=n("da84"),r=n("9112"),a=n("5135"),o=n("ce4e"),s=n("8925"),l=n("69f3"),u=l.get,c=l.enforce,h=String(String).split("String");(t.exports=function(t,e,n,s){var l=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||a(n,"name")||r(n,"name",e),c(n).source=h.join("string"==typeof e?e:"")),t!==i?(l?!d&&t[e]&&(u=!0):delete t[e],u?t[e]=n:r(t,e,n)):u?t[e]=n:o(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},"6fda":function(t,e,n){var i=n("6d8b"),r=i.each,a="\0_ec_hist_store";function o(t,e){var n=c(t);r(e,(function(e,i){for(var r=n.length-1;r>=0;r--){var a=n[r];if(a[i])break}if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var s=o.getPercentRange();n[0][i]={dataZoomId:i,start:s[0],end:s[1]}}}})),n.push(e)}function s(t){var e=c(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return r(n,(function(t,n){for(var r=e.length-1;r>=0;r--){t=e[r][n];if(t){i[n]=t;break}}})),i}function l(t){t[a]=null}function u(t){return c(t).length}function c(t){var e=t[a];return e||(e=t[a]=[{}]),e}e.push=o,e.pop=s,e.clear=l,e.count=u},7023:function(t,e,n){var i=n("6d8b"),r={updateSelectedMap:function(t){this._targetList=i.isArray(t)?t.slice():[],this._selectTargetMap=i.reduce(t||[],(function(t,e){return t.set(e.name,e),t}),i.createHashMap())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t),i=this.get("selectedMode");"single"===i&&this._selectTargetMap.each((function(t){t.selected=!1})),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=n)return this[n.selected?"unSelect":"select"](t,e),n.selected},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}};t.exports=r},7156:function(t,e,n){var i=n("861d"),r=n("d2bb");t.exports=function(t,e,n){var a,o;return r&&"function"==typeof(a=e.constructor)&&a!==n&&i(o=a.prototype)&&o!==n.prototype&&r(t,o),t}},"71ad":function(t,e,n){var i=n("6d8b"),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},a={};a.categoryAxis=i.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},r),a.valueAxis=i.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},r),a.timeAxis=i.defaults({scale:!0,min:"dataMin",max:"dataMax"},a.valueAxis),a.logAxis=i.defaults({scale:!0,logBase:10},a.valueAxis);var o=a;t.exports=o},"71b2":function(t,e,n){var i=n("6d8b"),r=i.createHashMap;function a(t){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),n=t.getRawData(),i=t.get("color"),a=r();e.each((function(t){a.set(e.getRawIndex(t),t)})),n.each((function(r){var o=n.getName(r),s=i[(t.nameMap.get(o)-1)%i.length];n.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&e.setItemVisual(l,"color",s)}))}))}t.exports=a},7293:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("4f85")),a=n("6179"),o=n("6d8b"),s=o.concatArray,l=o.mergeAll,u=o.map,c=n("eda2"),h=c.encodeHTML,d=(n("2039"),"undefined"===typeof Uint32Array?Array:Uint32Array),f="undefined"===typeof Float64Array?Array:Float64Array;function p(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=u(e,(function(t){var e=[t[0].coord,t[1].coord],n={coords:e};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),l([n,t[0],t[1]])})))}var g=r.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],p(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),g.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],p(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}g.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=s(this._flatCoords,e.flatCoords),this._flatCoordsOffset=s(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),n=e.option instanceof Array?e.option:e.getShallow("coords");return n},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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}}}),v=g;t.exports=v},"72b6":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("2306"),o=n("eda2"),s=n("f934"),l=n("5f14"),u=i.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,n,i){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,n=o.normalizeCssArray(e.get("padding")||0),i=t.getBoundingRect();t.add(new a.Rect({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,n){n=n||{};var i=n.forceState,a=this.visualMapModel,o={};if("symbol"===e&&(o.symbol=a.get("itemSymbol")),"color"===e){var s=a.get("contentColor");o.color=s}function u(t){return o[t]}function c(t,e){o[t]=e}var h=a.controllerVisuals[i||a.getValueState(t)],d=l.prepareVisualTypes(h);return r.each(d,(function(i){var r=h[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",r=h.__alphaForOpacity),l.dependsOn(i,e)&&r&&r.applyVisual(t,u,c)})),o[e]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;s.positionElement(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:r.noop});t.exports=u},7368:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=n("625e"),o=a.enableClassCheck;function s(t){return"_EC_"+t}var l=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},u=l.prototype;function c(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function h(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}u.type="graph",u.isDirected=function(){return this._directed},u.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[s(t)]){var i=new c(t,e);return i.hostGraph=this,this.nodes.push(i),n[s(t)]=i,i}},u.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},u.getNodeById=function(t){return this._nodesMap[s(t)]},u.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if("number"===typeof t&&(t=this.nodes[t]),"number"===typeof e&&(e=this.nodes[e]),c.isInstance(t)||(t=i[s(t)]),c.isInstance(e)||(e=i[s(e)]),t&&e){var a=t.id+"-"+e.id;if(!r[a]){var o=new h(t,e,n);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),r[a]=o,o}}},u.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},u.getEdge=function(t,e){c.isInstance(t)&&(t=t.id),c.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},u.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},u.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},u.breadthFirstTraverse=function(t,e,n,i){if(c.isInstance(e)||(e=this._nodesMap[s(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a=0&&n.node2.dataIndex>=0}));for(r=0,a=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[t][e].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};r.mixin(c,d("hostGraph","data")),r.mixin(h,d("hostGraph","edgeData")),l.Node=c,l.Edge=h,o(c),o(h);var f=l;t.exports=f},"73ca":function(t,e,n){var i=n("2306"),r=n("7e5b");function a(t){this._ctor=t||r,this.group=new i.Group}var o=a.prototype;function s(t,e,n,i){var r=e.getItemLayout(n);if(d(r)){var a=new t._ctor(e,n,i);e.setItemGraphicEl(n,a),t.group.add(a)}}function l(t,e,n,i,r,a){var o=e.getItemGraphicEl(i);d(n.getItemLayout(r))?(o?o.updateData(n,r,a):o=new t._ctor(n,r,a),n.setItemGraphicEl(r,o),t.group.add(o)):t.group.remove(o)}function u(t){return t.animators&&t.animators.length>0}function c(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function h(t){return isNaN(t[0])||isNaN(t[1])}function d(t){return!h(t[0])&&!h(t[1])}o.isPersistent=function(){return!0},o.updateData=function(t){var e=this,n=e.group,i=e._lineData;e._lineData=t,i||n.removeAll();var r=c(t);t.diff(i).add((function(n){s(e,t,n,r)})).update((function(n,a){l(e,i,t,a,n,r)})).remove((function(t){n.remove(i.getItemGraphicEl(t))})).execute()},o.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},o.incrementalPrepareUpdate=function(t){this._seriesScope=c(t),this._lineData=null,this.group.removeAll()},o.incrementalUpdate=function(t,e){function n(t){t.isGroup||u(t)||(t.incremental=t.useHoverLayer=!0)}for(var i=t.start;i=0)return!0}var m=new RegExp("["+c+"]+","g");function y(t){for(var e=t.split(/\n+/g),n=g(e.shift()).split(m),i=[],a=r.map(n,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}function x(t,e,n,i,r){var a=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(a="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var s=new o(m(t.option),e,{include:["grid"]});n._brushController.setPanels(s.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}g._onBrush=function(t,e){if(e.isEnd&&t.length){var n={},i=this.ecModel;this._brushController.updateCovers([]);var r=new o(m(this.model.option),i,{include:["grid"]});r.matchOutputRanges(t,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(a("x",n,e[0]),a("y",n,e[1])):a({lineX:"x",lineY:"y"}[i],n,e)}})),s.push(i,n),this._dispatchZoomAction(n)}function a(t,e,r){var a=e.getAxis(t),o=a.model,s=u(t,o,i),c=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==c.minValueSpan&&null==c.maxValueSpan||(r=l(0,r.slice(),a.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}function u(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){var r=n.getAxisModel(t,e.componentIndex);r&&(i=n)})),i}},g._dispatchZoomAction=function(t){var e=[];d(t,(function(t,n){e.push(r.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},c.register("dataZoom",p),i.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);r.isArray(e)||(t.dataZoom=e=[e]);var n=t.toolbox;if(n&&(r.isArray(n)&&(n=n[0]),n&&n.feature)){var i=n.feature.dataZoom;a("xAxis",i),a("yAxis",i)}}function a(t,n){if(n){var i=t+"Index",a=n[i];null==a||"all"===a||r.isArray(a)||(a=!1===a||"none"===a?[]:[a]),o(t,(function(o,s){if(null==a||"all"===a||-1!==r.indexOf(a,s)){var l={type:"select",$fromToolbox:!0,filterMode:n.filterMode||"filter",id:f+t+s};l[i]=s,e.push(l)}}))}}function o(e,n){var i=t[e];r.isArray(i)||(i=i?[i]:[]),d(i,n)}}));var _=p;t.exports=_},"7c73":function(t,e,n){var i,r=n("825a"),a=n("37e8"),o=n("7839"),s=n("d012"),l=n("1be4"),u=n("cc12"),c=n("f772"),h=">",d="<",f="prototype",p="script",g=c("IE_PROTO"),v=function(){},m=function(t){return d+p+h+t+d+"/"+p+h},y=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},x=function(){var t,e=u("iframe"),n="java"+p+":";return e.style.display="none",l.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(m("document.F=Object")),t.close(),t.F},_=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}_=i?y(i):x();var t=o.length;while(t--)delete _[f][o[t]];return _()};s[g]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(v[f]=r(t),n=new v,v[f]=null,n[g]=t):n=_(),void 0===e?n:a(n,e)}},"7d6d":function(t,e){var n={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function i(t,e,i){return n.hasOwnProperty(e)?i*t.dpr:i}t.exports=i},"7db0":function(t,e,n){"use strict";var i=n("23e7"),r=n("b727").find,a=n("44d2"),o=n("ae40"),s="find",l=!0,u=o(s);s in[]&&Array(1)[s]((function(){l=!1})),i({target:"Array",proto:!0,forced:l||!u},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a(s)},"7dcf":function(t,e,n){var i=n("b12f"),r=i.extend({type:"dataZoom",render:function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,n={};function i(t,e,n,i){for(var r,a=0;a0&&(b[0]=-b[0],b[1]=-b[1]);var S,M=d[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var A=-Math.atan2(d[1],d[0]);c[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":f=[-h[0]*y+u[0],-h[1]*x+u[1]],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":f=[y*M+u[0],u[1]+S],p=d[0]<0?"right":"left",v=[-y*M,-S];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":f=[w[0],w[1]+S],p="center",v=[0,-S];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":f=[-y*M+c[0],c[1]+S],p=d[0]>=0?"right":"left",v=[y*M,-S];break}i.attr({style:{textVerticalAlign:i.__verticalAlign||g,textAlign:i.__textAlign||p},position:f,scale:[a,a],origin:v})}}}}function v(t,e,n){s.Group.call(this),this._createLine(t,e,n)}var m=v.prototype;m.beforeUpdate=g,m._createLine=function(t,e,n){var r=t.hostModel,a=t.getItemLayout(e),o=f(a);o.shape.percent=0,s.initProps(o,{shape:{percent:1}},r,e),this.add(o);var l=new s.Text({name:"label",lineLabelOriginalOpacity:1});this.add(l),i.each(c,(function(n){var i=d(n,t,e);this.add(i),this[h(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},m.updateData=function(t,e,n){var r=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),l={shape:{}};p(l.shape,o),s.updateProps(a,l,r,e),i.each(c,(function(n){var i=t.getItemVisual(e,n),r=h(n);if(this[r]!==i){this.remove(this.childOfName(n));var a=d(n,t,e);this.add(a)}this[r]=i}),this),this._updateCommonStl(t,e,n)},m._updateCommonStl=function(t,e,n){var r=t.hostModel,a=this.childOfName("line"),o=n&&n.lineStyle,l=n&&n.hoverLineStyle,h=n&&n.labelModel,d=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var f=t.getItemModel(e);o=f.getModel("lineStyle").getLineStyle(),l=f.getModel("emphasis.lineStyle").getLineStyle(),h=f.getModel("label"),d=f.getModel("emphasis.label")}var p=t.getItemVisual(e,"color"),g=i.retrieve3(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(i.defaults({strokeNoScale:!0,fill:"none",stroke:p,opacity:g},o)),a.hoverStyle=l,i.each(c,(function(t){var e=this.childOfName(t);e&&(e.setColor(p),e.setStyle({opacity:g}))}),this);var v,m,y=h.getShallow("show"),x=d.getShallow("show"),_=this.childOfName("label");if((y||x)&&(v=p||"#000",m=r.getFormattedLabel(e,"normal",t.dataType),null==m)){var b=r.getRawValue(e);m=null==b?t.getName(e):isFinite(b)?u(b):b}var w=y?m:null,S=x?i.retrieve2(r.getFormattedLabel(e,"emphasis",t.dataType),m):null,M=_.style;if(null!=w||null!=S){s.setTextStyle(_.style,h,{text:w},{autoColor:v}),_.__textAlign=M.textAlign,_.__verticalAlign=M.textVerticalAlign,_.__position=h.get("position")||"middle";var A=h.get("distance");i.isArray(A)||(A=[A,A]),_.__labelDistance=A}_.hoverStyle=null!=S?{text:S,textFill:d.getTextColor(!0),fontStyle:d.getShallow("fontStyle"),fontWeight:d.getShallow("fontWeight"),fontSize:d.getShallow("fontSize"),fontFamily:d.getShallow("fontFamily")}:{text:null},_.ignore=!y&&!x,s.setHoverStyle(this)},m.highlight=function(){this.trigger("emphasis")},m.downplay=function(){this.trigger("normal")},m.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},m.setLinePoints=function(t){var e=this.childOfName("line");p(e.shape,t),e.dirty()},i.inherits(v,s.Group);var y=v;t.exports=y},"7e63":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=r.each,o=r.filter,s=r.map,l=r.isArray,u=r.indexOf,c=r.isObject,h=r.isString,d=r.createHashMap,f=r.assert,p=r.clone,g=r.merge,v=r.extend,m=r.mixin,y=n("e0d3"),x=n("4319"),_=n("6cb7"),b=n("8971"),w=n("e47b"),S=n("0f99"),M=S.resetSourceDefaulter,A="\0_ec_inner",I=x.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new x(n),this._optionManager=i},setOption:function(t,e){f(!(A in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):D.call(this,i),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=n.getMediaOption(this,this._api);o.length&&a(o,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,n=this._componentsMap,i=[];function r(i,r){var o=y.normalizeToArray(t[i]),s=y.mappingToExists(n.get(i),o);y.makeIdAndName(s),a(s,(function(t,e){var n=t.option;c(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=P(i,n,t.exist))}));var l=L(n,r);e[i]=[],n.set(i,[]),a(s,(function(t,r){var a=t.exist,o=t.option;if(f(c(o)||a,"Empty component definition"),o){var s=_.getClass(i,t.keyInfo.subType,!0);if(a&&a.constructor===s)a.name=t.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var u=v({dependentModels:l,componentIndex:r},t.keyInfo);a=new s(o,this,this,u),v(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);n.get(i)[r]=a,e[i][r]=a.option}),this),"series"===i&&k(this,n.get("series"))}M(this),a(t,(function(t,n){null!=t&&(_.hasClass(n)?n&&i.push(n):e[n]=null==e[n]?p(t):g(e[n],t,!0))})),_.topologicalTravel(i,_.getAllClassMainTypes(),r,this),this._seriesIndicesMap=d(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=p(this.option);return a(t,(function(e,n){if(_.hasClass(n)){e=y.normalizeToArray(e);for(var i=e.length-1;i>=0;i--)y.isIdInner(e[i])&&e.splice(i,1);t[n]=e}})),delete t[A],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,a=t.name,c=this._componentsMap.get(e);if(!c||!c.length)return[];if(null!=i)l(i)||(i=[i]),n=o(s(i,(function(t){return c[t]})),(function(t){return!!t}));else if(null!=r){var h=l(r);n=o(c,(function(t){return h&&u(r,t.id)>=0||!h&&t.id===r}))}else if(null!=a){var d=l(a);n=o(c,(function(t){return d&&u(a,t.name)>=0||!d&&t.name===a}))}else n=c.slice();return O(n,t)},findComponents:function(t){var e=t.query,n=t.mainType,i=a(e),r=i?this.queryComponents(i):this._componentsMap.get(n);return s(O(r,t));function a(t){var e=n+"Index",i=n+"Id",r=n+"Name";return!t||null==t[e]&&null==t[i]&&null==t[r]?null:{mainType:n,index:t[e],id:t[i],name:t[r]}}function s(e){return t.filter?o(e,t.filter):e}},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"===typeof t)n=e,e=t,i.each((function(t,i){a(t,(function(t,r){e.call(n,i,t,r)}))}));else if(h(t))a(i.get(t),e,n);else if(c(t)){var r=this.findComponents(t);a(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return o(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return o(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){E(this),a(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)}),this)},eachRawSeries:function(t,e){a(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){E(this),a(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)}),this)},eachRawSeriesByType:function(t,e,n){return a(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return E(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){E(this);var n=o(this._componentsMap.get("series"),t,e);k(this,n)},restoreData:function(t){var e=this._componentsMap;k(this,e.get("series"));var n=[];e.each((function(t,e){n.push(e)})),_.topologicalTravel(n,_.getAllClassMainTypes(),(function(n,i){a(e.get(n),(function(e){("series"!==n||!T(e,t))&&e.restoreData()}))}))}});function T(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function C(t,e){var n=t.color&&!t.colorLayer;a(e,(function(e,i){"colorLayer"===i&&n||_.hasClass(i)||("object"===typeof e?t[i]=t[i]?g(t[i],e,!1):p(e):null==t[i]&&(t[i]=e))}))}function D(t){t=t,this.option={},this.option[A]=1,this._componentsMap=d({series:[]}),this._seriesIndices,this._seriesIndicesMap,C(t,this._theme.option),g(t,b,!1),this.mergeOption(t)}function L(t,e){l(e)||(e=e?[e]:[]);var n={};return a(e,(function(e){n[e]=(t.get(e)||[]).slice()})),n}function P(t,e,n){var i=e.type?e.type:n?n.subType:_.determineSubType(t,e);return i}function k(t,e){t._seriesIndicesMap=d(t._seriesIndices=s(e,(function(t){return t.componentIndex}))||[])}function O(t,e){return e.hasOwnProperty("subType")?o(t,(function(t){return t.subType===e.subType})):t}function E(t){}m(I,w);var N=I;t.exports=N},"7f59":function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("6d8b"),o=n("e0d3"),s=n("2306"),l=n("f934"),u=n("3842"),c=u.parsePercent,h={path:null,compoundPath:null,group:s.Group,image:s.Image,text:s.Text};r.registerPreprocessor((function(t){var e=t.graphic;a.isArray(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}));var d=r.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,d.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,s=[];this._flatten(i,s);var l=o.mappingToExists(r,s);o.makeIdAndName(l);var u=this._elOptionsToUpdate=[];a.each(l,(function(t,e){var n=t.option;n&&(u.push(n),m(t,n),y(r,e,n),x(r[e],n))}),this);for(var c=r.length-1;c>=0;c--)null==r[c]?r.splice(c,1):delete r[c].$action},_flatten:function(t,e,n){a.each(t,(function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function f(t,e,n,i){var r=n.type,a=h.hasOwnProperty(r)?h[r]:s.getShapeClass(r),o=new a(n);e.add(o),i.set(t,o),o.__ecGraphicId=t}function p(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){p(t,e)})),e.removeKey(t.__ecGraphicId),n.remove(t))}function g(t){return t=a.extend({},t),a.each(["id","parentId","$action","hv","bounding"].concat(l.LOCATION_PARAMS),(function(e){delete t[e]})),t}function v(t,e){var n;return a.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}function m(t,e){var n=t.exist;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}function y(t,e,n){var i=a.extend({},n),r=t[e],o=n.$action||"merge";"merge"===o?r?(a.merge(r,i,!0),l.mergeLayoutParam(r,i,{ignoreSize:!0}),l.copyLayoutParams(n,r)):t[e]=i:"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}function x(t,e){t&&(t.hv=e.hv=[v(e,["left","right"]),v(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function _(t,e,n){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}r.extendComponentView({type:"graphic",init:function(t,e){this._elMap=a.createHashMap(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;a.each(e,(function(e){var r=e.$action,a=e.id,o=n.get(a),s=e.parentId,l=null!=s?n.get(s):i,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var c=g(e);r&&"merge"!==r?"replace"===r?(p(o,n),f(a,l,c,n)):"remove"===r&&p(o,n):o?o.attr(c):f(a,l,c,n);var h=n.get(a);h&&(h.__ecGraphicWidthOption=e.width,h.__ecGraphicHeightOption=e.height,_(h,t,e))}))}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,a=e.getWidth(),o=e.getHeight(),s=0;s=0;s--){u=n[s],h=r.get(u.id);if(h){d=h.parent;var p=d===i?{width:a,height:o}:{width:d.__ecGraphicWidth,height:d.__ecGraphicHeight};l.positionElement(h,u,p,null,{hv:u.hv,boundingMode:u.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){p(e,t)})),this._elMap=a.createHashMap()},dispose:function(){this._clear()}})},"7f72":function(t,e,n){n("6932"),n("3a56"),n("7dcf"),n("a18f"),n("32a1"),n("2c17"),n("9e87")},"7f91":function(t,e,n){var i=n("2306"),r=n("401b"),a=i.Line.prototype,o=i.BezierCurve.prototype;function s(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var l=i.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[s(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:a.buildPath,_buildPathCurve:o.buildPath,pointAt:function(t){return this[s(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:a.pointAt,_pointAtCurve:o.pointAt,tangentAt:function(t){var e=this.shape,n=s(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return r.normalize(n,n)},_tangentAtCurve:o.tangentAt});t.exports=l},"7f96":function(t,e,n){var i=n("6d8b"),r=i.isFunction;function a(t,e,n){return{seriesType:t,performRawSeries:!0,reset:function(t,i,a){var o=t.getData(),s=t.get("symbol"),l=t.get("symbolSize"),u=t.get("symbolKeepAspect"),c=t.get("symbolRotate"),h=r(s),d=r(l),f=r(c),p=h||d||f,g=!h&&s?s:e,v=d?null:l;if(o.setVisual({legendSymbol:n||g,symbol:g,symbolSize:v,symbolKeepAspect:u,symbolRotate:c}),!i.isSeriesFiltered(t))return{dataEach:o.hasItemOption||p?m:null};function m(e,n){if(p){var i=t.getRawValue(n),r=t.getDataParams(n);h&&e.setItemVisual(n,"symbol",s(i,r)),d&&e.setItemVisual(n,"symbolSize",l(i,r)),f&&e.setItemVisual(n,"symbolRotate",c(i,r))}if(e.hasItemOption){var a=e.getItemModel(n),o=a.getShallow("symbol",!0),u=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),v=a.getShallow("symbolKeepAspect",!0);null!=o&&e.setItemVisual(n,"symbol",o),null!=u&&e.setItemVisual(n,"symbolSize",u),null!=g&&e.setItemVisual(n,"symbolRotate",g),null!=v&&e.setItemVisual(n,"symbolKeepAspect",v)}}}}}t.exports=a},"7f9a":function(t,e,n){var i=n("da84"),r=n("8925"),a=i.WeakMap;t.exports="function"===typeof a&&/native code/.test(r(a))},"80f0":function(t,e){function n(t){return t}function i(t,e,i,r,a){this._old=t,this._new=e,this._oldKeyGetter=i||n,this._newKeyGetter=r||n,this.context=a}function r(t,e,n,i,r){for(var a=0;a=0;_&&x.depth>v&&(v=x.depth),y.setLayout({depth:_?x.depth:h},!0),"vertical"===a?y.setLayout({dy:n},!0):y.setLayout({dx:n},!0);for(var b=0;bh-1?v:h-1;o&&"left"!==o&&f(t,o,a,I);d="vertical"===a?(r-n)/I:(i-n)/I;g(t,d,a)}function d(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function f(t,e,n,i){if("right"===e){var a=[],o=t,s=0;while(o.length){for(var l=0;l0;a--)l*=.99,_(s,l,o),x(s,r,n,i,o),C(s,l,o),x(s,r,n,i,o)}function m(t,e){var n=[],i="vertical"===e?"y":"x",a=o(t,(function(t){return t.getLayout()[i]}));return a.keys.sort((function(t,e){return t-e})),r.each(a.keys,(function(t){n.push(a.buckets.get(t))})),n}function y(t,e,n,i,a,o){var s=1/0;r.each(t,(function(t){var e=t.length,l=0;r.each(t,(function(t){l+=t.getLayout().value}));var u="vertical"===o?(i-(e-1)*a)/l:(n-(e-1)*a)/l;u0&&(r=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]+s.getLayout()[h]+e;var f="vertical"===a?i:n;if(l=u-e-f,l>0)for(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0),u=r,d=c-2;d>=0;--d)s=t[d],l=s.getLayout()[o]+s.getLayout()[h]+e-u,l>0&&(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]}))}function _(t,e,n){r.each(t.slice().reverse(),(function(t){r.each(t,(function(t){if(t.outEdges.length){var i=T(t.outEdges,b,n)/T(t.outEdges,I,n);if(isNaN(i)){var r=t.outEdges.length;i=r?T(t.outEdges,w,n)/r:0}if("vertical"===n){var a=t.getLayout().x+(i-A(t,n))*e;t.setLayout({x:a},!0)}else{var o=t.getLayout().y+(i-A(t,n))*e;t.setLayout({y:o},!0)}}}))}))}function b(t,e){return A(t.node2,e)*t.getValue()}function w(t,e){return A(t.node2,e)}function S(t,e){return A(t.node1,e)*t.getValue()}function M(t,e){return A(t.node1,e)}function A(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function I(t){return t.getValue()}function T(t,e,n){var i=0,r=t.length,a=-1;while(++a=0){var u=a.indexOf(s),c=a.substr(l+o.length,u-l-o.length);c.indexOf("sub")>-1?i["marker"+c]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[c],textOffset:[3,0]}:i["marker"+c]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[c]},a=a.substr(u+1),l=a.indexOf("{marker")}this.el=new r({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",(function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0})),this.el.on("mouseout",(function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(i.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var o=a;t.exports=o},8344:function(t,e,n){var i=n("6d8b"),r=n("f706"),a=n("3842"),o=n("6179"),s=n("923d"),l=n("88f0");function u(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,s=t.getItemModel(r),l=a.parsePercent(s.get("x"),n.getWidth()),u=a.parsePercent(s.get("y"),n.getHeight());if(isNaN(l)||isNaN(u)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var c=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([c,h])}}else o=[l,u];isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u),t.setItemLayout(r,o)}))}var c=l.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries((function(t){var e=t.markPointModel;e&&(u(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))}),this)},renderSeries:function(t,e,n,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),c=this.markerGroupMap,d=c.get(s)||c.set(s,new r),f=h(o,t,e);e.setData(f),u(e.getData(),t,a),f.each((function(t){var n=f.getItemModel(t),r=n.getShallow("symbol"),a=n.getShallow("symbolSize"),o=i.isFunction(r),s=i.isFunction(a);if(o||s){var u=e.getRawValue(t),c=e.getDataParams(t);o&&(r=r(u,c)),s&&(a=a(u,c))}f.setItemVisual(t,{symbol:r,symbolSize:a,color:n.get("itemStyle.color")||l.getVisual("color")})})),d.updateData(f),this.group.add(d.group),f.eachItemGraphicEl((function(t){t.traverse((function(t){t.dataModel=e}))})),d.__keep=!0,d.group.silent=e.get("silent")||t.get("silent")}});function h(t,e,n){var r;r=t?i.map(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return i.defaults({name:t},n)})):[{name:"value",type:"float"}];var a=new o(r,n),l=i.map(n.get("data"),i.curry(s.dataTransform,e));return t&&(l=i.filter(l,i.curry(s.dataFilter,t))),a.initData(l,null,t?s.dimValueGetter:function(t){return t.value}),a}t.exports=c},"83ab":function(t,e,n){var i=n("d039");t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83ba":function(t,e,n){var i=n("6d8b"),r=n("6cb7"),a=n("f934"),o=a.getLayoutParams,s=a.sizeCalculable,l=a.mergeLayoutParam,u=r.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,n,i){var r=o(t);u.superApply(this,"init",arguments),c(t,r)},mergeOption:function(t,e){u.superApply(this,"mergeOption",arguments),c(this.option,t)}});function c(t,e){var n=t.cellSize;i.isArray(n)?1===n.length&&(n[1]=n[0]):n=t.cellSize=[n,n];var r=i.map([0,1],(function(t){return s(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));l(t,e,{type:"box",ignoreSize:r})}var h=u;t.exports=h},8418:function(t,e,n){"use strict";var i=n("c04e"),r=n("9bf2"),a=n("5c6c");t.exports=function(t,e,n){var o=i(e);o in t?r.f(t,o,a(0,n)):t[o]=n}},"843e":function(t,e,n){var i=n("6d8b"),r=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function a(t){i.each(r,(function(e){this[e]=i.bind(t[e],t)}),this)}var o=a;t.exports=o},8459:function(t,e,n){var i=n("3eba"),r={type:"axisAreaSelect",event:"axisAreaSelected"};i.registerAction(r,(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),i.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}))},"849b":function(t,e,n){var i=n("d9d0"),r=n("2039");function a(t,e){var n=[];return t.eachComponent("parallel",(function(r,a){var o=new i(r,t,e);o.name="parallel_"+a,o.resize(r,e),r.coordinateSystem=o,o.model=r,n.push(o)})),t.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var n=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=n.coordinateSystem}})),n}r.register("parallel",{create:a})},"84ce":function(t,e,n){var i=n("6d8b"),r=i.each,a=i.map,o=n("3842"),s=o.linearMap,l=o.getPixelPrecision,u=o.round,c=n("e073"),h=c.createAxisTicks,d=c.createAxisLabels,f=c.calculateCategoryInterval,p=[0,1],g=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function v(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function m(t,e,n,i){var a=e.length;if(t.onBand&&!n&&a){var o,s,l=t.getExtent();if(1===a)e[0].coord=l[0],o=e[1]={coord:l[0]};else{var c=e[a-1].tickValue-e[0].tickValue,h=(e[a-1].coord-e[0].coord)/c;r(e,(function(t){t.coord-=h/2}));var d=t.scale.getExtent();s=1+d[1]-e[a-1].tickValue,o={coord:e[a-1].coord+h*s},e.push(o)}var f=l[0]>l[1];p(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift()),i&&p(l[0],e[0].coord)&&e.unshift({coord:l[0]}),p(l[1],o.coord)&&(i?o.coord=l[1]:e.pop()),i&&p(o.coord,l[1])&&e.push({coord:l[1]})}function p(t,e){return t=u(t),e=u(e),f?t>e:t=n&&t<=i},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return l(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),v(n,i.count())),s(t,p,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),v(n,i.count()));var r=s(t,n,p,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=h(this,e),i=n.ticks,r=a(i,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this),o=e.get("alignWithLabel");return m(this,r,o,t.clamp),r},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=a(n,(function(t){return a(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this);return i},getViewLabels:function(){return d(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return f(this)}};var y=g;t.exports=y},"84d5":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("4319"),o=n("e0d3"),s=o.isNameSpecified,l=n("29a8"),u=l.legend.selector,c={all:{type:"all",title:r.clone(u.all)},inverse:{type:"inverse",title:r.clone(u.inverse)}},h=i.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){h.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;!0===e&&(e=t.selector=["all","inverse"]),r.isArray(e)&&r.each(e,(function(t,n){r.isString(t)&&(t={type:t}),e[n]=r.merge(t,c[t.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}}),d=h;t.exports=d},"84ec":function(t,e){var n=Math.log(2);function i(t,e,r,a,o,s){var l=a+"-"+o,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var c=Math.round(Math.log((1<e&&a>i||ar?o:0}t.exports=n},"879e":function(t,e,n){var i=n("3eba"),r=n("6179"),a=n("6d8b"),o=n("e0d3"),s=o.defaultEmphasis,l=n("4319"),u=n("eda2"),c=u.encodeHTML,h=n("237f"),d=n("c4a3"),f=i.extendSeriesModel({type:"series.graph",init:function(t){f.superApply(this,"init",arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new d(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){f.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){f.superApply(this,"mergeDefaultAndTheme",arguments),s(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&n)return h(i,n,this,!0,a).data;function a(t,n){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels,n=t.getShallow("category"),i=e[n];return i&&(i.parentModel=t.parentModel,t.parentModel=i),t}));var i=r.getModel("edgeLabel"),a=new l({label:i.option},i.parentModel,e),o=r.getModel("emphasis.edgeLabel"),s=new l({emphasis:{label:o.option}},o.parentModel,e);function u(t){return t=this.parsePath(t),t&&"label"===t[0]?a:t&&"emphasis"===t[0]&&"label"===t[1]?s:this.parentModel}n.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(u),t}))}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),a=i.graph.getEdgeByIndex(t),o=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=c(l.join(" > ")),r.value&&(l+=" : "+c(r.value)),l}return f.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=a.map(this.option.categories||[],(function(t){return null!=t.value?t:a.extend({value:0},t)})),e=new r(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return f.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,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,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),p=f;t.exports=p},"87b1":function(t,e,n){var i=n("cbe5"),r=n("4fac"),a=i.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){r.buildPath(t,e,!0)}});t.exports=a},"87c3":function(t,e,n){var i=n("6d8b"),r=i.map,a=n("cccd"),o=n("ee1a"),s=o.isDimensionStacked;function l(t){return{seriesType:t,plan:a(),reset:function(t){var e=t.getData(),n=t.coordinateSystem,i=t.pipelineContext,a=i.large;if(n){var o=r(n.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),l=o.length,u=e.getCalculationInfo("stackResultDimension");return s(e,o[0])&&(o[0]=u),s(e,o[1])&&(o[1]=u),l&&{progress:c}}function c(t,e){for(var i=t.end-t.start,r=a&&new Float32Array(i*l),s=t.start,u=0,c=[],h=[];s([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=t.replace(e,"$1").trim());for(var c=0;c=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}function o(t,e,o,s){var l=t[e];if(l){var u=l[n]||l,c=l[r],h=l[i];if(h!==o||c!==s){if(null==o||!s)return t[e]=u;l=t[e]=a(u,o,"debounce"===s),l[n]=u,l[r]=s,l[i]=o}return l}}function s(t,e){var i=t[e];i&&i[n]&&(t[e]=i[n])}e.throttle=a,e.createOrUpdate=o,e.clear=s},"88f0":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=i.extendComponentView({type:"marker",init:function(){this.markerGroupMap=r.createHashMap()},render:function(t,e,n){var i=this.markerGroupMap;i.each((function(t){t.__keep=!1}));var r=this.type+"Model";e.eachSeries((function(t){var i=t[r];i&&this.renderSeries(t,i,e,n)}),this),i.each((function(t){!t.__keep&&this.group.remove(t.group)}),this)},renderSeries:function(){}});t.exports=a},8918:function(t,e,n){var i=n("6d8b"),r=n("625e"),a=r.parseClassType,o=0;function s(t){return[t||"",o++,Math.random().toFixed(5)].join("_")}function l(t){var e={};return t.registerSubTypeDefaulter=function(t,n){t=a(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=a(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r},t}function u(t,e){function n(t){var n={},o=[];return i.each(t,(function(s){var l=r(n,s),u=l.originalDeps=e(s),c=a(u,t);l.entryCount=c.length,0===l.entryCount&&o.push(s),i.each(c,(function(t){i.indexOf(l.predecessor,t)<0&&l.predecessor.push(t);var e=r(n,t);i.indexOf(e.successor,t)<0&&e.successor.push(s)}))})),{graph:n,noEntryList:o}}function r(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function a(t,e){var n=[];return i.each(t,(function(t){i.indexOf(e,t)>=0&&n.push(t)})),n}t.topologicalTravel=function(t,e,r,a){if(t.length){var o=n(e),s=o.graph,l=o.noEntryList,u={};i.each(t,(function(t){u[t]=!0}));while(l.length){var c=l.pop(),h=s[c],d=!!u[c];d&&(r.call(a,c,h.originalDeps.slice()),delete u[c]),i.each(h.successor,d?p:f)}i.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function p(t){u[t]=!0,f(t)}}}e.getUID=s,e.enableSubTypeDefaulter=l,e.enableTopologicalTravel=u},8925:function(t,e,n){var i=n("c6cd"),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return r.call(t)}),t.exports=i.inspectSource},8971:function(t,e){var n="";"undefined"!==typeof navigator&&(n=navigator.platform||"");var i={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:n.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};t.exports=i},"897a":function(t,e,n){var i=n("22d1"),r=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function a(t){return i.browser.ie&&i.browser.version>=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var a=0;ae[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=o.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;var o=1e4;n[0]o)return[]}var u=a.length?a[a.length-1]:i[1];return n[1]>u&&(t?a.push(s(u+e,r)):a.push(n[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],r=this.getExtent(),a=1;ar[0]&&d0)i*=10;var o=[a.round(d(e[0]/i)*i),a.round(h(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},niceExtent:function(t){l.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function v(t,e){return c(t,u(e))}i.each(["contain","normalize"],(function(t){g.prototype[t]=function(e){return e=p(e)/p(this.base),s[t].call(this,e)}})),g.create=function(){return new g};var m=g;t.exports=m},"8d32":function(t,e,n){var i=n("cbe5"),r=i.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,a,o,!s)}});t.exports=r},"8deb":function(t,e,n){var i=n("3eba");n("5522"),n("a016"),n("1466");var r=n("98e7"),a=n("7f96"),o=n("870e"),s=n("d3f4"),l=n("7891");i.registerVisual(r("radar")),i.registerVisual(a("radar","circle")),i.registerLayout(o),i.registerProcessor(s("radar")),i.registerPreprocessor(l)},"8e43":function(t,e,n){var i=n("6d8b"),r=i.createHashMap,a=i.isObject,o=i.map;function s(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}s.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&o(n,c);return new s({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var l=s.prototype;function u(t){return t._map||(t._map=r(t.categories))}function c(t){return a(t)&&null!=t.value?t.value:t+""}l.getOrdinal=function(t){return u(this).get(t)},l.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!==typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=u(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var h=s;t.exports=h},"8e77":function(t,e,n){var i=n("6d8b"),r=n("41ef"),a=n("6179"),o=n("3842"),s=n("2306"),l=n("923d"),u=n("88f0"),c=function(t,e,n,r){var a=l.dataTransform(t,r[0]),o=l.dataTransform(t,r[1]),s=i.retrieve,u=a.coord,c=o.coord;u[0]=s(u[0],-1/0),u[1]=s(u[1],-1/0),c[0]=s(c[0],1/0),c[1]=s(c[1],1/0);var h=i.mergeAll([{},a,o]);return h.coord=[a.coord,o.coord],h.x0=a.x,h.y0=a.y,h.x1=o.x,h.y1=o.y,h};function h(t){return!isNaN(t)&&!isFinite(t)}function d(t,e,n,i){var r=1-t;return h(e[r])&&h(n[r])}function f(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!d(1,n,i,t)&&!d(0,n,i,t))||(l.dataFilter(t,{coord:n,x:e.x0,y:e.y0})||l.dataFilter(t,{coord:i,x:e.x1,y:e.y1}))}function p(t,e,n,i,r){var a,s=i.coordinateSystem,l=t.getItemModel(e),u=o.parsePercent(l.get(n[0]),r.getWidth()),c=o.parsePercent(l.get(n[1]),r.getHeight());if(isNaN(u)||isNaN(c)){if(i.getMarkerPosition)a=i.getMarkerPosition(t.getValues(n,e));else{var d=t.get(n[0],e),f=t.get(n[1],e),p=[d,f];s.clampData&&s.clampData(p,p),a=s.dataToPoint(p,!0)}if("cartesian2d"===s.type){var g=s.getAxis("x"),v=s.getAxis("y");d=t.get(n[0],e),f=t.get(n[1],e);h(d)?a[0]=g.toGlobalCoord(g.getExtent()["x0"===n[0]?0:1]):h(f)&&(a[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(u)||(a[0]=u),isNaN(c)||(a[1]=c)}else a=[u,c];return a}var g=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];function v(t,e,n){var r,o,s=["x0","y0","x1","y1"];t?(r=i.map(t&&t.dimensions,(function(t){var n=e.getData(),r=n.getDimensionInfo(n.mapDimension(t))||{};return i.defaults({name:t},r)})),o=new a(i.map(s,(function(t,e){return{name:t,type:r[e%2].type}})),n)):(r=[{name:"value",type:"float"}],o=new a(r,n));var l=i.map(n.get("data"),i.curry(c,e,t,n));t&&(l=i.filter(l,i.curry(f,t)));var u=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return o.initData(l,null,u),o.hasItemOption=!0,o}u.extend({type:"markArea",updateTransform:function(t,e,n){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var r=e.getData();r.each((function(e){var a=i.map(g,(function(i){return p(r,e,i,t,n)}));r.setItemLayout(e,a);var o=r.getItemGraphicEl(e);o.setShape("points",a)}))}}),this)},renderSeries:function(t,e,n,a){var o=t.coordinateSystem,l=t.id,u=t.getData(),c=this.markerGroupMap,h=c.get(l)||c.set(l,{group:new s.Group});this.group.add(h.group),h.__keep=!0;var d=v(o,t,e);e.setData(d),d.each((function(e){d.setItemLayout(e,i.map(g,(function(n){return p(d,e,n,t,a)}))),d.setItemVisual(e,{color:u.getVisual("color")})})),d.diff(h.__data).add((function(t){var e=new s.Polygon({shape:{points:d.getItemLayout(t)}});d.setItemGraphicEl(t,e),h.group.add(e)})).update((function(t,n){var i=h.__data.getItemGraphicEl(n);s.updateProps(i,{shape:{points:d.getItemLayout(t)}},e,t),h.group.add(i),d.setItemGraphicEl(t,i)})).remove((function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)})).execute(),d.eachItemGraphicEl((function(t,n){var a=d.getItemModel(n),o=a.getModel("label"),l=a.getModel("emphasis.label"),u=d.getItemVisual(n,"color");t.useStyle(i.defaults(a.getModel("itemStyle").getItemStyle(),{fill:r.modifyAlpha(u,.4),stroke:u})),t.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),s.setLabelStyle(t.style,t.hoverStyle,o,l,{labelFetcher:e,labelDataIndex:n,defaultText:d.getName(n)||"",isRectText:!0,autoColor:u}),s.setHoverStyle(t,{}),t.dataModel=e})),h.__data=d,h.group.silent=e.get("silent")||t.get("silent")}})},"8ec5":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("2145"),o=i.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){o.superApply(this,"optionUpdated",arguments),r.each(this.option.feature,(function(t,e){var n=a.get(e);n&&r.merge(t,n.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,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}}}),s=o;t.exports=s},"8ed2":function(t,e,n){n("48c7");var i=n("6cb7"),r=i.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});t.exports=r},"8ee0":function(t,e,n){n("3f8e");var i=n("697e7"),r=i.registerPainter,a=n("dc20");r("svg",a)},"903c":function(t,e){function n(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;n=r.length||t===r[t.depth]){var a=v(l,x,t,e,S,o);u(t,a,n,i,r,o)}}))}else g=h(x,t),t.setVisual("color",g)}}function c(t,e,n,i){var r=a.extend({},e);return a.each(["color","colorAlpha","colorSaturation"],(function(a){var o=t.get(a,!0);null==o&&n&&(o=n[a]),null==o&&(o=e[a]),null==o&&(o=i.get(a)),null!=o&&(r[a]=o)})),r}function h(t){var e=f(t,"color");if(e){var n=f(t,"colorAlpha"),i=f(t,"colorSaturation");return i&&(e=r.modifyHSL(e,null,null,i)),n&&(e=r.modifyAlpha(e,n)),e}}function d(t,e){return null!=e?r.modifyHSL(e,null,null,t):null}function f(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function p(t,e,n,r,a,o){if(o&&o.length){var s=g(e,"color")||null!=a.color&&"none"!==a.color&&(g(e,"colorAlpha")||g(e,"colorSaturation"));if(s){var l=e.get("visualMin"),u=e.get("visualMax"),c=n.dataExtent.slice();null!=l&&lc[1]&&(c[1]=u);var h=e.get("colorMappingBy"),d={type:s.name,dataExtent:c,visual:s.range};"color"!==d.type||"index"!==h&&"id"!==h?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var f=new i(d);return f.__drColorMappingBy=h,f}}}function g(t,e){var n=t.get(e);return o(n)&&n.length?{name:e,range:n}:null}function v(t,e,n,i,r,o){var s=a.extend({},e);if(r){var l=r.type,u="color"===l&&r.__drColorMappingBy,c="index"===u?i:"id"===u?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));s[l]=r.mapValueToVisual(c)}return s}t.exports=l},"90e3":function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+i).toString(36)}},9112:function(t,e,n){var i=n("83ab"),r=n("9bf2"),a=n("5c6c");t.exports=i?function(t,e,n){return r.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},"923d":function(t,e,n){var i=n("6d8b"),r=n("3842"),a=n("ee1a"),o=a.isDimensionStacked,s=i.indexOf;function l(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function u(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function c(t,e,n,i,a,s){var l=[],u=o(e,i),c=u?e.getCalculationInfo("stackResultDimension"):i,h=y(e,c,t),d=e.indicesOfNearest(c,h)[0];l[a]=e.get(n,d),l[s]=e.get(c,d);var f=e.get(i,d),p=r.getPrecision(e.get(i,d));return p=Math.min(p,20),p>=0&&(l[s]=+l[s].toFixed(p)),[l,f]}var h=i.curry,d={min:h(c,"min"),max:h(c,"max"),average:h(c,"average")};function f(t,e){var n=t.getData(),r=t.coordinateSystem;if(e&&!u(e)&&!i.isArray(e.coord)&&r){var a=r.dimensions,o=p(e,n,r,t);if(e=i.clone(e),e.type&&d[e.type]&&o.baseAxis&&o.valueAxis){var l=s(a,o.baseAxis.dim),c=s(a,o.valueAxis.dim),h=d[e.type](n,o.baseDataDim,o.valueDataDim,l,c);e.coord=h[0],e.value=h[1]}else{for(var f=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],g=0;g<2;g++)d[f[g]]&&(f[g]=y(n,n.mapDimension(a[g]),f[g]));e.coord=f}}return e}function p(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(g(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function g(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r0&&(!h.multiline||h.multiline&&"\n"!==t[h.lastIndex-1])&&(p="(?: "+p+")",v=" "+v,g++),n=new RegExp("^(?:"+p+")",f)),c&&(n=new RegExp("^"+p+"$(?!\\s)",f)),l&&(e=h.lastIndex),r=a.call(d?n:h,v),d?r?(r.input=r.input.slice(g),r[0]=r[0].slice(g),r.index=h.lastIndex,h.lastIndex+=r[0].length):h.lastIndex=0:l&&r&&(h.lastIndex=h.global?r.index+r[0].length:e),c&&r&&r.length>1&&o.call(r[0],n,(function(){for(s=1;sa&&(c=s.interval=a);var h=s.intervalPrecision=o(c),d=s.niceTickExtent=[r(Math.ceil(t[0]/c)*c,h),r(Math.floor(t[1]/c)*c,h)];return l(d,t),s}function o(t){return i.getPrecisionSafe(t)+2}function s(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function l(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),s(t,0,e),s(t,1,e),t[0]>t[1]&&(t[0]=t[1])}e.intervalScaleNiceTicks=a,e.getIntervalPrecision=o,e.fixExtent=l},"94b1":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("9d57"),o=a.layout,s=a.largeLayout;n("5aa9"),n("17b8"),n("67cc"),n("01ed"),i.registerLayout(i.PRIORITY.VISUAL.LAYOUT,r.curry(o,"bar")),i.registerLayout(i.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,s),i.registerVisual({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}})},"94ca":function(t,e,n){var i=n("d039"),r=/#|\.prototype\./,a=function(t,e){var n=s[o(t)];return n==u||n!=l&&("function"==typeof e?i(e):!!e)},o=a.normalize=function(t){return String(t).replace(r,".").toLowerCase()},s=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";t.exports=a},"94e4":function(t,e,n){var i=n("401b"),r=n("53f3"),a=r.getSymbolSize,o=r.getNodeGlobalScale,s=Math.PI,l=[];function u(t,e){var n=t.coordinateSystem;if(!n||"view"===n.type){var r=n.getBoundingRect(),a=t.getData(),o=a.graph,s=r.width/2+r.x,l=r.height/2+r.y,u=Math.min(r.width,r.height)/2,h=a.count();a.setLayout({cx:s,cy:l}),h&&(c[e](t,n,o,a,u,s,l,h),o.eachEdge((function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,r=i.clone(t.node1.getLayout()),a=i.clone(t.node2.getLayout()),o=(r[0]+a[0])/2,u=(r[1]+a[1])/2;+n&&(n*=3,e=[s*n+o*(1-n),l*n+u*(1-n)]),t.setLayout([r,a,e])})))}}var c={value:function(t,e,n,i,r,a,o,s){var l=0,u=i.getSum("value"),c=2*Math.PI/(u||s);n.eachNode((function(t){var e=t.getValue("value"),n=c*(u?e:1)/2;l+=n,t.setLayout([r*Math.cos(l)+a,r*Math.sin(l)+o]),l+=n}))},symbolSize:function(t,e,n,i,r,u,c,h){var d=0;l.length=h;var f=o(t);n.eachNode((function(t){var e=a(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=f;var n=Math.asin(e/2/r);isNaN(n)&&(n=s/2),l[t.dataIndex]=n,d+=2*n}));var p=(2*s-d)/h/2,g=0;n.eachNode((function(t){var e=p+l[t.dataIndex];g+=e,t.setLayout([r*Math.cos(g)+u,r*Math.sin(g)+c]),g+=e}))}};e.circularLayout=u},"95a8":function(t,e,n){var i=n("3eba");n("1953"),n("307d"),i.registerPreprocessor((function(t){t.markLine=t.markLine||{}}))},9680:function(t,e){function n(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0,u=t;if(o>e+s&&o>i+s||ot+s&&a>n+s||a=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new l(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},l.create=function(t){return new l(t.x,t.y,t.width,t.height)};var u=l;t.exports=u},"98b7":function(t,e){var n="undefined"!==typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)};t.exports=n},"98e7":function(t,e,n){var i=n("6d8b"),r=i.createHashMap;function a(t){return{getTargetSeries:function(e){var n={},i=r();return e.eachSeriesByType(t,(function(t){t.__paletteScope=n,i.set(t.uid,t)})),i},reset:function(t,e){var n=t.getRawData(),i={},r=t.getData();r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(e){var a,o=i[e],s=null!=o&&r.getItemVisual(o,"color",!0),l=null!=o&&r.getItemVisual(o,"borderColor",!0);if(s&&l||(a=n.getItemModel(e)),!s){var u=a.get("itemStyle.color")||t.getColorFromPalette(n.getName(e)||e+"",t.__paletteScope,n.count());null!=o&&r.setItemVisual(o,"color",u)}if(!l){var c=a.get("itemStyle.borderColor");null!=o&&r.setItemVisual(o,"borderColor",c)}}))}}}t.exports=a},"998c":function(t,e,n){var i=n("6d8b"),r=n("2306"),a=n("e86a"),o=Math.PI;function s(t,e){e=e||{},i.defaults(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new r.Group,s=new r.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(s);var l=e.fontSize+" sans-serif",u=new r.Rect({style:{fill:"none",text:e.text,font:l,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(n.add(u),e.showSpinner){var c=new r.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});c.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),c.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut"),n.add(c)}return n.resize=function(){var n=a.getWidth(e.text,l),i=e.showSpinner?e.spinnerRadius:0,r=(t.getWidth()-2*i-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner?0:n/2),o=t.getHeight()/2;e.showSpinner&&c.setShape({cx:r,cy:o}),u.setShape({x:r-i,y:o-i,width:2*i,height:2*i}),s.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}t.exports=s},"9bdb":function(t,e,n){var i=n("282b"),r=i([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a={getAreaStyle:function(t,e){return r(this,t,e)}};t.exports=a},"9bdd":function(t,e,n){var i=n("825a");t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(o){var a=t["return"];throw void 0!==a&&i(a.call(t)),o}}},"9bf2":function(t,e,n){var i=n("83ab"),r=n("0cfb"),a=n("825a"),o=n("c04e"),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(a(t),e=o(e,!0),a(n),r)try{return s(t,e,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9c2c":function(t,e,n){var i=n("401b"),r=i.min,a=i.max,o=i.scale,s=i.distance,l=i.add,u=i.clone,c=i.sub;function h(t,e,n,i){var h,d,f,p,g=[],v=[],m=[],y=[];if(i){f=[1/0,1/0],p=[-1/0,-1/0];for(var x=0,_=t.length;x<_;x++)r(f,f,t[x]),a(p,p,t[x]);r(f,f,i[0]),a(p,p,i[1])}for(x=0,_=t.length;x<_;x++){var b=t[x];if(n)h=t[x?x-1:_-1],d=t[(x+1)%_];else{if(0===x||x===_-1){g.push(u(t[x]));continue}h=t[x-1],d=t[x+1]}c(v,d,h),o(v,v,e);var w=s(b,h),S=s(b,d),M=w+S;0!==M&&(w/=M,S/=M),o(m,v,-w),o(y,v,S);var A=l([],b,m),I=l([],b,y);i&&(a(A,A,f),r(A,A,p),a(I,I,f),r(I,I,p)),g.push(A),g.push(I)}return n&&g.push(g.shift()),g}t.exports=h},"9ca8":function(t,e,n){var i=n("6d8b"),r=n("9850"),a=n("3842"),o=a.parsePercent,s=a.MAX_SAFE_INTEGER,l=n("f934"),u=n("55ac"),c=Math.max,h=Math.min,d=i.retrieve,f=i.each,p=["itemStyle","borderWidth"],g=["itemStyle","gapWidth"],v=["upperLabel","show"],m=["upperLabel","height"],y={seriesType:"treemap",reset:function(t,e,n,a){var s=n.getWidth(),c=n.getHeight(),h=t.option,p=l.getLayoutRect(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),g=h.size||[],v=o(d(p.width,g[0]),s),m=o(d(p.height,g[1]),c),y=a&&a.type,_=["treemapZoomToNode","treemapRootToNode"],b=u.retrieveTargetInfo(a,_,t),w="treemapRender"===y||"treemapMove"===y?a.rootRect:null,S=t.getViewRoot(),M=u.getPathToRoot(S);if("treemapMove"!==y){var A="treemapZoomToNode"===y?I(t,b,S,v,m):w?[w.width,w.height]:[v,m],D=h.sort;D&&"asc"!==D&&"desc"!==D&&(D="desc");var L={squareRatio:h.squareRatio,sort:D,leafDepth:h.leafDepth};S.hostTree.clearLayouts();var P={x:0,y:0,width:A[0],height:A[1],area:A[0]*A[1]};S.setLayout(P),x(S,L,!1,0);P=S.getLayout();f(M,(function(t,e){var n=(M[e+1]||S).getValue();t.setLayout(i.extend({dataExtent:[n,n],borderWidth:0,upperHeight:0},P))}))}var k=t.getData().tree.root;k.setLayout(T(p,w,b),!0),t.setLayoutInfo(p),C(k,new r(-p.x,-p.y,s,c),M,S,0)}};function x(t,e,n,i){var r,a;if(!t.isRemoved()){var o=t.getLayout();r=o.width,a=o.height;var s=t.getModel(),l=s.get(p),u=s.get(g)/2,d=D(s),f=Math.max(l,d),v=l-u,m=f-u;s=t.getModel();t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:d},!0),r=c(r-2*v,0),a=c(a-v-m,0);var y=r*a,b=_(t,s,y,e,n,i);if(b.length){var w={x:v,y:m,width:r,height:a},S=h(r,a),I=1/0,T=[];T.area=0;for(var C=0,L=b.length;C=0;l--){var u=r["asc"===i?o-l-1:l].getValue();u/n*es[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:i,dataExtent:s}}function M(t,e,n){for(var i,r=0,a=1/0,o=0,s=t.length;or&&(r=i));var l=t.area*t.area,u=e*e*n;return l?c(u*r/l,l/(u*a)):1/0}function A(t,e,n,i,r){var a=e===n.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=n[s[a]],d=e?t.area/e:0;(r||d>n[l[o]])&&(d=n[l[o]]);for(var f=0,p=t.length;fs&&(c=s),o=a}c0&&(o=null===o?l:Math.min(o,l))}n[r]=o}}return n}function m(t){var e=v(t),n=[];return i.each(t,(function(t){var i,r=t.coordinateSystem,o=r.getBaseAxis(),s=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var l=o.dim+"_"+o.index,u=e[l],c=Math.abs(s[1]-s[0]),h=o.scale.getExtent(),p=Math.abs(h[1]-h[0]);i=u?c/p*u:c}else{var g=t.getData();i=Math.abs(s[1]-s[0])/g.count()}var v=a(t.get("barWidth"),i),m=a(t.get("barMaxWidth"),i),y=a(t.get("barMinWidth")||1,i),x=t.get("barGap"),_=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:v,barMaxWidth:m,barMinWidth:y,barGap:x,barCategoryGap:_,axisKey:f(o),stackId:d(t)})})),y(n)}function y(t){var e={};i.each(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,a=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[i]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(o[s].maxWidth=u);var c=t.barMinWidth;c&&(o[s].minWidth=c);var h=t.barGap;null!=h&&(a.gap=h);var d=t.barCategoryGap;null!=d&&(a.categoryGap=d)}));var n={};return i.each(e,(function(t,e){n[e]={};var r=t.stacks,o=t.bandWidth,s=a(t.categoryGap,o),l=a(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),i.each(r,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,c--}else{var i=h;e&&ei&&(i=n),i!==h&&(t.width=i,u-=i+l*i,c--)}})),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var d,f=0;i.each(r,(function(t,e){t.width||(t.width=h),d=t,f+=t.width*(1+l)})),d&&(f-=d.width*l);var p=-f/2;i.each(r,(function(t,i){n[e][i]=n[e][i]||{bandWidth:o,offset:p,width:t.width},p+=t.width*(1+l)}))})),n}function x(t,e,n){if(t&&e){var i=t[f(e)];return null!=i&&null!=n&&(i=i[d(n)]),i}}function _(t,e){var n=g(t,e),r=m(n),a={},o={};i.each(n,(function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),l=d(t),u=r[f(i)][l],c=u.offset,h=u.width,p=n.getOtherAxis(i),g=t.get("barMinHeight")||0;a[l]=a[l]||[],o[l]=o[l]||[],e.setLayout({bandWidth:u.bandWidth,offset:c,size:h});for(var v=e.mapDimension(p.dim),m=e.mapDimension(i.dim),y=s(e,v),x=p.isHorizontal(),_=M(i,p,y),b=0,w=e.count();b=0?"p":"n",P=_;if(y&&(a[l][D]||(a[l][D]={p:_,n:_}),P=a[l][D][L]),x){var k=n.dataToPoint([C,D]);S=P,A=k[1]+c,I=k[0]-_,T=h,Math.abs(I)c||(d=c),{progress:f}}function f(t,e){var c,f=t.count,p=new h(2*f),g=new h(2*f),v=new h(f),m=[],y=[],x=0,_=0;while(null!=(c=t.next()))y[u]=e.get(o,c),y[1-u]=e.get(s,c),m=n.dataToPoint(y,null,m),g[x]=l?i.x+i.width:m[0],p[x++]=m[0],g[x]=l?m[1]:i.y+i.height,p[x++]=m[1],v[_++]=c;e.setLayout({largePoints:p,largeDataIndices:v,largeBackgroundPoints:g,barWidth:d,valueAxisStart:M(r,a,!1),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}};function w(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function S(t){return t.pipelineContext&&t.pipelineContext.large}function M(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}e.getLayoutOnAxis=p,e.prepareLayoutBarSeries=g,e.makeColumnLayout=m,e.retrieveColumnLayout=x,e.layout=_,e.largeLayout=b},"9e2e":function(t,e,n){var i=n("a73c"),r=n("9850"),a=n("82eb"),o=a.WILL_BE_RESTORED,s=new r,l=function(){};l.prototype={constructor:l,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&i.normalizeTextStyle(n,!0);var r=n.text;if(null!=r&&(r+=""),i.needDrawText(r,n)){t.save();var a=this.transform;n.transformText?this.setTransform(t):a&&(s.copy(e),s.applyTransform(a),e=s),i.renderText(this,t,r,n,e,o),t.restore()}}};var u=l;t.exports=u},"9e47":function(t,e,n){var i=n("6d8b"),r=n("71ad"),a=n("6cb7"),o=n("f934"),s=o.getLayoutParams,l=o.mergeLayoutParam,u=n("8e43"),c=["value","category","time","log"];function h(t,e,n,o){i.each(c,(function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,r){var o=this.layoutMode,u=o?s(e):{},c=r.getTheme();i.merge(e,c.get(a+"Axis")),i.merge(e,this.getDefaultOption()),e.type=n(t,e),o&&l(e,u,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=u.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:i.mergeAll([{},r[a+"Axis"],o],!0)})})),a.registerSubTypeDefaulter(t+"Axis",i.curry(n,t))}t.exports=h},"9e87":function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("50e5");i.registerAction("dataZoom",(function(t,e){var n=a.createLinkedNodesFinder(r.bind(e.eachComponent,e,"dataZoom"),a.eachAxisDim,(function(t,e){return t.get(e.axisIndex)})),i=[];e.eachComponent({mainType:"dataZoom",query:t},(function(t,e){i.push.apply(i,n(t).nodes)})),r.each(i,(function(e,n){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))},"9ed3":function(t,e,n){"use strict";var i=n("ae93").IteratorPrototype,r=n("7c73"),a=n("5c6c"),o=n("d44e"),s=n("3f8c"),l=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=r(i,{next:a(1,n)}),o(t,u,!1,!0),s[u]=l,t}},"9f51":function(t,e,n){var i=n("857d"),r=i.normalizeRadian,a=2*Math.PI;function o(t,e,n,i,o,s,l,u,c){if(0===l)return!1;var h=l;u-=t,c-=e;var d=Math.sqrt(u*u+c*c);if(d-h>n||d+ho&&(o+=a);var p=Math.atan2(c,u);return p<0&&(p+=a),p>=i&&p<=o||p+a>=i&&p+a<=o}e.containStroke=o},"9f7f":function(t,e,n){"use strict";var i=n("d039");function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},"9f82":function(t,e,n){var i=n("ee1a"),r=i.isDimensionStacked,a=n("6d8b"),o=a.map;function s(t,e,n){var i,a=t.getBaseAxis(),s=t.getOtherAxis(a),u=l(s,n),c=a.dim,h=s.dim,d=e.mapDimension(h),f=e.mapDimension(c),p="x"===h||"radius"===h?1:0,g=o(t.dimensions,(function(t){return e.mapDimension(t)})),v=e.getCalculationInfo("stackResultDimension");return(i|=r(e,g[0]))&&(g[0]=v),(i|=r(e,g[1]))&&(g[1]=v),{dataDimsForPoint:g,valueStart:u,valueAxisDim:h,baseAxisDim:c,stacked:!!i,valueDim:d,baseDim:f,baseDataOffset:p,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function l(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}function u(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}e.prepareDataCoordInfo=s,e.getStackedOnPoint=u},"9fa3":function(t,e,n){var i=n("4ab1"),r=n("6d8b"),a=n("1687");function o(t,e){i.call(this,t,e,"clipPath","__clippath_in_use__")}r.inherits(o,i),o.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},o.prototype.updateDom=function(t,e,n){if(e&&e.length>0){var i,r,o=this.getDefs(!0),s=e[0],l=n?"_textDom":"_dom";s[l]?(r=s[l].getAttribute("id"),i=s[l],o.contains(i)||o.appendChild(i)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",r),o.appendChild(i),s[l]=i);var u=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!n){var c=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),u.brush(s),s.transform=c}else u.brush(s);var h=this.getSvgElement(s);i.innerHTML="",i.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(i,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},o.prototype.markUsed=function(t){var e=this;t.__clipPaths&&r.each(t.__clipPaths,(function(t){t._dom&&i.prototype.markUsed.call(e,t._dom),t._textDom&&i.prototype.markUsed.call(e,t._textDom)}))};var s=o;t.exports=s},a016:function(t,e,n){var i=n("4f85"),r=n("e46b"),a=n("6d8b"),o=n("eda2"),s=o.encodeHTML,l=n("c4a3"),u=i.extend({type:"series.radar",dependencies:["radar"],init:function(t){u.superApply(this,"init",arguments),this.legendVisualProvider=new l(a.bind(this.getData,this),a.bind(this.getRawData,this))},getInitialData:function(t,e){return r(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),n=this.coordinateSystem,i=n.getIndicatorAxes(),r=this.getData().getName(t);return s(""===r?this.name:r)+"
"+a.map(i,(function(n,i){var r=e.get(e.mapDimension(n.dim),t);return s(n.name+" : "+r)})).join("
")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),n=this.coordinateSystem,i=e.getValues(a.map(n.dimensions,(function(t){return e.mapDimension(t)})),t,!0),r=0,o=i.length;r0){t.moveTo(n[r++],n[r++]);for(var o=1;o0){var h=(s+u)/2-(l-c)*i,d=(l+c)/2-(u-s)*i;t.quadraticCurveTo(h,d,u,c)}else t.lineTo(u,c)}},findDataIndex:function(t,e){var n=this.shape,i=n.segs,r=n.curveness;if(n.polyline)for(var s=0,l=0;l0)for(var c=i[l++],h=i[l++],d=1;d0){var g=(c+f)/2-(h-p)*r,v=(h+p)/2-(f-c)*r;if(o.containStroke(c,h,g,v,f,p))return s}else if(a.containStroke(c,h,f,p))return s;s++}return-1}});function l(){this.group=new i.Group}var u=l.prototype;u.isPersistent=function(){return!this._incremental},u.updateData=function(t){this.group.removeAll();var e=new s({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},u.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new r({silent:!0})),this.group.add(this._incremental)):this._incremental=null},u.incrementalUpdate=function(t,e){var n=new s;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},u.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},u._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("color");r&&t.setStyle("stroke",r),t.setStyle("fill"),n||(t.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(t.dataIndex=n+t.__startIndex)})))},u._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var c=l;t.exports=c},a434:function(t,e,n){"use strict";var i=n("23e7"),r=n("23cb"),a=n("a691"),o=n("50c4"),s=n("7b0b"),l=n("65f0"),u=n("8418"),c=n("1dde"),h=n("ae40"),d=c("splice"),f=h("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,g=Math.min,v=9007199254740991,m="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!d||!f},{splice:function(t,e){var n,i,c,h,d,f,y=s(this),x=o(y.length),_=r(t,x),b=arguments.length;if(0===b?n=i=0:1===b?(n=0,i=x-_):(n=b-2,i=g(p(a(e),0),x-_)),x+n-i>v)throw TypeError(m);for(c=l(y,i),h=0;hx-i+n;h--)delete y[h-1]}else if(n>i)for(h=x-i;h>_;h--)d=h+i-1,f=h+n-1,d in y?y[f]=y[d]:delete y[f];for(h=0;ha)r.push(arguments[a++]);if(i=e,(f(e)||void 0!==t)&&!st(t))return d(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!st(e))return e}),r[1]=e,Y.apply(null,r)}})}Z[F][H]||T(Z[F],H,Z[F].valueOf),R(Z,G),P[V]=!0},a4fe:function(t,e,n){var i=n("3eba"),r="\0_ec_interaction_mutex";function a(t,e,n){var i=l(t);i[e]=n}function o(t,e,n){var i=l(t),r=i[e];r===n&&(i[e]=null)}function s(t,e){return!!l(t)[e]}function l(t){return t[r]||(t[r]={})}i.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),e.take=a,e.release=o,e.isTaken=s},a630:function(t,e,n){var i=n("23e7"),r=n("4df4"),a=n("1c7e"),o=!a((function(t){Array.from(t)}));i({target:"Array",stat:!0,forced:o},{from:r})},a640:function(t,e,n){"use strict";var i=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))}},a666:function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("2306"),o=n("0c41"),s="__seriesMapHighDown",l="__seriesMapCallKey",u=i.extendChartView({type:"map",render:function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!t.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id){a=this._mapDraw;a&&r.add(a.group)}else if(t.needsDrawMap){var a=this._mapDraw||new o(n,!0);r.add(a.group),a.draw(t,e,n,this,i),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,n){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),(function(e,n){if(!isNaN(e)){var u=i.getItemLayout(n);if(u&&u.point){var d=u.point,f=u.offset,p=new a.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:d[0]+9*f,cy:d[1],r:3},silent:!0,z2:8+(f?0:a.Z2_EMPHASIS_LIFT+1)});if(!f){var g=t.mainSeries.getData(),v=i.getName(n),m=g.indexOfName(v),y=i.getItemModel(n),x=y.getModel("label"),_=y.getModel("emphasis.label"),b=g.getItemGraphicEl(m),w=r.retrieve2(t.getFormattedLabel(m,"normal"),v),S=r.retrieve2(t.getFormattedLabel(m,"emphasis"),w),M=b[s],A=Math.random();if(!M){M=b[s]={};var I=r.curry(c,!0),T=r.curry(c,!1);b.on("mouseover",I).on("mouseout",T).on("emphasis",I).on("normal",T)}b[l]=A,r.extend(M,{recordVersion:A,circle:p,labelModel:x,hoverLabelModel:_,emphasisText:S,normalText:w}),h(M,!1)}o.add(p)}}}))}});function c(t){var e=this[s];e&&e.recordVersion===this[l]&&h(e,t)}function h(t,e){var n=t.circle,i=t.labelModel,r=t.hoverLabelModel,o=t.emphasisText,s=t.normalText;e?(n.style.extendFrom(a.setTextStyle({},r,{text:r.get("show")?o:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=a.Z2_EMPHASIS_LIFT):(a.setTextStyle(n.style,i,{text:i.get("show")?s:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}t.exports=u},a691:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},a73c:function(t,e,n){var i=n("6d8b"),r=i.retrieve2,a=i.retrieve3,o=i.each,s=i.normalizeCssArray,l=i.isString,u=i.isObject,c=n("e86a"),h=n("5693"),d=n("5e76"),f=n("7d6d"),p=n("82eb"),g=p.ContextCachedBy,v=p.WILL_BE_RESTORED,m=c.DEFAULT_FONT,y={left:1,right:1,center:1},x={top:1,bottom:1,middle:1},_=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],b={},w={};function S(t){return M(t),o(t.rich,M),t}function M(t){if(t){t.font=c.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||y[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||x[n]?n:"top";var i=t.textPadding;i&&(t.textPadding=s(t.textPadding))}}function A(t,e,n,i,r,a){i.rich?T(t,e,n,i,r,a):I(t,e,n,i,r,a)}function I(t,e,n,i,r,a){"use strict";var o,s=P(i),l=!1,u=e.__attrCachedBy===g.PLAIN_TEXT;a!==v?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?g.NONE:g.PLAIN_TEXT):u&&(e.__attrCachedBy=g.NONE);var h=i.font||m;l&&h===(o.font||m)||(e.font=h);var d=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,d=t.__computedFont=e.font);var p=i.textPadding,y=i.textLineHeight,x=t.__textCotentBlock;x&&!t.__dirtyText||(x=t.__textCotentBlock=c.parsePlainText(n,d,p,y,i.truncate));var b=x.outerHeight,S=x.lines,M=x.lineHeight,A=E(w,t,i,r),I=A.baseX,T=A.baseY,C=A.textAlign||"left",L=A.textVerticalAlign;D(e,i,r,I,T);var O=c.adjustTextY(T,b,L),N=I,B=O;if(s||p){var G=c.getWidth(n,d),F=G;p&&(F+=p[1]+p[3]);var H=c.adjustTextX(I,F,C);s&&k(t,e,i,H,O,F,b),p&&(N=V(I,C,p),B+=p[0])}e.textAlign=C,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var W=0;W<_.length;W++){var j=_[W],U=j[0],Z=j[1],Y=i[U];l&&Y===o[U]||(e[Z]=f(e,Z,Y||j[2]))}B+=M/2;var X=i.textStrokeWidth,q=l?o.textStrokeWidth:null,$=!l||X!==q,K=!l||$||i.textStroke!==o.textStroke,J=R(i.textStroke,X),Q=z(i.textFill);if(J&&($&&(e.lineWidth=X),K&&(e.strokeStyle=J)),Q&&(l&&i.textFill===o.textFill||(e.fillStyle=Q)),1===S.length)J&&e.strokeText(S[0],N,B),Q&&e.fillText(S[0],N,B);else for(W=0;W=0&&(b=M[R],"right"===b.textAlign))L(t,e,b,i,I,y,N,"right"),T-=b.width,N-=b.width,R--;O+=(a-(O-m)-(x-N)-T)/2;while(C<=R)b=M[C],L(t,e,b,i,I,y,O+b.width/2,"center"),O+=b.width,C++;y+=I}}function D(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function L(t,e,n,i,o,s,l,u){var c=i.rich[n.styleName]||{};c.text=n.text;var h=n.textVerticalAlign,d=s+o/2;"top"===h?d=s+n.height/2:"bottom"===h&&(d=s+o-n.height/2),!n.isLineHolder&&P(c)&&k(t,e,c,"right"===u?l-n.width:"center"===u?l-n.width/2:l,d-n.height/2,n.width,n.height);var f=n.textPadding;f&&(l=V(l,u,f),d-=n.height/2-f[2]-n.textHeight/2),N(e,"shadowBlur",a(c.textShadowBlur,i.textShadowBlur,0)),N(e,"shadowColor",c.textShadowColor||i.textShadowColor||"transparent"),N(e,"shadowOffsetX",a(c.textShadowOffsetX,i.textShadowOffsetX,0)),N(e,"shadowOffsetY",a(c.textShadowOffsetY,i.textShadowOffsetY,0)),N(e,"textAlign",u),N(e,"textBaseline","middle"),N(e,"font",n.font||m);var p=R(c.textStroke||i.textStroke,v),g=z(c.textFill||i.textFill),v=r(c.textStrokeWidth,i.textStrokeWidth);p&&(N(e,"lineWidth",v),N(e,"strokeStyle",p),e.strokeText(n.text,l,d)),g&&(N(e,"fillStyle",g),e.fillText(n.text,l,d))}function P(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function k(t,e,n,i,r,a,o){var s=n.textBackgroundColor,c=n.textBorderWidth,f=n.textBorderColor,p=l(s);if(N(e,"shadowBlur",n.textBoxShadowBlur||0),N(e,"shadowColor",n.textBoxShadowColor||"transparent"),N(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),N(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),p||c&&f){e.beginPath();var g=n.textBorderRadius;g?h.buildPath(e,{x:i,y:r,width:a,height:o,r:g}):e.rect(i,r,a,o),e.closePath()}if(p)if(N(e,"fillStyle",s),null!=n.fillOpacity){var v=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=v}else e.fill();else if(u(s)){var m=s.image;m=d.createOrUpdateImage(m,null,t,O,s),m&&d.isImageReady(m)&&e.drawImage(m,i,r,a,o)}if(c&&f)if(N(e,"lineWidth",c),N(e,"strokeStyle",f),null!=n.strokeOpacity){v=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=v}else e.stroke()}function O(t,e){e.image=t}function E(t,e,n,i){var r=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+B(l[0],i.width),a=i.y+B(l[1],i.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(b,n,i):c.calculateTextPosition(b,n,i);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=n.textOffset;h&&(r+=h[0],a+=h[1])}return t=t||{},t.baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function N(t,e,n){return t[e]=f(t,e,n),t[e]}function R(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function z(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function B(t,e){return"string"===typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function V(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function G(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}e.normalizeTextStyle=S,e.renderText=A,e.getBoxPosition=E,e.getStroke=R,e.getFill=z,e.parsePercent=B,e.needDrawText=G},a753:function(t,e,n){var i=n("1f0e"),r=n("2306"),a=n("e887"),o=n("3842"),s=o.parsePercent,l=o.round,u=o.linearMap;function c(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r),o=s(n[0],e.getWidth()),l=s(n[1],e.getHeight()),u=s(t.get("radius"),a/2);return{cx:o,cy:l,r:u}}function h(t,e){return e&&("string"===typeof e?t=e.replace("{value}",null!=t?t:""):"function"===typeof e&&(t=e(t))),t}var d=2*Math.PI,f=a.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i=t.get("axisLine.lineStyle.color"),r=c(t,n);this._renderMain(t,e,n,i,r)},dispose:function(){},_renderMain:function(t,e,n,i,a){for(var o=this.group,s=t.getModel("axisLine"),l=s.getModel("lineStyle"),u=t.get("clockwise"),c=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=(h-c)%d,p=c,g=l.get("width"),v=s.get("show"),m=0;v&&m=t&&(0===e?0:i[e-1][0]).4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:R}),silent:!0}))}if(x.get("show")&&L!==b){for(var z=0;z<=w;z++){P=Math.cos(A),k=Math.sin(A);var B=new r.Line({shape:{x1:P*g+f,y1:k*g+p,x2:P*(g-M)+f,y2:k*(g-M)+p},silent:!0,style:D});"auto"===D.stroke&&B.setStyle({stroke:i((L+z/w)/b)}),d.add(B),A+=T}A-=T}else A+=I}},_renderPointer:function(t,e,n,a,o,l,c,h){var d=this.group,f=this._data;if(t.get("pointer.show")){var p=[+t.get("min"),+t.get("max")],g=[l,c],v=t.getData(),m=v.mapDimension("value");v.diff(f).add((function(e){var n=new i({shape:{angle:l}});r.initProps(n,{shape:{angle:u(v.get(m,e),p,g,!0)}},t),d.add(n),v.setItemGraphicEl(e,n)})).update((function(e,n){var i=f.getItemGraphicEl(n);r.updateProps(i,{shape:{angle:u(v.get(m,e),p,g,!0)}},t),d.add(i),v.setItemGraphicEl(e,i)})).remove((function(t){var e=f.getItemGraphicEl(t);d.remove(e)})).execute(),v.eachItemGraphicEl((function(t,e){var n=v.getItemModel(e),i=n.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:s(i.get("width"),o.r),r:s(i.get("length"),o.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",a(u(v.get(m,e),p,[0,1],!0))),r.setHoverStyle(t,n.getModel("emphasis.itemStyle").getItemStyle())})),this._data=v}else f&&f.eachItemGraphicEl((function(t){d.remove(t)}))},_renderTitle:function(t,e,n,i,a){var o=t.getData(),l=o.mapDimension("value"),c=t.getModel("title");if(c.get("show")){var h=c.get("offsetCenter"),d=a.cx+s(h[0],a.r),f=a.cy+s(h[1],a.r),p=+t.get("min"),g=+t.get("max"),v=t.getData().get(l,0),m=i(u(v,[p,g],[0,1],!0));this.group.add(new r.Text({silent:!0,style:r.setTextStyle({},c,{x:d,y:f,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:m,forceRich:!0})}))}},_renderDetail:function(t,e,n,i,a){var o=t.getModel("detail"),l=+t.get("min"),c=+t.get("max");if(o.get("show")){var d=o.get("offsetCenter"),f=a.cx+s(d[0],a.r),p=a.cy+s(d[1],a.r),g=s(o.get("width"),a.r),v=s(o.get("height"),a.r),m=t.getData(),y=m.get(m.mapDimension("value"),0),x=i(u(y,[l,c],[0,1],!0));this.group.add(new r.Text({silent:!0,style:r.setTextStyle({},o,{x:f,y:p,text:h(y,o.get("formatter")),textWidth:isNaN(g)?null:g,textHeight:isNaN(v)?null:v,textAlign:"center",textVerticalAlign:"middle"},{autoColor:x,forceRich:!0})}))}}}),p=f;t.exports=p},a7e2:function(t,e,n){var i=n("3eba");n("7293"),n("ae46");var r=n("6582"),a=n("ee98");i.registerLayout(r),i.registerVisual(a)},a7f2:function(t,e){var n=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function i(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:n[0]})}t.exports=i},a87d:function(t,e,n){var i=n("22d1"),r=n("401b"),a=r.applyTransform,o=n("9850"),s=n("41ef"),l=n("e86a"),u=n("a73c"),c=n("9e2e"),h=n("19eb"),d=n("0da8"),f=n("76a5"),p=n("cbe5"),g=n("20c8"),v=n("42e5"),m=n("d3a4"),y=g.CMD,x=Math.round,_=Math.sqrt,b=Math.abs,w=Math.cos,S=Math.sin,M=Math.max;if(!i.canvasSupported){var A=",",I="progid:DXImageTransform.Microsoft",T=21600,C=T/2,D=1e5,L=1e3,P=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=T+","+T,t.coordorigin="0,0"},k=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},O=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},E=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},N=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},R=function(t,e,n){return(parseFloat(t)||0)*D+(parseFloat(e)||0)*L+n},z=u.parsePercent,B=function(t,e,n){var i=s.parse(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=O(i[0],i[1],i[2]),t.opacity=n*i[3])},V=function(t){var e=s.parse(t);return[O(e[0],e[1],e[2]),e[3]]},G=function(t,e,n){var i=e.fill;if(null!=i)if(i instanceof v){var r,o=0,s=[0,0],l=0,u=1,c=n.getBoundingRect(),h=c.width,d=c.height;if("linear"===i.type){r="gradient";var f=n.transform,p=[i.x*h,i.y*d],g=[i.x2*h,i.y2*d];f&&(a(p,p,f),a(g,g,f));var m=g[0]-p[0],y=g[1]-p[1];o=180*Math.atan2(m,y)/Math.PI,o<0&&(o+=360),o<1e-6&&(o=0)}else{r="gradientradial";p=[i.x*h,i.y*d],f=n.transform;var x=n.scale,_=h,b=d;s=[(p[0]-c.x)/_,(p[1]-c.y)/b],f&&a(p,p,f),_/=x[0]*T,b/=x[1]*T;var w=M(_,b);l=0/w,u=2*i.r/w-l}var S=i.colorStops.slice();S.sort((function(t,e){return t.offset-e.offset}));for(var A=S.length,I=[],C=[],D=0;D=2){var k=I[0][0],O=I[1][0],E=I[0][1]*e.opacity,N=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=k,t.color2=O,t.colors=C.join(","),t.opacity=N,t.opacity2=E}"radial"===r&&(t.focusposition=s.join(","))}else B(t,i,e.opacity)},F=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof v||B(t,e.stroke,e.opacity)},H=function(t,e,n,i){var r="fill"===e,a=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof v&&N(t,a),a||(a=m.createNode(e)),r?G(a,n,i):F(a,n),E(t,a)):(t[r?"filled":"stroked"]="false",N(t,a))},W=[[],[],[]],j=function(t,e){var n,i,r,o,s,l,u=y.M,c=y.C,h=y.L,d=y.A,f=y.Q,p=[],g=t.data,v=t.len();for(o=0;o.01?H&&(j+=270/T):Math.abs(U-z)<1e-4?H&&jR?I-=270/T:I+=270/T:H&&Uz?M+=270/T:M-=270/T),p.push(Z,x(((R-B)*O+P)*T-C),A,x(((z-V)*E+k)*T-C),A,x(((R+B)*O+P)*T-C),A,x(((z+V)*E+k)*T-C),A,x((j*O+P)*T-C),A,x((U*E+k)*T-C),A,x((M*O+P)*T-C),A,x((I*E+k)*T-C)),s=M,l=I;break;case y.R:var Y=W[0],X=W[1];Y[0]=g[o++],Y[1]=g[o++],X[0]=Y[0]+g[o++],X[1]=Y[1]+g[o++],e&&(a(Y,Y,e),a(X,X,e)),Y[0]=x(Y[0]*T-C),X[0]=x(X[0]*T-C),Y[1]=x(Y[1]*T-C),X[1]=x(X[1]*T-C),p.push(" m ",Y[0],A,Y[1]," l ",X[0],A,Y[1]," l ",X[0],A,X[1]," l ",Y[0],A,X[1]);break;case y.Z:p.push(" x ")}if(n>0){p.push(i);for(var q=0;q$&&(q=0,X={});var n,i=K.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(r){}e={style:i.fontStyle||Y,variant:i.fontVariant||Y,weight:i.fontWeight||Y,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},X[t]=e,q++}return e};l.$override("measureText",(function(t,e){var n=m.doc;Z||(Z=n.createElement("div"),Z.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",m.doc.body.appendChild(Z));try{Z.style.font=e}catch(i){}return Z.innerHTML="",Z.appendChild(n.createTextNode(t)),{width:Z.offsetWidth}}));for(var Q=new o,tt=function(t,e,n,i){var r=this.style;this.__dirty&&u.normalizeTextStyle(r,!0);var o=r.text;if(null!=o&&(o+=""),o){if(r.rich){var s=l.parseRichText(o,r);o=[];for(var c=0;cf?f=g:(p.lastTickCount=a,p.lastAutoInterval=f),f}},i.inherits(u,a);var c=u;t.exports=c},a9e3:function(t,e,n){"use strict";var i=n("83ab"),r=n("da84"),a=n("94ca"),o=n("6eeb"),s=n("5135"),l=n("c6b6"),u=n("7156"),c=n("c04e"),h=n("d039"),d=n("7c73"),f=n("241c").f,p=n("06cf").f,g=n("9bf2").f,v=n("58a8").trim,m="Number",y=r[m],x=y.prototype,_=l(d(x))==m,b=function(t){var e,n,i,r,a,o,s,l,u=c(t,!1);if("string"==typeof u&&u.length>2)if(u=v(u),e=u.charCodeAt(0),43===e||45===e){if(n=u.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(a=u.slice(2),o=a.length,s=0;sr)return NaN;return parseInt(a,i)}return+u};if(a(m,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var w,S=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof S&&(_?h((function(){x.valueOf.call(n)})):l(n)!=m)?u(new y(b(e)),n,S):b(e)},M=i?f(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),A=0;M.length>A;A++)s(y,w=M[A])&&!s(S,w)&&g(S,w,p(y,w));S.prototype=x,x.constructor=S,o(r,m,S)}},aa01:function(t,e,n){var i=n("6d8b"),r=n("4f85"),a=n("06c7"),o=n("55ac"),s=o.wrapTreePathInfo,l=r.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var n={name:t.name,children:t.data};u(n);var i=t.levels||[],r={};return r.levels=i,a.createTree(n,this,r).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=s(n,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",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},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});function u(t){var e=0;i.each(t.children,(function(t){u(t);var n=t.value;i.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;i.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),i.isArray(t.value)?t.value[0]=n:t.value=n}t.exports=l},aa3e:function(t,e,n){var i=n("6d8b");function r(t,e){return e=e||[0,0],i.map(["x","y"],(function(n,i){var r=this.getAxis(n),a=e[i],o=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(a-o)-r.dataToCoord(a+o))}),this)}function a(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:i.bind(r,t)}}}t.exports=a},aadf:function(t,e,n){var i=n("3eba"),r=n("6d8b");n("5aa9"),n("d6d9"),n("3329");var a=n("9d57"),o=a.layout,s=n("7f96");n("01ed"),i.registerLayout(r.curry(o,"pictorialBar")),i.registerVisual(s("pictorialBar","roundRect"))},ab05:function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("2b8c"),o=n("5f14"),s=i.PRIORITY.VISUAL.COMPONENT;function l(t,e,n,i){for(var r=e.targetVisuals[i],a=o.prepareVisualTypes(r),s={color:t.getData().getVisual("color")},l=0,u=a.length;l1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=o().reset(t);r.progress&&r.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_getClipShape:function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext,o=i.large;return n&&o===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=o?new a:new r,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},ac0f:function(t,e,n){var i=n("cbe5"),r=n("401b"),a=n("4a3f"),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,u=a.cubicAt,c=a.quadraticDerivativeAt,h=a.cubicDerivativeAt,d=[];function f(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?h:u)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?h:u)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?c:l)(t.x1,t.cpx1,t.x2,e),(n?c:l)(t.y1,t.cpy1,t.y2,e)]}var p=i.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,l=e.cpx1,u=e.cpy1,c=e.cpx2,h=e.cpy2,f=e.percent;0!==f&&(t.moveTo(n,i),null==c||null==h?(f<1&&(o(n,l,r,f,d),l=d[1],r=d[2],o(i,u,a,f,d),u=d[1],a=d[2]),t.quadraticCurveTo(l,u,r,a)):(f<1&&(s(n,l,c,r,f,d),l=d[1],c=d[2],r=d[3],s(i,u,h,a,f,d),u=d[1],h=d[2],a=d[3]),t.bezierCurveTo(l,u,c,h,r,a)))},pointAt:function(t){return f(this.shape,t,!1)},tangentAt:function(t){var e=f(this.shape,t,!0);return r.normalize(e,e)}});t.exports=p},ac1f:function(t,e,n){"use strict";var i=n("23e7"),r=n("9263");i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},ad6d:function(t,e,n){"use strict";var i=n("825a");t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},adda:function(t,e,n){var i=n("94e4"),r=i.circularLayout;function a(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&r(t,"symbolSize")}))}t.exports=a},ade3:function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return i}))},adf4:function(t,e,n){var i=n("4f85"),r=n("b1d4"),a=n("2f45"),o=a.getDimensionTypeByAxis,s=n("6179"),l=n("6d8b"),u=n("e0d3"),c=u.groupData,h=n("eda2"),d=h.encodeHTML,f=n("c4a3"),p=2,g=i.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){g.superApply(this,"init",arguments),this.legendVisualProvider=new f(l.bind(this.getData,this),l.bind(this.getRawData,this))},fixData:function(t){var e=t.length,n=c(t,(function(t){return t[2]})),i=[];n.buckets.each((function(t,e){i.push({name:e,dataList:t})}));for(var r=i.length,a=-1,o=-1,s=0;sa&&(a=l,o=s)}for(var u=0;u=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof a&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var u=l;t.exports=u},b006:function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("fab2"),o=n("fc82"),s=n("f4a2"),l=n("2306"),u=["axisLine","axisTickLabel","axisName"],c=i.extendComponentView({type:"parallelAxis",init:function(t,e){c.superApply(this,"init",arguments),(this._brushController=new o(e.getZr())).on("brush",r.bind(this._onBrush,this))},render:function(t,e,n,i){if(!h(t,e,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new l.Group,this.group.add(this._axisGroup),t.get("show")){var s=f(t,e),c=s.coordinateSystem,d=t.getAreaSelectStyle(),p=d.width,g=t.axis.dim,v=c.getAxisLayout(g),m=r.extend({strokeContainThreshold:p},v),y=new a(t,m);r.each(u,y.add,y),this._axisGroup.add(y.getGroup()),this._refreshBrushController(m,d,t,s,p,n);var x=i&&!1===i.animation?null:t;l.groupTransition(o,this._axisGroup,x)}}},_refreshBrushController:function(t,e,n,i,r,a){var o=n.axis.getExtent(),u=o[1]-o[0],c=Math.min(30,.1*Math.abs(u)),h=l.BoundingRect.create({x:o[0],y:-r/2,width:u,height:r});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:s.makeRectPanelClipPath(h),isTargetByCursor:s.makeRectIsTargetByCursor(h,a,i),getLinearBrushOtherExtent:s.makeLinearBrushOtherExtent(h,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(d(n))},_onBrush:function(t,e){var n=this.axisModel,i=n.axis,a=r.map(t,(function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]}));(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:a})},dispose:function(){this._brushController.dispose()}});function h(t,e,n){return n&&"axisAreaSelect"===n.type&&e.findComponents({mainType:"parallelAxis",query:n})[0]===t}function d(t){var e=t.axis;return r.map(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}function f(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var p=c;t.exports=p},b041:function(t,e,n){"use strict";var i=n("00ee"),r=n("f5df");t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},b0af:function(t,e,n){var i=n("2306"),r=n("3842"),a=r.round;function o(t,e,n){var r=t.getArea(),a=t.getBaseAxis().isHorizontal(),o=r.x,s=r.y,l=r.width,u=r.height,c=n.get("lineStyle.width")||2;o-=c/2,s-=c/2,l+=c,u+=c,o=Math.floor(o),l=Math.round(l);var h=new i.Rect({shape:{x:o,y:s,width:l,height:u}});return e&&(h.shape[a?"width":"height"]=0,i.initProps(h,{shape:{width:l,height:u}},n)),h}function s(t,e,n){var r=t.getArea(),o=new i.Sector({shape:{cx:a(t.cx,1),cy:a(t.cy,1),r0:a(r.r0,1),r:a(r.r,1),startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return e&&(o.shape.endAngle=r.startAngle,i.initProps(o,{shape:{endAngle:r.endAngle}},n)),o}function l(t,e,n){return t?"polar"===t.type?s(t,e,n):"cartesian2d"===t.type?o(t,e,n):null:null}e.createGridClipPath=o,e.createPolarClipPath=s,e.createClipPath=l},b0c0:function(t,e,n){var i=n("83ab"),r=n("9bf2").f,a=Function.prototype,o=a.toString,s=/^\s*function ([^ (]*)/,l="name";i&&!(l in a)&&r(a,l,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(t){return""}}})},b11c:function(t,e,n){n("8ec5"),n("db9e"),n("4e9f"),n("d3a0"),n("767c"),n("7c4d"),n("df70")},b12f:function(t,e,n){var i=n("e1fc"),r=n("8918"),a=n("625e"),o=function(){this.group=new i,this.uid=r.getUID("viewComponent")};o.prototype={constructor:o,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var s=o.prototype;s.updateView=s.updateLayout=s.updateVisual=function(t,e,n,i){},a.enableClassExtend(o),a.enableClassManagement(o,{registerWhenExtend:!0});var l=o;t.exports=l},b16f:function(t,e,n){var i=n("4ab1"),r=n("6d8b"),a=n("4942"),o=n("41ef");function s(t,e){i.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}r.inherits(s,i),s.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;r.each(["fill","stroke"],(function(i){if(e.style[i]&&("linear"===e.style[i].type||"radial"===e.style[i].type)){var r,a=e.style[i],o=n.getDefs(!0);a._dom?(r=a._dom,o.contains(a._dom)||n.addDom(r)):r=n.add(a),n.markUsed(e);var s=r.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}}))}},s.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return a("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},s.prototype.update=function(t){var e=this;i.prototype.update.call(this,t,(function(){var n=t.type,i=t._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))}))},s.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void a("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,r=n.length;i_||Math.abs(t.dy)>_)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},_onZoom:function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var a=new c(r.x,r.y,r.width,r.height),o=this.seriesModel.layoutInfo;e-=o.x,n-=o.y;var s=h.create();h.translate(s,s,[-e,-n]),h.scale(s,s,[t.scale,t.scale]),h.translate(s,s,[e,n]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var n=this.findTarget(t.offsetX,t.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===e)this._zoomToNode(n);else if("link"===e){var r=i.hostTree.data.getItemModel(i.dataIndex),a=r.get("link",!0),o=r.get("target",!0)||"blank";a&&g(a,o)}}}}}),this)},_renderBreadcrumb:function(t,e,n){function i(e){"animating"!==this._state&&(s.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(t,e,n.node,v(i,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=P(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var a=r.transformCoordToLocal(t,e),o=r.shape;if(!(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height))return!1;n={node:i,offsetX:a[0],offsetY:a[1]}}}),this),n}});function P(){return{nodeGroup:[],background:[],content:[]}}function k(t,e,n,i,o,s,l,u,c,h){if(l){var d=l.getLayout(),f=t.getData();if(f.setItemGraphicEl(l.dataIndex,null),d&&d.isInView){var p=d.width,g=d.height,v=d.borderWidth,x=d.invisible,_=l.getRawIndex(),A=u&&u.getRawIndex(),L=l.viewChildren,P=d.upperHeight,k=L&&L.length,E=l.getModel("itemStyle"),N=l.getModel("emphasis.itemStyle"),R=U("nodeGroup",m);if(R){if(c.add(R),R.attr("position",[d.x||0,d.y||0]),R.__tmNodeWidth=p,R.__tmNodeHeight=g,d.isAboveViewRoot)return R;var z=l.getModel(),B=U("background",y,h,I);if(B&&G(R,B,k&&d.upperLabelHeight),k)a.isHighDownDispatcher(R)&&a.setAsHighDownDispatcher(R,!1),B&&(a.setAsHighDownDispatcher(B,!0),f.setItemGraphicEl(l.dataIndex,B));else{var V=U("content",y,h,T);V&&F(R,V),B&&a.isHighDownDispatcher(B)&&a.setAsHighDownDispatcher(B,!1),a.setAsHighDownDispatcher(R,!0),f.setItemGraphicEl(l.dataIndex,R)}return R}}}function G(e,n,i){if(n.dataIndex=l.dataIndex,n.seriesIndex=t.seriesIndex,n.setShape({x:0,y:0,width:p,height:g}),x)H(n);else{n.invisible=!1;var r=l.getVisual("borderColor",!0),o=N.get("borderColor"),s=D(E);s.fill=r;var u=C(N);if(u.fill=o,i){var c=p-2*v;W(s,u,r,c,P,{x:v,y:0,width:c,height:P})}else s.text=u.text=null;n.setStyle(s),a.setElementHoverStyle(n,u)}e.add(n)}function F(e,n){n.dataIndex=l.dataIndex,n.seriesIndex=t.seriesIndex;var i=Math.max(p-2*v,0),r=Math.max(g-2*v,0);if(n.culling=!0,n.setShape({x:v,y:v,width:i,height:r}),x)H(n);else{n.invisible=!1;var o=l.getVisual("color",!0),s=D(E);s.fill=o;var u=C(N);W(s,u,o,i,r),n.setStyle(s),a.setElementHoverStyle(n,u)}e.add(n)}function H(t){!t.invisible&&s.push(t)}function W(e,n,i,o,s,u){var c=z.get("name"),h=z.getModel(u?S:b),f=z.getModel(u?M:w),p=h.getShallow("show");a.setLabelStyle(e,n,h,f,{defaultText:p?c:null,autoColor:i,isRectText:!0,labelFetcher:t,labelDataIndex:l.dataIndex,labelProp:u?"upperLabel":"label"}),j(e,u,d),j(n,u,d),u&&(e.textRect=r.clone(u)),e.truncate=p&&h.get("ellipsis")?{outerWidth:o,outerHeight:s,minChar:2}:null}function j(e,n,i){var r=e.text;if(!n&&i.isLeafRoot&&null!=r){var a=t.get("drillDownIcon",!0);e.text=a?a+" "+r:r}}function U(t,i,r,a){var s=null!=A&&n[t][A],l=o[t];return s?(n[t][A]=null,Z(l,s,t)):x||(s=new i({z:O(r,a)}),s.__tmDepth=r,s.__tmStorageName=t,Y(l,s,t)),e[t][_]=s}function Z(t,e,n){var i=t[_]={};i.old="nodeGroup"===n?e.position.slice():r.extend({},e.shape)}function Y(t,e,n){var r=t[_]={},a=l.parentNode;if(a&&(!i||"drillDown"===i.direction)){var s=0,u=0,c=o.background[a.getRawIndex()];!i&&c&&c.old&&(s=c.old.width,u=c.old.height),r.old="nodeGroup"===n?[0,u]:{x:s,y:u,width:0,height:0}}r.fadein="nodeGroup"!==n}}function O(t,e){var n=t*A+e;return(n-1)/n}t.exports=L},b419:function(t,e,n){var i=n("6d8b"),r=n("2306"),a=n("4319"),o=n("6679"),s=n("fab2"),l=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function u(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function c(t){var e=t.getRadiusAxis();return e.inverse?0:1}function h(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var d=o.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,r=n.polar,a=r.getRadiusAxis().getExtent(),o=n.getTicksCoords(),s=n.getMinorTicksCoords(),u=i.map(n.getViewLabels(),(function(t){t=i.clone(t);return t.coord=n.dataToCoord(t.tickValue),t}));h(u),h(o),i.each(l,(function(e){!t.get(e+".show")||n.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,r,o,s,a,u)}),this)}},_axisLine:function(t,e,n,i,a){var o,s=t.getModel("axisLine.lineStyle"),l=c(e),u=l?0:1;o=0===a[u]?new r.Circle({shape:{cx:e.cx,cy:e.cy,r:a[l]},style:s.getLineStyle(),z2:1,silent:!0}):new r.Ring({shape:{cx:e.cx,cy:e.cy,r:a[l],r0:a[u]},style:s.getLineStyle(),z2:1,silent:!0}),o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,n,a,o){var s=t.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),h=o[c(e)],d=i.map(n,(function(t){return new r.Line({shape:u(e,[h,h+l],t.coord)})}));this.group.add(r.mergePath(d,{style:i.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,n,a,o){if(a.length){for(var s=t.getModel("axisTick"),l=t.getModel("minorTick"),h=(s.get("inside")?-1:1)*l.get("length"),d=o[c(e)],f=[],p=0;pm?"left":"right",_=Math.abs(v[1]-y)/g<.3?"middle":v[1]>y?"top":"bottom";h&&h[u]&&h[u].textStyle&&(o=new a(h[u].textStyle,d,d.ecModel));var b=new r.Text({silent:s.isLabelSilent(t)});this.group.add(b),r.setTextStyle(b.style,o,{x:v[0],y:v[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:x,textVerticalAlign:_}),p&&(b.eventData=s.makeAxisEventDataBase(t),b.eventData.targetType="axisLabel",b.eventData.value=n.rawLabel)}),this)},_splitLine:function(t,e,n,a,o){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),c=l.get("color"),h=0;c=c instanceof Array?c:[c];for(var d=[],f=0;f=4096)e+=12,n/=4096;while(n>=2)e+=1,n/=2;return e},d=l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}));i({target:"Number",proto:!0,forced:d},{toFixed:function(t){var e,n,i,s,l=a(this),d=r(t),f=[0,0,0,0,0,0],p="",g="0",v=function(t,e){var n=-1,i=e;while(++n<6)i+=t*f[n],f[n]=i%1e7,i=u(i/1e7)},m=function(t){var e=6,n=0;while(--e>=0)n+=f[e],f[e]=u(n/t),n=n%t*1e7},y=function(){var t=6,e="";while(--t>=0)if(""!==e||0===t||0!==f[t]){var n=String(f[t]);e=""===e?n:e+o.call("0",7-n.length)+n}return e};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(p="-",l=-l),l>1e-21)if(e=h(l*c(2,69,1))-69,n=e<0?l*c(2,-e,1):l/c(2,e,1),n*=4503599627370496,e=52-e,e>0){v(0,n),i=d;while(i>=7)v(1e7,0),i-=7;v(c(10,i,1),0),i=e-1;while(i>=23)m(1<<23),i-=23;m(1<0?(s=g.length,g=p+(s<=d?"0."+o.call("0",d-s)+g:g.slice(0,s-d)+"."+g.slice(s-d))):g=p+g,g}})},b719:function(t,e,n){var i=n("697e7");e.zrender=i;var r=n("1687");e.matrix=r;var a=n("401b");e.vector=a;var o=n("6d8b"),s=n("41ef");e.color=s;var l=n("2306"),u=n("3842");e.number=u;var c=n("eda2");e.format=c;var h=n("88b3");h.throttle;e.throttle=h.throttle;var d=n("1548");e.helper=d;var f=n("bda7");e.parseGeoJSON=f;var p=n("6179");e.List=p;var g=n("4319");e.Model=g;var v=n("84ce");e.Axis=v;var m=n("22d1");e.env=m;var y=f,x={};o.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){x[t]=o[t]}));var _={};o.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){_[t]=l[t]})),e.parseGeoJson=y,e.util=x,e.graphic=_},b727:function(t,e,n){var i=n("0366"),r=n("44ad"),a=n("7b0b"),o=n("50c4"),s=n("65f0"),l=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,h=6==t,d=5==t||h;return function(f,p,g,v){for(var m,y,x=a(f),_=r(x),b=i(p,g,3),w=o(_.length),S=0,M=v||s,A=e?M(f,w):n?M(f,0):void 0;w>S;S++)if((d||S in _)&&(m=_[S],y=b(m,S,x),t))if(e)A[S]=y;else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return S;case 2:l.call(A,m)}else if(c)return!1;return h?-1:u||c?c:A}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},b809:function(t,e,n){var i=n("6d8b"),r=n("29a8"),a=n("2b17"),o=a.retrieveRawValue;function s(t,e){var n=e.getModel("aria");if(n.get("show"))if(n.get("description"))t.setAttribute("aria-label",n.get("description"));else{var a=0;e.eachSeries((function(t,e){++a}),this);var s,l=n.get("data.maxCount")||10,u=n.get("series.maxCount")||10,c=Math.min(a,u);if(!(a<1)){var h=v();s=h?p(g("general.withTitle"),{title:h}):g("general.withoutTitle");var d=[],f=a>1?"series.multiple.prefix":"series.single.prefix";s+=p(g(f),{seriesCount:a}),e.eachSeries((function(t,e){if(e1?"multiple":"single")+".";n=g(i?r+"withName":r+"withoutName"),n=p(n,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:m(t.subType)});var s=t.getData();window.data=s,s.count()>l?n+=p(g("data.partialData"),{displayCnt:l}):n+=g("data.allData");for(var u=[],h=0;hl+o)break;if(t[a].y+=i,a>e&&a+1t[a].y+t[a].height)return void h(a,i/2)}h(n-1,i/2)}function h(e,n){for(var i=e;i>=0;i--){if(t[i].y-n0&&t[i].y>t[i-1].y+t[i-1].height)break}}function d(t,e,n,i,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=o&&(d=o-10),!e&&d<=o&&(d=o+10),t[s].x=n+d*a,o=d}}t.sort((function(t,e){return t.y-e.y}));for(var f,p=0,g=t.length,v=[],m=[],y=0;y=n?m.push(t[y]):v.push(t[y]);d(v,!1,e,n,i,r),d(m,!0,e,n,i,r)}function l(t,e,n,r,a,o,l,c){for(var h=[],d=[],f=Number.MAX_VALUE,p=-Number.MAX_VALUE,g=0;g0?"right":"left":L>0?"left":"right"}var H=u.get("rotate");k="number"===typeof H?H*(Math.PI/180):H?L<0?-D+Math.PI:-D:0,p=!!k,o.label={x:A,y:I,position:v,height:E.height,len:S,len2:M,linePoints:T,textAlign:C,verticalAlign:"middle",rotation:k,inside:N,labelDistance:m,labelAlignTo:y,labelMargin:x,bleedMargin:_,textRect:E,text:O,font:b},N||f.push(o.label)}})),!p&&t.get("avoidLabelOverlap")&&l(f,c,h,e,n,r,s,u)}t.exports=c},bc5f:function(t,e,n){var i=n("6cb7");i.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}))},bcaa:function(t,e,n){var i=n("4ab1"),r=n("6d8b");function a(t,e){i.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function o(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}r.inherits(a,i),a.prototype.addWithoutUpdate=function(t,e){if(e&&o(e.style)){var n;if(e._shadowDom){n=e._shadowDom;var i=this.getDefs(!0);i.contains(e._shadowDom)||this.addDom(n)}else n=this.add(e);this.markUsed(e);var r=n.getAttribute("id");t.style.filter="url(#"+r+")"}},a.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},a.prototype.update=function(t,e){var n=e.style;if(o(n)){var r=this;i.prototype.update.call(this,e,(function(){r.updateDom(e,e._shadowDom)}))}else this.remove(t,e)},a.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},a.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,a,o,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/u),n.setAttribute("flood-color",o);var c=a/2/l,h=a/2/u,d=c+" "+h;n.setAttribute("stdDeviation",d),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(n),t._shadowDom=e},a.prototype.markUsed=function(t){t._shadowDom&&i.prototype.markUsed.call(this,t._shadowDom)};var s=a;t.exports=s},bcbe:function(t,e,n){var i=n("6d8b"),r=n("fab2"),a=n("2306"),o=n("edb9"),s=n("6679"),l=n("58df"),u=l.rectCoordAxisBuildSplitArea,c=l.rectCoordAxisHandleRemove,h=["axisLine","axisTickLabel","axisName"],d=["splitArea","splitLine"],f=s.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,s){var l=this.group;l.removeAll();var u=this._axisGroup;this._axisGroup=new a.Group;var c=o.layout(t),p=new r(t,c);i.each(h,p.add,p),l.add(this._axisGroup),l.add(p.getGroup()),i.each(d,(function(e){t.get(e+".show")&&this["_"+e](t)}),this),a.groupTransition(u,this._axisGroup,t),f.superCall(this,"render",t,e,n,s)},remove:function(){c(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),r=i.get("width"),o=i.get("color");o=o instanceof Array?o:[o];for(var s=t.coordinateSystem.getRect(),l=e.isHorizontal(),u=[],c=0,h=e.getTicksCoords({tickModel:n}),d=[],f=[],p=0;p0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function p(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}h.prototype={constructor:h,animate:function(t,e){var n,a=!1,o=this,s=this.__zr;if(t){var l=t.split("."),u=o;a="shape"===l[0];for(var h=0,d=l.length;h=0)&&t(a,i,r)}))}var p=f.prototype;function g(t){return t[0]>t[1]&&t.reverse(),t}function v(t,e){return o.parseFinder(t,e,{includeMainTypes:d})}p.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=_[t.brushType](0,n,e);t.__rangeOffset={offset:w[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}))},p.matchOutputRanges=function(t,e,n){l(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&r.each(i.coordSyses,(function(i){var r=_[t.brushType](1,i,t.range);n(t,r.values,i,e)}))}),this)},p.setInputRanges=function(t,e){l(t,(function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&!0!==n){t.panelId=n.panelId;var i=_[t.brushType](0,n.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?w[t.brushType](i.values,r.offset,M(i.xyMinMax,r.xyMinMax)):i.values}}),this)},p.makePanelOpts=function(t,e){return r.map(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e&&e(n),clipPath:s.makeRectPanelClipPath(i),isTargetByCursor:s.makeRectIsTargetByCursor(i,t,n.coordSysModel),getLinearBrushOtherExtent:s.makeLinearBrushOtherExtent(i)}}))},p.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&u(i.coordSyses,e.coordinateSystem)>=0},p.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=v(e,t),r=0;r=0||u(i,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:x.grid,xAxisDeclared:s[t.id],yAxisDeclared:c[t.id]})})))},geo:function(t,e){l(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:x.geo})}))}},y=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],x={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(a.getTransform(t)),e}},_={lineX:c(b,0),lineY:c(b,1),rect:function(t,e,n){var i=e[h[t]]([n[0][0],n[1][0]]),r=e[h[t]]([n[0][1],n[1][1]]),a=[g([i[0],r[0]]),g([i[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=r.map(n,(function(n){var r=e[h[t]](n);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}));return{values:a,xyMinMax:i}}};function b(t,e,n,i){var a=n.getAxis(["x","y"][t]),o=g(r.map([0,1],(function(t){return e?a.coordToData(a.toLocalCoord(i[t])):a.toGlobalCoord(a.dataToCoord(i[t]))}))),s=[];return s[t]=o,s[1-t]=[NaN,NaN],{values:o,xyMinMax:s}}var w={lineX:c(S,0),lineY:c(S,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return r.map(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function S(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function M(t,e){var n=A(t),i=A(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function A(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var I=f;t.exports=I},bda7:function(t,e,n){var i=n("6d8b"),r=n("f279");function a(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,i.push([s/n,l/n])}return i}function s(t,e){return a(t),i.map(i.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,a=t.geometry,o=a.coordinates,s=[];"Polygon"===a.type&&s.push({type:"polygon",exterior:o[0],interiors:o.slice(1)}),"MultiPolygon"===a.type&&i.each(o,(function(t){t[0]&&s.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var l=new r(n[e||"name"],s,n.cp);return l.properties=n,l}))}t.exports=s},bdc0:function(t,e,n){var i=n("3eba");n("d2a5"),i.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},bf9b:function(t,e,n){var i=n("3eba"),r=n("d81e"),a=r.updateCenterAndZoom;i.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var n=t.dataIndex,i=e.getData().tree,r=i.getNodeByDataIndex(n);r.isExpand=!r.isExpand}))})),i.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var n=e.coordinateSystem,i=a(n,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))}))},c037:function(t,e,n){var i=n("3eba"),r=n("6d8b");n("f7c6"),n("1ab3");var a=n("7782"),o=n("98e7"),s=n("292e"),l=n("d3f4");a("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),i.registerVisual(o("pie")),i.registerLayout(r.curry(s,"pie")),i.registerProcessor(l("pie"))},c04e:function(t,e,n){var i=n("861d");t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},c2be:function(t,e,n){var i=n("2306"),r=i.extendShape,a=r({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u),g=c?u-l<2*Math.PI:l-u<2*Math.PI;g&&(t.moveTo(h*r+n,d*r+i),t.arc(h*s+n,d*s+i,o,-Math.PI+l,l,!c)),t.arc(n,i,a,l,u,!c),t.moveTo(f*a+n,p*a+i),t.arc(f*s+n,p*s+i,o,u-2*Math.PI,u-Math.PI,!c),0!==r&&(t.arc(n,i,r,u,l,c),t.moveTo(h*r+n,p*r+i)),t.closePath()}});t.exports=a},c2dd:function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("fc82"),o=n("10cc"),s=o.layoutCovers,l=i.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new a(e.getZr())).on("brush",r.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,u.apply(this,arguments)},updateTransform:function(t,e){return s(e),u.apply(this,arguments)},updateView:u,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:r.clone(t),$from:n}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:r.clone(t),$from:n})}});function u(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}t.exports=l},c430:function(t,e){t.exports=!1},c4a3:function(t,e){function n(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){var n=e();return n.indexOfName(t)>=0},this.indexOfName=function(e){var n=t();return n.indexOfName(e)},this.getItemVisual=function(e,n){var i=t();return i.getItemVisual(e,n)}}var i=n;t.exports=i},c515:function(t,e,n){n("849b"),n("8459"),n("b006")},c526:function(t,e){var n={axisPointer:1,tooltip:1,brush:1};function i(t,e,i){var r=e.getComponentByElement(t.topTarget),a=r&&r.coordinateSystem;return r&&r!==i&&!n[r.mainType]&&a&&a.model!==i}e.onIrrelevantElement=i},c533:function(t,e){var n=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],i={color:n,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],n]};t.exports=i},c62c:function(t,e,n){var i=n("6d8b"),r=n("6cb7"),a=n("9e47"),o=n("2023"),s=r.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),l={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}}};function u(t,e){return e.type||(e.data?"category":"value")}i.merge(s.prototype,o),a("single",s,u,l);var c=s;t.exports=c},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var i=n("da84"),r=n("ce4e"),a="__core-js_shared__",o=i[a]||r(a,{});t.exports=o},c740:function(t,e,n){"use strict";var i=n("23e7"),r=n("b727").findIndex,a=n("44d2"),o=n("ae40"),s="findIndex",l=!0,u=o(s);s in[]&&Array(1)[s]((function(){l=!1})),i({target:"Array",proto:!0,forced:l||!u},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a(s)},c775:function(t,e,n){var i=n("2b17"),r=i.retrieveRawValue;function a(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return r(t,e,n[0]);if(i){for(var a=[],o=0;o=0;s--){var l=2*s,u=i[l]-a/2,c=i[l+1]-o/2;if(t>=u&&e>=c&&t<=u+a&&e<=c+o)return s}return-1}});function u(){this.group=new i.Group}var c=u.prototype;c.isPersistent=function(){return!this._incremental},c.updateData=function(t,e){this.group.removeAll();var n=new l({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},c.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)}))}},c.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new o({silent:!0})),this.group.add(this._incremental)):this._incremental=null},c.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new l,this._incremental.addDisplayable(i,!0)):(i=new l({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),i.incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental,n)},c._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=a(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var l=t.shape.size[0]=0&&(t.dataIndex=n+(t.startIndex||0))})))},c.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},c._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var h=u;t.exports=h},c975:function(t,e,n){"use strict";var i=n("23e7"),r=n("4d64").indexOf,a=n("a640"),o=n("ae40"),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,u=a("indexOf"),c=o("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:l||!u||!c},{indexOf:function(t){return l?s.apply(this,arguments)||0:r(this,t,arguments.length>1?arguments[1]:void 0)}})},ca00:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"h",(function(){return h})),n.d(e,"g",(function(){return _})),n.d(e,"f",(function(){return b})),n.d(e,"d",(function(){return S})),n.d(e,"e",(function(){return M})),n.d(e,"a",(function(){return A}));n("4de4"),n("4160"),n("e260"),n("fb6a"),n("a434"),n("b0c0"),n("4ec9"),n("a9e3"),n("b64b"),n("d3b7"),n("4d63"),n("ac1f"),n("25f0"),n("3ca3"),n("5319"),n("1276"),n("159b"),n("ddb0"),n("a4d3"),n("e01a"),n("d28b");function i(t){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n("a630");function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==n["return"]||n["return"]()}finally{if(l)throw o}}}}function s(t){if(!l(t)&&!u(t))return t;var e;if(u(t)){e=new Map;var n,i=o(t.keys());try{for(i.s();!(n=i.n()).done;){var r=n.value,a=t.get(r);if(u(a)||l(a)||Array.isArray(t)){var c=s(a);e.set(r,c)}else e.set(r,a)}}catch(d){i.e(d)}finally{i.f()}}else if("function"===typeof t)e=t;else if(e=Array.isArray(t)?[]:{},t instanceof HTMLElement)e=t.cloneNode(!0);else for(var h in t)Object.prototype.hasOwnProperty.call(t,h)&&(e[h]=u(t[h])||l(t[h])?s(t[h]):t[h]);return e}function l(t){return!u(t)&&("object"===i(t)||"function"===typeof t)&&null!==t}function u(t){return t instanceof Map}function c(t){null==t&&(t="chart");for(var e=window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g,"").split(""),n="",i=0;i<12;i++)n+=e[Math.round(Math.random()*(e.length-1))];var r=(new Date).getTime();return t+"_"+n+"_"+r}function h(t,e){return t.replace(/\$\{([\w]+)\}/g,(function(t,n){var i=e[n];return"undefined"!=typeof i?i:t}))}function d(t){var e=/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi;return!!e.exec(t)}function f(t){return!(null==t||t.toString().length<5)&&!!e(t);function e(t){var e=/^(\d{4})-(\d{1,2})-(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/,n=/^(\d{4})\/(\d{1,2})\/(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/;if(!e.test(t)&&!n.test(t))return!1;var i=RegExp.$1,r=RegExp.$2,a=RegExp.$3;if(i<1900)return!1;if(r>12)return!1;if(a>31)return!1;if(2==r){if(29==new Date(i,1,29).getDate()&&a>29)return!1;if(29!=new Date(i,1,29).getDate()&&a>28)return!1}return!0}}function p(t){return""!==t&&null!=t&&!isNaN(t)}function g(t){var e="string";return f(t)?e="date":isNaN(parseFloat(t))||d(t)||(e="num"),e}function v(t){for(var e=[],n=0;n=0&&r>=0){var a=t[i][r];if(!(null===a||p(a)||"object"==x(a)&&p(a.v)||"object"==x(a)&&"undefined"==x(a.v)||""===a||""===a.v)){i==t.length-1&&r==t[0].length-1?(e=i,n=r):(e=i+1,n=r+1);break}if(a&&a.ct&&"yyyy-MM-dd"==a.ct.fa){e=i+1,n=r+1;break}e=i--,n=r--}var o={exits:!1,range:[0,0]};if(e>0)for(var s=e;s>=0;s--){a=t[s][n];if(!(null===a||p(a)||"object"==x(a)&&p(a.v)||"object"==x(a)&&"undefined"==x(a.v)||""===a||""===a.v)){o.exits=!0,o.range=[0,s];break}}var l={exits:!1,range:[0,0]};if(n>0)for(s=n;s>=0;s--){a=t[e][s];if(!(null===a||p(a)||"object"==x(a)&&p(a.v)||"object"==x(a)&&"undefined"==x(a.v)||""===a||""===a.v)){l.exits=!0,l.range=[0,s];break}if(a&&a.ct&&"yyyy-MM-dd"==a.ct.fa){l.exits=!0,l.range=[0,s];break}}return o.range[1]+1==t.length&&(o={exits:!1,range:[0,0]}),l.range[1]+1==t[0].length&&(l={exits:!1,range:[0,0]}),[o,l]}function b(t,e,n){var i={};return i=e.exits&&n.exits?{title:{row:n.range,column:e.range},rowtitle:{row:n.range,column:[e.range[1]+1,t[0].length-1]},coltitle:{row:[n.range[1]+1,t.length-1],column:e.range},content:{row:[n.range[1]+1,t.length-1],column:[e.range[1]+1,t[0].length-1]},type:"normal"}:e.exits?{title:null,rowtitle:null,coltitle:{row:[0,t.length-1],column:e.range},content:{row:[0,t.length-1],column:[e.range[1]+1,t[0].length-1]},type:"leftright"}:n.exits?{title:null,rowtitle:{row:n.range,column:[0,t[0].length-1]},coltitle:null,content:{row:[n.range[1]+1,t.length-1],column:[0,t[0].length-1]},type:"topbottom"}:{title:null,rowtitle:null,coltitle:null,content:{row:[0,t.length-1],column:[0,t[0].length-1]},type:"contentonly"},i}function w(t,e,n){var i=null,r=n[t][e];return null!=r&&(i=null!=r.v?r.v:r),void 0==i&&(i=""),i}function S(t,e,n,i,r,a){var o={};if("line"==i||"column"==i||"area"==i||"scatter"==i||"bar"==i||"pie"==i||"radar"==i||"funnel"==i||"gauge"==i||"map"==i)if(a){if("normal"==e.type){var s=e,l=s.rowtitle,u=[];if(null!=l){o.title={text:w(s.title.row[0],s.title.column[0],t)};for(var c=l.column[0];c<=l.column[1];c++){for(var h="",d=l.row[0];d<=l.row[1];d++)h+="\n"+w(d,c,t);h=h.substr(1,h.length),"highcharts"==n&&(h=h.replace(/\n/g,"
")),u.push(h)}o.xAxis=u}var f=s.coltitle,p=[];if(null!=f){for(d=f.row[0];d<=f.row[1];d++){for(h="",c=f.column[0];c<=f.column[1];c++)h+=" "+w(d,c,t);p.push(h.substr(1,h.length))}o.label=p}var v=s.content,m=[];if(null!=v){var y={};for(c=v.column[0];c<=v.column[1];c++){var x=[],_=0;for(d=v.row[0];d<=v.row[1];d++){h=w(d,c,t);x.push(h),c==v.column[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}}else if("leftright"==e.type){s=e,f=s.coltitle,p=[];if(null!=f){for(d=f.row[0];d<=f.row[1];d++){for(h="",c=f.column[0];c<=f.column[1];c++)h+=" "+w(d,c,t);p.push(h.substr(1,h.length))}o.label=p}v=s.content,m=[];if(null!=v){for(y={},c=v.column[0];c<=v.column[1];c++){for(x=[],_=0,d=v.row[0];d<=v.row[1];d++){h=w(d,c,t);x.push(h),c==v.column[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}l=s.rowtitle,u=[];if(null==l){o.title={text:"图表标题"};for(c=0;c<=v.column[1]-v.column[0];c++)u.push(c+1);o.xAxis=u}}else if("topbottom"==e.type){s=e,l=s.rowtitle,u=[];if(null!=l){o.title={text:"图表标题"};for(c=l.column[0];c<=l.column[1];c++){for(h="",d=l.row[0];d<=l.row[1];d++)h+="\n"+w(d,c,t);h=h.substr(1,h.length),"highcharts"==n&&(h=h.replace(/\n/g,"
")),u.push(h)}o.xAxis=u}v=s.content,m=[];if(null!=v){for(y={},c=v.column[0];c<=v.column[1];c++){for(x=[],_=0,d=v.row[0];d<=v.row[1];d++){h=w(d,c,t);x.push(h),c==v.column[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}f=s.coltitle,p=[];if(null==f){for(d=0;d<=v.row[1]-v.row[0];d++)p.push("系列"+(d+1));o.label=p}}else if("contentonly"==e.type){s=e,v=s.content,m=[];if(null!=v){for(y={},c=v.column[0];c<=v.column[1];c++){for(x=[],_=0,d=v.row[0];d<=v.row[1];d++){h=w(d,c,t);x.push(h),c==v.column[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}l=s.rowtitle,u=[];if(null==l){o.title={text:"图表标题"};for(c=0;c<=v.column[1]-v.column[0];c++)u.push(c+1);o.xAxis=u}f=s.coltitle,p=[];if(null==f){for(d=0;d<=v.row[1]-v.row[0];d++)p.push("系列"+(d+1));o.label=p}}}else if("normal"==e.type){s=e,l=s.rowtitle,u=[];if(null!=l){for(c=l.column[0];c<=l.column[1];c++){for(h="",d=l.row[0];d<=l.row[1];d++)h+=" "+w(d,c,t);u.push(h.substr(1,h.length))}o.label=u}f=s.coltitle,p=[];if(null!=f){for(d=f.row[0];d<=f.row[1];d++){for(h="",c=f.column[0];c<=f.column[1];c++)h+="\n"+w(d,c,t);h=h.substr(1,h.length),"highcharts"==n&&(h=h.replace(/\n/g,"
")),p.push(h)}o.xAxis=p}v=s.content,m=[];if(null!=v){for(y={},d=v.row[0];d<=v.row[1];d++){for(x=[],_=0,c=v.column[0];c<=v.column[1];c++){h=w(d,c,t);x.push(h),d==v.row[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}}else if("leftright"==e.type){s=e,f=s.coltitle,p=[];if(null!=f){for(d=f.row[0];d<=f.row[1];d++){for(h="",c=f.column[0];c<=f.column[1];c++)h+="\n"+w(d,c,t);h=h.substr(1,h.length),"highcharts"==n&&(h=h.replace(/\n/g,"
")),p.push(h)}o.xAxis=p}v=s.content,m=[];if(null!=v){for(y={},d=v.row[0];d<=v.row[1];d++){for(x=[],_=0,c=v.column[0];c<=v.column[1];c++){h=w(d,c,t);x.push(h),d==v.row[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}l=s.rowtitle,u=[];if(null==l){o.title={text:"图表标题"};for(c=0;c<=v.column[1]-v.column[0];c++)u.push("系列"+(c+1));o.label=u}}else if("topbottom"==e.type){s=e,l=s.rowtitle,u=[];if(null!=l){o.title={text:"图表标题"};for(c=l.column[0];c<=l.column[1];c++){for(h="",d=l.row[0];d<=l.row[1];d++)h+=" "+w(d,c,t);u.push(h.substr(1,h.length))}o.label=u}v=s.content,m=[];if(null!=v){for(y={},d=v.row[0];d<=v.row[1];d++){for(x=[],_=0,c=v.column[0];c<=v.column[1];c++){h=w(d,c,t);x.push(h),d==v.row[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}f=s.coltitle,p=[];if(null==f){for(d=0;d<=v.row[1]-v.row[0];d++)p.push(d+1);o.xAxis=p}}else if("contentonly"==e.type){s=e,v=s.content,m=[];if(null!=v){for(y={},d=v.row[0];d<=v.row[1];d++){for(x=[],_=0,c=v.column[0];c<=v.column[1];c++){h=w(d,c,t);x.push(h),d==v.row[0]&&(y[_++]=g(h))}m.push(x)}o.series=m,o.series_tpye=y}l=s.rowtitle,u=[];if(null==l){o.title={text:"图表标题"};for(c=0;c<=v.column[1]-v.column[0];c++)u.push("系列"+(c+1));o.label=u}f=s.coltitle,p=[];if(null==f){for(d=0;d<=v.row[1]-v.row[0];d++)p.push(d+1);o.xAxis=p}}return o}function M(t){var e={};e.length=t;for(var n=0;n0?(p=u[o][0],g=c[o]):u[o]<=0&&(p="",g=""),h.data.push({value:p,name:g,label:{},labelLine:{lineStyle:{}},itemStyle:{}})}t.series.push(h)}else for(o=0;o0?(p=u[0][d],g=e.xAxis[d]):u[0][d]<=0&&(p="",g=""),h.data.push({value:p,name:g,label:{},labelLine:{lineStyle:{}},itemStyle:{}})}t.series.push(h)}if(1==o){t.legend.name1=t.legendData[1];for(var f=0;f0?(p=u[1][f],g=e.xAxis[f]):u[1][f]<=0&&(p="",g=""),t.series1Data.push({value:p,name:g,label:{},labelLine:{lineStyle:{}},itemStyle:{}})}}}}else{t.series.length!=u.length&&"special"!=a&&(t.series=[]);for(o=0;o1&&t.series.splice(1,t.series.length-1);var x=0,_=0;for(o=0;o1))){var S=[];for(o=0;o1)for(d=0;dy.getLayout().x&&(y=t),t.depth>x.depth&&(x=t)}));var _=m===y?1:p(m,y)/2,b=_-m.getLayout().x,w=0,S=0,M=0,A=0;if("radial"===i)w=o/(y.getLayout().x+_+b),S=f/(x.depth-1||1),a(v,(function(t){M=(t.getLayout().x+b)*w,A=(t.depth-1)*S;var e=h(M,A);t.setLayout({x:e.x,y:e.y,rawX:M,rawY:A},!0)}));else{var I=t.getOrient();"RL"===I||"LR"===I?(S=f/(y.getLayout().x+_+b),w=o/(x.depth-1||1),a(v,(function(t){A=(t.getLayout().x+b)*S,M="LR"===I?(t.depth-1)*w:o-(t.depth-1)*w,t.setLayout({x:M,y:A},!0)}))):"TB"!==I&&"BT"!==I||(w=o/(y.getLayout().x+_+b),S=f/(x.depth-1||1),a(v,(function(t){M=(t.getLayout().x+b)*w,A="TB"===I?(t.depth-1)*S:f-(t.depth-1)*S,t.setLayout({x:M,y:A},!0)})))}}}t.exports=f},ca84:function(t,e,n){var i=n("5135"),r=n("fc6a"),a=n("4d64").indexOf,o=n("d012");t.exports=function(t,e){var n,s=r(t),l=0,u=[];for(n in s)!i(o,n)&&i(s,n)&&u.push(n);while(e.length>l)i(s,n=e[l++])&&(~a(u,n)||u.push(n));return u}},ca98:function(t,e,n){var i=n("6d8b"),r=n("e0d3"),a=n("6cb7"),o=i.each,s=i.clone,l=i.map,u=i.merge,c=/^(min|max)?(.+)$/;function h(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function d(t,e,n){var r,a,s=[],l=[],u=t.timeline;if(t.baseOption&&(a=t.baseOption),(u||t.options)&&(a=a||{},s=(t.options||[]).slice()),t.media){a=a||{};var c=t.media;o(c,(function(t){t&&t.option&&(t.query?l.push(t):r||(r=t))}))}return a||(a=t),a.timeline||(a.timeline=u),o([a].concat(s).concat(i.map(l,(function(t){return t.option}))),(function(t){o(e,(function(e){e(t,n)}))})),{baseOption:a,timelineOptions:s,mediaDefault:r,mediaList:l}}function f(t,e,n){var r={width:e,height:n,aspectratio:e/n},a=!0;return i.each(t,(function(t,e){var n=e.match(c);if(n&&n[1]&&n[2]){var i=n[1],o=n[2].toLowerCase();p(r[o],t,i)||(a=!1)}})),a}function p(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e}function g(t,e){return t.join(",")===e.join(",")}function v(t,e){e=e||{},o(e,(function(e,n){if(null!=e){var i=t[n];if(a.hasClass(n)){e=r.normalizeToArray(e),i=r.normalizeToArray(i);var o=r.mappingToExists(i,e);t[n]=l(o,(function(t){return t.option&&t.exist?u(t.exist,t.option,!0):t.exist||t.option}))}else t[n]=u(i,e,!0)}}))}h.prototype={constructor:h,setOption:function(t,e){t&&i.each(r.normalizeToArray(t.series),(function(t){t&&t.data&&i.isTypedArray(t.data)&&i.setAsPrimitive(t.data)})),t=s(t);var n=this._optionBackup,a=d.call(this,t,e,!n);this._newBaseOption=a.baseOption,n?(v(n.baseOption,a.baseOption),a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=l(e.timelineOptions,s),this._mediaList=l(e.mediaList,s),this._mediaDefault=s(e.mediaDefault),this._currentMediaIndices=[],s(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=s(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,a=[],o=[];if(!i.length&&!r)return o;for(var u=0,c=i.length;u1?arguments[1]:void 0)}}),a("includes")},cb11:function(t,e,n){var i=n("cbe5"),r=n("9cf9"),a=r.subPixelOptimizeLine,o={},s=i.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,r,s;this.subPixelOptimize?(a(o,e,this.style),n=o.x1,i=o.y1,r=o.x2,s=o.y2):(n=e.x1,i=e.y1,r=e.x2,s=e.y2);var l=e.percent;0!==l&&(t.moveTo(n,i),l<1&&(r=n*(1-l)+r*l,s=i*(1-l)+s*l),t.lineTo(r,s))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}});t.exports=s},cb69:function(t,e,n){var i=n("3301"),r=n("4f85"),a=r.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return i(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});t.exports=a},cb6d:function(t,e){function n(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function i(t,e){return{target:t,topTarget:e&&e.topTarget}}n.prototype={constructor:n,_dragStart:function(t){var e=t.target;while(e&&!e.draggable)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(i(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,r=t.offsetY,a=n-this._x,o=r-this._y;this._x=n,this._y=r,e.drift(a,o,t),this.dispatchToElement(i(e,t),"drag",t.event);var s=this.findHover(n,r,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.dispatchToElement(i(l,t),"dragleave",t.event),s&&s!==l&&this.dispatchToElement(i(s,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(i(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(i(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var r=n;t.exports=r},cb73:function(t,e,n){var i=n("3842"),r=i.parsePercent,a=n("6d8b"),o=Math.PI/180;function s(t,e,n,i){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");a.isArray(i)||(i=[0,i]),a.isArray(e)||(e=[e,e]);var s=n.getWidth(),u=n.getHeight(),c=Math.min(s,u),h=r(e[0],s),d=r(e[1],u),f=r(i[0],c/2),p=r(i[1],c/2),g=-t.get("startAngle")*o,v=t.get("minAngle")*o,m=t.getData().tree.root,y=t.getViewRoot(),x=y.depth,_=t.get("sort");null!=_&&l(y,_);var b=0;a.each(y.children,(function(t){!isNaN(t.getValue())&&b++}));var w=y.getValue(),S=Math.PI/(w||b)*2,M=y.depth>0,A=y.height-(M?-1:1),I=(p-f)/(A||1),T=t.get("clockwise"),C=t.get("stillShowZeroSum"),D=T?1:-1,L=function(t,e){if(t){var n=e;if(t!==m){var i=t.getValue(),o=0===w&&C?S:i*S;o1e-10&&(r.width+=o/s,r.height+=o/s,r.x-=o/s/2,r.y-=o/s/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var s=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,t,e)))return!0}if(r.hasFill())return o.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):i.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(r.isObject(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},h.extend=function(t){var e=function(e){h.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};for(var n in r.inherits(e,h),t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},r.inherits(h,i);var d=h;t.exports=d},cbe9:function(t,e,n){var i=n("6d8b"),r=n("9850"),a=n("cf7e");function o(t){a.call(this,t)}o.prototype={constructor:o,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return n=n||[],n[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(t[0]),s=i.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return e=e||[],e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),a=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i,s=new r(n,i,a,o);return s}},i.inherits(o,a);var s=o;t.exports=s},cc12:function(t,e,n){var i=n("da84"),r=n("861d"),a=i.document,o=r(a)&&r(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},cc39:function(t,e,n){var i=n("6d8b"),r=n("3842"),a=n("50e5"),o=n("ef6a"),s=i.each,l=r.asc,u=function(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};function c(t,e,n){var i=[1/0,-1/0];return s(n,(function(t){var n=t.getData();n&&s(n.mapDimension(e,!0),(function(t){var e=n.getApproximateExtent(t);e[0]i[1]&&(i[1]=e[1])}))})),i[1]0?0:NaN);var o=n.getMax(!0);return null!=o&&"dataMax"!==o&&"function"!==typeof o?e[1]=o:r&&(e[1]=a>0?a-1:NaN),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function d(t,e){var n=t.getAxisModel(),i=t._percentWindow,a=t._valueWindow;if(i){var o=r.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var s=e||0===i[0]&&100===i[1];n.setRange(s?null:+a[0].toFixed(o),s?null:+a[1].toFixed(o))}}function f(t){var e=t._minMaxSpan={},n=t._dataZoomModel,i=t._dataExtent;s(["min","max"],(function(a){var o=n.get(a+"Span"),s=n.get(a+"ValueSpan");null!=s&&(s=t.getAxisModel().axis.scale.parse(s)),null!=s?o=r.linearMap(i[0]+s,i,[0,100],!0):null!=o&&(s=r.linearMap(o,[0,100],i,!0)-i[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=s}))}u.prototype={constructor:u,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(n){if(a.isCoordSupported(n.get("coordinateSystem"))){var i=this._dimName,r=e.queryComponents({mainType:i+"Axis",index:n.get(i+"AxisIndex"),id:n.get(i+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(n)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n,i=this._dimName,r=this.ecModel,a=this.getAxisModel(),o="x"===i||"y"===i;return o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle"),r.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(a.get(e)||0)&&(n=t)})),n},getMinMaxSpan:function(){return i.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e,n=this._dataExtent,i=this.getAxisModel(),a=i.axis.scale,u=this._dataZoomModel.getRangePropMode(),c=[0,100],h=[],d=[];s(["start","end"],(function(i,o){var s=t[i],l=t[i+"Value"];"percent"===u[o]?(null==s&&(s=c[o]),l=a.parse(r.linearMap(s,c,n))):(e=!0,l=null==l?n[o]:a.parse(l),s=r.linearMap(l,n,c)),d[o]=l,h[o]=s})),l(d),l(h);var f=this._minMaxSpan;function p(t,e,n,i,s){var l=s?"Span":"ValueSpan";o(0,t,n,"all",f["min"+l],f["max"+l]);for(var u=0;u<2;u++)e[u]=r.linearMap(t[u],n,i,!0),s&&(e[u]=a.parse(e[u]))}return e?p(d,h,n,c,!1):p(h,d,c,n,!0),{valueWindow:d,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=c(this,this._dimName,e),f(this);var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,d(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,d(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&s(i,(function(t){var e=t.getData(),i=e.mapDimension(n,!0);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,o,s=0;sa[1];if(u&&!c&&!h)return!0;u&&(o=!0),c&&(n=!0),h&&(r=!0)}return o&&n&&r})):s(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return o(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}})),s(i,(function(t){e.setApproximateExtent(a,t)})))}))}function o(t){return t>=a[0]&&t<=a[1]}}};var p=u;t.exports=p},cca6:function(t,e,n){var i=n("23e7"),r=n("60da");i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},cccd:function(t,e,n){var i=n("e0d3"),r=i.makeInner;function a(){var t=r();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(r^o||a^s)&&"reset"}}t.exports=a},cd12:function(t,e,n){n("01ed"),n("4a9d"),n("cb8f")},cd33:function(t,e,n){var i=n("6d8b"),r=n("4319"),a=i.each,o=i.curry;function s(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return l(n,t,e),n.seriesInvolved&&c(n,t),n}function l(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),s=r.get("link",!0)||[],l=[];a(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var c=m(n.model),d=t.coordSysAxesInfo[c]={};t.coordSysMap[c]=n;var f=n.model,p=f.getModel("tooltip",i);if(a(n.getAxes(),o(_,!1,null)),n.getTooltipAxes&&i&&p.get("show")){var g="axis"===p.get("trigger"),y="cross"===p.get("axisPointer.type"),x=n.getTooltipAxes(p.get("axisPointer.axis"));(g||y)&&a(x.baseAxes,o(_,!y||"cross",g)),y&&a(x.otherAxes,o(_,"cross",!1))}}function _(i,a,o){var c=o.model.getModel("axisPointer",r),f=c.get("show");if(f&&("auto"!==f||i||v(c))){null==a&&(a=c.get("triggerTooltip")),c=i?u(o,p,r,e,i,a):c;var g=c.get("snap"),y=m(o.model),x=a||g||"category"===o.type,_=t.axesInfo[y]={key:y,axis:o,coordSys:n,axisPointerModel:c,triggerTooltip:a,involveSeries:x,snap:g,useHandle:v(c),seriesModels:[]};d[y]=_,t.seriesInvolved|=x;var b=h(s,o);if(null!=b){var w=l[b]||(l[b]={axesInfo:{}});w.axesInfo[y]=_,w.mapper=s[b].mapper,_.linkGroup=w}}}}))}function u(t,e,n,o,s,l){var u=e.getModel("axisPointer"),c={};a(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){c[t]=i.clone(u.get(t))})),c.snap="category"!==t.type&&!!l,"cross"===u.get("type")&&(c.type="line");var h=c.label||(c.label={});if(null==h.show&&(h.show=!1),"cross"===s){var d=u.get("label.show");if(h.show=null==d||d,!l){var f=c.lineStyle=u.get("crossStyle");f&&i.defaults(h,f.textStyle)}}return t.model.getModel("axisPointer",new r(c,n,o))}function c(t,e){e.eachSeries((function(e){var n=e.coordinateSystem,i=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==r&&!1!==e.get("axisPointer.show",!0)&&a(t.coordSysAxesInfo[m(n.model)],(function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}function h(t,e){for(var n=e.model,i=e.dim,r=0;r=0||t===e}function f(t){var e=p(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=v(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o0){var C=o(x)?l:u;x>0&&(x=x*I+M),b[w++]=C[T],b[w++]=C[T+1],b[w++]=C[T+2],b[w++]=C[T+3]*x*256}else w+=4}return d.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=i.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var r=t.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-e,e,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),t},_getGradient:function(t,e,n){for(var i=this._gradientPixels,r=i[n]||(i[n]=new Uint8ClampedArray(1024)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[n](s/255,!0,a),r[o++]=a[0],r[o++]=a[1],r[o++]=a[2],r[o++]=a[3];return r}};var o=a;t.exports=o},cdaa:function(t,e,n){var i=n("607d"),r=i.addEventListener,a=i.removeEventListener,o=i.normalizeEvent,s=i.getNativeEvent,l=n("6d8b"),u=n("1fab"),c=n("22d1"),h=300,d=c.domSupported,f=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=l.map(t,(function(t){var e=t.replace("mouse","pointer");return n.hasOwnProperty(e)?e:t}));return{mouse:t,touch:e,pointer:i}}(),p={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function g(t){return"mousewheel"===t&&c.browser.firefox?"DOMMouseScroll":t}function v(t){var e=t.pointerType;return"pen"===e||"touch"===e}function m(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}function y(t){t&&(t.zrByTouch=!0)}function x(t,e){return o(t.dom,new b(t,e),!0)}function _(t,e){var n=e,i=!1;while(n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot))n=n.parentNode;return i}function b(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var w=b.prototype;w.stopPropagation=w.stopImmediatePropagation=w.preventDefault=l.noop;var S={mousedown:function(t){t=o(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=o(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||D(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=o(this.dom,t),D(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=o(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=_(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=o(this.dom,t),y(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),S.mousemove.call(this,t),S.mousedown.call(this,t)},touchmove:function(t){t=o(this.dom,t),y(t),this.handler.processGesture(t,"change"),S.mousemove.call(this,t)},touchend:function(t){t=o(this.dom,t),y(t),this.handler.processGesture(t,"end"),S.mouseup.call(this,t),+new Date-this._lastTouchMoment=0&&(o[a[l].depth]=new s(a[l],this,e));if(i&&n){var u=r(i,n,this,!0,c);return u.data}function c(t,e){t.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var n=this.parentModel,i=n.getData().getItemLayout(e).depth,r=n.levelModels[i];return r||this.parentModel})),t})),e.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var n=this.parentModel,i=n.getGraph().getEdgeByIndex(e),r=i.node1.getLayout().depth,a=n.levelModels[r];return a||this.parentModel})),t}))}},setNodePosition:function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,n){if("edge"===n){var i=this.getDataParams(t,n),r=i.data,a=r.source+" -- "+r.target;return i.value&&(a+=" : "+i.value),o(a)}if("node"===n){var s=this.getGraph().getNodeByIndex(t),l=s.getLayout().value,c=this.getDataParams(t,n).data.name;if(l)a=c+" : "+l;return o(a)}return u.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var n=u.superCall(this,"getDataParams",t,e);if(null==n.value&&"node"===e){var i=this.getGraph().getNodeByIndex(t),r=i.getLayout().value;n.value=r}return n},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}})),c=u;t.exports=c},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var i=n("428f"),r=n("da84"),a=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?a(i[t])||a(r[t]):i[t]&&i[t][e]||r[t]&&r[t][e]}},d070:function(t,e,n){var i=n("3eba"),r=n("6d8b");function a(t,e){e.update="updateView",i.registerAction(e,(function(e,n){var i={};return n.eachComponent({mainType:"geo",query:e},(function(n){n[t](e.name);var a=n.coordinateSystem;r.each(a.regions,(function(t){i[t.name]=n.isSelected(t.name)||!1}))})),{selected:i,name:e.name}}))}n("1f1a"),n("eeea"),n("7661"),n("49e8"),a("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a("select",{type:"geoSelect",event:"geoselected"}),a("unSelect",{type:"geoUnSelect",event:"geounselected"})},d090:function(t,e,n){var i=n("6d8b"),r=n("f934"),a=n("3842"),o=n("2039"),s=864e5;function l(t,e,n){this._model=t}function u(t,e,n,i){var r=n.calendarModel,a=n.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem:null;return o===this?o[t](i):null}l.prototype={constructor:l,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=a.parseDate(t);var e=t.getFullYear(),n=t.getMonth()+1;n=n<10?"0"+n:n;var i=t.getDate();i=i<10?"0"+i:i;var r=t.getDay();return r=Math.abs((r+7-this.getFirstDayOfWeek())%7),{y:e,m:n,d:i,day:r,time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return e=e||0,0===e||(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e)),this.getDateInfo(t)},update:function(t,e){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,a=["width","height"],o=this._model.get("cellSize").slice(),s=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[n,7]:[7,n];i.each([0,1],(function(t){h(o,t)&&(s[a[t]]=o[t]*l[t])}));var u={width:e.getWidth(),height:e.getHeight()},c=this._rect=r.getLayoutRect(s,u);function h(t,e){return null!=t[e]&&"auto"!==t[e]}i.each([0,1],(function(t){h(o,t)||(o[t]=c[a[t]]/l[t])})),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){i.isArray(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),r=this._rangeInfo,a=n.formatedDate;if(e&&!(n.time>=r.start.time&&n.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],t[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/s)-Math.floor(t[0].time/s)+1,i=new Date(t[0].time),r=i.getDate(),a=t[1].date.getDate();i.setDate(r+n-1);var o=i.getDate();if(o!==a){var l=i.getTime()-t[1].time>0?1:-1;while((o=i.getDate())!==a&&(i.getTime()-t[1].time)*l>0)n-=l,i.setDate(o-l)}var u=Math.floor((n+t[0].day+6)/7),c=e?1-u:u-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:u,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return!1;var r=7*(t-1)-i.fweek+e,a=new Date(i.start.time);return a.setDate(i.start.d+r),this.getDateInfo(a)}},l.dimensions=l.prototype.dimensions,l.getDimensionsInfo=l.prototype.getDimensionsInfo,l.create=function(t,e){var n=[];return t.eachComponent("calendar",(function(i){var r=new l(i,t,e);n.push(r),i.coordinateSystem=r})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])})),n},o.register("calendar",l);var c=l;t.exports=c},d15d:function(t,e,n){var i=n("6d8b"),r=i.createHashMap,a=i.each;function o(t){var e=r();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}})),e.each(s)}function s(t){a(t,(function(e,n){var i=[],r=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,(function(a,l,u){var c,h,d=o.get(e.stackedDimension,u);if(isNaN(d))return r;s?h=o.getRawIndex(u):c=o.get(e.stackedByDimension,u);for(var f=NaN,p=n-1;p>=0;p--){var g=t[p];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var v=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&v>0||d<=0&&v<0){d+=v,f=v;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),e.data=l}))}t.exports=o},d1e7:function(t,e,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!i.call({1:2},1);e.f=a?function(t){var e=r(this,t);return!!e&&e.enumerable}:i},d28b:function(t,e,n){var i=n("746f");i("iterator")},d28f:function(t,e,n){var i=n("3eba");n("84d5"),n("4650"),n("5e97");var r=n("903c"),a=n("6cb7");i.registerProcessor(i.PRIORITY.PROCESSOR.SERIES_FILTER,r),a.registerSubTypeDefaulter("legend",(function(){return"plain"}))},d2a5:function(t,e,n){var i=n("3eba");i.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),i.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}))},d2bb:function(t,e,n){var i=n("825a"),r=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(a){}return function(n,a){return i(n),r(a),e?t.call(n,a):n.__proto__=a,n}}():void 0)},d2cf:function(t,e,n){var i=n("6d8b"),r=n("401b"),a=n("cb6d"),o=n("1fab"),s=n("607d"),l=n("0b44"),u="silent";function c(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.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:h}}function h(){s.stop(this.event)}function d(){}d.prototype.dispose=function(){};var f=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],p=function(t,e,n,i){o.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new d,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,a.call(this),this.setHandlerProxy(n)};function g(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){var i,r=t;while(r){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||u}return!1}function v(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}p.prototype={constructor:p,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(i.each(f,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=v(this,e,n),r=this._hovered,a=r.target;a&&!a.__zr&&(r=this.findHover(r.x,r.y),a=r.target);var o=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!n&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){t=t||{};var i=t.target;if(!i||!i.silent){var r="on"+e,a=c(e,t,n);while(i)if(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,a.cancelBubble)break;a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"===typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=g(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==u)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new l);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},i.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){p.prototype[t]=function(e){var n,i,a=e.zrX,o=e.zrY,s=v(this,a,o);if("mouseup"===t&&s||(n=this.findHover(a,o),i=n.target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||r.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}})),i.mixin(p,o),i.mixin(p,a);var m=p;t.exports=m},d357:function(t,e,n){var i=n("6d8b"),r=i.each,a=n("1c5f"),o=a.simpleLayout,s=a.simpleLayoutEdge;function l(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),a=[];r(n.dimensions,(function(t){a=a.concat(i.mapDimension(t,!0))}));for(var l=0;l=0&&r.each(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},c),"stack"===n){var f=u.series&&u.series[0]&&u.series[0].stack===l;o=f?r.merge({stack:s.title.tiled},s.title):r.clone(s.title)}e.dispatchAction({type:"changeMagicType",currentType:n,newOption:u,newTitle:o,featureName:"magicType"})}},i.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),o.register("magicType",u);var f=u;t.exports=f},d3a4:function(t,e,n){var i,r=n("22d1"),a="urn:schemas-microsoft-com:vml",o="undefined"===typeof window?null:window,s=!1,l=o&&o.document;function u(t){return i(t)}if(l&&!r.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),i=function(t){return l.createElement("')}}catch(h){i=function(t){return l.createElement("<"+t+' xmlns="'+a+'" class="zrvml">')}}function c(){if(!s&&l){s=!0;var t=l.styleSheets;t.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}e.doc=l,e.createNode=u,e.initVML=c},d3b7:function(t,e,n){var i=n("00ee"),r=n("6eeb"),a=n("b041");i||r(Object.prototype,"toString",a,{unsafe:!0})},d3f4:function(t,e){function n(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf((function(t){for(var e=i.getName(t),r=0;r=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){r.unregister(e.getZr(),"axisPointer"),a.superApply(this._model,"remove",arguments)},dispose:function(t,e){r.unregister("axisPointer",e),a.superApply(this._model,"dispose",arguments)}}),o=a;t.exports=o},d4c6:function(t,e,n){var i=n("cbe5"),r=i.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n=r||v<0)break;if(f(y)){if(p){v+=a;continue}break}if(v===n)t[a>0?"moveTo":"lineTo"](y[0],y[1]);else if(l>0){var x=e[g],_="y"===c?1:0,b=(y[_]-x[_])*l;u(h,x),h[_]=x[_]+b,u(d,y),d[_]=y[_]-b,t.bezierCurveTo(h[0],h[1],d[0],d[1],y[0],y[1])}else t.lineTo(y[0],y[1]);g=v,v+=a}return m}function v(t,e,n,i,a,p,g,v,m,y,x){for(var _=0,b=n,w=0;w=a||b<0)break;if(f(S)){if(x){b+=p;continue}break}if(b===n)t[p>0?"moveTo":"lineTo"](S[0],S[1]),u(h,S);else if(m>0){var M=b+p,A=e[M];if(x)while(A&&f(e[M]))M+=p,A=e[M];var I=.5,T=e[_];A=e[M];if(!A||f(A))u(d,S);else{var C,D;if(f(A)&&!x&&(A=S),r.sub(c,A,T),"x"===y||"y"===y){var L="x"===y?0:1;C=Math.abs(S[L]-T[L]),D=Math.abs(S[L]-A[L])}else C=r.dist(S,T),D=r.dist(S,A);I=D/(D+C),l(d,S,c,-m*(1-I))}o(h,h,v),s(h,h,g),o(d,d,v),s(d,d,g),t.bezierCurveTo(h[0],h[1],d[0],d[1],S[0],S[1]),l(h,S,c,m*I)}else t.lineTo(S[0],S[1]);_=b,b+=p}return w}function m(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}var y=i.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:a(i.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,a=m(n,e.smoothConstraint);if(e.connectNulls){for(;r>0;r--)if(!f(n[r-1]))break;for(;i0;a--)if(!f(n[a-1]))break;for(;r=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new r(e),s.key=t,n.insertEntry(s),i[t]=s}return a},o.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;t.exports=s},d5b7:function(t,e,n){var i=n("de00"),r=n("1fab"),a=n("0cde"),o=n("bd6b"),s=n("6d8b"),l=function(t){a.call(this,t),r.call(this,t),o.call(this,t),this.id=t.id||i()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"===typeof t)this.attrKV(t,e);else if(s.isObject(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n")})),c=function(){return"$0"==="a".replace(/./,"$0")}(),h=a("replace"),d=function(){return!!/./[h]&&""===/./[h]("a","$0")}(),f=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,h){var p=a(t),g=!r((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),v=g&&!r((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[l]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!g||!v||"replace"===t&&(!u||!c||d)||"split"===t&&!f){var m=/./[p],y=n(p,""[t],(function(t,e,n,i,r){return e.exec===o?g&&!r?{done:!0,value:m.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),x=y[0],_=y[1];i(String.prototype,t,x),i(RegExp.prototype,p,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}h&&s(RegExp.prototype[p],"sham",!0)}},d81d:function(t,e,n){"use strict";var i=n("23e7"),r=n("b727").map,a=n("1dde"),o=n("ae40"),s=a("map"),l=o("map");i({target:"Array",proto:!0,forced:!s||!l},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},d81e:function(t,e){function n(t,e,n){var i=t.getZoom(),r=t.getCenter(),a=e.zoom,o=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy){o[0]-=e.dx,o[1]-=e.dy;r=t.pointToData(o);t.setCenter(r)}if(null!=a){if(n){var s=n.min||0,l=n.max||1/0;a=Math.max(Math.min(i*a,l),s)/i}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,c=(e.originX-u[0])*(a-1),h=(e.originY-u[1])*(a-1);u[0]-=c,u[1]-=h,t.updateTransform();r=t.pointToData(o);t.setCenter(r),t.setZoom(a*i)}return{center:t.getCenter(),zoom:t.getZoom()}}e.updateCenterAndZoom=n},d833:function(t,e,n){var i=n("20c8"),r=n("9680"),a=n("e7d2"),o=n("68ab"),s=n("9f51"),l=n("857d"),u=l.normalizeRadian,c=n("4a3f"),h=n("8728"),d=i.CMD,f=2*Math.PI,p=1e-4;function g(t,e){return Math.abs(t-e)e&&u>i&&u>a&&u>s||u1&&y(),d=c.cubicAt(e,i,a,s,m[0]),g>1&&(f=c.cubicAt(e,i,a,s,m[1]))),2===g?_e&&s>i&&s>a||s=0&&u<=1){for(var h=0,d=c.quadraticAt(e,i,a,u),f=0;fn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);v[0]=-l,v[1]=l;var c=Math.abs(i-r);if(c<1e-4)return 0;if(c%f<1e-4){i=0,r=f;var h=a?1:-1;return o>=v[0]+t&&o<=v[1]+t?h:0}if(a){l=i;i=u(r),r=u(l)}else i=u(i),r=u(r);i>r&&(r+=f);for(var d=0,p=0;p<2;p++){var g=v[p];if(g+t>o){var m=Math.atan2(s,g);h=a?1:-1;m<0&&(m=f+m),(m>=i&&m<=r||m+f>=i&&m+f<=r)&&(m>Math.PI/2&&m<1.5*Math.PI&&(h=-h),d+=h)}}return d}function w(t,e,n,i,l){for(var u=0,c=0,f=0,p=0,v=0,m=0;m1&&(n||(u+=h(c,f,p,v,i,l))),1===m&&(c=t[m],f=t[m+1],p=c,v=f),y){case d.M:p=t[m++],v=t[m++],c=p,f=v;break;case d.L:if(n){if(r.containStroke(c,f,t[m],t[m+1],e,i,l))return!0}else u+=h(c,f,t[m],t[m+1],i,l)||0;c=t[m++],f=t[m++];break;case d.C:if(n){if(a.containStroke(c,f,t[m++],t[m++],t[m++],t[m++],t[m],t[m+1],e,i,l))return!0}else u+=x(c,f,t[m++],t[m++],t[m++],t[m++],t[m],t[m+1],i,l)||0;c=t[m++],f=t[m++];break;case d.Q:if(n){if(o.containStroke(c,f,t[m++],t[m++],t[m],t[m+1],e,i,l))return!0}else u+=_(c,f,t[m++],t[m++],t[m],t[m+1],i,l)||0;c=t[m++],f=t[m++];break;case d.A:var w=t[m++],S=t[m++],M=t[m++],A=t[m++],I=t[m++],T=t[m++];m+=1;var C=1-t[m++],D=Math.cos(I)*M+w,L=Math.sin(I)*A+S;m>1?u+=h(c,f,D,L,i,l):(p=D,v=L);var P=(i-w)*A/M+w;if(n){if(s.containStroke(w,S,A,I,I+T,C,e,P,l))return!0}else u+=b(w,S,A,I,I+T,C,P,l);c=Math.cos(I+T)*M+w,f=Math.sin(I+T)*A+S;break;case d.R:p=c=t[m++],v=f=t[m++];var k=t[m++],O=t[m++];D=p+k,L=v+O;if(n){if(r.containStroke(p,v,D,v,e,i,l)||r.containStroke(D,v,D,L,e,i,l)||r.containStroke(D,L,p,L,e,i,l)||r.containStroke(p,L,p,v,e,i,l))return!0}else u+=h(D,v,D,L,i,l),u+=h(p,L,p,v,i,l);break;case d.Z:if(n){if(r.containStroke(c,f,p,v,e,i,l))return!0}else u+=h(c,f,p,v,i,l);c=p,f=v;break}}return n||g(f,v)||(u+=h(c,f,p,v,i,l)||0),0!==u}function S(t,e,n){return w(t,0,!1,e,n)}function M(t,e,n,i){return w(t,e,!0,n,i)}e.contain=S,e.containStroke=M},d9d0:function(t,e,n){var i=n("6d8b"),r=n("1687"),a=n("f934"),o=n("697e"),s=n("0f55"),l=n("2306"),u=n("3842"),c=n("ef6a"),h=i.each,d=Math.min,f=Math.max,p=Math.floor,g=Math.ceil,v=u.round,m=Math.PI;function y(t,e,n){this._axesMap=i.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function x(t,e){return d(f(t,e[0]),e[1])}function _(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function b(t,e){var n,i,r=e.layoutLength,a=e.axisExpandWidth,o=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t=n&&a<=n+e.axisLength&&o>=i&&o<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();h(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),o.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=a.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],a=e.get("layout"),o="horizontal"===a?0:1,s=n[r[o]],l=[0,s],u=this.dimensions.length,c=x(e.get("axisExpandWidth"),l),h=x(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,f=e.get("axisExpandWindow");if(f)t=x(f[1]-f[0],l),f[1]=f[0]+t;else{t=x(c*(h-1),l);var m=e.get("axisExpandCenter")||p(u/2);f=[c*m-t/2],f[1]=f[0]+t}var y=(s-t)/(u-h);y<3&&(y=0);var _=[p(v(f[0]/c,1))+1,g(v(f[1]/c,1))-1],b=y/c*f[0];return{layout:a,pixelDimIndex:o,layoutBase:n[i[o]],layoutLength:s,axisBase:n[i[1-o]],axisLength:n[r[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:y,axisExpandWindow:f,axisCount:u,winInnerIndices:_,axisExpandWindow0Pos:b}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),h(n,(function(e,n){var o=(i.axisExpandable?b:_)(n,i),s={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},l={horizontal:m/2,vertical:0},u=[s[a].x+t.x,s[a].y+t.y],c=l[a],h=r.create();r.rotate(h,h,c),r.translate(h,h,u),this._axesLayout[e]={position:u,rotation:c,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,n,r){null==n&&(n=0),null==r&&(r=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];i.each(o,(function(e){s.push(t.mapDimension(e)),l.push(a.get(e).model)}));for(var u=this.hasAxisBrushed(),c=n;cr*(1-h[0])?(l="jump",o=s-r*(1-h[2])):(o=s-r*h[1])>=0&&(o=s-r*(1-h[1]))<=0&&(o=0),o*=e.axisExpandWidth/u,o?c(o,i,a,"all"):l="none";else{r=i[1]-i[0];var g=a[1]*s/r;i=[f(0,g-r/2)],i[1]=d(a[1],i[0]+r),i[0]=i[1]-r}return{axisExpandWindow:i,behavior:l}}};var w=y;t.exports=w},d9f1:function(t,e,n){var i=n("6d8b"),r=n("6cb7"),a=n("9e47"),o=n("2023"),s=r.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});i.merge(s.prototype,o);var l={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function u(t,e){return e.type||(e.data?"category":"value")}a("angle",s,u,l.angle),a("radius",s,u,l.radius)},d9fc:function(t,e,n){var i=n("cbe5"),r=i.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}});t.exports=r},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("c8ba"))},dae1:function(t,e,n){var i=n("3eba");n("928d"),n("b369"),n("4411");var r=n("90c2"),a=n("9ca8");i.registerVisual(r),i.registerLayout(a)},db0e:function(t,e,n){var i=n("3eba");n("a8c6"),n("8344"),i.registerPreprocessor((function(t){t.markPoint=t.markPoint||{}}))},db9e:function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("e86a"),o=n("2145"),s=n("2306"),l=n("4319"),u=n("80f0"),c=n("7919"),h=i.extendComponentView({type:"toolbox",render:function(t,e,n,i){var h=this.group;if(h.removeAll(),t.get("show")){var f=+t.get("itemSize"),p=t.get("feature")||{},g=this._features||(this._features={}),v=[];r.each(p,(function(t,e){v.push(e)})),new u(this._featureNames||[],v).add(m).update(m).remove(r.curry(m,null)).execute(),this._featureNames=v,c.layout(h,t,n),h.add(c.makeBackground(h.getBoundingRect(),t)),h.eachChild((function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var r=a.getBoundingRect(e,a.makeFont(i)),o=t.position[0]+h.position[0],s=t.position[1]+h.position[1]+f,l=!1;s+r.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-r.height:f+8;o+r.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):o-r.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}}))}function m(r,a){var s,u=v[r],c=v[a],h=p[u],f=new l(h,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===u&&(h.title=i.newTitle),u&&!c){if(d(u))s={model:f,onclick:f.option.onclick,featureName:u};else{var m=o.get(u);if(!m)return;s=new m(f,e,n)}g[u]=s}else{if(s=g[c],!s)return;s.model=f,s.ecModel=e,s.api=n}u||!c?f.get("show")&&!s.unusable?(y(f,s,u),f.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},s.render&&s.render(f,e,n,i)):s.remove&&s.remove(e,n):s.dispose&&s.dispose(e,n)}function y(i,a,o){var l=i.getModel("iconStyle"),u=i.getModel("emphasis.iconStyle"),c=a.getIcons?a.getIcons():i.get("icon"),d=i.get("title")||{};if("string"===typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var v=i.iconPaths={};r.each(c,(function(o,c){var p=s.createIcon(o,{},{x:-f/2,y:-f/2,width:f,height:f});p.setStyle(l.getItemStyle()),p.hoverStyle=u.getItemStyle(),p.setStyle({text:d[c],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var g=t.getModel("tooltip");g&&g.get("show")&&p.attr("tooltip",r.extend({content:d[c],formatter:g.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),s.setHoverStyle(p),t.get("showTitle")&&(p.__title=d[c],p.on("mouseover",(function(){var e=u.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";p.setStyle({textFill:u.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||n})})).on("mouseout",(function(){p.setStyle({textFill:null,textBackgroundColor:null})}))),p.trigger(i.get("iconStatus."+c)||"normal"),h.add(p),p.on("click",r.bind(a.onclick,a,e,n,c)),v[c]=p}))}},updateView:function(t,e,n,i){r.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,n,i)}))},remove:function(t,e){r.each(this._features,(function(n){n.remove&&n.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){r.each(this._features,(function(n){n.dispose&&n.dispose(t,e)}))}});function d(t){return 0===t.indexOf("my")}t.exports=h},dbb4:function(t,e,n){var i=n("23e7"),r=n("83ab"),a=n("56ef"),o=n("fc6a"),s=n("06cf"),l=n("8418");i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){var e,n,i=o(t),r=s.f,u=a(i),c={},h=0;while(u.length>h)n=r(i,e=u[h++]),void 0!==n&&l(c,e,n);return c}})},dc20:function(t,e,n){var i=n("8727"),r=i.createElement,a=n("6d8b"),o=n("4942"),s=n("cbe5"),l=n("0da8"),u=n("76a5"),c=n("0c12"),h=n("b16f"),d=n("9fa3"),f=n("bcaa"),p=n("3f8e"),g=p.path,v=p.image,m=p.text;function y(t){return parseInt(t,10)}function x(t){return t instanceof s?g:t instanceof l?v:t instanceof u?m:g}function _(t,e){return e&&t&&e.parentNode!==t}function b(t,e,n){if(_(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function w(t,e){if(_(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function S(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function M(t){return t.__textSvgEl}function A(t){return t.__svgEl}var I=function(t,e,n,i){this.root=t,this.storage=e,this._opts=n=a.extend({},n||{});var o=r("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var s=r("g");o.appendChild(s);var l=r("g");o.appendChild(l),this.gradientManager=new h(i,l),this.clipPathManager=new d(i,l),this.shadowManager=new f(i,l);var u=document.createElement("div");u.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=l,this._backgroundRoot=s,this._viewport=u,t.appendChild(u),u.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]};function T(t){return function(){o('In SVG mode painter not support method "'+t+'"')}}I.prototype={constructor:I,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=r("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,n=this._svgRoot,i=this._visibleList,r=t.length,a=[];for(e=0;e=0;--i)if(e[i]===t)return!0;return!1}),n}return null}return n[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var a=this._svgDom;a.setAttribute("width",t),a.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||y(s[n])||y(o.style[n]))-(y(s[r])||0)-(y(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var t=encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<"));return"data:image/svg+xml;charset=UTF-8,"+t}},a.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(t){I.prototype[t]=T(t)}));var C=I;t.exports=C},dc2f:function(t,e){var n=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};n.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var i=n;t.exports=i},dcb3:function(t,e,n){var i=n("6d8b"),r=n("625e"),a=n("2306"),o=n("cd33"),s=n("607d"),l=n("88b3"),u=n("e0d3"),c=u.makeInner,h=c(),d=i.clone,f=i.bind;function p(){}function g(t,e,n,i){v(h(n).lastProp,i)||(h(n).lastProp=i,e?a.updateProps(n,i,t):(n.stopAnimation(),n.attr(i)))}function v(t,e){if(i.isObject(t)&&i.isObject(e)){var n=!0;return i.each(e,(function(e,i){n=n&&v(t[i],e)})),!!n}return t===e}function m(t,e){t[e.get("label.show")?"show":"hide"]()}function y(t){return{position:t.position.slice(),rotation:t.rotation||0}}function x(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}p.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,r){var o=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,r||this._lastValue!==o||this._lastStatus!==s){this._lastValue=o,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var c={};this.makeElOption(c,o,t,e,n);var h=c.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var f=i.curry(g,e,d);this.updatePointerEl(l,c,f,e),this.updateLabelEl(l,c,f,e)}else l=this._group=new a.Group,this.createPointerEl(l,c,t,e),this.createLabelEl(l,c,t,e),n.getZr().add(l);x(l,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var s=this.animationThreshold;if(r&&i.getBandWidth()>s)return!0;if(a){var l=o.getAxisInfo(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return!0===n},makeElOption:function(t,e,n,i,r){},createPointerEl:function(t,e,n,i){var r=e.pointer;if(r){var o=h(t).pointerEl=new a[r.type](d(e.pointer));t.add(o)}},createLabelEl:function(t,e,n,i){if(e.label){var r=h(t).labelEl=new a.Rect(d(e.label));t.add(r),m(r,i)}},updatePointerEl:function(t,e,n){var i=h(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=h(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),m(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,u=n.getModel("handle"),c=n.get("status");if(!u.get("show")||!c||"hide"===c)return o&&r.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=a.createIcon(u.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){s.stop(t.event)},onmousedown:f(this._onHandleDragMove,this,0,0),drift:f(this._onHandleDragMove,this),ondragend:f(this._onHandleDragEnd,this)}),r.add(o)),x(o,n,!1);var h=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];o.setStyle(u.getItemStyle(null,h));var d=u.get("size");i.isArray(d)||(d=[d,d]),o.attr("scale",[d[0]/2,d[1]/2]),l.createOrUpdate(this,"_doDispatchAxisPointer",u.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){g(this._axisPointerModel,!e&&this._moveAnimation,this._handle,y(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(y(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(y(i)),h(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},_onHandleDragEnd:function(t){this._dragging=!1;var e=this._handle;if(e){var n=this._axisPointerModel.get("value");this._moveHandleToValue(n),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},p.prototype.constructor=p,r.enableClassExtend(p);var _=p;t.exports=_},dcea:function(t,e,n){var i=n("6d8b"),r=n("e887"),a=n("2306"),o=n("cbe5"),s=["itemStyle"],l=["emphasis","itemStyle"],u=r.extend({type:"boxplot",render:function(t,e,n){var i=t.getData(),r=this.group,a=this._data;this._data||r.removeAll();var o="horizontal"===t.get("layout")?1:0;i.diff(a).add((function(t){if(i.hasValue(t)){var e=i.getItemLayout(t),n=h(e,i,t,o,!0);i.setItemGraphicEl(t,n),r.add(n)}})).update((function(t,e){var n=a.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?d(s,n,i,t):n=h(s,i,t,o),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},remove:function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},dispose:i.noop}),c=o.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i=0;n--)s.asc(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i40&&(u=Math.max(1,Math.floor(s/40)));for(var c=o[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),f=Math.abs(d*Math.cos(i)),p=Math.abs(d*Math.sin(i)),g=0,v=0;c<=o[1];c+=u){var m=0,y=0,x=r.getBoundingRect(n(c),e.font,"center","top");m=1.3*x.width,y=1.3*x.height,g=Math.max(g,m,7),v=Math.max(v,y,7)}var _=g/f,b=v/p;isNaN(_)&&(_=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(_,b))),M=h(t.model),A=t.getExtent(),I=M.lastAutoInterval,T=M.lastTickCount;return null!=I&&null!=T&&Math.abs(I-w)<=1&&Math.abs(T-s)<=1&&I>w&&M.axisExtend0===A[0]&&M.axisExtend1===A[1]?w=I:(M.lastTickCount=s,M.lastAutoInterval=w,M.axisExtend0=A[0],M.axisExtend1=A[1]),w}function S(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function M(t,e,n){var i=l(t),r=t.scale,a=r.getExtent(),o=t.getLabelModel(),s=[],u=Math.max((e||0)+1,1),h=a[0],d=r.count();0!==h&&u>1&&d/u>2&&(h=Math.round(Math.ceil(h/u)*u));var f=c(t),p=o.get("showMinLabel")||f,g=o.get("showMaxLabel")||f;p&&h!==a[0]&&m(a[0]);for(var v=h;v<=a[1];v+=u)m(v);function m(t){s.push(n?t:{formattedLabel:i(t),rawLabel:r.getLabel(t),tickValue:t})}return g&&v-u!==a[1]&&m(a[1]),s}function A(t,e,n){var r=t.scale,a=l(t),o=[];return i.each(r.getTicks(),(function(t){var i=r.getLabel(t);e(t,i)&&o.push(n?t:{formattedLabel:a(t),rawLabel:i,tickValue:t})})),o}e.createAxisLabels=d,e.createAxisTicks=f,e.calculateCategoryInterval=w},e0d3:function(t,e,n){var i=n("6d8b"),r=n("22d1"),a=i.each,o=i.isObject,s=i.isArray,l="series\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function c(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i=n.length&&n.push({option:t})}})),n}function g(t){var e=i.createHashMap();a(t,(function(t,n){var i=t.exist;i&&e.set(i.id,t)})),a(t,(function(t,n){var r=t.option;i.assert(!r||null==r.id||!e.get(r.id)||e.get(r.id)===t,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&e.set(r.id,t),!t.keyInfo&&(t.keyInfo={})})),a(t,(function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(o(r)){if(a.name=null!=r.name?r.name+"":i?i.name:l+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var s=0;do{a.id="\0"+a.name+"\0"+s++}while(e.get(a.id))}e.set(a.id,t)}}))}function v(t){var e=t.name;return!(!e||!e.indexOf(l))}function m(t){return o(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function y(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[a(n),a(i)];function r(t,e,n){for(var i=0,r=t.length;i=e[0]&&t<=e[1]},r.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},r.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r.prototype.getLabel=null,i.enableClassExtend(r),i.enableClassManagement(r,{registerWhenExtend:!0});var a=r;t.exports=a},e163:function(t,e,n){var i=n("5135"),r=n("7b0b"),a=n("f772"),o=n("e177"),s=a("IE_PROTO"),l=Object.prototype;t.exports=o?Object.getPrototypeOf:function(t){return t=r(t),i(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},e177:function(t,e,n){var i=n("d039");t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e1fc:function(t,e,n){var i=n("6d8b"),r=n("d5b7"),a=n("9850"),o=function(t){for(var e in t=t||{},r.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof o&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,r=this._children,a=i.indexOf(r,t);return a<0||(r.splice(a,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},e263:function(t,e,n){var i=n("401b"),r=n("4a3f"),a=Math.min,o=Math.max,s=Math.sin,l=Math.cos,u=2*Math.PI,c=i.create(),h=i.create(),d=i.create();function f(t,e,n){if(0!==t.length){var i,r=t[0],s=r[0],l=r[0],u=r[1],c=r[1];for(i=1;i1e-4)return p[0]=t-n,p[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(c[0]=l(a)*n+t,c[1]=s(a)*r+e,h[0]=l(o)*n+t,h[1]=s(o)*r+e,v(p,c,h),m(g,c,h),a%=u,a<0&&(a+=u),o%=u,o<0&&(o+=u),a>o&&!f?o+=u:aa&&(d[0]=l(_)*n+t,d[1]=s(_)*r+e,v(p,d,p),m(g,d,g))}e.fromPoints=f,e.fromLine=p,e.fromCubic=m,e.fromQuadratic=y,e.fromArc=x},e2cc:function(t,e,n){var i=n("6eeb");t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},e439:function(t,e,n){var i=n("23e7"),r=n("d039"),a=n("fc6a"),o=n("06cf").f,s=n("83ab"),l=r((function(){o(1)})),u=!s||l;i({target:"Object",stat:!0,forced:u,sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},e468:function(t,e,n){var i=n("e46b"),r=n("6d8b"),a=n("2f45"),o=a.getDimensionTypeByAxis,s=n("0f99"),l=s.makeSeriesEncodeForAxisCoordSys,u={_baseAxisDim:null,getInitialData:function(t,e){var n,a,s=e.getComponent("xAxis",this.get("xAxisIndex")),u=e.getComponent("yAxis",this.get("yAxisIndex")),c=s.get("type"),h=u.get("type");"category"===c?(t.layout="horizontal",n=s.getOrdinalMeta(),a=!0):"category"===h?(t.layout="vertical",n=u.getOrdinalMeta(),a=!0):t.layout=t.layout||"horizontal";var d=["x","y"],f="horizontal"===t.layout?0:1,p=this._baseAxisDim=d[f],g=d[1-f],v=[s,u],m=v[f].get("type"),y=v[1-f].get("type"),x=t.data;if(x&&a){var _=[];r.each(x,(function(t,e){var n;t.value&&r.isArray(t.value)?(n=t.value.slice(),t.value.unshift(e)):r.isArray(t)?(n=t.slice(),t.unshift(e)):n=t,_.push(n)})),t.data=_}var b=this.defaultValueDimensions,w=[{name:p,type:o(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:g,type:o(y),dimsDef:b.slice()}];return i(this,{coordDimensions:w,dimensionsCount:b.length+1,encodeDefaulter:r.curry(l,w,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};e.seriesModelMixin=u},e46b:function(t,e,n){var i=n("b1d4"),r=n("6179"),a=n("6d8b"),o=a.extend,s=a.isArray;function l(t,e,n){e=s(e)&&{coordDimensions:e}||o({},e);var a=t.getSource(),l=i(a,e),u=new r(l,t);return u.initData(a,n),u}t.exports=l},e47b:function(t,e,n){var i=n("e0d3"),r=i.makeInner,a=i.normalizeToArray,o=r();function s(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}var l={clearColorPalette:function(){o(this).colorIdx=0,o(this).colorNameMap={}},getColorFromPalette:function(t,e,n){e=e||this;var i=o(e),r=i.colorIdx||0,l=i.colorNameMap=i.colorNameMap||{};if(l.hasOwnProperty(t))return l[t];var u=a(this.get("color",!0)),c=this.get("colorLayer",!0),h=null!=n&&c?s(c,n):u;if(h=h||u,h&&h.length){var d=h[r];return t&&(l[t]=d),i.colorIdx=(r+1)%h.length,d}}};t.exports=l},e4d1:function(t,e,n){n("6932"),n("3a56"),n("7dcf"),n("3790"),n("2325"),n("2c17"),n("9e87")},e538:function(t,e,n){var i=n("b622");e.f=i},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cd:function(t,e,n){var i=n("6d8b");function r(){var t,e=[],n={};return{add:function(t,r,a,o,s){return i.isString(o)&&(s=o,o=0),!n[t.id]&&(n[t.id]=1,e.push({el:t,target:r,time:a,delay:o,easing:s}),!0)},done:function(e){return t=e,this},start:function(){for(var i=e.length,r=0,a=e.length;r=51&&/native code/.test(V))return!1;var e=V.resolve(1),n=function(t){t((function(){}),(function(){}))},i=e.constructor={};return i[E]=n,!(e.then((function(){}))instanceof n)})),nt=et||!w((function(t){V.all(t)["catch"]((function(){}))})),it=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},rt=function(t,e,n){if(!e.notified){e.notified=!0;var i=e.reactions;A((function(){var r=e.value,a=e.state==K,o=0;while(i.length>o){var s,l,u,c=i[o++],h=a?c.ok:c.fail,d=c.resolve,f=c.reject,p=c.domain;try{h?(a||(e.rejection===tt&<(t,e),e.rejection=Q),!0===h?s=r:(p&&p.enter(),s=h(r),p&&(p.exit(),u=!0)),s===c.promise?f(G("Promise-chain cycle")):(l=it(s))?l.call(s,d,f):d(s)):f(r)}catch(g){p&&!u&&p.exit(),f(g)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&ot(t,e)}))}},at=function(t,e,n){var i,r;Y?(i=F.createEvent("Event"),i.promise=e,i.reason=n,i.initEvent(t,!1,!0),u.dispatchEvent(i)):i={promise:e,reason:n},(r=u["on"+t])?r(i):t===X&&T("Unhandled promise rejection",n)},ot=function(t,e){M.call(u,(function(){var n,i=e.value,r=st(e);if(r&&(n=D((function(){Z?H.emit("unhandledRejection",i,t):at(X,t,i)})),e.rejection=Z||st(e)?tt:Q,n.error))throw n.value}))},st=function(t){return t.rejection!==Q&&!t.parent},lt=function(t,e){M.call(u,(function(){Z?H.emit("rejectionHandled",t):at(q,t,e.value)}))},ut=function(t,e,n,i){return function(r){t(e,n,r,i)}},ct=function(t,e,n,i){e.done||(e.done=!0,i&&(e=i),e.value=n,e.state=J,rt(t,e,!0))},ht=function(t,e,n,i){if(!e.done){e.done=!0,i&&(e=i);try{if(t===n)throw G("Promise can't be resolved itself");var r=it(n);r?A((function(){var i={done:!1};try{r.call(n,ut(ht,t,i,e),ut(ct,t,i,e))}catch(a){ct(t,i,a,e)}})):(e.value=n,e.state=K,rt(t,e,!1))}catch(a){ct(t,{done:!1},a,e)}}};et&&(V=function(t){y(this,V,N),m(t),i.call(this);var e=R(this);try{t(ut(ht,this,e),ut(ct,this,e))}catch(n){ct(this,e,n)}},i=function(t){z(this,{type:N,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:$,value:void 0})},i.prototype=f(V.prototype,{then:function(t,e){var n=B(this),i=j(S(this,V));return i.ok="function"!=typeof t||t,i.fail="function"==typeof e&&e,i.domain=Z?H.domain:void 0,n.parent=!0,n.reactions.push(i),n.state!=$&&rt(this,n,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new i,e=R(t);this.promise=t,this.resolve=ut(ht,t,e),this.reject=ut(ct,t,e)},C.f=j=function(t){return t===V||t===a?new r(t):U(t)},l||"function"!=typeof h||(o=h.prototype.then,d(h.prototype,"then",(function(t,e){var n=this;return new V((function(t,e){o.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof W&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return I(V,W.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:et},{Promise:V}),p(V,N,!1,!0),g(N),a=c(N),s({target:N,stat:!0,forced:et},{reject:function(t){var e=j(this);return e.reject.call(void 0,t),e.promise}}),s({target:N,stat:!0,forced:l||et},{resolve:function(t){return I(l&&this===a?V:this,t)}}),s({target:N,stat:!0,forced:nt},{all:function(t){var e=this,n=j(e),i=n.resolve,r=n.reject,a=D((function(){var n=m(e.resolve),a=[],o=0,s=1;b(t,(function(t){var l=o++,u=!1;a.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,a[l]=t,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise},race:function(t){var e=this,n=j(e),i=n.reject,r=D((function(){var r=m(e.resolve);b(t,(function(t){r.call(e,t).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}})},e7aa:function(t,e,n){var i=n("2306"),r=n("c775"),a=r.getDefaultLabel;function o(t,e,n,r,o,l,u){var c=n.getModel("label"),h=n.getModel("emphasis.label");i.setLabelStyle(t,e,c,h,{labelFetcher:o,labelDataIndex:l,defaultText:a(o.getData(),l),isRectText:!0,autoColor:r}),s(t),s(e)}function s(t,e){"outside"===t.textPosition&&(t.textPosition=e)}e.setLabel=o},e7d2:function(t,e,n){var i=n("4a3f");function r(t,e,n,r,a,o,s,l,u,c,h){if(0===u)return!1;var d=u;if(h>e+d&&h>r+d&&h>o+d&&h>l+d||ht+d&&c>n+d&&c>a+d&&c>s+d||cf&&(d=0,h={}),d++,h[n]=r,r}function x(t,e,n,i,r,a,o,s){return o?b(t,e,n,i,r,a,o,s):_(t,e,n,i,r,a,s)}function _(t,e,n,r,a,o,s){var l=k(t,e,a,o,s),u=y(t,e);a&&(u+=a[1]+a[3]);var c=l.outerHeight,h=w(0,u,n),d=S(0,c,r),f=new i(h,d,u,c);return f.lineHeight=l.lineHeight,f}function b(t,e,n,r,a,o,s,l){var u=O(t,{rich:s,truncate:l,font:e,textAlign:n,textPadding:a,textLineHeight:o}),c=u.outerWidth,h=u.outerHeight,d=w(0,c,n),f=S(0,h,r);return new i(d,f,c,h)}function w(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function S(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function M(t,e,n){var i=e.textPosition,r=e.textDistance,a=n.x,o=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){case"left":a-=r,o+=u,c="right",h="middle";break;case"right":a+=r+l,o+=u,h="middle";break;case"top":a+=l/2,o-=r,c="center",h="bottom";break;case"bottom":a+=l/2,o+=s+r,c="center";break;case"inside":a+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":a+=r,o+=u,h="middle";break;case"insideRight":a+=l-r,o+=u,c="right",h="middle";break;case"insideTop":a+=l/2,o+=r,c="center";break;case"insideBottom":a+=l/2,o+=s-r,c="center",h="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,c="right";break;case"insideBottomLeft":a+=r,o+=s-r,h="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,c="right",h="bottom";break}return t=t||{},t.x=a,t.y=o,t.textAlign=c,t.textVerticalAlign=h,t}function A(t,e,n){var i={textPosition:t,textDistance:n};return M({},i,e)}function I(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=T(e,n,i,r);for(var o=0,s=a.length;o=a;u++)o-=a;var c=y(n,e);return c>o&&(n="",c=0),o=t-c,i.ellipsis=n,i.ellipsisWidth=c,i.contentWidth=o,i.containerWidth=t,i}function C(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=y(t,i);if(a<=n)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?D(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=y(t,i)}return""===t&&(t=e.placeholder),t}function D(t,e,n,i){for(var r=0,a=0,o=t.length;ah)t="",o=[];else if(null!=d)for(var f=T(d-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),p=0,g=o.length;pa&&E(n,t.substring(a,o)),E(n,i[2],i[1]),a=p.lastIndex}am)return{lines:[],width:0,height:0};M.textWidth=y(M.text,C);var P=A.textWidth,k=null==P||"auto"===P;if("string"===typeof P&&"%"===P.charAt(P.length-1))M.percentWidth=P,d.push(M),P=0;else{if(k){P=M.textWidth;var O=A.textBackgroundColor,N=O&&O.image;N&&(N=r.findExistImage(N),r.isImageReady(N)&&(P=Math.max(P,N.width*D/N.height)))}var R=T?T[1]+T[3]:0;P+=R;var z=null!=v?v-w:null;null!=z&&z"],r.isArray(t)&&(t=t.slice(),i=!0),a=e?t:i?[c(t[0]),c(t[1])]:c(t),r.isString(u)?u.replace("{value}",i?a[0]:a).replace("{value2}",i?a[1]:a):r.isFunction(u)?i?u(t[0],t[1]):u(t):i?t[0]===l[0]?n[0]+" "+a[1]:t[1]===l[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a;function c(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}},resetExtent:function(){var t=this.option,e=g([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var a=i[r],o=t.getDimensionInfo(a);if(!o.isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),a=e.controller||(e.controller={});r.merge(i,n),r.merge(a,n);var l=this.isCategory();function u(n){f(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},p(this.stateList,(function(t){var e=n[t];if(r.isString(e)){var i=o.get(e,"active",l);i?(n[t]={},n[t][e]=i):delete n[t]}}),this)}function c(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},p(i,(function(t,e){if(s.isValidType(e)){var n=o.get(e,"inactive",l);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}function g(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor");p(this.stateList,(function(a){var o=this.itemSize,s=t[a];s||(s=t[a]={color:l?i:[i]}),null==s.symbol&&(s.symbol=e&&r.clone(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&r.clone(n)||(l?o[0]:[o[0],o[0]])),s.symbol=h(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var u=s.symbolSize;if(null!=u){var c=-1/0;d(u,(function(t){t>c&&(c=t)})),s.symbolSize=h(u,(function(t){return v(t,[0,c],[0,o[0]],!0)}))}}),this)}u.call(this,i),u.call(this,a),c.call(this,i,"inRange","outOfRange"),g.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:m,getValueState:m,getVisualMeta:m}),x=y;t.exports=x},eaeb:function(t,e,n){var i=n("6d8b");function r(t,e){return i.map(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),a=e[i],o=t[i]/2,s="dataTo"+n,l="category"===r.type?r.getBandWidth():Math.abs(r[s](a-o)-r[s](a+o));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}function a(t){var e=t.getRadiusAxis(),n=t.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:i.bind((function(i){var r=e.dataToRadius(i[0]),a=n.dataToAngle(i[1]),o=t.coordToPoint([r,a]);return o.push(r,a*Math.PI/180),o})),size:i.bind(r,t)}}}t.exports=a},eb6b:function(t,e,n){var i=n("6d8b"),r=n("e0d3"),a=r.makeInner,o=n("cd33"),s=n("133d"),l=i.each,u=i.curry,c=a();function h(t,e,n){var r=t.currTrigger,a=[t.x,t.y],o=t,c=t.dispatchAction||i.bind(n.dispatchAction,n),h=e.getComponent("axisPointer").coordSysAxesInfo;if(h){b(a)&&(a=s({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var f=b(a),w=o.axesInfo,S=h.axesInfo,M="leave"===r||b(a),A={},I={},T={list:[],map:{}},C={showPointer:u(p,I),showTooltip:u(g,T)};l(h.coordSysMap,(function(t,e){var n=f||t.containPoint(a);l(h.coordSysAxesInfo[e],(function(t,e){var i=t.axis,r=x(w,t);if(!M&&n&&(!w||r)){var o=r&&r.value;null!=o||f||(o=i.pointToData(a)),null!=o&&d(t,o,C,!1,A)}}))}));var D={};return l(S,(function(t,e){var n=t.linkGroup;n&&!I[e]&&l(n.axesInfo,(function(e,i){var r=I[i];if(e!==t&&r){var a=r.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,_(e),_(t)))),D[t.key]=a}}))})),l(D,(function(t,e){d(S[e],t,C,!0,A)})),v(I,S,A),m(T,a,t,c),y(S,c,n),A}}function d(t,e,n,r,a){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var s=f(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==a.seriesIndex&&i.extend(a,l[0]),!r&&t.snap&&o.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l,a),n.showTooltip(t,s,u)}else n.showPointer(t,e)}function f(t,e){var n=e.axis,i=n.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return l(e.seriesModels,(function(e,u){var c,h,d=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var f=e.getAxisTooltipData(d,t,n);h=f.dataIndices,c=f.nestestValue}else{if(h=e.getData().indicesOfNearest(d[0],t,"category"===n.type?.5:null),!h.length)return;c=e.getData().get(d[0],h[0])}if(null!=c&&isFinite(c)){var p=t-c,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,r=c,a.length=0),l(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:r}}function p(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function g(t,e,n,i){var r=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;if(e.triggerTooltip&&r.length){var u=e.coordSys.model,c=o.makeKey(u),h=t.map[c];h||(h=t.map[c]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:r.slice()})}}function v(t,e,n){var i=n.axesInfo=[];l(e,(function(e,n){var r=e.axisPointerModel.option,a=t[n];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}function m(t,e,n,i){if(!b(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}function y(t,e,n){var r=n.getZr(),a="axisPointerLastHighlights",o=c(r)[a]||{},s=c(r)[a]={};l(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&l(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;s[e]=t}))}));var u=[],h=[];i.each(o,(function(t,e){!s[e]&&h.push(t)})),i.each(s,(function(t,e){!o[e]&&u.push(t)})),h.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:h}),u.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:u})}function x(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function _(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function b(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}t.exports=h},ebf9:function(t,e,n){var i=n("3eba");i.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))},ec02:function(t,e,n){var i=n("6d8b"),r=n("84ce"),a=function(t,e,n,i,a){r.call(this,t,e,n),this.type=i||"value",this.position=a||"bottom"};a.prototype={constructor:a,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},i.inherits(a,r);var o=a;t.exports=o},ec34:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("6d8b")),a=r.createHashMap,o=r.isString,s=r.isArray,l=r.each,u=(r.assert,n("3041")),c=u.parseXML,h=a(),d={registerMap:function(t,e,n){var i;return s(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),l(i,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var n=f[e];n(t)})),h.set(t,i)},retrieveMap:function(t){return h.get(t)}},f={geoJSON:function(t){var e=t.source;t.geoJSON=o(e)?"undefined"!==typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=c(t.source)}};t.exports=d},ec6f:function(t,e,n){var i=n("6d8b"),r=i.createHashMap,a=i.isTypedArray,o=n("625e"),s=o.enableClassCheck,l=n("93d0"),u=l.SOURCE_FORMAT_ORIGINAL,c=l.SERIES_LAYOUT_BY_COLUMN,h=l.SOURCE_FORMAT_UNKNOWN,d=l.SOURCE_FORMAT_TYPED_ARRAY,f=l.SOURCE_FORMAT_KEYED_COLUMNS;function p(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===f?{}:[]),this.sourceFormat=t.sourceFormat||h,this.seriesLayoutBy=t.seriesLayoutBy||c,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&r(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}p.seriesDataToSource=function(t){return new p({data:t,sourceFormat:a(t)?d:u,fromDataset:!1})},s(p);var g=p;t.exports=g},ecf8:function(t,e,n){var i=n("6d8b"),r=n("3842"),a=r.parsePercent,o=i.each;function s(t){var e=l(t);o(e,(function(t){var e=t.seriesModels;e.length&&(u(t),o(e,(function(e,n){c(e,t.boxOffsetList[n],t.boxWidthList[n])})))}))}function l(t){var e=[],n=[];return t.eachSeriesByType("boxplot",(function(t){var r=t.getBaseAxis(),a=i.indexOf(n,r);a<0&&(a=n.length,n[a]=r,e[a]={axis:r,seriesModels:[]}),e[a].seriesModels.push(t)})),e}function u(t){var e,n,r=t.axis,s=t.seriesModels,l=s.length,u=t.boxWidthList=[],c=t.boxOffsetList=[],h=[];if("category"===r.type)n=r.getBandWidth();else{var d=0;o(s,(function(t){d=Math.max(d,t.getData().count())})),e=r.getExtent(),Math.abs(e[1]-e[0])}o(s,(function(t){var e=t.get("boxWidth");i.isArray(e)||(e=[e,e]),h.push([a(e[0],n)||0,a(e[1],n)||0])}));var f=.8*n-2,p=f/l*.3,g=(f-p*(l-1))/l,v=g/2-f/2;o(s,(function(t,e){c.push(v),v+=p+g,u.push(Math.min(Math.max(g,h[e][0]),h[e][1]))}))}function c(t,e,n){var i=t.coordinateSystem,r=t.getData(),a=n/2,o="horizontal"===t.get("layout")?0:1,s=1-o,l=["x","y"],u=r.mapDimension(l[o]),c=r.mapDimension(l[s],!0);if(!(null==u||c.length<5))for(var h=0;h=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n15)break}}o.__drawIndex=m,o.__drawIndex0&&t>i[0]){for(s=0;st)break;a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var u=a.dom;u.nextSibling?l.insertBefore(e.dom,u.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else o("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i0?g:0),this._needsManuallyCompositing),l.__builtin__||o("ZLevel "+u+" has been used by unkown layer "+l.id),l!==a&&(l.__used=!0,l.__startIndex!==n&&(l.__dirty=!0),l.__startIndex=n,l.incremental?l.__drawIndex=-1:l.__drawIndex=n,e(n),a=l),i.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=n))}e(n),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?a.merge(n[t],e,!0):n[t]=e;for(var i=0;i1?"."+t[1]:""))}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var l=i.normalizeCssArray,u=/([&<>"'])/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"};function h(t){return null==t?"":(t+"").replace(u,(function(t,e){return c[e]}))}var d=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function p(t,e,n){i.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var a=e[0].$vars||[],o=0;o':'':{renderMode:a,content:"{marker"+o+"|} ",style:{color:n}}:""}function m(t,e){return t+="","0000".substr(0,e-t.length)+t}function y(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=a.parseDate(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),s=i["get"+r+"Month"]()+1,l=i["get"+r+"Date"](),u=i["get"+r+"Hours"](),c=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),d=i["get"+r+"Milliseconds"]();return t=t.replace("MM",m(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",m(l,2)).replace("d",l).replace("hh",m(u,2)).replace("h",u).replace("mm",m(c,2)).replace("m",c).replace("ss",m(h,2)).replace("s",h).replace("SSS",m(d,3)),t}function x(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var _=r.truncateText;function b(t){return r.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function w(t,e,n,i,a,o,s,l){return r.getBoundingRect(t,e,n,i,a,l,o,s)}function S(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location=t}else window.open(t,e)}e.addCommas=o,e.toCamelCase=s,e.normalizeCssArray=l,e.encodeHTML=h,e.formatTpl=p,e.formatTplSimple=g,e.getTooltipMarker=v,e.formatTime=y,e.capitalFirst=x,e.truncateText=_,e.getTextBoundingRect=b,e.getTextRect=w,e.windowOpen=S},edaf:function(t,e,n){var i=n("6d8b"),r=n("6cb7"),a=n("6179"),o=n("e0d3"),s=r.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){s.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,r=this._names=[];if("category"===n){var s=[];i.each(e,(function(t,e){var n,a=o.getDataItemValue(t);i.isObject(t)?(n=i.clone(t),n.value=e):n=e,s.push(n),i.isString(a)||null!=a&&!isNaN(a)||(a=""),r.push(a+"")})),e=s}var l={category:"ordinal",time:"time"}[n]||"number",u=this._data=new a([{name:"value",type:l}],this);u.initData(e,r)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),l=s;t.exports=l},edb9:function(t,e,n){var i=n("6d8b");function r(t,e){e=e||{};var n=t.coordinateSystem,r=t.axis,a={},o=r.position,s=r.orient,l=n.getRect(),u=[l.x,l.x+l.width,l.y,l.y+l.height],c={horizontal:{top:u[2],bottom:u[3]},vertical:{left:u[0],right:u[1]}};a.position=["vertical"===s?c.vertical[o]:u[0],"horizontal"===s?c.horizontal[o]:u[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[s];var d={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=d[o],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),i.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var f=e.rotate;return null==f&&(f=t.get("axisLabel.rotate")),a.labelRotation="top"===o?-f:f,a.z2=1,a}e.layout=r},ee1a:function(t,e,n){var i=n("6d8b"),r=i.each,a=i.isString;function o(t,e,n){n=n||{};var i,o,s,l,u=n.byIndex,c=n.stackedCoordDimension,h=!(!t||!t.get("stack"));if(r(e,(function(t,n){a(t)&&(e[n]=t={name:t}),h&&!t.isExtraCoord&&(u||i||!t.ordinalMeta||(i=t),o||"ordinal"===t.type||"time"===t.type||c&&c!==t.coordDim||(o=t))})),!o||u||i||(u=!0),o){s="__\0ecstackresult",l="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var d=o.coordDim,f=o.type,p=0;r(e,(function(t){t.coordDim===d&&p++})),e.push({name:s,coordDim:d,coordDimIndex:p,type:f,isExtraCoord:!0,isCalculationCoord:!0}),p++,e.push({name:l,coordDim:l,coordDimIndex:p,type:f,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:i&&i.name,isStackedByIndex:u,stackedOverDimension:l,stackResultDimension:s}}function s(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function l(t,e){return s(t,e)?t.getCalculationInfo("stackResultDimension"):e}e.enableDataStack=o,e.isDimensionStacked=s,e.getStackedDimension=l},ee66:function(t,e,n){var i=n("3eba"),r=n("6d8b"),a=n("2306"),o=n("eda2"),s=n("3842"),l={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},u={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},c=i.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,a=r.getRangeInfo(),o=r.getOrient();this._renderDayRect(t,a,i),this._renderLines(t,a,o,i),this._renderYearText(t,a,o,i),this._renderMonthText(t,o,i),this._renderWeekText(t,a,o,i)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),s=i.getCellHeight(),l=e.start.time;l<=e.end.time;l=i.getNextNDay(l,1).time){var u=i.dataToRect([l],!1).tl,c=new a.Rect({shape:{x:u[0],y:u[1],width:o,height:s},cursor:"default",style:r});n.add(c)}},_renderLines:function(t,e,n,i){var r=this,a=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){d(u.formatedDate),0===c&&(u=a.getDateInfo(e.start.y+"-"+e.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=a.getDateInfo(h)}function d(e){r._firstDayOfMonth.push(a.getDateInfo(e)),r._firstDayPoints.push(a.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,o,i)}d(a.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),o,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),o,i)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},_drawSplitline:function(t,e,n){var i=new a.Polyline({z2:20,shape:{points:t},style:e});n.add(i)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var r=[],a=0;a<7;a++){var o=i.getNextNDay(e.time,a),s=i.dataToRect([o.time],!1);r[2*o.day]=s.tl,r[2*o.day+1]=s["horizontal"===n?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"===typeof t&&t?o.formatTplSimple(t,e):"function"===typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,r){e=e.slice();var a=["center","bottom"];"bottom"===i?(e[1]+=r,a=["center","top"]):"left"===i?e[0]-=r:"right"===i?(e[0]+=r,a=["center","top"]):e[1]-=r;var o=0;return"left"!==i&&"right"!==i||(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),s=r.get("position");s||(s="horizontal"!==n?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],u=(l[0][0]+l[1][0])/2,c=(l[0][1]+l[1][1])/2,h="horizontal"===n?0:1,d={top:[u,l[h][1]],bottom:[u,l[1-h][1]],left:[l[1-h][0],c],right:[l[h][0],c]},f=e.start.y;+e.end.y>+e.start.y&&(f=f+"-"+e.end.y);var p=r.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:f},v=this._formatterLabel(p,g),m=new a.Text({z2:30});a.setTextStyle(m.style,r,{text:v}),m.attr(this._yearTextPositionControl(m,d[s],n,s,o)),i.add(m)}},_monthTextPositionControl:function(t,e,n,i,r){var a="left",o="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(a="center"),"start"===i&&(o="bottom")):(s+=r,e&&(o="middle"),"start"===i&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),s=i.get("margin"),u=i.get("position"),c=i.get("align"),h=[this._tlpoints,this._blpoints];r.isString(o)&&(o=l[o.toUpperCase()]||[]);var d="start"===u?0:1,f="horizontal"===e?0:1;s="start"===u?-s:s;for(var p="center"===c,g=0;g1?(g.width=c,g.height=c/f):(g.height=c,g.width=c*f),g.y=u[1]-g.height/2,g.x=u[0]-g.width/2}else a=t.getBoxLayoutParams(),a.aspect=f,g=s.getLayoutRect(a,{width:h,height:d});this.setViewRect(g.x,g.y,g.width,g.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function d(t,e){a.each(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}var f={dimensions:o.prototype.dimensions,create:function(t,e){var n=[];t.eachComponent("geo",(function(t,i){var r=t.get("map"),a=t.get("aspectScale"),s=!0,l=c.retrieveMap(r);l&&l[0]&&"svg"===l[0].type?(null==a&&(a=1),s=!1):null==a&&(a=.75);var u=new o(r+i,r,t.get("nameMap"),s);u.aspectScale=a,u.zoomLimit=t.get("scaleLimit"),n.push(u),d(u,t),t.coordinateSystem=u,u.model=t,u.resize=h,u.resize(t,e)})),t.eachSeries((function(t){var e=t.get("coordinateSystem");if("geo"===e){var i=t.get("geoIndex")||0;t.coordinateSystem=n[i]}}));var i={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}})),a.each(i,(function(t,i){var r=a.map(t,(function(t){return t.get("nameMap")})),s=new o(i,i,a.mergeAll(r));s.zoomLimit=a.retrieve.apply(null,a.map(t,(function(t){return t.get("scaleLimit")}))),n.push(s),s.resize=h,s.aspectScale=t[0].get("aspectScale"),s.resize(t[0],e),a.each(t,(function(t){t.coordinateSystem=s,d(s,t)}))})),n},getFilledRegions:function(t,e,n){for(var i=(t||[]).slice(),r=a.createHashMap(),o=0;os&&(e[1-a]=e[a]+f.sign*s),e}function i(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function r(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}t.exports=n},ef97:function(t,e,n){var i=n("3eba");n("217b"),n("f17f");var r=n("7f96"),a=n("87c3"),o=n("fdde");n("01ed"),i.registerVisual(r("line","circle","line")),i.registerLayout(a("line")),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,o("line"))},ef97a:function(t,e,n){var i=n("3eba");n("2163"),n("6cd8"),n("bf9b");var r=n("7f96"),a=n("ca29");i.registerVisual(r("tree","circle")),i.registerLayout(a)},f069:function(t,e,n){"use strict";var i=n("1c0b"),r=function(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)};t.exports.f=function(t){return new r(t)}},f123:function(t,e,n){var i=n("9f82"),r=i.prepareDataCoordInfo,a=i.getStackedOnPoint;function o(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}function s(t,e,n,i,s,l,u,c){for(var h=o(t,e),d=[],f=[],p=[],g=[],v=[],m=[],y=[],x=r(s,e,u),_=r(l,t,c),b=0;b=0;o--){var s=n[o].dimension,l=t.dimensions[s],u=t.getDimensionInfo(l);if(i=u&&u.coordDim,"x"===i||"y"===i){a=n[o];break}}if(a){var h=e.getAxis(i),d=r.map(a.stops,(function(t){return{coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}})),f=d.length,p=a.outerColors.slice();f&&d[0].coord>d[f-1].coord&&(d.reverse(),p.reverse());var g=10,v=d[0].coord-g,m=d[f-1].coord+g,y=m-v;if(y<.001)return"transparent";r.each(d,(function(t){t.offset=(t.coord-v)/y})),d.push({offset:f?d[f-1].offset:.5,color:p[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:p[0]||"transparent"});var x=new c.LinearGradient(0,0,0,0,d,!0);return x[i]=v,x[i+"2"]=m,x}}}function C(t,e,n){var i=t.get("showAllSymbol"),a="auto"===i;if(!i||a){var o=n.getAxesByScale("ordinal")[0];if(o&&(!a||!D(o,e))){var s=e.mapDimension(o.dim),l={};return r.each(o.getViewLabels(),(function(t){l[t.tickValue]=1})),function(t){return!l.hasOwnProperty(e.get(s,t))}}}}function D(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;oi)return!1;return!0}function L(t,e,n){if("cartesian2d"===t.type){var i=t.getBaseAxis().isHorizontal(),r=_(t,e,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return b(t,e,n)}var P=g.extend({type:"line",init:function(){var t=new c.Group,e=new s;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,a=this.group,o=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),c="polar"===i.type,h=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),y=!l.isEmpty(),x=l.get("origin"),_=m(i,o,x),b=A(i,o,_),S=t.get("showSymbol"),D=S&&!c&&C(t,o,i),P=this._data;P&&P.eachItemGraphicEl((function(t,e){t.__temp&&(a.remove(t),P.setItemGraphicEl(e,null))})),S||d.remove(),a.add(g);var k,O=!c&&t.get("step");i&&i.getArea&&t.get("clip",!0)&&(k=i.getArea(),null!=k.width?(k.x-=.1,k.y-=.1,k.width+=.2,k.height+=.2):k.r0&&(k.r0-=.5,k.r1+=.5)),this._clipShapeForSymbol=k,f&&h.type===i.type&&O===this._step?(y&&!p?p=this._newPolygon(u,b,i,v):p&&!y&&(g.remove(p),p=this._polygon=null),g.setClipPath(L(i,!1,t)),S&&d.updateData(o,{isIgnore:D,clipShape:k}),o.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),w(this._stackedOnPoints,b)&&w(this._points,u)||(v?this._updateAnimation(o,b,i,n,O,x):(O&&(u=I(u,i,O),b=I(b,i,O)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:b})))):(S&&d.updateData(o,{isIgnore:D,clipShape:k}),O&&(u=I(u,i,O),b=I(b,i,O)),f=this._newPolyline(u,i,v),y&&(p=this._newPolygon(u,b,i,v)),g.setClipPath(L(i,!0,t)));var E=T(o,i)||o.getVisual("color");f.useStyle(r.defaults(s.getLineStyle(),{fill:"none",stroke:E,lineJoin:"bevel"}));var N=t.get("smooth");if(N=M(t.get("smooth")),f.setShape({smooth:N,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var R=o.getCalculationInfo("stackedOnSeries"),z=0;p.useStyle(r.defaults(l.getAreaStyle(),{fill:E,opacity:.7,lineJoin:"bevel"})),R&&(z=M(R.get("smooth"))),p.setShape({smooth:N,stackedOnSmooth:z,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=i,this._stackedOnPoints=b,this._points=u,this._step=O,this._valueOrigin=x},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=h.queryDataIndex(r,i);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;o=new l(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else g.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=h.queryDataIndex(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else g.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new f({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new p({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=u(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),d=h.current,f=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(r&&(d=I(h.current,n,r),f=I(h.stackedOnCurrent,n,r),p=I(h.next,n,r),g=I(h.stackedOnNext,n,r)),S(d,p)>3e3||s&&S(f,g)>3e3)return o.setShape({points:p}),void(s&&s.setShape({points:p,stackedOnPoints:g}));o.shape.__points=h.current,o.shape.points=d,c.updateProps(o,{shape:{points:p}},l),s&&(s.setShape({points:d,stackedOnPoints:f}),c.updateProps(s,{shape:{points:p,stackedOnPoints:g}},l));for(var v=[],m=h.status,y=0;ys)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&u(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};function u(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}i.registerPreprocessor(o)},f31f:function(t,e,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("6d8b"),o=n("2b8c"),s=n("4319"),l=["#ddd"],u=r.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;!e&&o.replaceVisualOption(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:l},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){t&&(this.areas=a.map(t,(function(t){return c(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=c(this.option,t),this.brushType=this.brushOption.brushType}});function c(t,e){return a.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new s(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var h=u;t.exports=h},f47d:function(t,e,n){var i=n("6d8b"),r=(i.assert,i.isArray),a=n("4e08");a.__DEV__;function o(t){return new s(t)}function s(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var l=s.prototype;l.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,s=f(this._modBy),l=this._modDataCount||0,u=f(t&&t.modBy),d=t&&t.modDataCount||0;function f(t){return!(t>=1)&&(t=1),t}s===u&&l===d||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=h(this,i)),this._modBy=u,this._modDataCount=d;var p=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var g=this._dueIndex,v=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!i&&(o||g1&&i>0?s:o}};return a;function o(){return e=t?null:a=0;m--){var y=v[m],x=y.node,_=y.width,b=y.text;g>p.width&&(g-=_-c,_=c,b=null);var w=new i.Polygon({shape:{points:d(l,0,_,h,m===v.length-1,0===m)},style:a.defaults(n.getItemStyle(),{lineJoin:"bevel",text:b,textFill:o.getTextColor(),textFont:o.getFont()}),z:10,onclick:a.curry(s,x)});this.group.add(w),f(w,t,x),l+=_+u}},remove:function(){this.group.removeAll()}};var p=h;t.exports=p},f6ed:function(t,e,n){var i=n("6d8b");function r(t,e){var n={};return i.each(t,(function(t){t.each(t.mapDimension("value"),(function(e,i){var r="ec-"+t.getName(i);n[r]=n[r]||[],isNaN(e)||n[r].push(e)}))})),t[0].map(t[0].mapDimension("value"),(function(i,r){for(var a,o="ec-"+t[0].getName(r),s=0,l=1/0,u=-1/0,c=n[o].length,h=0;hi||l.newline?(a=0,c=v,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);h=o+m,h>r||l.newline?(a+=s+n,o=0,h=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=c+n:o=h+n)}))}var d=h,f=i.curry(h,"vertical"),p=i.curry(h,"horizontal");function g(t,e,n){var i=e.width,r=e.height,a=o(t.x,i),l=o(t.y,r),u=o(t.x2,i),c=o(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=i),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(c)||isNaN(parseFloat(t.y2)))&&(c=r),n=s.normalizeCssArray(n||0),{width:Math.max(u-a-n[1]-n[3],0),height:Math.max(c-l-n[0]-n[2],0)}}function v(t,e,n){n=s.normalizeCssArray(n||0);var i=e.width,a=e.height,l=o(t.left,i),u=o(t.top,a),c=o(t.right,i),h=o(t.bottom,a),d=o(t.width,i),f=o(t.height,a),p=n[2]+n[0],g=n[1]+n[3],v=t.aspect;switch(isNaN(d)&&(d=i-c-g-l),isNaN(f)&&(f=a-h-p-u),null!=v&&(isNaN(d)&&isNaN(f)&&(v>i/a?d=.8*i:f=.8*a),isNaN(d)&&(d=v*f),isNaN(f)&&(f=d/v)),isNaN(l)&&(l=i-c-d-g),isNaN(u)&&(u=a-h-f-p),t.left||t.right){case"center":l=i/2-d/2-n[3];break;case"right":l=i-d-g;break}switch(t.top||t.bottom){case"middle":case"center":u=a/2-f/2-n[0];break;case"bottom":u=a-f-p;break}l=l||0,u=u||0,isNaN(d)&&(d=i-g-l-(c||0)),isNaN(f)&&(f=a-p-u-(h||0));var m=new r(l+n[3],u+n[0],d,f);return m.margin=n,m}function m(t,e,n,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if(s||l){var c;if("raw"===u)c="group"===t.type?new r(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(c=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();c=c.clone(),c.applyTransform(h)}e=v(i.defaults({width:c.width,height:c.height},e),n,a);var d=t.position,f=s?e.x-c.x:0,p=l?e.y-c.y:0;t.attr("position","raw"===u?[f,p]:[d[0]+f,d[1]+p])}}function y(t,e){return null!=t[c[e][0]]||null!=t[c[e][1]]&&null!=t[c[e][2]]}function x(t,e,n){!i.isObject(n)&&(n={});var r=n.ignoreSize;!i.isArray(r)&&(r=[r,r]);var a=s(c[0],0),o=s(c[1],1);function s(n,i){var a={},o=0,s={},c=0,d=2;if(l(n,(function(e){s[e]=t[e]})),l(n,(function(t){u(e,t)&&(a[t]=s[t]=e[t]),h(a,t)&&o++,h(s,t)&&c++})),r[i])return h(e,n[1])?s[n[2]]=null:h(e,n[2])&&(s[n[1]]=null),s;if(c!==d&&o){if(o>=d)return a;for(var f=0;ff[1]?-1:1,g=["start"===s?f[0]-p*d:"end"===s?f[1]+p*d:(f[0]+f[1])/2,P(s)?t.labelOffset+c*d:0],v=e.get("nameRotate");null!=v&&(v=v*b/180),P(s)?i=A(t.rotation,null!=v?v:t.rotation,c):(i=I(t,s,v||0,f),a=t.axisNameAvailableWidth,null!=a&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var m=h.getFont(),y=e.get("nameTruncate",!0)||{},x=y.ellipsis,_=r(t.nameTruncateMaxWidth,y.maxWidth,a),w=null!=x&&null!=_?l.truncateText(n,_,m,x,{minChar:2,placeholder:y.placeholder}):n,S=e.get("tooltip",!0),C=e.mainType,D={componentType:C,name:n,$vars:["name"]};D[C+"Index"]=e.componentIndex;var L=new u.Text({anid:"name",__fullText:n,__truncatedText:w,position:g,rotation:i.rotation,silent:T(e),z2:1,tooltip:S&&S.show?o({content:n,formatter:function(){return n},formatterParams:D},S):null});u.setTextStyle(L.style,h,{text:w,textFont:m,textFill:h.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:h.get("align")||i.textAlign,textVerticalAlign:h.get("verticalAlign")||i.textVerticalAlign}),e.get("triggerEvent")&&(L.eventData=M(e),L.eventData.targetType="axisName",L.eventData.name=n),this._dumbGroup.add(L),L.updateTransform(),this.group.add(L),L.decomposeTransform()}}},M=w.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},A=w.innerTextLayout=function(t,e,n){var i,r,a=f(e-t);return d(a)?(r=n>0?"top":"bottom",i="center"):d(a-b)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&a0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}};function I(t,e,n,i){var r,a,o=f(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return d(o-b/2)?(a=l?"bottom":"top",r="center"):d(o-1.5*b)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*b&&o>b/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}var T=w.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function C(t,e,n){if(!_(t.axis)){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(D(a),D(u)):L(a,o)&&(i?(D(o),D(c)):(D(a),D(u))),!1===r?(D(s),D(h)):L(l,s)&&(r?(D(l),D(d)):(D(s),D(h)))}}function D(t){t&&(t.ignore=!0)}function L(t,e,n){var i=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(i&&r){var a=v.identity([]);return v.rotate(a,a,-t.rotation),i.applyTransform(v.mul([],a,t.getLocalTransform())),r.applyTransform(v.mul([],a,e.getLocalTransform())),i.intersect(r)}}function P(t){return"middle"===t||"center"===t}function k(t,e,n,i,r){for(var a=[],o=[],s=[],l=0;l",n=0;n "+t[n].seriesName+":  "+t[n].value+"
";return e},a=function(t){"auto"==i[t.seriesIndex].digit?t.value=j.multiply(+t.value,i[t.seriesIndex].ratio)+i[t.seriesIndex].suffix:t.value=j.multiply(+t.value,i[t.seriesIndex].ratio).toFixed(i[t.seriesIndex].digit)+i[t.seriesIndex].suffix;var e=t.seriesName+"
    "+t.name+":  "+t.value;return e},o=new Map([["item",a],["axis",r]]);return n.formatter=o.get(n.trigger),n}),N=E,R=(n("fb6a"),function(t,e){var n=t[1],i={show:!0,name:"",nameTextStyle:{color:"#333",fontStyle:"normal",fontWeight:"normal",fontSize:12},nameLocation:"end",inverse:!1,interval:null,nameGap:15,nameRotate:null,axisLine:{show:!0,lineStyle:{color:"#333",width:1}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1,type:"solid",color:null}},axisLabel:{show:!0,rotate:0,formatter:null},min:null,max:null,splitLine:{show:!0,lineStyle:{color:"#ccc",width:1,type:"solid"},interval:"auto"},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},r=function(t,i){var r=e[i];return t.show=r.show,t.name=r.title.text,W(r.title,t,"nameTextStyle"),t.nameLocation=r.title.fzPosition,t.inverse=r.inverse,t.interval=r.tickLabel.optimize,t.nameGap=r.title.rotate,t.axisLine.show=r.tickLine.show,t.axisLine.lineStyle=U(r.tickLine.width,r.tickLine.color),t.axisTick.show=r.tick.show,t.axisTick.lineStyle=U(r.tick.width,r.tick.color),t.axisTick.inside="inside"==r.tick.position,t.axisTick.length=r.tick.length,t.axisLabel.show=r.tickLabel.show,t.axisLabel.rotate=r.tickLabel.rotate,"bar"==n&&"x"==i.slice(0,1)||"bar"!=n&&"y"==i.slice(0,1)?(t.min=r.tickLabel.min,t.max=r.tickLabel.max,t.axisLabel.formatter=function(t){return"auto"==r.tickLabel.digit?r.tickLabel.prefix+j.multiply(+t,r.tickLabel.ratio)+r.tickLabel.suffix:r.tickLabel.prefix+j.multiply(+t,r.tickLabel.ratio).toFixed(r.tickLabel.digit)+r.tickLabel.suffix}):t.axisLabel.formatter=function(t){return r.tickLabel.prefix+t+r.tickLabel.suffix},t.splitLine.show=r.netLine.show,t.splitLine.lineStyle=U(r.netLine.width,r.netLine.color,r.netLine.type),t.splitLine.interval=Z(r.netLine.interval.value,r.netLine.interval.cusNumber),t.splitArea.show=r.netArea.show,t.splitArea.interval=Z(r.netArea.interval.value,r.netArea.interval.cusNumber),t.splitArea.areaStyle.color=["auto"==r.netArea.colorOne?"rgba(250,250,250,0.3)":r.netArea.colorOne,"auto"==r.netArea.colorTwo?"rgba(200,200,200,0.3)":r.netArea.colorTwo],t};return{xAxisUp:r(Object(h["b"])(i),"xAxisUp"),xAxisDown:r(Object(h["b"])(i),"xAxisDown"),yAxisLeft:r(Object(h["b"])(i),"yAxisLeft"),yAxisRight:r(Object(h["b"])(i),"yAxisRight")}}),z=R,B=function(t){var e=t.chartAllType.split("|"),n=(e[0],e[1]),i=(e[2],P(e,t.defaultOption.title,t.defaultOption.subtitle)),r=O(e,t.defaultOption.legend),a=N(e,t.defaultOption.tooltip),o=z(e,t.defaultOption.axis);o.xAxisDown.data=t.defaultOption.axis.xAxisDown.data;var s={title:Object(l["a"])({},i),tooltip:Object(l["a"])({},a),legend:Object(l["a"])({},r),xAxis:[Object(l["a"])({},o.xAxisDown),Object(l["a"])({},o.xAxisUp)],yAxis:[o.yAxisLeft,o.yAxisRight],series:t.defaultOption.series};return"pie"==n&&(delete s.xAxis,delete s.yAxis),console.dir(s),console.dir(JSON.stringify(s)),s},V=B,G=n("313e"),F=function(t,e,n){if(void 0==t||void 0==e)return t;var i=e.split("/"),r=t.defaultOption;function a(t){return 0!=i.length?a(t[i.shift()]):(Object.assign(t,n),t)}return a(r),t},H=function(t,e){var n=t.chart_id,i=t.chartOptions,r=i.chartAllType.split("|"),a=r[0],o=document.getElementById(n);if("echarts"===a){var s=V(i),l=G.getInstanceByDom(o);null==l&&(l=G.init(o)),l.setOption(s,!0),setTimeout((function(){G.getInstanceById(o.getAttribute("_echarts_instance_")).resize()}),0)}},W=function(t,e,n,i){var r=["bold","vertical","italic"];t.label.fontGroup.forEach((function(a){if(r.includes(a))switch(a){case"bold":e[n].fontWeight=a;break;case"vertical":e[i]=t.text.replace(/\B/g,"\n");break;case"italic":e[n].fontStyle=a;break}})),e[n].color=t.label.color,e[n].fontSize=Z(t.label.fontSize,t.label.cusFontSize)},j=function(){function t(t){return Math.floor(t)===t}function e(e){var n={times:1,num:0};if(t(e))return n.num=e,n;var i=e+"",r=i.indexOf("."),a=i.substr(r+1).length,o=Math.pow(10,a),s=parseInt(e*o+.5,10);return n.times=o,n.num=s,n}function n(t,i,r){var a=e(t),o=e(i),s=a.num,l=o.num,u=a.times,c=o.times,h=u>c?u:c,d=null;switch(r){case"add":return d=u===c?s+l:u>c?s+l*(u/c):s*(c/u)+l,d/h;case"subtract":return d=u===c?s-l:u>c?s-l*(u/c):s*(c/u)-l,d/h;case"multiply":return d=s*l/(u*c),d;case"divide":return function(){var t=s/l,e=c/u;return n(t,e,"multiply")}()}}function i(t,e){return n(t,e,"add")}function r(t,e){return n(t,e,"subtract")}function a(t,e){return n(t,e,"multiply")}function o(t,e){return n(t,e,"divide")}return{add:i,subtract:r,multiply:a,divide:o}}(),U=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"solid";return{width:t,color:e,type:n}},Z=function(t,e){return"custom"!=t?t:e},Y=(o={},Object(D["a"])(o,S,(function(t,e){t.chartLists[e].active=!0,t.currentChartIndex=e})),Object(D["a"])(o,M,(function(t,e){t.chartLists[e].active=!1})),Object(D["a"])(o,A,(function(t,e){console.info("updateObj",e);var n=e.router,i=e.updateObj,r=t.chartLists[t.currentChartIndex].chartOptions;F(r,n,i)})),o),X=n("2ef0"),q={chartLists:[{chart_id:"chart_a_001",active:!1,chartOptions:Object(X["merge"])(Object(X["cloneDeep"])(d["b"]),{defaultOption:{title:{text:"默认标题"}}})},{chart_id:"chart_a_002",active:!1,chartOptions:Object(X["merge"])(Object(X["cloneDeep"])(d["b"]),{defaultOption:{title:{text:"默认标题"}}})},{chart_id:"chart_a_003",active:!1,chartOptions:Object(X["merge"])(Object(X["cloneDeep"])(d["b"]),{defaultOption:{title:{text:"默认标题"}}})}],currentChartIndex:null},K={namespaced:!0,actions:T,getters:C,mutations:Y,state:q},J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chartRender"})},Q=[],tt={name:"ChartRender",props:{active:{type:Boolean,default:!1},chart_id:{type:String,default:""},chartOptions:{type:Object,default:null}},watch:{chartOptions:{handler:function(t){!0===this.active&&this.renderCharts(t),console.dir(JSON.stringify(t))},immediate:!0,deep:!0}},mounted:function(){var t=this;this.$nextTick((function(){var e=t.chartOptions;t.renderCharts(e)}))},methods:{renderCharts:function(t){var e={chart_id:this.chart_id,chartOptions:t};H(e,this.$el)}}},et=tt,nt=Object(_["a"])(et,J,Q,!1,null,"296f5725",null),it=nt.exports,rt=(n("7db0"),n("c740"),n("8bbf")),at=n.n(rt),ot=n("2f62"),st="ENABLE_ACTIVE",lt="DISABLE_ACTIVE",ut="ENABLE_DRAGGABLE",ct="DISABLE_DRAGGABLE",ht="ENABLE_RESIZABLE",dt="DISABLE_RESIZABLE",ft="ENABLE_PARENT_LIMITATION",pt="DISABLE_PARENT_LIMITATION",gt="ENABLE_SNAP_TO_GRID",vt="DISABLE_SNAP_TO_GRID",mt="ENABLE_ASPECT",yt="DISABLE_ASPECT",xt="ENABLE_X_AXIS",_t="ENABLE_Y_AXIS",bt="ENABLE_BOTH_AXIS",wt="ENABLE_NONE_AXIS",St="CHANGE_ZINDEX",Mt="CHANGE_MINW",At="CHANGE_MINH",It="CHANGE_WIDTH",Tt="CHANGE_HEIGHT",Ct="CHANGE_TOP",Dt="CHANGE_LEFT",Lt={ENABLE_ACTIVE:st,DISABLE_ACTIVE:lt,ENABLE_DRAGGABLE:ut,DISABLE_DRAGGABLE:ct,ENABLE_RESIZABLE:ht,DISABLE_RESIZABLE:dt,ENABLE_PARENT_LIMITATION:ft,DISABLE_PARENT_LIMITATION:pt,ENABLE_SNAP_TO_GRID:gt,DISABLE_SNAP_TO_GRID:vt,ENABLE_ASPECT:mt,DISABLE_ASPECT:yt,ENABLE_X_AXIS:xt,ENABLE_Y_AXIS:_t,ENABLE_NONE_AXIS:wt,ENABLE_BOTH_AXIS:bt,CHANGE_ZINDEX:St,CHANGE_MINW:Mt,CHANGE_MINH:At,CHANGE_WIDTH:It,CHANGE_HEIGHT:Tt,CHANGE_TOP:Ct,CHANGE_LEFT:Dt},Pt={setActive:function(t,e){for(var n=t.commit,i=t.state,r=e.id,a=0,o=i.rects.length;a'})}function Ft(t,e){var n=Object(h["c"])("chart");d["b"].defaultOption.series=[];var i=10*Math.random();d["b"].chartAllType=i>5?"echarts|pie|default":"echarts|line|default";var r=Ht(d["b"],n,d["b"].chartAllType,e),a=document.createElement("div");a.id="render"+n;var o='',s=n+"_c",l=$(Object(h["h"])(o,{id:s,addclass:"jfgrid-data-visualization-chart",title:"图表生成",content:""})).appendTo($(t));l.find(".jfgrid-modal-dialog-content").attr("id",n),$(".jfgrid-modal-dialog-content").append(a),Vt.state.chartSetting.currentChartIndex=Vt.state.chartSetting.chartLists.length,Vt.state.chartSetting.chartLists.push({chart_id:n,active:!0,chartOptions:Object(h["b"])(r)}),console.dir(r),new at.a({el:"#render"+n,store:Vt,data:function(){return{chart_id:n}},computed:{options:function(){var t=this;return console.dir(this.chart_id),Vt.state.chartSetting.chartLists.find((function(e){return e.chart_id==t.chart_id})).chartOptions},active:function(){var t=this;return Vt.state.chartSetting.chartLists.find((function(e){return e.chart_id==t.chart_id})).active}},template:''});var u=document.getElementById(n),c=document.getElementById(n+"_c");return{container:c,render:u}}function Ht(t,e,n,i,r,a,o,s,l){var u={},c=n.split("|"),d=c[0],f=c[1],p=c[2];u.chart_id=e,u.chartAllType=n,u.chartPro=d,u.chartType=f,u.chartStyle=p,u.height=a,u.width=o,u.left=s,u.top=l;var g=t.defaultOption;u.chartData=i;var v=Object(h["g"])(i),m=v[0],y=v[1],x=!1;u.rangeColCheck=y,u.rangeRowCheck=m,u.rangeConfigCheck=x;var _=Object(h["f"])(i,y,m);u.rangeSplitArray=_;var b=Object(h["d"])(i,_,d,f,p);u.chartDataCache=b;var w=Object(h["e"])(b.series[0].length);u.chartDataSeriesOrder=w,u.chartTheme=r;var S=Object(h["a"])(g,b,w,d,f,p);return u.defaultOption=S,u}function Wt(t){var e=Vt.state.chartSetting.chartLists.findIndex((function(e){return e.chart_id==t}));Vt.state.chartSetting.currentChartIndex=e}var jt=[w,it],Ut=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.componentInstalled||(jt.map((function(t){e.component(t.name,t)})),t.componentInstalled=!0),t.storeRegistered||(n.store?(n.store.registerModule("chartSetting",K),t.storeRegistered=!0):console.log("Please provide a store!!"))};"undefined"!==typeof window&&window.Vue&&Ut(window.Vue);var Zt=Object(l["a"])(Object(l["a"])({install:Ut},jt),{},{initChart:Gt,createChart:Ft,highlightChart:Wt});e["default"]=Zt},fb6a:function(t,e,n){"use strict";var i=n("23e7"),r=n("861d"),a=n("e8b5"),o=n("23cb"),s=n("50c4"),l=n("fc6a"),u=n("8418"),c=n("b622"),h=n("1dde"),d=n("ae40"),f=h("slice"),p=d("slice",{ACCESSORS:!0,0:0,1:2}),g=c("species"),v=[].slice,m=Math.max;i({target:"Array",proto:!0,forced:!f||!p},{slice:function(t,e){var n,i,c,h=l(this),d=s(h.length),f=o(t,d),p=o(void 0===e?d:e,d);if(a(h)&&(n=h.constructor,"function"!=typeof n||n!==Array&&!a(n.prototype)?r(n)&&(n=n[g],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return v.call(h,f,p);for(i=new(void 0===n?Array:n)(m(p-f,0)),c=0;fv}function V(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function G(t,e,n,i){var r=new o.Group;return r.add(new o.Rect({name:"main",style:j(n),silent:!0,draggable:!0,cursor:"move",drift:u(t,e,r,"nswe"),ondragend:u(z,e,{isEnd:!0})})),c(i,(function(n){r.add(new o.Rect({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:u(t,e,r,n),ondragend:u(z,e,{isEnd:!0})}))})),r}function F(t,e,n,i){var r=i.brushStyle.lineWidth||0,a=f(r,m),o=n[0][0],s=n[1][0],l=o-r/2,u=s-r/2,c=n[0][1],h=n[1][1],d=c-a+r/2,p=h-a+r/2,g=c-o,v=h-s,y=g+r,x=v+r;W(t,e,"main",o,s,g,v),i.transformable&&(W(t,e,"w",l,u,a,x),W(t,e,"e",d,u,a,x),W(t,e,"n",l,u,y,a),W(t,e,"s",l,p,y,a),W(t,e,"nw",l,u,a,a),W(t,e,"ne",d,u,a,a),W(t,e,"sw",l,p,a,a),W(t,e,"se",d,p,a,a))}function H(t,e){var n=e.__brushOption,i=n.transformable,r=e.childAt(0);r.useStyle(j(n)),r.attr({silent:!i,cursor:i?"move":"default"}),c(["w","e","n","s","se","sw","ne","nw"],(function(n){var r=e.childOfName(n),a=Y(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?_[a]+"-resize":null})}))}function W(t,e,n,i,r,a,o){var s=e.childOfName(n);s&&s.setShape(J(K(t,e,[[i,r],[i+a,r+o]])))}function j(t){return r.defaults({strokeNoScale:!0},t.brushStyle)}function U(t,e,n,i){var r=[d(t,n),d(e,i)],a=[f(t,n),f(e,i)];return[[r[0],a[0]],[r[1],a[1]]]}function Z(t){return o.getTransform(t.group)}function Y(t,e){if(e.length>1){e=e.split("");var n=[Y(t,e[0]),Y(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}var i={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"};n=o.transformDirection(i[e],Z(t));return r[n]}function X(t,e,n,i,r,a,o,s){var l=i.__brushOption,u=t(l.range),h=$(n,a,o);c(r.split(""),(function(t){var e=x[t];u[e[0]][e[1]]+=h[e[0]]})),l.range=e(U(u[0][0],u[1][0],u[0][1],u[1][1])),k(n,i),z(n,{isEnd:!1})}function q(t,e,n,i,r){var a=e.__brushOption.range,o=$(t,n,i);c(a,(function(t){t[0]+=o[0],t[1]+=o[1]})),k(t,e),z(t,{isEnd:!1})}function $(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),a=i.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function K(t,e,n){var i=N(t,e);return i&&!0!==i?i.clipPath(n,t._transform):r.clone(n)}function J(t){var e=d(t[0][0],t[1][0]),n=d(t[0][1],t[1][1]),i=f(t[0][0],t[1][0]),r=f(t[0][1],t[1][1]);return{x:e,y:n,width:i-e,height:r-n}}function Q(t,e,n){if(t._brushType&&!ot(t,e)){var i=t._zr,r=t._covers,a=E(t,e,n);if(!t._dragging)for(var o=0;oi.getWidth()||n<0||n>i.getHeight()}var st={lineX:lt(0),lineY:lt(1),rect:{createCover:function(t,e){return G(u(X,(function(t){return t}),(function(t){return t})),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=V(t);return U(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){F(t,e,n,i)},updateCommon:H,contain:et},polygon:{createCover:function(t,e){var n=new o.Group;return n.add(new o.Polyline({name:"main",style:j(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new o.Polygon({name:"main",draggable:!0,drift:u(q,t,e),ondragend:u(z,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:K(t,e,n)})},updateCommon:H,contain:et}};function lt(t){return{createCover:function(e,n){return G(u(X,(function(e){var n=[e,[0,100]];return t&&n.reverse(),n}),(function(e){return e[t]})),e,n,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var n=V(e),i=d(n[0][t],n[1][t]),r=f(n[0][t],n[1][t]);return[i,r]},updateCoverShape:function(e,n,i,r){var a,o=N(e,n);if(!0!==o&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,a];t&&l.reverse(),F(e,n,l,r)},updateCommon:H,contain:et}}var ut=S;t.exports=ut},fd27:function(t,e,n){var i=n("9273"),r=n("a991"),a=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new i,this._angleAxis=new r,this._radiusAxis.polar=this._angleAxis.polar=this};a.prototype={type:"polar",axisPointerEnabled:!0,constructor:a,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);i.inverse?a=o-360:o=a+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;var l=Math.atan2(-n,e)/Math.PI*180,u=lo)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],n=t[1]/180*Math.PI,i=Math.cos(n)*e+this.cx,r=-Math.sin(n)*e+this.cy;return[i,r]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),n=e.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,a=this.r,o=this.r0;return r<=a*a&&r>=o*o}}}};var o=a;t.exports=o},fd63:function(t,e,n){var i=n("42e5"),r=n("6d8b"),a=r.isFunction,o={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),r=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(r),s=!a(o)||o instanceof i?null:o;o&&!s||(o=t.getColorFromPalette(t.name,null,e.getSeriesCount())),n.setVisual("color",o);var l=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),u=t.get(l);if(n.setVisual("borderColor",u),!e.isSeriesFiltered(t)){s&&n.each((function(e){n.setItemVisual(e,"color",s(t.getDataParams(e)))}));var c=function(t,e){var n=t.getItemModel(e),i=n.get(r,!0),a=n.get(l,!0);null!=i&&t.setItemVisual(e,"color",i),null!=a&&t.setItemVisual(e,"borderColor",a)};return{dataEach:n.hasItemOption?c:null}}}};t.exports=o},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var i=n("4930");t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fdde:function(t,e){var n={average:function(t){for(var e=0,n=0,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n1)"string"===typeof o?l=n[o]:"function"===typeof o&&(l=o),l&&t.setData(a.downSample(a.mapDimension(c.dim),1/f,l,i))}}}}t.exports=r},fe21:function(t,e,n){var i=n("e86a"),r=n("2306"),a=["textStyle","color"],o={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(a):null)},getFont:function(){return r.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return i.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}};t.exports=o},fea9:function(t,e,n){var i=n("da84");t.exports=i.Promise},febc:function(t,e,n){var i=n("6d8b"),r=n("4f85"),a=n("e468"),o=a.seriesModelMixin,s=r.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});i.mixin(s,o,!0);var l=s;t.exports=l},fecb:function(t,e,n){var i=n("6d8b"),r=n("2145"),a=n("29a8"),o=a.toolbox.brush;function s(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}s.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:i.clone(o.title)};var l=s.prototype;l.render=l.updateView=function(t,e,n){var r,a,o;e.eachComponent({mainType:"brush"},(function(t){r=t.brushType,a=t.brushOption.brushMode||"single",o|=t.areas.length})),this._brushType=r,this._brushMode=a,i.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===a:"clear"===e?o:e===r)?"emphasis":"normal")}))},l.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return i.each(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},l.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},r.register("brush",s);var u=s;t.exports=u},ff2e:function(t,e,n){var i=n("6d8b"),r=n("2306"),a=n("e86a"),o=n("eda2"),s=n("1687"),l=n("697e"),u=n("fab2");function c(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle(),e.fill=null):"shadow"===n&&(e=i.getAreaStyle(),e.stroke=null),e}function h(t,e,n,i,r){var s=n.get("value"),l=f(s,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),u=n.getModel("label"),c=o.normalizeCssArray(u.get("padding")||0),h=u.getFont(),p=a.getBoundingRect(l,h),g=r.position,v=p.width+c[1]+c[3],m=p.height+c[0]+c[2],y=r.align;"right"===y&&(g[0]-=v),"center"===y&&(g[0]-=v/2);var x=r.verticalAlign;"bottom"===x&&(g[1]-=m),"middle"===x&&(g[1]-=m/2),d(g,v,m,i);var _=u.get("backgroundColor");_&&"auto"!==_||(_=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:v,height:m,r:u.get("borderRadius")},position:g.slice(),style:{text:l,textFont:h,textFill:u.getTextColor(),textPosition:"inside",textPadding:c,fill:_,stroke:u.get("borderColor")||"transparent",lineWidth:u.get("borderWidth")||0,shadowBlur:u.get("shadowBlur"),shadowColor:u.get("shadowColor"),shadowOffsetX:u.get("shadowOffsetX"),shadowOffsetY:u.get("shadowOffsetY")},z2:10}}function d(t,e,n,i){var r=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,a)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function f(t,e,n,r,a){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:a.precision}),s=a.formatter;if(s){var u={value:l.getAxisRawValue(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};i.each(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&u.seriesData.push(r)})),i.isString(s)?o=s.replace("{value}",o):i.isFunction(s)&&(o=s(u))}return o}function p(t,e,n){var i=s.create();return s.rotate(i,i,n.rotation),s.translate(i,i,n.position),r.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function g(t,e,n,i,r,a){var o=u.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),h(e,i,r,a,{position:p(i.axis,t,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function v(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function m(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function y(t,e,n,i,r,a){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:a,clockwise:!0}}e.buildElStyle=c,e.buildLabelElOption=h,e.getValueLabel=f,e.getTransformedPosition=p,e.buildCartesianSingleLabelElOption=g,e.makeLineShape=v,e.makeRectShape=m,e.makeSectorShape=y}})})); +//# sourceMappingURL=chartmix.umd.min.js.map \ No newline at end of file diff --git a/src/expendPlugins/chart/chartmix.umd.min.js.map b/src/expendPlugins/chart/chartmix.umd.min.js.map new file mode 100644 index 000000000..237fdcfe5 --- /dev/null +++ b/src/expendPlugins/chart/chartmix.umd.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://chartmix/webpack/universalModuleDefinition","webpack://chartmix/webpack/bootstrap","webpack://chartmix/./node_modules/echarts/lib/chart/parallel/ParallelSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/PiecewiseView.js","webpack://chartmix/./node_modules/echarts/lib/component/tooltip.js","webpack://chartmix/./node_modules/echarts/lib/chart/funnel/FunnelSeries.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/prepareCustom.js","webpack://chartmix/./node_modules/core-js/internals/to-string-tag-support.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/Geo.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js","webpack://chartmix/./node_modules/echarts/lib/component/gridSimple.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/roamHelper.js","webpack://chartmix/./node_modules/echarts/lib/component/dataset.js","webpack://chartmix/./node_modules/core-js/internals/function-bind-context.js","webpack://chartmix/./node_modules/zrender/lib/core/timsort.js","webpack://chartmix/./node_modules/core-js/internals/object-get-own-property-names-external.js","webpack://chartmix/./node_modules/zrender/lib/contain/polygon.js","webpack://chartmix/./node_modules/zrender/lib/animation/Animator.js","webpack://chartmix/./node_modules/echarts/lib/data/Tree.js","webpack://chartmix/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/PiecewiseModel.js","webpack://chartmix/./node_modules/echarts/lib/component/tooltip/TooltipContent.js","webpack://chartmix/./node_modules/echarts/lib/chart/gauge.js","webpack://chartmix/./node_modules/echarts/lib/chart/parallel.js","webpack://chartmix/./node_modules/echarts/lib/chart/candlestick.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/TimelineAxis.js","webpack://chartmix/./node_modules/echarts/lib/chart/candlestick/candlestickLayout.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom.js","webpack://chartmix/./node_modules/zrender/lib/core/GestureMgr.js","webpack://chartmix/./node_modules/echarts/lib/component/legendScroll.js","webpack://chartmix/./node_modules/zrender/lib/core/arrayDiff2.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/MapDraw.js","webpack://chartmix/./node_modules/zrender/lib/mixin/Transformable.js","webpack://chartmix/./node_modules/core-js/internals/ie8-dom-define.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Image.js","webpack://chartmix/./node_modules/echarts/lib/chart/sankey/sankeyVisual.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/ScrollableLegendView.js","webpack://chartmix/./node_modules/echarts/lib/coord/parallel/ParallelAxis.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/sourceHelper.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/EffectLine.js","webpack://chartmix/./node_modules/echarts/lib/component/brush/visualEncoding.js","webpack://chartmix/./node_modules/echarts/lib/chart/effectScatter.js","webpack://chartmix/./node_modules/core-js/internals/string-repeat.js","webpack://chartmix/./node_modules/core-js/modules/es.string.split.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/Symbol.js","webpack://chartmix/./node_modules/echarts/lib/chart/radar/RadarView.js","webpack://chartmix/./node_modules/core-js/internals/regexp-exec-abstract.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/RadiusAxisView.js","webpack://chartmix/./node_modules/echarts/lib/helper.js","webpack://chartmix/./node_modules/core-js/modules/web.dom-collections.for-each.js","webpack://chartmix/./node_modules/echarts/lib/chart/scatter.js","webpack://chartmix/./node_modules/zrender/lib/core/matrix.js","webpack://chartmix/./node_modules/echarts/lib/coord/radar/RadarModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/fix/textCoord.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/BarSeries.js","webpack://chartmix/./node_modules/core-js/internals/array-for-each.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/globalListener.js","webpack://chartmix/./node_modules/echarts/lib/scale/Ordinal.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkLineModel.js","webpack://chartmix/./node_modules/core-js/internals/an-instance.js","webpack://chartmix/./node_modules/echarts/lib/chart/candlestick/CandlestickView.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Displayable.js","webpack://chartmix/./node_modules/echarts/lib/chart/pie/PieView.js","webpack://chartmix/./node_modules/core-js/internals/html.js","webpack://chartmix/./node_modules/core-js/internals/a-function.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/simpleLayoutHelper.js","webpack://chartmix/./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/polarCreator.js","webpack://chartmix/./node_modules/core-js/internals/engine-is-ios.js","webpack://chartmix/./node_modules/core-js/internals/require-object-coercible.js","webpack://chartmix/./node_modules/core-js/internals/array-method-has-species-support.js","webpack://chartmix/./node_modules/echarts/lib/layout/barPolar.js","webpack://chartmix/./node_modules/echarts/lib/chart/gauge/PointerPath.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/GeoModel.js","webpack://chartmix/./node_modules/zrender/lib/mixin/Eventful.js","webpack://chartmix/./node_modules/echarts/lib/coord/axisModelCommonMixin.js","webpack://chartmix/./node_modules/echarts/lib/CoordinateSystem.js","webpack://chartmix/./node_modules/zrender/lib/core/PathProxy.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/featureManager.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree/TreeSeries.js","webpack://chartmix/./node_modules/echarts/lib/scale/Time.js","webpack://chartmix/./node_modules/echarts/lib/chart/line/LineSeries.js","webpack://chartmix/./node_modules/echarts/lib/coord/parallel/ParallelModel.js","webpack://chartmix/./node_modules/core-js/internals/iterate.js","webpack://chartmix/./node_modules/zrender/lib/core/env.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree/layoutHelper.js","webpack://chartmix/./node_modules/echarts/lib/util/graphic.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/SliderZoomView.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/createGraphFromNodeEdge.js","webpack://chartmix/./node_modules/core-js/internals/to-absolute-index.js","webpack://chartmix/./node_modules/echarts/lib/coord/radar/Radar.js","webpack://chartmix/./node_modules/core-js/internals/export.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph.js","webpack://chartmix/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkerModel.js","webpack://chartmix/./node_modules/echarts/lib/chart/funnel/funnelLayout.js","webpack://chartmix/./node_modules/echarts/lib/chart/themeRiver/ThemeRiverView.js","webpack://chartmix/./node_modules/core-js/modules/es.regexp.to-string.js","webpack://chartmix/./node_modules/core-js/internals/set-species.js","webpack://chartmix/./node_modules/echarts/lib/preprocessor/helper/compatStyle.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/makeStyleMapper.js","webpack://chartmix/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://chartmix/./node_modules/echarts/lib/chart/pie/pieLayout.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/categoryVisual.js","webpack://chartmix/./node_modules/echarts/lib/lang.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMapPiecewise.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/dataProvider.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Style.js","webpack://chartmix/./node_modules/echarts/lib/visual/visualSolution.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js","webpack://chartmix/./node_modules/zrender/lib/config.js","webpack://chartmix/./node_modules/core-js/internals/task.js","webpack://chartmix/./node_modules/echarts/lib/component/singleAxis.js","webpack://chartmix/./node_modules/core-js/internals/engine-v8-version.js","webpack://chartmix/./node_modules/lodash/lodash.js","webpack://chartmix/./node_modules/echarts/lib/component/brush.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/dimensionHelper.js","webpack://chartmix/./node_modules/vuex/dist/vuex.esm.js","webpack://chartmix/./node_modules/echarts/lib/component/polar.js","webpack://chartmix/./node_modules/echarts/lib/chart/boxplot/boxplotVisual.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/BaseBarSeries.js","webpack://chartmix/./node_modules/zrender/lib/tool/parseSVG.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/ContinuousModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/single/prepareCustom.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkLineView.js","webpack://chartmix/./node_modules/zrender/lib/animation/Animation.js","webpack://chartmix/./node_modules/echarts/lib/chart/sankey.js","webpack://chartmix/./node_modules/echarts/index.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/linkList.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/fix/nanhai.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/InsideZoomView.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/createListFromArray.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/PictorialBarView.js","webpack://chartmix/./node_modules/echarts/lib/chart/sunburst/SunburstView.js","webpack://chartmix/./node_modules/zrender/lib/tool/path.js","webpack://chartmix/./node_modules/core-js/internals/engine-user-agent.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/SliderTimelineView.js","webpack://chartmix/./node_modules/core-js/internals/get-iterator-method.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js","webpack://chartmix/./node_modules/core-js/internals/object-define-properties.js","webpack://chartmix/./node_modules/echarts/lib/util/number.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/dataFormat.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/lineStyle.js","webpack://chartmix/./node_modules/zrender/lib/graphic/IncrementalDisplayable.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/timelineAction.js","webpack://chartmix/./node_modules/echarts/lib/chart/heatmap/HeatmapSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/DataZoomModel.js","webpack://chartmix/./node_modules/core-js/internals/a-possible-prototype.js","webpack://chartmix/./node_modules/core-js/modules/es.string.iterator.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/ContinuousView.js","webpack://chartmix/./node_modules/echarts/lib/echarts.js","webpack://chartmix/./node_modules/core-js/internals/iterators.js","webpack://chartmix/./node_modules/zrender/lib/svg/graphic.js","webpack://chartmix/./node_modules/zrender/lib/core/vector.js","webpack://chartmix/./node_modules/core-js/internals/this-number-value.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js","webpack://chartmix/./node_modules/core-js/modules/es.array.for-each.js","webpack://chartmix/./node_modules/zrender/lib/tool/color.js","webpack://chartmix/./node_modules/core-js/internals/path.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Gradient.js","webpack://chartmix/./node_modules/echarts/lib/component/tooltip/TooltipView.js","webpack://chartmix/./node_modules/echarts/lib/model/Model.js","webpack://chartmix/./node_modules/echarts/lib/coord/single/singleCreator.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkAreaModel.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap/treemapAction.js","webpack://chartmix/./node_modules/zrender/lib/animation/Clip.js","webpack://chartmix/./node_modules/core-js/internals/indexed-object.js","webpack://chartmix/./node_modules/core-js/internals/add-to-unscopables.js","webpack://chartmix/./node_modules/core-js/internals/host-report-errors.js","webpack://chartmix/./node_modules/core-js/internals/is-regexp.js","webpack://chartmix/./node_modules/echarts/lib/chart/sunburst/sunburstAction.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/Polyline.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Ring.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/legendAction.js","webpack://chartmix/./node_modules/echarts/lib/coord/calendar/prepareCustom.js","webpack://chartmix/./node_modules/echarts/lib/chart/effectScatter/EffectScatterView.js","webpack://chartmix/./node_modules/echarts/lib/chart/heatmap/HeatmapView.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/adjustEdge.js","webpack://chartmix/./node_modules/core-js/internals/species-constructor.js","webpack://chartmix/./node_modules/zrender/lib/graphic/LinearGradient.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/AxisModel.js","webpack://chartmix/./node_modules/core-js/internals/native-symbol.js","webpack://chartmix/./node_modules/zrender/lib/core/log.js","webpack://chartmix/./node_modules/echarts/lib/action/geoRoam.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/RoamController.js","webpack://chartmix/./node_modules/zrender/lib/core/curve.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Sector.js","webpack://chartmix/./node_modules/zrender/lib/svg/helper/Definable.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/SelectZoomView.js","webpack://chartmix/./node_modules/echarts/lib/coord/single/Single.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/geoJSONLoader.js","webpack://chartmix/./node_modules/echarts/lib/chart/candlestick/candlestickVisual.js","webpack://chartmix/./node_modules/echarts/lib/chart/funnel/FunnelView.js","webpack://chartmix/./node_modules/core-js/modules/es.regexp.constructor.js","webpack://chartmix/./node_modules/core-js/internals/array-includes.js","webpack://chartmix/./node_modules/echarts/lib/chart/gauge/GaugeSeries.js","webpack://chartmix/./node_modules/core-js/modules/es.array.filter.js","webpack://chartmix/./node_modules/core-js/internals/array-from.js","webpack://chartmix/./node_modules/echarts/lib/config.js","webpack://chartmix/./node_modules/echarts/lib/chart/map/MapSeries.js","webpack://chartmix/./node_modules/echarts/lib/chart/sunburst/SunburstPiece.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/feature/SaveAsImage.js","webpack://chartmix/./node_modules/core-js/modules/es.map.js","webpack://chartmix/./node_modules/echarts/lib/model/Series.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/poly.js","webpack://chartmix/./node_modules/core-js/internals/to-length.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/helper.js","webpack://chartmix/./node_modules/core-js/internals/has.js","webpack://chartmix/./node_modules/echarts/lib/chart/themeRiver/themeRiverLayout.js","webpack://chartmix/./node_modules/core-js/modules/es.string.replace.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/graphHelper.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap.js","webpack://chartmix/./node_modules/echarts/lib/chart/map/mapVisual.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/itemStyle.js","webpack://chartmix/./node_modules/echarts/lib/component/radar.js","webpack://chartmix/./node_modules/@babel/runtime/helpers/esm/objectSpread2.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/roams.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/treeHelper.js","webpack://chartmix/./node_modules/echarts/lib/data/DataDimensionInfo.js","webpack://chartmix/./node_modules/core-js/internals/shared.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/roundRect.js","webpack://chartmix/./node_modules/core-js/internals/own-keys.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/forceLayout.js","webpack://chartmix/./node_modules/core-js/internals/whitespaces.js","webpack://chartmix/./node_modules/core-js/internals/string-trim.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/axisSplitHelper.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/Grid.js","webpack://chartmix/./node_modules/echarts/lib/chart/sankey/SankeyView.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/geoSourceManager.js","webpack://chartmix/./node_modules/core-js/internals/create-property-descriptor.js","webpack://chartmix/./node_modules/echarts/lib/chart/heatmap.js","webpack://chartmix/./node_modules/zrender/lib/Layer.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/image.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/LegendView.js","webpack://chartmix/./node_modules/echarts/lib/visual/VisualMapping.js","webpack://chartmix/./node_modules/zrender/lib/core/event.js","webpack://chartmix/./node_modules/echarts/lib/chart/parallel/ParallelView.js","webpack://chartmix/./node_modules/core-js/internals/object-assign.js","webpack://chartmix/./node_modules/echarts/lib/visual/visualDefault.js","webpack://chartmix/./node_modules/echarts/lib/data/List.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/smoothSpline.js","webpack://chartmix/./node_modules/echarts/lib/util/clazz.js","webpack://chartmix/./node_modules/echarts/lib/component/title.js","webpack://chartmix/(webpack)/buildin/module.js","webpack://chartmix/./node_modules/core-js/internals/string-multibyte.js","webpack://chartmix/./node_modules/core-js/internals/collection-strong.js","webpack://chartmix/./node_modules/echarts/lib/coord/parallel/parallelPreprocessor.js","webpack://chartmix/./node_modules/echarts/lib/chart/lines/linesLayout.js","webpack://chartmix/./node_modules/zrender/lib/core/dom.js","webpack://chartmix/./node_modules/core-js/internals/array-species-create.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/AxisView.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/preprocessor.js","webpack://chartmix/./node_modules/echarts/lib/coord/single/SingleAxis.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/categoryFilter.js","webpack://chartmix/./node_modules/echarts/lib/chart/map.js","webpack://chartmix/./node_modules/echarts/lib/chart/effectScatter/EffectScatterSeries.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/BarView.js","webpack://chartmix/./node_modules/zrender/lib/contain/quadratic.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/typeDefaulter.js","webpack://chartmix/./node_modules/echarts/lib/coord/axisHelper.js","webpack://chartmix/./node_modules/zrender/lib/zrender.js","webpack://chartmix/./node_modules/core-js/internals/internal-state.js","webpack://chartmix/./node_modules/echarts/lib/stream/Scheduler.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/EffectPolyline.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/fix/geoCoord.js","webpack://chartmix/./node_modules/echarts/lib/component/radar/RadarView.js","webpack://chartmix/./node_modules/echarts/lib/chart/themeRiver.js","webpack://chartmix/./node_modules/echarts/lib/model/Component.js","webpack://chartmix/./node_modules/echarts/lib/coord/View.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree/TreeView.js","webpack://chartmix/./node_modules/core-js/internals/collection.js","webpack://chartmix/./node_modules/zrender/lib/core/util.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree/traversalHelper.js","webpack://chartmix/./node_modules/core-js/internals/redefine.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/history.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/selectableMixin.js","webpack://chartmix/./node_modules/core-js/internals/inherit-if-required.js","webpack://chartmix/./node_modules/echarts/lib/coord/axisDefault.js","webpack://chartmix/./node_modules/echarts/lib/chart/themeRiver/themeRiverVisual.js","webpack://chartmix/./node_modules/echarts/lib/chart/lines/LinesSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/VisualMapView.js","webpack://chartmix/./node_modules/echarts/lib/data/Graph.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/LineDraw.js","webpack://chartmix/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMapContinuous.js","webpack://chartmix/./node_modules/core-js/internals/define-well-known-symbol.js","webpack://chartmix/./node_modules/zrender/lib/animation/easing.js","webpack://chartmix/./node_modules/echarts/lib/component/geo/GeoView.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/feature/DataView.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Text.js","webpack://chartmix/./node_modules/echarts/lib/action/createDataSelectAction.js","webpack://chartmix/./node_modules/core-js/internals/enum-bug-keys.js","webpack://chartmix/./node_modules/echarts/lib/coord/radar/IndicatorAxis.js","webpack://chartmix/./node_modules/echarts/lib/chart/radar/backwardCompat.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/PolarModel.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/listComponent.js","webpack://chartmix/./node_modules/echarts/lib/component/radiusAxis.js","webpack://chartmix/./node_modules/core-js/internals/to-object.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/createView.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/feature/DataZoom.js","webpack://chartmix/./node_modules/core-js/internals/object-create.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/fixShadow.js","webpack://chartmix/./node_modules/core-js/modules/es.array.find.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/DataZoomView.js","webpack://chartmix/./node_modules/core-js/internals/define-iterator.js","webpack://chartmix/./node_modules/echarts/lib/component/markArea.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/Line.js","webpack://chartmix/./node_modules/echarts/lib/model/Global.js","webpack://chartmix/./node_modules/echarts/lib/component/graphic.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoomInside.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/LinePath.js","webpack://chartmix/./node_modules/echarts/lib/visual/symbol.js","webpack://chartmix/./node_modules/core-js/internals/native-weak-map.js","webpack://chartmix/./node_modules/echarts/lib/data/DataDiffer.js","webpack://chartmix/./node_modules/echarts/lib/chart/sankey/sankeyLayout.js","webpack://chartmix/./node_modules/core-js/internals/an-object.js","webpack://chartmix/./node_modules/zrender/lib/graphic/constant.js","webpack://chartmix/./node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkPointView.js","webpack://chartmix/./node_modules/core-js/internals/descriptors.js","webpack://chartmix/./node_modules/echarts/lib/coord/calendar/CalendarModel.js","webpack://chartmix/./node_modules/core-js/internals/create-property.js","webpack://chartmix/./node_modules/echarts/lib/ExtensionAPI.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/parallelAxisAction.js","webpack://chartmix/./node_modules/echarts/lib/coord/parallel/parallelCreator.js","webpack://chartmix/./node_modules/echarts/lib/coord/Axis.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/LegendModel.js","webpack://chartmix/./node_modules/zrender/lib/core/fourPointsTransform.js","webpack://chartmix/./node_modules/zrender/lib/contain/util.js","webpack://chartmix/./node_modules/core-js/internals/is-object.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/completeDimensions.js","webpack://chartmix/./node_modules/echarts/lib/chart/radar/radarLayout.js","webpack://chartmix/./node_modules/zrender/lib/svg/core.js","webpack://chartmix/./node_modules/zrender/lib/contain/windingLine.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/GraphSeries.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Polygon.js","webpack://chartmix/./node_modules/echarts/lib/layout/points.js","webpack://chartmix/./node_modules/@soda/get-current-script/index.js","webpack://chartmix/./node_modules/echarts/lib/util/throttle.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkerView.js","webpack://chartmix/./node_modules/echarts/lib/util/component.js","webpack://chartmix/./node_modules/core-js/internals/inspect-source.js","webpack://chartmix/./node_modules/echarts/lib/model/globalDefault.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/fixClipWithShadow.js","webpack://chartmix/./node_modules/echarts/lib/scale/Interval.js","webpack://chartmix/./node_modules/core-js/internals/advance-string-index.js","webpack://chartmix/./node_modules/echarts/lib/model/referHelper.js","webpack://chartmix/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://chartmix/./node_modules/echarts/lib/scale/Log.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Arc.js","webpack://chartmix/./node_modules/echarts/lib/chart/radar.js","webpack://chartmix/./node_modules/echarts/lib/data/OrdinalMeta.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkAreaView.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/ToolboxModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/GridModel.js","webpack://chartmix/./node_modules/zrender/lib/svg/svg.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/legendFilter.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap/treemapVisual.js","webpack://chartmix/./node_modules/core-js/internals/uid.js","webpack://chartmix/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/markerHelper.js","webpack://chartmix/./node_modules/core-js/internals/regexp-exec.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/RadiusAxis.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap/TreemapSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/TimelineView.js","webpack://chartmix/./node_modules/echarts/lib/component/calendar.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/sourceType.js","webpack://chartmix/./node_modules/echarts/lib/chart/map/backwardCompat.js","webpack://chartmix/./node_modules/echarts/lib/scale/helper.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar.js","webpack://chartmix/./node_modules/core-js/internals/is-forced.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/circularLayoutHelper.js","webpack://chartmix/./node_modules/echarts/lib/component/markLine.js","webpack://chartmix/./node_modules/zrender/lib/contain/line.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/GraphView.js","webpack://chartmix/./node_modules/zrender/lib/core/BoundingRect.js","webpack://chartmix/./node_modules/zrender/lib/animation/requestAnimationFrame.js","webpack://chartmix/./node_modules/echarts/lib/visual/dataColor.js","webpack://chartmix/./node_modules/echarts/lib/loading/default.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/areaStyle.js","webpack://chartmix/./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack://chartmix/./node_modules/core-js/internals/object-define-property.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/smoothBezier.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap/treemapLayout.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/subPixelOptimize.js","webpack://chartmix/./node_modules/echarts/lib/layout/barGrid.js","webpack://chartmix/./node_modules/zrender/lib/graphic/mixin/RectText.js","webpack://chartmix/./node_modules/echarts/lib/coord/axisModelCreator.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/dataZoomAction.js","webpack://chartmix/./node_modules/core-js/internals/create-iterator-constructor.js","webpack://chartmix/./node_modules/zrender/lib/contain/arc.js","webpack://chartmix/./node_modules/core-js/internals/regexp-sticky-helpers.js","webpack://chartmix/./node_modules/echarts/lib/chart/line/helper.js","webpack://chartmix/./node_modules/zrender/lib/svg/helper/ClippathManager.js","webpack://chartmix/./node_modules/echarts/lib/chart/radar/RadarSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/typeDefaulter.js","webpack://chartmix/./node_modules/echarts/lib/util/symbol.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/LargeLineDraw.js","webpack://chartmix/./node_modules/core-js/modules/es.array.splice.js","webpack://chartmix/./node_modules/echarts/lib/chart/funnel.js","webpack://chartmix/./node_modules/core-js/modules/es.symbol.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/interactionMutex.js","webpack://chartmix/./node_modules/core-js/modules/es.array.from.js","webpack://chartmix/./node_modules/core-js/internals/array-method-is-strict.js","webpack://chartmix/./node_modules/echarts/lib/chart/map/MapView.js","webpack://chartmix/./node_modules/core-js/internals/to-integer.js","webpack://chartmix/./node_modules/zrender/lib/graphic/helper/text.js","webpack://chartmix/./node_modules/echarts/lib/chart/gauge/GaugeView.js","webpack://chartmix/./node_modules/echarts/lib/chart/lines.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js","webpack://chartmix/./node_modules/zrender/lib/vml/graphic.js","webpack://chartmix/./node_modules/echarts/lib/component/brush/selector.js","webpack://chartmix/./node_modules/echarts/lib/component/marker/MarkPointModel.js","webpack://chartmix/./src/packages/ChartMix/ChartSetting.vue?0404","webpack://chartmix/./node_modules/echarts/lib/component/tooltip/TooltipModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/AngleAxis.js","webpack://chartmix/./node_modules/core-js/modules/es.number.constructor.js","webpack://chartmix/./node_modules/echarts/lib/chart/sunburst/SunburstSeries.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/prepareCustom.js","webpack://chartmix/./node_modules/echarts/lib/chart/pictorialBar.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/visualEncoding.js","webpack://chartmix/./node_modules/echarts/lib/chart/parallel/parallelVisual.js","webpack://chartmix/./node_modules/echarts/lib/chart/scatter/ScatterView.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/BezierCurve.js","webpack://chartmix/./node_modules/core-js/modules/es.regexp.exec.js","webpack://chartmix/./node_modules/core-js/internals/regexp-flags.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/circularLayout.js","webpack://chartmix/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://chartmix/./node_modules/echarts/lib/chart/themeRiver/ThemeRiverSeries.js","webpack://chartmix/./node_modules/core-js/internals/array-method-uses-to-length.js","webpack://chartmix/./node_modules/echarts/lib/chart/lines/LinesView.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Ellipse.js","webpack://chartmix/./node_modules/echarts/lib/component/brush/preprocessor.js","webpack://chartmix/./node_modules/core-js/internals/iterators-core.js","webpack://chartmix/./node_modules/echarts/lib/component/axis.js","webpack://chartmix/./node_modules/zrender/lib/Storage.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/ParallelAxisView.js","webpack://chartmix/./node_modules/core-js/internals/object-to-string.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js","webpack://chartmix/./node_modules/core-js/modules/es.function.name.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox.js","webpack://chartmix/./node_modules/echarts/lib/view/Component.js","webpack://chartmix/./node_modules/zrender/lib/svg/helper/GradientManager.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/createDimensions.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/preprocessor.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap/TreemapView.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/AngleAxisView.js","webpack://chartmix/./src/data/chartJson.js","webpack://chartmix/./node_modules/core-js/internals/microtask.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/barItemStyle.js","webpack://chartmix/./node_modules/core-js/internals/well-known-symbol.js","webpack://chartmix/./node_modules/core-js/modules/es.object.keys.js","webpack://chartmix/./node_modules/core-js/modules/es.number.to-fixed.js","webpack://chartmix/./node_modules/echarts/lib/export.js","webpack://chartmix/./node_modules/core-js/internals/array-iteration.js","webpack://chartmix/./node_modules/echarts/lib/visual/aria.js","webpack://chartmix/./node_modules/echarts/lib/component/brush/brushAction.js","webpack://chartmix/./node_modules/core-js/internals/freezing.js","webpack://chartmix/./node_modules/echarts/lib/chart/pie/labelLayout.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/typeDefaulter.js","webpack://chartmix/./node_modules/zrender/lib/svg/helper/ShadowManager.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/SingleAxisView.js","webpack://chartmix/./node_modules/zrender/lib/mixin/Animatable.js","webpack://chartmix/./node_modules/echarts/lib/chart/candlestick/CandlestickSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/BrushTargetManager.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/parseGeoJson.js","webpack://chartmix/./node_modules/echarts/lib/chart/sankey/sankeyAction.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree/treeAction.js","webpack://chartmix/./node_modules/echarts/lib/chart/pie.js","webpack://chartmix/./node_modules/core-js/internals/to-primitive.js","webpack://chartmix/./node_modules/echarts/lib/util/shape/sausage.js","webpack://chartmix/./node_modules/echarts/lib/component/brush/BrushView.js","webpack://chartmix/./node_modules/core-js/internals/is-pure.js","webpack://chartmix/./node_modules/echarts/lib/visual/LegendVisualProvider.js","webpack://chartmix/./node_modules/echarts/lib/component/parallelAxis.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/cursorHelper.js","webpack://chartmix/./node_modules/echarts/lib/theme/light.js","webpack://chartmix/./node_modules/echarts/lib/coord/single/AxisModel.js","webpack://chartmix/./node_modules/core-js/internals/classof-raw.js","webpack://chartmix/./node_modules/core-js/internals/shared-store.js","webpack://chartmix/./node_modules/core-js/modules/es.array.find-index.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/labelHelper.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Rect.js","webpack://chartmix/(webpack)/buildin/global.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/EffectSymbol.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/geoSVGLoader.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/LargeSymbolDraw.js","webpack://chartmix/./node_modules/core-js/modules/es.array.index-of.js","webpack://chartmix/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://chartmix/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://chartmix/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://chartmix/./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","webpack://chartmix/./src/utils/util.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree/treeLayout.js","webpack://chartmix/./node_modules/core-js/internals/object-keys-internal.js","webpack://chartmix/./node_modules/echarts/lib/model/OptionManager.js","webpack://chartmix/./node_modules/core-js/modules/es.array.includes.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Line.js","webpack://chartmix/./node_modules/echarts/lib/chart/scatter/ScatterSeries.js","webpack://chartmix/./node_modules/zrender/lib/mixin/Draggable.js","webpack://chartmix/./node_modules/echarts/lib/chart/sunburst/sunburstLayout.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/helper.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Path.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/Cartesian2D.js","webpack://chartmix/./node_modules/core-js/internals/document-create-element.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoom/AxisProxy.js","webpack://chartmix/./node_modules/core-js/modules/es.object.assign.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/createRenderPlanner.js","webpack://chartmix/./node_modules/echarts/lib/component/grid.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/modelHelper.js","webpack://chartmix/./node_modules/echarts/lib/chart/heatmap/HeatmapLayer.js","webpack://chartmix/./node_modules/zrender/lib/dom/HandlerProxy.js","webpack://chartmix/./node_modules/core-js/internals/promise-resolve.js","webpack://chartmix/./node_modules/core-js/internals/set-global.js","webpack://chartmix/./node_modules/echarts/lib/chart/map/mapSymbolLayout.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/Cartesian.js","webpack://chartmix/./node_modules/core-js/internals/hidden-keys.js","webpack://chartmix/./node_modules/echarts/lib/chart/sankey/SankeySeries.js","webpack://chartmix/./node_modules/core-js/internals/fails.js","webpack://chartmix/./node_modules/core-js/internals/get-built-in.js","webpack://chartmix/./node_modules/echarts/lib/component/geo.js","webpack://chartmix/./node_modules/echarts/lib/coord/calendar/Calendar.js","webpack://chartmix/./node_modules/echarts/lib/processor/dataStack.js","webpack://chartmix/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://chartmix/./node_modules/core-js/modules/es.symbol.iterator.js","webpack://chartmix/./node_modules/echarts/lib/component/legend.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/focusNodeAdjacencyAction.js","webpack://chartmix/./node_modules/core-js/internals/object-set-prototype-of.js","webpack://chartmix/./node_modules/zrender/lib/Handler.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/simpleLayout.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/feature/MagicType.js","webpack://chartmix/./node_modules/zrender/lib/vml/core.js","webpack://chartmix/./node_modules/core-js/modules/es.object.to-string.js","webpack://chartmix/./node_modules/echarts/lib/processor/dataFilter.js","webpack://chartmix/./node_modules/core-js/internals/set-to-string-tag.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Polyline.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/AxisPointerView.js","webpack://chartmix/./node_modules/zrender/lib/graphic/CompoundPath.js","webpack://chartmix/./node_modules/echarts/lib/chart/line/poly.js","webpack://chartmix/./node_modules/zrender/lib/core/LRU.js","webpack://chartmix/./node_modules/zrender/lib/Element.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/PictorialBarSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/visualMapAction.js","webpack://chartmix/./node_modules/echarts/lib/chart/sunburst.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/graphAction.js","webpack://chartmix/./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","webpack://chartmix/./node_modules/core-js/modules/es.array.map.js","webpack://chartmix/./node_modules/echarts/lib/action/roamHelper.js","webpack://chartmix/./node_modules/zrender/lib/contain/path.js","webpack://chartmix/./node_modules/echarts/lib/coord/parallel/Parallel.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/AxisModel.js","webpack://chartmix/./node_modules/zrender/lib/graphic/shape/Circle.js","webpack://chartmix/./node_modules/core-js/internals/global.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap.js","webpack://chartmix/./node_modules/echarts/lib/component/markPoint.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/ToolboxView.js","webpack://chartmix/./node_modules/core-js/modules/es.object.get-own-property-descriptors.js","webpack://chartmix/./node_modules/zrender/lib/svg/Painter.js","webpack://chartmix/./node_modules/zrender/lib/graphic/Pattern.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js","webpack://chartmix/./node_modules/echarts/lib/chart/boxplot/BoxplotView.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoomSelect.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/SliderTimelineModel.js","webpack://chartmix/./node_modules/core-js/modules/web.dom-collections.iterator.js","webpack://chartmix/./node_modules/zrender/lib/graphic/RadialGradient.js","webpack://chartmix/./node_modules/zrender/lib/core/guid.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/boxLayout.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/edgeVisual.js","webpack://chartmix/./node_modules/echarts/lib/coord/parallel/AxisModel.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/feature/Restore.js","webpack://chartmix/./node_modules/core-js/internals/object-keys.js","webpack://chartmix/./node_modules/core-js/modules/es.symbol.description.js","webpack://chartmix/./node_modules/echarts/lib/chart/custom.js","webpack://chartmix/./node_modules/echarts/lib/coord/axisTickLabelBuilder.js","webpack://chartmix/./node_modules/echarts/lib/util/model.js","webpack://chartmix/./node_modules/echarts/lib/scale/Scale.js","webpack://chartmix/./node_modules/core-js/internals/object-get-prototype-of.js","webpack://chartmix/./node_modules/core-js/internals/correct-prototype-getter.js","webpack://chartmix/./node_modules/zrender/lib/container/Group.js","webpack://chartmix/./node_modules/core-js/modules/es.array.iterator.js","webpack://chartmix/./node_modules/zrender/lib/core/bbox.js","webpack://chartmix/./node_modules/core-js/internals/redefine-all.js","webpack://chartmix/./node_modules/core-js/modules/es.object.get-own-property-descriptor.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/whiskerBoxCommon.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/createListSimply.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/colorPalette.js","webpack://chartmix/./node_modules/echarts/lib/component/dataZoomSlider.js","webpack://chartmix/./node_modules/core-js/internals/well-known-symbol-wrapped.js","webpack://chartmix/./node_modules/core-js/internals/perform.js","webpack://chartmix/./node_modules/echarts/lib/util/animation.js","webpack://chartmix/./node_modules/core-js/modules/es.promise.js","webpack://chartmix/./node_modules/echarts/lib/chart/bar/helper.js","webpack://chartmix/./node_modules/zrender/lib/contain/cubic.js","webpack://chartmix/./node_modules/zrender/lib/contain/text.js","webpack://chartmix/./node_modules/echarts/lib/view/Chart.js","webpack://chartmix/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://chartmix/./node_modules/core-js/internals/is-array.js","webpack://chartmix/./node_modules/core-js/internals/is-array-iterator-method.js","webpack://chartmix/./node_modules/zrender/lib/vml/Painter.js","webpack://chartmix/./node_modules/echarts/lib/chart/candlestick/preprocessor.js","webpack://chartmix/./node_modules/echarts/lib/component/visualMap/VisualMapModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/prepareCustom.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/axisTrigger.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack://chartmix/./node_modules/echarts/lib/coord/cartesian/Axis2D.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/mapDataStorage.js","webpack://chartmix/./node_modules/echarts/lib/data/Source.js","webpack://chartmix/./node_modules/echarts/lib/chart/boxplot/boxplotLayout.js","webpack://chartmix/./node_modules/zrender/lib/Painter.js","webpack://chartmix/./node_modules/echarts/lib/util/format.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline/TimelineModel.js","webpack://chartmix/./node_modules/echarts/lib/coord/single/singleAxisHelper.js","webpack://chartmix/./node_modules/echarts/lib/data/helper/dataStackHelper.js","webpack://chartmix/./node_modules/echarts/lib/component/calendar/CalendarView.js","webpack://chartmix/./node_modules/zrender/lib/tool/transformPath.js","webpack://chartmix/./node_modules/echarts/lib/component/timeline.js","webpack://chartmix/./node_modules/echarts/lib/chart/lines/linesVisual.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/geoCreator.js","webpack://chartmix/./node_modules/echarts/lib/chart/graph/forceHelper.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/sliderMove.js","webpack://chartmix/./node_modules/echarts/lib/chart/line.js","webpack://chartmix/./node_modules/echarts/lib/chart/tree.js","webpack://chartmix/./node_modules/core-js/internals/new-promise-capability.js","webpack://chartmix/./node_modules/echarts/lib/chart/line/lineAnimationDiff.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js","webpack://chartmix/./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack://chartmix/./node_modules/zrender/lib/vml/vml.js","webpack://chartmix/./node_modules/echarts/lib/chart/line/LineView.js","webpack://chartmix/./node_modules/core-js/internals/internal-metadata.js","webpack://chartmix/./node_modules/echarts/lib/theme/dark.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/CartesianAxisView.js","webpack://chartmix/./node_modules/echarts/lib/coord/geo/Region.js","webpack://chartmix/./node_modules/echarts/lib/component/parallel.js","webpack://chartmix/./node_modules/echarts/lib/component/brush/BrushModel.js","webpack://chartmix/./node_modules/echarts/lib/stream/task.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/brushHelper.js","webpack://chartmix/./node_modules/core-js/internals/classof.js","webpack://chartmix/./node_modules/echarts/lib/component/angleAxis.js","webpack://chartmix/./node_modules/echarts/lib/chart/treemap/Breadcrumb.js","webpack://chartmix/./node_modules/echarts/lib/chart/map/mapDataStatistic.js","webpack://chartmix/./node_modules/echarts/lib/chart/helper/SymbolDraw.js","webpack://chartmix/./node_modules/core-js/internals/shared-key.js","webpack://chartmix/./node_modules/echarts/lib/chart/pie/PieSeries.js","webpack://chartmix/./node_modules/echarts/lib/util/layout.js","webpack://chartmix/./node_modules/echarts/lib/chart/boxplot.js","webpack://chartmix/./node_modules/echarts/lib/component/axis/AxisBuilder.js","webpack://chartmix/./node_modules/echarts/lib/preprocessor/backwardCompat.js","webpack://chartmix/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://chartmix/./src/packages/ChartMix/ChartSetting.vue?460e","webpack://chartmix/src/packages/ChartMix/ChartSetting.vue","webpack://chartmix/./src/packages/ChartMix/ChartSetting.vue?63ac","webpack://chartmix/./src/packages/ChartMix/ChartSetting.vue","webpack://chartmix/./src/store/modules/chartSetting/mutation-types.js","webpack://chartmix/./src/store/modules/chartSetting/actions.js","webpack://chartmix/./src/store/modules/chartSetting/getters.js","webpack://chartmix/./src/utils/echartsEngine/transformTitle.js","webpack://chartmix/./src/utils/echartsEngine/transformLegend.js","webpack://chartmix/./src/utils/echartsEngine/transformTooltip.js","webpack://chartmix/./src/utils/echartsEngine/transformAxis.js","webpack://chartmix/./src/utils/echartsEngine/index.js","webpack://chartmix/./src/utils/chartUtil.js","webpack://chartmix/./src/store/modules/chartSetting/mutations.js","webpack://chartmix/./src/store/modules/chartSetting/state.js","webpack://chartmix/./src/store/modules/chartSetting/index.js","webpack://chartmix/./src/packages/ChartMix/ChartRender.vue?e967","webpack://chartmix/src/packages/ChartMix/ChartRender.vue","webpack://chartmix/./src/packages/ChartMix/ChartRender.vue?d341","webpack://chartmix/./src/packages/ChartMix/ChartRender.vue","webpack://chartmix/./src/store/modules/rect/mutation-types.js","webpack://chartmix/./src/store/modules/rect/actions.js","webpack://chartmix/./src/store/modules/rect/getters.js","webpack://chartmix/./src/store/modules/rect/mutations.js","webpack://chartmix/./src/store/modules/rect/state.js","webpack://chartmix/./src/store/modules/rect/index.js","webpack://chartmix/./src/store/modules/chartRender.js","webpack://chartmix/./src/store/index.js","webpack://chartmix/./src/utils/exportUtil.js","webpack://chartmix/./src/packages/index.js","webpack://chartmix/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js","webpack://chartmix/./node_modules/core-js/modules/es.array.slice.js","webpack://chartmix/./node_modules/core-js/internals/to-indexed-object.js","webpack://chartmix/./node_modules/echarts/lib/component/helper/BrushController.js","webpack://chartmix/./node_modules/echarts/lib/coord/polar/Polar.js","webpack://chartmix/./node_modules/echarts/lib/visual/seriesColor.js","webpack://chartmix/./node_modules/core-js/internals/dom-iterables.js","webpack://chartmix/./node_modules/core-js/internals/use-symbol-as-uid.js","webpack://chartmix/./node_modules/echarts/lib/processor/dataSample.js","webpack://chartmix/./node_modules/echarts/lib/model/mixin/textStyle.js","webpack://chartmix/./node_modules/core-js/internals/native-promise-constructor.js","webpack://chartmix/./node_modules/echarts/lib/chart/boxplot/BoxplotSeries.js","webpack://chartmix/./node_modules/echarts/lib/component/toolbox/feature/Brush.js","webpack://chartmix/./node_modules/echarts/lib/component/axisPointer/viewHelper.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__8bbf__","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","installedCssChunks","0","jsonpScriptSrc","__webpack_require__","p","l","e","promises","cssChunks","Promise","resolve","reject","href","fullhref","existingLinkTags","document","getElementsByTagName","tag","dataHref","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","code","parentNode","removeChild","head","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","error","clearTimeout","chunk","errorType","realSrc","message","name","undefined","setTimeout","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","oldJsonpFunction","slice","s","_util","each","createHashMap","SeriesModel","createListFromArray","_default","extend","dependencies","visualColorAccessPath","getInitialData","option","ecModel","source","getSource","setEncodeAndDimensions","getRawIndicesByActiveState","activeState","coordSys","coordinateSystem","getData","indices","eachActiveState","theActiveState","dataIndex","getRawIndex","defaultOption","zlevel","z","parallelIndex","label","show","inactiveOpacity","activeOpacity","lineStyle","width","opacity","emphasis","progressive","smooth","animationEasing","seriesModel","encodeDefine","parallelModel","getComponent","dimensions","axisDim","dataDimIndex","convertDimNameToNumber","set","dimName","replace","zrUtil","VisualMapView","graphic","_symbol","createSymbol","layout","helper","PiecewiseVisualMapView","doRender","thisGroup","group","removeAll","visualMapModel","textGap","textStyleModel","textFont","getFont","textFill","getTextColor","itemAlign","_getItemAlign","itemSize","viewData","_getViewData","endsText","showLabel","retrieve","renderItem","item","piece","itemGroup","Group","onclick","_onItemClick","_enableHoverLink","indexInModelPieceList","representValue","getRepresentValue","_createItemSymbol","visualState","getValueState","add","Text","style","x","y","text","textVerticalAlign","textAlign","_renderEndsText","viewPieceList","box","renderBackground","positionGroup","pieceIndex","onHoverLink","method","hoverLink","api","dispatchAction","batch","makeHighDownBatch","findTargetDataIndices","on","modelOption","orient","getItemAlign","align","map","getPieceList","index","inverse","reverse","shapeParam","getControllerVisual","selected","clone","newKey","getSelectedMapKey","selectedMode","from","uid","visualMapId","id","echarts","registerAction","update","createListSimply","_model","defaultEmphasis","_sourceHelper","makeSeriesEncodeForNameBased","LegendVisualProvider","FunnelSeries","extendSeriesModel","init","superApply","arguments","legendVisualProvider","getRawData","_defaultLabelLine","coordDimensions","encodeDefaulter","curry","labelLineNormalOpt","labelLine","labelLineEmphasisOpt","getDataParams","params","superCall","valueDim","mapDimension","sum","getSum","percent","toFixed","$vars","legendHoverLink","left","top","right","bottom","minSize","maxSize","sort","gap","funnelAlign","position","itemStyle","borderColor","borderWidth","dataToCoordSize","dataSize","dataItem","dimIdx","val","halfSize","p1","p2","Math","abs","dataToPoint","rect","getBoundingRect","height","zoom","getZoom","coord","size","wellKnownSymbol","TO_STRING_TAG","test","String","BoundingRect","View","geoSourceManager","Geo","nameMap","invertLongitute","load","_nameCoordMap","nameCoordMap","_regionsMap","regionsMap","_invertLongitute","regions","_rect","boundingRect","doConvert","methodName","finder","geoModel","getReferringComponents","constructor","containCoord","contain","transformTo","rawTransformable","_rawTransformable","transform","calculateTransform","decomposeTransform","scale","updateTransform","_updateTransform","getRegion","getRegionByCoord","addGeoCoord","geoCoord","getGeoCoord","noRoam","out","convertToPixel","convertFromPixel","mixin","gridModel","axisModel","opt","grid","axis","otherAxisOnZeroOf","getAxesOnZeroOf","rawAxisPosition","axisPosition","dim","getRect","rectBound","idx","onZero","axisOffset","posBound","onZeroCoord","toGlobalCoord","dataToCoord","max","min","rotation","PI","dirMap","labelDirection","tickDirection","nameDirection","labelOffset","labelInside","labelRotate","z2","extendComponentView","render","Rect","shape","defaults","fill","getItemStyle","silent","registerPreprocessor","xAxis","yAxis","updateViewOnPan","controllerHost","dx","dy","pos","dirty","updateViewOnZoom","zoomDelta","zoomX","zoomY","zoomLimit","newZoom","zoomMin","zoomMax","Infinity","zoomScale","ComponentModel","ComponentView","detectSourceFormat","_sourceType","SERIES_LAYOUT_BY_COLUMN","seriesLayoutBy","sourceHeader","optionUpdated","aFunction","fn","that","a","b","apply","DEFAULT_MIN_MERGE","DEFAULT_MIN_GALLOPING","minRunLength","makeAscendingRun","array","lo","hi","compare","runHi","reverseRun","binaryInsertionSort","start","mid","pivot","gallopLeft","hint","lastOffset","maxOffset","offset","tmp","gallopRight","TimSort","runStart","runLength","minGallop","stackSize","pushRun","_runStart","_runLength","mergeRuns","mergeAt","forceMergeRuns","start1","length1","start2","length2","k","mergeLow","mergeHigh","cursor1","cursor2","dest","count1","count2","exit","_minGallop","customCursor","customDest","remaining","ts","minRun","force","toIndexedObject","nativeGetOwnPropertyNames","f","toString","windowNames","window","getOwnPropertyNames","getWindowNames","it","windingLine","EPSILON","isAroundEqual","points","w","p0","Clip","color","isArrayLike","arraySlice","Array","defaultGetter","defaultSetter","interpolateNumber","interpolateString","interpolateArray","arrDim","len","len2","j","fillArr","arr0","arr1","arr0Len","arr1Len","isPreviousLarger","isNaN","isArraySame","catmullRomInterpolateArray","p3","t2","t3","catmullRomInterpolate","v0","v1","cloneValue","ret","rgba2String","rgba","floor","join","getArrayDim","keyframes","lastValue","createTrackClip","animator","easing","oneTrackDone","propName","forceAnimate","_getter","setter","_setter","useSpline","trackLen","trackMaxTime","firstVal","isValueArray","isValueColor","isValueString","time","kfPercents","kfValues","prevValue","isAllValueEqual","colorArray","parse","_target","lastFrame","lastFramePercent","onframe","frame","range","clip","life","loop","_loop","delay","_delay","ondestroy","Animator","_tracks","_clipCount","_doneList","_onframeList","_clipList","when","props","tracks","during","callback","pause","_paused","resume","isPaused","_doneCallback","doneList","lastClip","clipCount","animation","addClip","oldOnFrame","stop","forwardToLast","clipList","removeClip","done","cb","getClips","Model","linkList","List","createDimensions","TreeNode","hostTree","depth","children","viewChildren","Tree","hostModel","levelOptions","_nodes","levelModels","levelDefine","addChild","child","node","isRemoved","eachNode","options","context","isString","order","suppressVisitSub","attr","updateDepthAndHeight","getNodeById","getId","res","contains","getAncestors","includeSelf","ancestors","getValue","dimension","getDimension","setLayout","merge","setItemLayout","getLayout","getItemLayout","getModel","path","itemModel","getItemModel","levelModel","getLevelModel","setVisual","setItemVisual","getVisual","ignoreParent","getItemVisual","isAncestorOf","parent","isDescendantOf","getNodeByDataIndex","rawIndex","getNodeByName","nodes","count","clearLayouts","clearItemLayouts","createTree","dataRoot","treeOptions","beforeLink","tree","levels","listData","dimMax","buildHierarchy","dataNode","isArray","dimensionsInfo","dimensionsCount","list","initData","mainData","struct","structAttr","DESCRIPTORS","propertyIsEnumerableModule","createPropertyDescriptor","toPrimitive","has","IE8_DOM_DEFINE","nativeGetOwnPropertyDescriptor","getOwnPropertyDescriptor","O","P","_config","__DEV__","VisualMapModel","VisualMapping","visualDefault","_number","reformIntervals","PiecewiseModel","minOpen","maxOpen","itemWidth","itemHeight","itemSymbol","pieceList","categories","splitNumber","itemGap","newOption","isInit","_pieceList","resetExtent","_mode","_determineMode","resetMethods","_resetSelected","resetVisual","mappingOption","state","mappingMethod","dataExtent","getExtent","visual","completeVisualOption","visualTypesInPieces","visualTypes","listVisualTypes","isCategory","obj","visualType","isObject","pieces","v","exists","stateList","thisOption","hasSel","setSelected","findPieceIndex","result","eachTargetSeries","dataIndices","getDataDimension","pIdx","seriesId","pieceInterval","interval","getVisualMeta","getColorVisual","stops","outerColors","edge","unshift","curr","setStop","valueState","precision","parseInt","splitStep","close","formatValueText","cate","normalizeReverse","pieceListItem","closeList","infinityList","useMinMax","lg","names","retrieveVisuals","edgeSymbols","zrColor","eventUtil","domUtil","env","formatUtil","toCamelCase","vendors","gCssText","assembleTransition","duration","transitionCurve","transitionText","vendorPrefix","assembleFont","cssText","fontSize","round","assembleCssText","tooltipModel","transitionDuration","backgroundColor","padding","canvasSupported","toHex","borderName","camelCase","normalizeCssArray","makeStyleCoord","zr","appendToBody","zrX","zrY","zrPainter","painter","zrViewportRoot","getViewportRoot","transformLocalCoord","body","viewportRootOffset","getViewportRootOffset","offsetLeft","offsetTop","TooltipContent","container","wxa","el","domBelongToZr","_zr","getZr","_appendToBody","_styleCoord","getWidth","getHeight","_container","_show","_hideTimeout","onmouseenter","_enterable","_inContent","onmousemove","handler","normalizeEvent","dispatch","onmouseleave","hideLater","_hideDelay","stl","currentStyle","defaultView","getComputedStyle","domStyle","styleCoord","display","innerHTML","pointerEvents","setContent","content","setEnterable","enterable","getSize","clientWidth","clientHeight","moveTo","hide","isShow","dispose","getOuterSize","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","parallelVisual","registerVisual","preprocessor","candlestickVisual","candlestickLayout","registerLayout","Axis","TimelineAxis","coordExtent","axisType","model","getLabelModel","isHorizontal","inherits","_graphic","subPixelOptimize","createRenderPlanner","parsePercent","retrieve2","LargeArr","Float32Array","seriesType","plan","reset","candleWidth","calculateCandleWidth","cDimIdx","vDimIdx","coordDims","cDim","vDims","openDim","closeDim","lowestDim","highestDim","isSimpleBox","progress","pipelineContext","large","largeProgress","normalProgress","next","axisDimVal","openVal","closeVal","lowestVal","highestVal","ocLow","ocHigh","ocLowPoint","getPoint","ocHighPoint","lowestPoint","highestPoint","ends","addBodyEnd","subPixelOptimizePoint","sign","getSign","initBaseline","brushRect","makeBrushRect","NaN","point","point1","point2","pmin","pmax","tmpIn","tmpOut","extent","baseAxis","getBaseAxis","bandWidth","getBandWidth","barMaxWidth","barMinWidth","barWidth","GestureMgr","_track","dist","pointPair","sqrt","center","recognize","_doTrack","_recognize","clear","touches","trackItem","touch","clientToLocal","eventName","recognizers","gestureInfo","pinch","track","pinchEnd","pinchPre","pinchScale","isFinite","pinchCenter","pinchX","pinchY","Diff","buildValues","diff","components","newArr","oldArr","componentPos","componentLen","newPos","oldPos","component","removed","added","clonePath","equals","newLen","oldLen","editLength","maxEditLength","bestPath","extractCommon","execEditLength","diagonalPath","basePath","addPath","removePath","canAdd","canRemove","pushComponent","last","commonCount","tokenize","arrayDiff","RoamController","roamHelper","_cursorHelper","onIrrelevantElement","_component","getUID","Transformable","getFixedItemStyle","areaColor","updateMapSelectHandler","mapDraw","mapOrGeoModel","regionsGroup","fromView","off","_mouseDownFlag","__regions","action","mainType","region","updateMapSelected","eachChild","otherRegionEl","trigger","isSelected","MapDraw","updateGroup","_controller","_controllerHost","_updateGroup","_mapName","_initialized","_regionsGroup","_backgroundGroup","draw","payload","isGeo","eachComponent","subType","mapSeries","getHostGeoModel","geo","_updateBackground","targetScale","transformInfo","getTransformInfo","isFirstDraw","childAt","roamTransform","updateProps","rawScale","rawPosition","itemStyleAccessPath","hoverItemStyleAccessPath","labelAccessPath","hoverLabelAccessPath","regionGroup","compoundPath","CompoundPath","segmentIgnoreThreshold","paths","dataIdx","regionModel","getRegionModel","itemStyleModel","hoverItemStyleModel","hoverItemStyle","labelModel","hoverLabelModel","indexOfName","visualColor","transformPoint","geometries","geometry","exterior","Polygon","interiors","interior","setStyle","strokeNoScale","culling","hoverShowLabel","isDataNaN","itemLayout","labelFetcher","query","textEl","setLabelStyle","hoverStyle","labelDataIndex","defaultText","useInsideStyle","textScale","setItemGraphicEl","eventData","componentType","componentIndex","geoIndex","groupRegions","highDownSilentOnTouch","setHoverStyle","_updateController","remove","removeGraphic","mapName","makeGraphic","controller","enable","makeActionBase","originX","originY","traverse","setPointerChecker","getViewRectAfterRoam","matrix","vector","mIdentity","identity","isNotAroundZero","opts","origin","transformableProto","needLocalTransform","scaleTmp","parentHasTransform","getLocalTransform","mul","copy","globalScaleRatio","getGlobalScale","relX","relY","sx","sy","invTransform","invert","setTransform","ctx","dpr","restoreTransform","tmpTransform","originTransform","setLocalTransform","atan2","transformCoordToLocal","v2","applyTransform","transformCoordToGlobal","rotate","fails","Displayable","imageHelper","ZImage","brush","prevEl","image","_image","createOrUpdateImage","isImageReady","aspect","sWidth","sHeight","drawImage","drawRectText","eachSeriesByType","graph","getGraph","minValue","maxValue","nodeValue","mapping","mapValueToColor","mapValueToVisual","customColor","layoutUtil","LegendView","WH","XY","ScrollableLegendView","newlineDisabled","_currentIndex","_containerGroup","getContentGroup","_controllerGroup","_showController","resetInner","removeClipPath","__rectSize","renderInner","legendModel","selector","selectorPosition","me","controllerGroup","pageIconSize","createPageButton","pageTextStyleModel","iconIdx","pageDataIndexName","icon","createIcon","getOrient","_pageGo","font","layoutInner","isFirstRender","selectorGroup","getSelectorGroup","orientIdx","wh","xy","hw","yx","selectorButtonGap","selectorRect","selectorPos","processMaxSize","mainRect","_layoutContentAndController","contentGroup","containerGroup","contentRect","controllerRect","showController","contentPos","containerPos","controllerPos","pageButtonGap","pageButtonPosition","clipShape","setClipPath","invisible","pageInfo","_getPageInfo","pageIndex","contentPosition","_updatePageInfoView","to","scrollDataIndex","legendId","canJump","childOfName","cursor","pageText","pageFormatter","current","total","pageCount","containerRectSize","targetItemIndex","_findTargetItemIndex","targetItem","itemCount","pCount","pagePrevDataIndex","pageNextDataIndex","targetItemInfo","getItemInfo","winStartItemInfo","winEndItemInfo","currItemInfo","intersect","itemRect","__legendDataIndex","itemInfo","winStart","targetDataIndex","defaultIndex","legendDataIdx","ParallelAxis","axisIndex","makeInner","getDataItemValue","isTypedArray","Source","assert","SOURCE_FORMAT_ORIGINAL","SOURCE_FORMAT_ARRAY_ROWS","SOURCE_FORMAT_OBJECT_ROWS","SOURCE_FORMAT_KEYED_COLUMNS","SOURCE_FORMAT_UNKNOWN","SOURCE_FORMAT_TYPED_ARRAY","SERIES_LAYOUT_BY_ROW","BE_ORDINAL","Must","Might","Not","inner","datasetModel","sourceFormat","resetSourceDefaulter","datasetMap","prepareSource","seriesOption","fromDataset","dimensionsDefine","getDatasetModel","datasetOption","completeResult","completeBySourceData","startIndex","dimensionsDetectCount","encode","normalizeDimensionsDefine","arrayRowsTravelFirst","objectRowsCollectDimensions","colArr","value0","displayName","exist","maxLoop","firstIndex","makeSeriesEncodeForAxisCoordSys","baseCategoryDimIndex","categoryWayValueDimStart","encodeItemName","encodeSeriesName","coordDimInfo","coordDimIdx","getDataDimCountOnCoordDim","datasetRecord","categoryWayDim","valueWayDim","pushDim","dimIdxArr","idxFrom","idxCount","dimsDef","coordDimName","itemName","seriesName","dimCount","potentialNameDimIndex","idxResult","idxRes0","idxRes1","guessRecords","guessResult","doGuessOrdinal","isPureNumber","fulfilled","nameDimIndex","thisData","datasetIndex","guessOrdinal","dimIndex","dimType","dimDefItem","sample","detectValue","row","beStr","Line","vec2","curveUtil","EffectLine","lineData","seriesScope","createLine","_updateEffectSymbol","effectLineProto","effectModel","symbolType","symbol","_symbolType","setColor","_symbolScale","_updateEffectAnimation","period","constantSpeed","delayExpr","isDelayFunc","ignore","updateAnimationPoints","getLineLength","_period","stopAnimation","__t","animate","updateSymbolPosition","__p1","__cp1","__p2","updateData","cp1","lastPos","quadraticAt","quadraticDerivativeAt","tx","ty","__lastT","scaleY","updateLayout","visualSolution","throttleUtil","BrushTargetManager","STATE_LIST","DISPATCH_METHOD","DISPATCH_FLAG","PRIORITY_BRUSH","PRIORITY","VISUAL","BRUSH","layoutCovers","brushModel","brushTargetManager","setInputRanges","areas","throttleType","throttleDelay","brushSelected","doDispatch","createOrUpdate","isDisposed","checkInRange","selectorsByBrushType","rangeInfoList","area","brushType","selectors","getSelectorsByBrushType","brushSelector","sels","selectorsByElementType","isFunction","bSelector","sel","brushModelNotControll","seriesIndex","seriesIndices","indexOf","bindSelector","selFn","elType","setBrushOption","brushOption","brushIndex","thisBrushSelected","brushId","brushName","brushLink","linkedSeriesMap","selectedDataIndexForLink","rangeInfoBySeries","hasBrushExists","boundingRectBuilders","visualMappings","createVisualMappings","linkOthers","brushed","stepAParallel","hasAxisBrushed","stepAOthers","controlSeries","eachSeries","seriesBrushSelected","applyVisual","lineX","noop","lineY","getBoundingRectFromMinMax","polygon","minMax","rg","visualSymbol","layoutPoints","toInteger","requireObjectCoercible","repeat","str","RangeError","fixRegExpWellKnownSymbolLogic","isRegExp","anObject","speciesConstructor","advanceStringIndex","toLength","callRegExpExec","regexpExec","arrayPush","MAX_UINT32","SUPPORTS_Y","RegExp","SPLIT","nativeSplit","maybeCallNative","internalSplit","split","separator","limit","string","lim","match","lastIndex","lastLength","output","flags","ignoreCase","multiline","unicode","sticky","lastLastIndex","separatorCopy","splitter","regexp","rx","S","C","unicodeMatching","q","A","modelUtil","getSeriesByIndex","queryDataIndex","getItemGraphicEl","getTooltipPosition","getValues","_labelHelper","getDefaultLabel","SymbolClz","symbolProto","getSymbolSize","symbolSize","getScale","driftSymbol","drift","_createSymbol","keepAspect","symbolPath","stopSymbolAnimation","toLastFrame","getSymbolPath","highlight","downplay","setZ","setDraggable","draggable","_updateCommon","fadeIn","initProps","_seriesModel","normalStyleAccessPath","emphasisStyleAccessPath","normalLabelAccessPath","emphasisLabelAccessPath","highDownOnUpdate","fromState","toState","incremental","useHoverLayer","__symbolOriginalScale","ratio","emphasisOpt","animateTo","useStyle","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","symbolOffset","hoverAnimation","cursorStyle","hasItemOption","getShallow","elStyle","symbolRotate","symbolInnerColor","liftZ","z2Origin","__z2Origin","useNameLabel","getLabelDefaultText","getName","isRectText","autoColor","isAnimationEnabled","fadeOut","keepLabel","symbolUtil","normalizeSymbolSize","extendChartView","polar","oldData","_data","updateSymbols","oldPoints","newPoints","symbolGroup","__dimIdx","getInitialPoints","pt","cx","cy","polyline","Polyline","newIdx","oldIdx","execute","eachItemGraphicEl","getLineStyle","stroke","areaStyleModel","hoverAreaStyleModel","polygonIgnore","isEmpty","parentModel","hoverPolygonIgnore","getAreaStyle","itemHoverStyle","labelHoverModel","labelDimIndex","classof","R","exec","TypeError","AxisBuilder","AxisView","axisBuilderAttrs","selfBuilderAttrs","axisPointerClass","radiusAxisModel","radiusAxis","angleAxis","getAngleAxis","ticksCoords","getTicksCoords","minorTicksCoords","getMinorTicksCoords","axisAngle","radiusExtent","layoutAxis","axisBuilder","getGroup","isBlank","_splitLine","splitLineModel","lineStyleModel","lineColors","lineCount","splitLines","colorIndex","Circle","mergePath","_minorSplitLine","minorSplitLineModel","lines","_splitArea","splitAreaModel","areaColors","splitAreas","prevRadius","Sector","r0","startAngle","endAngle","axisHelper","axisModelCommonMixin","_layout","getLayoutRect","_dataStackHelper","enableDataStack","isDimensionStacked","getStackedDimension","_completeDimensions","completeDimensions","_createDimensions","createList","dataStack","createScale","isInstance","createScaleByModel","setExtent","niceScaleExtent","mixinAxisModelCommonMethods","global","DOMIterables","forEach","createNonEnumerableProperty","COLLECTION_NAME","Collection","CollectionPrototype","ArrayCtor","m1","m2","out0","out1","out2","out3","out4","out5","translate","rad","aa","ac","atx","ab","ad","aty","st","sin","ct","cos","vx","vy","det","axisDefault","valueAxisDefault","valueAxis","defaultsShow","RadarModel","extendComponentModel","boundaryGap","axisLine","axisTick","axisLabel","nameTextStyle","showName","nameFormatter","nameGap","triggerEvent","indicatorModels","indicatorOpt","iNameTextStyle","nameLocation","indName","getIndicatorModels","radius","splitLine","splitArea","indicator","coordsOffsetMap","mapType","coordFix","cp","BaseBarSeries","getProgressive","getProgressiveThreshold","progressiveThreshold","largeThreshold","roundCap","showBackground","backgroundStyle","borderType","borderRadius","$forEach","arrayMethodIsStrict","arrayMethodUsesToLength","STRICT_METHOD","USES_TO_LENGTH","callbackfn","register","records","initGlobalListeners","record","useHandler","eventType","dis","makeDispatchAction","dispatchTooltipFinally","pendings","initialized","doEnter","onLeave","actuallyPayload","showLen","showTip","hideLen","hideTip","currTrigger","pendingList","unregister","Scale","OrdinalMeta","scaleProto","OrdinalScale","ordinalMeta","_ordinalMeta","_extent","getOrdinal","rank","normalize","getTicks","ticks","getLabel","unionExtentFromData","unionExtent","getApproximateExtent","getOrdinalMeta","niceTicks","niceExtent","MarkerModel","tooltip","distance","Constructor","ChartView","Path","_createClipPathFromCoordSys","createClipPath","NORMAL_ITEM_STYLE_PATH","EMPHASIS_ITEM_STYLE_PATH","SKIP_PROPS","CandlestickView","_updateDrawMode","_isLargeDraw","_renderLarge","_renderNormal","incrementalPrepareRender","_clear","incrementalRender","_incrementalRenderLarge","_incrementalRenderNormal","isLargeDraw","needsClip","clipArea","getArea","hasValue","isNormalBoxClipped","createNormalBox","setBoxCommon","createLarge","clipPath","NormalBoxPath","buildPath","__simpleBox","lineTo","closePath","transInit","clipped","normalItemStyleModel","LargeBoxPath","__sign","largePoints","elP","elN","setLargeStyle","suffix","Style","Element","RectText","__clipPaths","__dirty","dragging","rectHover","beforeBrush","afterBrush","rectContain","__dirtyText","__zr","refresh","animateStyle","attrKV","calculateTextPosition","updateDataSelected","hasAnimation","selectedOffset","toggleItemSelected","midAngle","PiePiece","sector","piePieceProto","firstCreate","labelText","sectorShape","animationTypeUpdate","setShape","animationType","lineJoin","withAnimation","_updateLabel","hoverIgnore","normalIgnore","labelLayout","targetLineShape","linePoints","targetTextStyle","labelLineModel","labelLineHoverModel","inside","verticalAlign","PieView","sectorGroup","_sectorGroup","onSectorClick","piePiece","_createClipPath","clockwise","initOrUpdate","containPoint","getBuiltIn","simpleLayout","simpleLayoutEdge","eachEdge","curveness","node1","node2","ITERATOR","SAFE_CLOSING","called","iteratorWithReturn","SKIP_CLOSING","ITERATION_SUPPORT","Polar","_axisHelper","CoordinateSystem","resizePolar","polarModel","getRadiusAxis","updatePolarScale","onBand","setAxis","polarCreator","polarList","findAxisModel","angleAxisModel","queryComponents","userAgent","V8_VERSION","SPECIES","METHOD_NAME","foo","Boolean","getSeriesStackId","getAxisKey","barLayoutPolar","lastStackCoords","barWidthAndOffset","calRadialBar","filter","getSeriesByType","isSeriesFiltered","axisKey","stackId","columnLayoutInfo","columnOffset","columnWidth","getOtherAxis","barMinHeight","barMinAngle","baseDim","stacked","clampLayout","valueAxisStart","baseValue","baseCoord","radiusSpan","dataToRadius","angle","dataToAngle","angleSpan","barSeries","columnsMap","axisExtent","columnsOnAxis","remainedWidth","autoWidthCount","categoryGap","stacks","maxWidth","barGap","barCategoryGap","coordSysName","barGapPercent","autoWidth","column","stack","lastColumn","widthSum","mathCos","mathSin","selectableMixin","geoCreator","GeoModel","layoutMode","getFilledRegions","_optionModelMap","reduce","optionModelMap","regionOpt","updateSelectedMap","aspectScale","boundingCoords","scaleLimit","getFormattedLabel","status","formatter","setZoom","setCenter","arrySlice","Eventful","eventProcessor","_$handlers","_$eventProcessor","normalizeQuery","host","eventful","isOnce","_h","h","wrap","one","callAtLast","zrEventfulCallAtLast","lastWrap","splice","isSilent","newList","args","argLen","hItem","afterTrigger","triggerWithContext","getMin","rangeStart","eqNaN","getMax","rangeEnd","getNeedCrossZero","getCoordSysModel","setRange","resetRange","coordinateSystemCreators","CoordinateSystemManager","_coordinateSystems","coordinateSystems","creater","concat","getCoordinateSystems","coordinateSystemCreator","curve","bbox","devicePixelRatio","CMD","M","L","Q","Z","min2","max2","mathMin","mathMax","mathSqrt","mathAbs","hasTypedArray","PathProxy","notSaveData","_saveData","_ctx","_xi","_yi","_x0","_y0","_ux","_uy","_len","_lineDash","_dashOffset","_dashIdx","_dashSum","setScale","getContext","beginPath","addData","exceedUnit","_needsDash","_dashedLineTo","bezierCurveTo","x1","y1","x2","y2","x3","y3","_dashedBezierTo","quadraticCurveTo","_dashedQuadraticTo","arc","anticlockwise","arcTo","x0","y0","toStatic","setLineDash","lineDash","lineDashSum","setLineDashOffset","setData","appendPath","appendSize","appendPathData","cmd","_expandData","_prevCmd","newData","dash","dashSum","nDash","cubicAt","bezierLen","tmpLen","Number","MAX_VALUE","xi","yi","fromLine","fromCubic","fromQuadratic","ry","fromArc","rebuildPath","ux","uy","theta","dTheta","psi","fs","scaleX","isEllipse","features","ctor","_format","encodeHTML","layoutInfo","leaves","leavesModel","nodeData","wrapMethod","isExpand","treeDepth","expandAndCollapse","expandTreeDepth","initialTreeDepth","getRawDataItem","collapsed","formatTooltip","realRoot","edgeShape","edgeForkPosition","roam","nodeScaleRatio","animationDuration","animationDurationUpdate","numberUtil","scaleHelper","IntervalScale","intervalScaleProto","mathCeil","ceil","mathFloor","ONE_SECOND","ONE_MINUTE","ONE_HOUR","ONE_DAY","bisect","TimeScale","stepLvl","_stepLvl","date","Date","formatTime","getSetting","getFullYear","getMonth","getDate","minInterval","maxInterval","_interval","fixMin","fixMax","approxTickNum","span","approxInterval","scaleLevelsLen","scaleLevels","level","yearSpan","yearStep","nice","timezoneOffset","getTimezoneOffset","fixExtent","_niceExtent","parseDate","useUTC","useEncodeDefaulter","step","smoothMonotone","showSymbol","showAllSymbol","connectNulls","sampling","hoverLayerThreshold","Component","parallelAxisIndex","axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandRate","axisExpandDebounce","axisExpandSlideTriggerArea","axisExpandTriggerOn","parallelAxisDefault","mergeOption","_initDimensions","setAxisExpand","axisModels","dependentModels","parallelAxis","isArrayIteratorMethod","getIteratorMethod","callWithSafeIterationClosing","Result","stopped","iterate","iterable","AS_ENTRIES","IS_ITERATOR","iterator","iterFn","boundFunction","wx","getSystemInfoSync","browser","os","svgSupported","touchEventsSupported","domSupported","worker","navigator","detect","ua","firefox","ie","weChat","version","SVGRect","pointerEventsSupported","hierNode","defaultAncestor","ancestor","prelim","modifier","change","thread","pop","firstWalk","separation","siblings","subtreeW","executeShifts","midPoint","apportion","secondWalk","nodeX","defaultSeparation","radialCoordinate","radialCoor","getViewRect","getBoxLayoutParams","subtreeV","nodeOutRight","nodeInRight","nodeOutLeft","nodeInLeft","sumOutRight","sumInRight","sumOutLeft","sumInLeft","nextRight","nextLeft","moveSubtree","nextAncestor","wl","wr","pathTool","colorTool","Image","Ring","BezierCurve","Arc","LinearGradient","RadialGradient","IncrementalDisplayable","subPixelOptimizeUtil","EMPTY_OBJ","Z2_EMPHASIS_LIFT","CACHED_LABEL_STYLE_PROPERTIES","textBorderColor","textBorderWidth","EMPHASIS","NORMAL","_highlightNextDigit","_highlightKeyMap","_customShapeMap","extendShape","extendPath","pathData","extendFromString","registerShape","ShapeClass","getShapeClass","makePath","createFromString","centerGraphic","resizePath","makeImage","imageUrl","img","pathRect","subPixelOptimizeLine","param","subPixelOptimizeRect","hasFillOrStroke","fillOrStroke","liftedColorMap","liftedColorCount","liftColor","liftedColor","lift","cacheElementStl","__hoverStlDirty","__hoverStl","normalStyle","__cachedNormalStl","__cachedNormalZ2","singleEnterEmphasis","hoverStl","__highlighted","isGroup","elTarget","targetStyle","addHover","rollbackDefaultTextStyle","extendFrom","setDefaultHoverFillStroke","applyDefaultTextStyle","prop","singleEnterNormal","highlighted","removeHover","normalStl","normalZ2","traverseUpdate","updater","commonParam","__highDownOnUpdate","setElementHoverStyle","onElementMouseOver","shouldSilent","__highByOuter","onElementMouseOut","onElementEmphasisEvent","highlightDigit","onElementNormalEvent","__highDownSilentOnTouch","zrByTouch","setAsHighDownDispatcher","asDispatcher","disable","__highDownDispatcher","isHighDownDispatcher","getHighlightDigit","highlightKey","emphasisStyle","normalModel","emphasisModel","normalSpecified","emphasisSpecified","baseText","labelProp","showNormal","showEmphasis","normalStyleText","emphasisStyleText","setTextStyle","modifyLabelStyle","normalStyleProps","emphasisStyleProps","textStyle","specifiedTextStyle","isEmphasis","setTextStyleCommon","setText","defaultColor","textPosition","getTextPosition","textOffset","textRotation","textDistance","richResult","globalTextStyle","richItemNames","getRichItemNames","richTextStyle","setTokenTextStyle","rich","forceRich","richItemNameMap","isBlock","getAutoColor","textStroke","textStrokeWidth","insideRollbackOpt","fontStyle","fontWeight","fontFamily","textLineHeight","textWidth","textHeight","textTag","disableBox","textBackgroundColor","textPadding","textBorderRadius","textBoxShadowColor","textBoxShadowBlur","textBoxShadowOffsetX","textBoxShadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","insideRollback","useInsideStyleCache","useAutoColorCache","gTextStyleModel","trim","animateOrSetProps","isUpdate","animatableModel","animationEnabled","postfix","animationDelay","getAnimationDelayParams","getTransform","mat","transformDirection","direction","hBase","vBase","vertex","groupTransition","g1","g2","elMap1","getElMap","anid","oldEl","newProp","getAnimatableProps","g","elMap","clipPointsByRect","clipRectByRect","targetRect","iconStr","linePolygonIntersect","a1x","a1y","a2x","a2y","lineLineIntersect","b1x","b1y","b2x","b2y","mx","my","nx","ny","nmCrossProduct","crossProduct2d","nearZero","b1a1x","b1a1y","eventTool","throttle","DataZoomView","sliderMove","linearMap","asc","DEFAULT_LOCATION_EDGE_GAP","DEFAULT_FRAME_BORDER_WIDTH","DEFAULT_FILLER_SIZE","HORIZONTAL","VERTICAL","LABEL_GAP","SHOW_DATA_SHADOW_SERIES_TYPE","SliderZoomView","_displayables","_orient","_range","_handleEnds","_size","_handleWidth","_handleHeight","_location","_dragging","_dataShadowInfo","dataZoomModel","_buildView","_updateView","_resetLocation","_resetInterval","barGroup","_renderBackground","_renderHandle","_renderDataShadow","_positionGroup","coordRect","_findCoordRect","ecSize","positionInfo","layoutParams","getLayoutParams","layoutRect","location","targetAxisModel","getFirstTargetAxisModel","otherAxisInverse","_getViewExtent","_onClickPanelClick","info","_prepareDataShadowInfo","series","otherDim","getShadowDim","otherDataExtent","getDataExtent","otherOffset","lastIsEmpty","otherShadowExtent","thisShadowExtent","areaPoints","thisCoord","stride","otherCoord","showDataShadow","eachTargetAxis","dimNames","seriesModels","getAxisProxy","getTargetSeriesModels","thisAxis","getOtherDim","thisDim","displaybles","handles","handleLabels","filler","getCursor","_onDragMove","ondragstart","_showDataInfo","ondragend","_onDragEnd","onmouseover","onmouseout","lineWidth","handleIndex","bRect","handleColor","getPercentRange","viewExtent","_updateInterval","delta","handleEnds","viewExtend","minMaxSpan","findRepresentativeAxisProxy","getMinMaxSpan","percentExtent","minSpan","maxSpan","lastRange","nonRealtime","handleInterval","handle","handleHeight","_updateDataInfo","labelTexts","axisProxy","getAxisModel","dataInterval","calculateDataWindow","end","valueWindow","getDataValueWindow","_formatLabel","orderedHandleEnds","setLabel","barTransform","textPoint","labelFormatter","labelPrecision","getPixelPrecision","valueStr","showOrHide","changed","realtime","_dispatchZoomAction","localPoint","offsetX","offsetY","dataZoomId","getTargetCoordInfo","coordInfoList","Graph","edges","directed","addNode","linkNameList","validEdges","linkCount","link","addEdge","coordSysCtor","dimensionNames","edgeData","datas","datasAttr","integer","IndicatorAxis","getScaleExtent","LogScale","Radar","radarModel","_indicatorAxes","indicatorModel","indicatorAxis","resize","getIndicatorAxes","indicatorIndex","coordToPoint","pointToData","closestAxis","radian","minRadianDiff","closestAxisIdx","coordToData","viewWidth","viewHeight","viewSize","indicatorAxes","radarSeries","increaseInterval","exp10","pow","log","LN10","rawExtent","fixedMin","fixedMax","getInterval","setInterval","nicedSplitNumber","radarList","radar","redefine","setGlobal","copyConstructorProperties","isForced","FORCED","targetProperty","sourceProperty","descriptor","TARGET","GLOBAL","STATIC","stat","noTargetGet","forced","sham","categoryFilter","categoryVisual","edgeVisual","circularLayout","forceLayout","createView","registerProcessor","POST_CHART_LAYOUT","registerCoordinateSystem","internalObjectKeys","enumBugKeys","hiddenKeys","dataFormatMixin","addCommas","fillLabel","mergeDefaultAndTheme","_mergeOption","hostSeries","__hostSeries","newOpt","createdBySelf","modelPropName","markerOpt","markerModel","getRawValue","formattedValue","html","getSortedIndices","valueArr","mapArray","isAscending","textX","textY","labelPosition","isLabelInside","labelLineLen","viewRect","sizeExtent","getLinePoints","offY","nextIdx","_poly","DataDiffer","_layers","layerSeries","getLayerSeries","keyGetter","dataDiffer","_layersSeries","newLayersGroups","process","oldLayersGroups","points0","points1","textLayout","margin","layerGroup","stackedOnPoints","stackedOnSmooth","smoothConstraint","createGridClipShape","rectEl","TO_STRING","RegExpPrototype","nativeToString","NOT_GENERIC","INCORRECT_NAME","rf","unsafe","definePropertyModule","CONSTRUCTOR_NAME","configurable","POSSIBLE_STYLES","compatEC2ItemStyle","itemStyleOpt","styleName","normalItemStyleOpt","normal","emphasisItemStyleOpt","convertNormalEmphasis","optType","useExtend","normalOpt","removeEC3NormalStatus","compatTextStyle","labelOptSingle","TEXT_STYLE_OPTIONS","compatEC3CommonStyles","processSeries","seriesOpt","markPoint","markLine","markArea","links","mpData","mlData","breadcrumb","toArr","toObj","isTheme","axes","axisName","axisOpt","axisPointer","parallel","parallelOpt","calendar","calendarOpt","radarOpt","geoOpt","regionObj","timeline","timelineOpt","toolbox","toolboxOpt","feature","featureOpt","properties","excludes","includes","normalizeComponent","scriptExports","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","$vnode","ssrContext","__VUE_SSR_CONTEXT__","_registeredComponents","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","existing","beforeCreate","PI2","RADIAN","minAngle","validDataCount","unitRadian","roseType","stillShowZeroSum","restAngle","valueSumLargerThanMinAngle","currentAngle","dir","paletteScope","categoriesData","getCategoriesData","categoryNameIdxMap","getColorFromPalette","itemStyleList","category","legend","title","keep","dataView","lang","dataZoom","back","magicType","line","bar","tiled","restore","saveAsImage","typeNames","pie","scatter","effectScatter","treemap","boxplot","candlestick","heatmap","sankey","funnel","gauge","pictorialBar","themeRiver","sunburst","aria","general","withTitle","withoutTitle","single","prefix","withName","withoutName","multiple","middle","allData","partialData","isDataItemOption","DefaultDataProvider","dimSize","seriesDataToSource","_source","_offset","_dimSize","methods","providerMethods","providerProto","pure","persistent","getItem","appendData","appendDataSimply","countSimply","getItemSimply","col","dims","newCol","oldCol","clean","rawValueGetters","arrayRows","getRawValueSimply","objectRows","keyedColumns","original","typedArray","defaultDimValueGetters","getDimValueSimply","converDataValue","_dimensionInfos","_rawData","dimInfo","parseAndCollect","retrieveRawValue","getProvider","getDimensionInfo","retrieveRawAttr","fixShadow","_constant","ContextCachedBy","STYLE_COMMON_PROPS","createLinearGradient","canvasGradient","createRadialGradient","fillOpacity","strokeOpacity","lineDashOffset","textRect","transformText","textOrigin","truncate","blend","prevStyle","notCheckCache","__attrCachedBy","STYLE_BIND","fillStyle","strokeStyle","globalAlpha","globalCompositeOperation","hasStroke","getLineScale","hasFill","otherStyle","overwrite","newStyle","getGradient","colorStops","addColorStop","styleProto","hasKeys","supplementVisualOption","mappings","createMappings","visualData","isValidType","__hidden","__alphaForOpacity","Creater","replaceVisualOption","keys","scope","visualTypesMap","eachItem","valueOrIndex","rawDataItem","visualMap","prepareVisualTypes","incrementalApplyVisual","getTargetSeries","seriesModelMap","modifyOutputEnd","overallReset","filterData","percentRange","getDataPercentWindow","valueRange","setCalculatedRange","startValue","endValue","debugMode","defer","channel","port","IS_IOS","setImmediate","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","runner","listener","post","postMessage","protocol","Function","nextTick","now","port2","port1","onmessage","addEventListener","importScripts","versions","v8","VERSION","LARGE_ARRAY_SIZE","CORE_ERROR_TEXT","FUNC_ERROR_TEXT","HASH_UNDEFINED","MAX_MEMOIZE_SIZE","PLACEHOLDER","CLONE_DEEP_FLAG","CLONE_FLAT_FLAG","CLONE_SYMBOLS_FLAG","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","WRAP_BIND_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_BOUND_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_ARY_FLAG","WRAP_REARG_FLAG","WRAP_FLIP_FLAG","DEFAULT_TRUNC_LENGTH","DEFAULT_TRUNC_OMISSION","HOT_COUNT","HOT_SPAN","LAZY_FILTER_FLAG","LAZY_MAP_FLAG","LAZY_WHILE_FLAG","INFINITY","MAX_SAFE_INTEGER","MAX_INTEGER","NAN","MAX_ARRAY_LENGTH","MAX_ARRAY_INDEX","HALF_MAX_ARRAY_LENGTH","wrapFlags","argsTag","arrayTag","asyncTag","boolTag","dateTag","domExcTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","symbolTag","undefinedTag","weakMapTag","weakSetTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","reEscapedHtml","reUnescapedHtml","reHasEscapedHtml","reHasUnescapedHtml","reEscape","reEvaluate","reInterpolate","reIsDeepProp","reIsPlainProp","rePropName","reRegExpChar","reHasRegExpChar","reTrim","reTrimStart","reTrimEnd","reWrapComment","reWrapDetails","reSplitDetails","reAsciiWord","reEscapeChar","reEsTemplate","reFlags","reIsBadHex","reIsBinary","reIsHostCtor","reIsOctal","reIsUint","reLatin","reNoMatch","reUnescapedString","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsVarRange","rsBreakRange","rsApos","rsAstral","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsZWJ","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsOptVar","rsOptJoin","rsOrdLower","rsOrdUpper","rsSeq","rsEmoji","rsSymbol","reApos","reComboMark","reUnicode","reUnicodeWord","reHasUnicode","reHasUnicodeWord","contextProps","templateCounter","typedArrayTags","cloneableTags","deburredLetters","htmlEscapes","htmlUnescapes","stringEscapes","freeParseFloat","parseFloat","freeParseInt","freeGlobal","freeSelf","freeExports","nodeType","freeModule","moduleExports","freeProcess","nodeUtil","types","binding","nodeIsArrayBuffer","isArrayBuffer","nodeIsDate","isDate","nodeIsMap","isMap","nodeIsRegExp","nodeIsSet","isSet","nodeIsTypedArray","func","thisArg","arrayAggregator","iteratee","accumulator","arrayEach","arrayEachRight","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","values","arrayReduce","initAccum","arrayReduceRight","arraySome","asciiSize","baseProperty","asciiToArray","asciiWords","baseFindKey","collection","eachFunc","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseIndexOfWith","baseMean","baseSum","basePropertyOf","baseReduce","baseSortBy","comparer","baseTimes","baseToPairs","baseUnary","baseValues","cacheHas","cache","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","deburrLetter","escapeHtmlChar","escapeStringChar","chr","hasUnicode","hasUnicodeWord","iteratorToArray","mapToArray","overArg","arg","replaceHolders","setToArray","setToPairs","strictLastIndexOf","stringSize","unicodeSize","stringToArray","unicodeToArray","unescapeHtmlChar","unicodeWords","runInContext","_","pick","arrayProto","funcProto","objectProto","coreJsData","funcToString","idCounter","maskSrcKey","IE_PROTO","nativeObjectToString","objectCtorString","oldDash","reIsNative","Buffer","Uint8Array","allocUnsafe","getPrototype","getPrototypeOf","objectCreate","propertyIsEnumerable","spreadableSymbol","isConcatSpreadable","symIterator","symToStringTag","getNative","ctxClearTimeout","ctxNow","ctxSetTimeout","nativeCeil","nativeFloor","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeIsFinite","nativeJoin","nativeKeys","nativeMax","nativeMin","nativeNow","nativeParseInt","nativeRandom","random","nativeReverse","DataView","Map","Set","WeakMap","nativeCreate","metaMap","realNames","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolValueOf","valueOf","symbolToString","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseCreate","proto","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","__views__","lazyClone","copyArray","lazyReverse","lazyValue","isArr","isRight","arrLength","view","getView","iteratees","iterLength","takeCount","baseWrapperValue","outer","iterIndex","computed","Hash","entries","entry","hashClear","__data__","hashDelete","hashGet","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isType","skipIndexes","isIndex","arraySample","baseRandom","arraySampleSize","shuffleSelf","baseClamp","arrayShuffle","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","copyObject","baseAssignIn","keysIn","baseAt","skip","number","lower","upper","baseClone","bitmask","customizer","isDeep","isFlat","isFull","initCloneArray","getTag","isFunc","cloneBuffer","initCloneObject","copySymbolsIn","copySymbols","initCloneByTag","subValue","keysFunc","getAllKeysIn","getAllKeys","baseConforms","baseConformsTo","baseDelay","wait","baseDifference","isCommon","valuesLength","valuesIndex","templateSettings","createBaseEach","baseForOwn","baseEachRight","baseForOwnRight","baseEvery","baseExtremum","isSymbol","baseFill","baseFilter","baseFlatten","isStrict","isFlattenable","baseFor","createBaseFor","baseForRight","baseFunctions","baseGet","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseInRange","baseIntersection","arrays","othLength","othIndex","caches","maxLength","seen","baseInverter","baseInvoke","baseIsArguments","baseIsArrayBuffer","baseIsDate","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","baseIsMatch","matchData","noCustomizer","srcValue","baseIsNative","isMasked","pattern","baseIsRegExp","baseIsSet","baseIsTypedArray","isLength","baseIteratee","baseMatchesProperty","baseMatches","baseKeys","isPrototype","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","newValue","safeGet","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","isPlainObject","toPlainObject","baseNth","baseOrderBy","orders","getIteratee","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","basePullAll","basePullAt","indexes","previous","baseUnset","baseRange","baseRepeat","baseRest","setToString","overRest","baseSample","baseSampleSize","nested","baseSetData","baseSetToString","constant","baseShuffle","baseSlice","baseSome","baseSortedIndex","retHighest","low","high","baseSortedIndexBy","valIsNaN","valIsNull","valIsSymbol","valIsUndefined","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","setLow","baseSortedUniq","baseToNumber","baseToString","baseUniq","createSet","seenIndex","baseUpdate","baseWhile","isDrop","actions","baseXor","baseZipObject","assignFunc","valsLength","castArrayLikeObject","castFunction","stringToPath","castRest","castSlice","buffer","cloneArrayBuffer","arrayBuffer","byteLength","cloneDataView","byteOffset","cloneRegExp","cloneSymbol","compareAscending","valIsDefined","valIsReflexive","objCriteria","othCriteria","ordersLength","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","createBind","isBind","Ctor","createCtor","wrapper","createCaseFirst","charAt","trailing","createCompounder","words","deburr","thisBinding","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","createFlow","flatRest","funcs","prereq","thru","getFuncName","funcName","isLaziable","plant","partialsRight","holdersRight","argPos","ary","isAry","isBindKey","isFlip","holdersCount","newHolders","reorder","createInverter","toIteratee","createMathOperation","operator","defaultValue","createOver","arrayFunc","createPadding","chars","charsLength","createPartial","createRange","toFinite","createRelationalOperation","toNumber","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","setWrapToString","createRound","pair","createToPairs","createWrap","mergeData","customDefaultsAssignIn","customDefaultsMerge","customOmitClone","isPartial","arrValue","othValue","compared","convert","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatten","otherFunc","isKeyable","isOwn","unmasked","stubArray","transforms","getWrapDetails","hasPath","hasFunc","input","insertWrapDetails","details","ArrayBuffer","ctorString","isMaskable","stubFalse","memoizeCapped","memoize","srcBitmask","newBitmask","isCombo","otherArgs","oldArray","shortOut","reference","updateWrapDetails","lastCalled","stamp","rand","charCodeAt","quote","subString","compact","difference","differenceBy","differenceWith","drop","dropRight","dropRightWhile","dropWhile","findIndex","findLastIndex","flattenDeep","flattenDepth","fromPairs","initial","intersection","mapped","intersectionBy","intersectionWith","lastIndexOf","nth","pull","pullAll","pullAllBy","pullAllWith","pullAt","sortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","sortedUniq","sortedUniqBy","tail","take","takeRight","takeRightWhile","takeWhile","union","unionBy","unionWith","uniq","uniqBy","uniqWith","unzip","unzipWith","without","xor","xorBy","xorWith","zip","zipObject","zipObjectDeep","zipWith","chain","tap","interceptor","wrapperAt","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","wrapperReverse","wrapped","wrapperValue","countBy","every","find","findLast","flatMap","flatMapDeep","flatMapDepth","forEachRight","groupBy","invokeMap","keyBy","orderBy","partition","reduceRight","negate","sampleSize","shuffle","some","sortBy","after","before","bindKey","curryRight","debounce","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","invokeFunc","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","flip","resolver","memoized","Cache","once","overArgs","funcsLength","partial","partialRight","rearg","rest","spread","unary","castArray","cloneWith","cloneDeep","cloneDeepWith","conformsTo","gt","gte","isBoolean","isElement","isEqual","isEqualWith","isError","isInteger","isMatch","isMatchWith","isNumber","isNative","isNull","isNil","isSafeInteger","isUndefined","isWeakMap","isWeakSet","lt","lte","remainder","isBinary","toSafeInteger","assign","assignIn","assignInWith","assignWith","at","propsIndex","propsLength","defaultsDeep","mergeWith","findKey","findLastKey","forIn","forInRight","forOwn","forOwnRight","functions","functionsIn","invertBy","invoke","mapKeys","mapValues","omit","omitBy","pickBy","setWith","toPairs","toPairsIn","isArrLike","unset","updateWith","valuesIn","clamp","inRange","floating","temp","word","toLowerCase","capitalize","upperFirst","endsWith","escape","escapeRegExp","kebabCase","lowerCase","lowerFirst","pad","strLength","padEnd","padStart","radix","snakeCase","startCase","startsWith","template","settings","isEscaping","isEvaluating","imports","importsKeys","importsValues","interpolate","reDelimiters","evaluate","sourceURL","escapeValue","interpolateValue","esTemplateValue","evaluateValue","variable","attempt","toLower","toUpper","toUpperCase","trimEnd","trimStart","omission","search","substring","newEnd","unescape","upperCase","bindAll","methodNames","cond","conforms","defaultTo","flow","flowRight","matches","matchesProperty","methodOf","noConflict","nthArg","over","overEvery","overSome","propertyOf","rangeRight","stubObject","stubString","stubTrue","times","toPath","uniqueId","augend","addend","divide","dividend","divisor","maxBy","mean","meanBy","minBy","multiply","multiplier","multiplicand","subtract","minuend","subtrahend","sumBy","entriesIn","extendWith","eachRight","first","isFilter","takeName","dropName","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","commit","toJSON","OTHER_DIMENSIONS","summarizeDimensions","summary","notExtraCoordDimMap","defaultedLabel","defaultedTooltip","userOutput","dimItem","coordDim","coordDimIndex","getOrCreateEncodeArr","isExtraCoord","mayLabelDimType","defaultTooltip","encodeArr","otherDims","dataDimsOnCoord","encodeFirstDimNotExtra","dimArr","encodeLabel","encodeTooltip","getDimensionTypeByAxis","applyMixin","Vue","vuexInit","_init","store","$store","devtoolHook","__VUE_DEVTOOLS_GLOBAL_HOOK__","devtoolPlugin","_devtoolHook","emit","targetState","replaceState","subscribe","mutation","prepend","subscribeAction","forEachValue","isPromise","Module","rawModule","runtime","_children","_rawModule","rawState","prototypeAccessors","namespaced","getChild","hasChild","mutations","getters","forEachChild","forEachGetter","forEachAction","forEachMutation","defineProperties","ModuleCollection","rawRootModule","targetModule","newModule","getNamespace","namespace","this$1","rawChildModule","isRegistered","Store","install","plugins","strict","_committing","_actions","_actionSubscribers","_mutations","_wrappedGetters","_modules","_modulesNamespaceMap","_subscribers","_watcherVM","_makeLocalGettersCache","ref","installModule","resetStoreVM","plugin","useDevtools","devtools","config","prototypeAccessors$1","genericSubscribe","subs","resetStore","hot","oldVm","_vm","wrappedGetters","$$state","enableStrictMode","_withCommit","$destroy","rootState","isRoot","parentState","getNestedState","moduleName","local","makeLocalContext","namespacedType","registerMutation","registerGetter","noNamespace","_type","_payload","_options","unifyObjectStyle","makeLocalGetters","gettersProxy","splitPos","localType","rootGetters","catch","rawGetter","$watch","deep","sync","_Vue","sub","watch","registerModule","preserveState","unregisterModule","delete","hasModule","hotUpdate","newOptions","committing","mapState","normalizeNamespace","states","normalizeMap","getModuleByNamespace","vuex","mapMutations","mapGetters","mapActions","createNamespacedHelpers","isValidMap","barPolar","borderColorQuery","globalColors","eachRawSeriesByType","defaulColor","legendSymbol","getMarkerPosition","clampData","offsetIndex","progressiveChunkMode","Ellipse","_path","DILIMITER_REG","parseXML","svg","parser","DOMParser","parseFromString","firstChild","nodeName","nextSibling","SVGParser","_defs","_root","_isDefine","_isText","xml","viewBox","parseAttributes","viewBoxRect","viewBoxTransform","_parseNode","viewBoxArr","makeViewBoxTransform","ignoreViewBox","elRoot","ignoreRootClip","xmlNode","parentGroup","defineParsers","def","nodeParsers","_parseText","_textX","_textY","textContent","inheritStyle","circle","ellipse","parsePoints","gradient","_parseGradientColorStops","stopColor","__inheritedStyle","pointsString","attributesMap","defs","onlyInlineStyle","zrStyle","isTextEl","parseTransformAttribute","parseStyleAttribute","svgAttrName","attrValue","elFillProp","elStrokeProp","getPaint","elPropName","textBaseline","urlRegex","urlMatch","url","transformRegex","transformOps","warn","styleRegex","styleRegResult","styleList","viewBoxScale","viewBoxPosition","parseSVG","DEFAULT_BAR_BOUND","ContinuousModel","calculable","hoverLinkDataSize","hoverLinkOnHandle","_resetRange","resetItemSize","auto","getSelected","oVals","getColorStopValues","iVals","iIdx","oIdx","iLen","oLen","stopsLen","stopValues","getAxis","markerHelper","LineDraw","MarkerView","markLineTransform","mlModel","mlType","axisInfo","getAxisInfo","valueDataDim","numCalculate","valueIndex","baseIndex","mlFrom","mlTo","dataTransform","isInifinity","ifMarkLineHasOnlyDim","fromCoord","toCoord","otherDimIndex","containData","markLineFilter","dataFilter","updateSingleMarkerEndLayout","isFrom","xPx","yPx","markLineModel","fromData","__from","toData","__to","markerGroupMap","renderSeries","seriesData","lineDrawMap","lineDraw","updateDataVisualAndLayout","lineColor","dataModel","__keep","coordDimsInfos","optData","dimValueGetter","util","_event","Dispatcher","requestAnimationFrame","Animation","stage","_clips","_running","_time","_pausedTime","_pauseStart","addAnimator","clips","removeAnimator","_update","getTime","deferredEvents","deferredClips","_needsRemove","fire","_startLoop","isFinished","sankeyLayout","sankeyVisual","_echarts","_export","DATAS","MAIN_DATA","main","linkAll","TRANSFERABLE_METHODS","transferInjection","cloneShallowInjection","CHANGABLE_METHODS","changeInjection","dataType","isMainData","linkSingle","cloneShallow","getLinkedData","Region","roams","InsideZoomView","allCoordIds","coordInfo","generateCoordId","coordModel","getRange","roamHandlers","coordId","containsPoint","directionInfo","getDirectionInfo","percentPoint","signal","pixelStart","pixelLength","pixel","pan","makeMover","oldX","oldY","newX","newY","scrollMove","scrollDelta","getPercentDelta","percentDelta","oldPoint","newPoint","angleExtent","pointToCoord","singleAxis","_dimensionHelper","_referHelper","getCoordSysInfoBySeries","coordSysDimDefs","registeredCoordSys","coordSysInfo","coordSysDims","axisMap","getDimensionsInfo","firstCategoryDimIndex","hasNameEncode","dimInfoList","generateCoord","categoryAxisModel","categoryAxisMap","stackCalculationInfo","setCalculationInfo","isNeedCompleteOrdinalData","itemOpt","defaultDimValueGetter","sampleItem","firstDataNotNull","isNumeric","_helper","BAR_BORDER_WIDTH_QUERY","LAYOUT_ATTRS","posDesc","pathForLineWidth","BarView","cartesian","coordSysRect","coordSysExtent","categoryDim","symbolMeta","getSymbolMeta","createBar","updateCommon","newIndex","oldIndex","pictorialShapeStr","getShapeStr","__pictorialShapeStr","updateBar","__pictorialSymbolMeta","removeBar","animationModel","symbolRepeat","symbolClip","symbolPosition","symbolPatternSize","symbolRepeatDirection","prepareBarLength","prepareSymbolSize","boundingLength","pxSign","prepareLineWidth","symbolScale","prepareLayoutInfo","valueLineWidth","repeatCutLength","symbolBoundingData","zeroPx","pxSignIdx","symbolBoundingExtent","convertToCoordOnAxis","categorySize","unitLength","pathLen","absBoundingLength","symbolMargin","hasEndGap","uLenWithMargin","endFix","repeatSpecified","repeatTimes","toIntTimes","mDiff","sizeFix","pathPosition","bundlePosition","barRectShape","createPath","createOrUpdateRepeatSymbols","bundle","__pictorialBundle","unit","eachPath","__pictorialAnimationIndex","__pictorialRepeatTimes","updateAttr","makeTarget","updateHoverAnimation","onMouseOver","onMouseOut","createOrUpdateSingleSymbol","mainPath","__pictorialMainPath","createOrUpdateBarRect","rectShape","barRect","__pictorialBarRect","createOrUpdateClip","__pictorialClipPath","labelRect","pathes","immediateAttrs","animationAttrs","barRectHoverStyle","barPositionOutside","roundedTimes","SunburstPiece","windowOpen","ROOT_TO_NODE_ACTION","SunburstView","virtualRoot","newRoot","getViewRoot","renderLabelForZeroData","newChildren","oldChildren","_oldChildren","dualTravel","renderRollUp","highlightPolicy","onEmphasis","unhighlight","virtualPiece","onNormal","getKey","processNode","newId","oldId","newNode","oldNode","doRenderNode","removeNode","viewRoot","_onclickEvent","_rootToNode","_initEvents","targetFound","nodeClick","linkTarget","targetNode","treeRoot","transformPath","vMag","vRatio","u","vAngle","acos","processArc","fa","psiDeg","xp","yp","lambda","cxp","cyp","commandReg","numberReg","createPathProxyFromString","prevCmd","cpx","cpy","subpathX","subpathY","cmdList","cmdText","cmdStr","pLen","ctlPtx","ctlPty","createPathOptions","pathProxy","pathEls","pathList","pathEl","createPathProxy","__dirtyPath","pathBundle","TimelineView","_axis","_viewRect","_timer","_currentPointer","_mainGroup","_labelGroup","timelineModel","mainGroup","_createGroup","labelGroup","_createAxis","_renderAxisLabel","_position","_doPlayStop","_clearTimer","labelPosOpt","horizontal","vertical","playPosition","prevBtnPosition","nextBtnPosition","labelAlignMap","labelBaselineMap","rotationMap","mainLength","controlModel","showControl","controlSize","controlGap","sizePlusGap","labelRotation","controlPosition","showPlayBtn","showPrevBtn","showNextBtn","xLeft","xRight","labelAlign","labelBaseline","rotateOriginX","rotateOriginY","viewBound","getBound","mainBound","labelBound","mainPosition","labelsPosition","mainBoundIdx","toBound","setOrigin","targetGroup","fromPos","boundIdx","newGroup","_renderAxisLine","lineCap","_renderAxisTick","tickCoord","hoverStyleModel","symbolOpt","_changeTimeline","giveSymbol","labels","getViewLabels","labelItem","tickValue","normalLabelModel","formattedLabel","_renderControl","playState","getPlayState","makeBtn","iconPath","willRotate","btn","makeIcon","_handlePlayClick","_renderCurrentPointer","currentIndex","getCurrentIndex","pointerModel","onCreate","pointer","_handlePointerDrag","_handlePointerDragend","pointerMoveTo","onUpdate","nextState","_pointerChangeTimeline","mousePos","_toAxisCoord","_findNearestTick","handleFrame","trans","axisCoord","nextIndex","objPath","noAnimation","Iterators","DataZoomModel","SliderZoomModel","dataBackground","areaStyle","fillerColor","handleIcon","handleSize","handleStyle","showDetail","zoomLock","objectKeys","Properties","RADIAN_EPSILON","_trim","domain","subDomain","subRange","returnStr","arr","getPrecision","getPrecisionSafe","eIndex","dotIndex","pixelExtent","dataQuantity","sizeQuantity","getPercentWithPrecision","valueList","acc","digits","votesPerQuota","targetSeats","seats","votes","currentSum","NEGATIVE_INFINITY","maxId","remRadian","pi2","isRadianAroundZero","TIME_REG","hour","UTC","quantity","quantityExponent","exp","nf","exponent","quantile","ascArr","H","littleThan","currClose","_dataProvider","getTooltipMarker","formatTpl","getTooltipRenderMode","DIMENSION_LABEL_REG","rawValue","rawDataIndex","renderModeOption","renderMode","isSeries","componentSubType","marker","dimensionIndex","makeStyleMapper","getLineDash","lineType","dotSize","dashSize","Displayble","IncrementalDisplayble","_temporaryDisplayables","_cursor","notClear","clearDisplaybles","addDisplayable","displayable","notPersistent","addDisplayables","displayables","eachPendingDisplayable","childRect","localPos","setCurrentIndex","isIndexMax","setPlayState","resetOption","preventIncremental","coordSysCreator","blurSize","pointSize","maxOpacity","minOpacity","AxisProxy","eachAxisDim","xAxisIndex","yAxisIndex","filterMode","minValueSpan","maxValueSpan","rangeMode","_dataIntervalByAxis","_dataInfo","_axisProxies","_autoThrottle","_rangePropMode","inputRawOption","retrieveRawOption","settledOption","doInit","_setDefaultThrottle","updateRangeUse","_resetTarget","_giveAxisProxies","axisProxies","__dzAxisProxy","autoMode","_judgeAutoMode","axisIndexName","normalizeToArray","_autoSetAxisIndex","_autoSetOrient","hasIndexSpecified","autoAxisIndex","singleAxisModel","singleAxisIndex","axisIndices","_isSeriesHasAllAxesTypeOf","axisId","is","seriesAxisIndex","globalOption","firstAxisModel","setRawRange","getValueRange","axisDimName","hostedBy","getRangePropMode","rangePropMode","rangeModeInOption","percentSpecified","valueSpecified","InternalStateModule","defineIterator","STRING_ITERATOR","setInternalState","getInternalState","getterFor","iterated","HOVER_LINK_SIZE","HOVER_LINK_OUT","ContinuousView","_shapes","_dataInterval","_useHandle","_hoverLinkDataIndices","_hovering","_renderBar","dataRangeText","_enableHoverLinkToSeries","_enableHoverLinkFromSeries","endsIndex","_applyTransform","shapes","useHandle","_createBarGroup","outOfRange","createPolygon","_dragHandle","getTextRect","textSize","handleThumbs","handleLabelPoints","_createHandle","_createIndicator","onDrift","onDragEnd","handleThumb","createHandlePoints","handleLabel","handleLabelPoint","indicatorLabel","indicatorLabelPoint","isEnd","_clearHoverLinkToSeries","useHoverLinkOnHandle","_doHoverLinkToSeries","forSketch","outOfRangeHandleEnds","inRangeHandleEnds","visualInRange","_createBarVisual","visualOutOfRange","barColor","barPoints","_updateHandle","forceState","convertOpacityToAlpha","_makeColorGradient","symbolSizes","_createBarPoints","handlesColor","sampleNumber","currValue","_showIndicator","cursorValue","textValue","rangeSymbol","halfHoverLinkSize","createIndicatorPoints","_hoverLinkFromSeriesMouseOver","_hideIndicator","_clearHoverLinkFromSeries","cursorPos","hoverOnBar","getHalfHoverLinkSize","hoverRange","oldBatch","newBatch","resultBatches","compressBatches","_dispatchHighDown","isTargetSeries","element","isRange","extentMax","zrender","timsort","GlobalModel","ExtensionAPI","OptionManager","backwardCompat","_throttle","seriesColor","loadingDefault","Scheduler","lightTheme","darkTheme","mapDataStorage","parseClassType","TEST_FRAME_REMAIN_TIME","PRIORITY_PROCESSOR_FILTER","PRIORITY_PROCESSOR_SERIES_FILTER","PRIORITY_PROCESSOR_DATASTACK","PRIORITY_PROCESSOR_STATISTIC","PRIORITY_VISUAL_LAYOUT","PRIORITY_VISUAL_PROGRESSIVE_LAYOUT","PRIORITY_VISUAL_GLOBAL","PRIORITY_VISUAL_CHART","PRIORITY_VISUAL_POST_CHART_LAYOUT","PRIORITY_VISUAL_COMPONENT","PRIORITY_VISUAL_BRUSH","PROCESSOR","FILTER","SERIES_FILTER","STATISTIC","LAYOUT","PROGRESSIVE_LAYOUT","CHART","COMPONENT","IN_MAIN_PROCESS","OPTION_UPDATED","ACTION_REG","createRegisterEventWithLowercaseName","ignoreDisposed","_disposed","disposedWarning","MessageCenter","ECharts","dom","theme","themeStorage","_dom","defaultRenderer","renderer","_throttledZrFlush","_theme","_chartsViews","_chartsMap","_componentsViews","_componentsMap","_coordSysMgr","_api","createExtensionAPI","prioritySortFunc","__prio","visualFuncs","dataProcessorFuncs","_scheduler","_ecEventProcessor","EventProcessor","_messageCenter","_pendingActions","_onframe","bindRenderedEvent","setAsPrimitive","echartsProto","doConvertPixel","coordSysList","parseFinder","scheduler","prepare","updateMethods","flushPendingActions","triggerUpdatedEvent","unfinished","remainTime","startTime","performSeriesTasks","performDataProcessorTasks","updateStreamModes","performVisualTasks","getDom","setOption","notMerge","lazyUpdate","optionManager","optionPreprocessorFuncs","setTheme","getOption","getDevicePixelRatio","getRenderedCanvas","pixelRatio","getSvgDataURL","storage","getDisplayList","toDataURL","getDataURL","excludeComponents","excludesComponentViews","__viewId","getType","getConnectedDataURL","isSvg","groupId","MAX_NUMBER","connectedGroups","canvasList","instances","chart","canvas","getSvgDom","getBoundingClientRect","targetCanvas","createCanvas","getSvgRoot","connectedBackgroundColor","setBackgroundColor","refreshImmediately","containPixel","models","defaultMainType","dataIndexInside","indexOfRawIndex","getViewOfComponentModel","componentModel","getViewOfSeriesModel","prepareAndUpdate","coordSysMgr","restoreData","clearColorPalette","colorArr","stringify","performPostUpdateFuncs","ecIns","componentDirtyList","componentView","__alive","seriesDirtyMap","chartView","setDirty","dirtyMap","updateView","markUpdateMethod","updateVisual","restorePipelines","prepareStageTasks","prepareView","updateDirectly","condition","excludeSeriesId","callView","__model","chartsMap","doDispatchAction","payloadType","escapeConnect","actionWrap","actionInfo","cptType","updateMethod","payloads","batched","eventObj","eventObjBatch","isHighDown","batchItem","pendingActions","isComponent","viewList","viewMap","doPrepare","viewId","classType","Clazz","getClass","__id","__ecComponentInfo","renderTask","renderComponents","dirtyList","updateZ","updatePayload","perform","getPerformArgs","updateBlend","updateHoverLayerStatus","postUpdateFuncs","_loadingFX","optionChanged","showLoading","cfg","hideLoading","loadingEffects","makeActionFromEvent","eventActionMap","MOUSE_EVENT_NAMES","elCount","preventUsingHoverLayer","blendMode","ecInstance","getComponentByElement","modelInfo","eventInfo","eveName","isGlobalOut","targetEl","packedEvent","actionType","DOM_ATTRIBUTE_KEY","cptQuery","dataQuery","otherQuery","condCptType","suffixes","dataKeys","reserved","propSuffix","suffixPos","check","filterForExposedEvent","propOnHost","idBase","groupIdBase","enableConnect","STATUS_PENDING","STATUS_UPDATING","STATUS_UPDATED","STATUS_KEY","updateConnectedChartsStatus","charts","otherChart","otherCharts","existInstance","getInstanceByDom","connect","disConnect","disconnect","getInstanceById","registerTheme","preprocessorFunc","priority","processor","normalizeRegister","registerPostUpdate","postUpdateFunc","getCoordinateSystemDimensions","layoutTask","visualTask","targetList","defaultPriority","stageHandler","wrapStageHandler","__raw","registerLoading","loadingFx","setCanvasCreator","creator","$override","registerMap","geoJson","specialAreas","getMap","retrieveMap","geoJSON","dataTool","___ec_export","_core","textContain","textHelper","arrayJoin","NONE","mathRound","degree","round4","isAroundZero","pathHasFill","isText","pathHasStroke","svgEl","attrXLink","setAttributeNS","bindStyle","strokeWidth","strokeScale","miterLimit","pathDataToString","dataLength","nData","dThetaPositive","isCircle","unifiedTheta","svgPath","__svgEl","pathStr","svgTextDrawRectText","removeOldTextNode","svgImage","HTMLImageElement","dw","dh","__imageSrc","svgText","_tmpTextHostRect","_tmpTextBoxPos","_tmpTextTransform","TEXT_ALIGN_TO_ANCHRO","hostRect","elTransform","needTransformTextByHostEl","normalizeTextStyle","needDrawText","textSvgEl","__textSvgEl","textSvgElStyle","DEFAULT_FONT","computedFont","__computedFont","__styleFont","contentBlock","__textCotentBlock","parsePlainText","outerHeight","lineHeight","getBoxPosition","baseX","baseY","setTextTransform","boxY","adjustTextY","getTextXForPadding","canCacheByTextString","tspanList","__tspanList","tspanOriginLen","__canCacheByTextString","__text","updateTextLocation","textLines","nTextLines","tspan","singleLineText","__zrText","createTextNode","scaleAndAdd","lenSquare","lengthSquare","div","dot","distanceSquare","distSquare","lerp","$","LRU","kCSSColorTable","clampCssByte","clampCssAngle","clampCssFloat","parseCssInt","parseCssFloat","cssHueToRgb","lerpNumber","setRgba","copyRgba","colorCache","lastRemovedArr","putToCache","colorStr","rgbaArr","put","cached","op","ep","fname","substr","alpha","hsla2rgba","iv","hsla","rgba2hsla","G","B","vMin","vMax","deltaR","deltaG","deltaB","fastLerp","normalizedValue","colors","leftColor","rightColor","dv","fastMapToColor","fullOutput","mapToColor","modifyHSL","modifyAlpha","arrColor","Gradient","TooltipRichContent","findPointFromSeries","globalListener","axisPointerViewHelper","proxyRect","tooltipContent","_renderMode","_newLine","_tooltipContent","_tooltipModel","_ecModel","_lastDataByCoordSys","_alwaysShowContent","_initGlobalListener","_keepShow","triggerOn","_tryShow","_hide","_lastX","_lastY","_refreshUpdateTimeout","manuallyShowTip","_ticket","dataByCoordSys","tooltipOption","_manuallyAxisShowTip","pointInfo","findHover","manuallyHideTip","coordSysAxesInfo","buildTooltipModel","_showAxisTooltip","_showSeriesItemTooltip","_showComponentItemTooltip","_showOrMove","_showTimout","globalTooltipModel","singleDefaultHTML","singleParamsList","singleTooltipModel","newLine","markers","itemCoordSys","dataByAxis","axisValue","seriesDefaultHTML","valueLabel","getValueLabel","seriesDataIndices","valueLabelOpt","idxItem","dataParams","getAxisRawValue","axisValueLabel","seriesTooltip","newMarkers","firstLine","positionExpr","_updateContentNotChangedOnAxis","_updatePosition","_showTooltipContent","tooltipTrigger","defaultHtml","asyncTicket","tooltipOpt","subTooltipModel","cbTicket","contentSize","vAlign","calcTooltipPosition","refixTooltipPosition","isCenterAlign","confineTooltipPosition","lastCoordSys","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","lastItem","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","newIdxItem","modelCascade","resultModel","gapH","gapV","domWidth","domHeight","rectWidth","rectHeight","_clazz","enableClassExtend","enableClassCheck","lineStyleMixin","areaStyleMixin","textStyleMixin","itemStyleMixin","doGet","pathArr","getParent","getParentMethod","parsePath","thisParentModel","setReadOnly","customizeGetParent","Single","singles","actionTypes","handleRootToNode","targetInfo","retrieveTargetInfo","originViewRoot","aboveViewRoot","resetViewRoot","easingFuncs","_life","onrestart","globalTime","deltaTime","_startTime","easingFunc","schedule","restart","UNSCOPABLES","ArrayPrototype","MATCH","HIGHLIGHT_ACTION","handleHighlight","UNHIGHLIGHT_ACTION","handleUnhighlight","_createPolyline","polylineProto","_updateCommonStl","hoverLineStyle","legendSelectActionHandler","selectedMap","isToggleSelect","legendData","isItemSelected","rangeInfo","getRangeInfo","cellWidth","getCellWidth","cellHeight","getCellHeight","weeks","dayCount","allDay","SymbolDraw","EffectSymbol","pointsLayout","_symbolDraw","effectSymbolDraw","_updateGroupTransform","getRoamTransform","HeatmapLayer","getIsInPiecewiseRange","dataSpan","getIsInContinuousRange","isGeoCoordSys","visualMapOfThisSeries","targetSeries","_incrementalDisplayable","_renderOnCartesianAndCalendar","_renderOnGeo","itemStyleQuery","hoverItemStyleQuery","labelQuery","hoverLabelQuery","coordSysType","dataDims","dataToRect","contentShape","inRangeVisuals","targetVisuals","outOfRangeVisuals","hmLayer","_hmLayer","lng","lat","isInRange","getNormalizer","getColorMapper","curveTool","_graphHelper","v3","v2DistSquare","intersectCurveCircle","curvePoints","radiusSquare","_t","nextDiff","tmp0","quadraticSubdivide","pts","pts2","fromSymbol","toSymbol","__original","originalPoints","defaultConstructor","globalCoord","AxisPointerModel","snap","triggerTooltip","shadowStyle","axisModelCreator","AxisModel","gridIndex","gridId","getAxisType","extraOption","logError","_roamHelper","updateCenterAndZoom","seriesGroup","interactionMutex","pointerChecker","_opt","mousedownHandler","mousedown","mousemoveHandler","mousemove","mouseupHandler","mouseup","mousewheelHandler","mousewheel","pinchHandler","controlType","zoomOnMouseWheel","moveOnMouseMove","moveOnMouseWheel","preventDefaultMouseMove","isDragging","isPinching","_pinching","isMiddleOrRightButtonOnMouseUpDown","_x","_y","isAvailableBehavior","gestureEvent","isTaken","shouldZoom","shouldMove","wheelDelta","absWheelDeltaDelta","factor","checkPointerAndTrigger","absDelta","behaviorToCheck","contollerEvent","setting","_vector","v2Create","mathPow","EPSILON_NUMERIC","THREE_SQRT","ONE_THIRD","_v0","_v1","_v2","onet","cubicDerivativeAt","cubicRootAt","roots","t1","disc","K","discSqrt","Y1","Y2","T","ASqrt","cubicExtrema","extrema","cubicSubdivide","p01","p12","p23","p012","p123","p0123","cubicProjectPoint","prev","d1","d2","quadraticRootAt","quadraticExtremum","divider","quadraticProjectPoint","BaseAxisPointer","viewHelper","cartesianAxisHelper","CartesianAxisPointer","makeElOption","elOption","axisPointerModel","axisPointerType","otherExtent","getCartesian","getGlobalExtent","pixelValue","buildElStyle","pointerOption","pointerShapeBuilder","graphicKey","buildCartesianSingleLabelElOption","getHandleTransform","labelMargin","getTransformedPosition","updateHandleTransform","currPosition","cursorOtherValue","cursorPoint","tooltipOptions","targetShape","makeLineShape","getAxisDimIndex","shadow","makeRectShape","registerAxisPointerClass","fixClipWithShadow","unitX","unitY","ZText","MARK_UNUSED","MARK_USED","Definable","zrId","svgRoot","tagNames","markLabel","domName","_zrId","_svgRoot","_tagNames","_markLabel","_domName","nextId","getDefs","isForceCreating","insertBefore","addDom","removeDom","getDoms","doms","tagName","tags","markAllUnused","markUsed","removeUnused","getSvgProxy","getTextSvgElement","getSvgElement","SingleAxis","axisPointerEnabled","_adjustAxis","_updateAxisTransform","coordBase","extentSum","toLocalCoord","getAxes","getTooltipAxes","baseAxes","parseGeoJson","fixNanhai","fixTextCoord","fixGeoCoord","fixDiaoyuIsland","mapRecord","nameProperty","parsed","regionName","specialArea","regionRect","positiveBorderColorQuery","negativeBorderColorQuery","positiveColorQuery","negativeColorQuery","performRawSeries","colorP","getColor","colorN","borderColorP","getBorderColor","borderColorN","isLargeRender","FunnelPiece","funnelPieceProto","opacityAccessPath","FunnelView","funnelPiece","inheritIfRequired","getFlags","stickyHelpers","setSpecies","NativeRegExp","re1","re2","CORRECT_NEW","UNSUPPORTED_Y","RegExpWrapper","thisIsRegExp","patternIsRegExp","flagsAreUndefined","proxy","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","GaugeSeries","offsetCenter","detail","$filter","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","toObject","createProperty","arrayLike","argumentsLength","mapfn","iteratorMethod","dev","dataSelectableMixin","MapSeries","needsDrawMap","dataNameMap","selectTargetList","toAppendNames","geoSource","getMapType","appendValues","seriesNames","otherIndex","originalData","showLegendSymbol","dataRangeHoverLink","NodeHighlightPolicy","DESCENDANT","ANCESTOR","SELF","DEFAULT_SECTOR_Z","DEFAULT_TEXT_Z","SunburstPieceProto","getNodeColor","fillDefaultColor","stateStyle","isNodeHighlighted","onHighlight","onDownplay","getLabelAttr","labelMinAngle","labelPadding","rotateType","stateAttr","visualMetaList","getRootId","activeNode","policy","featureManager","saveAsImageLang","SaveAsImage","unusable","MouseEvent","msSaveOrOpenBlob","bstr","atob","u8arr","blob","Blob","tab","open","write","$a","download","evt","bubbles","cancelable","dispatchEvent","collectionStrong","colorPaletteMixin","mergeLayoutParam","_task","createTask","visualBorderColorAccessPath","extraOpt","dataTask","dataTaskCount","dataTaskReset","wrapData","dataBeforeProcessed","autoSeriesName","inputPositionParams","themeSubType","hasClass","getTheme","getDefaultOption","fillDataTextStyle","newSeriesOption","task","getCurrentTask","setOutputEnd","outputData","multipleSeries","isRichText","markerId","formatArrayValue","vertially","setEachItem","markName","dimHead","dimHeadStr","valStr","tooltipDims","formatSingleValue","tooltipDimLen","isValueArr","colorEl","isNameSpecified","requestColorNum","coordDimToDataDim","getAxisTooltipData","pipeTask","getSeriesAutoName","nameArr","dataDim","dataTaskProgress","onDataSelfChange","pipeline","getPipeline","currentTask","agentStubMap","smoothSpline","smoothBezier","controlPoints","cp2","argument","AXIS_DIMS","COORDS","isCoordSupported","coordType","createNameEach","attrs","capitalNames","capitalFirst","capitalAttrs","nameObj","capital","createLinkedNodesFinder","forEachNode","forEachEdgeType","edgeIdGetter","sourceNode","existsLink","edgeType","absorb","processSingleNode","isNodeAbsorded","isLinked","hasLink","edgeId","themeRiverLayout","baseY0","timeDim","layerPoints","singleLayer","base","computeBaseline","baseLine","ky","layerIndex","layerNum","pointNum","sums","regExpExec","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","REPLACE","nativeReplace","reason","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","REPLACE_KEEPS_$0","UNSAFE_SUBSTITUTE","searchValue","replaceValue","replacer","functionalReplace","fullUnicode","results","matchStr","accumulatedResult","nextSourcePosition","matched","captures","namedCaptures","groups","replacerArgs","replacement","getSubstitution","tailPos","symbols","ch","capture","getNodeGlobalScale","groupScale","groupZoom","roamZoom","nodeScale","colorList","getBorderLineDash","ownKeys","enumerableOnly","sym","_objectSpread2","getOwnPropertyDescriptors","ATTR","dataZoomInfo","giveStore","theDataZoomId","theCoordId","dataZoomInfos","cleanStore","createController","controllerParams","mergeControllerParams","newRecord","typePriority","oneType","validPayloadTypes","targetNodeId","getPathToRoot","viewPath","wrapTreePathInfo","treePathInfo","nodeDataIndex","DataDimensionInfo","IS_PURE","copyright","r1","r2","r3","r4","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","_forceHelper","_simpleLayoutHelper","_circularLayoutHelper","graphSeries","preservedPoints","forceModel","initLayout","nodeDataExtent","edgeDataExtent","repulsion","edgeLength","rep","fixed","getEdgeByIndex","edgeModel","n1","n2","ignoreForceLayout","forceInstance","gravity","friction","oldStep","getNodeByIndex","whitespaces","whitespace","ltrim","rtrim","TYPE","rectCoordAxisBuildSplitArea","axisView","axisGroup","gridRect","tickModel","areaColorsLen","lastSplitAreaColors","__splitAreaColors","newSplitAreaColors","cIndex","rectCoordAxisHandleRemove","ifAxisCrossZero","estimateLabelUnionRect","Cartesian2D","Axis2D","isAxisUsedInTheGrid","Grid","_coordsMap","_coordsList","_axesMap","_axesList","_initCartesian","gridProto","fixAxisOnZero","axesMap","otherAxisDim","onZeroRecords","otherAxes","onZeroAxisIndex","canOnZeroToAxis","getOnZeroRecordKey","updateAxisTransform","axisExtentSum","_updateScale","ignoreContainLabel","axesList","adjustAxes","labelUnionRect","axesMapOnDim","coordList","getCartesians","_findConvertTarget","xAxisModel","yAxisModel","coordsList","axisPositionUsed","axesCount","createAxisCreator","addAxis","isCartesian2D","axesModels","findAxesModels","otherAxis","axesTypes","grids","nodeOpacityPath","hoverNodeOpacityPath","lineOpacityPath","hoverLineOpacityPath","getItemOpacity","opacityPath","fadeOutItem","opacityRatio","getGraphicEl","fadeInItem","SankeyShape","cpx1","cpy1","cpx2","cpy2","_focusAdjacencyDisabled","sankeyView","curvature","n1Layout","node1Model","dragX1","dragY1","n2Layout","node2Model","dragX2","dragY2","edgeLayout","dragX","dragY","localX","localY","focusNodeAdjHandler","unfocusNodeAdjHandler","_dispatchUnfocus","edgeDataIndex","_unfocusDelayTimer","focusNodeAdjacency","focusNodeAdj","outEdges","inEdges","unfocusNodeAdjacency","geoJSONLoader","geoSVGLoader","loaders","mapRecords","singleSource","makeInvoker","hostKey","bitmap","writable","Pattern","returnFalse","createDom","newDom","newDomStyle","Layer","onselectstart","domBack","ctxBack","clearColor","motionBlur","lastFrameAlpha","__used","__drawIndex","__startIndex","__endIndex","getElementCount","initContext","createBackBuffer","clearAll","clearColorGradientOrPattern","haveMotionBLur","clearRect","__canvasGradient","getCanvasPattern","save","fillRect","globalImageCache","findExistImage","newImageOrSrc","cachedImgObj","hostEl","cbPayload","__zrImageSrc","pendingWrap","pending","imageOnLoad","__cachedImgObj","_listComponent","makeBackground","_contentGroup","_backgroundEl","_selectorGroup","_isFirstRender","viewportSize","legendDrawnMap","selectMode","eachRawSeries","getSeriesByName","legendSymbolType","_createItem","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","provider","containName","newline","_createSelector","createSelectorButton","selectorItem","emphasisLabelModel","inactiveColor","inactiveBorderColor","symbolKeepAspect","legendModelItemStyle","itemIcon","legendGlobalTooltipModel","setSymbolStyle","legendSymbolCenter","hitRect","formatterParams","legendIndex","dataName","CATEGORY_DEFAULT_VISUAL_INDEX","_normalizeData","normalizers","visualHandler","visualHandlers","_doMap","normalizeVisualRange","preprocessForPiecewise","preprocessForSpecifiedCategory","normalized","makeApplyVisual","isNormalized","doMapCategory","returnRGBArray","parsedVisual","linear","piecewise","getSpecifiedVisual","doMapFixed","colorHue","makePartialColorVisualHandler","colorSaturation","colorLightness","colorAlpha","makeDoMap","symbolCfg","doMapToArray","hasSpecialVisual","originIndex","categoryMap","visualArr","setVisualToOption","doNotNeedPair","applyValue","sourceExtent","addVisualHandler","eachVisual","mapVisual","isPrimary","newVisual","newVal","hasVisual","type1","type2","dependsOn","visualType1","visualType2","findClosestWhenOutside","possibleI","pieceValue","updatePossible","newAbs","isCanvasEl","transformCoordWithViewport","isDomLevel2","MOUSE_EVENT_REG","_calcOut","calculate","calculateZrXY","layerX","layerY","ex","clientX","ey","clientY","getNativeEvent","isTouch","targetTouches","changedTouches","zrDelta","button","which","attachEvent","removeEventListener","detachEvent","preventDefault","stopPropagation","cancelBubble","returnValue","notLeftMouse","DEFAULT_SMOOTH","ParallelView","_dataGroup","dataGroup","makeSeriesScope","newDataIndex","addEl","updateElCommon","oldDataIndex","createLinePoints","taskParams","isEmptyValue","IndexedObject","nativeAssign","alphabet","active","inactive","UNDEFINED","INDEX_NOT_FOUND","ID_PREFIX","dataCtors","Float64Array","Int32Array","CtorUint32Array","Uint32Array","CtorInt32Array","CtorUint16Array","Uint16Array","getIndicesCtor","_rawCount","cloneChunk","originalChunk","TRANSFERABLE_PROPERTIES","CLONE_PROPERTIES","transferProperties","__wrappedMethods","_calculationInfo","dimensionInfos","invertedIndicesMap","dimensionInfo","dimensionName","createInvertedIndices","_indices","_count","_storage","_nameList","_idList","_optionModels","_visual","_itemVisuals","hasItemVisual","_itemLayouts","_graphicEls","_chunkSize","_chunkCount","_rawExtent","_approximateExtent","_dimensionsSummary","_invertedIndicesMap","listProto","prepareChunks","chunkSize","chunkCount","DataCtor","lastChunkIndex","resizeChunkArray","newStore","prepareInvertedIndex","invertedIndices","getRawValueFromStore","chunkIndex","chunkOffset","getRawIndexWithoutIndices","getRawIndexWithIndices","_idDimIdx","normalizeDimensions","cloneListForMapAndSample","excludeDimensions","allDimensions","originalStorage","cloneDimStore","getInitialExtent","originalDimStore","newDimStore","getDimensionsOnCoord","dimensionsSummary","nameList","notProvider","_nameRepeatCount","_dimValueGetter","_dimValueGetterArrayRows","_initDataFromProvider","rawData","dimLen","originalChunkCount","emptyDataItem","sourceIdx","dimRawExtent","nameDimIdx","dimensionInfoMap","idList","nameRepeatCount","_nameDimIdx","itemId","dimStorage","nameDim","nameDimChunk","getIndices","thisCount","chunkStore","getByRawIndex","rawIdx","dimStore","_getFast","dimData","initialExtent","dimExtent","currEnd","useRaw","setApproximateExtent","getCalculationInfo","getMedian","dimDataArray","sortedDimDataArray","rawIndexOf","indicesOfNearest","maxDistance","nearestIndices","minDist","minDiff","nearestIndicesLen","contextCompat","filterSelf","dim0","selectRange","originalCount","quickFinished","chunkStorage","dimStorage2","chunkStorage2","val2","dimk","tmpRetValue","dataCount","retValue","rawExtentOnDim","downSample","rate","sampleValue","sampleIndex","targetStorage","frameValues","frameSize","originalChunkIndex","originalChunkOffset","sampleFrameIdx","sampleChunkIndex","sampleChunkOffset","otherList","thisList","itemVisual","clearAllVisual","setItemDataAndSeriesIndex","dimensionInfoList","injectFunction","originalMethod","v2Distance","isLoop","segs","w2","w3","TYPE_DELIMITER","IS_CONTAINER","checkClassType","RootClass","mandatoryMethods","$constructor","superClass","ExtendedClass","classBase","Clz","classAttr","enableClassManagement","entity","makeContainer","registerClass","componentMainType","throwWhenNotFound","getClassesByMainType","getAllClassMainTypes","hasSubTypes","registerWhenExtend","originalExtend","ignoreSize","subtext","subtarget","subtextStyle","titleModel","subtextStyleModel","subText","subTextEl","sublink","groupRect","layoutOption","alignStyle","webpackPolyfill","deprecate","CONVERT_TO_STRING","second","codeAt","redefineAll","anInstance","fastKey","internalStateGetterFor","getConstructor","IS_MAP","ADDER","getEntry","setStrong","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","kind","createParallelIfNeeded","mergeAxisOptionFromParallel","hasParallelSeries","axisOption","parallelOption","isPolyline","isLarge","lineCoords","segCount","totalCoordsCount","getLineCoordsCount","getLineCoords","_fourPointsTransform","buildTransformer","EVENT_SAVED_PROP","elFrom","inX","inY","saved","prepareCoordMarkers","transformer","preparePointerTransformer","propLR","propTB","idxLR","idxTB","transformerName","oldSrcCoords","srcCoords","oldCoordTheSame","destCoords","ii","originalArray","axisPointerModelHelper","_axisPointer","fixValue","updateAxisPointer","disposeAxisPointer","forceRender","getAxisPointerClass","getAxisPointerModel","axisPointerClazz","clazz","compatibleEC2","ec2Types","transferItem","controlStyle","itemStyleEmphasis","labelNormal","excludeLabelAttr","legendModels","findComponents","categoryNames","mapSymbolLayout","mapDataStatistic","createDataSelectAction","effectType","showEffectOn","rippleEffect","barItemStyle","Sausage","_eventPos","getClipArea","coordSysClipArea","expandWidth","coordinateSystemType","isHorizontalOrRadial","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","_backgroundEls","bgLayout","bgEl","createBackgroundEl","getBarItemStyle","isClipped","elementCreator","updateStyle","createBackgroundShape","removeRect","removeSector","bgGroup","_removeBackground","cartesian2d","coordSysBoundingRect","signWidth","signHeight","animateProperty","animateTarget","isRadial","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","isPolar","labelPositionOutside","rawLayout","LargePath","startPoint","__startPoint","baseDimIdx","__baseDimIdx","largeDataIndices","backgroundStartPoint","__largeDataIndices","__barWidth","setLargeBackgroundStyle","largePathUpdateDataIndex","largePath","largePathFindDataIndex","valueDimIdx","barWidthHalf","startValueVal","pointerBaseVal","pointerValueVal","baseLowerBound","baseUpperBound","barBaseVal","barValueVal","coordLayout","ElementClz","_curve","containStroke","_l","registerSubTypeDefaulter","_barGrid","prepareLayoutBarSeries","makeColumnLayout","retrieveColumnLayout","axisDataLen","scaleType","originalExtent","getCategories","setBlank","isBaseAxisAndHasBarSeries","barSeriesModels","adjustedScale","adjustScaleForOverflow","axisLength","barsOnCurrentAxis","minOverflow","maxOverflow","totalOverFlow","oldRange","oldRangePercentOfNew","overflowBuffer","extentInfo","makeLabelFormatter","categoryTickStart","tpl","tick","realNumberScaleTicks","tickCount","categoryScaleExtent","axisLabelModel","unrotatedSingleRect","singleRect","rotateTextRect","rotateRadians","boundingBox","plain","beforeWidth","beforeHeight","afterWidth","afterHeight","rotatedRect","getOptionCategoryInterval","shouldShowAllLabels","guid","Handler","Storage","Painter","HandlerProxy","useVML","painterCtors","ZRender","getInstance","registerPainter","delInstance","rendererType","vml","handerProxy","_needsRefresh","oldDelFromStorage","delFromStorage","oldAddToStorage","addToStorage","removeSelfFromZr","addSelfToZr","addRoot","delRoot","configLayer","zLevel","_needsRefreshHover","triggerRendered","refreshHoverImmediately","elMirror","refreshHover","clearHover","clearAnimation","pathToImage","setCursorStyle","eventHandler","NATIVE_WEAK_MAP","objectHas","sharedKey","enforce","wmget","wmhas","wmset","metadata","STATE","dataProcessorHandlers","_dataProcessorHandlers","_visualHandlers","_allHandlers","_stageTaskMap","performStageTasks","stageHandlers","needSetDirty","__pipeline","stageHandlerRecord","seriesTaskMap","overallTask","overallNeedDirty","stub","performArgs","block","pipelineId","taskRecord","_pipelineMap","pCtx","progressiveEnabled","progressiveRender","__idxInPipeline","blockIndex","modDataCount","modBy","dataLen","threshold","pipelineMap","pipe","stageTaskMap","createSeriesStageTask","createOverallStageTask","__block","getUpstream","seriesTaskPlan","seriesTaskReset","seriesTaskCount","useClearVisual","isVisual","isLayout","createOnAllSeries","removeKey","overallTaskReset","overallProgress","createStub","stubReset","onDirty","stubOnDirty","agent","getSeries","upstreamContext","stubProgress","getDownstream","resetDefines","makeSeriesTaskProgress","singleSeriesTaskProgress","resetDefineIdx","resetDefine","dataEach","detectSeriseType","legacyFunc","ecModelMock","apiMock","mockMethods","EffectPolyline","_lastFrame","_lastFramePercent","effectPolylineProto","_points","accLenArr","_offsets","_length","offsets","PolarAxisPointer","animationThreshold","coordValue","labelPos","getLabelPosition","buildLabelElOption","innerTextLayout","makeSectorShape","geoCoordMap","_buildAxes","_buildSplitLineAndArea","axisBuilders","showSplitLine","showSplitArea","splitLineColors","splitAreaColors","ticksRadius","getColorIndex","realSplitNumber","axesTicksPoints","prevPoints","areaOrLine","areaOrLineColorList","themeRiverVisual","componentUtil","boxLayoutMixin","themeModel","newCptOption","fields","optList","Class","getDependencies","deps","enableSubTypeDefaulter","enableTopologicalTravel","v2ApplyTransform","TransformDummy","_roamTransformable","_center","_zoom","setBoundingRect","setViewRect","rawTransform","centerCoord","_updateCenterAndZoom","getDefaultCenter","rawRect","getCenter","rawTransformMatrix","defaultCenter","roamTransformable","_rawTransform","_layoutHelper","TreeShape","parentPoint","childPoints","forkPosition","childLen","firstChildPos","lastChildPos","forkDim","tmpPoint","_oldTree","_updateViewCoordSys","symbolNeedsDraw","updateNode","symbolEl","_nodeScaleRatio","_updateNodeAndLinkScale","fromPoints","oldMin","_min","oldMax","_max","viewCoordSys","_viewCoordSys","_getNodeGlobalScale","invScale","getTreeNodeStyle","sourceSymbolEl","sourceLayout","sourceOldLayout","rawX","__radialOldRawX","rawY","__radialOldRawY","targetLayout","__radialRawX","__radialRawY","isLeft","rootLayout","labelRotateRadian","drawEdge","__edge","getEdgeShape","childLayout","sourceEdge","radialCoor1","radialCoor2","radialCoor3","radialCoor4","InternalMetadataModule","checkCorrectnessOfIteration","setToStringTag","common","IS_WEAK","NativeConstructor","NativePrototype","exported","fixMethod","KEY","nativeMethod","REQUIRED","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","dummy","BUILTIN_OBJECT","TYPED_ARRAY","objToString","nativeForEach","nativeFilter","nativeSlice","nativeMap","nativeReduce","typeStr","isPrimitive","isDom","targetProp","sourceProp","isBuiltInObject","mergeAll","targetAndSources","overlay","baseClazz","clazzPrototype","F","memo","ownerDocument","value1","retrieve3","value2","primitiveKey","HashMap","thisMap","visit","concatArray","newArray","eachAfter","eachBefore","inspectSource","enforceInternalState","TEMPLATE","simple","newSnapshot","snapshot","_targetList","_selectTargetMap","targetMap","select","unSelect","toggleSelected","setPrototypeOf","Wrapper","NewTarget","NewTargetPrototype","nameRotate","nameTruncate","ellipsis","showMinLabel","showMaxLabel","categoryAxis","deduplication","alignWithLabel","minorTick","minorSplitLine","timeAxis","logAxis","logBase","idxMap","Uint32Arr","Float64Arr","compatEc2","coords","fromName","toName","LinesSeries","_processFlatCoordsArray","_flatCoords","flatCoords","_flatCoordsOffset","flatCoordsOffset","_getCoordsFromItemModel","startOffset","coordsOffsetAndLenStorage","coordsStorage","coordsCursor","offsetCursor","effect","trailLength","autoPositionValues","targetValue","visualCluster","visualObj","controllerVisuals","visualMapping","positionElement","generateNodeKey","_directed","_nodesMap","_edgesMap","graphProto","Node","hostGraph","Edge","isDirected","nodesMap","edgesMap","getEdge","breadthFirstTraverse","startNode","__visited","currentNode","otherNode","inDegree","outDegree","createGraphDataProxyMixin","hostName","LineGroup","_ctor","lineDrawProto","doAdd","lineNeedsDraw","doUpdate","oldLineData","newLineData","itemEl","isEffectObject","animators","isPointNaN","isPersistent","_lineData","incrementalPrepareUpdate","_seriesScope","incrementalUpdate","updateIncrementalAndHover","_clearIncremental","_incremental","wrappedWellKnownSymbolModule","NAME","quadraticIn","quadraticOut","quadraticInOut","cubicIn","cubicOut","cubicInOut","quarticIn","quarticOut","quarticInOut","quinticIn","quinticOut","quinticInOut","sinusoidalIn","sinusoidalOut","sinusoidalInOut","exponentialIn","exponentialOut","exponentialInOut","circularIn","circularOut","circularInOut","elasticIn","asin","elasticOut","elasticInOut","backIn","backOut","backInOut","bounceIn","bounceOut","bounceInOut","_mapDraw","dataViewLang","BLOCK_SPLITER","ITEM_SPLITER","groupSeries","seriesGroupByCategoryAxis","otherSeries","meta","assembleSeriesWithCategoryAxis","tables","valueAxisDim","headers","columns","items","assembleOtherSeries","vals","getContentFromModel","isTSVFormat","itemSplitRegex","parseTSVContents","tsv","tsvLines","header","parseListContents","hasName","parseContents","blockMetaList","blocks","blockMeta","tryMergeDataOption","readOnly","optionToContent","contentToOption","textColor","textareaColor","textareaBorderColor","buttonColor","buttonTextColor","viewMain","textarea","htmlOrDom","buttonContainer","buttonStyle","closeButton","refreshButton","newSeriesOptList","renderText","getStroke","actionInfos","polarOptArr","polarNotRadar","polarOpt","polarIndex","radarIndex","foundAxisModel","layoutBox","boxLayoutParams","positions","bbWidth","bbHeight","BrushController","history","dataZoomLang","DATA_ZOOM_ID_BASE","DataZoom","_brushController","_onBrush","mount","_isZoomActive","featureModel","updateZoomBtnStatus","updateBackBtnStatus","handlers","unmount","nextActive","dataZoomSelectActive","retrieveAxisSetting","setIconStatus","zoomActive","include","setPanels","makePanelOpts","xAxisDeclared","yAxisDeclared","enableBrush","brushStyle","updateCovers","matchOutputRanges","coordRange","setBatch","findDataZoom","found","dzModel","dataZoomOpts","dataZoomOpt","addForAxis","axisIndicesName","givenAxisIndices","forEachComponent","$fromToolbox","activeXDocument","documentCreateElement","GT","LT","PROTOTYPE","SCRIPT","EmptyConstructor","scriptTag","NullProtoObjectViaActiveX","parentWindow","NullProtoObjectViaIFrame","iframeDocument","iframe","JS","contentWindow","NullProtoObject","ActiveXObject","SHADOW_PROPS","$find","addToUnscopables","FIND","SKIPS_HOLES","coordSysLists","coordIndex","createIteratorConstructor","IteratorsCore","IteratorPrototype","BUGGY_SAFARI_ITERATORS","KEYS","VALUES","ENTRIES","returnThis","Iterable","IteratorConstructor","DEFAULT","IS_SET","CurrentIteratorPrototype","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","LinePath","SYMBOL_CATEGORIES","makeSymbolTypeKey","symbolCategory","setLinePoints","updateSymbolAndLabelBeforeLineUpdate","lineGroup","symbolFrom","symbolTo","pointAt","toPos","tangent","tangentAt","__labelDistance","distanceX","distanceY","halfPercent","__position","__verticalAlign","__textAlign","_createLine","lineProto","beforeUpdate","lineLabelOriginalOpacity","visualOpacity","defaultLabelColor","rawVal","normalText","emphasisText","labelStyle","linePath","globalDefault","OPTION_INNER_KEY","_optionManager","baseOption","mountOption","initBase","timelineOption","getTimelineOption","mediaOptions","getMediaOption","mediaOption","componentsMap","newCptTypes","visitComponent","newCptOptionList","mapResult","mappingToExists","makeIdAndName","keyInfo","determineSubType","getComponentsByTypes","resultItem","ComponentModelClass","createSeriesIndices","componentOption","topologicalTravel","_seriesIndicesMap","_seriesIndices","isIdInner","cpts","isIdArray","cpt","isNameArray","filterBySubType","queryCond","getQueryCond","doFilter","indexAttr","idAttr","nameAttr","queryResult","oneSeries","getSeriesCount","assertSeriesInitialized","rawSeriesIndex","getCurrentSeriesIndices","filterSeries","filteredSeries","componentTypes","isNotTargetSeries","seiresIndex","mergeTheme","notMergeColorLayer","colorLayer","themeItem","existComponent","graphicUtil","_nonShapeGraphicElements","graphicOption","elements","GraphicModel","parentId","_elOptionsToUpdate","existList","flattenedList","_flatten","mappingResult","elOptionsToUpdate","newElOption","setKeyInfoToNewElOption","mergeNewElOptionToExist","setLayoutInfoToExist","$action","optionList","parentOption","useElOptionsToUpdate","els","createEl","targetElParent","graphicType","__ecGraphicId","removeEl","existEl","existElParent","getCleanedElOption","LOCATION_PARAMS","isSetLoc","existElOption","newElParentOption","newElOptCopy","copyLayoutParams","existItem","hv","setEventData","graphicModel","_elMap","_lastGraphicModel","_updateElements","_relocate","rootGroup","elOptionStyle","elOptionCleaned","__ecGraphicWidthOption","__ecGraphicHeightOption","elOptions","apiWidth","apiHeight","parentEl","isParentRoot","__ecGraphicWidth","__ecGraphicHeight","containerInfo","boundingMode","bounding","straightLineProto","bezierCurveProto","isLine","_buildPathLine","_buildPathCurve","_pointAtLine","_pointAtCurve","_tangentAtCurve","defaultSymbolType","hasSymbolTypeCallback","hasSymbolSizeCallback","hasSymbolRotateCallback","hasCallback","seriesSymbol","seriesSymbolSize","itemSymbolType","itemSymbolSize","itemSymbolRotate","itemSymbolKeepAspect","defaultKeyGetter","oldKeyGetter","newKeyGetter","_old","_new","_oldKeyGetter","_newKeyGetter","initIndexMap","keyArr","keyGetterName","existence","_add","_remove","oldDataIndexMap","newDataIndexMap","oldDataKeyArr","newDataKeyArr","groupData","nodeWidth","nodeGap","computeNodeValues","filteredNodes","iterations","nodeAlign","layoutSankey","computeNodeBreadths","computeNodeDepths","computeEdgeDepths","getEdgeValue","nodeRawValue","remainEdges","indegreeArr","zeroIndegrees","nextTargetNode","kx","maxNodeDepth","isItemDepth","edgeIdx","indexEdge","nodeIndex","maxDepth","adjustNodeWithNodeAlign","scaleNodeBreadths","isNodeDepth","nextSourceNode","remainNodes","nodeHeight","skNodeHeight","moveSinksRight","nodeDepth","nodesByBreadth","prepareNodesByBreadth","initializeNodeDepth","resolveCollisions","relaxRightToLeft","relaxLeftToRight","keyAttr","groupResult","buckets","minKy","nodeDy","edgeDy","nodeDyAttr","weightedTarget","centerTarget","nodeY","weightedSource","centerSource","PLAIN_TEXT","WILL_BE_RESTORED","markerRich","startId","endId","updateMarkerLayout","markPointModel","mpModel","symbolDrawMap","symbolDraw","isFnSymbol","isFnSymbolSize","dataOpt","sizeCalculable","CalendarModel","cellSize","dayLabel","firstDay","monthLabel","yearLabel","mergeAndNormalizeLayoutParams","raw","hvIdx","propertyKey","echartsAPIList","chartInstance","parallelAxisModel","setActiveIntervals","intervals","Parallel","_axisTickLabelBuilder","createAxisTicks","createAxisLabels","calculateCategoryInterval","NORMALIZED_EXTENT","fixExtentWithBands","nTick","fixOnBandTicksCoords","ticksLen","diffSize","crossLen","ticksItem","getTickModel","minorTickModel","minorTicks","getMinorTicks","minorTicksGroup","getRotate","langSelector","defaultSelectorOption","LegendModel","_updateSelector","_updateData","hasSelected","potentialData","availableNames","isPotential","getAllNames","_availableNames","allSelect","inverseSelect","selectorLabel","selectorItemGap","LN2","determinant","rows","rowStart","rowMask","colMask","detCache","cacheKey","fullRank","colStart","subRowMask","subRowStart","colLocalIdx","colTag","mA","vh","srcPointX","srcPointY","pk","normalizeRadian","sysDims","dataDimNameMap","coordDimNameMap","getDimCount","userDimName","encodeDef","validDataDims","resultDimIdx","applyDim","availDimIdx","sysDimItem","sysDimIndex","sysDimItemDimsDef","sysDimItemOtherDims","sysDimItemDimsDefItem","generateCoordCount","fromZero","extra","genName","optDimCount","isValidPoint","getValueMissingPoint","firstPoint","svgURI","createElementNS","x_","createGraphFromNodeEdge","GraphSeries","_categoriesData","_updateCategoriesData","categoriesModels","_categoriesModels","categoryIdx","categoryModel","edgeLabelModel","fakeSeriesModel","emphasisEdgeLabelModel","emphasisFakeSeriesModel","edgeGetParent","getEdgeData","sourceName","targetName","circular","rotateLabel","layoutAnimation","edgeSymbol","edgeSymbolSize","edgeLabel","polyHelper","stackResultDim","getCurrentScript","currentScript","pageSource","inlineScriptSourceRegExp","inlineScriptSource","ieStackRegExp","ffStackRegExp","stackDetails","scriptLocation","currentLocation","hash","scripts","documentElement","outerHTML","readyState","ORIGIN_METHOD","RATE","THROTTLE_TYPE","currCall","debounceNextCall","lastCall","lastExec","timer","thisDelay","thisDebounce","debounceDelay","fnAttr","originFn","lastThrottleType","lastRate","markerModelKey","subTypeDefaulters","defaulter","componentTypeMain","dependencyGetter","makeDepndencyGraph","fullNameList","noEntryList","createDependencyGraphItem","originalDeps","availableDeps","getAvailableDependencies","entryCount","dependentName","predecessor","thatItem","successor","dep","targetNameList","targetNameSet","currComponentType","currVertex","isInTargetNameSet","removeEdgeAndAdd","removeEdge","succComponentType","functionToString","platform","gradientColor","animationEasingUpdate","shadowTemp","orignalBrush","modified","clipPaths","roundNumber","_intervalPrecision","thisExtent","getIntervalPrecision","expandToNicedExtent","niceTickExtent","intervalPrecision","safeLimit","lastNiceTick","prevTick","minorInterval","intervalScaleNiceTicks","expandSize","CoordSysInfo","fetch","fetchers","roundingErrorFix","mathLog","_originalScale","originalScale","powVal","__fixMin","fixRoundingError","__fixMax","originalVal","dataColor","radarLayout","_needCollect","needCollect","_deduplication","_map","createByAxisModel","dedplication","getOrCreateMap","colorUtil","markAreaTransform","maModel","rb","ltCoord","rbCoord","markAreaFilter","getSingleMarkerEndPoint","dimPermutations","areaData","markAreaModel","areaGroupMap","polygonGroup","__data","ToolboxModel","featureName","Feature","showTitle","iconStyle","containLabel","_zrender","ITEM_STYLE_NORMAL","seriesItemStyleModel","levelItemStyles","travelTree","designatedVisual","viewRootAncestors","nodeModel","nodeLayout","isInView","thisNodeColor","nodeItemStyleModel","levelItemStyle","visuals","buildVisuals","borderColorSaturation","calculateColor","calculateBorderColor","buildVisualMapping","childVisual","visualName","getValueVisualDefine","rangeVisual","getRangeVisual","visualMin","visualMax","colorMappingBy","__drColorMappingBy","childVisuals","mappingType","mapIdToIndex","hasXOrY","hasXAndY","markerTypeCalculatorWithExtent","otherDataDim","targetDataDim","otherCoordIndex","targetCoordIndex","coordArr","calcDataDim","coordArrValue","markerTypeCalculator","average","baseDataDim","dataDimToCoordDim","regexpFlags","nativeExec","patchedExec","UPDATES_LAST_INDEX_WRONG","BROKEN_CARET","NPCG_INCLUDED","PATCH","reCopy","re","charsAdded","strCopy","RadiusAxis","radiusToData","_treeHelper","_viewRoot","clipWindow","squareRatio","leafDepth","drillDownIcon","zoomToNodeRatio","emptyItemWidth","upperLabel","gapWidth","visualDimension","visibleMin","childrenVisibleMin","completeTreeValue","setDefault","setLayoutInfo","idIndexMap","_idIndexMap","_idIndexMapCount","childValue","thisValue","globalColorList","hasColorDefine","modelColor","level0","mapLocation","largeLayout","detection","POLYFILL","NATIVE","_symbolRadiansHalf","basedOn","_layoutNodesBasedOn","x12","y12","unitAngle","radianHalf","sumRadian","symbolRadianHalf","halfRemainRadian","_a","_b","_s","adjustEdge","FOCUS_ADJACENCY","UNFOCUS_ADJACENCY","opct","_lineDraw","_firstRender","graphView","groupNewProp","_layoutTimeout","_startForceLayoutIteration","warmUp","_layouting","setFixed","setUnfixed","circularRotateLabel","adjacentEdge","lb","rt","maxX","maxY","ax0","ax1","ay0","ay1","bx0","bx1","by0","by1","msRequestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","seiresModelMap","__paletteScope","dataAll","filteredIdx","singleDataColor","singleDataBorderColor","maskColor","showSpinner","spinnerRadius","mask","animateShape","returnMethod","nativeDefineProperty","Attributes","v2Min","v2Max","v2Scale","v2Add","v2Clone","v2Sub","constraint","prevPoint","nextPoint","cps","d0","cp0","retrieveValue","PATH_BORDER_WIDTH","PATH_GAP_WIDTH","PATH_UPPER_LABEL_SHOW","PATH_UPPER_LABEL_HEIGHT","ecWidth","ecHeight","containerWidth","containerHeight","rootRect","viewAbovePath","rootSize","estimateRootSize","viewRootLayout","squarify","upperHeight","calculateRootPosition","prunning","hideChildren","thisLayout","halfGapWidth","upperLabelHeight","getUpperLabelHeight","layoutOffset","layoutOffsetUpper","totalArea","initChildren","rowFixedLength","best","score","worst","overLeafDepth","statistic","filterByThreshold","isLeafRoot","orderedChildren","deletePoint","areaMax","areaMin","squareArea","idx0WhenH","idx1WhenH","rowOtherLength","rowLen","wh1","remain","modWH","wh0","currNode","defaultSize","viewArea","currNodeValue","defaultPosition","targetCenter","clipRect","nodeInViewAbovePath","isAboveViewRoot","childClipRect","outputShape","inputShape","originWidth","originHeight","positiveOrNegative","doubledPosition","STACK_PREFIX","LARGE_BAR_MIN_WIDTH","getLayoutOnAxis","widthAndOffsets","doCalBarWidthAndOffset","isOnCartesian","isInLargeMode","getValueAxesMinGaps","axisValues","cnt","axisMinGaps","valuesInAxis","seriesInfoList","minGap","extentSpan","scaleSpan","seriesInfo","minWidth","finalWidth","lastStackCoordsOrigin","isValueAxisH","getValueAxisStart","valueAxisHorizontal","largeBackgroundPoints","valuePair","pointsOffset","idxOffset","backgroundStart","tmpRect","AXIS_TYPES","BaseAxisModelClass","axisTypeDefaulter","extraDefaultOption","__ordinalMeta","linkedNodesFinder","effectedModels","RE","prepareDataCoordInfo","valueOrigin","valueStart","getValueStart","baseAxisDim","baseDataOffset","dataDimsForPoint","stackedOverDimension","getStackedOnPoint","dataCoordInfo","stackedData","ClippathManager","updateDom","clipPathEl","svgProxy","cloneNode","_textDom","RadarSeries","_text","Triangle","Diamond","Pin","tanX","tanY","cpLen","cpLen2","Arrow","symbolCtors","roundRect","square","diamond","pin","arrow","triangle","symbolShapeMakers","symbolBuildProxies","inBundle","proxySymbol","symbolPathSetColor","innerColor","symbolStyle","symbolShape","__isEmptyBrush","disabled","lineContain","quadraticContain","LargeLineShape","findDataIndex","LargeLineDraw","largeLineProto","lineEl","_setCommon","isIncremental","arraySpeciesCreate","ACCESSORS","1","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","deleteCount","insertCount","actualDeleteCount","actualStart","funnelLayout","NATIVE_SYMBOL","USE_SYMBOL_AS_UID","nativeObjectCreate","getOwnPropertyNamesExternal","getOwnPropertyDescriptorModule","shared","defineWellKnownSymbol","HIDDEN","SYMBOL","TO_PRIMITIVE","ObjectPrototype","$Symbol","$stringify","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","WellKnownSymbolsStore","QObject","USE_SETTER","findChild","setSymbolDescriptor","ObjectPrototypeDescriptor","description","$defineProperty","$defineProperties","$getOwnPropertySymbols","$propertyIsEnumerable","$create","V","$getOwnPropertyDescriptor","$getOwnPropertyNames","IS_OBJECT_PROTOTYPE","keyFor","useSetter","useSimple","FORCED_JSON_STRINGIFY","space","$replacer","resourceKey","userKey","getStore","release","uKey","INCORRECT_ITERATION","HIGH_DOWN_PROP","RECORD_VERSION_PROP","mapModel","_renderSymbols","originalDataIndex","fullData","mainSeries","fullIndex","highDownRecord","recordVersion","onRegionHighDown","enterRegionHighDown","toHighOrDown","__mapOriginalZ2","roundRectHelper","VALID_TEXT_ALIGN","VALID_TEXT_VERTICAL_ALIGN","SHADOW_STYLE_COMMON_PROPS","_tmpTextPositionResult","_tmpBoxPositionResult","normalizeStyle","makeFont","renderRichText","renderPlainText","needDrawBg","needDrawBackground","checkCache","cachedByMe","styleFont","boxPos","applyTextRotation","outerWidth","boxX","adjustTextX","propItem","styleProp","ctxProp","textStrokeWidthPrev","strokeWidthChanged","strokeChanged","getFill","strokeText","fillText","parseRichText","drawRichText","contentWidth","lineTop","token","tokens","tokenCount","usedWidth","lineXLeft","lineXRight","placeToken","tokenStyle","isLineHolder","setCtx","isPlainBg","originalGlobalAlpha","onBgImageLoaded","PointerPath","parsePosition","formatLabel","GaugeView","posInfo","_renderMain","axisLineModel","angleRangeSpan","prevEndAngle","axisLineWidth","showAxis","_renderTicks","_renderPointer","_renderTitle","_renderDetail","minVal","maxVal","subSplitNumber","splitLineLen","tickLen","subStep","splitLineStyle","tickLineStyle","tickLine","valueExtent","detailModel","linesLayout","linesVisual","vmlCore","comma","imageTransformPrefix","Z2","ZLEVEL_BASE","Z_BASE","initRootElStyle","coordsize","coordorigin","encodeHtmlAttribute","rgb2Str","append","getZIndex","setColorAndOpacity","getColorAndAlpha","updateFillNode","zrEl","gradientType","focus","expansion","cs1","cs2","colorAndAlphaList","colorAndAlpha","color1","color2","opacity1","opacity2","focusposition","updateStrokeNode","dashstyle","updateFillAndStroke","vmlEl","isFill","createNode","nPoint","brushVML","vmlRoot","_vmlEl","needTransform","strokeEl","weight","zIndex","removeRectText","onRemove","onAdd","appendRectText","isImage","ow","oh","_imageSrc","_imageWidth","_imageHeight","imageRuntimeStyle","runtimeStyle","oldRuntimeWidth","oldRuntimeHeight","sw","sh","hasCrop","doc","vmlElStyle","hasRotation","transformFilter","imageEl","_imageEl","cropEl","_cropEl","imageELStyle","tmpImage","overflow","cropElStyle","filterStr","textMeasureEl","DEFAULT_STYLE_NORMAL","fontStyleCache","fontStyleCacheCount","MAX_FONT_CACHE_SIZE","fontEl","getFontStyle","fontString","variant","fontVariant","family","offsetWidth","fromTextEl","textLine","textPathEl","skewEl","textVmlEl","_textVmlEl","textpathok","textVmlElStyle","polygonContain","getLineSelectors","xyIndex","inLineRange","layoutRange","showContent","alwaysShowContent","displayMode","confine","showDelay","hideDelay","extraCssText","crossStyle","AngleAxis","angleToData","ordinalScale","ordinalExtent","unitSpan","unitH","maxH","lastAutoInterval","lastTickCount","NUMBER","NativeNumber","NumberPrototype","BROKEN_CLASSOF","third","maxCode","NumberWrapper","treeOption","percentPrecision","VISUAL_PRIORITY","resultVisual","visualMeta","concreteDim","opacityMap","itemOpacity","LargeSymbolDraw","_updateSymbolDraw","_getClipShape","_finished","someVectorAt","isTangent","dotAll","_defineProperty","DATA_NAME_INDEX","ThemeRiverSeries","fixData","rawDataLength","layData","dataList","largestLayer","timeValue","keyIndex","lenCount","indexArr","index1","index2","nestestValue","nearestIdx","theValue","htmlName","htmlValue","thrower","argument0","argument1","_updateLineDraw","getLayer","_lastZlevel","_showEffect","_clearLayer","hasEffect","_hasEffet","_isPolyline","ox","oy","DEFAULT_TOOLBOX_BTNS","brushComponents","brushComponentSpecifiedBtns","brushOpt","tbs","toolboxFeature","toolboxBrush","brushTypes","removeDuplicate","flag","PrototypeOfArrayIteratorPrototype","arrayIterator","shapeCompareFunc","_roots","_displayList","_displayListLen","includeIgnore","updateDisplayList","displayList","_updateAndAddDisplayable","afterUpdate","userSetClipPath","currentClipPath","parentClipPath","__storage","addChildrenToStorage","delChildrenFromStorage","_renderList","displayableSortFunc","brushHelper","elementList","fromAxisAreaSelect","oldAxisGroup","_axisGroup","coordSysModel","areaSelectStyle","getAreaSelectStyle","areaWidth","axisLayout","getAxisLayout","builderOpt","strokeContainThreshold","_refreshBrushController","extentLen","enableGlobalPan","panelId","makeRectPanelClipPath","isTargetByCursor","makeRectIsTargetByCursor","getLinearBrushOtherExtent","makeLinearBrushOtherExtent","removeOnClick","getCoverInfoList","coverInfoList","coverInfo","parallelAxisId","activeIntervals","TO_STRING_TAG_SUPPORT","createGridClipPath","createPolarClipPath","sectorArea","FunctionPrototype","FunctionPrototypeToString","nameRE","clazzUtil","componentProto","GradientManager","addWithoutUpdate","svgElement","hex","splitList","Breadcrumb","animationUtil","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_LABEL_EMPHASIS","PATH_UPPERLABEL_NORMAL","PATH_UPPERLABEL_EMPHASIS","Z_BG","Z_CONTENT","getItemStyleEmphasis","getItemStyleNormal","createStorage","_breadcrumb","_state","thisStorage","reRoot","rootNodeGroup","nodeGroup","_giveContainerGroup","renderResult","_doRender","renderFinally","_doAnimation","_resetController","_renderBreadcrumb","thisTree","oldTree","lastsForAnimation","oldStorage","willInvisibleEls","renderNode","willDeleteEls","clearStorage","thisViewChildren","oldViewChildren","sameTree","thisNode","storageName","delEls","__tmWillDelete","animationWrap","__tmNodeWidth","__tmNodeHeight","targetX","targetY","old","fadein","_onPan","_onZoom","_clearController","mouseX","mouseY","findTarget","_zoomToNode","onSelect","background","thisWidth","thisHeight","thisInvisible","thisRawIndex","oldRawIndex","isParent","itemStyleNormalModel","itemStyleEmphasisModel","giveGraphic","bg","renderContent","useUpperLabel","processInvisible","visualBorderColor","emphasisBorderColor","upperLabelWidth","prepareText","contentHeight","upperLabelRect","addDrillDownIcon","minChar","iconChar","lasts","prepareAnimationWhenHasOld","calculateZ","__tmDepth","__tmStorageName","prepareAnimationWhenNoOld","lastCfg","parentOldX","parentOldY","parentOldBg","zInLevel","zb","getAxisLineShape","rExtent","getRadiusIdx","fixAngleOverlap","firstItem","ticksAngles","minorTickAngles","_axisLine","rId","r0Id","_axisTick","tickAngleItem","_minorTick","tickAngles","_axisLabel","rawCategoryData","commonLabelModel","labelTextAlign","labelTextVerticalAlign","isLabelSilent","makeAxisEventDataBase","targetType","rawLabel","prevAngle","baseComponent","fontGroup","cusFontSize","digit","chartComponent","deepCopy","subtitle","cusGap","cusSize","triggerType","format","xAxisUp","fzPosition","tickLabel","optimize","netLine","cusNumber","netArea","colorOne","colorTwo","xAxisDown","yAxisLeft","yAxisRight","positionOption","distanceOption","fontSizeOption","lineStyleOption","lineWeightOption","posOption","ratioOption","digitOption","sizeOption","intervalOption","fontSizeList","fontStyleIBV","bold","des","italic","fontStyleIB","chartModelData","chartOptions","chartAllType","chartData","notify","toggle","macrotask","MutationObserver","WebKitMutationObserver","IS_NODE","queueMicrotaskDescriptor","queueMicrotask","enter","observe","characterData","createWellKnownSymbol","withoutSetter","FAILS_ON_PRIMITIVES","thisNumberValue","nativeToFixed","fractionDigits","fractDigits","c2","dataToString","ecHelper","parseGeoJSON","_List","_Model","_Axis","_env","ecUtil","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","specificCreate","ariaModel","seriesCnt","ariaLabel","maxDataCnt","maxSeriesCnt","displaySeriesCnt","getTitle","getConfig","seriesLabels","seriesCount","seriesLabel","seriesTpl","getSeriesTypeName","displayCnt","dataLabels","keyValues","userConfig","setAreas","isExtensible","preventExtensions","adjustSingleSide","viewLeft","viewTop","farthestX","shiftDown","shiftUp","changeX","isDownList","lastDeltaX","labelAlignTo","deltaY","deltaX","lastY","upList","downList","avoidOverlap","labelLayoutList","leftList","rightList","leftmostX","rightmostX","isPositionCenter","targetTextWidth","isAlignToEdge","realTextWidth","labelDistance","bleedMargin","truncateText","hasLabelRotate","minShowLabelRadian","labelLineLen2","ShadowManager","hasShadow","_shadowDom","_shadowDomId","domChild","blur","stdDx","stdDy","stdDeviation","singleAxisHelper","_axisSplitHelper","SingleAxisView","Animatable","animatable","animateToShallow","objShallow","propertyCount","setAttrByPath","animatingShape","pathSplitted","animateFrom","_whiskerBoxCommon","seriesModelMixin","CandlestickSeries","defaultValueDimensions","color0","borderColor0","animationUpdate","COORD_CONVERTS","INCLUDE_FINDER_MAIN_TYPES","targetInfoList","_targetInfoList","foundCpts","targetInfoBuilders","builder","formatMinMax","includeMainTypes","setOutputRanges","coordRanges","coordConvert","__rangeOffset","diffProcessor","xyMinMax","findTargetInfo","coordSyses","rangeOffset","getScales","getDefaultBrushType","getPanelRect","defaultBrushType","areaPanelId","targetInfoMatchers","xAxisModels","yAxisModels","gridModels","gridModelMap","xAxesHas","yAxesHas","cartesians","panelRectBuilder","geoModels","axisConvert","rangeOrCoordRange","xminymin","xmaxymax","axisNameIndex","axisDiffProcessor","refer","scales","xyMinMaxCurr","xyMinMaxOrigin","sizeCurr","sizeOrigin","decode","json","UTF8Encoding","encodeScale","UTF8Scale","coordinates","encodeOffsets","coordinate","decodePolygon","prevX","prevY","featureObj","setNodePosition","pieLayout","PREFERRED_STRING","dr","rCenter","unitStartX","unitStartY","unitEndX","unitEndY","lessThanCircle","_visualEncoding","updateController","modelId","$from","getDataWithEncodedVisual","dataWithEncodedVisual","IRRELEVANT_EXCLUDES","targetCoordSysModel","topTarget","colorAll","SHARED","$findIndex","FIND_INDEX","labelDims","_subPixelOptimize","subPixelOptimizeOutputShape","EFFECT_RIPPLE_NUMBER","updateRipplePath","rippleGroup","effectCfg","rippleEffectColor","ripplePath","effectSymbolProto","stopEffectAnimation","startEffectAnimation","effectOffset","rippleScale","updateEffectAnimation","oldEffectCfg","_effectCfg","DIFFICULT_PROPS","_parseSVG","originRoot","buildGraphic","field","rootMap","originRootHostKey","svgXML","svgWidth","svgHeight","BOOST_SIZE_THRESHOLD","LargeSymbolPath","symbolProxy","softClipShape","symbolProxyShape","canBoost","largeSymbolProto","endIndex","extrudeShadow","$indexOf","nativeIndexOf","NEGATIVE_ZERO","searchElement","_typeof","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","arrayLikeToArray","_createForOfIteratorHelper","allowArrayLike","unsupportedIterableToArray","_e","normalCompletion","didErr","_e2","cloneObj","copyVal","HTMLElement","generateRandomKey","replaceHtml","dataarry","s1","s2","hasChinaword","patrn","isdatetime","checkDateTime","reg1","reg2","year","$1","month","$2","day","$3","isRealNum","isdatatype","dataTranspose","getdata","dataChangeOrder","dataChangeOrderTwo","getObjType","getRowColCheck","r_cal","c_cal","cell","rowcheck","exits","colcheck","getRangeSplitArray","rangeColCheck","rangeRowCheck","rangeSplitArray","rowtitle","coltitle","getChartCellData","getChartDataCache","product","rangeConfigCheck","rangeSA","rtitle","rtitleData","ctitle","ctitleData","contentData","series_tpye","getChartDataSeriesOrder","addDataToOption","defaultOptionIni","chartDataCache","chartDataSeriesOrder","chartPro","chartType","chartStyle","firstShow","seriesObj","series1Data","minus","name1","sum1","data2","series1obj","option1","speArr","JSON","previewOption","noChangeData","_traversalHelper","sep","commonLayout","coorX","coorY","finalCoor","QUERY_REG","_timelineOptions","_mediaList","_mediaDefault","_currentMediaIndices","_optionBackup","_newBaseOption","parseRawOption","rawOption","mediaDefault","timelineOptions","mediaList","media","singleMedia","preProcess","applyMediaQuery","realMap","aspectratio","applicatable","realAttr","real","expect","indicesEquals","indices1","indices2","oldOption","newCptOpt","oldCptOpt","oldOptionBackup","newParsedOption","isRecreate","optionBackup","$includes","Draggable","_dragStart","_drag","_dragEnd","draggingTarget","_draggingTarget","dispatchToElement","dropTarget","lastDropTarget","_dropTarget","rootDepth","renderRollupNode","rPerLevel","rStart","rEnd","siblingAngle","isAsc","sortOrder","axisTrigger","collect","realIndex","paramsSet","reals","fakeValue","layoutInput","rParam","pathContain","pathProxyForDraw","hasFillGradient","hasStrokeGradient","hasFillPattern","hasStrokePattern","_fillGradient","_strokeGradient","ctxLineDash","shapeCfg","needsUpdateRect","rectWithStroke","_rectWithStroke","lineScale","dirtyPath","__clipTarget","Sub","defaultShape","thisShape","Cartesian","getAxesByScale","axisX","axisY","xScale","yScale","xAxisExtent","yAxisExtent","xExtent","yExtent","EXISTS","_dimName","_axisIndex","_valueWindow","_percentWindow","_dataExtent","_minMaxSpan","_dataZoomModel","calculateDataExtent","seriesExtent","fixExtentByAxis","isCategoryAxis","setAxisModel","isRestore","percentWindow","useOrigin","setMinMaxSpan","percentSpan","valueSpan","getOtherAxisModel","coordSysIndexName","foundOtherAxisModel","isCartesian","otherAxisModel","hasPropModeValue","boundPercent","boundValue","spans","restrictSet","fromWindow","toWindow","fromExtent","toExtent","toValue","dataWindow","leftOut","rightOut","thisHasValue","thisLeftOut","thisRightOut","isInWindow","originalLarge","originalProgressive","axesInfo","seriesInvolved","coordSysMap","collectAxesInfo","collectSeriesInfo","globalAxisPointerModel","linksOption","linkGroups","coordSysKey","makeKey","axesInfoInCoordSys","baseTooltipModel","saveTooltipAxisInfo","triggerAxis","cross","tooltipAxes","fromTooltip","axisPointerShow","isHandleTrigger","makeAxisPointerModel","involveSeries","groupIndex","getLinkGroupIndex","linkGroup","mapper","tooltipAxisPointerModel","volatileOption","labelOption","tooltipAxisPointerLabelShow","seriesTooltipTrigger","seriesTooltipShow","seriesDataCount","linkOption","checkPropInLink","linkPropValue","axisPropValue","GRADIENT_LEVELS","Heatmap","_gradientPixels","colorFunc","_getBrush","gradientInRange","_getGradient","gradientOutOfRange","imageData","getImageData","pixels","pixelLen","diffOpacity","gradientOffset","putImageData","brushCanvas","_brushCanvas","gradientPixels","pixelsSingleState","Uint8ClampedArray","TOUCH_CLICK_DELAY","globalEventSupported","localNativeListenerNames","mouseHandlerNames","touchHandlerNames","pointerEventNameMap","pointerdown","pointerup","pointermove","pointerout","pointerHandlerNames","nm","mouse","globalNativeListenerNames","eventNameFix","isPointerFromTouch","pointerType","setTouchTimer","touching","touchTimer","markTouch","normalizeGlobalEvent","FakeGlobalEvent","isLocalEl","elTmp","isLocal","painterRoot","currentTarget","fakeGlobalEventProto","stopImmediatePropagation","localDOMHandlers","_mayPointerCapture","downPoint","togglePointerCapture","mouseout","_pointerCapturing","zrEventControl","toElement","relatedTarget","zrIsToLocalDOM","touchstart","_lastTouchMoment","processGesture","touchmove","touchend","click","globalDOMHandlers","pointerCaptureReleasing","mountLocalDOMEventListeners","domHandlers","nativeEventName","mountSingleDOMEventListener","mountGlobalDOMEventListeners","nativeEventListener","mounted","listenerOpts","domTarget","unmountDOMEventListeners","isPointerCapturing","globalHandlerScope","_globalHandlerScope","DOMHandlerScope","HandlerDomProxy","_localHandlerScope","handlerDomProxyProto","setCursor","newPromiseCapability","promiseCapability","processedMapType","mapSymbolOffsets","subMapSeries","dimAxisMapper","_axes","_dimList","_dataCoordConvert","dimList","SankeySeries","localPosition","rawDataOpt","layoutIterations","makeAction","PROXIMATE_ONE_DAY","Calendar","calendarModel","_rangeInfo","_sw","_sh","getFirstDayOfWeek","_firstDayOfWeek","getDateInfo","getDay","formatedDate","getNextNDay","setDate","_lineWidth","_getRangeInfo","_initRangeOption","whNames","cellNumbers","cellSizeSpecified","whGlobal","calendarRect","dayInfo","week","nthWeek","pointToDate","tl","tr","br","bl","nthX","nthY","_getDateByWeeksAndDay","setMonth","reversed","startDateNum","endDateNum","dateNum","fweek","lweek","nthDay","calendarList","calendarSeries","stackInfoMap","stackInfoList","stackInfo","stackResultDimension","stackedDimension","stackedByDimension","isStackedByIndex","calculateStack","targetStackInfo","idxInStack","resultVal","resultNaN","targetData","byValue","stackedDataRawIndex","stackedOver","NASHORN_BUG","legendFilter","aPossiblePrototype","CORRECT_SETTER","__proto__","SILENT","makeEventPacket","eveType","stopEvent","EmptyProxy","handlerNames","_hovered","_gestureMgr","setHandlerProxy","isHover","isOutsideBoundary","handlerInstance","isOutside","lastHovered","lastHoveredTarget","hovered","hoveredTarget","eventControl","eventArgs","eventPacket","eachOtherLayer","layer","exclude","hoverCheckResult","gestureMgr","_downEl","_downPoint","_upEl","magicTypeLang","INNER_STACK_KEYWORD","MagicType","getIcons","availableIcons","icons","seriesOptGenreator","isStack","radioTypes","newTitle","generateNewSeriesTypes","newSeriesOpt","radio","currentType","doCreateNode","urn","win","vmlInited","namespaces","zrvml","initVML","styleSheets","createStyleSheet","addRule","TAG","AxisPointerView","_updatePathDirty","vec2Min","vec2Max","v2Copy","isPointNull","drawSegment","segLen","allLen","smoothMin","smoothMax","drawMono","drawNonMono","prevIdx","prevP","ctrlLen","nextP","ratioNextSeg","lenPrevSeg","lenNextSeg","getBoundingBox","ptMin","ptMax","stackedOnBBox","LinkedList","linkedListProto","insert","Entry","insertEntry","_list","_maxSize","_lastRemovedEntry","LRUProto","leastUsedEntry","PictorialBarSeries","sunburstLayout","REPLACE_SUPPORTS_NAMED_GROUPS","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","arg2","forceStringMethod","stringMethod","regexMethod","$map","previousZoom","fixX","fixY","cubic","quadratic","swapExtrema","windingCubic","nRoots","y0_","y1_","nExtrema","windingQuadratic","y_","windingArc","containPath","isStroke","_axesLayout","restrict","layoutAxisWithoutExpand","layoutLength","axisCount","axisNameAvailableWidth","axisLabelShow","layoutAxisWithExpand","nameTruncateMaxWidth","axisCollapseWidth","winInnerIndices","axisExpandWindow0Pos","axisExpandWindow","_updateAxesFromSeries","_makeLayoutInfo","axisBase","layoutBase","pixelDimIndex","pAxis","pLayout","_layoutAxes","winSize","layoutExtent","positionTable","rotationTable","axisCoordToPoint","dataDimensions","hasActiveSet","lenj","getActiveState","getSlidedAxisExpandWindow","behavior","pointCoord","triggerArea","useJump","PolarAxisModel","polarId","polarAxisDefaultExtendedOption","globalThis","treemapVisual","treemapLayout","listComponentHelper","toolboxModel","featureOpts","_features","featureNames","_featureNames","processFeature","titleText","__title","needPutOnTop","topOffset","oldName","isUserFeatureName","createIconPaths","iconName","iconPaths","iconStatus","iconStyleModel","iconStyleEmphasisModel","titles","defaultTextPosition","parseInt10","checkParentAvailable","insertAfter","prevSibling","SVGPainter","_opts","svgDom","bgRoot","gradientManager","clipPathManager","shadowManager","viewport","_svgDom","_backgroundRoot","_viewport","_visibleList","createMethodNotSupport","viewportRoot","_paintList","_backgroundNode","bgNode","visibleList","listLen","newVisibleList","prevSvgElement","textSvgElement","_getDefs","_getSize","_width","_height","viewportStyle","whIdx","cwh","plt","prb","encodeURIComponent","createPattern","moveAnimation","propsEqual","lastProp","lastProps","newProps","updateLabelShowHide","labelEl","getHandleTransProps","updateMandatoryProps","_group","_lastGraphicKey","_handle","_lastValue","_lastStatus","_payloadInfo","_axisModel","_axisPointerModel","_moveAnimation","determineAnimation","doUpdateProps","updatePointerEl","updateLabelEl","createPointerEl","createLabelEl","useSnap","pointerEl","handleModel","onmousedown","_onHandleDragMove","_onHandleDragEnd","includeStyles","_moveHandleToValue","_doDispatchAxisPointer","payloadInfo","doClear","buildLabel","xDimIndex","BoxplotView","constDim","updateNormalBoxData","BoxPath","TimelineModel","SliderTimelineModel","checkpointStyle","playIcon","stopIcon","nextIcon","prevIcon","ArrayIteratorMethods","ArrayValues","idStart","colorQuery","opacityQuery","restoreLang","Restore","NativeSymbol","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","native","desc","prepareCartesian2d","prepareGeo","prepareSingleAxis","preparePolar","prepareCalendar","ITEM_STYLE_NORMAL_PATH","ITEM_STYLE_EMPHASIS_PATH","LABEL_NORMAL","LABEL_EMPHASIS","GROUP_DIFF_PREFIX","prepareCustoms","getPathData","__customPathData","__customImagePath","__customText","__customGraphicType","updateEl","transitionProps","prepareStyleTransition","targetOpacity","styleEmphasis","oldElStyle","makeRenderItem","customSeries","prepareResult","currDataIndexInside","currItemModel","currLabelNormalModel","currLabelEmphasisModel","currVisualColor","userAPI","barLayout","currentSeriesIndices","userParams","dataInsideLength","wrapEncodeDef","currDirty","updateCache","applyExtraBefore","applyExtraAfter","doCreateOrUpdate","simplyRemove","elOptionType","elOptionShape","hasOwnPathData","hasOwn","mergeChildren","$mergeChildren","byName","diffChildrenByName","diffGroupChildren","processAddUpdate","processRemove","childOption","dummyModel","stylePropName","useTransform","setIncrementalAndHoverLayer","elementName","makeCategoryLabels","makeRealNumberLabels","makeCategoryTicks","makeCategoryLabelsActually","labelCategoryInterval","numericLabelInterval","labelsCache","getListCache","optionLabelInterval","makeLabelsByCustomizedCategoryInterval","makeAutoCategoryInterval","makeLabelsByNumericCategoryInterval","tickCategoryInterval","ticksCache","optionTickInterval","labelsResult","autoInterval","fetchAutoCategoryIntervalCalculationParams","axisRotate","unitW","maxW","axisExtend0","axisExtend1","categoryInterval","onlyTick","startTick","showAllLabel","includeMinLabel","includeMaxLabel","addItem","tVal","DUMMY_COMPONENT_NAME_PREFIX","subOpts","subOptName","newCptOptions","cptOption","idMap","existCpt","idNum","batchA","batchB","mapA","mapB","makeMap","sourceBatch","otherMap","otherDataIndices","isData","innerUniqueIndex","hostObj","parsedKey","queryType","queryParam","_setting","_isBlank","CORRECT_PROTOTYPE_GETTER","childCount","_doAdd","addBefore","includeChildren","tmpMat","ARRAY_ITERATOR","Arguments","extremity","xDim","yDim","_baseAxisDim","addOrdinal","xAxisType","yAxisType","baseAxisDimIndex","baseAxisType","otherAxisType","newOptionData","newItem","getNearestColorPalette","paletteNum","colorIdx","colorNameMap","scopeFields","defaultColorPalette","layeredColorPalette","colorPalette","doneCallback","elExistsMap","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","NativePromise","microtask","promiseResolve","hostReportErrors","newPromiseCapabilityModule","PROMISE","getInternalPromiseState","PromiseConstructor","$fetch","newGenericPromiseCapability","DISPATCH_EVENT","createEvent","UNHANDLED_REJECTION","REJECTION_HANDLED","PENDING","FULFILLED","REJECTED","HANDLED","UNHANDLED","GLOBAL_CORE_JS_PROMISE","PromiseRejectionEvent","FakePromise","isThenable","isReject","notified","reactions","ok","exited","reaction","fail","rejection","onHandleUnhandled","onUnhandled","initEvent","IS_UNHANDLED","isUnhandled","unwrap","internalReject","internalResolve","executor","onFulfilled","onRejected","capability","$promiseResolve","alreadyCalled","race","fixPosition","textWidthCache","textWidthCacheCounter","TEXT_CACHE_MAX","STYLE_REG","measureText","getRichTextRect","getPlainTextRect","halfHeight","adjustTextPositionOnRect","dummyStyle","prepareTruncateOptions","truncateSingleLine","maxIterations","cnCharWidth","ascCharWidth","ellipsisWidth","subLength","estimateLength","charCode","getLineHeight","truncOuterHeight","truncOuterWidth","matchedIndex","pushTokens","stlPadding","truncateWidth","truncateHeight","tokenHeight","tokenWidth","tokenWidthNotSpecified","percentWidth","bgImg","paddingW","remianTruncWidth","isEmptyStr","strs","tokensLen","renderPlanner","Chart","renderTaskPlan","renderTaskReset","toggleHighlight","chartProto","elSetState","progressMethodMap","forceFirstProgress","VMLPainter","vmlViewport","_vmlRoot","_vmlViewport","_firstPaint","__alreadyNotVisible","_getWidth","_getHeight","vmlViewportStyle","paddingLeft","paddingRight","paddingTop","paddingBottom","seriesItem","replacableOptionKeys","dataBound","contentColor","getTargetSeriesIndices","optionSeriesIndex","isMinMax","optDim","listDimensions","isCalculationCoord","completeSingle","defa","completeInactive","stateExist","stateAbsent","optExist","optAbsent","completeController","symbolExists","symbolSizeExists","modelHelper","illegalPoint","isIllegalPoint","inputAxesInfo","shouldHide","outputFinder","showValueMap","updaters","showPointer","showTooltip","coordSysContainsPoint","inputAxisInfo","findInputAxisInfo","processOnAxis","linkTriggers","tarAxisInfo","tarKey","srcAxisInfo","srcKey","srcValItem","makeMapperParam","updateModelActually","dispatchTooltipActually","dispatchHighDownActually","dontSnap","buildPayloadsBySeries","payloadBatch","snapToValue","seriesNestestValue","coordSysItem","coordSysId","coordSysIndex","coordSysMainType","outputAxesInfo","valItem","highDownKey","lastHighlights","newHighlights","toHighlight","toDownplay","setScrollDataIndex","rawGeoJson","rawSpecialAreas","parsers","groupSeriesByAxis","groupItem","calculateBase","layoutSingleSeries","boxOffsetList","boxWidthList","axisList","boundList","maxDataCount","boxWidthBound","availableWidth","boxGap","boxWidth","halfWidth","median","end1","end2","end4","end5","layEndLine","endCenter","HOVER_LAYER_ZLEVEL","CANVAS_ZLEVEL","EL_AFTER_INCREMENTAL_INC","INCREMENTAL_INC","isLayerValid","__builtin__","isDisplayableCulled","isClipPathChanged","prevClipPaths","doClip","createRoot","domRoot","singleCanvas","_singleCanvas","rootStyle","zlevelList","_zlevelList","layers","_layerConfig","_needsManuallyCompositing","mainLayer","_domRoot","_hoverlayer","_hoverElements","isSingleCanvas","paintAll","_redrawId","_backgroundColor","__hoverMir","hoverElements","hoverLayer","originalEl","_doPaintEl","getHoverLayer","redrawId","_updateLayerStatus","finished","_doPaintList","_compositeManually","eachBuiltinLayer","virtual","layerList","zi","useTimer","firstEl","dTime","prevElClipPaths","currentLayer","forcePaint","insertLayer","layersMap","prevLayer","prevDom","eachLayer","getLayers","updatePrevLayer","prevZlevel","incrementalLayerCount","layerConfig","_zlevel","delLayer","_progressiveLayers","clearLayer","imageLayer","renderToCanvas","shadowBlurSize","leftMargin","rightMargin","topMargin","bottomMargin","pathTransform","ImageShape","imgShape","upperCaseFirst","group1","replaceReg","replaceMap","'","TPL_VAR_ALIAS","wrapVar","varName","seriesIdx","paramsList","seriesLen","alias","formatTplSimple","isUTC","utc","getTextBoundingRect","blank","opener","autoPlay","rewind","playInterval","_names","_initData","dataArr","idxArr","positionMap","directionMap","stackedByDimInfo","stackedDimInfo","byIndex","stackedCoordDimension","mayStack","stackedDimCoordDim","stackedDimType","stackedDimCoordIndex","stackedDim","targetDim","MONTH_TEXT","EN","CN","WEEK_TEXT","_tlpoints","_blpoints","_firstDayOfMonth","_firstDayPoints","rangeData","_renderDayRect","_renderLines","_renderYearText","_renderMonthText","_renderWeekText","itemRectStyleModel","addPoints","_getLinePointsOfOneWeek","_drawSplitline","_getEdgesPoints","rs","poyline","tmpD","_formatterLabel","_yearTextPositionControl","aligns","xc","yc","posPoints","yearText","_monthTextPositionControl","isCenter","termPoints","firstDayPoints","yyyy","yy","MM","monthText","_weekTextPositionControl","isStart","firstDayOfWeek","weekText","mathAtan2","resizeGeo","leftTop","rightBottom","boxLayoutOption","useCenterAndSize","setGeoCoords","geoList","mapModelGroupBySeries","nameMapList","singleMapSeries","originRegionArr","regionsArr","pp","initialFriction","v12","nLen","repFact","handleSpan","originalDistSign","getSpanSign","extentMinSpan","realExtent","currDistSign","dataSample","treeLayout","PromiseCapability","$$resolve","$$reject","diffData","diffResult","idx1","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","currPoints","nextPoints","currStackedPoints","nextStackedPoints","sortedIndices","rawIndices","newDataOldCoordInfo","oldDataNewCoordInfo","diffItem","pointAdded","currentPt","nextPt","sortedCurrPoints","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","stackedOnCurrent","stackedOnNext","SingleAxisPointer","getPointDimIndex","ScrollableLegendModel","pageButtonItemGap","pageIcons","pageIconColor","pageIconInactiveColor","pageTextStyle","_bbox","lineAnimationDiff","isPointsSame","points2","getBoundingDiff","min1","max1","getSmooth","getStackedOnPoints","turnPointsIntoStep","stepTurnAt","stepPoints","stepPt","stepPt2","getVisualGradient","stopLen","tinyExtent","minCoord","maxCoord","coordSpan","getIsIgnoreFunc","isAuto","canShowAllSymbolForCategory","categoryDataDim","labelMap","availSize","createLineClipPath","_lineGroup","isCoordSysPolar","prevCoordSys","_coordSys","_polyline","_polygon","isAreaChart","isIgnoreFunc","__temp","clipShapeForSymbol","_clipShapeForSymbol","_step","_newPolygon","isIgnore","_stackedOnPoints","_updateAnimation","_newPolyline","stackedOnSeries","_valueOrigin","__points","updatedDataInfo","diffStatus","ptIdx","FREEZING","METADATA","setMetadata","objectID","weakData","getWeakData","onFreeze","contrastColor","axisCommon","CartesianAxisView","loopGeo","newRegion","parallelPreprocessor","CLICK_THRESHOLD","_handlers","_throttledDispatchExpand","_dispatchExpand","checkTrigger","_mouseDownPoint","mouseDownPoint","DEFAULT_OUT_OF_BRUSH_COLOR","BrushModel","brushMode","transformable","inBrush","outOfBrush","generateBrushOption","Task","_reset","_plan","_onDirty","_dirty","taskProto","planResult","upTask","_upstream","lastModBy","normalizeModBy","_modBy","lastModDataCount","_modDataCount","_dueEnd","_outputDueEnd","_progress","_dueIndex","doProgress","outputDueEnd","_settedOutputEnd","winCount","sStep","sCount","modNext","sequentialNext","taskIns","_callingProgress","downstream","_downstream","downTask","normalizeRect","localPoints","specifiedXYIndex","brushWidth","targetModel","localCursorPoint","classofRaw","CORRECT_ARGUMENTS","tryGet","callee","TEXT_PADDING","ITEM_GAP","ARRAY_LENGTH","makeItemPoints","packEventData","itemNode","selfType","normalStyleModel","layoutParam","totalWidth","renderList","_prepare","_renderContent","lastX","availableSize","getAvailableSize","dataStatistics","statisticType","mapKey","seriesGroups","hostGeoModel","seriesList","symbolCtor","_symbolCtor","symbolDrawProto","normalizeUpdateOpt","SymbolCtor","enableAnimation","PieSeries","_createSelectableList","minShowLabelAngle","hoverOffset","avoidLabelOverlap","alignTo","distanceToLabelLine","HV_NAMES","boxLayout","maxHeight","currentLineMaxSize","nextX","nextY","nextChild","nextChildRect","moveX","moveY","vbox","hbox","containerRect","verticalMargin","horizontalMargin","elPos","targetOption","hResult","vResult","newParams","newValueCount","merged","mergedValueCount","enoughParamNumber","hasProp","boxplotVisual","boxplotLayout","matrixUtil","dumbGroup","_transform","_dumbGroup","hasBuilder","builders","pt1","pt2","arrows","arrowSize","arrowOffset","symbolWidth","symbolHeight","axisTickLabel","ticksEls","buildAxisMajorTicks","labelEls","buildAxisLabel","fixMinMaxLabelShow","buildAxisMinorTicks","gapSignal","isNameLocationCenter","nameRotation","endTextLayout","truncateOpt","truncatedText","__fullText","__truncatedText","axisRotation","rotationDiff","textRotate","onLeft","tickEls","firstLabel","nextLabel","lastLabel","prevLabel","firstTick","lastTick","ignoreEl","isTwoLabelOverlapped","firstRect","nextRect","mRotationBack","createTicks","tickTransform","tickEndCoord","aniid","tickEl","minorTickLineStyle","minorTicksEls","itemLabelModel","compatStyle","compatLayoutProperties","LAYOUT_PROPERTIES","COMPATITABLE_COMPONENTS","clipOverflow","clockWise","pointerColor","dataRange","componentName","$createElement","_c","_self","staticClass","staticStyle","handleClick","slot","_v","currentChartType","titleOption","subTitleOption","cursorOption","legendOption","ENABLE_ACTIVE","DISABLE_ACTIVE","UPDATE_CHART_ITEM","setActive","chartLists","unsetActive","updateChartItem","updateObj","getActive","chartList","transformTitle","chartAllTypeArray","resultTitle","transTextStyle","transformLegend","resLegend","transformTooltip","resTooltip","formatter1","floatTool","formatter2","transformAxis","transAxis","ori","transLineStyle","transCustom","echartsEngine","setChartOptionsByRouter","router","routerArray","deepFind","curObj","renderChart","renderChartObj","ele","chart_id","getElementById","attr1","fontGroupList","floatNum","num","strfi","dotPos","intNum","operation","o1","o2","currentChartIndex","currentChartOptions","default","$nextTick","renderCharts","ENABLE_DRAGGABLE","DISABLE_DRAGGABLE","ENABLE_RESIZABLE","DISABLE_RESIZABLE","ENABLE_PARENT_LIMITATION","DISABLE_PARENT_LIMITATION","ENABLE_SNAP_TO_GRID","DISABLE_SNAP_TO_GRID","ENABLE_ASPECT","DISABLE_ASPECT","ENABLE_X_AXIS","ENABLE_Y_AXIS","ENABLE_BOTH_AXIS","ENABLE_NONE_AXIS","CHANGE_ZINDEX","CHANGE_MINW","CHANGE_MINH","CHANGE_WIDTH","CHANGE_HEIGHT","CHANGE_TOP","CHANGE_LEFT","rects","toggleDraggable","toggleResizable","resizable","toggleParentLimitation","parentLim","toggleSnapToGrid","snapToGrid","setAspect","unsetAspect","setWidth","setHeight","setTop","setLeft","changeXLock","changeYLock","changeZToBottom","changeZToTop","setMinWidth","minw","setMinHeight","minh","aspectRatio","chartRender","use","Vuex","debug","chartSetting","initChart","outDom","createChart","chartOption","insertNewChart","renderDom","modelChartShowHTML","chart_id_c","$t","addclass","appendTo","chartTheme","chart_json","rowColCheck","highlightChart","ChartSetting","ChartRender","componentInstalled","storeRegistered","fin","COVER_Z","UNSELECT_THRESHOLD","MIN_RESIZE_LINE_WIDTH","MUTEX_RESOURCE_KEY","DIRECTION_MAP","CURSOR_MAP","ne","nw","se","DEFAULT_BRUSH_OPT","baseUID","_brushType","_brushOption","_panels","_covers","_creatingCover","_creatingPanel","_enableGlobalPan","_uid","pointerHandlers","doEnableBrush","mountHandlers","doDisableBrush","unmountHandlers","createCover","cover","coverRenderers","__brushOption","endCreating","creatingCover","coverRenderer","getCoverRenderer","updateCoverShape","updateCoverAfterCreation","getPanelByPoint","panel","panels","pn","getPanelByCover","clearCovers","covers","originalLength","shouldShowCover","getTrackEnds","createBaseRectCover","doDrift","edgeNames","makeStyle","updateBaseRect","localRange","xa","ya","x2a","y2a","widtha","heighta","updateRectShape","mainEl","globalDir","getGlobalDirection","pointsToRect","clipByPanel","formatRectRange","localDirection","inverseMap","driftRect","toRectRange","fromRectRange","rectRange","localDelta","toLocalDelta","namePart","ind","driftPolygon","localD","localZero","xmin","ymin","xmax","ymax","resetCursor","isOutsideZrArea","currPanel","rawE","mainShapeContain","updateCoverByMouse","eventParams","thisBrushOption","determineBrushType","coverBrushOption","getCreatingRange","panelOpts","eachCover","brushOptionList","tmpIdPrefix","oldCovers","newCovers","oldGetKey","addOrUpdate","newBrushOption","handleDragEnd","getLineRenderer","localTrack","_radiusAxis","_angleAxis","maxAngle","colorAccessPath","colorCallback","borderColorAccessPath","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","samplers","nearest","indexSampler","sampler","PATH_COLOR","BoxplotSeries","brushLang","Brush","_brushMode","isBrushed","command","styleModel","paddings","confineInContainer","bgColor","axisDimension"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,QACR,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIJ,GACe,kBAAZC,QACdA,QAAQ,YAAcD,EAAQG,QAAQ,QAEtC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UG,KAAM3Q,EAAOy+D,GACxDl2D,MAAOg8E,EAAWn9E,UAClBkoD,cAAei1B,EAAWp9E,oBAU9B,SAASwzK,EAAc9tK,EAAIC,EAAIi7R,GAE7B,OADAA,EAAYA,GAAa,EAClB,CACL7sO,GAAIruD,EAAGk7R,GACP5sO,GAAItuD,EAAG,EAAIk7R,GACX3sO,GAAItuD,EAAGi7R,GACP1sO,GAAIvuD,EAAG,EAAIi7R,IAUf,SAASjtH,EAAcp1I,EAAID,EAAIsiQ,GAE7B,OADAA,EAAYA,GAAa,EAClB,CACL/gS,EAAG0+B,EAAGqiQ,GACN9gS,EAAGy+B,EAAG,EAAIqiQ,GACV5kS,MAAOsiC,EAAGsiQ,GACV36R,OAAQq4B,EAAG,EAAIsiQ,IAInB,SAAStmF,EAAgBlkK,EAAIC,EAAI4D,EAAIvhD,EAAGwhD,EAAYC,GAClD,MAAO,CACL/D,GAAIA,EACJC,GAAIA,EACJ4D,GAAIA,EACJvhD,EAAGA,EACHwhD,WAAYA,EACZC,SAAUA,EACVuO,WAAW,GAIf51D,EAAQ4/K,aAAeA,EACvB5/K,EAAQsnN,mBAAqBA,EAC7BtnN,EAAQwvK,cAAgBA,EACxBxvK,EAAQmgL,uBAAyBA,EACjCngL,EAAQggL,kCAAoCA,EAC5ChgL,EAAQ0gL,cAAgBA,EACxB1gL,EAAQ6gL,cAAgBA,EACxB7gL,EAAQwnN,gBAAkBA","file":"chartmix.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"chartmix\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"chartmix\"] = factory(root[\"Vue\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {\nreturn "," \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t0: 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"chartmix.umd.min.\" + ({}[chunkId]||chunkId) + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"1\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"css/\" + ({}[chunkId]||chunkId) + \".\" + {\"1\":\"68a757d2\",\"2\":\"31d6cfe0\",\"3\":\"31d6cfe0\",\"4\":\"31d6cfe0\",\"5\":\"31d6cfe0\",\"6\":\"31d6cfe0\",\"7\":\"31d6cfe0\",\"8\":\"31d6cfe0\",\"9\":\"31d6cfe0\",\"10\":\"31d6cfe0\",\"11\":\"31d6cfe0\"}[chunkId] + \".css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = (typeof self !== 'undefined' ? self : this)[\"webpackJsonpchartmix\"] = (typeof self !== 'undefined' ? self : this)[\"webpackJsonpchartmix\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar createHashMap = _util.createHashMap;\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.parallel',\n dependencies: ['parallel'],\n visualColorAccessPath: 'lineStyle.color',\n getInitialData: function (option, ecModel) {\n var source = this.getSource();\n setEncodeAndDimensions(source, this);\n return createListFromArray(source, this);\n },\n\n /**\n * User can get data raw indices on 'axisAreaSelected' event received.\n *\n * @public\n * @param {string} activeState 'active' or 'inactive' or 'normal'\n * @return {Array.} Raw indices\n */\n getRawIndicesByActiveState: function (activeState) {\n var coordSys = this.coordinateSystem;\n var data = this.getData();\n var indices = [];\n coordSys.eachActiveState(data, function (theActiveState, dataIndex) {\n if (activeState === theActiveState) {\n indices.push(data.getRawIndex(dataIndex));\n }\n });\n return indices;\n },\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'parallel',\n parallelIndex: 0,\n label: {\n show: false\n },\n inactiveOpacity: 0.05,\n activeOpacity: 1,\n lineStyle: {\n width: 1,\n opacity: 0.45,\n type: 'solid'\n },\n emphasis: {\n label: {\n show: false\n }\n },\n progressive: 500,\n smooth: false,\n // true | false | number\n animationEasing: 'linear'\n }\n});\n\nfunction setEncodeAndDimensions(source, seriesModel) {\n // The mapping of parallelAxis dimension to data dimension can\n // be specified in parallelAxis.option.dim. For example, if\n // parallelAxis.option.dim is 'dim3', it mapping to the third\n // dimension of data. But `data.encode` has higher priority.\n // Moreover, parallelModel.dimension should not be regarded as data\n // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6'];\n if (source.encodeDefine) {\n return;\n }\n\n var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n\n if (!parallelModel) {\n return;\n }\n\n var encodeDefine = source.encodeDefine = createHashMap();\n each(parallelModel.dimensions, function (axisDim) {\n var dataDimIndex = convertDimNameToNumber(axisDim);\n encodeDefine.set(axisDim, dataDimIndex);\n });\n}\n\nfunction convertDimNameToNumber(dimName) {\n return +dimName.replace('dim', '');\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapView = require(\"./VisualMapView\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar layout = require(\"../../util/layout\");\n\nvar helper = require(\"./helper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PiecewiseVisualMapView = VisualMapView.extend({\n type: 'visualMap.piecewise',\n\n /**\n * @protected\n * @override\n */\n doRender: function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var textStyleModel = visualMapModel.textStyleModel;\n var textFont = textStyleModel.getFont();\n var textFill = textStyleModel.getTextColor();\n\n var itemAlign = this._getItemAlign();\n\n var itemSize = visualMapModel.itemSize;\n\n var viewData = this._getViewData();\n\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);\n zrUtil.each(viewData.viewPieceList, renderItem, this);\n endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign);\n layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap'));\n this.renderBackground(thisGroup);\n this.positionGroup(thisGroup);\n\n function renderItem(item) {\n var piece = item.piece;\n var itemGroup = new graphic.Group();\n itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece);\n\n this._enableHoverLink(itemGroup, item.indexInModelPieceList);\n\n var representValue = visualMapModel.getRepresentValue(piece);\n\n this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]);\n\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n itemGroup.add(new graphic.Text({\n style: {\n x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap,\n y: itemSize[1] / 2,\n text: piece.text,\n textVerticalAlign: 'middle',\n textAlign: itemAlign,\n textFont: textFont,\n textFill: textFill,\n opacity: visualState === 'outOfRange' ? 0.5 : 1\n }\n }));\n }\n\n thisGroup.add(itemGroup);\n }\n },\n\n /**\n * @private\n */\n _enableHoverLink: function (itemGroup, pieceIndex) {\n itemGroup.on('mouseover', zrUtil.bind(onHoverLink, this, 'highlight')).on('mouseout', zrUtil.bind(onHoverLink, this, 'downplay'));\n\n function onHoverLink(method) {\n var visualMapModel = this.visualMapModel;\n visualMapModel.option.hoverLink && this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel)\n });\n }\n },\n\n /**\n * @private\n */\n _getItemAlign: function () {\n var visualMapModel = this.visualMapModel;\n var modelOption = visualMapModel.option;\n\n if (modelOption.orient === 'vertical') {\n return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize);\n } else {\n // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n\n if (!align || align === 'auto') {\n align = 'left';\n }\n\n return align;\n }\n },\n\n /**\n * @private\n */\n _renderEndsText: function (group, text, itemSize, showLabel, itemAlign) {\n if (!text) {\n return;\n }\n\n var itemGroup = new graphic.Group();\n var textStyleModel = this.visualMapModel.textStyleModel;\n itemGroup.add(new graphic.Text({\n style: {\n x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,\n y: itemSize[1] / 2,\n textVerticalAlign: 'middle',\n textAlign: showLabel ? itemAlign : 'center',\n text: text,\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n }));\n group.add(itemGroup);\n },\n\n /**\n * @private\n * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.\n */\n _getViewData: function () {\n var visualMapModel = this.visualMapModel;\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {\n piece: piece,\n indexInModelPieceList: index\n };\n });\n var endsText = visualMapModel.get('text'); // Consider orient and inverse.\n\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high]\n\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n } // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n\n return {\n viewPieceList: viewPieceList,\n endsText: endsText\n };\n },\n\n /**\n * @private\n */\n _createItemSymbol: function (group, representValue, shapeParam) {\n group.add(createSymbol(this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], this.getControllerVisual(representValue, 'color')));\n },\n\n /**\n * @private\n */\n _onItemClick: function (piece) {\n var visualMapModel = this.visualMapModel;\n var option = visualMapModel.option;\n var selected = zrUtil.clone(option.selected);\n var newKey = visualMapModel.getSelectedMapKey(piece);\n\n if (option.selectedMode === 'single') {\n selected[newKey] = true;\n zrUtil.each(selected, function (o, key) {\n selected[key] = key === newKey;\n });\n } else {\n selected[newKey] = !selected[newKey];\n }\n\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: selected\n });\n }\n});\nvar _default = PiecewiseVisualMapView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./axisPointer\");\n\nrequire(\"./tooltip/TooltipModel\");\n\nrequire(\"./tooltip/TooltipView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME Better way to pack data in graphic element\n\n/**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\necharts.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n}, // noop\nfunction () {});\necharts.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n}, // noop\nfunction () {});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar _model = require(\"../../util/model\");\n\nvar defaultEmphasis = _model.defaultEmphasis;\n\nvar _sourceHelper = require(\"../../data/helper/sourceHelper\");\n\nvar makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased;\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar FunnelSeries = echarts.extendSeriesModel({\n type: 'series.funnel',\n init: function (option) {\n FunnelSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)); // Extend labelLine emphasis\n\n this._defaultLabelLine(option);\n },\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n },\n _defaultLabelLine: function (option) {\n // Extend labelLine emphasis\n defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false`\n\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n },\n // Overwrite\n getDataParams: function (dataIndex) {\n var data = this.getData();\n var params = FunnelSeries.superCall(this, 'getDataParams', dataIndex);\n var valueDim = data.mapDimension('value');\n var sum = data.getSum(valueDim); // Percent is 0 if sum is 0\n\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\n params.$vars.push('percent');\n return params;\n },\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n legendHoverLink: true,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n // 默认取数据最小最大值\n // min: 0,\n // max: 100,\n minSize: '0%',\n maxSize: '100%',\n sort: 'descending',\n // 'ascending', 'descending'\n gap: 0,\n funnelAlign: 'center',\n label: {\n show: true,\n position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n\n },\n labelLine: {\n show: true,\n length: 20,\n lineStyle: {\n // color: 各异,\n width: 1,\n type: 'solid'\n }\n },\n itemStyle: {\n // color: 各异,\n borderColor: '#fff',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\nvar _default = FunnelSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction dataToCoordSize(dataSize, dataItem) {\n dataItem = dataItem || [0, 0];\n return zrUtil.map([0, 1], function (dimIdx) {\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var p1 = [];\n var p2 = [];\n p1[dimIdx] = val - halfSize;\n p2[dimIdx] = val + halfSize;\n p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];\n return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);\n }, this);\n}\n\nfunction _default(coordSys) {\n var rect = coordSys.getBoundingRect();\n return {\n coordSys: {\n type: 'geo',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n zoom: coordSys.getZoom()\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" and noRoam param,\n // Compatible with this usage:\n // echarts.util.map(item.points, api.coord)\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}\n\nmodule.exports = _default;","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar View = require(\"../View\");\n\nvar geoSourceManager = require(\"./geoSourceManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * [Geo description]\n * For backward compatibility, the orginal interface:\n * `name, map, geoJson, specialAreas, nameMap` is kept.\n *\n * @param {string|Object} name\n * @param {string} map Map type\n * Specify the positioned areas by left, top, width, height\n * @param {Object.} [nameMap]\n * Specify name alias\n * @param {boolean} [invertLongitute=true]\n */\nfunction Geo(name, map, nameMap, invertLongitute) {\n View.call(this, name);\n /**\n * Map type\n * @type {string}\n */\n\n this.map = map;\n var source = geoSourceManager.load(map, nameMap);\n this._nameCoordMap = source.nameCoordMap;\n this._regionsMap = source.regionsMap;\n this._invertLongitute = invertLongitute == null ? true : invertLongitute;\n /**\n * @readOnly\n */\n\n this.regions = source.regions;\n /**\n * @type {module:zrender/src/core/BoundingRect}\n */\n\n this._rect = source.boundingRect;\n}\n\nGeo.prototype = {\n constructor: Geo,\n type: 'geo',\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['lng', 'lat'],\n\n /**\n * If contain given lng,lat coord\n * @param {Array.}\n * @readOnly\n */\n containCoord: function (coord) {\n var regions = this.regions;\n\n for (var i = 0; i < regions.length; i++) {\n if (regions[i].contain(coord)) {\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * @override\n */\n transformTo: function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var invertLongitute = this._invertLongitute;\n rect = rect.clone();\n\n if (invertLongitute) {\n // Longitute is inverted\n rect.y = -rect.y - rect.height;\n }\n\n var rawTransformable = this._rawTransformable;\n rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n rawTransformable.decomposeTransform();\n\n if (invertLongitute) {\n var scale = rawTransformable.scale;\n scale[1] = -scale[1];\n }\n\n rawTransformable.updateTransform();\n\n this._updateTransform();\n },\n\n /**\n * @param {string} name\n * @return {module:echarts/coord/geo/Region}\n */\n getRegion: function (name) {\n return this._regionsMap.get(name);\n },\n getRegionByCoord: function (coord) {\n var regions = this.regions;\n\n for (var i = 0; i < regions.length; i++) {\n if (regions[i].contain(coord)) {\n return regions[i];\n }\n }\n },\n\n /**\n * Add geoCoord for indexing by name\n * @param {string} name\n * @param {Array.} geoCoord\n */\n addGeoCoord: function (name, geoCoord) {\n this._nameCoordMap.set(name, geoCoord);\n },\n\n /**\n * Get geoCoord by name\n * @param {string} name\n * @return {Array.}\n */\n getGeoCoord: function (name) {\n return this._nameCoordMap.get(name);\n },\n\n /**\n * @override\n */\n getBoundingRect: function () {\n return this._rect;\n },\n\n /**\n * @param {string|Array.} data\n * @param {boolean} noRoam\n * @param {Array.} [out]\n * @return {Array.}\n */\n dataToPoint: function (data, noRoam, out) {\n if (typeof data === 'string') {\n // Map area name to geoCoord\n data = this.getGeoCoord(data);\n }\n\n if (data) {\n return View.prototype.dataToPoint.call(this, data, noRoam, out);\n }\n },\n\n /**\n * @override\n */\n convertToPixel: zrUtil.curry(doConvert, 'dataToPoint'),\n\n /**\n * @override\n */\n convertFromPixel: zrUtil.curry(doConvert, 'pointToData')\n};\nzrUtil.mixin(Geo, View);\n\nfunction doConvert(methodName, ecModel, finder, value) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n var coordSys = geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map.\n || (seriesModel.getReferringComponents('geo')[0] || {}).coordinateSystem : null;\n return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nvar _default = Geo;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n *\n * @param {Object} opt {labelInside}\n * @return {Object} {\n * position, rotation, labelDirection, labelOffset,\n * tickDirection, labelRotate, z2\n * }\n */\nfunction layout(gridModel, axisModel, opt) {\n opt = opt || {};\n var grid = gridModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n } // Axis position\n\n\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation\n\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim\n\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n\n if (axisModel.get('axisTick.inside')) {\n layout.tickDirection = -layout.tickDirection;\n }\n\n if (zrUtil.retrieve(opt.labelInside, axisModel.get('axisLabel.inside'))) {\n layout.labelDirection = -layout.labelDirection;\n } // Special label rotation\n\n\n var labelRotate = axisModel.get('axisLabel.rotate');\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea\n\n layout.z2 = 1;\n return layout;\n}\n\nexports.layout = layout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../util/graphic\");\n\nrequire(\"../coord/cartesian/Grid\");\n\nrequire(\"./axis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Grid view\necharts.extendComponentView({\n type: 'grid',\n render: function (gridModel, ecModel) {\n this.group.removeAll();\n\n if (gridModel.get('show')) {\n this.group.add(new graphic.Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: zrUtil.defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n }\n});\necharts.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * For geo and graph.\n *\n * @param {Object} controllerHost\n * @param {module:zrender/Element} controllerHost.target\n */\nfunction updateViewOnPan(controllerHost, dx, dy) {\n var target = controllerHost.target;\n var pos = target.position;\n pos[0] += dx;\n pos[1] += dy;\n target.dirty();\n}\n/**\n * For geo and graph.\n *\n * @param {Object} controllerHost\n * @param {module:zrender/Element} controllerHost.target\n * @param {number} controllerHost.zoom\n * @param {number} controllerHost.zoomLimit like: {min: 1, max: 2}\n */\n\n\nfunction updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {\n var target = controllerHost.target;\n var zoomLimit = controllerHost.zoomLimit;\n var pos = target.position;\n var scale = target.scale;\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom; // Keep the mouse center when scaling\n\n pos[0] -= (zoomX - pos[0]) * (zoomScale - 1);\n pos[1] -= (zoomY - pos[1]) * (zoomScale - 1);\n scale[0] *= zoomScale;\n scale[1] *= zoomScale;\n target.dirty();\n}\n\nexports.updateViewOnPan = updateViewOnPan;\nexports.updateViewOnZoom = updateViewOnZoom;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar ComponentModel = require(\"../model/Component\");\n\nvar ComponentView = require(\"../view/Component\");\n\nvar _sourceHelper = require(\"../data/helper/sourceHelper\");\n\nvar detectSourceFormat = _sourceHelper.detectSourceFormat;\n\nvar _sourceType = require(\"../data/helper/sourceType\");\n\nvar SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * This module is imported by echarts directly.\n *\n * Notice:\n * Always keep this file exists for backward compatibility.\n * Because before 4.1.0, dataset is an optional component,\n * some users may import this module manually.\n */\nComponentModel.extend({\n type: 'dataset',\n\n /**\n * @protected\n */\n defaultOption: {\n // 'row', 'column'\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,\n // null/'auto': auto detect header, see \"module:echarts/data/helper/sourceHelper\"\n sourceHeader: null,\n dimensions: null,\n source: null\n },\n optionUpdated: function () {\n detectSourceFormat(this);\n }\n});\nComponentView.extend({\n type: 'dataset'\n});","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// https://github.com/mziccard/node-timsort\nvar DEFAULT_MIN_MERGE = 32;\nvar DEFAULT_MIN_GALLOPING = 7;\nvar DEFAULT_TMP_STORAGE_LENGTH = 256;\n\nfunction minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n}\n\nfunction makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n}\n\nfunction reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n}\n\nfunction binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n var left = lo;\n var right = start;\n var mid;\n\n while (left < right) {\n mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n\n }\n\n array[left] = pivot;\n }\n}\n\nfunction gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n\n return offset;\n}\n\nfunction gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n}\n\nfunction TimSort(array, compare) {\n var minGallop = DEFAULT_MIN_GALLOPING;\n var length = 0;\n var tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n var stackLength = 0;\n var runStart;\n var runLength;\n var stackSize = 0;\n length = array.length;\n\n if (length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n tmpStorageLength = length >>> 1;\n }\n\n var tmp = [];\n stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40;\n runStart = [];\n runLength = [];\n\n function pushRun(_runStart, _runLength) {\n runStart[stackSize] = _runStart;\n runLength[stackSize] = _runLength;\n stackSize += 1;\n }\n\n function mergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n\n if (n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1] || n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1]) {\n if (runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n } else if (runLength[n] > runLength[n + 1]) {\n break;\n }\n\n mergeAt(n);\n }\n }\n\n function forceMergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n\n if (n > 0 && runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n\n mergeAt(n);\n }\n }\n\n function mergeAt(i) {\n var start1 = runStart[i];\n var length1 = runLength[i];\n var start2 = runStart[i + 1];\n var length2 = runLength[i + 1];\n runLength[i] = length1 + length2;\n\n if (i === stackSize - 3) {\n runStart[i + 1] = runStart[i + 2];\n runLength[i + 1] = runLength[i + 2];\n }\n\n stackSize--;\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n mergeLow(start1, length1, start2, length2);\n } else {\n mergeHigh(start1, length1, start2, length2);\n }\n }\n\n function mergeLow(start1, length1, start2, length2) {\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var _minGallop = minGallop;\n var count1;\n var count2;\n var exit;\n\n while (1) {\n count1 = 0;\n count2 = 0;\n exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n\n _minGallop += 2;\n }\n\n minGallop = _minGallop;\n minGallop < 1 && (minGallop = 1);\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error(); // throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n }\n\n function mergeHigh(start1, length1, start2, length2) {\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var _minGallop = minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n\n _minGallop += 2;\n }\n\n minGallop = _minGallop;\n\n if (minGallop < 1) {\n minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error(); // throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n }\n\n this.mergeRuns = mergeRuns;\n this.forceMergeRuns = forceMergeRuns;\n this.pushRun = pushRun;\n}\n\nfunction sort(array, compare, lo, hi) {\n if (!lo) {\n lo = 0;\n }\n\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n\n if (runLength < minRun) {\n var force = remaining;\n\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n}\n\nmodule.exports = sort;","var toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n","var windingLine = require(\"./windingLine\");\n\nvar EPSILON = 1e-8;\n\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n}\n\nfunction contain(points, x, y) {\n var w = 0;\n var p = points[0];\n\n if (!p) {\n return false;\n }\n\n for (var i = 1; i < points.length; i++) {\n var p2 = points[i];\n w += windingLine(p[0], p[1], p2[0], p2[1], x, y);\n p = p2;\n } // Close polygon\n\n\n var p0 = points[0];\n\n if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) {\n w += windingLine(p[0], p[1], p0[0], p0[1], x, y);\n }\n\n return w !== 0;\n}\n\nexports.contain = contain;","var Clip = require(\"./Clip\");\n\nvar color = require(\"../tool/color\");\n\nvar _util = require(\"../core/util\");\n\nvar isArrayLike = _util.isArrayLike;\n\n/**\n * @module echarts/animation/Animator\n */\nvar arraySlice = Array.prototype.slice;\n\nfunction defaultGetter(target, key) {\n return target[key];\n}\n\nfunction defaultSetter(target, key, value) {\n target[key] = value;\n}\n/**\n * @param {number} p0\n * @param {number} p1\n * @param {number} percent\n * @return {number}\n */\n\n\nfunction interpolateNumber(p0, p1, percent) {\n return (p1 - p0) * percent + p0;\n}\n/**\n * @param {string} p0\n * @param {string} p1\n * @param {number} percent\n * @return {string}\n */\n\n\nfunction interpolateString(p0, p1, percent) {\n return percent > 0.5 ? p1 : p0;\n}\n/**\n * @param {Array} p0\n * @param {Array} p1\n * @param {number} percent\n * @param {Array} out\n * @param {number} arrDim\n */\n\n\nfunction interpolateArray(p0, p1, percent, out, arrDim) {\n var len = p0.length;\n\n if (arrDim === 1) {\n for (var i = 0; i < len; i++) {\n out[i] = interpolateNumber(p0[i], p1[i], percent);\n }\n } else {\n var len2 = len && p0[0].length;\n\n for (var i = 0; i < len; i++) {\n for (var j = 0; j < len2; j++) {\n out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent);\n }\n }\n }\n} // arr0 is source array, arr1 is target array.\n// Do some preprocess to avoid error happened when interpolating from arr0 to arr1\n\n\nfunction fillArr(arr0, arr1, arrDim) {\n var arr0Len = arr0.length;\n var arr1Len = arr1.length;\n\n if (arr0Len !== arr1Len) {\n // FIXME Not work for TypedArray\n var isPreviousLarger = arr0Len > arr1Len;\n\n if (isPreviousLarger) {\n // Cut the previous\n arr0.length = arr1Len;\n } else {\n // Fill the previous\n for (var i = arr0Len; i < arr1Len; i++) {\n arr0.push(arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i]));\n }\n }\n } // Handling NaN value\n\n\n var len2 = arr0[0] && arr0[0].length;\n\n for (var i = 0; i < arr0.length; i++) {\n if (arrDim === 1) {\n if (isNaN(arr0[i])) {\n arr0[i] = arr1[i];\n }\n } else {\n for (var j = 0; j < len2; j++) {\n if (isNaN(arr0[i][j])) {\n arr0[i][j] = arr1[i][j];\n }\n }\n }\n }\n}\n/**\n * @param {Array} arr0\n * @param {Array} arr1\n * @param {number} arrDim\n * @return {boolean}\n */\n\n\nfunction isArraySame(arr0, arr1, arrDim) {\n if (arr0 === arr1) {\n return true;\n }\n\n var len = arr0.length;\n\n if (len !== arr1.length) {\n return false;\n }\n\n if (arrDim === 1) {\n for (var i = 0; i < len; i++) {\n if (arr0[i] !== arr1[i]) {\n return false;\n }\n }\n } else {\n var len2 = arr0[0].length;\n\n for (var i = 0; i < len; i++) {\n for (var j = 0; j < len2; j++) {\n if (arr0[i][j] !== arr1[i][j]) {\n return false;\n }\n }\n }\n }\n\n return true;\n}\n/**\n * Catmull Rom interpolate array\n * @param {Array} p0\n * @param {Array} p1\n * @param {Array} p2\n * @param {Array} p3\n * @param {number} t\n * @param {number} t2\n * @param {number} t3\n * @param {Array} out\n * @param {number} arrDim\n */\n\n\nfunction catmullRomInterpolateArray(p0, p1, p2, p3, t, t2, t3, out, arrDim) {\n var len = p0.length;\n\n if (arrDim === 1) {\n for (var i = 0; i < len; i++) {\n out[i] = catmullRomInterpolate(p0[i], p1[i], p2[i], p3[i], t, t2, t3);\n }\n } else {\n var len2 = p0[0].length;\n\n for (var i = 0; i < len; i++) {\n for (var j = 0; j < len2; j++) {\n out[i][j] = catmullRomInterpolate(p0[i][j], p1[i][j], p2[i][j], p3[i][j], t, t2, t3);\n }\n }\n }\n}\n/**\n * Catmull Rom interpolate number\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @param {number} t2\n * @param {number} t3\n * @return {number}\n */\n\n\nfunction catmullRomInterpolate(p0, p1, p2, p3, t, t2, t3) {\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n return (2 * (p1 - p2) + v0 + v1) * t3 + (-3 * (p1 - p2) - 2 * v0 - v1) * t2 + v0 * t + p1;\n}\n\nfunction cloneValue(value) {\n if (isArrayLike(value)) {\n var len = value.length;\n\n if (isArrayLike(value[0])) {\n var ret = [];\n\n for (var i = 0; i < len; i++) {\n ret.push(arraySlice.call(value[i]));\n }\n\n return ret;\n }\n\n return arraySlice.call(value);\n }\n\n return value;\n}\n\nfunction rgba2String(rgba) {\n rgba[0] = Math.floor(rgba[0]);\n rgba[1] = Math.floor(rgba[1]);\n rgba[2] = Math.floor(rgba[2]);\n return 'rgba(' + rgba.join(',') + ')';\n}\n\nfunction getArrayDim(keyframes) {\n var lastValue = keyframes[keyframes.length - 1].value;\n return isArrayLike(lastValue && lastValue[0]) ? 2 : 1;\n}\n\nfunction createTrackClip(animator, easing, oneTrackDone, keyframes, propName, forceAnimate) {\n var getter = animator._getter;\n var setter = animator._setter;\n var useSpline = easing === 'spline';\n var trackLen = keyframes.length;\n\n if (!trackLen) {\n return;\n } // Guess data type\n\n\n var firstVal = keyframes[0].value;\n var isValueArray = isArrayLike(firstVal);\n var isValueColor = false;\n var isValueString = false; // For vertices morphing\n\n var arrDim = isValueArray ? getArrayDim(keyframes) : 0;\n var trackMaxTime; // Sort keyframe as ascending\n\n keyframes.sort(function (a, b) {\n return a.time - b.time;\n });\n trackMaxTime = keyframes[trackLen - 1].time; // Percents of each keyframe\n\n var kfPercents = []; // Value of each keyframe\n\n var kfValues = [];\n var prevValue = keyframes[0].value;\n var isAllValueEqual = true;\n\n for (var i = 0; i < trackLen; i++) {\n kfPercents.push(keyframes[i].time / trackMaxTime); // Assume value is a color when it is a string\n\n var value = keyframes[i].value; // Check if value is equal, deep check if value is array\n\n if (!(isValueArray && isArraySame(value, prevValue, arrDim) || !isValueArray && value === prevValue)) {\n isAllValueEqual = false;\n }\n\n prevValue = value; // Try converting a string to a color array\n\n if (typeof value === 'string') {\n var colorArray = color.parse(value);\n\n if (colorArray) {\n value = colorArray;\n isValueColor = true;\n } else {\n isValueString = true;\n }\n }\n\n kfValues.push(value);\n }\n\n if (!forceAnimate && isAllValueEqual) {\n return;\n }\n\n var lastValue = kfValues[trackLen - 1]; // Polyfill array and NaN value\n\n for (var i = 0; i < trackLen - 1; i++) {\n if (isValueArray) {\n fillArr(kfValues[i], lastValue, arrDim);\n } else {\n if (isNaN(kfValues[i]) && !isNaN(lastValue) && !isValueString && !isValueColor) {\n kfValues[i] = lastValue;\n }\n }\n }\n\n isValueArray && fillArr(getter(animator._target, propName), lastValue, arrDim); // Cache the key of last frame to speed up when\n // animation playback is sequency\n\n var lastFrame = 0;\n var lastFramePercent = 0;\n var start;\n var w;\n var p0;\n var p1;\n var p2;\n var p3;\n\n if (isValueColor) {\n var rgba = [0, 0, 0, 0];\n }\n\n var onframe = function (target, percent) {\n // Find the range keyframes\n // kf1-----kf2---------current--------kf3\n // find kf2 and kf3 and do interpolation\n var frame; // In the easing function like elasticOut, percent may less than 0\n\n if (percent < 0) {\n frame = 0;\n } else if (percent < lastFramePercent) {\n // Start from next key\n // PENDING start from lastFrame ?\n start = Math.min(lastFrame + 1, trackLen - 1);\n\n for (frame = start; frame >= 0; frame--) {\n if (kfPercents[frame] <= percent) {\n break;\n }\n } // PENDING really need to do this ?\n\n\n frame = Math.min(frame, trackLen - 2);\n } else {\n for (frame = lastFrame; frame < trackLen; frame++) {\n if (kfPercents[frame] > percent) {\n break;\n }\n }\n\n frame = Math.min(frame - 1, trackLen - 2);\n }\n\n lastFrame = frame;\n lastFramePercent = percent;\n var range = kfPercents[frame + 1] - kfPercents[frame];\n\n if (range === 0) {\n return;\n } else {\n w = (percent - kfPercents[frame]) / range;\n }\n\n if (useSpline) {\n p1 = kfValues[frame];\n p0 = kfValues[frame === 0 ? frame : frame - 1];\n p2 = kfValues[frame > trackLen - 2 ? trackLen - 1 : frame + 1];\n p3 = kfValues[frame > trackLen - 3 ? trackLen - 1 : frame + 2];\n\n if (isValueArray) {\n catmullRomInterpolateArray(p0, p1, p2, p3, w, w * w, w * w * w, getter(target, propName), arrDim);\n } else {\n var value;\n\n if (isValueColor) {\n value = catmullRomInterpolateArray(p0, p1, p2, p3, w, w * w, w * w * w, rgba, 1);\n value = rgba2String(rgba);\n } else if (isValueString) {\n // String is step(0.5)\n return interpolateString(p1, p2, w);\n } else {\n value = catmullRomInterpolate(p0, p1, p2, p3, w, w * w, w * w * w);\n }\n\n setter(target, propName, value);\n }\n } else {\n if (isValueArray) {\n interpolateArray(kfValues[frame], kfValues[frame + 1], w, getter(target, propName), arrDim);\n } else {\n var value;\n\n if (isValueColor) {\n interpolateArray(kfValues[frame], kfValues[frame + 1], w, rgba, 1);\n value = rgba2String(rgba);\n } else if (isValueString) {\n // String is step(0.5)\n return interpolateString(kfValues[frame], kfValues[frame + 1], w);\n } else {\n value = interpolateNumber(kfValues[frame], kfValues[frame + 1], w);\n }\n\n setter(target, propName, value);\n }\n }\n };\n\n var clip = new Clip({\n target: animator._target,\n life: trackMaxTime,\n loop: animator._loop,\n delay: animator._delay,\n onframe: onframe,\n ondestroy: oneTrackDone\n });\n\n if (easing && easing !== 'spline') {\n clip.easing = easing;\n }\n\n return clip;\n}\n/**\n * @alias module:zrender/animation/Animator\n * @constructor\n * @param {Object} target\n * @param {boolean} loop\n * @param {Function} getter\n * @param {Function} setter\n */\n\n\nvar Animator = function (target, loop, getter, setter) {\n this._tracks = {};\n this._target = target;\n this._loop = loop || false;\n this._getter = getter || defaultGetter;\n this._setter = setter || defaultSetter;\n this._clipCount = 0;\n this._delay = 0;\n this._doneList = [];\n this._onframeList = [];\n this._clipList = [];\n};\n\nAnimator.prototype = {\n /**\n * Set Animation keyframe\n * @param {number} time 关键帧时间,单位是ms\n * @param {Object} props 关键帧的属性值,key-value表示\n * @return {module:zrender/animation/Animator}\n */\n when: function (time\n /* ms */\n , props) {\n var tracks = this._tracks;\n\n for (var propName in props) {\n if (!props.hasOwnProperty(propName)) {\n continue;\n }\n\n if (!tracks[propName]) {\n tracks[propName] = []; // Invalid value\n\n var value = this._getter(this._target, propName);\n\n if (value == null) {\n // zrLog('Invalid property ' + propName);\n continue;\n } // If time is 0\n // Then props is given initialize value\n // Else\n // Initialize value from current prop value\n\n\n if (time !== 0) {\n tracks[propName].push({\n time: 0,\n value: cloneValue(value)\n });\n }\n }\n\n tracks[propName].push({\n time: time,\n value: props[propName]\n });\n }\n\n return this;\n },\n\n /**\n * 添加动画每一帧的回调函数\n * @param {Function} callback\n * @return {module:zrender/animation/Animator}\n */\n during: function (callback) {\n this._onframeList.push(callback);\n\n return this;\n },\n pause: function () {\n for (var i = 0; i < this._clipList.length; i++) {\n this._clipList[i].pause();\n }\n\n this._paused = true;\n },\n resume: function () {\n for (var i = 0; i < this._clipList.length; i++) {\n this._clipList[i].resume();\n }\n\n this._paused = false;\n },\n isPaused: function () {\n return !!this._paused;\n },\n _doneCallback: function () {\n // Clear all tracks\n this._tracks = {}; // Clear all clips\n\n this._clipList.length = 0;\n var doneList = this._doneList;\n var len = doneList.length;\n\n for (var i = 0; i < len; i++) {\n doneList[i].call(this);\n }\n },\n\n /**\n * Start the animation\n * @param {string|Function} [easing]\n * 动画缓动函数,详见{@link module:zrender/animation/easing}\n * @param {boolean} forceAnimate\n * @return {module:zrender/animation/Animator}\n */\n start: function (easing, forceAnimate) {\n var self = this;\n var clipCount = 0;\n\n var oneTrackDone = function () {\n clipCount--;\n\n if (!clipCount) {\n self._doneCallback();\n }\n };\n\n var lastClip;\n\n for (var propName in this._tracks) {\n if (!this._tracks.hasOwnProperty(propName)) {\n continue;\n }\n\n var clip = createTrackClip(this, easing, oneTrackDone, this._tracks[propName], propName, forceAnimate);\n\n if (clip) {\n this._clipList.push(clip);\n\n clipCount++; // If start after added to animation\n\n if (this.animation) {\n this.animation.addClip(clip);\n }\n\n lastClip = clip;\n }\n } // Add during callback on the last clip\n\n\n if (lastClip) {\n var oldOnFrame = lastClip.onframe;\n\n lastClip.onframe = function (target, percent) {\n oldOnFrame(target, percent);\n\n for (var i = 0; i < self._onframeList.length; i++) {\n self._onframeList[i](target, percent);\n }\n };\n } // This optimization will help the case that in the upper application\n // the view may be refreshed frequently, where animation will be\n // called repeatly but nothing changed.\n\n\n if (!clipCount) {\n this._doneCallback();\n }\n\n return this;\n },\n\n /**\n * Stop animation\n * @param {boolean} forwardToLast If move to last frame before stop\n */\n stop: function (forwardToLast) {\n var clipList = this._clipList;\n var animation = this.animation;\n\n for (var i = 0; i < clipList.length; i++) {\n var clip = clipList[i];\n\n if (forwardToLast) {\n // Move to last frame before stop\n clip.onframe(this._target, 1);\n }\n\n animation && animation.removeClip(clip);\n }\n\n clipList.length = 0;\n },\n\n /**\n * Set when animation delay starts\n * @param {number} time 单位ms\n * @return {module:zrender/animation/Animator}\n */\n delay: function (time) {\n this._delay = time;\n return this;\n },\n\n /**\n * Add callback for animation end\n * @param {Function} cb\n * @return {module:zrender/animation/Animator}\n */\n done: function (cb) {\n if (cb) {\n this._doneList.push(cb);\n }\n\n return this;\n },\n\n /**\n * @return {Array.}\n */\n getClips: function () {\n return this._clipList;\n }\n};\nvar _default = Animator;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Model = require(\"../model/Model\");\n\nvar linkList = require(\"./helper/linkList\");\n\nvar List = require(\"./List\");\n\nvar createDimensions = require(\"./helper/createDimensions\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Tree data structure\n *\n * @module echarts/data/Tree\n */\n\n/**\n * @constructor module:echarts/data/Tree~TreeNode\n * @param {string} name\n * @param {module:echarts/data/Tree} hostTree\n */\nvar TreeNode = function (name, hostTree) {\n /**\n * @type {string}\n */\n this.name = name || '';\n /**\n * Depth of node\n *\n * @type {number}\n * @readOnly\n */\n\n this.depth = 0;\n /**\n * Height of the subtree rooted at this node.\n * @type {number}\n * @readOnly\n */\n\n this.height = 0;\n /**\n * @type {module:echarts/data/Tree~TreeNode}\n * @readOnly\n */\n\n this.parentNode = null;\n /**\n * Reference to list item.\n * Do not persistent dataIndex outside,\n * besause it may be changed by list.\n * If dataIndex -1,\n * this node is logical deleted (filtered) in list.\n *\n * @type {Object}\n * @readOnly\n */\n\n this.dataIndex = -1;\n /**\n * @type {Array.}\n * @readOnly\n */\n\n this.children = [];\n /**\n * @type {Array.}\n * @pubilc\n */\n\n this.viewChildren = [];\n /**\n * @type {moduel:echarts/data/Tree}\n * @readOnly\n */\n\n this.hostTree = hostTree;\n};\n\nTreeNode.prototype = {\n constructor: TreeNode,\n\n /**\n * The node is removed.\n * @return {boolean} is removed.\n */\n isRemoved: function () {\n return this.dataIndex < 0;\n },\n\n /**\n * Travel this subtree (include this node).\n * Usage:\n * node.eachNode(function () { ... }); // preorder\n * node.eachNode('preorder', function () { ... }); // preorder\n * node.eachNode('postorder', function () { ... }); // postorder\n * node.eachNode(\n * {order: 'postorder', attr: 'viewChildren'},\n * function () { ... }\n * ); // postorder\n *\n * @param {(Object|string)} options If string, means order.\n * @param {string=} options.order 'preorder' or 'postorder'\n * @param {string=} options.attr 'children' or 'viewChildren'\n * @param {Function} cb If in preorder and return false,\n * its subtree will not be visited.\n * @param {Object} [context]\n */\n eachNode: function (options, cb, context) {\n if (typeof options === 'function') {\n context = cb;\n cb = options;\n options = null;\n }\n\n options = options || {};\n\n if (zrUtil.isString(options)) {\n options = {\n order: options\n };\n }\n\n var order = options.order || 'preorder';\n var children = this[options.attr || 'children'];\n var suppressVisitSub;\n order === 'preorder' && (suppressVisitSub = cb.call(context, this));\n\n for (var i = 0; !suppressVisitSub && i < children.length; i++) {\n children[i].eachNode(options, cb, context);\n }\n\n order === 'postorder' && cb.call(context, this);\n },\n\n /**\n * Update depth and height of this subtree.\n *\n * @param {number} depth\n */\n updateDepthAndHeight: function (depth) {\n var height = 0;\n this.depth = depth;\n\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n child.updateDepthAndHeight(depth + 1);\n\n if (child.height > height) {\n height = child.height;\n }\n }\n\n this.height = height + 1;\n },\n\n /**\n * @param {string} id\n * @return {module:echarts/data/Tree~TreeNode}\n */\n getNodeById: function (id) {\n if (this.getId() === id) {\n return this;\n }\n\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].getNodeById(id);\n\n if (res) {\n return res;\n }\n }\n },\n\n /**\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {boolean}\n */\n contains: function (node) {\n if (node === this) {\n return true;\n }\n\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].contains(node);\n\n if (res) {\n return res;\n }\n }\n },\n\n /**\n * @param {boolean} includeSelf Default false.\n * @return {Array.} order: [root, child, grandchild, ...]\n */\n getAncestors: function (includeSelf) {\n var ancestors = [];\n var node = includeSelf ? this : this.parentNode;\n\n while (node) {\n ancestors.push(node);\n node = node.parentNode;\n }\n\n ancestors.reverse();\n return ancestors;\n },\n\n /**\n * @param {string|Array=} [dimension='value'] Default 'value'. can be 0, 1, 2, 3\n * @return {number} Value.\n */\n getValue: function (dimension) {\n var data = this.hostTree.data;\n return data.get(data.getDimension(dimension || 'value'), this.dataIndex);\n },\n\n /**\n * @param {Object} layout\n * @param {boolean=} [merge=false]\n */\n setLayout: function (layout, merge) {\n this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge);\n },\n\n /**\n * @return {Object} layout\n */\n getLayout: function () {\n return this.hostTree.data.getItemLayout(this.dataIndex);\n },\n\n /**\n * @param {string} [path]\n * @return {module:echarts/model/Model}\n */\n getModel: function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n\n var hostTree = this.hostTree;\n var itemModel = hostTree.data.getItemModel(this.dataIndex);\n var levelModel = this.getLevelModel(); // FIXME: refactor levelModel to \"beforeLink\", and remove levelModel here.\n\n if (levelModel) {\n return itemModel.getModel(path, levelModel.getModel(path));\n } else {\n return itemModel.getModel(path);\n }\n },\n\n /**\n * @return {module:echarts/model/Model}\n */\n getLevelModel: function () {\n return (this.hostTree.levelModels || [])[this.depth];\n },\n\n /**\n * @example\n * setItemVisual('color', color);\n * setItemVisual({\n * 'color': color\n * });\n */\n setVisual: function (key, value) {\n this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value);\n },\n\n /**\n * Get item visual\n */\n getVisual: function (key, ignoreParent) {\n return this.hostTree.data.getItemVisual(this.dataIndex, key, ignoreParent);\n },\n\n /**\n * @public\n * @return {number}\n */\n getRawIndex: function () {\n return this.hostTree.data.getRawIndex(this.dataIndex);\n },\n\n /**\n * @public\n * @return {string}\n */\n getId: function () {\n return this.hostTree.data.getId(this.dataIndex);\n },\n\n /**\n * if this is an ancestor of another node\n *\n * @public\n * @param {TreeNode} node another node\n * @return {boolean} if is ancestor\n */\n isAncestorOf: function (node) {\n var parent = node.parentNode;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parentNode;\n }\n\n return false;\n },\n\n /**\n * if this is an descendant of another node\n *\n * @public\n * @param {TreeNode} node another node\n * @return {boolean} if is descendant\n */\n isDescendantOf: function (node) {\n return node !== this && node.isAncestorOf(this);\n }\n};\n/**\n * @constructor\n * @alias module:echarts/data/Tree\n * @param {module:echarts/model/Model} hostModel\n * @param {Array.} levelOptions\n */\n\nfunction Tree(hostModel, levelOptions) {\n /**\n * @type {module:echarts/data/Tree~TreeNode}\n * @readOnly\n */\n this.root;\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n\n this.data;\n /**\n * Index of each item is the same as the raw index of coresponding list item.\n * @private\n * @type {Array.} treeOptions.levels\n * @return module:echarts/data/Tree\n */\n\nTree.createTree = function (dataRoot, hostModel, treeOptions, beforeLink) {\n var tree = new Tree(hostModel, treeOptions && treeOptions.levels);\n var listData = [];\n var dimMax = 1;\n buildHierarchy(dataRoot);\n\n function buildHierarchy(dataNode, parentNode) {\n var value = dataNode.value;\n dimMax = Math.max(dimMax, zrUtil.isArray(value) ? value.length : 1);\n listData.push(dataNode);\n var node = new TreeNode(dataNode.name, tree);\n parentNode ? addChild(node, parentNode) : tree.root = node;\n\n tree._nodes.push(node);\n\n var children = dataNode.children;\n\n if (children) {\n for (var i = 0; i < children.length; i++) {\n buildHierarchy(children[i], node);\n }\n }\n }\n\n tree.root.updateDepthAndHeight(0);\n var dimensionsInfo = createDimensions(listData, {\n coordDimensions: ['value'],\n dimensionsCount: dimMax\n });\n var list = new List(dimensionsInfo, hostModel);\n list.initData(listData);\n beforeLink && beforeLink(list);\n linkList({\n mainData: list,\n struct: tree,\n structAttr: 'tree'\n });\n tree.update();\n return tree;\n};\n/**\n * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,\n * so this function is not ready and not necessary to be public.\n *\n * @param {(module:echarts/data/Tree~TreeNode|Object)} child\n */\n\n\nfunction addChild(child, node) {\n var children = node.children;\n\n if (child.parentNode === node) {\n return;\n }\n\n children.push(child);\n child.parentNode = node;\n}\n\nvar _default = Tree;\nmodule.exports = _default;","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapModel = require(\"./VisualMapModel\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar visualDefault = require(\"../../visual/visualDefault\");\n\nvar _number = require(\"../../util/number\");\n\nvar reformIntervals = _number.reformIntervals;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PiecewiseModel = VisualMapModel.extend({\n type: 'visualMap.piecewise',\n\n /**\n * Order Rule:\n *\n * option.categories / option.pieces / option.text / option.selected:\n * If !option.inverse,\n * Order when vertical: ['top', ..., 'bottom'].\n * Order when horizontal: ['left', ..., 'right'].\n * If option.inverse, the meaning of\n * the order should be reversed.\n *\n * this._pieceList:\n * The order is always [low, ..., high].\n *\n * Mapping from location to low-high:\n * If !option.inverse\n * When vertical, top is high.\n * When horizontal, right is high.\n * If option.inverse, reverse.\n */\n\n /**\n * @protected\n */\n defaultOption: {\n selected: null,\n // Object. If not specified, means selected.\n // When pieces and splitNumber: {'0': true, '5': true}\n // When categories: {'cate1': false, 'cate3': true}\n // When selected === false, means all unselected.\n minOpen: false,\n // Whether include values that smaller than `min`.\n maxOpen: false,\n // Whether include values that bigger than `max`.\n align: 'auto',\n // 'auto', 'left', 'right'\n itemWidth: 20,\n // When put the controller vertically, it is the length of\n // horizontal side of each item. Otherwise, vertical side.\n itemHeight: 14,\n // When put the controller vertically, it is the length of\n // vertical side of each item. Otherwise, horizontal side.\n itemSymbol: 'roundRect',\n pieceList: null,\n // Each item is Object, with some of those attrs:\n // {min, max, lt, gt, lte, gte, value,\n // color, colorSaturation, colorAlpha, opacity,\n // symbol, symbolSize}, which customize the range or visual\n // coding of the certain piece. Besides, see \"Order Rule\".\n categories: null,\n // category names, like: ['some1', 'some2', 'some3'].\n // Attr min/max are ignored when categories set. See \"Order Rule\"\n splitNumber: 5,\n // If set to 5, auto split five pieces equally.\n // If set to 0 and component type not set, component type will be\n // determined as \"continuous\". (It is less reasonable but for ec2\n // compatibility, see echarts/component/visualMap/typeDefaulter)\n selectedMode: 'multiple',\n // Can be 'multiple' or 'single'.\n itemGap: 10,\n // The gap between two items, in px.\n hoverLink: true,\n // Enable hover highlight.\n showLabel: null // By default, when text is used, label will hide (the logic\n // is remained for compatibility reason)\n\n },\n\n /**\n * @override\n */\n optionUpdated: function (newOption, isInit) {\n PiecewiseModel.superApply(this, 'optionUpdated', arguments);\n /**\n * The order is always [low, ..., high].\n * [{text: string, interval: Array.}, ...]\n * @private\n * @type {Array.}\n */\n\n this._pieceList = [];\n this.resetExtent();\n /**\n * 'pieces', 'categories', 'splitNumber'\n * @type {string}\n */\n\n var mode = this._mode = this._determineMode();\n\n resetMethods[this._mode].call(this);\n\n this._resetSelected(newOption, isInit);\n\n var categories = this.option.categories;\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n } else {\n mappingOption.dataExtent = this.getExtent();\n mappingOption.mappingMethod = 'piecewise';\n mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {\n var piece = zrUtil.clone(piece);\n\n if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\n }\n\n return piece;\n });\n }\n });\n },\n\n /**\n * @protected\n * @override\n */\n completeVisualOption: function () {\n // Consider this case:\n // visualMap: {\n // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]\n // }\n // where no inRange/outOfRange set but only pieces. So we should make\n // default inRange/outOfRange for this case, otherwise visuals that only\n // appear in `pieces` will not be taken into account in visual encoding.\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n zrUtil.each(option.pieces, function (piece) {\n zrUtil.each(visualTypes, function (visualType) {\n if (piece.hasOwnProperty(visualType)) {\n visualTypesInPieces[visualType] = 1;\n }\n });\n });\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = 0;\n zrUtil.each(this.stateList, function (state) {\n exists |= has(option, state, visualType) || has(option.target, state, visualType);\n }, this);\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);\n });\n }, this);\n\n function has(obj, state, visualType) {\n return obj && obj[state] && (zrUtil.isObject(obj[state]) ? obj[state].hasOwnProperty(visualType) : obj[state] === visualType // e.g., inRange: 'symbol'\n );\n }\n\n VisualMapModel.prototype.completeVisualOption.apply(this, arguments);\n },\n _resetSelected: function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList; // Selected do not merge but all override.\n\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected; // Consider 'not specified' means true.\n\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n\n if (!selected.hasOwnProperty(key)) {\n selected[key] = true;\n }\n }, this);\n\n if (thisOption.selectedMode === 'single') {\n // Ensure there is only one selected.\n var hasSel = false;\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n\n if (selected[key]) {\n hasSel ? selected[key] = false : hasSel = true;\n }\n }, this);\n } // thisOption.selectedMode === 'multiple', default: all selected.\n\n },\n\n /**\n * @public\n */\n getSelectedMapKey: function (piece) {\n return this._mode === 'categories' ? piece.value + '' : piece.index + '';\n },\n\n /**\n * @public\n */\n getPieceList: function () {\n return this._pieceList;\n },\n\n /**\n * @private\n * @return {string}\n */\n _determineMode: function () {\n var option = this.option;\n return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';\n },\n\n /**\n * @public\n * @override\n */\n setSelected: function (selected) {\n this.option.selected = zrUtil.clone(selected);\n },\n\n /**\n * @public\n * @override\n */\n getValueState: function (value) {\n var index = VisualMapping.findPieceIndex(value, this._pieceList);\n return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';\n },\n\n /**\n * @public\n * @params {number} pieceIndex piece index in visualMapModel.getPieceList()\n * @return {Array.} [{seriesId, dataIndex: >}, ...]\n */\n findTargetDataIndices: function (pieceIndex) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimension(data), function (value, dataIndex) {\n // Should always base on model pieceList, because it is order sensitive.\n var pIdx = VisualMapping.findPieceIndex(value, this._pieceList);\n pIdx === pieceIndex && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n },\n\n /**\n * @private\n * @param {Object} piece piece.value or piece.interval is required.\n * @return {number} Can be Infinity or -Infinity\n */\n getRepresentValue: function (piece) {\n var representValue;\n\n if (this.isCategory()) {\n representValue = piece.value;\n } else {\n if (piece.value != null) {\n representValue = piece.value;\n } else {\n var pieceInterval = piece.interval || [];\n representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n\n return representValue;\n },\n getVisualMeta: function (getColorVisual) {\n // Do not support category. (category axis is ordinal, numerical)\n if (this.isCategory()) {\n return;\n }\n\n var stops = [];\n var outerColors = [];\n var visualMapModel = this;\n\n function setStop(interval, valueState) {\n var representValue = visualMapModel.getRepresentValue({\n interval: interval\n });\n\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n\n var color = getColorVisual(representValue, valueState);\n\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n } else if (interval[1] === Infinity) {\n outerColors[1] = color;\n } else {\n stops.push({\n value: interval[0],\n color: color\n }, {\n value: interval[1],\n color: color\n });\n }\n } // Suplement\n\n\n var pieceList = this._pieceList.slice();\n\n if (!pieceList.length) {\n pieceList.push({\n interval: [-Infinity, Infinity]\n });\n } else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({\n interval: [-Infinity, edge]\n });\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({\n interval: [edge, Infinity]\n });\n }\n\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\n\n if (interval) {\n // Fulfill gap.\n interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');\n setStop(interval.slice());\n curr = interval[1];\n }\n }, this);\n return {\n stops: stops,\n outerColors: outerColors\n };\n }\n});\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\n\nvar resetMethods = {\n splitNumber: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n var precision = Math.min(thisOption.precision, 20);\n var dataExtent = this.getExtent();\n var splitNumber = thisOption.splitNumber;\n splitNumber = Math.max(parseInt(splitNumber, 10), 1);\n thisOption.splitNumber = splitNumber;\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption\n\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\n }\n\n thisOption.precision = precision;\n splitStep = +splitStep.toFixed(precision);\n\n if (thisOption.minOpen) {\n pieceList.push({\n interval: [-Infinity, dataExtent[0]],\n close: [0, 0]\n });\n }\n\n for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {\n var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;\n pieceList.push({\n interval: [curr, max],\n close: [1, 1]\n });\n }\n\n if (thisOption.maxOpen) {\n pieceList.push({\n interval: [dataExtent[1], Infinity],\n close: [0, 0]\n });\n }\n\n reformIntervals(pieceList);\n zrUtil.each(pieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\n categories: function () {\n var thisOption = this.option;\n zrUtil.each(thisOption.categories, function (cate) {\n // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。\n // 是否改一致。\n this._pieceList.push({\n text: this.formatValueText(cate, true),\n value: cate\n });\n }, this); // See \"Order Rule\".\n\n normalizeReverse(thisOption, this._pieceList);\n },\n pieces: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {\n value: pieceListItem\n };\n }\n\n var item = {\n text: '',\n index: index\n };\n\n if (pieceListItem.label != null) {\n item.text = pieceListItem.label;\n }\n\n if (pieceListItem.hasOwnProperty('value')) {\n var value = item.value = pieceListItem.value;\n item.interval = [value, value];\n item.close = [1, 1];\n } else {\n // `min` `max` is legacy option.\n // `lt` `gt` `lte` `gte` is recommanded.\n var interval = item.interval = [];\n var close = item.close = [0, 0];\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n var useMinMax = [];\n\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\n\n for (var i = 0; i < 3 && interval[lg] == null; i++) {\n interval[lg] = pieceListItem[names[i]];\n close[lg] = closeList[i];\n useMinMax[lg] = i === 2;\n }\n\n interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n\n useMinMax[0] && interval[1] === Infinity && (close[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close[1] = 0);\n\n if (interval[0] === interval[1] && close[0] && close[1]) {\n // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],\n // we use value to lift the priority when min === max\n item.value = interval[0];\n }\n }\n\n item.visual = VisualMapping.retrieveVisuals(pieceListItem);\n pieceList.push(item);\n }, this); // See \"Order Rule\".\n\n normalizeReverse(thisOption, pieceList); // Only pieces\n\n reformIntervals(pieceList);\n zrUtil.each(pieceList, function (piece) {\n var close = piece.close;\n var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];\n piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);\n }, this);\n }\n};\n\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\n\nvar _default = PiecewiseModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar zrColor = require(\"zrender/lib/tool/color\");\n\nvar eventUtil = require(\"zrender/lib/core/event\");\n\nvar domUtil = require(\"zrender/lib/core/dom\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar formatUtil = require(\"../../util/format\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar toCamelCase = formatUtil.toCamelCase;\nvar vendors = ['', '-webkit-', '-moz-', '-o-'];\nvar gCssText = 'position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;';\n/**\n * @param {number} duration\n * @return {string}\n * @inner\n */\n\nfunction assembleTransition(duration) {\n var transitionCurve = 'cubic-bezier(0.23, 1, 0.32, 1)';\n var transitionText = 'left ' + duration + 's ' + transitionCurve + ',' + 'top ' + duration + 's ' + transitionCurve;\n return zrUtil.map(vendors, function (vendorPrefix) {\n return vendorPrefix + 'transition:' + transitionText;\n }).join(';');\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\n\n\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n fontSize && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\n/**\n * @param {Object} tooltipModel\n * @return {string}\n * @inner\n */\n\n\nfunction assembleCssText(tooltipModel) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = tooltipModel.get('padding'); // Animation transition. Do not animate when transitionDuration is 0.\n\n transitionDuration && cssText.push(assembleTransition(transitionDuration));\n\n if (backgroundColor) {\n if (env.canvasSupported) {\n cssText.push('background-Color:' + backgroundColor);\n } else {\n // for ie\n cssText.push('background-Color:#' + zrColor.toHex(backgroundColor));\n cssText.push('filter:alpha(opacity=70)');\n }\n } // Border style\n\n\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n }); // Text style\n\n cssText.push(assembleFont(textStyleModel)); // Padding\n\n if (padding != null) {\n cssText.push('padding:' + formatUtil.normalizeCssArray(padding).join('px ') + 'px');\n }\n\n return cssText.join(';') + ';';\n} // If not able to make, do not modify the input `out`.\n\n\nfunction makeStyleCoord(out, zr, appendToBody, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n\n if (appendToBody) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n domUtil.transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY; // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n}\n/**\n * @alias module:echarts/component/tooltip/TooltipContent\n * @param {HTMLElement} container\n * @param {ExtensionAPI} api\n * @param {Object} [opt]\n * @param {boolean} [opt.appendToBody]\n * `false`: the DOM element will be inside the container. Default value.\n * `true`: the DOM element will be appended to HTML body, which avoid\n * some overflow clip but intrude outside of the container.\n * @constructor\n */\n\n\nfunction TooltipContent(container, api, opt) {\n if (env.wxa) {\n return null;\n }\n\n var el = document.createElement('div');\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendToBody = this._appendToBody = opt && opt.appendToBody;\n this._styleCoord = [0, 0];\n makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2);\n\n if (appendToBody) {\n document.body.appendChild(el);\n } else {\n container.appendChild(el);\n }\n\n this._container = container;\n this._show = false;\n /**\n * @private\n */\n\n this._hideTimeout; // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n\n var self = this;\n\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n\n self._inContent = true;\n };\n\n el.onmousemove = function (e) {\n e = e || window.event;\n\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n eventUtil.normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n\n el.onmouseleave = function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n\n self._inContent = false;\n };\n}\n\nTooltipContent.prototype = {\n constructor: TooltipContent,\n\n /**\n * @private\n * @type {boolean}\n */\n _enterable: true,\n\n /**\n * Update when tooltip is rendered\n */\n update: function () {\n // FIXME\n // Move this logic to ec main?\n var container = this._container;\n var stl = container.currentStyle || document.defaultView.getComputedStyle(container);\n var domStyle = container.style;\n\n if (domStyle.position !== 'absolute' && stl.position !== 'absolute') {\n domStyle.position = 'relative';\n } // Hide the tooltip\n // PENDING\n // this.hide();\n\n },\n show: function (tooltipModel) {\n clearTimeout(this._hideTimeout);\n var el = this.el;\n var styleCoord = this._styleCoord;\n el.style.cssText = gCssText + assembleCssText(tooltipModel) // Because of the reason described in:\n // http://stackoverflow.com/questions/21125587/css3-transition-not-working-in-chrome-anymore\n // we should set initial value to `left` and `top`.\n + ';left:' + styleCoord[0] + 'px;top:' + styleCoord[1] + 'px;' + (tooltipModel.get('extraCssText') || '');\n el.style.display = el.innerHTML ? 'block' : 'none'; // If mouse occsionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cuase some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not suppored by IE8~IE10, fortunately it is a rare\n // scenario.\n\n el.style.pointerEvents = this._enterable ? 'auto' : 'none';\n this._show = true;\n },\n setContent: function (content) {\n this.el.innerHTML = content == null ? '' : content;\n },\n setEnterable: function (enterable) {\n this._enterable = enterable;\n },\n getSize: function () {\n var el = this.el;\n return [el.clientWidth, el.clientHeight];\n },\n moveTo: function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY);\n var style = this.el.style;\n style.left = styleCoord[0] + 'px';\n style.top = styleCoord[1] + 'px';\n },\n hide: function () {\n this.el.style.display = 'none';\n this._show = false;\n },\n hideLater: function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time; // Set show false to avoid invoke hideLater mutiple times\n\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n },\n isShow: function () {\n return this._show;\n },\n dispose: function () {\n this.el.parentNode.removeChild(this.el);\n },\n getOuterSize: function () {\n var width = this.el.clientWidth;\n var height = this.el.clientHeight; // Consider browser compatibility.\n // IE8 does not support getComputedStyle.\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n var stl = document.defaultView.getComputedStyle(this.el);\n\n if (stl) {\n width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10);\n height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10);\n }\n }\n\n return {\n width: width,\n height: height\n };\n }\n};\nvar _default = TooltipContent;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./gauge/GaugeSeries\");\n\nrequire(\"./gauge/GaugeView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"../component/parallel\");\n\nrequire(\"./parallel/ParallelSeries\");\n\nrequire(\"./parallel/ParallelView\");\n\nvar parallelVisual = require(\"./parallel/parallelVisual\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(parallelVisual);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./candlestick/CandlestickSeries\");\n\nrequire(\"./candlestick/CandlestickView\");\n\nvar preprocessor = require(\"./candlestick/preprocessor\");\n\nvar candlestickVisual = require(\"./candlestick/candlestickVisual\");\n\nvar candlestickLayout = require(\"./candlestick/candlestickLayout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerPreprocessor(preprocessor);\necharts.registerVisual(candlestickVisual);\necharts.registerLayout(candlestickLayout);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Axis = require(\"../../coord/Axis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Extend axis 2d\n * @constructor module:echarts/coord/cartesian/Axis2D\n * @extends {module:echarts/coord/cartesian/Axis}\n * @param {string} dim\n * @param {*} scale\n * @param {Array.} coordExtent\n * @param {string} axisType\n * @param {string} position\n */\nvar TimelineAxis = function (dim, scale, coordExtent, axisType) {\n Axis.call(this, dim, scale, coordExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = axisType || 'value';\n /**\n * Axis model\n * @param {module:echarts/component/TimelineModel}\n */\n\n this.model = null;\n};\n\nTimelineAxis.prototype = {\n constructor: TimelineAxis,\n\n /**\n * @override\n */\n getLabelModel: function () {\n return this.model.getModel('label');\n },\n\n /**\n * @override\n */\n isHorizontal: function () {\n return this.model.get('orient') === 'horizontal';\n }\n};\nzrUtil.inherits(TimelineAxis, Axis);\nvar _default = TimelineAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _graphic = require(\"../../util/graphic\");\n\nvar subPixelOptimize = _graphic.subPixelOptimize;\n\nvar createRenderPlanner = require(\"../helper/createRenderPlanner\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar retrieve2 = _util.retrieve2;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/* global Float32Array */\nvar LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nvar _default = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var candleWidth = calculateCandleWidth(seriesModel, data);\n var cDimIdx = 0;\n var vDimIdx = 1;\n var coordDims = ['x', 'y'];\n var cDim = data.mapDimension(coordDims[cDimIdx]);\n var vDims = data.mapDimension(coordDims[vDimIdx], true);\n var openDim = vDims[0];\n var closeDim = vDims[1];\n var lowestDim = vDims[2];\n var highestDim = vDims[3];\n data.setLayout({\n candleWidth: candleWidth,\n // The value is experimented visually.\n isSimpleBox: candleWidth <= 1.3\n });\n\n if (cDim == null || vDims.length < 4) {\n return;\n }\n\n return {\n progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress\n };\n\n function normalProgress(params, data) {\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = data.get(cDim, dataIndex);\n var openVal = data.get(openDim, dataIndex);\n var closeVal = data.get(closeDim, dataIndex);\n var lowestVal = data.get(lowestDim, dataIndex);\n var highestVal = data.get(highestDim, dataIndex);\n var ocLow = Math.min(openVal, closeVal);\n var ocHigh = Math.max(openVal, closeVal);\n var ocLowPoint = getPoint(ocLow, axisDimVal);\n var ocHighPoint = getPoint(ocHigh, axisDimVal);\n var lowestPoint = getPoint(lowestVal, axisDimVal);\n var highestPoint = getPoint(highestVal, axisDimVal);\n var ends = [];\n addBodyEnd(ends, ocHighPoint, 0);\n addBodyEnd(ends, ocLowPoint, 1);\n ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint));\n data.setItemLayout(dataIndex, {\n sign: getSign(data, dataIndex, openVal, closeVal, closeDim),\n initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx],\n // open point.\n ends: ends,\n brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal)\n });\n }\n\n function getPoint(val, axisDimVal) {\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p);\n }\n\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false);\n point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true);\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n\n function makeBrushRect(lowestVal, highestVal, axisDimVal) {\n var pmin = getPoint(lowestVal, axisDimVal);\n var pmax = getPoint(highestVal, axisDimVal);\n pmin[cDimIdx] -= candleWidth / 2;\n pmax[cDimIdx] -= candleWidth / 2;\n return {\n x: pmin[0],\n y: pmin[1],\n width: vDimIdx ? candleWidth : pmax[0] - pmin[0],\n height: vDimIdx ? pmax[1] - pmin[1] : candleWidth\n };\n }\n\n function subPixelOptimizePoint(point) {\n point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1);\n return point;\n }\n }\n\n function largeProgress(params, data) {\n // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...]\n var points = new LargeArr(params.count * 4);\n var offset = 0;\n var point;\n var tmpIn = [];\n var tmpOut = [];\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = data.get(cDim, dataIndex);\n var openVal = data.get(openDim, dataIndex);\n var closeVal = data.get(closeDim, dataIndex);\n var lowestVal = data.get(lowestDim, dataIndex);\n var highestVal = data.get(highestDim, dataIndex);\n\n if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) {\n points[offset++] = NaN;\n offset += 3;\n continue;\n }\n\n points[offset++] = getSign(data, dataIndex, openVal, closeVal, closeDim);\n tmpIn[cDimIdx] = axisDimVal;\n tmpIn[vDimIdx] = lowestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n tmpIn[vDimIdx] = highestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[1] : NaN;\n }\n\n data.setLayout('largePoints', points);\n }\n }\n};\n\nfunction getSign(data, dataIndex, openVal, closeVal, closeDim) {\n var sign;\n\n if (openVal > closeVal) {\n sign = -1;\n } else if (openVal < closeVal) {\n sign = 1;\n } else {\n sign = dataIndex > 0 // If close === open, compare with close of last record\n ? data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1 : // No record of previous, set to be positive\n 1;\n }\n\n return sign;\n}\n\nfunction calculateCandleWidth(seriesModel, data) {\n var baseAxis = seriesModel.getBaseAxis();\n var extent;\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count());\n var barMaxWidth = parsePercent(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth);\n var barMinWidth = parsePercent(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth);\n var barWidth = seriesModel.get('barWidth');\n return barWidth != null ? parsePercent(barWidth, bandWidth) // Put max outer to ensure bar visible in spite of overlap.\n : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./dataZoomSlider\");\n\nrequire(\"./dataZoomInside\");","var eventUtil = require(\"./event\");\n\n/**\n * Only implements needed gestures for mobile.\n */\nvar GestureMgr = function () {\n /**\n * @private\n * @type {Array.}\n */\n this._track = [];\n};\n\nGestureMgr.prototype = {\n constructor: GestureMgr,\n recognize: function (event, target, root) {\n this._doTrack(event, target, root);\n\n return this._recognize(event);\n },\n clear: function () {\n this._track.length = 0;\n return this;\n },\n _doTrack: function (event, target, root) {\n var touches = event.touches;\n\n if (!touches) {\n return;\n }\n\n var trackItem = {\n points: [],\n touches: [],\n target: target,\n event: event\n };\n\n for (var i = 0, len = touches.length; i < len; i++) {\n var touch = touches[i];\n var pos = eventUtil.clientToLocal(root, touch, {});\n trackItem.points.push([pos.zrX, pos.zrY]);\n trackItem.touches.push(touch);\n }\n\n this._track.push(trackItem);\n },\n _recognize: function (event) {\n for (var eventName in recognizers) {\n if (recognizers.hasOwnProperty(eventName)) {\n var gestureInfo = recognizers[eventName](this._track, event);\n\n if (gestureInfo) {\n return gestureInfo;\n }\n }\n }\n }\n};\n\nfunction dist(pointPair) {\n var dx = pointPair[1][0] - pointPair[0][0];\n var dy = pointPair[1][1] - pointPair[0][1];\n return Math.sqrt(dx * dx + dy * dy);\n}\n\nfunction center(pointPair) {\n return [(pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2];\n}\n\nvar recognizers = {\n pinch: function (track, event) {\n var trackLen = track.length;\n\n if (!trackLen) {\n return;\n }\n\n var pinchEnd = (track[trackLen - 1] || {}).points;\n var pinchPre = (track[trackLen - 2] || {}).points || pinchEnd;\n\n if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) {\n var pinchScale = dist(pinchEnd) / dist(pinchPre);\n !isFinite(pinchScale) && (pinchScale = 1);\n event.pinchScale = pinchScale;\n var pinchCenter = center(pinchEnd);\n event.pinchX = pinchCenter[0];\n event.pinchY = pinchCenter[1];\n return {\n type: 'pinch',\n target: track[0].target,\n event: event\n };\n }\n } // Only pinch currently.\n\n};\nvar _default = GestureMgr;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./legend\");\n\nrequire(\"./legend/ScrollableLegendModel\");\n\nrequire(\"./legend/ScrollableLegendView\");\n\nrequire(\"./legend/scrollableLegendAction\");","// Myers' Diff Algorithm\n// Modified from https://github.com/kpdecker/jsdiff/blob/master/src/diff/base.js\nfunction Diff() {}\n\nDiff.prototype = {\n diff: function (oldArr, newArr, equals) {\n if (!equals) {\n equals = function (a, b) {\n return a === b;\n };\n }\n\n this.equals = equals;\n var self = this;\n oldArr = oldArr.slice();\n newArr = newArr.slice(); // Allow subclasses to massage the input prior to running\n\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var editLength = 1;\n var maxEditLength = newLen + oldLen;\n var bestPath = [{\n newPos: -1,\n components: []\n }]; // Seed editLength = 0, i.e. the content starts with the same values\n\n var oldPos = this.extractCommon(bestPath[0], newArr, oldArr, 0);\n\n if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n var indices = [];\n\n for (var i = 0; i < newArr.length; i++) {\n indices.push(i);\n } // Identity per the equality and tokenizer\n\n\n return [{\n indices: indices,\n count: newArr.length\n }];\n } // Main worker method. checks all permutations of a given edit length for acceptance.\n\n\n function execEditLength() {\n for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n var basePath;\n var addPath = bestPath[diagonalPath - 1];\n var removePath = bestPath[diagonalPath + 1];\n var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n\n if (addPath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n\n var canAdd = addPath && addPath.newPos + 1 < newLen;\n var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;\n\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n bestPath[diagonalPath] = undefined;\n continue;\n } // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the new string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n\n\n if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {\n basePath = clonePath(removePath);\n self.pushComponent(basePath.components, undefined, true);\n } else {\n basePath = addPath; // No need to clone, we've pulled it from the list\n\n basePath.newPos++;\n self.pushComponent(basePath.components, true, undefined);\n }\n\n oldPos = self.extractCommon(basePath, newArr, oldArr, diagonalPath); // If we have hit the end of both strings, then we are done\n\n if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n return buildValues(self, basePath.components, newArr, oldArr);\n } else {\n // Otherwise track this path as a potential candidate and continue.\n bestPath[diagonalPath] = basePath;\n }\n }\n\n editLength++;\n }\n\n while (editLength <= maxEditLength) {\n var ret = execEditLength();\n\n if (ret) {\n return ret;\n }\n }\n },\n pushComponent: function (components, added, removed) {\n var last = components[components.length - 1];\n\n if (last && last.added === added && last.removed === removed) {\n // We need to clone here as the component clone operation is just\n // as shallow array clone\n components[components.length - 1] = {\n count: last.count + 1,\n added: added,\n removed: removed\n };\n } else {\n components.push({\n count: 1,\n added: added,\n removed: removed\n });\n }\n },\n extractCommon: function (basePath, newArr, oldArr, diagonalPath) {\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var newPos = basePath.newPos;\n var oldPos = newPos - diagonalPath;\n var commonCount = 0;\n\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newArr[newPos + 1], oldArr[oldPos + 1])) {\n newPos++;\n oldPos++;\n commonCount++;\n }\n\n if (commonCount) {\n basePath.components.push({\n count: commonCount\n });\n }\n\n basePath.newPos = newPos;\n return oldPos;\n },\n tokenize: function (value) {\n return value.slice();\n },\n join: function (value) {\n return value.slice();\n }\n};\n\nfunction buildValues(diff, components, newArr, oldArr) {\n var componentPos = 0;\n var componentLen = components.length;\n var newPos = 0;\n var oldPos = 0;\n\n for (; componentPos < componentLen; componentPos++) {\n var component = components[componentPos];\n\n if (!component.removed) {\n var indices = [];\n\n for (var i = newPos; i < newPos + component.count; i++) {\n indices.push(i);\n }\n\n component.indices = indices;\n newPos += component.count; // Common case\n\n if (!component.added) {\n oldPos += component.count;\n }\n } else {\n var indices = [];\n\n for (var i = oldPos; i < oldPos + component.count; i++) {\n indices.push(i);\n }\n\n component.indices = indices;\n oldPos += component.count;\n }\n }\n\n return components;\n}\n\nfunction clonePath(path) {\n return {\n newPos: path.newPos,\n components: path.components.slice(0)\n };\n}\n\nvar arrayDiff = new Diff();\n\nfunction _default(oldArr, newArr, callback) {\n return arrayDiff.diff(oldArr, newArr, callback);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar RoamController = require(\"./RoamController\");\n\nvar roamHelper = require(\"../../component/helper/roamHelper\");\n\nvar _cursorHelper = require(\"../../component/helper/cursorHelper\");\n\nvar onIrrelevantElement = _cursorHelper.onIrrelevantElement;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar geoSourceManager = require(\"../../coord/geo/geoSourceManager\");\n\nvar _component = require(\"../../util/component\");\n\nvar getUID = _component.getUID;\n\nvar Transformable = require(\"zrender/lib/mixin/Transformable\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor'); // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\n\n if (areaColor != null) {\n itemStyle.fill = areaColor;\n }\n\n return itemStyle;\n}\n\nfunction updateMapSelectHandler(mapDraw, mapOrGeoModel, regionsGroup, api, fromView) {\n regionsGroup.off('click');\n regionsGroup.off('mousedown');\n\n if (mapOrGeoModel.get('selectedMode')) {\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n\n mapDraw._mouseDownFlag = false;\n var el = e.target;\n\n while (!el.__regions) {\n el = el.parent;\n }\n\n if (!el) {\n return;\n }\n\n var action = {\n type: (mapOrGeoModel.mainType === 'geo' ? 'geo' : 'map') + 'ToggleSelect',\n batch: zrUtil.map(el.__regions, function (region) {\n return {\n name: region.name,\n from: fromView.uid\n };\n })\n };\n action[mapOrGeoModel.mainType + 'Id'] = mapOrGeoModel.id;\n api.dispatchAction(action);\n updateMapSelected(mapOrGeoModel, regionsGroup);\n });\n }\n}\n\nfunction updateMapSelected(mapOrGeoModel, regionsGroup) {\n // FIXME\n regionsGroup.eachChild(function (otherRegionEl) {\n zrUtil.each(otherRegionEl.__regions, function (region) {\n otherRegionEl.trigger(mapOrGeoModel.isSelected(region.name) ? 'emphasis' : 'normal');\n });\n });\n}\n/**\n * @alias module:echarts/component/helper/MapDraw\n * @param {module:echarts/ExtensionAPI} api\n * @param {boolean} updateGroup\n */\n\n\nfunction MapDraw(api, updateGroup) {\n var group = new graphic.Group();\n /**\n * @type {string}\n * @private\n */\n\n this.uid = getUID('ec_map_draw');\n /**\n * @type {module:echarts/component/helper/RoamController}\n * @private\n */\n\n this._controller = new RoamController(api.getZr());\n /**\n * @type {Object} {target, zoom, zoomLimit}\n * @private\n */\n\n this._controllerHost = {\n target: updateGroup ? group : null\n };\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n\n this.group = group;\n /**\n * @type {boolean}\n * @private\n */\n\n this._updateGroup = updateGroup;\n /**\n * This flag is used to make sure that only one among\n * `pan`, `zoom`, `click` can occurs, otherwise 'selected'\n * action may be triggered when `pan`, which is unexpected.\n * @type {booelan}\n */\n\n this._mouseDownFlag;\n /**\n * @type {string}\n */\n\n this._mapName;\n /**\n * @type {boolean}\n */\n\n this._initialized;\n /**\n * @type {module:zrender/container/Group}\n */\n\n group.add(this._regionsGroup = new graphic.Group());\n /**\n * @type {module:zrender/container/Group}\n */\n\n group.add(this._backgroundGroup = new graphic.Group());\n}\n\nMapDraw.prototype = {\n constructor: MapDraw,\n draw: function (mapOrGeoModel, ecModel, api, fromView, payload) {\n var isGeo = mapOrGeoModel.mainType === 'geo'; // Map series has data. GEO model that controlled by map series\n // will be assigned with map data. Other GEO model has no data.\n\n var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n isGeo && ecModel.eachComponent({\n mainType: 'series',\n subType: 'map'\n }, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n var geo = mapOrGeoModel.coordinateSystem;\n\n this._updateBackground(geo);\n\n var regionsGroup = this._regionsGroup;\n var group = this.group;\n var transformInfo = geo.getTransformInfo(); // No animation when first draw or in action\n\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n var targetScale;\n\n if (isFirstDraw) {\n group.transform = transformInfo.roamTransform;\n group.decomposeTransform();\n group.dirty();\n } else {\n var target = new Transformable();\n target.transform = transformInfo.roamTransform;\n target.decomposeTransform();\n var props = {\n scale: target.scale,\n position: target.position\n };\n targetScale = target.scale;\n graphic.updateProps(group, props, mapOrGeoModel);\n }\n\n var scale = transformInfo.rawScale;\n var position = transformInfo.rawPosition;\n regionsGroup.removeAll();\n var itemStyleAccessPath = ['itemStyle'];\n var hoverItemStyleAccessPath = ['emphasis', 'itemStyle'];\n var labelAccessPath = ['label'];\n var hoverLabelAccessPath = ['emphasis', 'label'];\n var nameMap = zrUtil.createHashMap();\n zrUtil.each(geo.regions, function (region) {\n // Consider in GeoJson properties.name may be duplicated, for example,\n // there is multiple region named \"United Kindom\" or \"France\" (so many\n // colonies). And it is not appropriate to merge them in geo, which\n // will make them share the same label and bring trouble in label\n // location calculation.\n var regionGroup = nameMap.get(region.name) || nameMap.set(region.name, new graphic.Group());\n var compoundPath = new graphic.CompoundPath({\n segmentIgnoreThreshold: 1,\n shape: {\n paths: []\n }\n });\n regionGroup.add(compoundPath);\n var regionModel = mapOrGeoModel.getRegionModel(region.name) || mapOrGeoModel;\n var itemStyleModel = regionModel.getModel(itemStyleAccessPath);\n var hoverItemStyleModel = regionModel.getModel(hoverItemStyleAccessPath);\n var itemStyle = getFixedItemStyle(itemStyleModel);\n var hoverItemStyle = getFixedItemStyle(hoverItemStyleModel);\n var labelModel = regionModel.getModel(labelAccessPath);\n var hoverLabelModel = regionModel.getModel(hoverLabelAccessPath);\n var dataIdx; // Use the itemStyle in data if has data\n\n if (data) {\n dataIdx = data.indexOfName(region.name); // Only visual color of each item will be used. It can be encoded by dataRange\n // But visual color of series is used in symbol drawing\n //\n // Visual color for each series is for the symbol draw\n\n var visualColor = data.getItemVisual(dataIdx, 'color', true);\n\n if (visualColor) {\n itemStyle.fill = visualColor;\n }\n }\n\n var transformPoint = function (point) {\n return [point[0] * scale[0] + position[0], point[1] * scale[1] + position[1]];\n };\n\n zrUtil.each(region.geometries, function (geometry) {\n if (geometry.type !== 'polygon') {\n return;\n }\n\n var points = [];\n\n for (var i = 0; i < geometry.exterior.length; ++i) {\n points.push(transformPoint(geometry.exterior[i]));\n }\n\n compoundPath.shape.paths.push(new graphic.Polygon({\n segmentIgnoreThreshold: 1,\n shape: {\n points: points\n }\n }));\n\n for (var i = 0; i < (geometry.interiors ? geometry.interiors.length : 0); ++i) {\n var interior = geometry.interiors[i];\n var points = [];\n\n for (var j = 0; j < interior.length; ++j) {\n points.push(transformPoint(interior[j]));\n }\n\n compoundPath.shape.paths.push(new graphic.Polygon({\n segmentIgnoreThreshold: 1,\n shape: {\n points: points\n }\n }));\n }\n });\n compoundPath.setStyle(itemStyle);\n compoundPath.style.strokeNoScale = true;\n compoundPath.culling = true; // Label\n\n var showLabel = labelModel.get('show');\n var hoverShowLabel = hoverLabelModel.get('show');\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx); // In the following cases label will be drawn\n // 1. In map series and data value is NaN\n // 2. In geo component\n // 4. Region has no series legendSymbol, which will be add a showLabel flag in mapSymbolLayout\n\n if (isGeo || isDataNaN && (showLabel || hoverShowLabel) || itemLayout && itemLayout.showLabel) {\n var query = !isGeo ? dataIdx : region.name;\n var labelFetcher; // Consider dataIdx not found.\n\n if (!data || dataIdx >= 0) {\n labelFetcher = mapOrGeoModel;\n }\n\n var textEl = new graphic.Text({\n position: transformPoint(region.center.slice()),\n // FIXME\n // label rotation is not support yet in geo or regions of series-map\n // that has no data. The rotation will be effected by this `scale`.\n // So needed to change to RectText?\n scale: [1 / group.scale[0], 1 / group.scale[1]],\n z2: 10,\n silent: true\n });\n graphic.setLabelStyle(textEl.style, textEl.hoverStyle = {}, labelModel, hoverLabelModel, {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: region.name,\n useInsideStyle: false\n }, {\n textAlign: 'center',\n textVerticalAlign: 'middle'\n });\n\n if (!isFirstDraw) {\n // Text animation\n var textScale = [1 / targetScale[0], 1 / targetScale[1]];\n graphic.updateProps(textEl, {\n scale: textScale\n }, mapOrGeoModel);\n }\n\n regionGroup.add(textEl);\n } // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the rigionGroup\n\n\n if (data) {\n data.setItemGraphicEl(dataIdx, regionGroup);\n } else {\n var regionModel = mapOrGeoModel.getRegionModel(region.name); // Package custom mouse event for geo component\n\n compoundPath.eventData = {\n componentType: 'geo',\n componentIndex: mapOrGeoModel.componentIndex,\n geoIndex: mapOrGeoModel.componentIndex,\n name: region.name,\n region: regionModel && regionModel.option || {}\n };\n }\n\n var groupRegions = regionGroup.__regions || (regionGroup.__regions = []);\n groupRegions.push(region);\n regionGroup.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n graphic.setHoverStyle(regionGroup, hoverItemStyle);\n regionsGroup.add(regionGroup);\n });\n\n this._updateController(mapOrGeoModel, ecModel, api);\n\n updateMapSelectHandler(this, mapOrGeoModel, regionsGroup, api, fromView);\n updateMapSelected(mapOrGeoModel, regionsGroup);\n },\n remove: function () {\n this._regionsGroup.removeAll();\n\n this._backgroundGroup.removeAll();\n\n this._controller.dispose();\n\n this._mapName && geoSourceManager.removeGraphic(this._mapName, this.uid);\n this._mapName = null;\n this._controllerHost = {};\n },\n _updateBackground: function (geo) {\n var mapName = geo.map;\n\n if (this._mapName !== mapName) {\n zrUtil.each(geoSourceManager.makeGraphic(mapName, this.uid), function (root) {\n this._backgroundGroup.add(root);\n }, this);\n }\n\n this._mapName = mapName;\n },\n _updateController: function (mapOrGeoModel, ecModel, api) {\n var geo = mapOrGeoModel.coordinateSystem;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit');\n controllerHost.zoom = geo.getZoom(); // roamType is will be set default true if it is null\n\n controller.enable(mapOrGeoModel.get('roam') || false);\n var mainType = mapOrGeoModel.mainType;\n\n function makeActionBase() {\n var action = {\n type: 'geoRoam',\n componentType: mainType\n };\n action[mainType + 'Id'] = mapOrGeoModel.id;\n return action;\n }\n\n controller.off('pan').on('pan', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n dx: e.dx,\n dy: e.dy\n }));\n }, this);\n controller.off('zoom').on('zoom', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n }));\n\n if (this._updateGroup) {\n var scale = this.group.scale;\n\n this._regionsGroup.traverse(function (el) {\n if (el.type === 'text') {\n el.attr('scale', [1 / scale[0], 1 / scale[1]]);\n }\n });\n }\n }, this);\n controller.setPointerChecker(function (e, x, y) {\n return geo.getViewRectAfterRoam().contain(x, y) && !onIrrelevantElement(e, api, mapOrGeoModel);\n });\n }\n};\nvar _default = MapDraw;\nmodule.exports = _default;","var matrix = require(\"../core/matrix\");\n\nvar vector = require(\"../core/vector\");\n\n/**\n * 提供变换扩展\n * @module zrender/mixin/Transformable\n * @author pissang (https://www.github.com/pissang)\n */\nvar mIdentity = matrix.identity;\nvar EPSILON = 5e-5;\n\nfunction isNotAroundZero(val) {\n return val > EPSILON || val < -EPSILON;\n}\n/**\n * @alias module:zrender/mixin/Transformable\n * @constructor\n */\n\n\nvar Transformable = function (opts) {\n opts = opts || {}; // If there are no given position, rotation, scale\n\n if (!opts.position) {\n /**\n * 平移\n * @type {Array.}\n * @default [0, 0]\n */\n this.position = [0, 0];\n }\n\n if (opts.rotation == null) {\n /**\n * 旋转\n * @type {Array.}\n * @default 0\n */\n this.rotation = 0;\n }\n\n if (!opts.scale) {\n /**\n * 缩放\n * @type {Array.}\n * @default [1, 1]\n */\n this.scale = [1, 1];\n }\n /**\n * 旋转和缩放的原点\n * @type {Array.}\n * @default null\n */\n\n\n this.origin = this.origin || null;\n};\n\nvar transformableProto = Transformable.prototype;\ntransformableProto.transform = null;\n/**\n * 判断是否需要有坐标变换\n * 如果有坐标变换, 则从position, rotation, scale以及父节点的transform计算出自身的transform矩阵\n */\n\ntransformableProto.needLocalTransform = function () {\n return isNotAroundZero(this.rotation) || isNotAroundZero(this.position[0]) || isNotAroundZero(this.position[1]) || isNotAroundZero(this.scale[0] - 1) || isNotAroundZero(this.scale[1] - 1);\n};\n\nvar scaleTmp = [];\n\ntransformableProto.updateTransform = function () {\n var parent = this.parent;\n var parentHasTransform = parent && parent.transform;\n var needLocalTransform = this.needLocalTransform();\n var m = this.transform;\n\n if (!(needLocalTransform || parentHasTransform)) {\n m && mIdentity(m);\n return;\n }\n\n m = m || matrix.create();\n\n if (needLocalTransform) {\n this.getLocalTransform(m);\n } else {\n mIdentity(m);\n } // 应用父节点变换\n\n\n if (parentHasTransform) {\n if (needLocalTransform) {\n matrix.mul(m, parent.transform, m);\n } else {\n matrix.copy(m, parent.transform);\n }\n } // 保存这个变换矩阵\n\n\n this.transform = m;\n var globalScaleRatio = this.globalScaleRatio;\n\n if (globalScaleRatio != null && globalScaleRatio !== 1) {\n this.getGlobalScale(scaleTmp);\n var relX = scaleTmp[0] < 0 ? -1 : 1;\n var relY = scaleTmp[1] < 0 ? -1 : 1;\n var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0;\n var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0;\n m[0] *= sx;\n m[1] *= sx;\n m[2] *= sy;\n m[3] *= sy;\n }\n\n this.invTransform = this.invTransform || matrix.create();\n matrix.invert(this.invTransform, m);\n};\n\ntransformableProto.getLocalTransform = function (m) {\n return Transformable.getLocalTransform(this, m);\n};\n/**\n * 将自己的transform应用到context上\n * @param {CanvasRenderingContext2D} ctx\n */\n\n\ntransformableProto.setTransform = function (ctx) {\n var m = this.transform;\n var dpr = ctx.dpr || 1;\n\n if (m) {\n ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]);\n } else {\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n }\n};\n\ntransformableProto.restoreTransform = function (ctx) {\n var dpr = ctx.dpr || 1;\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n};\n\nvar tmpTransform = [];\nvar originTransform = matrix.create();\n\ntransformableProto.setLocalTransform = function (m) {\n if (!m) {\n // TODO return or set identity?\n return;\n }\n\n var sx = m[0] * m[0] + m[1] * m[1];\n var sy = m[2] * m[2] + m[3] * m[3];\n var position = this.position;\n var scale = this.scale;\n\n if (isNotAroundZero(sx - 1)) {\n sx = Math.sqrt(sx);\n }\n\n if (isNotAroundZero(sy - 1)) {\n sy = Math.sqrt(sy);\n }\n\n if (m[0] < 0) {\n sx = -sx;\n }\n\n if (m[3] < 0) {\n sy = -sy;\n }\n\n position[0] = m[4];\n position[1] = m[5];\n scale[0] = sx;\n scale[1] = sy;\n this.rotation = Math.atan2(-m[1] / sy, m[0] / sx);\n};\n/**\n * 分解`transform`矩阵到`position`, `rotation`, `scale`\n */\n\n\ntransformableProto.decomposeTransform = function () {\n if (!this.transform) {\n return;\n }\n\n var parent = this.parent;\n var m = this.transform;\n\n if (parent && parent.transform) {\n // Get local transform and decompose them to position, scale, rotation\n matrix.mul(tmpTransform, parent.invTransform, m);\n m = tmpTransform;\n }\n\n var origin = this.origin;\n\n if (origin && (origin[0] || origin[1])) {\n originTransform[4] = origin[0];\n originTransform[5] = origin[1];\n matrix.mul(tmpTransform, m, originTransform);\n tmpTransform[4] -= origin[0];\n tmpTransform[5] -= origin[1];\n m = tmpTransform;\n }\n\n this.setLocalTransform(m);\n};\n/**\n * Get global scale\n * @return {Array.}\n */\n\n\ntransformableProto.getGlobalScale = function (out) {\n var m = this.transform;\n out = out || [];\n\n if (!m) {\n out[0] = 1;\n out[1] = 1;\n return out;\n }\n\n out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]);\n out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]);\n\n if (m[0] < 0) {\n out[0] = -out[0];\n }\n\n if (m[3] < 0) {\n out[1] = -out[1];\n }\n\n return out;\n};\n/**\n * 变换坐标位置到 shape 的局部坐标空间\n * @method\n * @param {number} x\n * @param {number} y\n * @return {Array.}\n */\n\n\ntransformableProto.transformCoordToLocal = function (x, y) {\n var v2 = [x, y];\n var invTransform = this.invTransform;\n\n if (invTransform) {\n vector.applyTransform(v2, v2, invTransform);\n }\n\n return v2;\n};\n/**\n * 变换局部坐标位置到全局坐标空间\n * @method\n * @param {number} x\n * @param {number} y\n * @return {Array.}\n */\n\n\ntransformableProto.transformCoordToGlobal = function (x, y) {\n var v2 = [x, y];\n var transform = this.transform;\n\n if (transform) {\n vector.applyTransform(v2, v2, transform);\n }\n\n return v2;\n};\n/**\n * @static\n * @param {Object} target\n * @param {Array.} target.origin\n * @param {number} target.rotation\n * @param {Array.} target.position\n * @param {Array.} [m]\n */\n\n\nTransformable.getLocalTransform = function (target, m) {\n m = m || [];\n mIdentity(m);\n var origin = target.origin;\n var scale = target.scale || [1, 1];\n var rotation = target.rotation || 0;\n var position = target.position || [0, 0];\n\n if (origin) {\n // Translate to origin\n m[4] -= origin[0];\n m[5] -= origin[1];\n }\n\n matrix.scale(m, m, scale);\n\n if (rotation) {\n matrix.rotate(m, m, rotation);\n }\n\n if (origin) {\n // Translate back from origin\n m[4] += origin[0];\n m[5] += origin[1];\n }\n\n m[4] += position[0];\n m[5] += position[1];\n return m;\n};\n\nvar _default = Transformable;\nmodule.exports = _default;","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var Displayable = require(\"./Displayable\");\n\nvar BoundingRect = require(\"../core/BoundingRect\");\n\nvar zrUtil = require(\"../core/util\");\n\nvar imageHelper = require(\"./helper/image\");\n\n/**\n * @alias zrender/graphic/Image\n * @extends module:zrender/graphic/Displayable\n * @constructor\n * @param {Object} opts\n */\nfunction ZImage(opts) {\n Displayable.call(this, opts);\n}\n\nZImage.prototype = {\n constructor: ZImage,\n type: 'image',\n brush: function (ctx, prevEl) {\n var style = this.style;\n var src = style.image; // Must bind each time\n\n style.bind(ctx, this, prevEl);\n var image = this._image = imageHelper.createOrUpdateImage(src, this._image, this, this.onload);\n\n if (!image || !imageHelper.isImageReady(image)) {\n return;\n } // 图片已经加载完成\n // if (image.nodeName.toUpperCase() == 'IMG') {\n // if (!image.complete) {\n // return;\n // }\n // }\n // Else is canvas\n\n\n var x = style.x || 0;\n var y = style.y || 0;\n var width = style.width;\n var height = style.height;\n var aspect = image.width / image.height;\n\n if (width == null && height != null) {\n // Keep image/height ratio\n width = height * aspect;\n } else if (height == null && width != null) {\n height = width / aspect;\n } else if (width == null && height == null) {\n width = image.width;\n height = image.height;\n } // 设置transform\n\n\n this.setTransform(ctx);\n\n if (style.sWidth && style.sHeight) {\n var sx = style.sx || 0;\n var sy = style.sy || 0;\n ctx.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height);\n } else if (style.sx && style.sy) {\n var sx = style.sx;\n var sy = style.sy;\n var sWidth = width - sx;\n var sHeight = height - sy;\n ctx.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height);\n } else {\n ctx.drawImage(image, x, y, width, height);\n } // Draw rect text\n\n\n if (style.text != null) {\n // Only restore transform when needs draw text.\n this.restoreTransform(ctx);\n this.drawRectText(ctx, this.getBoundingRect());\n }\n },\n getBoundingRect: function () {\n var style = this.style;\n\n if (!this._rect) {\n this._rect = new BoundingRect(style.x || 0, style.y || 0, style.width || 0, style.height || 0);\n }\n\n return this._rect;\n }\n};\nzrUtil.inherits(ZImage, Displayable);\nvar _default = ZImage;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, payload) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n\n if (nodes.length) {\n var minValue = Infinity;\n var maxValue = -Infinity;\n zrUtil.each(nodes, function (node) {\n var nodeValue = node.getLayout().value;\n\n if (nodeValue < minValue) {\n minValue = nodeValue;\n }\n\n if (nodeValue > maxValue) {\n maxValue = nodeValue;\n }\n });\n zrUtil.each(nodes, function (node) {\n var mapping = new VisualMapping({\n type: 'color',\n mappingMethod: 'linear',\n dataExtent: [minValue, maxValue],\n visual: seriesModel.get('color')\n });\n var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);\n var customColor = node.getModel().get('itemStyle.color');\n customColor != null ? node.setVisual('color', customColor) : node.setVisual('color', mapValueToColor);\n });\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar layoutUtil = require(\"../../util/layout\");\n\nvar LegendView = require(\"./LegendView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = LegendView.extend({\n type: 'legend.scroll',\n newlineDisabled: true,\n init: function () {\n ScrollableLegendView.superCall(this, 'init');\n /**\n * @private\n * @type {number} For `scroll`.\n */\n\n this._currentIndex = 0;\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n\n this.group.add(this._containerGroup = new Group());\n\n this._containerGroup.add(this.getContentGroup());\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n\n\n this.group.add(this._controllerGroup = new Group());\n /**\n *\n * @private\n */\n\n this._showController;\n },\n\n /**\n * @override\n */\n resetInner: function () {\n ScrollableLegendView.superCall(this, 'resetInner');\n\n this._controllerGroup.removeAll();\n\n this._containerGroup.removeClipPath();\n\n this._containerGroup.__rectSize = null;\n },\n\n /**\n * @override\n */\n renderInner: function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var me = this; // Render content items.\n\n ScrollableLegendView.superCall(this, 'renderInner', itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n\n var pageIconSize = legendModel.get('pageIconSize', true);\n\n if (!zrUtil.isArray(pageIconSize)) {\n pageIconSize = [pageIconSize, pageIconSize];\n }\n\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n textFill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n textVerticalAlign: 'middle',\n textAlign: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(me._pageGo, me, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSize[0] / 2,\n y: -pageIconSize[1] / 2,\n width: pageIconSize[0],\n height: pageIconSize[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n },\n\n /**\n * @override\n */\n layoutInner: function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box( // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx);\n\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.attr('position', selectorPos);\n }\n\n return mainRect;\n },\n _layoutContentAndController: function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup; // Place items in contentGroup.\n\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box( // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup.position[orientIdx];\n } // Layout container group based on 0.\n\n\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup.\n\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom.\n\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n } // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n } // Always align controller to content as 'middle'.\n\n\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.attr('position', contentPos);\n containerGroup.attr('position', containerPos);\n controllerGroup.attr('position', controllerPos); // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n\n var mainRect = {\n x: 0,\n y: 0\n }; // Consider content may be overflow (should be clipped).\n\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n })); // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n } // Content translate animation.\n\n\n var pageInfo = this._getPageInfo(legendModel);\n\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n position: pageInfo.contentPosition\n }, // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : false);\n\n this._updatePageInfoView(legendModel, pageInfo);\n\n return mainRect;\n },\n _pageGo: function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n },\n _updatePageInfoView: function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var canJump = pageInfo[name + 'DataIndex'] != null;\n var icon = controllerGroup.childOfName(name);\n\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current).replace('{total}', total) : pageFormatter({\n current: current,\n total: total\n }));\n },\n\n /**\n * @param {module:echarts/model/Model} legendModel\n * @return {Object} {\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n _getPageInfo: function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: contentGroup.position.slice(),\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n\n if (!targetItem) {\n return result;\n }\n\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n\n if ( // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize || // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n\n ++result.pageCount;\n }\n }\n\n winEndItemInfo = currItemInfo;\n }\n\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n\n if ( // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)) && // e.g., when page size is smaller than item size.\n winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n\n ++result.pageCount;\n ++result.pageIndex;\n }\n\n winStartItemInfo = currItemInfo;\n }\n\n return result;\n\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el.position[orientIdx];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n },\n _findTargetItemIndex: function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex; // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defualtIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n }\n});\nvar _default = ScrollableLegendView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Axis = require(\"../Axis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @constructor module:echarts/coord/parallel/ParallelAxis\n * @extends {module:echarts/coord/Axis}\n * @param {string} dim\n * @param {*} scale\n * @param {Array.} coordExtent\n * @param {string} axisType\n */\nvar ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) {\n Axis.call(this, dim, scale, coordExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = axisType || 'value';\n /**\n * @type {number}\n * @readOnly\n */\n\n this.axisIndex = axisIndex;\n};\n\nParallelAxis.prototype = {\n constructor: ParallelAxis,\n\n /**\n * Axis model\n * @param {module:echarts/coord/parallel/AxisModel}\n */\n model: null,\n\n /**\n * @override\n */\n isHorizontal: function () {\n return this.coordinateSystem.getModel().get('layout') !== 'horizontal';\n }\n};\nzrUtil.inherits(ParallelAxis, Axis);\nvar _default = ParallelAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\nvar getDataItemValue = _model.getDataItemValue;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\nvar each = _util.each;\nvar map = _util.map;\nvar isArray = _util.isArray;\nvar isString = _util.isString;\nvar isObject = _util.isObject;\nvar isTypedArray = _util.isTypedArray;\nvar isArrayLike = _util.isArrayLike;\nvar extend = _util.extend;\nvar assert = _util.assert;\n\nvar Source = require(\"../Source\");\n\nvar _sourceType = require(\"./sourceType\");\n\nvar SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;\nvar SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS;\nvar SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS;\nvar SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS;\nvar SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN;\nvar SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;\nvar SERIES_LAYOUT_BY_ROW = _sourceType.SERIES_LAYOUT_BY_ROW;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// The result of `guessOrdinal`.\nvar BE_ORDINAL = {\n Must: 1,\n // Encounter string but not '-' and not number-like.\n Might: 2,\n // Encounter string but number-like.\n Not: 3 // Other cases\n\n};\nvar inner = makeInner();\n/**\n * @see {module:echarts/data/Source}\n * @param {module:echarts/component/dataset/DatasetModel} datasetModel\n * @return {string} sourceFormat\n */\n\nfunction detectSourceFormat(datasetModel) {\n var data = datasetModel.option.source;\n var sourceFormat = SOURCE_FORMAT_UNKNOWN;\n\n if (isTypedArray(data)) {\n sourceFormat = SOURCE_FORMAT_TYPED_ARRAY;\n } else if (isArray(data)) {\n // FIXME Whether tolerate null in top level array?\n if (data.length === 0) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n }\n\n for (var i = 0, len = data.length; i < len; i++) {\n var item = data[i];\n\n if (item == null) {\n continue;\n } else if (isArray(item)) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n break;\n } else if (isObject(item)) {\n sourceFormat = SOURCE_FORMAT_OBJECT_ROWS;\n break;\n }\n }\n } else if (isObject(data)) {\n for (var key in data) {\n if (data.hasOwnProperty(key) && isArrayLike(data[key])) {\n sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS;\n break;\n }\n }\n } else if (data != null) {\n throw new Error('Invalid data');\n }\n\n inner(datasetModel).sourceFormat = sourceFormat;\n}\n/**\n * [Scenarios]:\n * (1) Provide source data directly:\n * series: {\n * encode: {...},\n * dimensions: [...]\n * seriesLayoutBy: 'row',\n * data: [[...]]\n * }\n * (2) Refer to datasetModel.\n * series: [{\n * encode: {...}\n * // Ignore datasetIndex means `datasetIndex: 0`\n * // and the dimensions defination in dataset is used\n * }, {\n * encode: {...},\n * seriesLayoutBy: 'column',\n * datasetIndex: 1\n * }]\n *\n * Get data from series itself or datset.\n * @return {module:echarts/data/Source} source\n */\n\n\nfunction getSource(seriesModel) {\n return inner(seriesModel).source;\n}\n/**\n * MUST be called before mergeOption of all series.\n * @param {module:echarts/model/Global} ecModel\n */\n\n\nfunction resetSourceDefaulter(ecModel) {\n // `datasetMap` is used to make default encode.\n inner(ecModel).datasetMap = createHashMap();\n}\n/**\n * [Caution]:\n * MUST be called after series option merged and\n * before \"series.getInitailData()\" called.\n *\n * [The rule of making default encode]:\n * Category axis (if exists) alway map to the first dimension.\n * Each other axis occupies a subsequent dimension.\n *\n * [Why make default encode]:\n * Simplify the typing of encode in option, avoiding the case like that:\n * series: [{encode: {x: 0, y: 1}}, {encode: {x: 0, y: 2}}, {encode: {x: 0, y: 3}}],\n * where the \"y\" have to be manually typed as \"1, 2, 3, ...\".\n *\n * @param {module:echarts/model/Series} seriesModel\n */\n\n\nfunction prepareSource(seriesModel) {\n var seriesOption = seriesModel.option;\n var data = seriesOption.data;\n var sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL;\n var fromDataset = false;\n var seriesLayoutBy = seriesOption.seriesLayoutBy;\n var sourceHeader = seriesOption.sourceHeader;\n var dimensionsDefine = seriesOption.dimensions;\n var datasetModel = getDatasetModel(seriesModel);\n\n if (datasetModel) {\n var datasetOption = datasetModel.option;\n data = datasetOption.source;\n sourceFormat = inner(datasetModel).sourceFormat;\n fromDataset = true; // These settings from series has higher priority.\n\n seriesLayoutBy = seriesLayoutBy || datasetOption.seriesLayoutBy;\n sourceHeader == null && (sourceHeader = datasetOption.sourceHeader);\n dimensionsDefine = dimensionsDefine || datasetOption.dimensions;\n }\n\n var completeResult = completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine);\n inner(seriesModel).source = new Source({\n data: data,\n fromDataset: fromDataset,\n seriesLayoutBy: seriesLayoutBy,\n sourceFormat: sourceFormat,\n dimensionsDefine: completeResult.dimensionsDefine,\n startIndex: completeResult.startIndex,\n dimensionsDetectCount: completeResult.dimensionsDetectCount,\n // Note: dataset option does not have `encode`.\n encodeDefine: seriesOption.encode\n });\n} // return {startIndex, dimensionsDefine, dimensionsCount}\n\n\nfunction completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine) {\n if (!data) {\n return {\n dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine)\n };\n }\n\n var dimensionsDetectCount;\n var startIndex;\n\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n // Rule: Most of the first line are string: it is header.\n // Caution: consider a line with 5 string and 1 number,\n // it still can not be sure it is a head, because the\n // 5 string may be 5 values of category columns.\n if (sourceHeader === 'auto' || sourceHeader == null) {\n arrayRowsTravelFirst(function (val) {\n // '-' is regarded as null/undefined.\n if (val != null && val !== '-') {\n if (isString(val)) {\n startIndex == null && (startIndex = 1);\n } else {\n startIndex = 0;\n }\n } // 10 is an experience number, avoid long loop.\n\n }, seriesLayoutBy, data, 10);\n } else {\n startIndex = sourceHeader ? 1 : 0;\n }\n\n if (!dimensionsDefine && startIndex === 1) {\n dimensionsDefine = [];\n arrayRowsTravelFirst(function (val, index) {\n dimensionsDefine[index] = val != null ? val : '';\n }, seriesLayoutBy, data);\n }\n\n dimensionsDetectCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? data.length : data[0] ? data[0].length : null;\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimensionsDefine) {\n dimensionsDefine = objectRowsCollectDimensions(data);\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimensionsDefine) {\n dimensionsDefine = [];\n each(data, function (colArr, key) {\n dimensionsDefine.push(key);\n });\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var value0 = getDataItemValue(data[0]);\n dimensionsDetectCount = isArray(value0) && value0.length || 1;\n } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {}\n\n return {\n startIndex: startIndex,\n dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine),\n dimensionsDetectCount: dimensionsDetectCount\n };\n} // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'],\n// which is reasonable. But dimension name is duplicated.\n// Returns undefined or an array contains only object without null/undefiend or string.\n\n\nfunction normalizeDimensionsDefine(dimensionsDefine) {\n if (!dimensionsDefine) {\n // The meaning of null/undefined is different from empty array.\n return;\n }\n\n var nameMap = createHashMap();\n return map(dimensionsDefine, function (item, index) {\n item = extend({}, isObject(item) ? item : {\n name: item\n }); // User can set null in dimensions.\n // We dont auto specify name, othewise a given name may\n // cause it be refered unexpectedly.\n\n if (item.name == null) {\n return item;\n } // Also consider number form like 2012.\n\n\n item.name += ''; // User may also specify displayName.\n // displayName will always exists except user not\n // specified or dim name is not specified or detected.\n // (A auto generated dim name will not be used as\n // displayName).\n\n if (item.displayName == null) {\n item.displayName = item.name;\n }\n\n var exist = nameMap.get(item.name);\n\n if (!exist) {\n nameMap.set(item.name, {\n count: 1\n });\n } else {\n item.name += '-' + exist.count++;\n }\n\n return item;\n });\n}\n\nfunction arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) {\n maxLoop == null && (maxLoop = Infinity);\n\n if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n cb(data[i] ? data[i][0] : null, i);\n }\n } else {\n var value0 = data[0] || [];\n\n for (var i = 0; i < value0.length && i < maxLoop; i++) {\n cb(value0[i], i);\n }\n }\n}\n\nfunction objectRowsCollectDimensions(data) {\n var firstIndex = 0;\n var obj;\n\n while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line\n\n\n if (obj) {\n var dimensions = [];\n each(obj, function (value, key) {\n dimensions.push(key);\n });\n return dimensions;\n }\n}\n/**\n * [The strategy of the arrengment of data dimensions for dataset]:\n * \"value way\": all axes are non-category axes. So series one by one take\n * several (the number is coordSysDims.length) dimensions from dataset.\n * The result of data arrengment of data dimensions like:\n * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y |\n * \"category way\": at least one axis is category axis. So the the first data\n * dimension is always mapped to the first category axis and shared by\n * all of the series. The other data dimensions are taken by series like\n * \"value way\" does.\n * The result of data arrengment of data dimensions like:\n * | ser_shared_x | ser0_y | ser1_y | ser2_y |\n *\n * @param {Array.} coordDimensions [{name: , type: , dimsDef: }, ...]\n * @param {module:model/Series} seriesModel\n * @param {module:data/Source} source\n * @return {Object} encode Never be `null/undefined`.\n */\n\n\nfunction makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {\n var encode = {};\n var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.\n\n if (!datasetModel || !coordDimensions) {\n return encode;\n }\n\n var encodeItemName = [];\n var encodeSeriesName = [];\n var ecModel = seriesModel.ecModel;\n var datasetMap = inner(ecModel).datasetMap;\n var key = datasetModel.uid + '_' + source.seriesLayoutBy;\n var baseCategoryDimIndex;\n var categoryWayValueDimStart;\n coordDimensions = coordDimensions.slice();\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n !isObject(coordDimInfo) && (coordDimensions[coordDimIdx] = {\n name: coordDimInfo\n });\n\n if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {\n baseCategoryDimIndex = coordDimIdx;\n categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimensions[coordDimIdx]);\n }\n\n encode[coordDimInfo.name] = [];\n });\n var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {\n categoryWayDim: categoryWayValueDimStart,\n valueWayDim: 0\n }); // TODO\n // Auto detect first time axis and do arrangement.\n\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n var coordDimName = coordDimInfo.name;\n var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way.\n\n if (baseCategoryDimIndex == null) {\n var start = datasetRecord.valueWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule?\n // especially when encode x y specified.\n // consider: when mutiple series share one dimension\n // category axis, series name should better use\n // the other dimsion name. On the other hand, use\n // both dimensions name.\n } // In category way, the first category axis.\n else if (baseCategoryDimIndex === coordDimIdx) {\n pushDim(encode[coordDimName], 0, count);\n pushDim(encodeItemName, 0, count);\n } // In category way, the other axis.\n else {\n var start = datasetRecord.categoryWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.categoryWayDim += count;\n }\n });\n\n function pushDim(dimIdxArr, idxFrom, idxCount) {\n for (var i = 0; i < idxCount; i++) {\n dimIdxArr.push(idxFrom + i);\n }\n }\n\n function getDataDimCountOnCoordDim(coordDimInfo) {\n var dimsDef = coordDimInfo.dimsDef;\n return dimsDef ? dimsDef.length : 1;\n }\n\n encodeItemName.length && (encode.itemName = encodeItemName);\n encodeSeriesName.length && (encode.seriesName = encodeSeriesName);\n return encode;\n}\n/**\n * Work for data like [{name: ..., value: ...}, ...].\n *\n * @param {module:model/Series} seriesModel\n * @param {module:data/Source} source\n * @return {Object} encode Never be `null/undefined`.\n */\n\n\nfunction makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {\n var encode = {};\n var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.\n\n if (!datasetModel) {\n return encode;\n }\n\n var sourceFormat = source.sourceFormat;\n var dimensionsDefine = source.dimensionsDefine;\n var potentialNameDimIndex;\n\n if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n each(dimensionsDefine, function (dim, idx) {\n if ((isObject(dim) ? dim.name : dim) === 'name') {\n potentialNameDimIndex = idx;\n }\n });\n } // idxResult: {v, n}.\n\n\n var idxResult = function () {\n var idxRes0 = {};\n var idxRes1 = {};\n var guessRecords = []; // 5 is an experience value.\n\n for (var i = 0, len = Math.min(5, dimCount); i < len; i++) {\n var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i);\n guessRecords.push(guessResult);\n var isPureNumber = guessResult === BE_ORDINAL.Not; // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim,\n // and then find a name dim with the priority:\n // \"BE_ORDINAL.Might|BE_ORDINAL.Must\" > \"other dim\" > \"the value dim itself\".\n\n if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) {\n idxRes0.v = i;\n }\n\n if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) {\n idxRes0.n = i;\n }\n\n if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) {\n return idxRes0;\n } // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not),\n // find the first BE_ORDINAL.Might as the value dim,\n // and then find a name dim with the priority:\n // \"other dim\" > \"the value dim itself\".\n // That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be\n // treated as number.\n\n\n if (!isPureNumber) {\n if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) {\n idxRes1.v = i;\n }\n\n if (idxRes1.n == null || idxRes1.n === idxRes1.v) {\n idxRes1.n = i;\n }\n }\n }\n\n function fulfilled(idxResult) {\n return idxResult.v != null && idxResult.n != null;\n }\n\n return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null;\n }();\n\n if (idxResult) {\n encode.value = idxResult.v; // `potentialNameDimIndex` has highest priority.\n\n var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n; // By default, label use itemName in charts.\n // So we dont set encodeLabel here.\n\n encode.itemName = [nameDimIndex];\n encode.seriesName = [nameDimIndex];\n }\n\n return encode;\n}\n/**\n * If return null/undefined, indicate that should not use datasetModel.\n */\n\n\nfunction getDatasetModel(seriesModel) {\n var option = seriesModel.option; // Caution: consider the scenario:\n // A dataset is declared and a series is not expected to use the dataset,\n // and at the beginning `setOption({series: { noData })` (just prepare other\n // option but no data), then `setOption({series: {data: [...]}); In this case,\n // the user should set an empty array to avoid that dataset is used by default.\n\n var thisData = option.data;\n\n if (!thisData) {\n return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0);\n }\n}\n/**\n * The rule should not be complex, otherwise user might not\n * be able to known where the data is wrong.\n * The code is ugly, but how to make it neat?\n *\n * @param {module:echars/data/Source} source\n * @param {number} dimIndex\n * @return {BE_ORDINAL} guess result.\n */\n\n\nfunction guessOrdinal(source, dimIndex) {\n return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex);\n} // dimIndex may be overflow source data.\n// return {BE_ORDINAL}\n\n\nfunction doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) {\n var result; // Experience value.\n\n var maxLoop = 5;\n\n if (isTypedArray(data)) {\n return BE_ORDINAL.Not;\n } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine\n // always exists in source.\n\n\n var dimName;\n var dimType;\n\n if (dimensionsDefine) {\n var dimDefItem = dimensionsDefine[dimIndex];\n\n if (isObject(dimDefItem)) {\n dimName = dimDefItem.name;\n dimType = dimDefItem.type;\n } else if (isString(dimDefItem)) {\n dimName = dimDefItem;\n }\n }\n\n if (dimType != null) {\n return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not;\n }\n\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {\n var sample = data[dimIndex];\n\n for (var i = 0; i < (sample || []).length && i < maxLoop; i++) {\n if ((result = detectValue(sample[startIndex + i])) != null) {\n return result;\n }\n }\n } else {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var row = data[startIndex + i];\n\n if (row && (result = detectValue(row[dimIndex])) != null) {\n return result;\n }\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var item = data[i];\n\n if (item && (result = detectValue(item[dimName])) != null) {\n return result;\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n\n var sample = data[dimName];\n\n if (!sample || isTypedArray(sample)) {\n return BE_ORDINAL.Not;\n }\n\n for (var i = 0; i < sample.length && i < maxLoop; i++) {\n if ((result = detectValue(sample[i])) != null) {\n return result;\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var item = data[i];\n var val = getDataItemValue(item);\n\n if (!isArray(val)) {\n return BE_ORDINAL.Not;\n }\n\n if ((result = detectValue(val[dimIndex])) != null) {\n return result;\n }\n }\n }\n\n function detectValue(val) {\n var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as \"number\".\n // `isFinit('')` get `true`.\n\n if (val != null && isFinite(val) && val !== '') {\n return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not;\n } else if (beStr && val !== '-') {\n return BE_ORDINAL.Must;\n }\n }\n\n return BE_ORDINAL.Not;\n}\n\nexports.BE_ORDINAL = BE_ORDINAL;\nexports.detectSourceFormat = detectSourceFormat;\nexports.getSource = getSource;\nexports.resetSourceDefaulter = resetSourceDefaulter;\nexports.prepareSource = prepareSource;\nexports.makeSeriesEncodeForAxisCoordSys = makeSeriesEncodeForAxisCoordSys;\nexports.makeSeriesEncodeForNameBased = makeSeriesEncodeForNameBased;\nexports.guessOrdinal = guessOrdinal;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Line = require(\"./Line\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar curveUtil = require(\"zrender/lib/core/curve\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Provide effect for line\n * @module echarts/chart/helper/EffectLine\n */\n\n/**\n * @constructor\n * @extends {module:zrender/graphic/Group}\n * @alias {module:echarts/chart/helper/Line}\n */\nfunction EffectLine(lineData, idx, seriesScope) {\n graphic.Group.call(this);\n this.add(this.createLine(lineData, idx, seriesScope));\n\n this._updateEffectSymbol(lineData, idx);\n}\n\nvar effectLineProto = EffectLine.prototype;\n\neffectLineProto.createLine = function (lineData, idx, seriesScope) {\n return new Line(lineData, idx, seriesScope);\n};\n\neffectLineProto._updateEffectSymbol = function (lineData, idx) {\n var itemModel = lineData.getItemModel(idx);\n var effectModel = itemModel.getModel('effect');\n var size = effectModel.get('symbolSize');\n var symbolType = effectModel.get('symbol');\n\n if (!zrUtil.isArray(size)) {\n size = [size, size];\n }\n\n var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color');\n var symbol = this.childAt(1);\n\n if (this._symbolType !== symbolType) {\n // Remove previous\n this.remove(symbol);\n symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color);\n symbol.z2 = 100;\n symbol.culling = true;\n this.add(symbol);\n } // Symbol may be removed if loop is false\n\n\n if (!symbol) {\n return;\n } // Shadow color is same with color in default\n\n\n symbol.setStyle('shadowColor', color);\n symbol.setStyle(effectModel.getItemStyle(['color']));\n symbol.attr('scale', size);\n symbol.setColor(color);\n symbol.attr('scale', size);\n this._symbolType = symbolType;\n this._symbolScale = size;\n\n this._updateEffectAnimation(lineData, effectModel, idx);\n};\n\neffectLineProto._updateEffectAnimation = function (lineData, effectModel, idx) {\n var symbol = this.childAt(1);\n\n if (!symbol) {\n return;\n }\n\n var self = this;\n var points = lineData.getItemLayout(idx);\n var period = effectModel.get('period') * 1000;\n var loop = effectModel.get('loop');\n var constantSpeed = effectModel.get('constantSpeed');\n var delayExpr = zrUtil.retrieve(effectModel.get('delay'), function (idx) {\n return idx / lineData.count() * period / 3;\n });\n var isDelayFunc = typeof delayExpr === 'function'; // Ignore when updating\n\n symbol.ignore = true;\n this.updateAnimationPoints(symbol, points);\n\n if (constantSpeed > 0) {\n period = this.getLineLength(symbol) / constantSpeed * 1000;\n }\n\n if (period !== this._period || loop !== this._loop) {\n symbol.stopAnimation();\n var delay = delayExpr;\n\n if (isDelayFunc) {\n delay = delayExpr(idx);\n }\n\n if (symbol.__t > 0) {\n delay = -period * symbol.__t;\n }\n\n symbol.__t = 0;\n var animator = symbol.animate('', loop).when(period, {\n __t: 1\n }).delay(delay).during(function () {\n self.updateSymbolPosition(symbol);\n });\n\n if (!loop) {\n animator.done(function () {\n self.remove(symbol);\n });\n }\n\n animator.start();\n }\n\n this._period = period;\n this._loop = loop;\n};\n\neffectLineProto.getLineLength = function (symbol) {\n // Not so accurate\n return vec2.dist(symbol.__p1, symbol.__cp1) + vec2.dist(symbol.__cp1, symbol.__p2);\n};\n\neffectLineProto.updateAnimationPoints = function (symbol, points) {\n symbol.__p1 = points[0];\n symbol.__p2 = points[1];\n symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2];\n};\n\neffectLineProto.updateData = function (lineData, idx, seriesScope) {\n this.childAt(0).updateData(lineData, idx, seriesScope);\n\n this._updateEffectSymbol(lineData, idx);\n};\n\neffectLineProto.updateSymbolPosition = function (symbol) {\n var p1 = symbol.__p1;\n var p2 = symbol.__p2;\n var cp1 = symbol.__cp1;\n var t = symbol.__t;\n var pos = symbol.position;\n var lastPos = [pos[0], pos[1]];\n var quadraticAt = curveUtil.quadraticAt;\n var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt;\n pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t);\n pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); // Tangent\n\n var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t);\n var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t);\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; // enable continuity trail for 'line', 'rect', 'roundRect' symbolType\n\n if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') {\n if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) {\n var scaleY = vec2.dist(lastPos, pos) * 1.05;\n symbol.attr('scale', [symbol.scale[0], scaleY]); // make sure the last segment render within endPoint\n\n if (t === 1) {\n pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2;\n pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2;\n }\n } else if (symbol.__lastT === 1) {\n // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly.\n var scaleY = 2 * vec2.dist(p1, pos);\n symbol.attr('scale', [symbol.scale[0], scaleY]);\n } else {\n symbol.attr('scale', this._symbolScale);\n }\n }\n\n symbol.__lastT = symbol.__t;\n symbol.ignore = false;\n};\n\neffectLineProto.updateLayout = function (lineData, idx) {\n this.childAt(0).updateLayout(lineData, idx);\n var effectModel = lineData.getItemModel(idx).getModel('effect');\n\n this._updateEffectAnimation(lineData, effectModel, idx);\n};\n\nzrUtil.inherits(EffectLine, graphic.Group);\nvar _default = EffectLine;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar selector = require(\"./selector\");\n\nvar throttleUtil = require(\"../../util/throttle\");\n\nvar BrushTargetManager = require(\"../helper/BrushTargetManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar STATE_LIST = ['inBrush', 'outOfBrush'];\nvar DISPATCH_METHOD = '__ecBrushSelect';\nvar DISPATCH_FLAG = '__ecInBrushSelectEvent';\nvar PRIORITY_BRUSH = echarts.PRIORITY.VISUAL.BRUSH;\n/**\n * Layout for visual, the priority higher than other layout, and before brush visual.\n */\n\necharts.registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : {\n brushType: false\n });\n });\n layoutCovers(ecModel);\n});\n\nfunction layoutCovers(ecModel) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel);\n brushTargetManager.setInputRanges(brushModel.areas, ecModel);\n });\n}\n/**\n * Register the visual encoding if this modules required.\n */\n\n\necharts.registerVisual(PRIORITY_BRUSH, function (ecModel, api, payload) {\n var brushSelected = [];\n var throttleType;\n var throttleDelay;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel, brushIndex) {\n var thisBrushSelected = {\n brushId: brushModel.id,\n brushIndex: brushIndex,\n brushName: brushModel.name,\n areas: zrUtil.clone(brushModel.areas),\n selected: []\n }; // Every brush component exists in event params, convenient\n // for user to find by index.\n\n brushSelected.push(thisBrushSelected);\n var brushOption = brushModel.option;\n var brushLink = brushOption.brushLink;\n var linkedSeriesMap = [];\n var selectedDataIndexForLink = [];\n var rangeInfoBySeries = [];\n var hasBrushExists = 0;\n\n if (!brushIndex) {\n // Only the first throttle setting works.\n throttleType = brushOption.throttleType;\n throttleDelay = brushOption.throttleDelay;\n } // Add boundingRect and selectors to range.\n\n\n var areas = zrUtil.map(brushModel.areas, function (area) {\n return bindSelector(zrUtil.defaults({\n boundingRect: boundingRectBuilders[area.brushType](area)\n }, area));\n });\n var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) {\n mappingOption.mappingMethod = 'fixed';\n });\n zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) {\n linkedSeriesMap[seriesIndex] = 1;\n });\n\n function linkOthers(seriesIndex) {\n return brushLink === 'all' || linkedSeriesMap[seriesIndex];\n } // If no supported brush or no brush on the series,\n // all visuals should be in original state.\n\n\n function brushed(rangeInfoList) {\n return !!rangeInfoList.length;\n }\n /**\n * Logic for each series: (If the logic has to be modified one day, do it carefully!)\n *\n * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.\n * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.\n * !brushed┘ └nothing.\n * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.\n */\n // Step A\n\n\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var rangeInfoList = rangeInfoBySeries[seriesIndex] = [];\n seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex, rangeInfoList) : stepAOthers(seriesModel, seriesIndex, rangeInfoList);\n });\n\n function stepAParallel(seriesModel, seriesIndex) {\n var coordSys = seriesModel.coordinateSystem;\n hasBrushExists |= coordSys.hasAxisBrushed();\n linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) {\n activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1);\n });\n }\n\n function stepAOthers(seriesModel, seriesIndex, rangeInfoList) {\n var selectorsByBrushType = getSelectorsByBrushType(seriesModel);\n\n if (!selectorsByBrushType || brushModelNotControll(brushModel, seriesIndex)) {\n return;\n }\n\n zrUtil.each(areas, function (area) {\n selectorsByBrushType[area.brushType] && brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel) && rangeInfoList.push(area);\n hasBrushExists |= brushed(rangeInfoList);\n });\n\n if (linkOthers(seriesIndex) && brushed(rangeInfoList)) {\n var data = seriesModel.getData();\n data.each(function (dataIndex) {\n if (checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex)) {\n selectedDataIndexForLink[dataIndex] = 1;\n }\n });\n }\n } // Step B\n\n\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var seriesBrushSelected = {\n seriesId: seriesModel.id,\n seriesIndex: seriesIndex,\n seriesName: seriesModel.name,\n dataIndex: []\n }; // Every series exists in event params, convenient\n // for user to find series by seriesIndex.\n\n thisBrushSelected.selected.push(seriesBrushSelected);\n var selectorsByBrushType = getSelectorsByBrushType(seriesModel);\n var rangeInfoList = rangeInfoBySeries[seriesIndex];\n var data = seriesModel.getData();\n var getValueState = linkOthers(seriesIndex) ? function (dataIndex) {\n return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n } : function (dataIndex) {\n return checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n }; // If no supported brush or no brush, all visuals are in original state.\n\n (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState);\n });\n });\n dispatchAction(api, throttleType, throttleDelay, brushSelected, payload);\n});\n\nfunction dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) {\n // This event will not be triggered when `setOpion`, otherwise dead lock may\n // triggered when do `setOption` in event listener, which we do not find\n // satisfactory way to solve yet. Some considered resolutions:\n // (a) Diff with prevoius selected data ant only trigger event when changed.\n // But store previous data and diff precisely (i.e., not only by dataIndex, but\n // also detect value changes in selected data) might bring complexity or fragility.\n // (b) Use spectial param like `silent` to suppress event triggering.\n // But such kind of volatile param may be weird in `setOption`.\n if (!payload) {\n return;\n }\n\n var zr = api.getZr();\n\n if (zr[DISPATCH_FLAG]) {\n return;\n }\n\n if (!zr[DISPATCH_METHOD]) {\n zr[DISPATCH_METHOD] = doDispatch;\n }\n\n var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType);\n fn(api, brushSelected);\n}\n\nfunction doDispatch(api, brushSelected) {\n if (!api.isDisposed()) {\n var zr = api.getZr();\n zr[DISPATCH_FLAG] = true;\n api.dispatchAction({\n type: 'brushSelect',\n batch: brushSelected\n });\n zr[DISPATCH_FLAG] = false;\n }\n}\n\nfunction checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) {\n for (var i = 0, len = rangeInfoList.length; i < len; i++) {\n var area = rangeInfoList[i];\n\n if (selectorsByBrushType[area.brushType](dataIndex, data, area.selectors, area)) {\n return true;\n }\n }\n}\n\nfunction getSelectorsByBrushType(seriesModel) {\n var brushSelector = seriesModel.brushSelector;\n\n if (zrUtil.isString(brushSelector)) {\n var sels = [];\n zrUtil.each(selector, function (selectorsByElementType, brushType) {\n sels[brushType] = function (dataIndex, data, selectors, area) {\n var itemLayout = data.getItemLayout(dataIndex);\n return selectorsByElementType[brushSelector](itemLayout, selectors, area);\n };\n });\n return sels;\n } else if (zrUtil.isFunction(brushSelector)) {\n var bSelector = {};\n zrUtil.each(selector, function (sel, brushType) {\n bSelector[brushType] = brushSelector;\n });\n return bSelector;\n }\n\n return brushSelector;\n}\n\nfunction brushModelNotControll(brushModel, seriesIndex) {\n var seriesIndices = brushModel.option.seriesIndex;\n return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices);\n}\n\nfunction bindSelector(area) {\n var selectors = area.selectors = {};\n zrUtil.each(selector[area.brushType], function (selFn, elType) {\n // Do not use function binding or curry for performance.\n selectors[elType] = function (itemLayout) {\n return selFn(itemLayout, selectors, area);\n };\n });\n return area;\n}\n\nvar boundingRectBuilders = {\n lineX: zrUtil.noop,\n lineY: zrUtil.noop,\n rect: function (area) {\n return getBoundingRectFromMinMax(area.range);\n },\n polygon: function (area) {\n var minMax;\n var range = area.range;\n\n for (var i = 0, len = range.length; i < len; i++) {\n minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]];\n var rg = range[i];\n rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]);\n rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]);\n rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]);\n rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]);\n }\n\n return minMax && getBoundingRectFromMinMax(minMax);\n }\n};\n\nfunction getBoundingRectFromMinMax(minMax) {\n return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]);\n}\n\nexports.layoutCovers = layoutCovers;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./effectScatter/EffectScatterSeries\");\n\nrequire(\"./effectScatter/EffectScatterView\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar layoutPoints = require(\"../layout/points\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(visualSymbol('effectScatter', 'circle'));\necharts.registerLayout(layoutPoints('effectScatter'));","'use strict';\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\nmodule.exports = ''.repeat || function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SUPPORTS_Y);\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../../util/model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {Object} finder contains {seriesIndex, dataIndex, dataIndexInside}\n * @param {module:echarts/model/Global} ecModel\n * @return {Object} {point: [x, y], el: ...} point Will not be null.\n */\nfunction _default(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex, true)) || [];\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n\n return {\n point: point,\n el: el\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _labelHelper = require(\"./labelHelper\");\n\nvar getDefaultLabel = _labelHelper.getDefaultLabel;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @module echarts/chart/helper/Symbol\n */\n\n/**\n * @constructor\n * @alias {module:echarts/chart/helper/Symbol}\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @extends {module:zrender/graphic/Group}\n */\nfunction SymbolClz(data, idx, seriesScope) {\n graphic.Group.call(this);\n this.updateData(data, idx, seriesScope);\n}\n\nvar symbolProto = SymbolClz.prototype;\n/**\n * @public\n * @static\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @return {Array.} [width, height]\n */\n\nvar getSymbolSize = SymbolClz.getSymbolSize = function (data, idx) {\n var symbolSize = data.getItemVisual(idx, 'symbolSize');\n return symbolSize instanceof Array ? symbolSize.slice() : [+symbolSize, +symbolSize];\n};\n\nfunction getScale(symbolSize) {\n return [symbolSize[0] / 2, symbolSize[1] / 2];\n}\n\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\n\nsymbolProto._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) {\n // Remove paths created before\n this.removeAll();\n var color = data.getItemVisual(idx, 'color'); // var symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, color, keepAspect);\n symbolPath.attr({\n z2: 100,\n culling: true,\n scale: getScale(symbolSize)\n }); // Rewrite drift method\n\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n};\n/**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n\n\nsymbolProto.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(toLastFrame);\n};\n/**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n\n\nsymbolProto.getSymbolPath = function () {\n return this.childAt(0);\n};\n/**\n * Get scale(aka, current symbol size).\n * Including the change caused by animation\n */\n\n\nsymbolProto.getScale = function () {\n return this.childAt(0).scale;\n};\n/**\n * Highlight symbol\n */\n\n\nsymbolProto.highlight = function () {\n this.childAt(0).trigger('emphasis');\n};\n/**\n * Downplay symbol\n */\n\n\nsymbolProto.downplay = function () {\n this.childAt(0).trigger('normal');\n};\n/**\n * @param {number} zlevel\n * @param {number} z\n */\n\n\nsymbolProto.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n};\n\nsymbolProto.setDraggable = function (draggable) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = draggable ? 'move' : symbolPath.cursor;\n};\n/**\n * Update symbol properties\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @param {Object} [seriesScope]\n * @param {Object} [seriesScope.itemStyle]\n * @param {Object} [seriesScope.hoverItemStyle]\n * @param {Object} [seriesScope.symbolRotate]\n * @param {Object} [seriesScope.symbolOffset]\n * @param {module:echarts/model/Model} [seriesScope.labelModel]\n * @param {module:echarts/model/Model} [seriesScope.hoverLabelModel]\n * @param {boolean} [seriesScope.hoverAnimation]\n * @param {Object} [seriesScope.cursorStyle]\n * @param {module:echarts/model/Model} [seriesScope.itemModel]\n * @param {string} [seriesScope.symbolInnerColor]\n * @param {Object} [seriesScope.fadeIn=false]\n */\n\n\nsymbolProto.updateData = function (data, idx, seriesScope) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = getSymbolSize(data, idx);\n var isInit = symbolType !== this._symbolType;\n\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n\n this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n graphic.updateProps(symbolPath, {\n scale: getScale(symbolSize)\n }, seriesModel, idx);\n }\n\n this._updateCommon(data, idx, symbolSize, seriesScope);\n\n if (isInit) {\n var symbolPath = this.childAt(0);\n var fadeIn = seriesScope && seriesScope.fadeIn;\n var target = {\n scale: symbolPath.scale.slice()\n };\n fadeIn && (target.style = {\n opacity: symbolPath.style.opacity\n });\n symbolPath.scale = [0, 0];\n fadeIn && (symbolPath.style.opacity = 0);\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n\n this._seriesModel = seriesModel;\n}; // Update common properties\n\n\nvar normalStyleAccessPath = ['itemStyle'];\nvar emphasisStyleAccessPath = ['emphasis', 'itemStyle'];\nvar normalLabelAccessPath = ['label'];\nvar emphasisLabelAccessPath = ['emphasis', 'label'];\n/**\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @param {Array.} symbolSize\n * @param {Object} [seriesScope]\n */\n\nsymbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var color = data.getItemVisual(idx, 'color'); // Reset style\n\n if (symbolPath.type !== 'image') {\n symbolPath.useStyle({\n strokeNoScale: true\n });\n } else {\n symbolPath.setStyle({\n opacity: null,\n shadowBlur: null,\n shadowOffsetX: null,\n shadowOffsetY: null,\n shadowColor: null\n });\n }\n\n var itemStyle = seriesScope && seriesScope.itemStyle;\n var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;\n var symbolOffset = seriesScope && seriesScope.symbolOffset;\n var labelModel = seriesScope && seriesScope.labelModel;\n var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;\n var hoverAnimation = seriesScope && seriesScope.hoverAnimation;\n var cursorStyle = seriesScope && seriesScope.cursorStyle;\n\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx); // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);\n hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();\n symbolOffset = itemModel.getShallow('symbolOffset');\n labelModel = itemModel.getModel(normalLabelAccessPath);\n hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath);\n hoverAnimation = itemModel.getShallow('hoverAnimation');\n cursorStyle = itemModel.getShallow('cursor');\n } else {\n hoverItemStyle = zrUtil.extend({}, hoverItemStyle);\n }\n\n var elStyle = symbolPath.style;\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n\n if (symbolOffset) {\n symbolPath.attr('position', [parsePercent(symbolOffset[0], symbolSize[0]), parsePercent(symbolOffset[1], symbolSize[1])]);\n }\n\n cursorStyle && symbolPath.attr('cursor', cursorStyle); // PENDING setColor before setStyle!!!\n\n symbolPath.setColor(color, seriesScope && seriesScope.symbolInnerColor);\n symbolPath.setStyle(itemStyle);\n var opacity = data.getItemVisual(idx, 'opacity');\n\n if (opacity != null) {\n elStyle.opacity = opacity;\n }\n\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = symbolPath.__z2Origin;\n\n if (liftZ != null) {\n if (z2Origin == null) {\n symbolPath.__z2Origin = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n symbolPath.__z2Origin = null;\n }\n\n var useNameLabel = seriesScope && seriesScope.useNameLabel;\n graphic.setLabelStyle(elStyle, hoverItemStyle, labelModel, hoverLabelModel, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n isRectText: true,\n autoColor: color\n }); // Do not execute util needed.\n\n function getLabelDefaultText(idx, opt) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n\n symbolPath.__symbolOriginalScale = getScale(symbolSize);\n symbolPath.hoverStyle = hoverItemStyle;\n symbolPath.highDownOnUpdate = hoverAnimation && seriesModel.isAnimationEnabled() ? highDownOnUpdate : null;\n graphic.setHoverStyle(symbolPath);\n};\n\nfunction highDownOnUpdate(fromState, toState) {\n // Do not support this hover animation util some scenario required.\n // Animation can only be supported in hover layer when using `el.incremetal`.\n if (this.incremental || this.useHoverLayer) {\n return;\n }\n\n if (toState === 'emphasis') {\n var scale = this.__symbolOriginalScale;\n var ratio = scale[1] / scale[0];\n var emphasisOpt = {\n scale: [Math.max(scale[0] * 1.1, scale[0] + 3), Math.max(scale[1] * 1.1, scale[1] + 3 * ratio)]\n }; // FIXME\n // modify it after support stop specified animation.\n // toState === fromState\n // ? (this.stopAnimation(), this.attr(emphasisOpt))\n\n this.animateTo(emphasisOpt, 400, 'elasticOut');\n } else if (toState === 'normal') {\n this.animateTo({\n scale: this.__symbolOriginalScale\n }, 400, 'elasticOut');\n }\n}\n/**\n * @param {Function} cb\n * @param {Object} [opt]\n * @param {Object} [opt.keepLabel=true]\n */\n\n\nsymbolProto.fadeOut = function (cb, opt) {\n var symbolPath = this.childAt(0); // Avoid mistaken hover when fading out\n\n this.silent = symbolPath.silent = true; // Not show text when animating\n\n !(opt && opt.keepLabel) && (symbolPath.style.text = null);\n graphic.updateProps(symbolPath, {\n style: {\n opacity: 0\n },\n scale: [0, 0]\n }, this._seriesModel, this.dataIndex, cb);\n};\n\nzrUtil.inherits(SymbolClz, graphic.Group);\nvar _default = SymbolClz;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar symbolUtil = require(\"../../util/symbol\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n\n return symbolSize;\n}\n\nvar _default = echarts.extendChartView({\n type: 'radar',\n render: function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n\n function createSymbol(data, idx) {\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var color = data.getItemVisual(idx, 'color');\n\n if (symbolType === 'none') {\n return;\n }\n\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2, color);\n symbolPath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 100,\n scale: [symbolSize[0] / 2, symbolSize[1] / 2]\n });\n return symbolPath;\n }\n\n function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) {\n // Simply rerender all\n symbolGroup.removeAll();\n\n for (var i = 0; i < newPoints.length - 1; i++) {\n var symbolPath = createSymbol(data, idx);\n\n if (symbolPath) {\n symbolPath.__dimIdx = i;\n\n if (oldPoints[i]) {\n symbolPath.attr('position', oldPoints[i]);\n graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, {\n position: newPoints[i]\n }, seriesModel, idx);\n } else {\n symbolPath.attr('position', newPoints[i]);\n }\n\n symbolGroup.add(symbolPath);\n }\n }\n }\n\n function getInitialPoints(points) {\n return zrUtil.map(points, function (pt) {\n return [polar.cx, polar.cy];\n });\n }\n\n data.diff(oldData).add(function (idx) {\n var points = data.getItemLayout(idx);\n\n if (!points) {\n return;\n }\n\n var polygon = new graphic.Polygon();\n var polyline = new graphic.Polyline();\n var target = {\n shape: {\n points: points\n }\n };\n polygon.shape.points = getInitialPoints(points);\n polyline.shape.points = getInitialPoints(points);\n graphic.initProps(polygon, target, seriesModel, idx);\n graphic.initProps(polyline, target, seriesModel, idx);\n var itemGroup = new graphic.Group();\n var symbolGroup = new graphic.Group();\n itemGroup.add(polyline);\n itemGroup.add(polygon);\n itemGroup.add(symbolGroup);\n updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true);\n data.setItemGraphicEl(idx, itemGroup);\n }).update(function (newIdx, oldIdx) {\n var itemGroup = oldData.getItemGraphicEl(oldIdx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var target = {\n shape: {\n points: data.getItemLayout(newIdx)\n }\n };\n\n if (!target.shape.points) {\n return;\n }\n\n updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false);\n graphic.updateProps(polyline, target, seriesModel);\n graphic.updateProps(polygon, target, seriesModel);\n data.setItemGraphicEl(newIdx, itemGroup);\n }).remove(function (idx) {\n group.remove(oldData.getItemGraphicEl(idx));\n }).execute();\n data.eachItemGraphicEl(function (itemGroup, idx) {\n var itemModel = data.getItemModel(idx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var color = data.getItemVisual(idx, 'color');\n group.add(itemGroup);\n polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), {\n fill: 'none',\n stroke: color\n }));\n polyline.hoverStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n var areaStyleModel = itemModel.getModel('areaStyle');\n var hoverAreaStyleModel = itemModel.getModel('emphasis.areaStyle');\n var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty();\n var hoverPolygonIgnore = hoverAreaStyleModel.isEmpty() && hoverAreaStyleModel.parentModel.isEmpty();\n hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore;\n polygon.ignore = polygonIgnore;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: color,\n opacity: 0.7\n }));\n polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle();\n var itemStyle = itemModel.getModel('itemStyle').getItemStyle(['color']);\n var itemHoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n symbolGroup.eachChild(function (symbolPath) {\n symbolPath.setStyle(itemStyle);\n symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle);\n var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx);\n (defaultText == null || isNaN(defaultText)) && (defaultText = '');\n graphic.setLabelStyle(symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel, {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n labelDimIndex: symbolPath.__dimIdx,\n defaultText: defaultText,\n autoColor: color,\n isRectText: true\n });\n });\n\n itemGroup.highDownOnUpdate = function (fromState, toState) {\n polygon.attr('ignore', toState === 'emphasis' ? hoverPolygonIgnore : polygonIgnore);\n };\n\n graphic.setHoverStyle(itemGroup);\n });\n this._data = data;\n },\n remove: function () {\n this.group.removeAll();\n this._data = null;\n },\n dispose: function () {}\n});\n\nmodule.exports = _default;","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar AxisBuilder = require(\"./AxisBuilder\");\n\nvar AxisView = require(\"./AxisView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine'];\n\nvar _default = AxisView.extend({\n type: 'radiusAxis',\n axisPointerClass: 'PolarAxisPointer',\n render: function (radiusAxisModel, ecModel) {\n this.group.removeAll();\n\n if (!radiusAxisModel.get('show')) {\n return;\n }\n\n var radiusAxis = radiusAxisModel.axis;\n var polar = radiusAxis.polar;\n var angleAxis = polar.getAngleAxis();\n var ticksCoords = radiusAxis.getTicksCoords();\n var minorTicksCoords = radiusAxis.getMinorTicksCoords();\n var axisAngle = angleAxis.getExtent()[0];\n var radiusExtent = radiusAxis.getExtent();\n var layout = layoutAxis(polar, radiusAxisModel, axisAngle);\n var axisBuilder = new AxisBuilder(radiusAxisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this.group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (radiusAxisModel.get(name + '.show') && !radiusAxis.scale.isBlank()) {\n this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);\n }\n }, this);\n },\n\n /**\n * @private\n */\n _splitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n var splitLineModel = radiusAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n\n for (var i = 0; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: ticksCoords[i].coord\n }\n }));\n } // Simple optimization\n // Batching the lines if color are the same\n\n\n for (var i = 0; i < splitLines.length; i++) {\n this.group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length],\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n }\n },\n\n /**\n * @private\n */\n _minorSplitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {\n if (!minorTicksCoords.length) {\n return;\n }\n\n var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n lines.push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: minorTicksCoords[i][k].coord\n }\n }));\n }\n }\n\n this.group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults({\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n },\n\n /**\n * @private\n */\n _splitArea: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n if (!ticksCoords.length) {\n return;\n }\n\n var splitAreaModel = radiusAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var prevRadius = ticksCoords[0].coord;\n\n for (var i = 1; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: prevRadius,\n r: ticksCoords[i].coord,\n startAngle: 0,\n endAngle: Math.PI * 2\n },\n silent: true\n }));\n prevRadius = ticksCoords[i].coord;\n } // Simple optimization\n // Batching the lines if color are the same\n\n\n for (var i = 0; i < splitAreas.length; i++) {\n this.group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n});\n/**\n * @inner\n */\n\n\nfunction layoutAxis(polar, radiusAxisModel, axisAngle) {\n return {\n position: [polar.cx, polar.cy],\n rotation: axisAngle / 180 * Math.PI,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1,\n labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'),\n // Over splitLine and splitArea\n z2: 1\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar createListFromArray = require(\"./chart/helper/createListFromArray\");\n\nvar axisHelper = require(\"./coord/axisHelper\");\n\nvar axisModelCommonMixin = require(\"./coord/axisModelCommonMixin\");\n\nvar Model = require(\"./model/Model\");\n\nvar _layout = require(\"./util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\nexports.getLayoutRect = _layout.getLayoutRect;\n\nvar _dataStackHelper = require(\"./data/helper/dataStackHelper\");\n\nvar enableDataStack = _dataStackHelper.enableDataStack;\nvar isDimensionStacked = _dataStackHelper.isDimensionStacked;\nvar getStackedDimension = _dataStackHelper.getStackedDimension;\n\nvar _completeDimensions = require(\"./data/helper/completeDimensions\");\n\nexports.completeDimensions = _completeDimensions;\n\nvar _createDimensions = require(\"./data/helper/createDimensions\");\n\nexports.createDimensions = _createDimensions;\n\nvar _symbol = require(\"./util/symbol\");\n\nexports.createSymbol = _symbol.createSymbol;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge';\n\n/**\n * Create a muti dimension List structure from seriesModel.\n * @param {module:echarts/model/Model} seriesModel\n * @return {module:echarts/data/List} list\n */\nfunction createList(seriesModel) {\n return createListFromArray(seriesModel.getSource(), seriesModel);\n} // export function createGraph(seriesModel) {\n// var nodes = seriesModel.get('data');\n// var links = seriesModel.get('links');\n// return createGraphFromNodeEdge(nodes, links, seriesModel);\n// }\n\n\nvar dataStack = {\n isDimensionStacked: isDimensionStacked,\n enableDataStack: enableDataStack,\n getStackedDimension: getStackedDimension\n};\n/**\n * Create a symbol element with given symbol configuration: shape, x, y, width, height, color\n * @param {string} symbolDesc\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {string} color\n */\n\n/**\n * Create scale\n * @param {Array.} dataExtent\n * @param {Object|module:echarts/Model} option\n */\nfunction createScale(dataExtent, option) {\n var axisModel = option;\n\n if (!Model.isInstance(option)) {\n axisModel = new Model(option);\n zrUtil.mixin(axisModel, axisModelCommonMixin);\n }\n\n var scale = axisHelper.createScaleByModel(axisModel);\n scale.setExtent(dataExtent[0], dataExtent[1]);\n axisHelper.niceScaleExtent(scale, axisModel);\n return scale;\n}\n/**\n * Mixin common methods to axis model,\n *\n * Inlcude methods\n * `getFormattedLabels() => Array.`\n * `getCategories() => Array.`\n * `getMin(origin: boolean) => number`\n * `getMax(origin: boolean) => number`\n * `getNeedCrossZero() => boolean`\n * `setRange(start: number, end: number)`\n * `resetRange()`\n */\n\n\nfunction mixinAxisModelCommonMethods(Model) {\n zrUtil.mixin(Model, axisModelCommonMixin);\n}\n\nexports.createList = createList;\nexports.dataStack = dataStack;\nexports.createScale = createScale;\nexports.mixinAxisModelCommonMethods = mixinAxisModelCommonMethods;","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./scatter/ScatterSeries\");\n\nrequire(\"./scatter/ScatterView\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar layoutPoints = require(\"../layout/points\");\n\nrequire(\"../component/gridSimple\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// import * as zrUtil from 'zrender/src/core/util';\n// In case developer forget to include grid component\necharts.registerVisual(visualSymbol('scatter', 'circle'));\necharts.registerLayout(layoutPoints('scatter')); // echarts.registerProcessor(function (ecModel, api) {\n// ecModel.eachSeriesByType('scatter', function (seriesModel) {\n// var data = seriesModel.getData();\n// var coordSys = seriesModel.coordinateSystem;\n// if (coordSys.type !== 'geo') {\n// return;\n// }\n// var startPt = coordSys.pointToData([0, 0]);\n// var endPt = coordSys.pointToData([api.getWidth(), api.getHeight()]);\n// var dims = zrUtil.map(coordSys.dimensions, function (dim) {\n// return data.mapDimension(dim);\n// });\n// var range = {};\n// range[dims[0]] = [Math.min(startPt[0], endPt[0]), Math.max(startPt[0], endPt[0])];\n// range[dims[1]] = [Math.min(startPt[1], endPt[1]), Math.max(startPt[1], endPt[1])];\n// data.selectRange(range);\n// });\n// });","/**\n * 3x2矩阵操作类\n * @exports zrender/tool/matrix\n */\n\n/* global Float32Array */\nvar ArrayCtor = typeof Float32Array === 'undefined' ? Array : Float32Array;\n/**\n * Create a identity matrix.\n * @return {Float32Array|Array.}\n */\n\nfunction create() {\n var out = new ArrayCtor(6);\n identity(out);\n return out;\n}\n/**\n * 设置矩阵为单位矩阵\n * @param {Float32Array|Array.} out\n */\n\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * 复制矩阵\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} m\n */\n\n\nfunction copy(out, m) {\n out[0] = m[0];\n out[1] = m[1];\n out[2] = m[2];\n out[3] = m[3];\n out[4] = m[4];\n out[5] = m[5];\n return out;\n}\n/**\n * 矩阵相乘\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} m1\n * @param {Float32Array|Array.} m2\n */\n\n\nfunction mul(out, m1, m2) {\n // Consider matrix.mul(m, m2, m);\n // where out is the same as m2.\n // So use temp variable to escape error.\n var out0 = m1[0] * m2[0] + m1[2] * m2[1];\n var out1 = m1[1] * m2[0] + m1[3] * m2[1];\n var out2 = m1[0] * m2[2] + m1[2] * m2[3];\n var out3 = m1[1] * m2[2] + m1[3] * m2[3];\n var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4];\n var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5];\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = out3;\n out[4] = out4;\n out[5] = out5;\n return out;\n}\n/**\n * 平移变换\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n * @param {Float32Array|Array.} v\n */\n\n\nfunction translate(out, a, v) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4] + v[0];\n out[5] = a[5] + v[1];\n return out;\n}\n/**\n * 旋转变换\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n * @param {number} rad\n */\n\n\nfunction rotate(out, a, rad) {\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var st = Math.sin(rad);\n var ct = Math.cos(rad);\n out[0] = aa * ct + ab * st;\n out[1] = -aa * st + ab * ct;\n out[2] = ac * ct + ad * st;\n out[3] = -ac * st + ct * ad;\n out[4] = ct * atx + st * aty;\n out[5] = ct * aty - st * atx;\n return out;\n}\n/**\n * 缩放变换\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n * @param {Float32Array|Array.} v\n */\n\n\nfunction scale(out, a, v) {\n var vx = v[0];\n var vy = v[1];\n out[0] = a[0] * vx;\n out[1] = a[1] * vy;\n out[2] = a[2] * vx;\n out[3] = a[3] * vy;\n out[4] = a[4] * vx;\n out[5] = a[5] * vy;\n return out;\n}\n/**\n * 求逆矩阵\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n */\n\n\nfunction invert(out, a) {\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var det = aa * ad - ab * ac;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n/**\n * Clone a new matrix.\n * @param {Float32Array|Array.} a\n */\n\n\nfunction clone(a) {\n var b = create();\n copy(b, a);\n return b;\n}\n\nexports.create = create;\nexports.identity = identity;\nexports.copy = copy;\nexports.mul = mul;\nexports.translate = translate;\nexports.rotate = rotate;\nexports.scale = scale;\nexports.invert = invert;\nexports.clone = clone;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar axisDefault = require(\"../axisDefault\");\n\nvar Model = require(\"../../model/Model\");\n\nvar axisModelCommonMixin = require(\"../axisModelCommonMixin\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar valueAxisDefault = axisDefault.valueAxis;\n\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\n\nvar RadarModel = echarts.extendComponentModel({\n type: 'radar',\n optionUpdated: function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n var axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('name');\n var showName = this.get('name.show');\n var nameFormatter = this.get('name.formatter');\n var nameGap = this.get('nameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n\n var iNameTextStyle = nameTextStyle;\n\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n } // Use same configuration\n\n\n indicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n\n if (!showName) {\n indicatorOpt.name = '';\n }\n\n if (typeof nameFormatter === 'string') {\n var indName = indicatorOpt.name;\n indicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (typeof nameFormatter === 'function') {\n indicatorOpt.name = nameFormatter(indicatorOpt.name, indicatorOpt);\n }\n\n var model = zrUtil.extend(new Model(indicatorOpt, null, this.ecModel), axisModelCommonMixin); // For triggerEvent.\n\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n\n this.getIndicatorModels = function () {\n return indicatorModels;\n };\n },\n defaultOption: {\n zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '75%',\n startAngle: 90,\n name: {\n show: true // formatter: null\n // textStyle: {}\n\n },\n boundaryGap: [0, 0],\n splitNumber: 5,\n nameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: '#bbb'\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n axisType: 'interval',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n }\n});\nvar _default = RadarModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n //'北京': [-10, 0],\n '天津': [5, 5]\n};\n\nfunction _default(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n\n if (coordFix) {\n var cp = region.center;\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n }\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar BaseBarSeries = require(\"./BaseBarSeries\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = BaseBarSeries.extend({\n type: 'series.bar',\n dependencies: ['grid', 'polar'],\n brushSelector: 'rect',\n\n /**\n * @override\n */\n getProgressive: function () {\n // Do not support progressive in normal mode.\n return this.get('large') ? this.get('progressive') : false;\n },\n\n /**\n * @override\n */\n getProgressiveThreshold: function () {\n // Do not support progressive in normal mode.\n var progressiveThreshold = this.get('progressiveThreshold');\n var largeThreshold = this.get('largeThreshold');\n\n if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n\n return progressiveThreshold;\n },\n defaultOption: {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n // If use caps on two sides of bars\n // Only available on tangential polar bar\n roundCap: false,\n showBackground: false,\n backgroundStyle: {\n color: 'rgba(180, 180, 180, 0.2)',\n borderColor: null,\n borderWidth: 0,\n borderType: 'solid',\n borderRadius: 0,\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n }\n }\n});\n\nmodule.exports = _default;","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\nmodule.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar inner = makeInner();\nvar each = zrUtil.each;\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.} point\n */\n\nfunction register(key, api, handler) {\n if (env.node) {\n return;\n }\n\n var zr = api.getZr();\n inner(zr).records || (inner(zr).records = {});\n initGlobalListeners(zr, api);\n var record = inner(zr).records[key] || (inner(zr).records[key] = {});\n record.handler = handler;\n}\n\nfunction initGlobalListeners(zr, api) {\n if (inner(zr).initialized) {\n return;\n }\n\n inner(zr).initialized = true;\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove')); // useHandler('mouseout', onLeave);\n\n useHandler('globalout', onLeave);\n\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\n dispatchTooltipFinally(dis.pendings, api);\n });\n }\n}\n\nfunction dispatchTooltipFinally(pendings, api) {\n var showLen = pendings.showTip.length;\n var hideLen = pendings.hideTip.length;\n var actuallyPayload;\n\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n } else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\n }\n\n if (actuallyPayload) {\n actuallyPayload.dispatchAction = null;\n api.dispatchAction(actuallyPayload);\n }\n}\n\nfunction onLeave(record, e, dispatchAction) {\n record.handler('leave', null, dispatchAction);\n}\n\nfunction doEnter(currTrigger, record, e, dispatchAction) {\n record.handler(currTrigger, e, dispatchAction);\n}\n\nfunction makeDispatchAction(api) {\n var pendings = {\n showTip: [],\n hideTip: []\n }; // FIXME\n // better approach?\n // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip,\n // which may be conflict, (axisPointer call showTip but tooltip call hideTip);\n // So we have to add \"final stage\" to merge those dispatched actions.\n\n var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n\n if (pendingList) {\n pendingList.push(payload);\n } else {\n payload.dispatchAction = dispatchAction;\n api.dispatchAction(payload);\n }\n };\n\n return {\n dispatchAction: dispatchAction,\n pendings: pendings\n };\n}\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n */\n\n\nfunction unregister(key, api) {\n if (env.node) {\n return;\n }\n\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n\n if (record) {\n inner(zr).records[key] = null;\n }\n}\n\nexports.register = register;\nexports.unregister = unregister;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Scale = require(\"./Scale\");\n\nvar OrdinalMeta = require(\"../data/OrdinalMeta\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Linear continuous scale\n * @module echarts/coord/scale/Ordinal\n *\n * http://en.wikipedia.org/wiki/Level_of_measurement\n */\n// FIXME only one data\nvar scaleProto = Scale.prototype;\nvar OrdinalScale = Scale.extend({\n type: 'ordinal',\n\n /**\n * @param {module:echarts/data/OrdianlMeta|Array.} ordinalMeta\n */\n init: function (ordinalMeta, extent) {\n // Caution: Should not use instanceof, consider ec-extensions using\n // import approach to get OrdinalMeta class.\n if (!ordinalMeta || zrUtil.isArray(ordinalMeta)) {\n ordinalMeta = new OrdinalMeta({\n categories: ordinalMeta\n });\n }\n\n this._ordinalMeta = ordinalMeta;\n this._extent = extent || [0, ordinalMeta.categories.length - 1];\n },\n parse: function (val) {\n return typeof val === 'string' ? this._ordinalMeta.getOrdinal(val) // val might be float.\n : Math.round(val);\n },\n contain: function (rank) {\n rank = this.parse(rank);\n return scaleProto.contain.call(this, rank) && this._ordinalMeta.categories[rank] != null;\n },\n\n /**\n * Normalize given rank or name to linear [0, 1]\n * @param {number|string} [val]\n * @return {number}\n */\n normalize: function (val) {\n return scaleProto.normalize.call(this, this.parse(val));\n },\n scale: function (val) {\n return Math.round(scaleProto.scale.call(this, val));\n },\n\n /**\n * @return {Array}\n */\n getTicks: function () {\n var ticks = [];\n var extent = this._extent;\n var rank = extent[0];\n\n while (rank <= extent[1]) {\n ticks.push(rank);\n rank++;\n }\n\n return ticks;\n },\n\n /**\n * Get item on rank n\n * @param {number} n\n * @return {string}\n */\n getLabel: function (n) {\n if (!this.isBlank()) {\n // Note that if no data, ordinalMeta.categories is an empty array.\n return this._ordinalMeta.categories[n];\n }\n },\n\n /**\n * @return {number}\n */\n count: function () {\n return this._extent[1] - this._extent[0] + 1;\n },\n\n /**\n * @override\n */\n unionExtentFromData: function (data, dim) {\n this.unionExtent(data.getApproximateExtent(dim));\n },\n getOrdinalMeta: function () {\n return this._ordinalMeta;\n },\n niceTicks: zrUtil.noop,\n niceExtent: zrUtil.noop\n});\n/**\n * @return {module:echarts/scale/Time}\n */\n\nOrdinalScale.create = function () {\n return new OrdinalScale();\n};\n\nvar _default = OrdinalScale;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar MarkerModel = require(\"./MarkerModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = MarkerModel.extend({\n type: 'markLine',\n defaultOption: {\n zlevel: 0,\n z: 5,\n symbol: ['circle', 'arrow'],\n symbolSize: [8, 16],\n //symbolRotate: 0,\n precision: 2,\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'end',\n distance: 5\n },\n lineStyle: {\n type: 'dashed'\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n width: 3\n }\n },\n animationEasing: 'linear'\n }\n});\n\nmodule.exports = _default;","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ChartView = require(\"../../view/Chart\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\nvar _createClipPathFromCoordSys = require(\"../helper/createClipPathFromCoordSys\");\n\nvar createClipPath = _createClipPathFromCoordSys.createClipPath;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar NORMAL_ITEM_STYLE_PATH = ['itemStyle'];\nvar EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle'];\nvar SKIP_PROPS = ['color', 'color0', 'borderColor', 'borderColor0'];\nvar CandlestickView = ChartView.extend({\n type: 'candlestick',\n render: function (seriesModel, ecModel, api) {\n // If there is clipPath created in large mode. Remove it.\n this.group.removeClipPath();\n\n this._updateDrawMode(seriesModel);\n\n this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._clear();\n\n this._updateDrawMode(seriesModel);\n },\n incrementalRender: function (params, seriesModel, ecModel, api) {\n this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);\n },\n _updateDrawMode: function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n\n if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n\n this._clear();\n }\n },\n _renderNormal: function (seriesModel) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var isSimpleBox = data.getLayout('isSimpleBox');\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n\n if (!this._data) {\n group.removeAll();\n }\n\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var el;\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n return;\n }\n\n el = createNormalBox(itemLayout, newIdx, true);\n graphic.initProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx); // Empty data\n\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n } else {\n graphic.updateProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n }\n\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n },\n _renderLarge: function (seriesModel) {\n this._clear();\n\n createLarge(seriesModel, this.group);\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n },\n _incrementalRenderNormal: function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var el;\n var itemLayout = data.getItemLayout(dataIndex);\n el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n el.incremental = true;\n this.group.add(el);\n }\n },\n _incrementalRenderLarge: function (params, seriesModel) {\n createLarge(seriesModel, this.group, true);\n },\n remove: function (ecModel) {\n this._clear();\n },\n _clear: function () {\n this.group.removeAll();\n this._data = null;\n },\n dispose: zrUtil.noop\n});\nvar NormalBoxPath = Path.extend({\n type: 'normalCandlestickBox',\n shape: {},\n buildPath: function (ctx, shape) {\n var ends = shape.points;\n\n if (this.__simpleBox) {\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[6][0], ends[6][1]);\n } else {\n ctx.moveTo(ends[0][0], ends[0][1]);\n ctx.lineTo(ends[1][0], ends[1][1]);\n ctx.lineTo(ends[2][0], ends[2][1]);\n ctx.lineTo(ends[3][0], ends[3][1]);\n ctx.closePath();\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[5][0], ends[5][1]);\n ctx.moveTo(ends[6][0], ends[6][1]);\n ctx.lineTo(ends[7][0], ends[7][1]);\n }\n }\n});\n\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit ? transInit(ends, itemLayout) : ends\n },\n z2: 100\n });\n}\n\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\n\n for (var i = 0; i < itemLayout.ends.length; i++) {\n // If any point are in the region.\n if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) {\n clipped = false;\n break;\n }\n }\n\n return clipped;\n}\n\nfunction setBoxCommon(el, data, dataIndex, isSimpleBox) {\n var itemModel = data.getItemModel(dataIndex);\n var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH);\n var color = data.getItemVisual(dataIndex, 'color');\n var borderColor = data.getItemVisual(dataIndex, 'borderColor') || color; // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n var itemStyle = normalItemStyleModel.getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.strokeNoScale = true;\n el.style.fill = color;\n el.style.stroke = borderColor;\n el.__simpleBox = isSimpleBox;\n var hoverStyle = itemModel.getModel(EMPHASIS_ITEM_STYLE_PATH).getItemStyle();\n graphic.setHoverStyle(el, hoverStyle);\n}\n\nfunction transInit(points, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[1] = itemLayout.initBaseline;\n return point;\n });\n}\n\nvar LargeBoxPath = Path.extend({\n type: 'largeCandlestickBox',\n shape: {},\n buildPath: function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n\n for (var i = 0; i < points.length;) {\n if (this.__sign === points[i++]) {\n var x = points[i++];\n ctx.moveTo(x, points[i++]);\n ctx.lineTo(x, points[i++]);\n } else {\n i += 3;\n }\n }\n }\n});\n\nfunction createLarge(seriesModel, group, incremental) {\n var data = seriesModel.getData();\n var largePoints = data.getLayout('largePoints');\n var elP = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 1\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: -1\n });\n group.add(elN);\n setLargeStyle(1, elP, seriesModel, data);\n setLargeStyle(-1, elN, seriesModel, data);\n\n if (incremental) {\n elP.incremental = true;\n elN.incremental = true;\n }\n}\n\nfunction setLargeStyle(sign, el, seriesModel, data) {\n var suffix = sign > 0 ? 'P' : 'N';\n var borderColor = data.getVisual('borderColor' + suffix) || data.getVisual('color' + suffix); // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n var itemStyle = seriesModel.getModel(NORMAL_ITEM_STYLE_PATH).getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor; // No different\n // el.style.lineWidth = .5;\n}\n\nvar _default = CandlestickView;\nmodule.exports = _default;","var zrUtil = require(\"../core/util\");\n\nvar Style = require(\"./Style\");\n\nvar Element = require(\"../Element\");\n\nvar RectText = require(\"./mixin/RectText\");\n\n/**\n * Base class of all displayable graphic objects\n * @module zrender/graphic/Displayable\n */\n\n/**\n * @alias module:zrender/graphic/Displayable\n * @extends module:zrender/Element\n * @extends module:zrender/graphic/mixin/RectText\n */\nfunction Displayable(opts) {\n opts = opts || {};\n Element.call(this, opts); // Extend properties\n\n for (var name in opts) {\n if (opts.hasOwnProperty(name) && name !== 'style') {\n this[name] = opts[name];\n }\n }\n /**\n * @type {module:zrender/graphic/Style}\n */\n\n\n this.style = new Style(opts.style, this);\n this._rect = null; // Shapes for cascade clipping.\n // Can only be `null`/`undefined` or an non-empty array, MUST NOT be an empty array.\n // because it is easy to only using null to check whether clipPaths changed.\n\n this.__clipPaths = null; // FIXME Stateful must be mixined after style is setted\n // Stateful.call(this, opts);\n}\n\nDisplayable.prototype = {\n constructor: Displayable,\n type: 'displayable',\n\n /**\n * Dirty flag. From which painter will determine if this displayable object needs brush.\n * @name module:zrender/graphic/Displayable#__dirty\n * @type {boolean}\n */\n __dirty: true,\n\n /**\n * Whether the displayable object is visible. when it is true, the displayable object\n * is not drawn, but the mouse event can still trigger the object.\n * @name module:/zrender/graphic/Displayable#invisible\n * @type {boolean}\n * @default false\n */\n invisible: false,\n\n /**\n * @name module:/zrender/graphic/Displayable#z\n * @type {number}\n * @default 0\n */\n z: 0,\n\n /**\n * @name module:/zrender/graphic/Displayable#z\n * @type {number}\n * @default 0\n */\n z2: 0,\n\n /**\n * The z level determines the displayable object can be drawn in which layer canvas.\n * @name module:/zrender/graphic/Displayable#zlevel\n * @type {number}\n * @default 0\n */\n zlevel: 0,\n\n /**\n * Whether it can be dragged.\n * @name module:/zrender/graphic/Displayable#draggable\n * @type {boolean}\n * @default false\n */\n draggable: false,\n\n /**\n * Whether is it dragging.\n * @name module:/zrender/graphic/Displayable#draggable\n * @type {boolean}\n * @default false\n */\n dragging: false,\n\n /**\n * Whether to respond to mouse events.\n * @name module:/zrender/graphic/Displayable#silent\n * @type {boolean}\n * @default false\n */\n silent: false,\n\n /**\n * If enable culling\n * @type {boolean}\n * @default false\n */\n culling: false,\n\n /**\n * Mouse cursor when hovered\n * @name module:/zrender/graphic/Displayable#cursor\n * @type {string}\n */\n cursor: 'pointer',\n\n /**\n * If hover area is bounding rect\n * @name module:/zrender/graphic/Displayable#rectHover\n * @type {string}\n */\n rectHover: false,\n\n /**\n * Render the element progressively when the value >= 0,\n * usefull for large data.\n * @type {boolean}\n */\n progressive: false,\n\n /**\n * @type {boolean}\n */\n incremental: false,\n\n /**\n * Scale ratio for global scale.\n * @type {boolean}\n */\n globalScaleRatio: 1,\n beforeBrush: function (ctx) {},\n afterBrush: function (ctx) {},\n\n /**\n * Graphic drawing method.\n * @param {CanvasRenderingContext2D} ctx\n */\n // Interface\n brush: function (ctx, prevEl) {},\n\n /**\n * Get the minimum bounding box.\n * @return {module:zrender/core/BoundingRect}\n */\n // Interface\n getBoundingRect: function () {},\n\n /**\n * If displayable element contain coord x, y\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\n contain: function (x, y) {\n return this.rectContain(x, y);\n },\n\n /**\n * @param {Function} cb\n * @param {} context\n */\n traverse: function (cb, context) {\n cb.call(context, this);\n },\n\n /**\n * If bounding rect of element contain coord x, y\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\n rectContain: function (x, y) {\n var coord = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n return rect.contain(coord[0], coord[1]);\n },\n\n /**\n * Mark displayable element dirty and refresh next frame\n */\n dirty: function () {\n this.__dirty = this.__dirtyText = true;\n this._rect = null;\n this.__zr && this.__zr.refresh();\n },\n\n /**\n * If displayable object binded any event\n * @return {boolean}\n */\n // TODO, events bound by bind\n // isSilent: function () {\n // return !(\n // this.hoverable || this.draggable\n // || this.onmousemove || this.onmouseover || this.onmouseout\n // || this.onmousedown || this.onmouseup || this.onclick\n // || this.ondragenter || this.ondragover || this.ondragleave\n // || this.ondrop\n // );\n // },\n\n /**\n * Alias for animate('style')\n * @param {boolean} loop\n */\n animateStyle: function (loop) {\n return this.animate('style', loop);\n },\n attrKV: function (key, value) {\n if (key !== 'style') {\n Element.prototype.attrKV.call(this, key, value);\n } else {\n this.style.set(value);\n }\n },\n\n /**\n * @param {Object|string} key\n * @param {*} value\n */\n setStyle: function (key, value) {\n this.style.set(key, value);\n this.dirty(false);\n return this;\n },\n\n /**\n * Use given style object\n * @param {Object} obj\n */\n useStyle: function (obj) {\n this.style = new Style(obj, this);\n this.dirty(false);\n return this;\n },\n\n /**\n * The string value of `textPosition` needs to be calculated to a real postion.\n * For example, `'inside'` is calculated to `[rect.width/2, rect.height/2]`\n * by default. See `contain/text.js#calculateTextPosition` for more details.\n * But some coutom shapes like \"pin\", \"flag\" have center that is not exactly\n * `[width/2, height/2]`. So we provide this hook to customize the calculation\n * for those shapes. It will be called if the `style.textPosition` is a string.\n * @param {Obejct} [out] Prepared out object. If not provided, this method should\n * be responsible for creating one.\n * @param {module:zrender/graphic/Style} style\n * @param {Object} rect {x, y, width, height}\n * @return {Obejct} out The same as the input out.\n * {\n * x: number. mandatory.\n * y: number. mandatory.\n * textAlign: string. optional. use style.textAlign by default.\n * textVerticalAlign: string. optional. use style.textVerticalAlign by default.\n * }\n */\n calculateTextPosition: null\n};\nzrUtil.inherits(Displayable, Element);\nzrUtil.mixin(Displayable, RectText); // zrUtil.mixin(Displayable, Stateful);\n\nvar _default = Displayable;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar ChartView = require(\"../../view/Chart\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {module:echarts/model/Series} seriesModel\n * @param {boolean} hasAnimation\n * @inner\n */\nfunction updateDataSelected(uid, seriesModel, hasAnimation, api) {\n var data = seriesModel.getData();\n var dataIndex = this.dataIndex;\n var name = data.getName(dataIndex);\n var selectedOffset = seriesModel.get('selectedOffset');\n api.dispatchAction({\n type: 'pieToggleSelect',\n from: uid,\n name: name,\n seriesId: seriesModel.id\n });\n data.each(function (idx) {\n toggleItemSelected(data.getItemGraphicEl(idx), data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), selectedOffset, hasAnimation);\n });\n}\n/**\n * @param {module:zrender/graphic/Sector} el\n * @param {Object} layout\n * @param {boolean} isSelected\n * @param {number} selectedOffset\n * @param {boolean} hasAnimation\n * @inner\n */\n\n\nfunction toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) {\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var offset = isSelected ? selectedOffset : 0;\n var position = [dx * offset, dy * offset];\n hasAnimation // animateTo will stop revious animation like update transition\n ? el.animate().when(200, {\n position: position\n }).start('bounceOut') : el.attr('position', position);\n}\n/**\n * Piece of pie including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\n\n\nfunction PiePiece(data, idx) {\n graphic.Group.call(this);\n var sector = new graphic.Sector({\n z2: 2\n });\n var polyline = new graphic.Polyline();\n var text = new graphic.Text();\n this.add(sector);\n this.add(polyline);\n this.add(text);\n this.updateData(data, idx, true);\n}\n\nvar piePieceProto = PiePiece.prototype;\n\npiePieceProto.updateData = function (data, idx, firstCreate) {\n var sector = this.childAt(0);\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate');\n\n if (firstCreate) {\n sector.setShape(sectorShape);\n var animationType = seriesModel.getShallow('animationType');\n\n if (animationType === 'scale') {\n sector.shape.r = layout.r0;\n graphic.initProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, idx);\n } // Expansion\n else {\n sector.shape.endAngle = layout.startAngle;\n graphic.updateProps(sector, {\n shape: {\n endAngle: layout.endAngle\n }\n }, seriesModel, idx);\n }\n } else {\n if (animationTypeUpdate === 'expansion') {\n // Sectors are set to be target shape and an overlaying clipPath is used for animation\n sector.setShape(sectorShape);\n } else {\n // Transition animation from the old shape\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel, idx);\n }\n } // Update common style\n\n\n var visualColor = data.getItemVisual(idx, 'color');\n sector.useStyle(zrUtil.defaults({\n lineJoin: 'bevel',\n fill: visualColor\n }, itemModel.getModel('itemStyle').getItemStyle()));\n sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle); // Toggle selected\n\n toggleItemSelected(this, data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), seriesModel.get('selectedOffset'), seriesModel.get('animation')); // Label and text animation should be applied only for transition type animation when update\n\n var withAnimation = !firstCreate && animationTypeUpdate === 'transition';\n\n this._updateLabel(data, idx, withAnimation);\n\n this.highDownOnUpdate = !seriesModel.get('silent') ? function (fromState, toState) {\n var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');\n\n if (toState === 'emphasis') {\n labelLine.ignore = labelLine.hoverIgnore;\n labelText.ignore = labelText.hoverIgnore; // Sector may has animation of updating data. Force to move to the last frame\n // Or it may stopped on the wrong shape\n\n if (hasAnimation) {\n sector.stopAnimation(true);\n sector.animateTo({\n shape: {\n r: layout.r + seriesModel.get('hoverOffset')\n }\n }, 300, 'elasticOut');\n }\n } else {\n labelLine.ignore = labelLine.normalIgnore;\n labelText.ignore = labelText.normalIgnore;\n\n if (hasAnimation) {\n sector.stopAnimation(true);\n sector.animateTo({\n shape: {\n r: layout.r\n }\n }, 300, 'elasticOut');\n }\n }\n } : null;\n graphic.setHoverStyle(this);\n};\n\npiePieceProto._updateLabel = function (data, idx, withAnimation) {\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var labelLayout = layout.label;\n var visualColor = data.getItemVisual(idx, 'color');\n\n if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) {\n labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore = labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true;\n return;\n }\n\n var targetLineShape = {\n points: labelLayout.linePoints || [[labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]]\n };\n var targetTextStyle = {\n x: labelLayout.x,\n y: labelLayout.y\n };\n\n if (withAnimation) {\n graphic.updateProps(labelLine, {\n shape: targetLineShape\n }, seriesModel, idx);\n graphic.updateProps(labelText, {\n style: targetTextStyle\n }, seriesModel, idx);\n } else {\n labelLine.attr({\n shape: targetLineShape\n });\n labelText.attr({\n style: targetTextStyle\n });\n }\n\n labelText.attr({\n rotation: labelLayout.rotation,\n origin: [labelLayout.x, labelLayout.y],\n z2: 10\n });\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineHoverModel = itemModel.getModel('emphasis.labelLine');\n var visualColor = data.getItemVisual(idx, 'color');\n graphic.setLabelStyle(labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel, {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultText: labelLayout.text,\n autoColor: visualColor,\n useInsideStyle: !!labelLayout.inside\n }, {\n textAlign: labelLayout.textAlign,\n textVerticalAlign: labelLayout.verticalAlign,\n opacity: data.getItemVisual(idx, 'opacity')\n });\n labelText.ignore = labelText.normalIgnore = !labelModel.get('show');\n labelText.hoverIgnore = !labelHoverModel.get('show');\n labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');\n labelLine.hoverIgnore = !labelLineHoverModel.get('show'); // Default use item visual color\n\n labelLine.setStyle({\n stroke: visualColor,\n opacity: data.getItemVisual(idx, 'opacity')\n });\n labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());\n labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();\n var smooth = labelLineModel.get('smooth');\n\n if (smooth && smooth === true) {\n smooth = 0.4;\n }\n\n labelLine.setShape({\n smooth: smooth\n });\n};\n\nzrUtil.inherits(PiePiece, graphic.Group); // Pie view\n\nvar PieView = ChartView.extend({\n type: 'pie',\n init: function () {\n var sectorGroup = new graphic.Group();\n this._sectorGroup = sectorGroup;\n },\n render: function (seriesModel, ecModel, api, payload) {\n if (payload && payload.from === this.uid) {\n return;\n }\n\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var hasAnimation = ecModel.get('animation');\n var isFirstRender = !oldData;\n var animationType = seriesModel.get('animationType');\n var animationTypeUpdate = seriesModel.get('animationTypeUpdate');\n var onSectorClick = zrUtil.curry(updateDataSelected, this.uid, seriesModel, hasAnimation, api);\n var selectedMode = seriesModel.get('selectedMode');\n data.diff(oldData).add(function (idx) {\n var piePiece = new PiePiece(data, idx); // Default expansion animation\n\n if (isFirstRender && animationType !== 'scale') {\n piePiece.eachChild(function (child) {\n child.stopAnimation(true);\n });\n }\n\n selectedMode && piePiece.on('click', onSectorClick);\n data.setItemGraphicEl(idx, piePiece);\n group.add(piePiece);\n }).update(function (newIdx, oldIdx) {\n var piePiece = oldData.getItemGraphicEl(oldIdx);\n\n if (!isFirstRender && animationTypeUpdate !== 'transition') {\n piePiece.eachChild(function (child) {\n child.stopAnimation(true);\n });\n }\n\n piePiece.updateData(data, newIdx);\n piePiece.off('click');\n selectedMode && piePiece.on('click', onSectorClick);\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n }).remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n group.remove(piePiece);\n }).execute();\n\n if (hasAnimation && data.count() > 0 && (isFirstRender ? animationType !== 'scale' : animationTypeUpdate !== 'transition')) {\n var shape = data.getItemLayout(0);\n\n for (var s = 1; isNaN(shape.startAngle) && s < data.count(); ++s) {\n shape = data.getItemLayout(s);\n }\n\n var r = Math.max(api.getWidth(), api.getHeight()) / 2;\n var removeClipPath = zrUtil.bind(group.removeClipPath, group);\n group.setClipPath(this._createClipPath(shape.cx, shape.cy, r, shape.startAngle, shape.clockwise, removeClipPath, seriesModel, isFirstRender));\n } else {\n // clipPath is used in first-time animation, so remove it when otherwise. See: #8994\n group.removeClipPath();\n }\n\n this._data = data;\n },\n dispose: function () {},\n _createClipPath: function (cx, cy, r, startAngle, clockwise, cb, seriesModel, isFirstRender) {\n var clipPath = new graphic.Sector({\n shape: {\n cx: cx,\n cy: cy,\n r0: 0,\n r: r,\n startAngle: startAngle,\n endAngle: startAngle,\n clockwise: clockwise\n }\n });\n var initOrUpdate = isFirstRender ? graphic.initProps : graphic.updateProps;\n initOrUpdate(clipPath, {\n shape: {\n endAngle: startAngle + (clockwise ? 1 : -1) * Math.PI * 2\n }\n }, seriesModel, cb);\n return clipPath;\n },\n\n /**\n * @implement\n */\n containPoint: function (point, seriesModel) {\n var data = seriesModel.getData();\n var itemLayout = data.getItemLayout(0);\n\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n }\n});\nvar _default = PieView;\nmodule.exports = _default;","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction simpleLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n var model = node.getModel();\n node.setLayout([+model.get('x'), +model.get('y')]);\n });\n simpleLayoutEdge(graph);\n}\n\nfunction simpleLayoutEdge(graph) {\n graph.eachEdge(function (edge) {\n var curveness = edge.getModel().get('lineStyle.curveness') || 0;\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var points = [p1, p2];\n\n if (+curveness) {\n points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]);\n }\n\n edge.setLayout(points);\n });\n}\n\nexports.simpleLayout = simpleLayout;\nexports.simpleLayoutEdge = simpleLayoutEdge;","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Polar = require(\"./Polar\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _axisHelper = require(\"../../coord/axisHelper\");\n\nvar createScaleByModel = _axisHelper.createScaleByModel;\nvar niceScaleExtent = _axisHelper.niceScaleExtent;\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar getStackedDimension = _dataStackHelper.getStackedDimension;\n\nrequire(\"./PolarModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Axis scale\n\n/**\n * Resize method bound to the polar\n * @param {module:echarts/coord/polar/PolarModel} polarModel\n * @param {module:echarts/ExtensionAPI} api\n */\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n var radius = polarModel.get('radius');\n\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n\n radius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(radius[1], radius[0]) : radiusAxis.setExtent(radius[0], radius[1]);\n}\n/**\n * Update polar\n */\n\n\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis(); // Reset scale\n\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data = seriesModel.getData();\n zrUtil.each(data.mapDimension('radius', true), function (dim) {\n radiusAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim));\n });\n zrUtil.each(data.mapDimension('angle', true), function (dim) {\n angleAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim));\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis\n\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\n/**\n * Set common axis properties\n * @param {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n * @param {module:echarts/coord/polar/AxisModel}\n * @inner\n */\n\n\nfunction setAxis(axis, axisModel) {\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n\n if (axisModel.mainType === 'angleAxis') {\n axis.inverse ^= axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360));\n } // Inject axis instance\n\n\n axisModel.axis = axis;\n axis.model = axisModel;\n}\n\nvar polarCreator = {\n dimensions: Polar.prototype.dimensions,\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx); // Inject resize and update method\n\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n }); // Inject coordinateSystem to series\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = ecModel.queryComponents({\n mainType: 'polar',\n index: seriesModel.get('polarIndex'),\n id: seriesModel.get('polarId')\n })[0];\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nCoordinateSystem.register('polar', polarCreator);","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _number = require(\"../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _dataStackHelper = require(\"../data/helper/dataStackHelper\");\n\nvar isDimensionStacked = _dataStackHelper.isDimensionStacked;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;\n}\n\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\n/**\n * @param {string} seriesType\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n\n\nfunction barLayoutPolar(seriesType, ecModel, api) {\n var lastStackCoords = {};\n var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';\n }));\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for polar only\n if (seriesModel.coordinateSystem.type !== 'polar') {\n return;\n }\n\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = polar.getOtherAxis(baseAxis);\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim\n /*, baseDim*/\n );\n var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);\n var valueAxisStart = valueAxis.getExtent()[0];\n\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n\n if (stacked) {\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n // Positive stack\n n: valueAxisStart // Negative stack\n\n };\n } // Should also consider #4243\n\n\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n\n var r0;\n var r;\n var startAngle;\n var endAngle; // radial sector\n\n if (valueAxis.dim === 'radius') {\n var radiusSpan = valueAxis.dataToRadius(value) - valueAxisStart;\n var angle = baseAxis.dataToAngle(baseValue);\n\n if (Math.abs(radiusSpan) < barMinHeight) {\n radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;\n }\n\n r0 = baseCoord;\n r = baseCoord + radiusSpan;\n startAngle = angle - columnOffset;\n endAngle = startAngle - columnWidth;\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n } // tangential sector\n else {\n var angleSpan = valueAxis.dataToAngle(value, clampLayout) - valueAxisStart;\n var radius = baseAxis.dataToRadius(baseValue);\n\n if (Math.abs(angleSpan) < barMinAngle) {\n angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;\n }\n\n r0 = radius + columnOffset;\n r = r0 + columnWidth;\n startAngle = baseCoord;\n endAngle = baseCoord + angleSpan; // if the previous stack is at the end of the ring,\n // add a round to differentiate it from origin\n // var extent = angleAxis.getExtent();\n // var stackCoord = angle;\n // if (stackCoord === extent[0] && value > 0) {\n // stackCoord = extent[1];\n // }\n // else if (stackCoord === extent[1] && value < 0) {\n // stackCoord = extent[0];\n // }\n\n stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);\n }\n\n data.setItemLayout(idx, {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n // Consider that positive angle is anti-clockwise,\n // while positive radian of sector is clockwise\n startAngle: -startAngle * Math.PI / 180,\n endAngle: -endAngle * Math.PI / 180\n });\n }\n }, this);\n}\n/**\n * Calculate bar width and offset for radial bar charts\n */\n\n\nfunction calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\n\nvar _default = barLayoutPolar;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = Path.extend({\n type: 'echartsGaugePointer',\n shape: {\n angle: 0,\n width: 10,\n r: 10,\n x: 0,\n y: 0\n },\n buildPath: function (ctx, shape) {\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n var r = shape.r;\n var width = shape.width;\n var angle = shape.angle;\n var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2);\n var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2);\n angle = shape.angle - Math.PI / 2;\n ctx.moveTo(x, y);\n ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width);\n ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r);\n ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width);\n ctx.lineTo(x, y);\n return;\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar ComponentModel = require(\"../../model/Component\");\n\nvar Model = require(\"../../model/Model\");\n\nvar selectableMixin = require(\"../../component/helper/selectableMixin\");\n\nvar geoCreator = require(\"./geoCreator\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar GeoModel = ComponentModel.extend({\n type: 'geo',\n\n /**\n * @type {module:echarts/coord/geo/Geo}\n */\n coordinateSystem: null,\n layoutMode: 'box',\n init: function (option) {\n ComponentModel.prototype.init.apply(this, arguments); // Default label emphasis `show`\n\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n },\n optionUpdated: function () {\n var option = this.option;\n var self = this;\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap);\n this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) {\n if (regionOpt.name) {\n optionModelMap.set(regionOpt.name, new Model(regionOpt, self));\n }\n\n return optionModelMap;\n }, zrUtil.createHashMap());\n this.updateSelectedMap(option.regions);\n },\n defaultOption: {\n zlevel: 0,\n z: 0,\n show: true,\n left: 'center',\n top: 'center',\n // width:,\n // height:,\n // right\n // bottom\n // Aspect is width / height. Inited to be geoJson bbox aspect\n // This parameter is used for scale this aspect\n // If svg used, aspectScale is 1 by default.\n // aspectScale: 0.75,\n aspectScale: null,\n ///// Layout with center and size\n // If you wan't to put map in a fixed size box with right aspect ratio\n // This two properties may more conveninet\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n silent: false,\n // Map type\n map: '',\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n // selectedMode: false\n label: {\n show: false,\n color: '#000'\n },\n itemStyle: {\n // color: 各异,\n borderWidth: 0.5,\n borderColor: '#444',\n color: '#eee'\n },\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n regions: []\n },\n\n /**\n * Get model of region\n * @param {string} name\n * @return {module:echarts/model/Model}\n */\n getRegionModel: function (name) {\n return this._optionModelMap.get(name) || new Model(null, this, this.ecModel);\n },\n\n /**\n * Format label\n * @param {string} name Region name\n * @param {string} [status='normal'] 'normal' or 'emphasis'\n * @return {string}\n */\n getFormattedLabel: function (name, status) {\n var regionModel = this.getRegionModel(name);\n var formatter = regionModel.get('label' + (status === 'normal' ? '.' : status + '.') + 'formatter');\n var params = {\n name: name\n };\n\n if (typeof formatter === 'function') {\n params.status = status;\n return formatter(params);\n } else if (typeof formatter === 'string') {\n return formatter.replace('{a}', name != null ? name : '');\n }\n },\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n setCenter: function (center) {\n this.option.center = center;\n }\n});\nzrUtil.mixin(GeoModel, selectableMixin);\nvar _default = GeoModel;\nmodule.exports = _default;","/**\n * Event Mixin\n * @module zrender/mixin/Eventful\n * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)\n * pissang (https://www.github.com/pissang)\n */\nvar arrySlice = Array.prototype.slice;\n/**\n * Event dispatcher.\n *\n * @alias module:zrender/mixin/Eventful\n * @constructor\n * @param {Object} [eventProcessor] The object eventProcessor is the scope when\n * `eventProcessor.xxx` called.\n * @param {Function} [eventProcessor.normalizeQuery]\n * param: {string|Object} Raw query.\n * return: {string|Object} Normalized query.\n * @param {Function} [eventProcessor.filter] Event will be dispatched only\n * if it returns `true`.\n * param: {string} eventType\n * param: {string|Object} query\n * return: {boolean}\n * @param {Function} [eventProcessor.afterTrigger] Called after all handlers called.\n * param: {string} eventType\n */\n\nvar Eventful = function (eventProcessor) {\n this._$handlers = {};\n this._$eventProcessor = eventProcessor;\n};\n\nEventful.prototype = {\n constructor: Eventful,\n\n /**\n * The handler can only be triggered once, then removed.\n *\n * @param {string} event The event name.\n * @param {string|Object} [query] Condition used on event filter.\n * @param {Function} handler The event handler.\n * @param {Object} context\n */\n one: function (event, query, handler, context) {\n return on(this, event, query, handler, context, true);\n },\n\n /**\n * Bind a handler.\n *\n * @param {string} event The event name.\n * @param {string|Object} [query] Condition used on event filter.\n * @param {Function} handler The event handler.\n * @param {Object} [context]\n */\n on: function (event, query, handler, context) {\n return on(this, event, query, handler, context, false);\n },\n\n /**\n * Whether any handler has bound.\n *\n * @param {string} event\n * @return {boolean}\n */\n isSilent: function (event) {\n var _h = this._$handlers;\n return !_h[event] || !_h[event].length;\n },\n\n /**\n * Unbind a event.\n *\n * @param {string} [event] The event name.\n * If no `event` input, \"off\" all listeners.\n * @param {Function} [handler] The event handler.\n * If no `handler` input, \"off\" all listeners of the `event`.\n */\n off: function (event, handler) {\n var _h = this._$handlers;\n\n if (!event) {\n this._$handlers = {};\n return this;\n }\n\n if (handler) {\n if (_h[event]) {\n var newList = [];\n\n for (var i = 0, l = _h[event].length; i < l; i++) {\n if (_h[event][i].h !== handler) {\n newList.push(_h[event][i]);\n }\n }\n\n _h[event] = newList;\n }\n\n if (_h[event] && _h[event].length === 0) {\n delete _h[event];\n }\n } else {\n delete _h[event];\n }\n\n return this;\n },\n\n /**\n * Dispatch a event.\n *\n * @param {string} type The event name.\n */\n trigger: function (type) {\n var _h = this._$handlers[type];\n var eventProcessor = this._$eventProcessor;\n\n if (_h) {\n var args = arguments;\n var argLen = args.length;\n\n if (argLen > 3) {\n args = arrySlice.call(args, 1);\n }\n\n var len = _h.length;\n\n for (var i = 0; i < len;) {\n var hItem = _h[i];\n\n if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) {\n i++;\n continue;\n } // Optimize advise from backbone\n\n\n switch (argLen) {\n case 1:\n hItem.h.call(hItem.ctx);\n break;\n\n case 2:\n hItem.h.call(hItem.ctx, args[1]);\n break;\n\n case 3:\n hItem.h.call(hItem.ctx, args[1], args[2]);\n break;\n\n default:\n // have more than 2 given arguments\n hItem.h.apply(hItem.ctx, args);\n break;\n }\n\n if (hItem.one) {\n _h.splice(i, 1);\n\n len--;\n } else {\n i++;\n }\n }\n }\n\n eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type);\n return this;\n },\n\n /**\n * Dispatch a event with context, which is specified at the last parameter.\n *\n * @param {string} type The event name.\n */\n triggerWithContext: function (type) {\n var _h = this._$handlers[type];\n var eventProcessor = this._$eventProcessor;\n\n if (_h) {\n var args = arguments;\n var argLen = args.length;\n\n if (argLen > 4) {\n args = arrySlice.call(args, 1, args.length - 1);\n }\n\n var ctx = args[args.length - 1];\n var len = _h.length;\n\n for (var i = 0; i < len;) {\n var hItem = _h[i];\n\n if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) {\n i++;\n continue;\n } // Optimize advise from backbone\n\n\n switch (argLen) {\n case 1:\n hItem.h.call(ctx);\n break;\n\n case 2:\n hItem.h.call(ctx, args[1]);\n break;\n\n case 3:\n hItem.h.call(ctx, args[1], args[2]);\n break;\n\n default:\n // have more than 2 given arguments\n hItem.h.apply(ctx, args);\n break;\n }\n\n if (hItem.one) {\n _h.splice(i, 1);\n\n len--;\n } else {\n i++;\n }\n }\n }\n\n eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type);\n return this;\n }\n};\n\nfunction normalizeQuery(host, query) {\n var eventProcessor = host._$eventProcessor;\n\n if (query != null && eventProcessor && eventProcessor.normalizeQuery) {\n query = eventProcessor.normalizeQuery(query);\n }\n\n return query;\n}\n\nfunction on(eventful, event, query, handler, context, isOnce) {\n var _h = eventful._$handlers;\n\n if (typeof query === 'function') {\n context = handler;\n handler = query;\n query = null;\n }\n\n if (!handler || !event) {\n return eventful;\n }\n\n query = normalizeQuery(eventful, query);\n\n if (!_h[event]) {\n _h[event] = [];\n }\n\n for (var i = 0; i < _h[event].length; i++) {\n if (_h[event][i].h === handler) {\n return eventful;\n }\n }\n\n var wrap = {\n h: handler,\n one: isOnce,\n query: query,\n ctx: context || eventful,\n // FIXME\n // Do not publish this feature util it is proved that it makes sense.\n callAtLast: handler.zrEventfulCallAtLast\n };\n var lastIndex = _h[event].length - 1;\n var lastWrap = _h[event][lastIndex];\n lastWrap && lastWrap.callAtLast ? _h[event].splice(lastIndex, 0, wrap) : _h[event].push(wrap);\n return eventful;\n} // ----------------------\n// The events in zrender\n// ----------------------\n\n/**\n * @event module:zrender/mixin/Eventful#onclick\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#onmouseover\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#onmouseout\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#onmousemove\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#onmousewheel\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#onmousedown\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#onmouseup\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondrag\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondragstart\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondragend\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondragenter\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondragleave\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondragover\n * @type {Function}\n * @default null\n */\n\n/**\n * @event module:zrender/mixin/Eventful#ondrop\n * @type {Function}\n * @default null\n */\n\n\nvar _default = Eventful;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// import * as axisHelper from './axisHelper';\nvar _default = {\n /**\n * @param {boolean} origin\n * @return {number|string} min value or 'dataMin' or null/undefined (means auto) or NaN\n */\n getMin: function (origin) {\n var option = this.option;\n var min = !origin && option.rangeStart != null ? option.rangeStart : option.min;\n\n if (this.axis && min != null && min !== 'dataMin' && typeof min !== 'function' && !zrUtil.eqNaN(min)) {\n min = this.axis.scale.parse(min);\n }\n\n return min;\n },\n\n /**\n * @param {boolean} origin\n * @return {number|string} max value or 'dataMax' or null/undefined (means auto) or NaN\n */\n getMax: function (origin) {\n var option = this.option;\n var max = !origin && option.rangeEnd != null ? option.rangeEnd : option.max;\n\n if (this.axis && max != null && max !== 'dataMax' && typeof max !== 'function' && !zrUtil.eqNaN(max)) {\n max = this.axis.scale.parse(max);\n }\n\n return max;\n },\n\n /**\n * @return {boolean}\n */\n getNeedCrossZero: function () {\n var option = this.option;\n return option.rangeStart != null || option.rangeEnd != null ? false : !option.scale;\n },\n\n /**\n * Should be implemented by each axis model if necessary.\n * @return {module:echarts/model/Component} coordinate system model\n */\n getCoordSysModel: zrUtil.noop,\n\n /**\n * @param {number} rangeStart Can only be finite number or null/undefined or NaN.\n * @param {number} rangeEnd Can only be finite number or null/undefined or NaN.\n */\n setRange: function (rangeStart, rangeEnd) {\n this.option.rangeStart = rangeStart;\n this.option.rangeEnd = rangeEnd;\n },\n\n /**\n * Reset range\n */\n resetRange: function () {\n // rangeStart and rangeEnd is readonly.\n this.option.rangeStart = this.option.rangeEnd = null;\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordinateSystemCreators = {};\n\nfunction CoordinateSystemManager() {\n this._coordinateSystems = [];\n}\n\nCoordinateSystemManager.prototype = {\n constructor: CoordinateSystemManager,\n create: function (ecModel, api) {\n var coordinateSystems = [];\n zrUtil.each(coordinateSystemCreators, function (creater, type) {\n var list = creater.create(ecModel, api);\n coordinateSystems = coordinateSystems.concat(list || []);\n });\n this._coordinateSystems = coordinateSystems;\n },\n update: function (ecModel, api) {\n zrUtil.each(this._coordinateSystems, function (coordSys) {\n coordSys.update && coordSys.update(ecModel, api);\n });\n },\n getCoordinateSystems: function () {\n return this._coordinateSystems.slice();\n }\n};\n\nCoordinateSystemManager.register = function (type, coordinateSystemCreator) {\n coordinateSystemCreators[type] = coordinateSystemCreator;\n};\n\nCoordinateSystemManager.get = function (type) {\n return coordinateSystemCreators[type];\n};\n\nvar _default = CoordinateSystemManager;\nmodule.exports = _default;","var curve = require(\"./curve\");\n\nvar vec2 = require(\"./vector\");\n\nvar bbox = require(\"./bbox\");\n\nvar BoundingRect = require(\"./BoundingRect\");\n\nvar _config = require(\"../config\");\n\nvar dpr = _config.devicePixelRatio;\n\n/**\n * Path 代理,可以在`buildPath`中用于替代`ctx`, 会保存每个path操作的命令到pathCommands属性中\n * 可以用于 isInsidePath 判断以及获取boundingRect\n *\n * @module zrender/core/PathProxy\n * @author Yi Shen (http://www.github.com/pissang)\n */\n// TODO getTotalLength, getPointAtLength\n\n/* global Float32Array */\nvar CMD = {\n M: 1,\n L: 2,\n C: 3,\n Q: 4,\n A: 5,\n Z: 6,\n // Rect\n R: 7\n}; // var CMD_MEM_SIZE = {\n// M: 3,\n// L: 3,\n// C: 7,\n// Q: 5,\n// A: 9,\n// R: 5,\n// Z: 1\n// };\n\nvar min = [];\nvar max = [];\nvar min2 = [];\nvar max2 = [];\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathCos = Math.cos;\nvar mathSin = Math.sin;\nvar mathSqrt = Math.sqrt;\nvar mathAbs = Math.abs;\nvar hasTypedArray = typeof Float32Array !== 'undefined';\n/**\n * @alias module:zrender/core/PathProxy\n * @constructor\n */\n\nvar PathProxy = function (notSaveData) {\n this._saveData = !(notSaveData || false);\n\n if (this._saveData) {\n /**\n * Path data. Stored as flat array\n * @type {Array.}\n */\n this.data = [];\n }\n\n this._ctx = null;\n};\n/**\n * 快速计算Path包围盒(并不是最小包围盒)\n * @return {Object}\n */\n\n\nPathProxy.prototype = {\n constructor: PathProxy,\n _xi: 0,\n _yi: 0,\n _x0: 0,\n _y0: 0,\n // Unit x, Unit y. Provide for avoiding drawing that too short line segment\n _ux: 0,\n _uy: 0,\n _len: 0,\n _lineDash: null,\n _dashOffset: 0,\n _dashIdx: 0,\n _dashSum: 0,\n\n /**\n * @readOnly\n */\n setScale: function (sx, sy, segmentIgnoreThreshold) {\n // Compat. Previously there is no segmentIgnoreThreshold.\n segmentIgnoreThreshold = segmentIgnoreThreshold || 0;\n this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0;\n this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0;\n },\n getContext: function () {\n return this._ctx;\n },\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n beginPath: function (ctx) {\n this._ctx = ctx;\n ctx && ctx.beginPath();\n ctx && (this.dpr = ctx.dpr); // Reset\n\n if (this._saveData) {\n this._len = 0;\n }\n\n if (this._lineDash) {\n this._lineDash = null;\n this._dashOffset = 0;\n }\n\n return this;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @return {module:zrender/core/PathProxy}\n */\n moveTo: function (x, y) {\n this.addData(CMD.M, x, y);\n this._ctx && this._ctx.moveTo(x, y); // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用\n // xi, yi 记录当前点, x0, y0 在 closePath 的时候回到起始点。\n // 有可能在 beginPath 之后直接调用 lineTo,这时候 x0, y0 需要\n // 在 lineTo 方法中记录,这里先不考虑这种情况,dashed line 也只在 IE10- 中不支持\n\n this._x0 = x;\n this._y0 = y;\n this._xi = x;\n this._yi = y;\n return this;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @return {module:zrender/core/PathProxy}\n */\n lineTo: function (x, y) {\n var exceedUnit = mathAbs(x - this._xi) > this._ux || mathAbs(y - this._yi) > this._uy // Force draw the first segment\n || this._len < 5;\n this.addData(CMD.L, x, y);\n\n if (this._ctx && exceedUnit) {\n this._needsDash() ? this._dashedLineTo(x, y) : this._ctx.lineTo(x, y);\n }\n\n if (exceedUnit) {\n this._xi = x;\n this._yi = y;\n }\n\n return this;\n },\n\n /**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @return {module:zrender/core/PathProxy}\n */\n bezierCurveTo: function (x1, y1, x2, y2, x3, y3) {\n this.addData(CMD.C, x1, y1, x2, y2, x3, y3);\n\n if (this._ctx) {\n this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3) : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n }\n\n this._xi = x3;\n this._yi = y3;\n return this;\n },\n\n /**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @return {module:zrender/core/PathProxy}\n */\n quadraticCurveTo: function (x1, y1, x2, y2) {\n this.addData(CMD.Q, x1, y1, x2, y2);\n\n if (this._ctx) {\n this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2) : this._ctx.quadraticCurveTo(x1, y1, x2, y2);\n }\n\n this._xi = x2;\n this._yi = y2;\n return this;\n },\n\n /**\n * @param {number} cx\n * @param {number} cy\n * @param {number} r\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {boolean} anticlockwise\n * @return {module:zrender/core/PathProxy}\n */\n arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) {\n this.addData(CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1);\n this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);\n this._xi = mathCos(endAngle) * r + cx;\n this._yi = mathSin(endAngle) * r + cy;\n return this;\n },\n // TODO\n arcTo: function (x1, y1, x2, y2, radius) {\n if (this._ctx) {\n this._ctx.arcTo(x1, y1, x2, y2, radius);\n }\n\n return this;\n },\n // TODO\n rect: function (x, y, w, h) {\n this._ctx && this._ctx.rect(x, y, w, h);\n this.addData(CMD.R, x, y, w, h);\n return this;\n },\n\n /**\n * @return {module:zrender/core/PathProxy}\n */\n closePath: function () {\n this.addData(CMD.Z);\n var ctx = this._ctx;\n var x0 = this._x0;\n var y0 = this._y0;\n\n if (ctx) {\n this._needsDash() && this._dashedLineTo(x0, y0);\n ctx.closePath();\n }\n\n this._xi = x0;\n this._yi = y0;\n return this;\n },\n\n /**\n * Context 从外部传入,因为有可能是 rebuildPath 完之后再 fill。\n * stroke 同样\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n fill: function (ctx) {\n ctx && ctx.fill();\n this.toStatic();\n },\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n stroke: function (ctx) {\n ctx && ctx.stroke();\n this.toStatic();\n },\n\n /**\n * 必须在其它绘制命令前调用\n * Must be invoked before all other path drawing methods\n * @return {module:zrender/core/PathProxy}\n */\n setLineDash: function (lineDash) {\n if (lineDash instanceof Array) {\n this._lineDash = lineDash;\n this._dashIdx = 0;\n var lineDashSum = 0;\n\n for (var i = 0; i < lineDash.length; i++) {\n lineDashSum += lineDash[i];\n }\n\n this._dashSum = lineDashSum;\n }\n\n return this;\n },\n\n /**\n * 必须在其它绘制命令前调用\n * Must be invoked before all other path drawing methods\n * @return {module:zrender/core/PathProxy}\n */\n setLineDashOffset: function (offset) {\n this._dashOffset = offset;\n return this;\n },\n\n /**\n *\n * @return {boolean}\n */\n len: function () {\n return this._len;\n },\n\n /**\n * 直接设置 Path 数据\n */\n setData: function (data) {\n var len = data.length;\n\n if (!(this.data && this.data.length === len) && hasTypedArray) {\n this.data = new Float32Array(len);\n }\n\n for (var i = 0; i < len; i++) {\n this.data[i] = data[i];\n }\n\n this._len = len;\n },\n\n /**\n * 添加子路径\n * @param {module:zrender/core/PathProxy|Array.} path\n */\n appendPath: function (path) {\n if (!(path instanceof Array)) {\n path = [path];\n }\n\n var len = path.length;\n var appendSize = 0;\n var offset = this._len;\n\n for (var i = 0; i < len; i++) {\n appendSize += path[i].len();\n }\n\n if (hasTypedArray && this.data instanceof Float32Array) {\n this.data = new Float32Array(offset + appendSize);\n }\n\n for (var i = 0; i < len; i++) {\n var appendPathData = path[i].data;\n\n for (var k = 0; k < appendPathData.length; k++) {\n this.data[offset++] = appendPathData[k];\n }\n }\n\n this._len = offset;\n },\n\n /**\n * 填充 Path 数据。\n * 尽量复用而不申明新的数组。大部分图形重绘的指令数据长度都是不变的。\n */\n addData: function (cmd) {\n if (!this._saveData) {\n return;\n }\n\n var data = this.data;\n\n if (this._len + arguments.length > data.length) {\n // 因为之前的数组已经转换成静态的 Float32Array\n // 所以不够用时需要扩展一个新的动态数组\n this._expandData();\n\n data = this.data;\n }\n\n for (var i = 0; i < arguments.length; i++) {\n data[this._len++] = arguments[i];\n }\n\n this._prevCmd = cmd;\n },\n _expandData: function () {\n // Only if data is Float32Array\n if (!(this.data instanceof Array)) {\n var newData = [];\n\n for (var i = 0; i < this._len; i++) {\n newData[i] = this.data[i];\n }\n\n this.data = newData;\n }\n },\n\n /**\n * If needs js implemented dashed line\n * @return {boolean}\n * @private\n */\n _needsDash: function () {\n return this._lineDash;\n },\n _dashedLineTo: function (x1, y1) {\n var dashSum = this._dashSum;\n var offset = this._dashOffset;\n var lineDash = this._lineDash;\n var ctx = this._ctx;\n var x0 = this._xi;\n var y0 = this._yi;\n var dx = x1 - x0;\n var dy = y1 - y0;\n var dist = mathSqrt(dx * dx + dy * dy);\n var x = x0;\n var y = y0;\n var dash;\n var nDash = lineDash.length;\n var idx;\n dx /= dist;\n dy /= dist;\n\n if (offset < 0) {\n // Convert to positive offset\n offset = dashSum + offset;\n }\n\n offset %= dashSum;\n x -= offset * dx;\n y -= offset * dy;\n\n while (dx > 0 && x <= x1 || dx < 0 && x >= x1 || dx === 0 && (dy > 0 && y <= y1 || dy < 0 && y >= y1)) {\n idx = this._dashIdx;\n dash = lineDash[idx];\n x += dx * dash;\n y += dy * dash;\n this._dashIdx = (idx + 1) % nDash; // Skip positive offset\n\n if (dx > 0 && x < x0 || dx < 0 && x > x0 || dy > 0 && y < y0 || dy < 0 && y > y0) {\n continue;\n }\n\n ctx[idx % 2 ? 'moveTo' : 'lineTo'](dx >= 0 ? mathMin(x, x1) : mathMax(x, x1), dy >= 0 ? mathMin(y, y1) : mathMax(y, y1));\n } // Offset for next lineTo\n\n\n dx = x - x1;\n dy = y - y1;\n this._dashOffset = -mathSqrt(dx * dx + dy * dy);\n },\n // Not accurate dashed line to\n _dashedBezierTo: function (x1, y1, x2, y2, x3, y3) {\n var dashSum = this._dashSum;\n var offset = this._dashOffset;\n var lineDash = this._lineDash;\n var ctx = this._ctx;\n var x0 = this._xi;\n var y0 = this._yi;\n var t;\n var dx;\n var dy;\n var cubicAt = curve.cubicAt;\n var bezierLen = 0;\n var idx = this._dashIdx;\n var nDash = lineDash.length;\n var x;\n var y;\n var tmpLen = 0;\n\n if (offset < 0) {\n // Convert to positive offset\n offset = dashSum + offset;\n }\n\n offset %= dashSum; // Bezier approx length\n\n for (t = 0; t < 1; t += 0.1) {\n dx = cubicAt(x0, x1, x2, x3, t + 0.1) - cubicAt(x0, x1, x2, x3, t);\n dy = cubicAt(y0, y1, y2, y3, t + 0.1) - cubicAt(y0, y1, y2, y3, t);\n bezierLen += mathSqrt(dx * dx + dy * dy);\n } // Find idx after add offset\n\n\n for (; idx < nDash; idx++) {\n tmpLen += lineDash[idx];\n\n if (tmpLen > offset) {\n break;\n }\n }\n\n t = (tmpLen - offset) / bezierLen;\n\n while (t <= 1) {\n x = cubicAt(x0, x1, x2, x3, t);\n y = cubicAt(y0, y1, y2, y3, t); // Use line to approximate dashed bezier\n // Bad result if dash is long\n\n idx % 2 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);\n t += lineDash[idx] / bezierLen;\n idx = (idx + 1) % nDash;\n } // Finish the last segment and calculate the new offset\n\n\n idx % 2 !== 0 && ctx.lineTo(x3, y3);\n dx = x3 - x;\n dy = y3 - y;\n this._dashOffset = -mathSqrt(dx * dx + dy * dy);\n },\n _dashedQuadraticTo: function (x1, y1, x2, y2) {\n // Convert quadratic to cubic using degree elevation\n var x3 = x2;\n var y3 = y2;\n x2 = (x2 + 2 * x1) / 3;\n y2 = (y2 + 2 * y1) / 3;\n x1 = (this._xi + 2 * x1) / 3;\n y1 = (this._yi + 2 * y1) / 3;\n\n this._dashedBezierTo(x1, y1, x2, y2, x3, y3);\n },\n\n /**\n * 转成静态的 Float32Array 减少堆内存占用\n * Convert dynamic array to static Float32Array\n */\n toStatic: function () {\n var data = this.data;\n\n if (data instanceof Array) {\n data.length = this._len;\n\n if (hasTypedArray) {\n this.data = new Float32Array(data);\n }\n }\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function () {\n min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE;\n max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE;\n var data = this.data;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点\n // 在 closePath 的时候使用\n x0 = data[i++];\n y0 = data[i++];\n xi = x0;\n yi = y0;\n min2[0] = x0;\n min2[1] = y0;\n max2[0] = x0;\n max2[1] = y0;\n break;\n\n case CMD.L:\n bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.C:\n bbox.fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.Q:\n bbox.fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.A:\n // TODO Arc 判断的开销比较大\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var endAngle = data[i++] + startAngle; // TODO Arc 旋转\n\n i += 1;\n var anticlockwise = 1 - data[i++];\n\n if (i === 1) {\n // 直接使用 arc 命令\n // 第一个命令起点还未定义\n x0 = mathCos(startAngle) * rx + cx;\n y0 = mathSin(startAngle) * ry + cy;\n }\n\n bbox.fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2);\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++]; // Use fromLine\n\n bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2);\n break;\n\n case CMD.Z:\n xi = x0;\n yi = y0;\n break;\n } // Union\n\n\n vec2.min(min, min, min2);\n vec2.max(max, max, max2);\n } // No data\n\n\n if (i === 0) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n\n return new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n },\n\n /**\n * Rebuild path from current data\n * Rebuild path will not consider javascript implemented line dash.\n * @param {CanvasRenderingContext2D} ctx\n */\n rebuildPath: function (ctx) {\n var d = this.data;\n var x0;\n var y0;\n var xi;\n var yi;\n var x;\n var y;\n var ux = this._ux;\n var uy = this._uy;\n var len = this._len;\n\n for (var i = 0; i < len;) {\n var cmd = d[i++];\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = d[i];\n yi = d[i + 1];\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n x0 = xi = d[i++];\n y0 = yi = d[i++];\n ctx.moveTo(xi, yi);\n break;\n\n case CMD.L:\n x = d[i++];\n y = d[i++]; // Not draw too small seg between\n\n if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) {\n ctx.lineTo(x, y);\n xi = x;\n yi = y;\n }\n\n break;\n\n case CMD.C:\n ctx.bezierCurveTo(d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]);\n xi = d[i - 2];\n yi = d[i - 1];\n break;\n\n case CMD.Q:\n ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]);\n xi = d[i - 2];\n yi = d[i - 1];\n break;\n\n case CMD.A:\n var cx = d[i++];\n var cy = d[i++];\n var rx = d[i++];\n var ry = d[i++];\n var theta = d[i++];\n var dTheta = d[i++];\n var psi = d[i++];\n var fs = d[i++];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n var isEllipse = Math.abs(rx - ry) > 1e-3;\n var endAngle = theta + dTheta;\n\n if (isEllipse) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, endAngle, 1 - fs);\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n } else {\n ctx.arc(cx, cy, r, theta, endAngle, 1 - fs);\n }\n\n if (i === 1) {\n // 直接使用 arc 命令\n // 第一个命令起点还未定义\n x0 = mathCos(theta) * rx + cx;\n y0 = mathSin(theta) * ry + cy;\n }\n\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n\n case CMD.R:\n x0 = xi = d[i];\n y0 = yi = d[i + 1];\n ctx.rect(d[i++], d[i++], d[i++], d[i++]);\n break;\n\n case CMD.Z:\n ctx.closePath();\n xi = x0;\n yi = y0;\n }\n }\n }\n};\nPathProxy.CMD = CMD;\nvar _default = PathProxy;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar features = {};\n\nfunction register(name, ctor) {\n features[name] = ctor;\n}\n\nfunction get(name) {\n return features[name];\n}\n\nexports.register = register;\nexports.get = get;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar Tree = require(\"../../data/Tree\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar Model = require(\"../../model/Model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.tree',\n layoutInfo: null,\n // can support the position parameters 'left', 'top','right','bottom', 'width',\n // 'height' in the setOption() with 'merge' mode normal.\n layoutMode: 'box',\n\n /**\n * Init a tree data structure from data in option series\n * @param {Object} option the object used to config echarts view\n * @return {module:echarts/data/List} storage initial data\n */\n getInitialData: function (option) {\n //create an virtual root\n var root = {\n name: option.name,\n children: option.data\n };\n var leaves = option.leaves || {};\n var leavesModel = new Model(leaves, this, this.ecModel);\n var tree = Tree.createTree(root, this, {}, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n\n if (!node.children.length || !node.isExpand) {\n model.parentModel = leavesModel;\n }\n\n return model;\n });\n }\n\n var treeDepth = 0;\n tree.eachNode('preorder', function (node) {\n if (node.depth > treeDepth) {\n treeDepth = node.depth;\n }\n });\n var expandAndCollapse = option.expandAndCollapse;\n var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth;\n tree.root.eachNode('preorder', function (node) {\n var item = node.hostTree.data.getRawDataItem(node.dataIndex); // Add item.collapsed != null, because users can collapse node original in the series.data.\n\n node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth;\n });\n return tree.data;\n },\n\n /**\n * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'.\n * @returns {string} orient\n */\n getOrient: function () {\n var orient = this.get('orient');\n\n if (orient === 'horizontal') {\n orient = 'LR';\n } else if (orient === 'vertical') {\n orient = 'TB';\n }\n\n return orient;\n },\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n setCenter: function (center) {\n this.option.center = center;\n },\n\n /**\n * @override\n * @param {number} dataIndex\n */\n formatTooltip: function (dataIndex) {\n var tree = this.getData().tree;\n var realRoot = tree.root.children[0];\n var node = tree.getNodeByDataIndex(dataIndex);\n var value = node.getValue();\n var name = node.name;\n\n while (node && node !== realRoot) {\n name = node.parentNode.name + '.' + name;\n node = node.parentNode;\n }\n\n return encodeHTML(name + (isNaN(value) || value == null ? '' : ' : ' + value));\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // the position of the whole view\n left: '12%',\n top: '12%',\n right: '12%',\n bottom: '12%',\n // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'\n layout: 'orthogonal',\n // value can be 'polyline'\n edgeShape: 'curve',\n edgeForkPosition: '50%',\n // true | false | 'move' | 'scale', see module:component/helper/RoamController.\n roam: false,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.4,\n // Default on center of graph\n center: null,\n zoom: 1,\n // The orient of orthoginal layout, can be setted to 'LR', 'TB', 'RL', 'BT'.\n // and the backward compatibility configuration 'horizontal = LR', 'vertical = TB'.\n orient: 'LR',\n symbol: 'emptyCircle',\n symbolSize: 7,\n expandAndCollapse: true,\n initialTreeDepth: 2,\n lineStyle: {\n color: '#ccc',\n width: 1.5,\n curveness: 0.5\n },\n itemStyle: {\n color: 'lightsteelblue',\n borderColor: '#c23531',\n borderWidth: 1.5\n },\n label: {\n show: true,\n color: '#555'\n },\n leaves: {\n label: {\n show: true\n }\n },\n animationEasing: 'linear',\n animationDuration: 700,\n animationDurationUpdate: 1000\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar numberUtil = require(\"../util/number\");\n\nvar formatUtil = require(\"../util/format\");\n\nvar scaleHelper = require(\"./helper\");\n\nvar IntervalScale = require(\"./Interval\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* The \"scaleLevels\" was originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment on the definition of \"scaleLevels\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\n// [About UTC and local time zone]:\n// In most cases, `number.parseDate` will treat input data string as local time\n// (except time zone is specified in time string). And `format.formateTime` returns\n// local time by default. option.useUTC is false by default. This design have\n// concidered these common case:\n// (1) Time that is persistent in server is in UTC, but it is needed to be diplayed\n// in local time by default.\n// (2) By default, the input data string (e.g., '2011-01-02') should be displayed\n// as its original time, without any time difference.\nvar intervalScaleProto = IntervalScale.prototype;\nvar mathCeil = Math.ceil;\nvar mathFloor = Math.floor;\nvar ONE_SECOND = 1000;\nvar ONE_MINUTE = ONE_SECOND * 60;\nvar ONE_HOUR = ONE_MINUTE * 60;\nvar ONE_DAY = ONE_HOUR * 24; // FIXME 公用?\n\nvar bisect = function (a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n\n if (a[mid][1] < x) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n\n return lo;\n};\n/**\n * @alias module:echarts/coord/scale/Time\n * @constructor\n */\n\n\nvar TimeScale = IntervalScale.extend({\n type: 'time',\n\n /**\n * @override\n */\n getLabel: function (val) {\n var stepLvl = this._stepLvl;\n var date = new Date(val);\n return formatUtil.formatTime(stepLvl[0], date, this.getSetting('useUTC'));\n },\n\n /**\n * @override\n */\n niceExtent: function (opt) {\n var extent = this._extent; // If extent start and end are same, expand them\n\n if (extent[0] === extent[1]) {\n // Expand extent\n extent[0] -= ONE_DAY;\n extent[1] += ONE_DAY;\n } // If there are no data and extent are [Infinity, -Infinity]\n\n\n if (extent[1] === -Infinity && extent[0] === Infinity) {\n var d = new Date();\n extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate());\n extent[0] = extent[1] - ONE_DAY;\n }\n\n this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // var extent = this._extent;\n\n var interval = this._interval;\n\n if (!opt.fixMin) {\n extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval);\n }\n\n if (!opt.fixMax) {\n extent[1] = numberUtil.round(mathCeil(extent[1] / interval) * interval);\n }\n },\n\n /**\n * @override\n */\n niceTicks: function (approxTickNum, minInterval, maxInterval) {\n approxTickNum = approxTickNum || 10;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n var approxInterval = span / approxTickNum;\n\n if (minInterval != null && approxInterval < minInterval) {\n approxInterval = minInterval;\n }\n\n if (maxInterval != null && approxInterval > maxInterval) {\n approxInterval = maxInterval;\n }\n\n var scaleLevelsLen = scaleLevels.length;\n var idx = bisect(scaleLevels, approxInterval, 0, scaleLevelsLen);\n var level = scaleLevels[Math.min(idx, scaleLevelsLen - 1)];\n var interval = level[1]; // Same with interval scale if span is much larger than 1 year\n\n if (level[0] === 'year') {\n var yearSpan = span / interval; // From \"Nice Numbers for Graph Labels\" of Graphic Gems\n // var niceYearSpan = numberUtil.nice(yearSpan, false);\n\n var yearStep = numberUtil.nice(yearSpan / approxTickNum, true);\n interval *= yearStep;\n }\n\n var timezoneOffset = this.getSetting('useUTC') ? 0 : new Date(+extent[0] || +extent[1]).getTimezoneOffset() * 60 * 1000;\n var niceExtent = [Math.round(mathCeil((extent[0] - timezoneOffset) / interval) * interval + timezoneOffset), Math.round(mathFloor((extent[1] - timezoneOffset) / interval) * interval + timezoneOffset)];\n scaleHelper.fixExtent(niceExtent, extent);\n this._stepLvl = level; // Interval will be used in getTicks\n\n this._interval = interval;\n this._niceExtent = niceExtent;\n },\n parse: function (val) {\n // val might be float.\n return +numberUtil.parseDate(val);\n }\n});\nzrUtil.each(['contain', 'normalize'], function (methodName) {\n TimeScale.prototype[methodName] = function (val) {\n return intervalScaleProto[methodName].call(this, this.parse(val));\n };\n});\n/**\n * This implementation was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\n\nvar scaleLevels = [// Format interval\n['hh:mm:ss', ONE_SECOND], // 1s\n['hh:mm:ss', ONE_SECOND * 5], // 5s\n['hh:mm:ss', ONE_SECOND * 10], // 10s\n['hh:mm:ss', ONE_SECOND * 15], // 15s\n['hh:mm:ss', ONE_SECOND * 30], // 30s\n['hh:mm\\nMM-dd', ONE_MINUTE], // 1m\n['hh:mm\\nMM-dd', ONE_MINUTE * 5], // 5m\n['hh:mm\\nMM-dd', ONE_MINUTE * 10], // 10m\n['hh:mm\\nMM-dd', ONE_MINUTE * 15], // 15m\n['hh:mm\\nMM-dd', ONE_MINUTE * 30], // 30m\n['hh:mm\\nMM-dd', ONE_HOUR], // 1h\n['hh:mm\\nMM-dd', ONE_HOUR * 2], // 2h\n['hh:mm\\nMM-dd', ONE_HOUR * 6], // 6h\n['hh:mm\\nMM-dd', ONE_HOUR * 12], // 12h\n['MM-dd\\nyyyy', ONE_DAY], // 1d\n['MM-dd\\nyyyy', ONE_DAY * 2], // 2d\n['MM-dd\\nyyyy', ONE_DAY * 3], // 3d\n['MM-dd\\nyyyy', ONE_DAY * 4], // 4d\n['MM-dd\\nyyyy', ONE_DAY * 5], // 5d\n['MM-dd\\nyyyy', ONE_DAY * 6], // 6d\n['week', ONE_DAY * 7], // 7d\n['MM-dd\\nyyyy', ONE_DAY * 10], // 10d\n['week', ONE_DAY * 14], // 2w\n['week', ONE_DAY * 21], // 3w\n['month', ONE_DAY * 31], // 1M\n['week', ONE_DAY * 42], // 6w\n['month', ONE_DAY * 62], // 2M\n['week', ONE_DAY * 70], // 10w\n['quarter', ONE_DAY * 95], // 3M\n['month', ONE_DAY * 31 * 4], // 4M\n['month', ONE_DAY * 31 * 5], // 5M\n['half-year', ONE_DAY * 380 / 2], // 6M\n['month', ONE_DAY * 31 * 8], // 8M\n['month', ONE_DAY * 31 * 10], // 10M\n['year', ONE_DAY * 380] // 1Y\n];\n/**\n * @param {module:echarts/model/Model}\n * @return {module:echarts/scale/Time}\n */\n\nTimeScale.create = function (model) {\n return new TimeScale({\n useUTC: model.ecModel.get('useUTC')\n });\n};\n\nvar _default = TimeScale;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.line',\n dependencies: ['grid', 'polar'],\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // stack: null\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // If clip the overflow value\n clip: true,\n // cursor: null,\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n // areaStyle: {\n // origin of areaStyle. Valid values:\n // `'auto'/null/undefined`: from axisLine to data\n // `'start'`: from min to data\n // `'end'`: from data to max\n // origin: 'auto'\n // },\n // false, 'start', 'end', 'middle'\n step: false,\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n showSymbol: true,\n // `false`: follow the label interval strategy.\n // `true`: show all symbols.\n // `'auto'`: If possible, show all symbols, otherwise\n // follow the label interval strategy.\n showAllSymbol: 'auto',\n // Whether to connect break point.\n connectNulls: false,\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum'.\n sampling: 'none',\n animationEasing: 'linear',\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Component = require(\"../../model/Component\");\n\nrequire(\"./AxisModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = Component.extend({\n type: 'parallel',\n dependencies: ['parallelAxis'],\n\n /**\n * @type {module:echarts/coord/parallel/Parallel}\n */\n coordinateSystem: null,\n\n /**\n * Each item like: 'dim0', 'dim1', 'dim2', ...\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * Coresponding to dimensions.\n * @type {Array.}\n * @readOnly\n */\n parallelAxisIndex: null,\n layoutMode: 'box',\n defaultOption: {\n zlevel: 0,\n z: 0,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n layout: 'horizontal',\n // 'horizontal' or 'vertical'\n // FIXME\n // naming?\n axisExpandable: false,\n axisExpandCenter: null,\n axisExpandCount: 0,\n axisExpandWidth: 50,\n // FIXME '10%' ?\n axisExpandRate: 17,\n axisExpandDebounce: 50,\n // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.\n // Do not doc to user until necessary.\n axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],\n axisExpandTriggerOn: 'click',\n // 'mousemove' or 'click'\n parallelAxisDefault: null\n },\n\n /**\n * @override\n */\n init: function () {\n Component.prototype.init.apply(this, arguments);\n this.mergeOption({});\n },\n\n /**\n * @override\n */\n mergeOption: function (newOption) {\n var thisOption = this.option;\n newOption && zrUtil.merge(thisOption, newOption, true);\n\n this._initDimensions();\n },\n\n /**\n * Whether series or axis is in this coordinate system.\n * @param {module:echarts/model/Series|module:echarts/coord/parallel/AxisModel} model\n * @param {module:echarts/model/Global} ecModel\n */\n contains: function (model, ecModel) {\n var parallelIndex = model.get('parallelIndex');\n return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this;\n },\n setAxisExpand: function (opt) {\n zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) {\n if (opt.hasOwnProperty(name)) {\n this.option[name] = opt[name];\n }\n }, this);\n },\n\n /**\n * @private\n */\n _initDimensions: function () {\n var dimensions = this.dimensions = [];\n var parallelAxisIndex = this.parallelAxisIndex = [];\n var axisModels = zrUtil.filter(this.dependentModels.parallelAxis, function (axisModel) {\n // Can not use this.contains here, because\n // initialization has not been completed yet.\n return (axisModel.get('parallelIndex') || 0) === this.componentIndex;\n }, this);\n zrUtil.each(axisModels, function (axisModel) {\n dimensions.push('dim' + axisModel.get('dim'));\n parallelAxisIndex.push(axisModel.componentIndex);\n });\n }\n});\n\nmodule.exports = _default;","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, next, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};\n","/**\n * echarts设备环境识别\n *\n * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。\n * @author firede[firede@firede.us]\n * @desc thanks zepto.\n */\n\n/* global wx */\nvar env = {};\n\nif (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') {\n // In Weixin Application\n env = {\n browser: {},\n os: {},\n node: false,\n wxa: true,\n // Weixin Application\n canvasSupported: true,\n svgSupported: false,\n touchEventsSupported: true,\n domSupported: false\n };\n} else if (typeof document === 'undefined' && typeof self !== 'undefined') {\n // In worker\n env = {\n browser: {},\n os: {},\n node: false,\n worker: true,\n canvasSupported: true,\n domSupported: false\n };\n} else if (typeof navigator === 'undefined') {\n // In node\n env = {\n browser: {},\n os: {},\n node: true,\n worker: false,\n // Assume canvas is supported\n canvasSupported: true,\n svgSupported: true,\n domSupported: false\n };\n} else {\n env = detect(navigator.userAgent);\n}\n\nvar _default = env; // Zepto.js\n// (c) 2010-2013 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\nfunction detect(ua) {\n var os = {};\n var browser = {}; // var webkit = ua.match(/Web[kK]it[\\/]{0,1}([\\d.]+)/);\n // var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n // var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n // var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n // var iphone = !ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);\n // var webos = ua.match(/(webOS|hpwOS)[\\s\\/]([\\d.]+)/);\n // var touchpad = webos && ua.match(/TouchPad/);\n // var kindle = ua.match(/Kindle\\/([\\d.]+)/);\n // var silk = ua.match(/Silk\\/([\\d._]+)/);\n // var blackberry = ua.match(/(BlackBerry).*Version\\/([\\d.]+)/);\n // var bb10 = ua.match(/(BB10).*Version\\/([\\d.]+)/);\n // var rimtabletos = ua.match(/(RIM\\sTablet\\sOS)\\s([\\d.]+)/);\n // var playbook = ua.match(/PlayBook/);\n // var chrome = ua.match(/Chrome\\/([\\d.]+)/) || ua.match(/CriOS\\/([\\d.]+)/);\n\n var firefox = ua.match(/Firefox\\/([\\d.]+)/); // var safari = webkit && ua.match(/Mobile\\//) && !chrome;\n // var webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome;\n\n var ie = ua.match(/MSIE\\s([\\d.]+)/) // IE 11 Trident/7.0; rv:11.0\n || ua.match(/Trident\\/.+?rv:(([\\d.]+))/);\n var edge = ua.match(/Edge\\/([\\d.]+)/); // IE 12 and 12+\n\n var weChat = /micromessenger/i.test(ua); // Todo: clean this up with a better OS/browser seperation:\n // - discern (more) between multiple browsers on android\n // - decide if kindle fire in silk mode is android or not\n // - Firefox on Android doesn't specify the Android version\n // - possibly devide in os, device and browser hashes\n // if (browser.webkit = !!webkit) browser.version = webkit[1];\n // if (android) os.android = true, os.version = android[2];\n // if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.');\n // if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.');\n // if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n // if (webos) os.webos = true, os.version = webos[2];\n // if (touchpad) os.touchpad = true;\n // if (blackberry) os.blackberry = true, os.version = blackberry[2];\n // if (bb10) os.bb10 = true, os.version = bb10[2];\n // if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2];\n // if (playbook) browser.playbook = true;\n // if (kindle) os.kindle = true, os.version = kindle[1];\n // if (silk) browser.silk = true, browser.version = silk[1];\n // if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true;\n // if (chrome) browser.chrome = true, browser.version = chrome[1];\n\n if (firefox) {\n browser.firefox = true;\n browser.version = firefox[1];\n } // if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true;\n // if (webview) browser.webview = true;\n\n\n if (ie) {\n browser.ie = true;\n browser.version = ie[1];\n }\n\n if (edge) {\n browser.edge = true;\n browser.version = edge[1];\n } // It is difficult to detect WeChat in Win Phone precisely, because ua can\n // not be set on win phone. So we do not consider Win Phone.\n\n\n if (weChat) {\n browser.weChat = true;\n } // os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) ||\n // (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/)));\n // os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos ||\n // (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\\/([\\d.]+)/)) ||\n // (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/))));\n\n\n return {\n browser: browser,\n os: os,\n node: false,\n // 原生canvas支持,改极端点了\n // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9)\n canvasSupported: !!document.createElement('canvas').getContext,\n svgSupported: typeof SVGRect !== 'undefined',\n // works on most browsers\n // IE10/11 does not support touch event, and MS Edge supports them but not by\n // default, so we dont check navigator.maxTouchPoints for them here.\n touchEventsSupported: 'ontouchstart' in window && !browser.ie && !browser.edge,\n // .\n pointerEventsSupported: // (1) Firefox supports pointer but not by default, only MS browsers are reliable on pointer\n // events currently. So we dont use that on other browsers unless tested sufficiently.\n // For example, in iOS 13 Mobile Chromium 78, if the touching behavior starts page\n // scroll, the `pointermove` event can not be fired any more. That will break some\n // features like \"pan horizontally to move something and pan vertically to page scroll\".\n // The horizontal pan probably be interrupted by the casually triggered page scroll.\n // (2) Although IE 10 supports pointer event, it use old style and is different from the\n // standard. So we exclude that. (IE 10 is hardly used on touch device)\n 'onpointerdown' in window && (browser.edge || browser.ie && browser.version >= 11),\n // passiveSupported: detectPassiveSupport()\n domSupported: typeof document !== 'undefined'\n };\n} // See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n// function detectPassiveSupport() {\n// // Test via a getter in the options object to see if the passive property is accessed\n// var supportsPassive = false;\n// try {\n// var opts = Object.defineProperty({}, 'passive', {\n// get: function() {\n// supportsPassive = true;\n// }\n// });\n// window.addEventListener('testPassive', function() {}, opts);\n// } catch (e) {\n// }\n// return supportsPassive;\n// }\n\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar layout = require(\"../../util/layout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* The tree layoutHelper implementation was originally copied from\n* \"d3.js\"(https://github.com/d3/d3-hierarchy) with\n* some modifications made for this project.\n* (see more details in the comment of the specific method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the licence of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\n\n/**\n * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing\n * the tree.\n */\n\n/**\n * Initialize all computational message for following algorithm.\n *\n * @param {module:echarts/data/Tree~TreeNode} root The virtual root of the tree.\n */\nfunction init(root) {\n root.hierNode = {\n defaultAncestor: null,\n ancestor: root,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: 0,\n thread: null\n };\n var nodes = [root];\n var node;\n var children;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n children = node.children;\n\n if (node.isExpand && children.length) {\n var n = children.length;\n\n for (var i = n - 1; i >= 0; i--) {\n var child = children[i];\n child.hierNode = {\n defaultAncestor: null,\n ancestor: child,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: i,\n thread: null\n };\n nodes.push(child);\n }\n }\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes a preliminary x coordinate for node. Before that, this function is\n * applied recursively to the children of node, as well as the function\n * apportion(). After spacing out the children by calling executeShifts(), the\n * node is placed to the midpoint of its outermost children.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Function} separation\n */\n\n\nfunction firstWalk(node, separation) {\n var children = node.isExpand ? node.children : [];\n var siblings = node.parentNode.children;\n var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null;\n\n if (children.length) {\n executeShifts(node);\n var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2;\n\n if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n node.hierNode.modifier = node.hierNode.prelim - midPoint;\n } else {\n node.hierNode.prelim = midPoint;\n }\n } else if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n }\n\n node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation);\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes all real x-coordinates by summing up the modifiers recursively.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\n\n\nfunction secondWalk(node) {\n var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;\n node.setLayout({\n x: nodeX\n }, true);\n node.hierNode.modifier += node.parentNode.hierNode.modifier;\n}\n\nfunction separation(cb) {\n return arguments.length ? cb : defaultSeparation;\n}\n/**\n * Transform the common coordinate to radial coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @return {Object}\n */\n\n\nfunction radialCoordinate(x, y) {\n var radialCoor = {};\n x -= Math.PI / 2;\n radialCoor.x = y * Math.cos(x);\n radialCoor.y = y * Math.sin(x);\n return radialCoor;\n}\n/**\n * Get the layout position of the whole view.\n *\n * @param {module:echarts/model/Series} seriesModel the model object of sankey series\n * @param {module:echarts/ExtensionAPI} api provide the API list that the developer can call\n * @return {module:zrender/core/BoundingRect} size of rect to draw the sankey view\n */\n\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n/**\n * All other shifts, applied to the smaller subtrees between w- and w+, are\n * performed by this function.\n *\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\n\n\nfunction executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\n\n while (--n >= 0) {\n var child = children[n];\n child.hierNode.prelim += shift;\n child.hierNode.modifier += shift;\n change += child.hierNode.change;\n shift += child.hierNode.shift + change;\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * The core of the algorithm. Here, a new subtree is combined with the\n * previous subtrees. Threads are used to traverse the inside and outside\n * contours of the left and right subtree up to the highest common level.\n * Whenever two nodes of the inside contours conflict, we compute the left\n * one of the greatest uncommon ancestors using the function nextAncestor()\n * and call moveSubtree() to shift the subtree and prepare the shifts of\n * smaller subtrees. Finally, we add a new thread (if necessary).\n *\n * @param {module:echarts/data/Tree~TreeNode} subtreeV\n * @param {module:echarts/data/Tree~TreeNode} subtreeW\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @param {Function} separation\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction apportion(subtreeV, subtreeW, ancestor, separation) {\n if (subtreeW) {\n var nodeOutRight = subtreeV;\n var nodeInRight = subtreeV;\n var nodeOutLeft = nodeInRight.parentNode.children[0];\n var nodeInLeft = subtreeW;\n var sumOutRight = nodeOutRight.hierNode.modifier;\n var sumInRight = nodeInRight.hierNode.modifier;\n var sumOutLeft = nodeOutLeft.hierNode.modifier;\n var sumInLeft = nodeInLeft.hierNode.modifier;\n\n while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) {\n nodeOutRight = nextRight(nodeOutRight);\n nodeOutLeft = nextLeft(nodeOutLeft);\n nodeOutRight.hierNode.ancestor = subtreeV;\n var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight);\n\n if (shift > 0) {\n moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift);\n sumInRight += shift;\n sumOutRight += shift;\n }\n\n sumInLeft += nodeInLeft.hierNode.modifier;\n sumInRight += nodeInRight.hierNode.modifier;\n sumOutRight += nodeOutRight.hierNode.modifier;\n sumOutLeft += nodeOutLeft.hierNode.modifier;\n }\n\n if (nodeInLeft && !nextRight(nodeOutRight)) {\n nodeOutRight.hierNode.thread = nodeInLeft;\n nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight;\n }\n\n if (nodeInRight && !nextLeft(nodeOutLeft)) {\n nodeOutLeft.hierNode.thread = nodeInRight;\n nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft;\n ancestor = subtreeV;\n }\n }\n\n return ancestor;\n}\n/**\n * This function is used to traverse the right contour of a subtree.\n * It returns the rightmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextRight(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;\n}\n/**\n * This function is used to traverse the left contour of a subtree (or a subforest).\n * It returns the leftmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextLeft(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[0] : node.hierNode.thread;\n}\n/**\n * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.\n * Otherwise, returns the specified ancestor.\n *\n * @param {module:echarts/data/Tree~TreeNode} nodeInLeft\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextAncestor(nodeInLeft, node, ancestor) {\n return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Shifts the current subtree rooted at wr.\n * This is done by increasing prelim(w+) and modifier(w+) by shift.\n *\n * @param {module:echarts/data/Tree~TreeNode} wl\n * @param {module:echarts/data/Tree~TreeNode} wr\n * @param {number} shift [description]\n */\n\n\nfunction moveSubtree(wl, wr, shift) {\n var change = shift / (wr.hierNode.i - wl.hierNode.i);\n wr.hierNode.change -= change;\n wr.hierNode.shift += shift;\n wr.hierNode.modifier += shift;\n wr.hierNode.prelim += shift;\n wl.hierNode.change += change;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\n\n\nfunction defaultSeparation(node1, node2) {\n return node1.parentNode === node2.parentNode ? 1 : 2;\n}\n\nexports.init = init;\nexports.firstWalk = firstWalk;\nexports.secondWalk = secondWalk;\nexports.separation = separation;\nexports.radialCoordinate = radialCoordinate;\nexports.getViewRect = getViewRect;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar pathTool = require(\"zrender/lib/tool/path\");\n\nvar colorTool = require(\"zrender/lib/tool/color\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar vector = require(\"zrender/lib/core/vector\");\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\nvar Transformable = require(\"zrender/lib/mixin/Transformable\");\n\nvar ZImage = require(\"zrender/lib/graphic/Image\");\n\nexports.Image = ZImage;\n\nvar Group = require(\"zrender/lib/container/Group\");\n\nexports.Group = Group;\n\nvar Text = require(\"zrender/lib/graphic/Text\");\n\nexports.Text = Text;\n\nvar Circle = require(\"zrender/lib/graphic/shape/Circle\");\n\nexports.Circle = Circle;\n\nvar Sector = require(\"zrender/lib/graphic/shape/Sector\");\n\nexports.Sector = Sector;\n\nvar Ring = require(\"zrender/lib/graphic/shape/Ring\");\n\nexports.Ring = Ring;\n\nvar Polygon = require(\"zrender/lib/graphic/shape/Polygon\");\n\nexports.Polygon = Polygon;\n\nvar Polyline = require(\"zrender/lib/graphic/shape/Polyline\");\n\nexports.Polyline = Polyline;\n\nvar Rect = require(\"zrender/lib/graphic/shape/Rect\");\n\nexports.Rect = Rect;\n\nvar Line = require(\"zrender/lib/graphic/shape/Line\");\n\nexports.Line = Line;\n\nvar BezierCurve = require(\"zrender/lib/graphic/shape/BezierCurve\");\n\nexports.BezierCurve = BezierCurve;\n\nvar Arc = require(\"zrender/lib/graphic/shape/Arc\");\n\nexports.Arc = Arc;\n\nvar CompoundPath = require(\"zrender/lib/graphic/CompoundPath\");\n\nexports.CompoundPath = CompoundPath;\n\nvar LinearGradient = require(\"zrender/lib/graphic/LinearGradient\");\n\nexports.LinearGradient = LinearGradient;\n\nvar RadialGradient = require(\"zrender/lib/graphic/RadialGradient\");\n\nexports.RadialGradient = RadialGradient;\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nexports.BoundingRect = BoundingRect;\n\nvar IncrementalDisplayable = require(\"zrender/lib/graphic/IncrementalDisplayable\");\n\nexports.IncrementalDisplayable = IncrementalDisplayable;\n\nvar subPixelOptimizeUtil = require(\"zrender/lib/graphic/helper/subPixelOptimize\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar EMPTY_OBJ = {};\nvar Z2_EMPHASIS_LIFT = 1; // key: label model property nane, value: style property name.\n\nvar CACHED_LABEL_STYLE_PROPERTIES = {\n color: 'textFill',\n textBorderColor: 'textStroke',\n textBorderWidth: 'textStrokeWidth'\n};\nvar EMPHASIS = 'emphasis';\nvar NORMAL = 'normal'; // Reserve 0 as default.\n\nvar _highlightNextDigit = 1;\nvar _highlightKeyMap = {};\nvar _customShapeMap = {};\n/**\n * Extend shape with parameters\n */\n\nfunction extendShape(opts) {\n return Path.extend(opts);\n}\n/**\n * Extend path\n */\n\n\nfunction extendPath(pathData, opts) {\n return pathTool.extendFromString(pathData, opts);\n}\n/**\n * Register a user defined shape.\n * The shape class can be fetched by `getShapeClass`\n * This method will overwrite the registered shapes, including\n * the registered built-in shapes, if using the same `name`.\n * The shape can be used in `custom series` and\n * `graphic component` by declaring `{type: name}`.\n *\n * @param {string} name\n * @param {Object} ShapeClass Can be generated by `extendShape`.\n */\n\n\nfunction registerShape(name, ShapeClass) {\n _customShapeMap[name] = ShapeClass;\n}\n/**\n * Find shape class registered by `registerShape`. Usually used in\n * fetching user defined shape.\n *\n * [Caution]:\n * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared\n * to use user registered shapes.\n * Because the built-in shape (see `getBuiltInShape`) will be registered by\n * `registerShape` by default. That enables users to get both built-in\n * shapes as well as the shapes belonging to themsleves. But users can overwrite\n * the built-in shapes by using names like 'circle', 'rect' via calling\n * `registerShape`. So the echarts inner featrues should not fetch shapes from here\n * in case that it is overwritten by users, except that some features, like\n * `custom series`, `graphic component`, do it deliberately.\n *\n * (2) In the features like `custom series`, `graphic component`, the user input\n * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic\n * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names\n * are reserved names, that is, if some user register a shape named `'image'`,\n * the shape will not be used. If we intending to add some more reserved names\n * in feature, that might bring break changes (disable some existing user shape\n * names). But that case probably rearly happen. So we dont make more mechanism\n * to resolve this issue here.\n *\n * @param {string} name\n * @return {Object} The shape class. If not found, return nothing.\n */\n\n\nfunction getShapeClass(name) {\n if (_customShapeMap.hasOwnProperty(name)) {\n return _customShapeMap[name];\n }\n}\n/**\n * Create a path element from path data string\n * @param {string} pathData\n * @param {Object} opts\n * @param {module:zrender/core/BoundingRect} rect\n * @param {string} [layout=cover] 'center' or 'cover'\n */\n\n\nfunction makePath(pathData, opts, rect, layout) {\n var path = pathTool.createFromString(pathData, opts);\n\n if (rect) {\n if (layout === 'center') {\n rect = centerGraphic(rect, path.getBoundingRect());\n }\n\n resizePath(path, rect);\n }\n\n return path;\n}\n/**\n * Create a image element from image url\n * @param {string} imageUrl image url\n * @param {Object} opts options\n * @param {module:zrender/core/BoundingRect} rect constrain rect\n * @param {string} [layout=cover] 'center' or 'cover'\n */\n\n\nfunction makeImage(imageUrl, rect, layout) {\n var path = new ZImage({\n style: {\n image: imageUrl,\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n onload: function (img) {\n if (layout === 'center') {\n var boundingRect = {\n width: img.width,\n height: img.height\n };\n path.setStyle(centerGraphic(rect, boundingRect));\n }\n }\n });\n return path;\n}\n/**\n * Get position of centered element in bounding box.\n *\n * @param {Object} rect element local bounding box\n * @param {Object} boundingRect constraint bounding box\n * @return {Object} element position containing x, y, width, and height\n */\n\n\nfunction centerGraphic(rect, boundingRect) {\n // Set rect to center, keep width / height ratio.\n var aspect = boundingRect.width / boundingRect.height;\n var width = rect.height * aspect;\n var height;\n\n if (width <= rect.width) {\n height = rect.height;\n } else {\n width = rect.width;\n height = width / aspect;\n }\n\n var cx = rect.x + rect.width / 2;\n var cy = rect.y + rect.height / 2;\n return {\n x: cx - width / 2,\n y: cy - height / 2,\n width: width,\n height: height\n };\n}\n\nvar mergePath = pathTool.mergePath;\n/**\n * Resize a path to fit the rect\n * @param {module:zrender/graphic/Path} path\n * @param {Object} rect\n */\n\nfunction resizePath(path, rect) {\n if (!path.applyTransform) {\n return;\n }\n\n var pathRect = path.getBoundingRect();\n var m = pathRect.calculateTransform(rect);\n path.applyTransform(m);\n}\n/**\n * Sub pixel optimize line for canvas\n *\n * @param {Object} param\n * @param {Object} [param.shape]\n * @param {number} [param.shape.x1]\n * @param {number} [param.shape.y1]\n * @param {number} [param.shape.x2]\n * @param {number} [param.shape.y2]\n * @param {Object} [param.style]\n * @param {number} [param.style.lineWidth]\n * @return {Object} Modified param\n */\n\n\nfunction subPixelOptimizeLine(param) {\n subPixelOptimizeUtil.subPixelOptimizeLine(param.shape, param.shape, param.style);\n return param;\n}\n/**\n * Sub pixel optimize rect for canvas\n *\n * @param {Object} param\n * @param {Object} [param.shape]\n * @param {number} [param.shape.x]\n * @param {number} [param.shape.y]\n * @param {number} [param.shape.width]\n * @param {number} [param.shape.height]\n * @param {Object} [param.style]\n * @param {number} [param.style.lineWidth]\n * @return {Object} Modified param\n */\n\n\nfunction subPixelOptimizeRect(param) {\n subPixelOptimizeUtil.subPixelOptimizeRect(param.shape, param.shape, param.style);\n return param;\n}\n/**\n * Sub pixel optimize for canvas\n *\n * @param {number} position Coordinate, such as x, y\n * @param {number} lineWidth Should be nonnegative integer.\n * @param {boolean=} positiveOrNegative Default false (negative).\n * @return {number} Optimized position.\n */\n\n\nvar subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize;\n\nfunction hasFillOrStroke(fillOrStroke) {\n return fillOrStroke != null && fillOrStroke !== 'none';\n} // Most lifted color are duplicated.\n\n\nvar liftedColorMap = zrUtil.createHashMap();\nvar liftedColorCount = 0;\n\nfunction liftColor(color) {\n if (typeof color !== 'string') {\n return color;\n }\n\n var liftedColor = liftedColorMap.get(color);\n\n if (!liftedColor) {\n liftedColor = colorTool.lift(color, -0.1);\n\n if (liftedColorCount < 10000) {\n liftedColorMap.set(color, liftedColor);\n liftedColorCount++;\n }\n }\n\n return liftedColor;\n}\n\nfunction cacheElementStl(el) {\n if (!el.__hoverStlDirty) {\n return;\n }\n\n el.__hoverStlDirty = false;\n var hoverStyle = el.__hoverStl;\n\n if (!hoverStyle) {\n el.__cachedNormalStl = el.__cachedNormalZ2 = null;\n return;\n }\n\n var normalStyle = el.__cachedNormalStl = {};\n el.__cachedNormalZ2 = el.z2;\n var elStyle = el.style;\n\n for (var name in hoverStyle) {\n // See comment in `singleEnterEmphasis`.\n if (hoverStyle[name] != null) {\n normalStyle[name] = elStyle[name];\n }\n } // Always cache fill and stroke to normalStyle for lifting color.\n\n\n normalStyle.fill = elStyle.fill;\n normalStyle.stroke = elStyle.stroke;\n}\n\nfunction singleEnterEmphasis(el) {\n var hoverStl = el.__hoverStl;\n\n if (!hoverStl || el.__highlighted) {\n return;\n }\n\n var zr = el.__zr;\n var useHoverLayer = el.useHoverLayer && zr && zr.painter.type === 'canvas';\n el.__highlighted = useHoverLayer ? 'layer' : 'plain';\n\n if (el.isGroup || !zr && el.useHoverLayer) {\n return;\n }\n\n var elTarget = el;\n var targetStyle = el.style;\n\n if (useHoverLayer) {\n elTarget = zr.addHover(el);\n targetStyle = elTarget.style;\n }\n\n rollbackDefaultTextStyle(targetStyle);\n\n if (!useHoverLayer) {\n cacheElementStl(elTarget);\n } // styles can be:\n // {\n // label: {\n // show: false,\n // position: 'outside',\n // fontSize: 18\n // },\n // emphasis: {\n // label: {\n // show: true\n // }\n // }\n // },\n // where properties of `emphasis` may not appear in `normal`. We previously use\n // module:echarts/util/model#defaultEmphasis to merge `normal` to `emphasis`.\n // But consider rich text and setOption in merge mode, it is impossible to cover\n // all properties in merge. So we use merge mode when setting style here.\n // But we choose the merge strategy that only properties that is not `null/undefined`.\n // Because when making a textStyle (espacially rich text), it is not easy to distinguish\n // `hasOwnProperty` and `null/undefined` in code, so we trade them as the same for simplicity.\n // But this strategy brings a trouble that `null/undefined` can not be used to remove\n // style any more in `emphasis`. Users can both set properties directly on normal and\n // emphasis to avoid this issue, or we might support `'none'` for this case if required.\n\n\n targetStyle.extendFrom(hoverStl);\n setDefaultHoverFillStroke(targetStyle, hoverStl, 'fill');\n setDefaultHoverFillStroke(targetStyle, hoverStl, 'stroke');\n applyDefaultTextStyle(targetStyle);\n\n if (!useHoverLayer) {\n el.dirty(false);\n el.z2 += Z2_EMPHASIS_LIFT;\n }\n}\n\nfunction setDefaultHoverFillStroke(targetStyle, hoverStyle, prop) {\n if (!hasFillOrStroke(hoverStyle[prop]) && hasFillOrStroke(targetStyle[prop])) {\n targetStyle[prop] = liftColor(targetStyle[prop]);\n }\n}\n\nfunction singleEnterNormal(el) {\n var highlighted = el.__highlighted;\n\n if (!highlighted) {\n return;\n }\n\n el.__highlighted = false;\n\n if (el.isGroup) {\n return;\n }\n\n if (highlighted === 'layer') {\n el.__zr && el.__zr.removeHover(el);\n } else {\n var style = el.style;\n var normalStl = el.__cachedNormalStl;\n\n if (normalStl) {\n rollbackDefaultTextStyle(style);\n el.setStyle(normalStl);\n applyDefaultTextStyle(style);\n } // `__cachedNormalZ2` will not be reset if calling `setElementHoverStyle`\n // when `el` is on emphasis state. So here by comparing with 1, we try\n // hard to make the bug case rare.\n\n\n var normalZ2 = el.__cachedNormalZ2;\n\n if (normalZ2 != null && el.z2 - normalZ2 === Z2_EMPHASIS_LIFT) {\n el.z2 = normalZ2;\n }\n }\n}\n\nfunction traverseUpdate(el, updater, commonParam) {\n // If root is group, also enter updater for `highDownOnUpdate`.\n var fromState = NORMAL;\n var toState = NORMAL;\n var trigger; // See the rule of `highDownOnUpdate` on `graphic.setAsHighDownDispatcher`.\n\n el.__highlighted && (fromState = EMPHASIS, trigger = true);\n updater(el, commonParam);\n el.__highlighted && (toState = EMPHASIS, trigger = true);\n el.isGroup && el.traverse(function (child) {\n !child.isGroup && updater(child, commonParam);\n });\n trigger && el.__highDownOnUpdate && el.__highDownOnUpdate(fromState, toState);\n}\n/**\n * Set hover style (namely \"emphasis style\") of element, based on the current\n * style of the given `el`.\n * This method should be called after all of the normal styles have been adopted\n * to the `el`. See the reason on `setHoverStyle`.\n *\n * @param {module:zrender/Element} el Should not be `zrender/container/Group`.\n * @param {Object} [el.hoverStyle] Can be set on el or its descendants,\n * e.g., `el.hoverStyle = ...; graphic.setHoverStyle(el); `.\n * Often used when item group has a label element and it's hoverStyle is different.\n * @param {Object|boolean} [hoverStl] The specified hover style.\n * If set as `false`, disable the hover style.\n * Similarly, The `el.hoverStyle` can alse be set\n * as `false` to disable the hover style.\n * Otherwise, use the default hover style if not provided.\n */\n\n\nfunction setElementHoverStyle(el, hoverStl) {\n // For performance consideration, it might be better to make the \"hover style\" only the\n // difference properties from the \"normal style\", but not a entire copy of all styles.\n hoverStl = el.__hoverStl = hoverStl !== false && (el.hoverStyle || hoverStl || {});\n el.__hoverStlDirty = true; // FIXME\n // It is not completely right to save \"normal\"/\"emphasis\" flag on elements.\n // It probably should be saved on `data` of series. Consider the cases:\n // (1) A highlighted elements are moved out of the view port and re-enter\n // again by dataZoom.\n // (2) call `setOption` and replace elements totally when they are highlighted.\n\n if (el.__highlighted) {\n // Consider the case:\n // The styles of a highlighted `el` is being updated. The new \"emphasis style\"\n // should be adapted to the `el`. Notice here new \"normal styles\" should have\n // been set outside and the cached \"normal style\" is out of date.\n el.__cachedNormalStl = null; // Do not clear `__cachedNormalZ2` here, because setting `z2` is not a constraint\n // of this method. In most cases, `z2` is not set and hover style should be able\n // to rollback. Of course, that would bring bug, but only in a rare case, see\n // `doSingleLeaveHover` for details.\n\n singleEnterNormal(el);\n singleEnterEmphasis(el);\n }\n}\n\nfunction onElementMouseOver(e) {\n !shouldSilent(this, e) // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !this.__highByOuter && traverseUpdate(this, singleEnterEmphasis);\n}\n\nfunction onElementMouseOut(e) {\n !shouldSilent(this, e) // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !this.__highByOuter && traverseUpdate(this, singleEnterNormal);\n}\n\nfunction onElementEmphasisEvent(highlightDigit) {\n this.__highByOuter |= 1 << (highlightDigit || 0);\n traverseUpdate(this, singleEnterEmphasis);\n}\n\nfunction onElementNormalEvent(highlightDigit) {\n !(this.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdate(this, singleEnterNormal);\n}\n\nfunction shouldSilent(el, e) {\n return el.__highDownSilentOnTouch && e.zrByTouch;\n}\n/**\n * Set hover style (namely \"emphasis style\") of element,\n * based on the current style of the given `el`.\n *\n * (1)\n * **CONSTRAINTS** for this method:\n * This method MUST be called after all of the normal styles having been adopted\n * to the `el`.\n * The input `hoverStyle` (that is, \"emphasis style\") MUST be the subset of the\n * \"normal style\" having been set to the el.\n * `color` MUST be one of the \"normal styles\" (because color might be lifted as\n * a default hover style).\n *\n * The reason: this method treat the current style of the `el` as the \"normal style\"\n * and cache them when enter/update the \"emphasis style\". Consider the case: the `el`\n * is in \"emphasis\" state and `setOption`/`dispatchAction` trigger the style updating\n * logic, where the el should shift from the original emphasis style to the new\n * \"emphasis style\" and should be able to \"downplay\" back to the new \"normal style\".\n *\n * Indeed, it is error-prone to make a interface has so many constraints, but I have\n * not found a better solution yet to fit the backward compatibility, performance and\n * the current programming style.\n *\n * (2)\n * Call the method for a \"root\" element once. Do not call it for each descendants.\n * If the descendants elemenets of a group has itself hover style different from the\n * root group, we can simply mount the style on `el.hoverStyle` for them, but should\n * not call this method for them.\n *\n * (3) These input parameters can be set directly on `el`:\n *\n * @param {module:zrender/Element} el\n * @param {Object} [el.hoverStyle] See `graphic.setElementHoverStyle`.\n * @param {boolean} [el.highDownSilentOnTouch=false] See `graphic.setAsHighDownDispatcher`.\n * @param {Function} [el.highDownOnUpdate] See `graphic.setAsHighDownDispatcher`.\n * @param {Object|boolean} [hoverStyle] See `graphic.setElementHoverStyle`.\n */\n\n\nfunction setHoverStyle(el, hoverStyle) {\n setAsHighDownDispatcher(el, true);\n traverseUpdate(el, setElementHoverStyle, hoverStyle);\n}\n/**\n * @param {module:zrender/Element} el\n * @param {Function} [el.highDownOnUpdate] Called when state updated.\n * Since `setHoverStyle` has the constraint that it must be called after\n * all of the normal style updated, `highDownOnUpdate` is not needed to\n * trigger if both `fromState` and `toState` is 'normal', and needed to\n * trigger if both `fromState` and `toState` is 'emphasis', which enables\n * to sync outside style settings to \"emphasis\" state.\n * @this {string} This dispatcher `el`.\n * @param {string} fromState Can be \"normal\" or \"emphasis\".\n * `fromState` might equal to `toState`,\n * for example, when this method is called when `el` is\n * on \"emphasis\" state.\n * @param {string} toState Can be \"normal\" or \"emphasis\".\n *\n * FIXME\n * CAUTION: Do not expose `highDownOnUpdate` outside echarts.\n * Because it is not a complete solution. The update\n * listener should not have been mount in element,\n * and the normal/emphasis state should not have\n * mantained on elements.\n *\n * @param {boolean} [el.highDownSilentOnTouch=false]\n * In touch device, mouseover event will be trigger on touchstart event\n * (see module:zrender/dom/HandlerProxy). By this mechanism, we can\n * conveniently use hoverStyle when tap on touch screen without additional\n * code for compatibility.\n * But if the chart/component has select feature, which usually also use\n * hoverStyle, there might be conflict between 'select-highlight' and\n * 'hover-highlight' especially when roam is enabled (see geo for example).\n * In this case, `highDownSilentOnTouch` should be used to disable\n * hover-highlight on touch device.\n * @param {boolean} [asDispatcher=true] If `false`, do not set as \"highDownDispatcher\".\n */\n\n\nfunction setAsHighDownDispatcher(el, asDispatcher) {\n var disable = asDispatcher === false; // Make `highDownSilentOnTouch` and `highDownOnUpdate` only work after\n // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly.\n\n el.__highDownSilentOnTouch = el.highDownSilentOnTouch;\n el.__highDownOnUpdate = el.highDownOnUpdate; // Simple optimize, since this method might be\n // called for each elements of a group in some cases.\n\n if (!disable || el.__highDownDispatcher) {\n var method = disable ? 'off' : 'on'; // Duplicated function will be auto-ignored, see Eventful.js.\n\n el[method]('mouseover', onElementMouseOver)[method]('mouseout', onElementMouseOut); // Emphasis, normal can be triggered manually by API or other components like hover link.\n\n el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent); // Also keep previous record.\n\n el.__highByOuter = el.__highByOuter || 0;\n el.__highDownDispatcher = !disable;\n }\n}\n/**\n * @param {module:zrender/src/Element} el\n * @return {boolean}\n */\n\n\nfunction isHighDownDispatcher(el) {\n return !!(el && el.__highDownDispatcher);\n}\n/**\n * Support hightlight/downplay record on each elements.\n * For the case: hover highlight/downplay (legend, visualMap, ...) and\n * user triggerred hightlight/downplay should not conflict.\n * Only all of the highlightDigit cleared, return to normal.\n * @param {string} highlightKey\n * @return {number} highlightDigit\n */\n\n\nfunction getHighlightDigit(highlightKey) {\n var highlightDigit = _highlightKeyMap[highlightKey];\n\n if (highlightDigit == null && _highlightNextDigit <= 32) {\n highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++;\n }\n\n return highlightDigit;\n}\n/**\n * See more info in `setTextStyleCommon`.\n * @param {Object|module:zrender/graphic/Style} normalStyle\n * @param {Object} emphasisStyle\n * @param {module:echarts/model/Model} normalModel\n * @param {module:echarts/model/Model} emphasisModel\n * @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.\n * @param {string|Function} [opt.defaultText]\n * @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by\n * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {number} [opt.labelDataIndex] Fetch text by\n * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {number} [opt.labelDimIndex] Fetch text by\n * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {string} [opt.labelProp] Fetch text by\n * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {Object} [normalSpecified]\n * @param {Object} [emphasisSpecified]\n */\n\n\nfunction setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisModel, opt, normalSpecified, emphasisSpecified) {\n opt = opt || EMPTY_OBJ;\n var labelFetcher = opt.labelFetcher;\n var labelDataIndex = opt.labelDataIndex;\n var labelDimIndex = opt.labelDimIndex;\n var labelProp = opt.labelProp; // This scenario, `label.normal.show = true; label.emphasis.show = false`,\n // is not supported util someone requests.\n\n var showNormal = normalModel.getShallow('show');\n var showEmphasis = emphasisModel.getShallow('show'); // Consider performance, only fetch label when necessary.\n // If `normal.show` is `false` and `emphasis.show` is `true` and `emphasis.formatter` is not set,\n // label should be displayed, where text is fetched by `normal.formatter` or `opt.defaultText`.\n\n var baseText;\n\n if (showNormal || showEmphasis) {\n if (labelFetcher) {\n baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);\n }\n\n if (baseText == null) {\n baseText = zrUtil.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;\n }\n }\n\n var normalStyleText = showNormal ? baseText : null;\n var emphasisStyleText = showEmphasis ? zrUtil.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp) : null, baseText) : null; // Optimize: If style.text is null, text will not be drawn.\n\n if (normalStyleText != null || emphasisStyleText != null) {\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n // If we set default values on `emphasisStyle`, consider case:\n // Firstly, `setOption(... label: {normal: {text: null}, emphasis: {show: true}} ...);`\n // Secondly, `setOption(... label: {noraml: {show: true, text: 'abc', color: 'red'} ...);`\n // Then the 'red' will not work on emphasis.\n setTextStyle(normalStyle, normalModel, normalSpecified, opt);\n setTextStyle(emphasisStyle, emphasisModel, emphasisSpecified, opt, true);\n }\n\n normalStyle.text = normalStyleText;\n emphasisStyle.text = emphasisStyleText;\n}\n/**\n * Modify label style manually.\n * Only works after `setLabelStyle` and `setElementHoverStyle` called.\n *\n * @param {module:zrender/src/Element} el\n * @param {Object} [normalStyleProps] optional\n * @param {Object} [emphasisStyleProps] optional\n */\n\n\nfunction modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) {\n var elStyle = el.style;\n\n if (normalStyleProps) {\n rollbackDefaultTextStyle(elStyle);\n el.setStyle(normalStyleProps);\n applyDefaultTextStyle(elStyle);\n }\n\n elStyle = el.__hoverStl;\n\n if (emphasisStyleProps && elStyle) {\n rollbackDefaultTextStyle(elStyle);\n zrUtil.extend(elStyle, emphasisStyleProps);\n applyDefaultTextStyle(elStyle);\n }\n}\n/**\n * Set basic textStyle properties.\n * See more info in `setTextStyleCommon`.\n * @param {Object|module:zrender/graphic/Style} textStyle\n * @param {module:echarts/model/Model} model\n * @param {Object} [specifiedTextStyle] Can be overrided by settings in model.\n * @param {Object} [opt] See `opt` of `setTextStyleCommon`.\n * @param {boolean} [isEmphasis]\n */\n\n\nfunction setTextStyle(textStyle, textStyleModel, specifiedTextStyle, opt, isEmphasis) {\n setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis);\n specifiedTextStyle && zrUtil.extend(textStyle, specifiedTextStyle); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n\n return textStyle;\n}\n/**\n * Set text option in the style.\n * See more info in `setTextStyleCommon`.\n * @deprecated\n * @param {Object} textStyle\n * @param {module:echarts/model/Model} labelModel\n * @param {string|boolean} defaultColor Default text color.\n * If set as false, it will be processed as a emphasis style.\n */\n\n\nfunction setText(textStyle, labelModel, defaultColor) {\n var opt = {\n isRectText: true\n };\n var isEmphasis;\n\n if (defaultColor === false) {\n isEmphasis = true;\n } else {\n // Support setting color as 'auto' to get visual color.\n opt.autoColor = defaultColor;\n }\n\n setTextStyleCommon(textStyle, labelModel, opt, isEmphasis); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n}\n/**\n * The uniform entry of set text style, that is, retrieve style definitions\n * from `model` and set to `textStyle` object.\n *\n * Never in merge mode, but in overwrite mode, that is, all of the text style\n * properties will be set. (Consider the states of normal and emphasis and\n * default value can be adopted, merge would make the logic too complicated\n * to manage.)\n *\n * The `textStyle` object can either be a plain object or an instance of\n * `zrender/src/graphic/Style`, and either be the style of normal or emphasis.\n * After this mothod called, the `textStyle` object can then be used in\n * `el.setStyle(textStyle)` or `el.hoverStyle = textStyle`.\n *\n * Default value will be adopted and `insideRollbackOpt` will be created.\n * See `applyDefaultTextStyle` `rollbackDefaultTextStyle` for more details.\n *\n * opt: {\n * disableBox: boolean, Whether diable drawing box of block (outer most).\n * isRectText: boolean,\n * autoColor: string, specify a color when color is 'auto',\n * for textFill, textStroke, textBackgroundColor, and textBorderColor.\n * If autoColor specified, it is used as default textFill.\n * useInsideStyle:\n * `true`: Use inside style (textFill, textStroke, textStrokeWidth)\n * if `textFill` is not specified.\n * `false`: Do not use inside style.\n * `null/undefined`: use inside style if `isRectText` is true and\n * `textFill` is not specified and textPosition contains `'inside'`.\n * forceRich: boolean\n * }\n */\n\n\nfunction setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis) {\n // Consider there will be abnormal when merge hover style to normal style if given default value.\n opt = opt || EMPTY_OBJ;\n\n if (opt.isRectText) {\n var textPosition;\n\n if (opt.getTextPosition) {\n textPosition = opt.getTextPosition(textStyleModel, isEmphasis);\n } else {\n textPosition = textStyleModel.getShallow('position') || (isEmphasis ? null : 'inside'); // 'outside' is not a valid zr textPostion value, but used\n // in bar series, and magric type should be considered.\n\n textPosition === 'outside' && (textPosition = 'top');\n }\n\n textStyle.textPosition = textPosition;\n textStyle.textOffset = textStyleModel.getShallow('offset');\n var labelRotate = textStyleModel.getShallow('rotate');\n labelRotate != null && (labelRotate *= Math.PI / 180);\n textStyle.textRotation = labelRotate;\n textStyle.textDistance = zrUtil.retrieve2(textStyleModel.getShallow('distance'), isEmphasis ? null : 5);\n }\n\n var ecModel = textStyleModel.ecModel;\n var globalTextStyle = ecModel && ecModel.option.textStyle; // Consider case:\n // {\n // data: [{\n // value: 12,\n // label: {\n // rich: {\n // // no 'a' here but using parent 'a'.\n // }\n // }\n // }],\n // rich: {\n // a: { ... }\n // }\n // }\n\n var richItemNames = getRichItemNames(textStyleModel);\n var richResult;\n\n if (richItemNames) {\n richResult = {};\n\n for (var name in richItemNames) {\n if (richItemNames.hasOwnProperty(name)) {\n // Cascade is supported in rich.\n var richTextStyle = textStyleModel.getModel(['rich', name]); // In rich, never `disableBox`.\n // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`,\n // the default color `'blue'` will not be adopted if no color declared in `rich`.\n // That might confuses users. So probably we should put `textStyleModel` as the\n // root ancestor of the `richTextStyle`. But that would be a break change.\n\n setTokenTextStyle(richResult[name] = {}, richTextStyle, globalTextStyle, opt, isEmphasis);\n }\n }\n }\n\n textStyle.rich = richResult;\n setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, true);\n\n if (opt.forceRich && !opt.textStyle) {\n opt.textStyle = {};\n }\n\n return textStyle;\n} // Consider case:\n// {\n// data: [{\n// value: 12,\n// label: {\n// rich: {\n// // no 'a' here but using parent 'a'.\n// }\n// }\n// }],\n// rich: {\n// a: { ... }\n// }\n// }\n\n\nfunction getRichItemNames(textStyleModel) {\n // Use object to remove duplicated names.\n var richItemNameMap;\n\n while (textStyleModel && textStyleModel !== textStyleModel.ecModel) {\n var rich = (textStyleModel.option || EMPTY_OBJ).rich;\n\n if (rich) {\n richItemNameMap = richItemNameMap || {};\n\n for (var name in rich) {\n if (rich.hasOwnProperty(name)) {\n richItemNameMap[name] = 1;\n }\n }\n }\n\n textStyleModel = textStyleModel.parentModel;\n }\n\n return richItemNameMap;\n}\n\nfunction setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, isBlock) {\n // In merge mode, default value should not be given.\n globalTextStyle = !isEmphasis && globalTextStyle || EMPTY_OBJ;\n textStyle.textFill = getAutoColor(textStyleModel.getShallow('color'), opt) || globalTextStyle.color;\n textStyle.textStroke = getAutoColor(textStyleModel.getShallow('textBorderColor'), opt) || globalTextStyle.textBorderColor;\n textStyle.textStrokeWidth = zrUtil.retrieve2(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth);\n\n if (!isEmphasis) {\n if (isBlock) {\n textStyle.insideRollbackOpt = opt;\n applyDefaultTextStyle(textStyle);\n } // Set default finally.\n\n\n if (textStyle.textFill == null) {\n textStyle.textFill = opt.autoColor;\n }\n } // Do not use `getFont` here, because merge should be supported, where\n // part of these properties may be changed in emphasis style, and the\n // others should remain their original value got from normal style.\n\n\n textStyle.fontStyle = textStyleModel.getShallow('fontStyle') || globalTextStyle.fontStyle;\n textStyle.fontWeight = textStyleModel.getShallow('fontWeight') || globalTextStyle.fontWeight;\n textStyle.fontSize = textStyleModel.getShallow('fontSize') || globalTextStyle.fontSize;\n textStyle.fontFamily = textStyleModel.getShallow('fontFamily') || globalTextStyle.fontFamily;\n textStyle.textAlign = textStyleModel.getShallow('align');\n textStyle.textVerticalAlign = textStyleModel.getShallow('verticalAlign') || textStyleModel.getShallow('baseline');\n textStyle.textLineHeight = textStyleModel.getShallow('lineHeight');\n textStyle.textWidth = textStyleModel.getShallow('width');\n textStyle.textHeight = textStyleModel.getShallow('height');\n textStyle.textTag = textStyleModel.getShallow('tag');\n\n if (!isBlock || !opt.disableBox) {\n textStyle.textBackgroundColor = getAutoColor(textStyleModel.getShallow('backgroundColor'), opt);\n textStyle.textPadding = textStyleModel.getShallow('padding');\n textStyle.textBorderColor = getAutoColor(textStyleModel.getShallow('borderColor'), opt);\n textStyle.textBorderWidth = textStyleModel.getShallow('borderWidth');\n textStyle.textBorderRadius = textStyleModel.getShallow('borderRadius');\n textStyle.textBoxShadowColor = textStyleModel.getShallow('shadowColor');\n textStyle.textBoxShadowBlur = textStyleModel.getShallow('shadowBlur');\n textStyle.textBoxShadowOffsetX = textStyleModel.getShallow('shadowOffsetX');\n textStyle.textBoxShadowOffsetY = textStyleModel.getShallow('shadowOffsetY');\n }\n\n textStyle.textShadowColor = textStyleModel.getShallow('textShadowColor') || globalTextStyle.textShadowColor;\n textStyle.textShadowBlur = textStyleModel.getShallow('textShadowBlur') || globalTextStyle.textShadowBlur;\n textStyle.textShadowOffsetX = textStyleModel.getShallow('textShadowOffsetX') || globalTextStyle.textShadowOffsetX;\n textStyle.textShadowOffsetY = textStyleModel.getShallow('textShadowOffsetY') || globalTextStyle.textShadowOffsetY;\n}\n\nfunction getAutoColor(color, opt) {\n return color !== 'auto' ? color : opt && opt.autoColor ? opt.autoColor : null;\n}\n/**\n * Give some default value to the input `textStyle` object, based on the current settings\n * in this `textStyle` object.\n *\n * The Scenario:\n * when text position is `inside` and `textFill` is not specified, we show\n * text border by default for better view. But it should be considered that text position\n * might be changed when hovering or being emphasis, where the `insideRollback` is used to\n * restore the style.\n *\n * Usage (& NOTICE):\n * When a style object (eithor plain object or instance of `zrender/src/graphic/Style`) is\n * about to be modified on its text related properties, `rollbackDefaultTextStyle` should\n * be called before the modification and `applyDefaultTextStyle` should be called after that.\n * (For the case that all of the text related properties is reset, like `setTextStyleCommon`\n * does, `rollbackDefaultTextStyle` is not needed to be called).\n */\n\n\nfunction applyDefaultTextStyle(textStyle) {\n var textPosition = textStyle.textPosition;\n var opt = textStyle.insideRollbackOpt;\n var insideRollback;\n\n if (opt && textStyle.textFill == null) {\n var autoColor = opt.autoColor;\n var isRectText = opt.isRectText;\n var useInsideStyle = opt.useInsideStyle;\n var useInsideStyleCache = useInsideStyle !== false && (useInsideStyle === true || isRectText && textPosition // textPosition can be [10, 30]\n && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0);\n var useAutoColorCache = !useInsideStyleCache && autoColor != null; // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached.\n\n if (useInsideStyleCache || useAutoColorCache) {\n insideRollback = {\n textFill: textStyle.textFill,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n }\n\n if (useInsideStyleCache) {\n textStyle.textFill = '#fff'; // Consider text with #fff overflow its container.\n\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n }\n\n if (useAutoColorCache) {\n textStyle.textFill = autoColor;\n }\n } // Always set `insideRollback`, so that the previous one can be cleared.\n\n\n textStyle.insideRollback = insideRollback;\n}\n/**\n * Consider the case: in a scatter,\n * label: {\n * normal: {position: 'inside'},\n * emphasis: {position: 'top'}\n * }\n * In the normal state, the `textFill` will be set as '#fff' for pretty view (see\n * `applyDefaultTextStyle`), but when switching to emphasis state, the `textFill`\n * should be retured to 'autoColor', but not keep '#fff'.\n */\n\n\nfunction rollbackDefaultTextStyle(style) {\n var insideRollback = style.insideRollback;\n\n if (insideRollback) {\n // Reset all of the props in `CACHED_LABEL_STYLE_PROPERTIES`.\n style.textFill = insideRollback.textFill;\n style.textStroke = insideRollback.textStroke;\n style.textStrokeWidth = insideRollback.textStrokeWidth;\n style.insideRollback = null;\n }\n}\n\nfunction getFont(opt, ecModel) {\n var gTextStyleModel = ecModel && ecModel.getModel('textStyle');\n return zrUtil.trim([// FIXME in node-canvas fontWeight is before fontStyle\n opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' '));\n}\n\nfunction animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb) {\n if (typeof dataIndex === 'function') {\n cb = dataIndex;\n dataIndex = null;\n } // Do not check 'animation' property directly here. Consider this case:\n // animation model is an `itemModel`, whose does not have `isAnimationEnabled`\n // but its parent model (`seriesModel`) does.\n\n\n var animationEnabled = animatableModel && animatableModel.isAnimationEnabled();\n\n if (animationEnabled) {\n var postfix = isUpdate ? 'Update' : '';\n var duration = animatableModel.getShallow('animationDuration' + postfix);\n var animationEasing = animatableModel.getShallow('animationEasing' + postfix);\n var animationDelay = animatableModel.getShallow('animationDelay' + postfix);\n\n if (typeof animationDelay === 'function') {\n animationDelay = animationDelay(dataIndex, animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null);\n }\n\n if (typeof duration === 'function') {\n duration = duration(dataIndex);\n }\n\n duration > 0 ? el.animateTo(props, duration, animationDelay || 0, animationEasing, cb, !!cb) : (el.stopAnimation(), el.attr(props), cb && cb());\n } else {\n el.stopAnimation();\n el.attr(props);\n cb && cb();\n }\n}\n/**\n * Update graphic element properties with or without animation according to the\n * configuration in series.\n *\n * Caution: this method will stop previous animation.\n * So do not use this method to one element twice before\n * animation starts, unless you know what you are doing.\n *\n * @param {module:zrender/Element} el\n * @param {Object} props\n * @param {module:echarts/model/Model} [animatableModel]\n * @param {number} [dataIndex]\n * @param {Function} [cb]\n * @example\n * graphic.updateProps(el, {\n * position: [100, 100]\n * }, seriesModel, dataIndex, function () { console.log('Animation done!'); });\n * // Or\n * graphic.updateProps(el, {\n * position: [100, 100]\n * }, seriesModel, function () { console.log('Animation done!'); });\n */\n\n\nfunction updateProps(el, props, animatableModel, dataIndex, cb) {\n animateOrSetProps(true, el, props, animatableModel, dataIndex, cb);\n}\n/**\n * Init graphic element properties with or without animation according to the\n * configuration in series.\n *\n * Caution: this method will stop previous animation.\n * So do not use this method to one element twice before\n * animation starts, unless you know what you are doing.\n *\n * @param {module:zrender/Element} el\n * @param {Object} props\n * @param {module:echarts/model/Model} [animatableModel]\n * @param {number} [dataIndex]\n * @param {Function} cb\n */\n\n\nfunction initProps(el, props, animatableModel, dataIndex, cb) {\n animateOrSetProps(false, el, props, animatableModel, dataIndex, cb);\n}\n/**\n * Get transform matrix of target (param target),\n * in coordinate of its ancestor (param ancestor)\n *\n * @param {module:zrender/mixin/Transformable} target\n * @param {module:zrender/mixin/Transformable} [ancestor]\n */\n\n\nfunction getTransform(target, ancestor) {\n var mat = matrix.identity([]);\n\n while (target && target !== ancestor) {\n matrix.mul(mat, target.getLocalTransform(), mat);\n target = target.parent;\n }\n\n return mat;\n}\n/**\n * Apply transform to an vertex.\n * @param {Array.} target [x, y]\n * @param {Array.|TypedArray.|Object} transform Can be:\n * + Transform matrix: like [1, 0, 0, 1, 0, 0]\n * + {position, rotation, scale}, the same as `zrender/Transformable`.\n * @param {boolean=} invert Whether use invert matrix.\n * @return {Array.} [x, y]\n */\n\n\nfunction applyTransform(target, transform, invert) {\n if (transform && !zrUtil.isArrayLike(transform)) {\n transform = Transformable.getLocalTransform(transform);\n }\n\n if (invert) {\n transform = matrix.invert([], transform);\n }\n\n return vector.applyTransform([], target, transform);\n}\n/**\n * @param {string} direction 'left' 'right' 'top' 'bottom'\n * @param {Array.} transform Transform matrix: like [1, 0, 0, 1, 0, 0]\n * @param {boolean=} invert Whether use invert matrix.\n * @return {string} Transformed direction. 'left' 'right' 'top' 'bottom'\n */\n\n\nfunction transformDirection(direction, transform, invert) {\n // Pick a base, ensure that transform result will not be (0, 0).\n var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]);\n var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]);\n var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0];\n vertex = applyTransform(vertex, transform, invert);\n return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top';\n}\n/**\n * Apply group transition animation from g1 to g2.\n * If no animatableModel, no animation.\n */\n\n\nfunction groupTransition(g1, g2, animatableModel, cb) {\n if (!g1 || !g2) {\n return;\n }\n\n function getElMap(g) {\n var elMap = {};\n g.traverse(function (el) {\n if (!el.isGroup && el.anid) {\n elMap[el.anid] = el;\n }\n });\n return elMap;\n }\n\n function getAnimatableProps(el) {\n var obj = {\n position: vector.clone(el.position),\n rotation: el.rotation\n };\n\n if (el.shape) {\n obj.shape = zrUtil.extend({}, el.shape);\n }\n\n return obj;\n }\n\n var elMap1 = getElMap(g1);\n g2.traverse(function (el) {\n if (!el.isGroup && el.anid) {\n var oldEl = elMap1[el.anid];\n\n if (oldEl) {\n var newProp = getAnimatableProps(el);\n el.attr(getAnimatableProps(oldEl));\n updateProps(el, newProp, animatableModel, el.dataIndex);\n } // else {\n // if (el.previousProps) {\n // graphic.updateProps\n // }\n // }\n\n }\n });\n}\n/**\n * @param {Array.>} points Like: [[23, 44], [53, 66], ...]\n * @param {Object} rect {x, y, width, height}\n * @return {Array.>} A new clipped points.\n */\n\n\nfunction clipPointsByRect(points, rect) {\n // FIXME: this way migth be incorrect when grpahic clipped by a corner.\n // and when element have border.\n return zrUtil.map(points, function (point) {\n var x = point[0];\n x = mathMax(x, rect.x);\n x = mathMin(x, rect.x + rect.width);\n var y = point[1];\n y = mathMax(y, rect.y);\n y = mathMin(y, rect.y + rect.height);\n return [x, y];\n });\n}\n/**\n * @param {Object} targetRect {x, y, width, height}\n * @param {Object} rect {x, y, width, height}\n * @return {Object} A new clipped rect. If rect size are negative, return undefined.\n */\n\n\nfunction clipRectByRect(targetRect, rect) {\n var x = mathMax(targetRect.x, rect.x);\n var x2 = mathMin(targetRect.x + targetRect.width, rect.x + rect.width);\n var y = mathMax(targetRect.y, rect.y);\n var y2 = mathMin(targetRect.y + targetRect.height, rect.y + rect.height); // If the total rect is cliped, nothing, including the border,\n // should be painted. So return undefined.\n\n if (x2 >= x && y2 >= y) {\n return {\n x: x,\n y: y,\n width: x2 - x,\n height: y2 - y\n };\n }\n}\n/**\n * @param {string} iconStr Support 'image://' or 'path://' or direct svg path.\n * @param {Object} [opt] Properties of `module:zrender/Element`, except `style`.\n * @param {Object} [rect] {x, y, width, height}\n * @return {module:zrender/Element} Icon path or image element.\n */\n\n\nfunction createIcon(iconStr, opt, rect) {\n opt = zrUtil.extend({\n rectHover: true\n }, opt);\n var style = opt.style = {\n strokeNoScale: true\n };\n rect = rect || {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n };\n\n if (iconStr) {\n return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), zrUtil.defaults(style, rect), new ZImage(opt)) : makePath(iconStr.replace('path://', ''), opt, rect, 'center');\n }\n}\n/**\n * Return `true` if the given line (line `a`) and the given polygon\n * are intersect.\n * Note that we do not count colinear as intersect here because no\n * requirement for that. We could do that if required in future.\n *\n * @param {number} a1x\n * @param {number} a1y\n * @param {number} a2x\n * @param {number} a2y\n * @param {Array.>} points Points of the polygon.\n * @return {boolean}\n */\n\n\nfunction linePolygonIntersect(a1x, a1y, a2x, a2y, points) {\n for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) {\n var p = points[i];\n\n if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) {\n return true;\n }\n\n p2 = p;\n }\n}\n/**\n * Return `true` if the given two lines (line `a` and line `b`)\n * are intersect.\n * Note that we do not count colinear as intersect here because no\n * requirement for that. We could do that if required in future.\n *\n * @param {number} a1x\n * @param {number} a1y\n * @param {number} a2x\n * @param {number} a2y\n * @param {number} b1x\n * @param {number} b1y\n * @param {number} b2x\n * @param {number} b2y\n * @return {boolean}\n */\n\n\nfunction lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) {\n // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`.\n var mx = a2x - a1x;\n var my = a2y - a1y;\n var nx = b2x - b1x;\n var ny = b2y - b1y; // `vec_m` and `vec_n` are parallel iff\n // exising `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`.\n\n var nmCrossProduct = crossProduct2d(nx, ny, mx, my);\n\n if (nearZero(nmCrossProduct)) {\n return false;\n } // `vec_m` and `vec_n` are intersect iff\n // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`,\n // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)`\n // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`.\n\n\n var b1a1x = a1x - b1x;\n var b1a1y = a1y - b1y;\n var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct;\n\n if (q < 0 || q > 1) {\n return false;\n }\n\n var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct;\n\n if (p < 0 || p > 1) {\n return false;\n }\n\n return true;\n}\n/**\n * Cross product of 2-dimension vector.\n */\n\n\nfunction crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nfunction nearZero(val) {\n return val <= 1e-6 && val >= -1e-6;\n} // Register built-in shapes. These shapes might be overwirtten\n// by users, although we do not recommend that.\n\n\nregisterShape('circle', Circle);\nregisterShape('sector', Sector);\nregisterShape('ring', Ring);\nregisterShape('polygon', Polygon);\nregisterShape('polyline', Polyline);\nregisterShape('rect', Rect);\nregisterShape('line', Line);\nregisterShape('bezierCurve', BezierCurve);\nregisterShape('arc', Arc);\nexports.Z2_EMPHASIS_LIFT = Z2_EMPHASIS_LIFT;\nexports.CACHED_LABEL_STYLE_PROPERTIES = CACHED_LABEL_STYLE_PROPERTIES;\nexports.extendShape = extendShape;\nexports.extendPath = extendPath;\nexports.registerShape = registerShape;\nexports.getShapeClass = getShapeClass;\nexports.makePath = makePath;\nexports.makeImage = makeImage;\nexports.mergePath = mergePath;\nexports.resizePath = resizePath;\nexports.subPixelOptimizeLine = subPixelOptimizeLine;\nexports.subPixelOptimizeRect = subPixelOptimizeRect;\nexports.subPixelOptimize = subPixelOptimize;\nexports.setElementHoverStyle = setElementHoverStyle;\nexports.setHoverStyle = setHoverStyle;\nexports.setAsHighDownDispatcher = setAsHighDownDispatcher;\nexports.isHighDownDispatcher = isHighDownDispatcher;\nexports.getHighlightDigit = getHighlightDigit;\nexports.setLabelStyle = setLabelStyle;\nexports.modifyLabelStyle = modifyLabelStyle;\nexports.setTextStyle = setTextStyle;\nexports.setText = setText;\nexports.getFont = getFont;\nexports.updateProps = updateProps;\nexports.initProps = initProps;\nexports.getTransform = getTransform;\nexports.applyTransform = applyTransform;\nexports.transformDirection = transformDirection;\nexports.groupTransition = groupTransition;\nexports.clipPointsByRect = clipPointsByRect;\nexports.clipRectByRect = clipRectByRect;\nexports.createIcon = createIcon;\nexports.linePolygonIntersect = linePolygonIntersect;\nexports.lineLineIntersect = lineLineIntersect;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar throttle = require(\"../../util/throttle\");\n\nvar DataZoomView = require(\"./DataZoomView\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar layout = require(\"../../util/layout\");\n\nvar sliderMove = require(\"../helper/sliderMove\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar Rect = graphic.Rect;\nvar linearMap = numberUtil.linearMap;\nvar asc = numberUtil.asc;\nvar bind = zrUtil.bind;\nvar each = zrUtil.each; // Constants\n\nvar DEFAULT_LOCATION_EDGE_GAP = 7;\nvar DEFAULT_FRAME_BORDER_WIDTH = 1;\nvar DEFAULT_FILLER_SIZE = 30;\nvar HORIZONTAL = 'horizontal';\nvar VERTICAL = 'vertical';\nvar LABEL_GAP = 5;\nvar SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter'];\nvar SliderZoomView = DataZoomView.extend({\n type: 'dataZoom.slider',\n init: function (ecModel, api) {\n /**\n * @private\n * @type {Object}\n */\n this._displayables = {};\n /**\n * @private\n * @type {string}\n */\n\n this._orient;\n /**\n * [0, 100]\n * @private\n */\n\n this._range;\n /**\n * [coord of the first handle, coord of the second handle]\n * @private\n */\n\n this._handleEnds;\n /**\n * [length, thick]\n * @private\n * @type {Array.}\n */\n\n this._size;\n /**\n * @private\n * @type {number}\n */\n\n this._handleWidth;\n /**\n * @private\n * @type {number}\n */\n\n this._handleHeight;\n /**\n * @private\n */\n\n this._location;\n /**\n * @private\n */\n\n this._dragging;\n /**\n * @private\n */\n\n this._dataShadowInfo;\n this.api = api;\n },\n\n /**\n * @override\n */\n render: function (dataZoomModel, ecModel, api, payload) {\n SliderZoomView.superApply(this, 'render', arguments);\n throttle.createOrUpdate(this, '_dispatchZoomAction', this.dataZoomModel.get('throttle'), 'fixRate');\n this._orient = dataZoomModel.get('orient');\n\n if (this.dataZoomModel.get('show') === false) {\n this.group.removeAll();\n return;\n } // Notice: this._resetInterval() should not be executed when payload.type\n // is 'dataZoom', origin this._range should be maintained, otherwise 'pan'\n // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction,\n\n\n if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) {\n this._buildView();\n }\n\n this._updateView();\n },\n\n /**\n * @override\n */\n remove: function () {\n SliderZoomView.superApply(this, 'remove', arguments);\n throttle.clear(this, '_dispatchZoomAction');\n },\n\n /**\n * @override\n */\n dispose: function () {\n SliderZoomView.superApply(this, 'dispose', arguments);\n throttle.clear(this, '_dispatchZoomAction');\n },\n _buildView: function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n\n this._resetLocation();\n\n this._resetInterval();\n\n var barGroup = this._displayables.barGroup = new graphic.Group();\n\n this._renderBackground();\n\n this._renderHandle();\n\n this._renderDataShadow();\n\n thisGroup.add(barGroup);\n\n this._positionGroup();\n },\n\n /**\n * @private\n */\n _resetLocation: function () {\n var dataZoomModel = this.dataZoomModel;\n var api = this.api; // If some of x/y/width/height are not specified,\n // auto-adapt according to target grid.\n\n var coordRect = this._findCoordRect();\n\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n }; // Default align by coordinate system rect.\n\n var positionInfo = this._orient === HORIZONTAL ? {\n // Why using 'right', because right should be used in vertical,\n // and it is better to be consistent for dealing with position param merge.\n right: ecSize.width - coordRect.x - coordRect.width,\n top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP,\n width: coordRect.width,\n height: DEFAULT_FILLER_SIZE\n } : {\n // vertical\n right: DEFAULT_LOCATION_EDGE_GAP,\n top: coordRect.y,\n width: DEFAULT_FILLER_SIZE,\n height: coordRect.height\n }; // Do not write back to option and replace value 'ph', because\n // the 'ph' value should be recalculated when resize.\n\n var layoutParams = layout.getLayoutParams(dataZoomModel.option); // Replace the placeholder value.\n\n zrUtil.each(['right', 'top', 'width', 'height'], function (name) {\n if (layoutParams[name] === 'ph') {\n layoutParams[name] = positionInfo[name];\n }\n });\n var layoutRect = layout.getLayoutRect(layoutParams, ecSize, dataZoomModel.padding);\n this._location = {\n x: layoutRect.x,\n y: layoutRect.y\n };\n this._size = [layoutRect.width, layoutRect.height];\n this._orient === VERTICAL && this._size.reverse();\n },\n\n /**\n * @private\n */\n _positionGroup: function () {\n var thisGroup = this.group;\n var location = this._location;\n var orient = this._orient; // Just use the first axis to determine mapping.\n\n var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();\n var inverse = targetAxisModel && targetAxisModel.get('inverse');\n var barGroup = this._displayables.barGroup;\n var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse; // Transform barGroup.\n\n barGroup.attr(orient === HORIZONTAL && !inverse ? {\n scale: otherAxisInverse ? [1, 1] : [1, -1]\n } : orient === HORIZONTAL && inverse ? {\n scale: otherAxisInverse ? [-1, 1] : [-1, -1]\n } : orient === VERTICAL && !inverse ? {\n scale: otherAxisInverse ? [1, -1] : [1, 1],\n rotation: Math.PI / 2 // Dont use Math.PI, considering shadow direction.\n\n } : {\n scale: otherAxisInverse ? [-1, -1] : [-1, 1],\n rotation: Math.PI / 2\n }); // Position barGroup\n\n var rect = thisGroup.getBoundingRect([barGroup]);\n thisGroup.attr('position', [location.x - rect.x, location.y - rect.y]);\n },\n\n /**\n * @private\n */\n _getViewExtent: function () {\n return [0, this._size[0]];\n },\n _renderBackground: function () {\n var dataZoomModel = this.dataZoomModel;\n var size = this._size;\n var barGroup = this._displayables.barGroup;\n barGroup.add(new Rect({\n silent: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: dataZoomModel.get('backgroundColor')\n },\n z2: -40\n })); // Click panel, over shadow, below handles.\n\n barGroup.add(new Rect({\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: 'transparent'\n },\n z2: 0,\n onclick: zrUtil.bind(this._onClickPanelClick, this)\n }));\n },\n _renderDataShadow: function () {\n var info = this._dataShadowInfo = this._prepareDataShadowInfo();\n\n if (!info) {\n return;\n }\n\n var size = this._size;\n var seriesModel = info.series;\n var data = seriesModel.getRawData();\n var otherDim = seriesModel.getShadowDim ? seriesModel.getShadowDim() // @see candlestick\n : info.otherDim;\n\n if (otherDim == null) {\n return;\n }\n\n var otherDataExtent = data.getDataExtent(otherDim); // Nice extent.\n\n var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3;\n otherDataExtent = [otherDataExtent[0] - otherOffset, otherDataExtent[1] + otherOffset];\n var otherShadowExtent = [0, size[1]];\n var thisShadowExtent = [0, size[0]];\n var areaPoints = [[size[0], 0], [0, 0]];\n var linePoints = [];\n var step = thisShadowExtent[1] / (data.count() - 1);\n var thisCoord = 0; // Optimize for large data shadow\n\n var stride = Math.round(data.count() / size[0]);\n var lastIsEmpty;\n data.each([otherDim], function (value, index) {\n if (stride > 0 && index % stride) {\n thisCoord += step;\n return;\n } // FIXME\n // Should consider axis.min/axis.max when drawing dataShadow.\n // FIXME\n // 应该使用统一的空判断?还是在list里进行空判断?\n\n\n var isEmpty = value == null || isNaN(value) || value === ''; // See #4235.\n\n var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent, otherShadowExtent, true); // Attempt to draw data shadow precisely when there are empty value.\n\n if (isEmpty && !lastIsEmpty && index) {\n areaPoints.push([areaPoints[areaPoints.length - 1][0], 0]);\n linePoints.push([linePoints[linePoints.length - 1][0], 0]);\n } else if (!isEmpty && lastIsEmpty) {\n areaPoints.push([thisCoord, 0]);\n linePoints.push([thisCoord, 0]);\n }\n\n areaPoints.push([thisCoord, otherCoord]);\n linePoints.push([thisCoord, otherCoord]);\n thisCoord += step;\n lastIsEmpty = isEmpty;\n });\n var dataZoomModel = this.dataZoomModel; // var dataBackgroundModel = dataZoomModel.getModel('dataBackground');\n\n this._displayables.barGroup.add(new graphic.Polygon({\n shape: {\n points: areaPoints\n },\n style: zrUtil.defaults({\n fill: dataZoomModel.get('dataBackgroundColor')\n }, dataZoomModel.getModel('dataBackground.areaStyle').getAreaStyle()),\n silent: true,\n z2: -20\n }));\n\n this._displayables.barGroup.add(new graphic.Polyline({\n shape: {\n points: linePoints\n },\n style: dataZoomModel.getModel('dataBackground.lineStyle').getLineStyle(),\n silent: true,\n z2: -19\n }));\n },\n _prepareDataShadowInfo: function () {\n var dataZoomModel = this.dataZoomModel;\n var showDataShadow = dataZoomModel.get('showDataShadow');\n\n if (showDataShadow === false) {\n return;\n } // Find a representative series.\n\n\n var result;\n var ecModel = this.ecModel;\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {\n var seriesModels = dataZoomModel.getAxisProxy(dimNames.name, axisIndex).getTargetSeriesModels();\n zrUtil.each(seriesModels, function (seriesModel) {\n if (result) {\n return;\n }\n\n if (showDataShadow !== true && zrUtil.indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) {\n return;\n }\n\n var thisAxis = ecModel.getComponent(dimNames.axis, axisIndex).axis;\n var otherDim = getOtherDim(dimNames.name);\n var otherAxisInverse;\n var coordSys = seriesModel.coordinateSystem;\n\n if (otherDim != null && coordSys.getOtherAxis) {\n otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse;\n }\n\n otherDim = seriesModel.getData().mapDimension(otherDim);\n result = {\n thisAxis: thisAxis,\n series: seriesModel,\n thisDim: dimNames.name,\n otherDim: otherDim,\n otherAxisInverse: otherAxisInverse\n };\n }, this);\n }, this);\n return result;\n },\n _renderHandle: function () {\n var displaybles = this._displayables;\n var handles = displaybles.handles = [];\n var handleLabels = displaybles.handleLabels = [];\n var barGroup = this._displayables.barGroup;\n var size = this._size;\n var dataZoomModel = this.dataZoomModel;\n barGroup.add(displaybles.filler = new Rect({\n draggable: true,\n cursor: getCursor(this._orient),\n drift: bind(this._onDragMove, this, 'all'),\n ondragstart: bind(this._showDataInfo, this, true),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false),\n style: {\n fill: dataZoomModel.get('fillerColor'),\n textPosition: 'inside'\n }\n })); // Frame border.\n\n barGroup.add(new Rect({\n silent: true,\n subPixelOptimize: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'),\n lineWidth: DEFAULT_FRAME_BORDER_WIDTH,\n fill: 'rgba(0,0,0,0)'\n }\n }));\n each([0, 1], function (handleIndex) {\n var path = graphic.createIcon(dataZoomModel.get('handleIcon'), {\n cursor: getCursor(this._orient),\n draggable: true,\n drift: bind(this._onDragMove, this, handleIndex),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false)\n }, {\n x: -1,\n y: 0,\n width: 2,\n height: 2\n });\n var bRect = path.getBoundingRect();\n this._handleHeight = numberUtil.parsePercent(dataZoomModel.get('handleSize'), this._size[1]);\n this._handleWidth = bRect.width / bRect.height * this._handleHeight;\n path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle());\n var handleColor = dataZoomModel.get('handleColor'); // Compatitable with previous version\n\n if (handleColor != null) {\n path.style.fill = handleColor;\n }\n\n barGroup.add(handles[handleIndex] = path);\n var textStyleModel = dataZoomModel.textStyleModel;\n this.group.add(handleLabels[handleIndex] = new graphic.Text({\n silent: true,\n invisible: true,\n style: {\n x: 0,\n y: 0,\n text: '',\n textVerticalAlign: 'middle',\n textAlign: 'center',\n textFill: textStyleModel.getTextColor(),\n textFont: textStyleModel.getFont()\n },\n z2: 10\n }));\n }, this);\n },\n\n /**\n * @private\n */\n _resetInterval: function () {\n var range = this._range = this.dataZoomModel.getPercentRange();\n\n var viewExtent = this._getViewExtent();\n\n this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)];\n },\n\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} delta\n * @return {boolean} changed\n */\n _updateInterval: function (handleIndex, delta) {\n var dataZoomModel = this.dataZoomModel;\n var handleEnds = this._handleEnds;\n\n var viewExtend = this._getViewExtent();\n\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n var percentExtent = [0, 100];\n sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null);\n var lastRange = this._range;\n var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]);\n return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1];\n },\n\n /**\n * @private\n */\n _updateView: function (nonRealtime) {\n var displaybles = this._displayables;\n var handleEnds = this._handleEnds;\n var handleInterval = asc(handleEnds.slice());\n var size = this._size;\n each([0, 1], function (handleIndex) {\n // Handles\n var handle = displaybles.handles[handleIndex];\n var handleHeight = this._handleHeight;\n handle.attr({\n scale: [handleHeight / 2, handleHeight / 2],\n position: [handleEnds[handleIndex], size[1] / 2 - handleHeight / 2]\n });\n }, this); // Filler\n\n displaybles.filler.setShape({\n x: handleInterval[0],\n y: 0,\n width: handleInterval[1] - handleInterval[0],\n height: size[1]\n });\n\n this._updateDataInfo(nonRealtime);\n },\n\n /**\n * @private\n */\n _updateDataInfo: function (nonRealtime) {\n var dataZoomModel = this.dataZoomModel;\n var displaybles = this._displayables;\n var handleLabels = displaybles.handleLabels;\n var orient = this._orient;\n var labelTexts = ['', '']; // FIXME\n // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter)\n\n if (dataZoomModel.get('showDetail')) {\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n\n if (axisProxy) {\n var axis = axisProxy.getAxisModel().axis;\n var range = this._range;\n var dataInterval = nonRealtime // See #4434, data and axis are not processed and reset yet in non-realtime mode.\n ? axisProxy.calculateDataWindow({\n start: range[0],\n end: range[1]\n }).valueWindow : axisProxy.getDataValueWindow();\n labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)];\n }\n }\n\n var orderedHandleEnds = asc(this._handleEnds.slice());\n setLabel.call(this, 0);\n setLabel.call(this, 1);\n\n function setLabel(handleIndex) {\n // Label\n // Text should not transform by barGroup.\n // Ignore handlers transform\n var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group);\n var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform);\n var offset = this._handleWidth / 2 + LABEL_GAP;\n var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform);\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n textVerticalAlign: orient === HORIZONTAL ? 'middle' : direction,\n textAlign: orient === HORIZONTAL ? direction : 'center',\n text: labelTexts[handleIndex]\n });\n }\n },\n\n /**\n * @private\n */\n _formatLabel: function (value, axis) {\n var dataZoomModel = this.dataZoomModel;\n var labelFormatter = dataZoomModel.get('labelFormatter');\n var labelPrecision = dataZoomModel.get('labelPrecision');\n\n if (labelPrecision == null || labelPrecision === 'auto') {\n labelPrecision = axis.getPixelPrecision();\n }\n\n var valueStr = value == null || isNaN(value) ? '' // FIXME Glue code\n : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel(Math.round(value)) // param of toFixed should less then 20.\n : value.toFixed(Math.min(labelPrecision, 20));\n return zrUtil.isFunction(labelFormatter) ? labelFormatter(value, valueStr) : zrUtil.isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr;\n },\n\n /**\n * @private\n * @param {boolean} showOrHide true: show, false: hide\n */\n _showDataInfo: function (showOrHide) {\n // Always show when drgging.\n showOrHide = this._dragging || showOrHide;\n var handleLabels = this._displayables.handleLabels;\n handleLabels[0].attr('invisible', !showOrHide);\n handleLabels[1].attr('invisible', !showOrHide);\n },\n _onDragMove: function (handleIndex, dx, dy, event) {\n this._dragging = true; // For mobile device, prevent screen slider on the button.\n\n eventTool.stop(event.event); // Transform dx, dy to bar coordination.\n\n var barTransform = this._displayables.barGroup.getLocalTransform();\n\n var vertex = graphic.applyTransform([dx, dy], barTransform, true);\n\n var changed = this._updateInterval(handleIndex, vertex[0]);\n\n var realtime = this.dataZoomModel.get('realtime');\n\n this._updateView(!realtime); // Avoid dispatch dataZoom repeatly but range not changed,\n // which cause bad visual effect when progressive enabled.\n\n\n changed && realtime && this._dispatchZoomAction();\n },\n _onDragEnd: function () {\n this._dragging = false;\n\n this._showDataInfo(false); // While in realtime mode and stream mode, dispatch action when\n // drag end will cause the whole view rerender, which is unnecessary.\n\n\n var realtime = this.dataZoomModel.get('realtime');\n !realtime && this._dispatchZoomAction();\n },\n _onClickPanelClick: function (e) {\n var size = this._size;\n\n var localPoint = this._displayables.barGroup.transformCoordToLocal(e.offsetX, e.offsetY);\n\n if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) {\n return;\n }\n\n var handleEnds = this._handleEnds;\n var center = (handleEnds[0] + handleEnds[1]) / 2;\n\n var changed = this._updateInterval('all', localPoint[0] - center);\n\n this._updateView();\n\n changed && this._dispatchZoomAction();\n },\n\n /**\n * This action will be throttled.\n * @private\n */\n _dispatchZoomAction: function () {\n var range = this._range;\n this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n dataZoomId: this.dataZoomModel.id,\n start: range[0],\n end: range[1]\n });\n },\n\n /**\n * @private\n */\n _findCoordRect: function () {\n // Find the grid coresponding to the first axis referred by dataZoom.\n var rect;\n each(this.getTargetCoordInfo(), function (coordInfoList) {\n if (!rect && coordInfoList.length) {\n var coordSys = coordInfoList[0].model.coordinateSystem;\n rect = coordSys.getRect && coordSys.getRect();\n }\n });\n\n if (!rect) {\n var width = this.api.getWidth();\n var height = this.api.getHeight();\n rect = {\n x: width * 0.2,\n y: height * 0.2,\n width: width * 0.6,\n height: height * 0.6\n };\n }\n\n return rect;\n }\n});\n\nfunction getOtherDim(thisDim) {\n // FIXME\n // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好\n var map = {\n x: 'y',\n y: 'x',\n radius: 'angle',\n angle: 'radius'\n };\n return map[thisDim];\n}\n\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\n\nvar _default = SliderZoomView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar List = require(\"../../data/List\");\n\nvar Graph = require(\"../../data/Graph\");\n\nvar linkList = require(\"../../data/helper/linkList\");\n\nvar createDimensions = require(\"../../data/helper/createDimensions\");\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar createListFromArray = require(\"./createListFromArray\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(nodes, edges, seriesModel, directed, beforeLink) {\n // ??? TODO\n // support dataset?\n var graph = new Graph(directed);\n\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(zrUtil.retrieve( // Id, name, dataIndex\n nodes[i].id, nodes[i].name, i), i);\n }\n\n var linkNameList = [];\n var validEdges = [];\n var linkCount = 0;\n\n for (var i = 0; i < edges.length; i++) {\n var link = edges[i];\n var source = link.source;\n var target = link.target; // addEdge may fail when source or target not exists\n\n if (graph.addEdge(source, target, linkCount)) {\n validEdges.push(link);\n linkNameList.push(zrUtil.retrieve(link.id, source + ' > ' + target));\n linkCount++;\n }\n }\n\n var coordSys = seriesModel.get('coordinateSystem');\n var nodeData;\n\n if (coordSys === 'cartesian2d' || coordSys === 'polar') {\n nodeData = createListFromArray(nodes, seriesModel);\n } else {\n var coordSysCtor = CoordinateSystem.get(coordSys);\n var coordDimensions = coordSysCtor && coordSysCtor.type !== 'view' ? coordSysCtor.dimensions || [] : []; // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs\n // `value` dimension, but graph need `value` dimension. It's better to\n // uniform this behavior.\n\n if (zrUtil.indexOf(coordDimensions, 'value') < 0) {\n coordDimensions.concat(['value']);\n }\n\n var dimensionNames = createDimensions(nodes, {\n coordDimensions: coordDimensions\n });\n nodeData = new List(dimensionNames, seriesModel);\n nodeData.initData(nodes);\n }\n\n var edgeData = new List(['value'], seriesModel);\n edgeData.initData(validEdges, linkNameList);\n beforeLink && beforeLink(nodeData, edgeData);\n linkList({\n mainData: nodeData,\n struct: graph,\n structAttr: 'graph',\n datas: {\n node: nodeData,\n edge: edgeData\n },\n datasAttr: {\n node: 'data',\n edge: 'edgeData'\n }\n }); // Update dataIndex of nodes and edges because invalid edge may be removed\n\n graph.update();\n return graph;\n}\n\nmodule.exports = _default;","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar IndicatorAxis = require(\"./IndicatorAxis\");\n\nvar IntervalScale = require(\"../../scale/Interval\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar _axisHelper = require(\"../axisHelper\");\n\nvar getScaleExtent = _axisHelper.getScaleExtent;\nvar niceScaleExtent = _axisHelper.niceScaleExtent;\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar LogScale = require(\"../../scale/Log\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO clockwise\nfunction Radar(radarModel, ecModel, api) {\n this._model = radarModel;\n /**\n * Radar dimensions\n * @type {Array.}\n */\n\n this.dimensions = [];\n this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale());\n indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis\n\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cx;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cy;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r0;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.startAngle;\n}\n\nRadar.prototype.getIndicatorAxes = function () {\n return this._indicatorAxes;\n};\n\nRadar.prototype.dataToPoint = function (value, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);\n};\n\nRadar.prototype.coordToPoint = function (coord, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n var angle = indicatorAxis.angle;\n var x = this.cx + coord * Math.cos(angle);\n var y = this.cy - coord * Math.sin(angle);\n return [x, y];\n};\n\nRadar.prototype.pointToData = function (pt) {\n var dx = pt[0] - this.cx;\n var dy = pt[1] - this.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx); // Find the closest angle\n // FIXME index can calculated directly\n\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\n\n for (var i = 0; i < this._indicatorAxes.length; i++) {\n var indicatorAxis = this._indicatorAxes[i];\n var diff = Math.abs(radian - indicatorAxis.angle);\n\n if (diff < minRadianDiff) {\n closestAxis = indicatorAxis;\n closestAxisIdx = i;\n minRadianDiff = diff;\n }\n }\n\n return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];\n};\n\nRadar.prototype.resize = function (radarModel, api) {\n var center = radarModel.get('center');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var viewSize = Math.min(viewWidth, viewHeight) / 2;\n this.cx = numberUtil.parsePercent(center[0], viewWidth);\n this.cy = numberUtil.parsePercent(center[1], viewHeight);\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180; // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n\n var radius = radarModel.get('radius');\n\n if (typeof radius === 'string' || typeof radius === 'number') {\n radius = [0, radius];\n }\n\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) {\n indicatorAxis.setExtent(this.r0, this.r);\n var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length; // Normalize to [-PI, PI]\n\n angle = Math.atan2(Math.sin(angle), Math.cos(angle));\n indicatorAxis.angle = angle;\n }, this);\n};\n\nRadar.prototype.update = function (ecModel, api) {\n var indicatorAxes = this._indicatorAxes;\n var radarModel = this._model;\n zrUtil.each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.setExtent(Infinity, -Infinity);\n });\n ecModel.eachSeriesByType('radar', function (radarSeries, idx) {\n if (radarSeries.get('coordinateSystem') !== 'radar' || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) {\n return;\n }\n\n var data = radarSeries.getData();\n zrUtil.each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim));\n });\n }, this);\n var splitNumber = radarModel.get('splitNumber');\n\n function increaseInterval(interval) {\n var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval\n\n var f = interval / exp10;\n\n if (f === 2) {\n f = 5;\n } else {\n // f is 2 or 5\n f *= 2;\n }\n\n return f * exp10;\n } // Force all the axis fixing the maxSplitNumber.\n\n\n zrUtil.each(indicatorAxes, function (indicatorAxis, idx) {\n var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;\n niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);\n var axisModel = indicatorAxis.model;\n var scale = indicatorAxis.scale;\n var fixedMin = axisModel.getMin();\n var fixedMax = axisModel.getMax();\n var interval = scale.getInterval();\n\n if (fixedMin != null && fixedMax != null) {\n // User set min, max, divide to get new interval\n scale.setExtent(+fixedMin, +fixedMax);\n scale.setInterval((fixedMax - fixedMin) / splitNumber);\n } else if (fixedMin != null) {\n var max; // User set min, expand extent on the other side\n\n do {\n max = fixedMin + interval * splitNumber;\n scale.setExtent(+fixedMin, max); // Interval must been set after extent\n // FIXME\n\n scale.setInterval(interval);\n interval = increaseInterval(interval);\n } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1]));\n } else if (fixedMax != null) {\n var min; // User set min, expand extent on the other side\n\n do {\n min = fixedMax - interval * splitNumber;\n scale.setExtent(min, +fixedMax);\n scale.setInterval(interval);\n interval = increaseInterval(interval);\n } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0]));\n } else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n\n if (nicedSplitNumber > splitNumber) {\n interval = increaseInterval(interval);\n } // TODO\n\n\n var max = Math.ceil(rawExtent[1] / interval) * interval;\n var min = numberUtil.round(max - interval * splitNumber);\n scale.setExtent(min, max);\n scale.setInterval(interval);\n }\n });\n};\n/**\n * Radar dimensions is based on the data\n * @type {Array}\n */\n\n\nRadar.dimensions = [];\n\nRadar.create = function (ecModel, api) {\n var radarList = [];\n ecModel.eachComponent('radar', function (radarModel) {\n var radar = new Radar(radarModel, ecModel, api);\n radarList.push(radar);\n radarModel.coordinateSystem = radar;\n });\n ecModel.eachSeriesByType('radar', function (radarSeries) {\n if (radarSeries.get('coordinateSystem') === 'radar') {\n // Inject coordinate system\n radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];\n }\n });\n return radarList;\n};\n\nCoordinateSystem.register('radar', Radar);\nvar _default = Radar;\nmodule.exports = _default;","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./graph/GraphSeries\");\n\nrequire(\"./graph/GraphView\");\n\nrequire(\"./graph/graphAction\");\n\nvar categoryFilter = require(\"./graph/categoryFilter\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar categoryVisual = require(\"./graph/categoryVisual\");\n\nvar edgeVisual = require(\"./graph/edgeVisual\");\n\nvar simpleLayout = require(\"./graph/simpleLayout\");\n\nvar circularLayout = require(\"./graph/circularLayout\");\n\nvar forceLayout = require(\"./graph/forceLayout\");\n\nvar createView = require(\"./graph/createView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerProcessor(categoryFilter);\necharts.registerVisual(visualSymbol('graph', 'circle', null));\necharts.registerVisual(categoryVisual);\necharts.registerVisual(edgeVisual);\necharts.registerLayout(simpleLayout);\necharts.registerLayout(echarts.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);\necharts.registerLayout(forceLayout); // Graph view coordinate system\n\necharts.registerCoordinateSystem('graphView', {\n create: createView\n});","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar dataFormatMixin = require(\"../../model/mixin/dataFormat\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar addCommas = formatUtil.addCommas;\nvar encodeHTML = formatUtil.encodeHTML;\n\nfunction fillLabel(opt) {\n modelUtil.defaultEmphasis(opt, 'label', ['show']);\n}\n\nvar MarkerModel = echarts.extendComponentModel({\n type: 'marker',\n dependencies: ['series', 'grid', 'polar', 'geo'],\n\n /**\n * @overrite\n */\n init: function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n\n this._mergeOption(option, ecModel, false, true);\n },\n\n /**\n * @return {boolean}\n */\n isAnimationEnabled: function () {\n if (env.node) {\n return false;\n }\n\n var hostSeries = this.__hostSeries;\n return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();\n },\n\n /**\n * @overrite\n */\n mergeOption: function (newOpt, ecModel) {\n this._mergeOption(newOpt, ecModel, false, false);\n },\n _mergeOption: function (newOpt, ecModel, createdBySelf, isInit) {\n var MarkerModel = this.constructor;\n var modelPropName = this.mainType + 'Model';\n\n if (!createdBySelf) {\n ecModel.eachSeries(function (seriesModel) {\n var markerOpt = seriesModel.get(this.mainType, true);\n var markerModel = seriesModel[modelPropName];\n\n if (!markerOpt || !markerOpt.data) {\n seriesModel[modelPropName] = null;\n return;\n }\n\n if (!markerModel) {\n if (isInit) {\n // Default label emphasis `position` and `show`\n fillLabel(markerOpt);\n }\n\n zrUtil.each(markerOpt.data, function (item) {\n // FIXME Overwrite fillLabel method ?\n if (item instanceof Array) {\n fillLabel(item[0]);\n fillLabel(item[1]);\n } else {\n fillLabel(item);\n }\n });\n markerModel = new MarkerModel(markerOpt, this, ecModel);\n zrUtil.extend(markerModel, {\n mainType: this.mainType,\n // Use the same series index and name\n seriesIndex: seriesModel.seriesIndex,\n name: seriesModel.name,\n createdBySelf: true\n });\n markerModel.__hostSeries = seriesModel;\n } else {\n markerModel._mergeOption(markerOpt, ecModel, true);\n }\n\n seriesModel[modelPropName] = markerModel;\n }, this);\n }\n },\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var formattedValue = zrUtil.isArray(value) ? zrUtil.map(value, addCommas).join(', ') : addCommas(value);\n var name = data.getName(dataIndex);\n var html = encodeHTML(this.name);\n\n if (value != null || name) {\n html += '
';\n }\n\n if (name) {\n html += encodeHTML(name);\n\n if (value != null) {\n html += ' : ';\n }\n }\n\n if (value != null) {\n html += encodeHTML(formattedValue);\n }\n\n return html;\n },\n getData: function () {\n return this._data;\n },\n setData: function (data) {\n this._data = data;\n }\n});\nzrUtil.mixin(MarkerModel, dataFormatMixin);\nvar _default = MarkerModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar layout = require(\"../../util/layout\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar linearMap = _number.linearMap;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction getSortedIndices(data, sort) {\n var valueDim = data.mapDimension('value');\n var valueArr = data.mapArray(valueDim, function (val) {\n return val;\n });\n var indices = [];\n var isAscending = sort === 'ascending';\n\n for (var i = 0, len = data.count(); i < len; i++) {\n indices[i] = i;\n } // Add custom sortable function & none sortable opetion by \"options.sort\"\n\n\n if (typeof sort === 'function') {\n indices.sort(sort);\n } else if (sort !== 'none') {\n indices.sort(function (a, b) {\n return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a];\n });\n }\n\n return indices;\n}\n\nfunction labelLayout(data) {\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n var labelPosition = labelModel.get('position');\n var labelLineModel = itemModel.getModel('labelLine');\n var layout = data.getItemLayout(idx);\n var points = layout.points;\n var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight';\n var textAlign;\n var textX;\n var textY;\n var linePoints;\n\n if (isLabelInside) {\n if (labelPosition === 'insideLeft') {\n textX = (points[0][0] + points[3][0]) / 2 + 5;\n textY = (points[0][1] + points[3][1]) / 2;\n textAlign = 'left';\n } else if (labelPosition === 'insideRight') {\n textX = (points[1][0] + points[2][0]) / 2 - 5;\n textY = (points[1][1] + points[2][1]) / 2;\n textAlign = 'right';\n } else {\n textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4;\n textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4;\n textAlign = 'center';\n }\n\n linePoints = [[textX, textY], [textX, textY]];\n } else {\n var x1;\n var y1;\n var x2;\n var labelLineLen = labelLineModel.get('length');\n\n if (labelPosition === 'left') {\n // Left side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n } else if (labelPosition === 'right') {\n // Right side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n } else if (labelPosition === 'rightTop') {\n // RightTop side\n x1 = points[1][0];\n y1 = points[1][1];\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'top';\n } else if (labelPosition === 'rightBottom') {\n // RightBottom side\n x1 = points[2][0];\n y1 = points[2][1];\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'bottom';\n } else if (labelPosition === 'leftTop') {\n // LeftTop side\n x1 = points[0][0];\n y1 = points[1][1];\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n } else if (labelPosition === 'leftBottom') {\n // LeftBottom side\n x1 = points[3][0];\n y1 = points[2][1];\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n } else {\n // Right side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n }\n\n var y2 = y1;\n linePoints = [[x1, y1], [x2, y2]];\n textY = y2;\n }\n\n layout.label = {\n linePoints: linePoints,\n x: textX,\n y: textY,\n verticalAlign: 'middle',\n textAlign: textAlign,\n inside: isLabelInside\n };\n });\n}\n\nfunction _default(ecModel, api, payload) {\n ecModel.eachSeriesByType('funnel', function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var sort = seriesModel.get('sort');\n var viewRect = getViewRect(seriesModel, api);\n var indices = getSortedIndices(data, sort);\n var sizeExtent = [parsePercent(seriesModel.get('minSize'), viewRect.width), parsePercent(seriesModel.get('maxSize'), viewRect.width)];\n var dataExtent = data.getDataExtent(valueDim);\n var min = seriesModel.get('min');\n var max = seriesModel.get('max');\n\n if (min == null) {\n min = Math.min(dataExtent[0], 0);\n }\n\n if (max == null) {\n max = dataExtent[1];\n }\n\n var funnelAlign = seriesModel.get('funnelAlign');\n var gap = seriesModel.get('gap');\n var itemHeight = (viewRect.height - gap * (data.count() - 1)) / data.count();\n var y = viewRect.y;\n\n var getLinePoints = function (idx, offY) {\n // End point index is data.count() and we assign it 0\n var val = data.get(valueDim, idx) || 0;\n var itemWidth = linearMap(val, [min, max], sizeExtent, true);\n var x0;\n\n switch (funnelAlign) {\n case 'left':\n x0 = viewRect.x;\n break;\n\n case 'center':\n x0 = viewRect.x + (viewRect.width - itemWidth) / 2;\n break;\n\n case 'right':\n x0 = viewRect.x + viewRect.width - itemWidth;\n break;\n }\n\n return [[x0, offY], [x0 + itemWidth, offY]];\n };\n\n if (sort === 'ascending') {\n // From bottom to top\n itemHeight = -itemHeight;\n gap = -gap;\n y += viewRect.height;\n indices = indices.reverse();\n }\n\n for (var i = 0; i < indices.length; i++) {\n var idx = indices[i];\n var nextIdx = indices[i + 1];\n var itemModel = data.getItemModel(idx);\n var height = itemModel.get('itemStyle.height');\n\n if (height == null) {\n height = itemHeight;\n } else {\n height = parsePercent(height, viewRect.height);\n\n if (sort === 'ascending') {\n height = -height;\n }\n }\n\n var start = getLinePoints(idx, y);\n var end = getLinePoints(nextIdx, y + height);\n y += height + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n }\n\n labelLayout(data);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar _poly = require(\"../line/poly\");\n\nvar Polygon = _poly.Polygon;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar bind = _util.bind;\nvar extend = _util.extend;\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendChartView({\n type: 'themeRiver',\n init: function () {\n this._layers = [];\n },\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var group = this.group;\n var layerSeries = seriesModel.getLayerSeries();\n var layoutInfo = data.getLayout('layoutInfo');\n var rect = layoutInfo.rect;\n var boundaryGap = layoutInfo.boundaryGap;\n group.attr('position', [0, rect.y + boundaryGap[0]]);\n\n function keyGetter(item) {\n return item.name;\n }\n\n var dataDiffer = new DataDiffer(this._layersSeries || [], layerSeries, keyGetter, keyGetter);\n var newLayersGroups = {};\n dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute();\n\n function process(status, idx, oldIdx) {\n var oldLayersGroups = this._layers;\n\n if (status === 'remove') {\n group.remove(oldLayersGroups[idx]);\n return;\n }\n\n var points0 = [];\n var points1 = [];\n var color;\n var indices = layerSeries[idx].indices;\n\n for (var j = 0; j < indices.length; j++) {\n var layout = data.getItemLayout(indices[j]);\n var x = layout.x;\n var y0 = layout.y0;\n var y = layout.y;\n points0.push([x, y0]);\n points1.push([x, y0 + y]);\n color = data.getItemVisual(indices[j], 'color');\n }\n\n var polygon;\n var text;\n var textLayout = data.getItemLayout(indices[0]);\n var itemModel = data.getItemModel(indices[j - 1]);\n var labelModel = itemModel.getModel('label');\n var margin = labelModel.get('margin');\n\n if (status === 'add') {\n var layerGroup = newLayersGroups[idx] = new graphic.Group();\n polygon = new Polygon({\n shape: {\n points: points0,\n stackedOnPoints: points1,\n smooth: 0.4,\n stackedOnSmooth: 0.4,\n smoothConstraint: false\n },\n z2: 0\n });\n text = new graphic.Text({\n style: {\n x: textLayout.x - margin,\n y: textLayout.y0 + textLayout.y / 2\n }\n });\n layerGroup.add(polygon);\n layerGroup.add(text);\n group.add(layerGroup);\n polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () {\n polygon.removeClipPath();\n }));\n } else {\n var layerGroup = oldLayersGroups[oldIdx];\n polygon = layerGroup.childAt(0);\n text = layerGroup.childAt(1);\n group.add(layerGroup);\n newLayersGroups[idx] = layerGroup;\n graphic.updateProps(polygon, {\n shape: {\n points: points0,\n stackedOnPoints: points1\n }\n }, seriesModel);\n graphic.updateProps(text, {\n style: {\n x: textLayout.x - margin,\n y: textLayout.y0 + textLayout.y / 2\n }\n }, seriesModel);\n }\n\n var hoverItemStyleModel = itemModel.getModel('emphasis.itemStyle');\n var itemStyleModel = itemModel.getModel('itemStyle');\n graphic.setTextStyle(text.style, labelModel, {\n text: labelModel.get('show') ? seriesModel.getFormattedLabel(indices[j - 1], 'normal') || data.getName(indices[j - 1]) : null,\n textVerticalAlign: 'middle'\n });\n polygon.setStyle(extend({\n fill: color\n }, itemStyleModel.getItemStyle(['color'])));\n graphic.setHoverStyle(polygon, hoverItemStyleModel.getItemStyle());\n }\n\n this._layersSeries = layerSeries;\n this._layers = newLayersGroups;\n },\n dispose: function () {}\n}); // add animation to the view\n\n\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width + 20,\n height: rect.height + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\n\nmodule.exports = _default;","'use strict';\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../../util/model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine'];\n\nfunction compatEC2ItemStyle(opt) {\n var itemStyleOpt = opt && opt.itemStyle;\n\n if (!itemStyleOpt) {\n return;\n }\n\n for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) {\n var styleName = POSSIBLE_STYLES[i];\n var normalItemStyleOpt = itemStyleOpt.normal;\n var emphasisItemStyleOpt = itemStyleOpt.emphasis;\n\n if (normalItemStyleOpt && normalItemStyleOpt[styleName]) {\n opt[styleName] = opt[styleName] || {};\n\n if (!opt[styleName].normal) {\n opt[styleName].normal = normalItemStyleOpt[styleName];\n } else {\n zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]);\n }\n\n normalItemStyleOpt[styleName] = null;\n }\n\n if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) {\n opt[styleName] = opt[styleName] || {};\n\n if (!opt[styleName].emphasis) {\n opt[styleName].emphasis = emphasisItemStyleOpt[styleName];\n } else {\n zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]);\n }\n\n emphasisItemStyleOpt[styleName] = null;\n }\n }\n}\n\nfunction convertNormalEmphasis(opt, optType, useExtend) {\n if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {\n var normalOpt = opt[optType].normal;\n var emphasisOpt = opt[optType].emphasis;\n\n if (normalOpt) {\n // Timeline controlStyle has other properties besides normal and emphasis\n if (useExtend) {\n opt[optType].normal = opt[optType].emphasis = null;\n zrUtil.defaults(opt[optType], normalOpt);\n } else {\n opt[optType] = normalOpt;\n }\n }\n\n if (emphasisOpt) {\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[optType] = emphasisOpt;\n }\n }\n}\n\nfunction removeEC3NormalStatus(opt) {\n convertNormalEmphasis(opt, 'itemStyle');\n convertNormalEmphasis(opt, 'lineStyle');\n convertNormalEmphasis(opt, 'areaStyle');\n convertNormalEmphasis(opt, 'label');\n convertNormalEmphasis(opt, 'labelLine'); // treemap\n\n convertNormalEmphasis(opt, 'upperLabel'); // graph\n\n convertNormalEmphasis(opt, 'edgeLabel');\n}\n\nfunction compatTextStyle(opt, propName) {\n // Check whether is not object (string\\null\\undefined ...)\n var labelOptSingle = isObject(opt) && opt[propName];\n var textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle;\n\n if (textStyle) {\n for (var i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) {\n var propName = modelUtil.TEXT_STYLE_OPTIONS[i];\n\n if (textStyle.hasOwnProperty(propName)) {\n labelOptSingle[propName] = textStyle[propName];\n }\n }\n }\n}\n\nfunction compatEC3CommonStyles(opt) {\n if (opt) {\n removeEC3NormalStatus(opt);\n compatTextStyle(opt, 'label');\n opt.emphasis && compatTextStyle(opt.emphasis, 'label');\n }\n}\n\nfunction processSeries(seriesOpt) {\n if (!isObject(seriesOpt)) {\n return;\n }\n\n compatEC2ItemStyle(seriesOpt);\n removeEC3NormalStatus(seriesOpt);\n compatTextStyle(seriesOpt, 'label'); // treemap\n\n compatTextStyle(seriesOpt, 'upperLabel'); // graph\n\n compatTextStyle(seriesOpt, 'edgeLabel');\n\n if (seriesOpt.emphasis) {\n compatTextStyle(seriesOpt.emphasis, 'label'); // treemap\n\n compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph\n\n compatTextStyle(seriesOpt.emphasis, 'edgeLabel');\n }\n\n var markPoint = seriesOpt.markPoint;\n\n if (markPoint) {\n compatEC2ItemStyle(markPoint);\n compatEC3CommonStyles(markPoint);\n }\n\n var markLine = seriesOpt.markLine;\n\n if (markLine) {\n compatEC2ItemStyle(markLine);\n compatEC3CommonStyles(markLine);\n }\n\n var markArea = seriesOpt.markArea;\n\n if (markArea) {\n compatEC3CommonStyles(markArea);\n }\n\n var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option,\n // then the backward compat based on option type will not be performed.\n\n if (seriesOpt.type === 'graph') {\n data = data || seriesOpt.nodes;\n var edgeData = seriesOpt.links || seriesOpt.edges;\n\n if (edgeData && !zrUtil.isTypedArray(edgeData)) {\n for (var i = 0; i < edgeData.length; i++) {\n compatEC3CommonStyles(edgeData[i]);\n }\n }\n\n zrUtil.each(seriesOpt.categories, function (opt) {\n removeEC3NormalStatus(opt);\n });\n }\n\n if (data && !zrUtil.isTypedArray(data)) {\n for (var i = 0; i < data.length; i++) {\n compatEC3CommonStyles(data[i]);\n }\n } // mark point data\n\n\n var markPoint = seriesOpt.markPoint;\n\n if (markPoint && markPoint.data) {\n var mpData = markPoint.data;\n\n for (var i = 0; i < mpData.length; i++) {\n compatEC3CommonStyles(mpData[i]);\n }\n } // mark line data\n\n\n var markLine = seriesOpt.markLine;\n\n if (markLine && markLine.data) {\n var mlData = markLine.data;\n\n for (var i = 0; i < mlData.length; i++) {\n if (zrUtil.isArray(mlData[i])) {\n compatEC3CommonStyles(mlData[i][0]);\n compatEC3CommonStyles(mlData[i][1]);\n } else {\n compatEC3CommonStyles(mlData[i]);\n }\n }\n } // Series\n\n\n if (seriesOpt.type === 'gauge') {\n compatTextStyle(seriesOpt, 'axisLabel');\n compatTextStyle(seriesOpt, 'title');\n compatTextStyle(seriesOpt, 'detail');\n } else if (seriesOpt.type === 'treemap') {\n convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle');\n zrUtil.each(seriesOpt.levels, function (opt) {\n removeEC3NormalStatus(opt);\n });\n } else if (seriesOpt.type === 'tree') {\n removeEC3NormalStatus(seriesOpt.leaves);\n } // sunburst starts from ec4, so it does not need to compat levels.\n\n}\n\nfunction toArr(o) {\n return zrUtil.isArray(o) ? o : o ? [o] : [];\n}\n\nfunction toObj(o) {\n return (zrUtil.isArray(o) ? o[0] : o) || {};\n}\n\nfunction _default(option, isTheme) {\n each(toArr(option.series), function (seriesOpt) {\n isObject(seriesOpt) && processSeries(seriesOpt);\n });\n var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar'];\n isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis');\n each(axes, function (axisName) {\n each(toArr(option[axisName]), function (axisOpt) {\n if (axisOpt) {\n compatTextStyle(axisOpt, 'axisLabel');\n compatTextStyle(axisOpt.axisPointer, 'label');\n }\n });\n });\n each(toArr(option.parallel), function (parallelOpt) {\n var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault;\n compatTextStyle(parallelAxisDefault, 'axisLabel');\n compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label');\n });\n each(toArr(option.calendar), function (calendarOpt) {\n convertNormalEmphasis(calendarOpt, 'itemStyle');\n compatTextStyle(calendarOpt, 'dayLabel');\n compatTextStyle(calendarOpt, 'monthLabel');\n compatTextStyle(calendarOpt, 'yearLabel');\n }); // radar.name.textStyle\n\n each(toArr(option.radar), function (radarOpt) {\n compatTextStyle(radarOpt, 'name');\n });\n each(toArr(option.geo), function (geoOpt) {\n if (isObject(geoOpt)) {\n compatEC3CommonStyles(geoOpt);\n each(toArr(geoOpt.regions), function (regionObj) {\n compatEC3CommonStyles(regionObj);\n });\n }\n });\n each(toArr(option.timeline), function (timelineOpt) {\n compatEC3CommonStyles(timelineOpt);\n convertNormalEmphasis(timelineOpt, 'label');\n convertNormalEmphasis(timelineOpt, 'itemStyle');\n convertNormalEmphasis(timelineOpt, 'controlStyle', true);\n var data = timelineOpt.data;\n zrUtil.isArray(data) && zrUtil.each(data, function (item) {\n if (zrUtil.isObject(item)) {\n convertNormalEmphasis(item, 'label');\n convertNormalEmphasis(item, 'itemStyle');\n }\n });\n });\n each(toArr(option.toolbox), function (toolboxOpt) {\n convertNormalEmphasis(toolboxOpt, 'iconStyle');\n each(toolboxOpt.feature, function (featureOpt) {\n convertNormalEmphasis(featureOpt, 'iconStyle');\n });\n });\n compatTextStyle(toObj(option.axisPointer), 'label');\n compatTextStyle(toObj(option.tooltip).axisPointer, 'label');\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Parse shadow style\n// TODO Only shallow path support\nfunction _default(properties) {\n // Normalize\n for (var i = 0; i < properties.length; i++) {\n if (!properties[i][1]) {\n properties[i][1] = properties[i][0];\n }\n }\n\n return function (model, excludes, includes) {\n var style = {};\n\n for (var i = 0; i < properties.length; i++) {\n var propName = properties[i][1];\n\n if (excludes && zrUtil.indexOf(excludes, propName) >= 0 || includes && zrUtil.indexOf(includes, propName) < 0) {\n continue;\n }\n\n var val = model.getShallow(propName);\n\n if (val != null) {\n style[properties[i][0]] = val;\n }\n }\n\n return style;\n };\n}\n\nmodule.exports = _default;","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar linearMap = _number.linearMap;\n\nvar layout = require(\"../../util/layout\");\n\nvar labelLayout = require(\"./labelLayout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction _default(seriesType, ecModel, api, payload) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var viewRect = getViewRect(seriesModel, api);\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n\n var width = parsePercent(viewRect.width, api.getWidth());\n var height = parsePercent(viewRect.height, api.getHeight());\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width) + viewRect.x;\n var cy = parsePercent(center[1], height) + viewRect.y;\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n var sum = data.getSum(valueDim); // Sum may be 0\n\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var clockwise = seriesModel.get('clockwise');\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max]\n\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0; // In the case some sector angle is smaller than minAngle\n\n var restAngle = PI2;\n var valueSumLargerThanMinAngle = 0;\n var currentAngle = startAngle;\n var dir = clockwise ? 1 : -1;\n data.each(valueDim, function (value, idx) {\n var angle;\n\n if (isNaN(value)) {\n data.setItemLayout(idx, {\n angle: NaN,\n startAngle: NaN,\n endAngle: NaN,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? NaN : r,\n viewRect: viewRect\n });\n return;\n } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n\n\n if (roseType !== 'area') {\n angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n } else {\n angle = PI2 / validDataCount;\n }\n\n if (angle < minAngle) {\n angle = minAngle;\n restAngle -= minAngle;\n } else {\n valueSumLargerThanMinAngle += value;\n }\n\n var endAngle = currentAngle + dir * angle;\n data.setItemLayout(idx, {\n angle: angle,\n startAngle: currentAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? linearMap(value, extent, [r0, r]) : r,\n viewRect: viewRect\n });\n currentAngle = endAngle;\n }); // Some sector is constrained by minAngle\n // Rest sectors needs recalculate angle\n\n if (restAngle < PI2 && validDataCount) {\n // Average the angle if rest angle is not enough after all angles is\n // Constrained by minAngle\n if (restAngle <= 1e-3) {\n var angle = PI2 / validDataCount;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n layout.angle = angle;\n layout.startAngle = startAngle + dir * idx * angle;\n layout.endAngle = startAngle + dir * (idx + 1) * angle;\n }\n });\n } else {\n unitRadian = restAngle / valueSumLargerThanMinAngle;\n currentAngle = startAngle;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n var angle = layout.angle === minAngle ? minAngle : value * unitRadian;\n layout.startAngle = currentAngle;\n layout.endAngle = currentAngle + dir * angle;\n currentAngle += dir * angle;\n }\n });\n }\n }\n\n labelLayout(seriesModel, r, viewRect.width, viewRect.height, viewRect.x, viewRect.y);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n var paletteScope = {};\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var categoriesData = seriesModel.getCategoriesData();\n var data = seriesModel.getData();\n var categoryNameIdxMap = {};\n categoriesData.each(function (idx) {\n var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype.\n\n categoryNameIdxMap['ec-' + name] = idx;\n var itemModel = categoriesData.getItemModel(idx);\n var color = itemModel.get('itemStyle.color') || seriesModel.getColorFromPalette(name, paletteScope);\n categoriesData.setItemVisual(idx, 'color', color);\n var itemStyleList = ['opacity', 'symbol', 'symbolSize', 'symbolKeepAspect'];\n\n for (var i = 0; i < itemStyleList.length; i++) {\n var itemStyle = itemModel.getShallow(itemStyleList[i], true);\n\n if (itemStyle != null) {\n categoriesData.setItemVisual(idx, itemStyleList[i], itemStyle);\n }\n }\n }); // Assign category color to visual\n\n if (categoriesData.count()) {\n data.each(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (typeof category === 'string') {\n category = categoryNameIdxMap['ec-' + category];\n }\n\n var itemStyleList = ['color', 'opacity', 'symbol', 'symbolSize', 'symbolKeepAspect'];\n\n for (var i = 0; i < itemStyleList.length; i++) {\n if (data.getItemVisual(idx, itemStyleList[i], true) == null) {\n data.setItemVisual(idx, itemStyleList[i], categoriesData.getItemVisual(category, itemStyleList[i]));\n }\n }\n }\n });\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Language: (Simplified) Chinese.\n */\nvar _default = {\n legend: {\n selector: {\n all: '全选',\n inverse: '反选'\n }\n },\n toolbox: {\n brush: {\n title: {\n rect: '矩形选择',\n polygon: '圈选',\n lineX: '横向选择',\n lineY: '纵向选择',\n keep: '保持选择',\n clear: '清除选择'\n }\n },\n dataView: {\n title: '数据视图',\n lang: ['数据视图', '关闭', '刷新']\n },\n dataZoom: {\n title: {\n zoom: '区域缩放',\n back: '区域缩放还原'\n }\n },\n magicType: {\n title: {\n line: '切换为折线图',\n bar: '切换为柱状图',\n stack: '切换为堆叠',\n tiled: '切换为平铺'\n }\n },\n restore: {\n title: '还原'\n },\n saveAsImage: {\n title: '保存为图片',\n lang: ['右键另存为图片']\n }\n },\n series: {\n typeNames: {\n pie: '饼图',\n bar: '柱状图',\n line: '折线图',\n scatter: '散点图',\n effectScatter: '涟漪散点图',\n radar: '雷达图',\n tree: '树图',\n treemap: '矩形树图',\n boxplot: '箱型图',\n candlestick: 'K线图',\n k: 'K线图',\n heatmap: '热力图',\n map: '地图',\n parallel: '平行坐标图',\n lines: '线图',\n graph: '关系图',\n sankey: '桑基图',\n funnel: '漏斗图',\n gauge: '仪表盘图',\n pictorialBar: '象形柱图',\n themeRiver: '主题河流图',\n sunburst: '旭日图'\n }\n },\n aria: {\n general: {\n withTitle: '这是一个关于“{title}”的图表。',\n withoutTitle: '这是一个图表,'\n },\n series: {\n single: {\n prefix: '',\n withName: '图表类型是{seriesType},表示{seriesName}。',\n withoutName: '图表类型是{seriesType}。'\n },\n multiple: {\n prefix: '它由{seriesCount}个图表系列组成。',\n withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},',\n withoutName: '第{seriesId}个系列是一个{seriesType},',\n separator: {\n middle: ';',\n end: '。'\n }\n }\n },\n data: {\n allData: '其数据是——',\n partialData: '其中,前{displayCnt}项是——',\n withName: '{name}的数据是{value}',\n withoutName: '{value}',\n separator: {\n middle: ',',\n end: ''\n }\n }\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./visualMap/preprocessor\");\n\nrequire(\"./visualMap/typeDefaulter\");\n\nrequire(\"./visualMap/visualEncoding\");\n\nrequire(\"./visualMap/PiecewiseModel\");\n\nrequire(\"./visualMap/PiecewiseView\");\n\nrequire(\"./visualMap/visualMapAction\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * DataZoom component entry\n */\necharts.registerPreprocessor(preprocessor);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isTypedArray = _util.isTypedArray;\nvar extend = _util.extend;\nvar assert = _util.assert;\nvar each = _util.each;\nvar isObject = _util.isObject;\n\nvar _model = require(\"../../util/model\");\n\nvar getDataItemValue = _model.getDataItemValue;\nvar isDataItemOption = _model.isDataItemOption;\n\nvar _number = require(\"../../util/number\");\n\nvar parseDate = _number.parseDate;\n\nvar Source = require(\"../Source\");\n\nvar _sourceType = require(\"./sourceType\");\n\nvar SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;\nvar SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS;\nvar SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;\nvar SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO\n// ??? refactor? check the outer usage of data provider.\n// merge with defaultDimValueGetter?\n\n/**\n * If normal array used, mutable chunk size is supported.\n * If typed array used, chunk size must be fixed.\n */\nfunction DefaultDataProvider(source, dimSize) {\n if (!Source.isInstance(source)) {\n source = Source.seriesDataToSource(source);\n }\n\n this._source = source;\n var data = this._data = source.data;\n var sourceFormat = source.sourceFormat; // Typed array. TODO IE10+?\n\n if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n this._offset = 0;\n this._dimSize = dimSize;\n this._data = data;\n }\n\n var methods = providerMethods[sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + source.seriesLayoutBy : sourceFormat];\n extend(this, methods);\n}\n\nvar providerProto = DefaultDataProvider.prototype; // If data is pure without style configuration\n\nproviderProto.pure = false; // If data is persistent and will not be released after use.\n\nproviderProto.persistent = true; // ???! FIXME legacy data provider do not has method getSource\n\nproviderProto.getSource = function () {\n return this._source;\n};\n\nvar providerMethods = {\n 'arrayRows_column': {\n pure: true,\n count: function () {\n return Math.max(0, this._data.length - this._source.startIndex);\n },\n getItem: function (idx) {\n return this._data[idx + this._source.startIndex];\n },\n appendData: appendDataSimply\n },\n 'arrayRows_row': {\n pure: true,\n count: function () {\n var row = this._data[0];\n return row ? Math.max(0, row.length - this._source.startIndex) : 0;\n },\n getItem: function (idx) {\n idx += this._source.startIndex;\n var item = [];\n var data = this._data;\n\n for (var i = 0; i < data.length; i++) {\n var row = data[i];\n item.push(row ? row[idx] : null);\n }\n\n return item;\n },\n appendData: function () {\n throw new Error('Do not support appendData when set seriesLayoutBy: \"row\".');\n }\n },\n 'objectRows': {\n pure: true,\n count: countSimply,\n getItem: getItemSimply,\n appendData: appendDataSimply\n },\n 'keyedColumns': {\n pure: true,\n count: function () {\n var dimName = this._source.dimensionsDefine[0].name;\n var col = this._data[dimName];\n return col ? col.length : 0;\n },\n getItem: function (idx) {\n var item = [];\n var dims = this._source.dimensionsDefine;\n\n for (var i = 0; i < dims.length; i++) {\n var col = this._data[dims[i].name];\n item.push(col ? col[idx] : null);\n }\n\n return item;\n },\n appendData: function (newData) {\n var data = this._data;\n each(newData, function (newCol, key) {\n var oldCol = data[key] || (data[key] = []);\n\n for (var i = 0; i < (newCol || []).length; i++) {\n oldCol.push(newCol[i]);\n }\n });\n }\n },\n 'original': {\n count: countSimply,\n getItem: getItemSimply,\n appendData: appendDataSimply\n },\n 'typedArray': {\n persistent: false,\n pure: true,\n count: function () {\n return this._data ? this._data.length / this._dimSize : 0;\n },\n getItem: function (idx, out) {\n idx = idx - this._offset;\n out = out || [];\n var offset = this._dimSize * idx;\n\n for (var i = 0; i < this._dimSize; i++) {\n out[i] = this._data[offset + i];\n }\n\n return out;\n },\n appendData: function (newData) {\n this._data = newData;\n },\n // Clean self if data is already used.\n clean: function () {\n // PENDING\n this._offset += this.count();\n this._data = null;\n }\n }\n};\n\nfunction countSimply() {\n return this._data.length;\n}\n\nfunction getItemSimply(idx) {\n return this._data[idx];\n}\n\nfunction appendDataSimply(newData) {\n for (var i = 0; i < newData.length; i++) {\n this._data.push(newData[i]);\n }\n}\n\nvar rawValueGetters = {\n arrayRows: getRawValueSimply,\n objectRows: function (dataItem, dataIndex, dimIndex, dimName) {\n return dimIndex != null ? dataItem[dimName] : dataItem;\n },\n keyedColumns: getRawValueSimply,\n original: function (dataItem, dataIndex, dimIndex, dimName) {\n // FIXME\n // In some case (markpoint in geo (geo-map.html)), dataItem\n // is {coord: [...]}\n var value = getDataItemValue(dataItem);\n return dimIndex == null || !(value instanceof Array) ? value : value[dimIndex];\n },\n typedArray: getRawValueSimply\n};\n\nfunction getRawValueSimply(dataItem, dataIndex, dimIndex, dimName) {\n return dimIndex != null ? dataItem[dimIndex] : dataItem;\n}\n\nvar defaultDimValueGetters = {\n arrayRows: getDimValueSimply,\n objectRows: function (dataItem, dimName, dataIndex, dimIndex) {\n return converDataValue(dataItem[dimName], this._dimensionInfos[dimName]);\n },\n keyedColumns: getDimValueSimply,\n original: function (dataItem, dimName, dataIndex, dimIndex) {\n // Performance sensitive, do not use modelUtil.getDataItemValue.\n // If dataItem is an plain object with no value field, the var `value`\n // will be assigned with the object, but it will be tread correctly\n // in the `convertDataValue`.\n var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value); // If any dataItem is like { value: 10 }\n\n if (!this._rawData.pure && isDataItemOption(dataItem)) {\n this.hasItemOption = true;\n }\n\n return converDataValue(value instanceof Array ? value[dimIndex] // If value is a single number or something else not array.\n : value, this._dimensionInfos[dimName]);\n },\n typedArray: function (dataItem, dimName, dataIndex, dimIndex) {\n return dataItem[dimIndex];\n }\n};\n\nfunction getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) {\n return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]);\n}\n/**\n * This helper method convert value in data.\n * @param {string|number|Date} value\n * @param {Object|string} [dimInfo] If string (like 'x'), dimType defaults 'number'.\n * If \"dimInfo.ordinalParseAndSave\", ordinal value can be parsed.\n */\n\n\nfunction converDataValue(value, dimInfo) {\n // Performance sensitive.\n var dimType = dimInfo && dimInfo.type;\n\n if (dimType === 'ordinal') {\n // If given value is a category string\n var ordinalMeta = dimInfo && dimInfo.ordinalMeta;\n return ordinalMeta ? ordinalMeta.parseAndCollect(value) : value;\n }\n\n if (dimType === 'time' // spead up when using timestamp\n && typeof value !== 'number' && value != null && value !== '-') {\n value = +parseDate(value);\n } // dimType defaults 'number'.\n // If dimType is not ordinal and value is null or undefined or NaN or '-',\n // parse to NaN.\n\n\n return value == null || value === '' ? NaN // If string (like '-'), using '+' parse to NaN\n // If object, also parse to NaN\n : +value;\n} // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem,\n// Consider persistent.\n// Caution: why use raw value to display on label or tooltip?\n// A reason is to avoid format. For example time value we do not know\n// how to format is expected. More over, if stack is used, calculated\n// value may be 0.91000000001, which have brings trouble to display.\n// TODO: consider how to treat null/undefined/NaN when display?\n\n/**\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @param {string|number} [dim] dimName or dimIndex\n * @return {Array.|string|number} can be null/undefined.\n */\n\n\nfunction retrieveRawValue(data, dataIndex, dim) {\n if (!data) {\n return;\n } // Consider data may be not persistent.\n\n\n var dataItem = data.getRawDataItem(dataIndex);\n\n if (dataItem == null) {\n return;\n }\n\n var sourceFormat = data.getProvider().getSource().sourceFormat;\n var dimName;\n var dimIndex;\n var dimInfo = data.getDimensionInfo(dim);\n\n if (dimInfo) {\n dimName = dimInfo.name;\n dimIndex = dimInfo.index;\n }\n\n return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);\n}\n/**\n * Compatible with some cases (in pie, map) like:\n * data: [{name: 'xx', value: 5, selected: true}, ...]\n * where only sourceFormat is 'original' and 'objectRows' supported.\n *\n * ??? TODO\n * Supported detail options in data item when using 'arrayRows'.\n *\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @param {string} attr like 'selected'\n */\n\n\nfunction retrieveRawAttr(data, dataIndex, attr) {\n if (!data) {\n return;\n }\n\n var sourceFormat = data.getProvider().getSource().sourceFormat;\n\n if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {\n return;\n }\n\n var dataItem = data.getRawDataItem(dataIndex);\n\n if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) {\n dataItem = null;\n }\n\n if (dataItem) {\n return dataItem[attr];\n }\n}\n\nexports.DefaultDataProvider = DefaultDataProvider;\nexports.defaultDimValueGetters = defaultDimValueGetters;\nexports.retrieveRawValue = retrieveRawValue;\nexports.retrieveRawAttr = retrieveRawAttr;","var fixShadow = require(\"./helper/fixShadow\");\n\nvar _constant = require(\"./constant\");\n\nvar ContextCachedBy = _constant.ContextCachedBy;\nvar STYLE_COMMON_PROPS = [['shadowBlur', 0], ['shadowOffsetX', 0], ['shadowOffsetY', 0], ['shadowColor', '#000'], ['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10]]; // var SHADOW_PROPS = STYLE_COMMON_PROPS.slice(0, 4);\n// var LINE_PROPS = STYLE_COMMON_PROPS.slice(4);\n\nvar Style = function (opts) {\n this.extendFrom(opts, false);\n};\n\nfunction createLinearGradient(ctx, obj, rect) {\n var x = obj.x == null ? 0 : obj.x;\n var x2 = obj.x2 == null ? 1 : obj.x2;\n var y = obj.y == null ? 0 : obj.y;\n var y2 = obj.y2 == null ? 0 : obj.y2;\n\n if (!obj.global) {\n x = x * rect.width + rect.x;\n x2 = x2 * rect.width + rect.x;\n y = y * rect.height + rect.y;\n y2 = y2 * rect.height + rect.y;\n } // Fix NaN when rect is Infinity\n\n\n x = isNaN(x) ? 0 : x;\n x2 = isNaN(x2) ? 1 : x2;\n y = isNaN(y) ? 0 : y;\n y2 = isNaN(y2) ? 0 : y2;\n var canvasGradient = ctx.createLinearGradient(x, y, x2, y2);\n return canvasGradient;\n}\n\nfunction createRadialGradient(ctx, obj, rect) {\n var width = rect.width;\n var height = rect.height;\n var min = Math.min(width, height);\n var x = obj.x == null ? 0.5 : obj.x;\n var y = obj.y == null ? 0.5 : obj.y;\n var r = obj.r == null ? 0.5 : obj.r;\n\n if (!obj.global) {\n x = x * width + rect.x;\n y = y * height + rect.y;\n r = r * min;\n }\n\n var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r);\n return canvasGradient;\n}\n\nStyle.prototype = {\n constructor: Style,\n\n /**\n * @type {string}\n */\n fill: '#000',\n\n /**\n * @type {string}\n */\n stroke: null,\n\n /**\n * @type {number}\n */\n opacity: 1,\n\n /**\n * @type {number}\n */\n fillOpacity: null,\n\n /**\n * @type {number}\n */\n strokeOpacity: null,\n\n /**\n * `true` is not supported.\n * `false`/`null`/`undefined` are the same.\n * `false` is used to remove lineDash in some\n * case that `null`/`undefined` can not be set.\n * (e.g., emphasis.lineStyle in echarts)\n * @type {Array.|boolean}\n */\n lineDash: null,\n\n /**\n * @type {number}\n */\n lineDashOffset: 0,\n\n /**\n * @type {number}\n */\n shadowBlur: 0,\n\n /**\n * @type {number}\n */\n shadowOffsetX: 0,\n\n /**\n * @type {number}\n */\n shadowOffsetY: 0,\n\n /**\n * @type {number}\n */\n lineWidth: 1,\n\n /**\n * If stroke ignore scale\n * @type {Boolean}\n */\n strokeNoScale: false,\n // Bounding rect text configuration\n // Not affected by element transform\n\n /**\n * @type {string}\n */\n text: null,\n\n /**\n * If `fontSize` or `fontFamily` exists, `font` will be reset by\n * `fontSize`, `fontStyle`, `fontWeight`, `fontFamily`.\n * So do not visit it directly in upper application (like echarts),\n * but use `contain/text#makeFont` instead.\n * @type {string}\n */\n font: null,\n\n /**\n * The same as font. Use font please.\n * @deprecated\n * @type {string}\n */\n textFont: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * @type {string}\n */\n fontStyle: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * @type {string}\n */\n fontWeight: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * Should be 12 but not '12px'.\n * @type {number}\n */\n fontSize: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * @type {string}\n */\n fontFamily: null,\n\n /**\n * Reserved for special functinality, like 'hr'.\n * @type {string}\n */\n textTag: null,\n\n /**\n * @type {string}\n */\n textFill: '#000',\n\n /**\n * @type {string}\n */\n textStroke: null,\n\n /**\n * @type {number}\n */\n textWidth: null,\n\n /**\n * Only for textBackground.\n * @type {number}\n */\n textHeight: null,\n\n /**\n * textStroke may be set as some color as a default\n * value in upper applicaion, where the default value\n * of textStrokeWidth should be 0 to make sure that\n * user can choose to do not use text stroke.\n * @type {number}\n */\n textStrokeWidth: 0,\n\n /**\n * @type {number}\n */\n textLineHeight: null,\n\n /**\n * 'inside', 'left', 'right', 'top', 'bottom'\n * [x, y]\n * Based on x, y of rect.\n * @type {string|Array.}\n * @default 'inside'\n */\n textPosition: 'inside',\n\n /**\n * If not specified, use the boundingRect of a `displayable`.\n * @type {Object}\n */\n textRect: null,\n\n /**\n * [x, y]\n * @type {Array.}\n */\n textOffset: null,\n\n /**\n * @type {string}\n */\n textAlign: null,\n\n /**\n * @type {string}\n */\n textVerticalAlign: null,\n\n /**\n * @type {number}\n */\n textDistance: 5,\n\n /**\n * @type {string}\n */\n textShadowColor: 'transparent',\n\n /**\n * @type {number}\n */\n textShadowBlur: 0,\n\n /**\n * @type {number}\n */\n textShadowOffsetX: 0,\n\n /**\n * @type {number}\n */\n textShadowOffsetY: 0,\n\n /**\n * @type {string}\n */\n textBoxShadowColor: 'transparent',\n\n /**\n * @type {number}\n */\n textBoxShadowBlur: 0,\n\n /**\n * @type {number}\n */\n textBoxShadowOffsetX: 0,\n\n /**\n * @type {number}\n */\n textBoxShadowOffsetY: 0,\n\n /**\n * Whether transform text.\n * Only available in Path and Image element,\n * where the text is called as `RectText`.\n * @type {boolean}\n */\n transformText: false,\n\n /**\n * Text rotate around position of Path or Image.\n * The origin of the rotation can be specified by `textOrigin`.\n * Only available in Path and Image element,\n * where the text is called as `RectText`.\n */\n textRotation: 0,\n\n /**\n * Text origin of text rotation.\n * Useful in the case like label rotation of circular symbol.\n * Only available in Path and Image element, where the text is called\n * as `RectText` and the element is called as \"host element\".\n * The value can be:\n * + If specified as a coordinate like `[10, 40]`, it is the `[x, y]`\n * base on the left-top corner of the rect of its host element.\n * + If specified as a string `center`, it is the center of the rect of\n * its host element.\n * + By default, this origin is the `textPosition`.\n * @type {string|Array.}\n */\n textOrigin: null,\n\n /**\n * @type {string}\n */\n textBackgroundColor: null,\n\n /**\n * @type {string}\n */\n textBorderColor: null,\n\n /**\n * @type {number}\n */\n textBorderWidth: 0,\n\n /**\n * @type {number}\n */\n textBorderRadius: 0,\n\n /**\n * Can be `2` or `[2, 4]` or `[2, 3, 4, 5]`\n * @type {number|Array.}\n */\n textPadding: null,\n\n /**\n * Text styles for rich text.\n * @type {Object}\n */\n rich: null,\n\n /**\n * {outerWidth, outerHeight, ellipsis, placeholder}\n * @type {Object}\n */\n truncate: null,\n\n /**\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n * @type {string}\n */\n blend: null,\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n */\n bind: function (ctx, el, prevEl) {\n var style = this;\n var prevStyle = prevEl && prevEl.style; // If no prevStyle, it means first draw.\n // Only apply cache if the last time cachced by this function.\n\n var notCheckCache = !prevStyle || ctx.__attrCachedBy !== ContextCachedBy.STYLE_BIND;\n ctx.__attrCachedBy = ContextCachedBy.STYLE_BIND;\n\n for (var i = 0; i < STYLE_COMMON_PROPS.length; i++) {\n var prop = STYLE_COMMON_PROPS[i];\n var styleName = prop[0];\n\n if (notCheckCache || style[styleName] !== prevStyle[styleName]) {\n // FIXME Invalid property value will cause style leak from previous element.\n ctx[styleName] = fixShadow(ctx, styleName, style[styleName] || prop[1]);\n }\n }\n\n if (notCheckCache || style.fill !== prevStyle.fill) {\n ctx.fillStyle = style.fill;\n }\n\n if (notCheckCache || style.stroke !== prevStyle.stroke) {\n ctx.strokeStyle = style.stroke;\n }\n\n if (notCheckCache || style.opacity !== prevStyle.opacity) {\n ctx.globalAlpha = style.opacity == null ? 1 : style.opacity;\n }\n\n if (notCheckCache || style.blend !== prevStyle.blend) {\n ctx.globalCompositeOperation = style.blend || 'source-over';\n }\n\n if (this.hasStroke()) {\n var lineWidth = style.lineWidth;\n ctx.lineWidth = lineWidth / (this.strokeNoScale && el && el.getLineScale ? el.getLineScale() : 1);\n }\n },\n hasFill: function () {\n var fill = this.fill;\n return fill != null && fill !== 'none';\n },\n hasStroke: function () {\n var stroke = this.stroke;\n return stroke != null && stroke !== 'none' && this.lineWidth > 0;\n },\n\n /**\n * Extend from other style\n * @param {zrender/graphic/Style} otherStyle\n * @param {boolean} overwrite true: overwrirte any way.\n * false: overwrite only when !target.hasOwnProperty\n * others: overwrite when property is not null/undefined.\n */\n extendFrom: function (otherStyle, overwrite) {\n if (otherStyle) {\n for (var name in otherStyle) {\n if (otherStyle.hasOwnProperty(name) && (overwrite === true || (overwrite === false ? !this.hasOwnProperty(name) : otherStyle[name] != null))) {\n this[name] = otherStyle[name];\n }\n }\n }\n },\n\n /**\n * Batch setting style with a given object\n * @param {Object|string} obj\n * @param {*} [obj]\n */\n set: function (obj, value) {\n if (typeof obj === 'string') {\n this[obj] = value;\n } else {\n this.extendFrom(obj, true);\n }\n },\n\n /**\n * Clone\n * @return {zrender/graphic/Style} [description]\n */\n clone: function () {\n var newStyle = new this.constructor();\n newStyle.extendFrom(this, true);\n return newStyle;\n },\n getGradient: function (ctx, obj, rect) {\n var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient;\n var canvasGradient = method(ctx, obj, rect);\n var colorStops = obj.colorStops;\n\n for (var i = 0; i < colorStops.length; i++) {\n canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color);\n }\n\n return canvasGradient;\n }\n};\nvar styleProto = Style.prototype;\n\nfor (var i = 0; i < STYLE_COMMON_PROPS.length; i++) {\n var prop = STYLE_COMMON_PROPS[i];\n\n if (!(prop[0] in styleProto)) {\n styleProto[prop[0]] = prop[1];\n }\n} // Provide for others\n\n\nStyle.getGradient = styleProto.getGradient;\nvar _default = Style;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapping = require(\"./VisualMapping\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @file Visual solution, for consistent option specification.\n */\nvar each = zrUtil.each;\n\nfunction hasKeys(obj) {\n if (obj) {\n for (var name in obj) {\n if (obj.hasOwnProperty(name)) {\n return true;\n }\n }\n }\n}\n/**\n * @param {Object} option\n * @param {Array.} stateList\n * @param {Function} [supplementVisualOption]\n * @return {Object} visualMappings >\n */\n\n\nfunction createVisualMappings(option, stateList, supplementVisualOption) {\n var visualMappings = {};\n each(stateList, function (state) {\n var mappings = visualMappings[state] = createMappings();\n each(option[state], function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n\n var mappingOption = {\n type: visualType,\n visual: visualData\n };\n supplementVisualOption && supplementVisualOption(mappingOption, state);\n mappings[visualType] = new VisualMapping(mappingOption); // Prepare a alpha for opacity, for some case that opacity\n // is not supported, such as rendering using gradient color.\n\n if (visualType === 'opacity') {\n mappingOption = zrUtil.clone(mappingOption);\n mappingOption.type = 'colorAlpha';\n mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption);\n }\n });\n });\n return visualMappings;\n\n function createMappings() {\n var Creater = function () {}; // Make sure hidden fields will not be visited by\n // object iteration (with hasOwnProperty checking).\n\n\n Creater.prototype.__hidden = Creater.prototype;\n var obj = new Creater();\n return obj;\n }\n}\n/**\n * @param {Object} thisOption\n * @param {Object} newOption\n * @param {Array.} keys\n */\n\n\nfunction replaceVisualOption(thisOption, newOption, keys) {\n // Visual attributes merge is not supported, otherwise it\n // brings overcomplicated merge logic. See #2853. So if\n // newOption has anyone of these keys, all of these keys\n // will be reset. Otherwise, all keys remain.\n var has;\n zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n has = true;\n }\n });\n has && zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n thisOption[key] = zrUtil.clone(newOption[key]);\n } else {\n delete thisOption[key];\n }\n });\n}\n/**\n * @param {Array.} stateList\n * @param {Object} visualMappings >\n * @param {module:echarts/data/List} list\n * @param {Function} getValueState param: valueOrIndex, return: state.\n * @param {object} [scope] Scope for getValueState\n * @param {string} [dimension] Concrete dimension, if used.\n */\n// ???! handle brush?\n\n\nfunction applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n var dataIndex;\n\n function getVisual(key) {\n return data.getItemVisual(dataIndex, key);\n }\n\n function setVisual(key, value) {\n data.setItemVisual(dataIndex, key, value);\n }\n\n if (dimension == null) {\n data.each(eachItem);\n } else {\n data.each([dimension], eachItem);\n }\n\n function eachItem(valueOrIndex, index) {\n dataIndex = dimension == null ? valueOrIndex : index;\n var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance\n\n if (rawDataItem && rawDataItem.visualMap === false) {\n return;\n }\n\n var valueState = getValueState.call(scope, valueOrIndex);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual);\n }\n }\n}\n/**\n * @param {module:echarts/data/List} data\n * @param {Array.} stateList\n * @param {Object} visualMappings >\n * @param {Function} getValueState param: valueOrIndex, return: state.\n * @param {number} [dim] dimension or dimension index.\n */\n\n\nfunction incrementalApplyVisual(stateList, visualMappings, getValueState, dim) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n\n function progress(params, data) {\n if (dim != null) {\n dim = data.getDimension(dim);\n }\n\n function getVisual(key) {\n return data.getItemVisual(dataIndex, key);\n }\n\n function setVisual(key, value) {\n data.setItemVisual(dataIndex, key, value);\n }\n\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance\n\n if (rawDataItem && rawDataItem.visualMap === false) {\n continue;\n }\n\n var value = dim != null ? data.get(dim, dataIndex, true) : dataIndex;\n var valueState = getValueState(value);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual);\n }\n }\n }\n\n return {\n progress: progress\n };\n}\n\nexports.createVisualMappings = createVisualMappings;\nexports.replaceVisualOption = replaceVisualOption;\nexports.applyVisual = applyVisual;\nexports.incrementalApplyVisual = incrementalApplyVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\nvar each = _util.each;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerProcessor({\n // `dataZoomProcessor` will only be performed in needed series. Consider if\n // there is a line series and a pie series, it is better not to update the\n // line series if only pie series is needed to be updated.\n getTargetSeries: function (ecModel) {\n var seriesModelMap = createHashMap();\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n var axisProxy = dataZoomModel.getAxisProxy(dimNames.name, axisIndex);\n each(axisProxy.getTargetSeriesModels(), function (seriesModel) {\n seriesModelMap.set(seriesModel.uid, seriesModel);\n });\n });\n });\n return seriesModelMap;\n },\n modifyOutputEnd: true,\n // Consider appendData, where filter should be performed. Because data process is\n // in block mode currently, it is not need to worry about that the overallProgress\n // execute every frame.\n overallReset: function (ecModel, api) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // We calculate window and reset axis here but not in model\n // init stage and not after action dispatch handler, because\n // reset should be called after seriesData.restoreData.\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n dataZoomModel.getAxisProxy(dimNames.name, axisIndex).reset(dataZoomModel, api);\n }); // Caution: data zoom filtering is order sensitive when using\n // percent range and no min/max/scale set on axis.\n // For example, we have dataZoom definition:\n // [\n // {xAxisIndex: 0, start: 30, end: 70},\n // {yAxisIndex: 0, start: 20, end: 80}\n // ]\n // In this case, [20, 80] of y-dataZoom should be based on data\n // that have filtered by x-dataZoom using range of [30, 70],\n // but should not be based on full raw data. Thus sliding\n // x-dataZoom will change both ranges of xAxis and yAxis,\n // while sliding y-dataZoom will only change the range of yAxis.\n // So we should filter x-axis after reset x-axis immediately,\n // and then reset y-axis and filter y-axis.\n\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n dataZoomModel.getAxisProxy(dimNames.name, axisIndex).filterData(dataZoomModel, api);\n });\n });\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // Fullfill all of the range props so that user\n // is able to get them from chart.getOption().\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n var percentRange = axisProxy.getDataPercentWindow();\n var valueRange = axisProxy.getDataValueWindow();\n dataZoomModel.setCalculatedRange({\n start: percentRange[0],\n end: percentRange[1],\n startValue: valueRange[0],\n endValue: valueRange[1]\n });\n });\n }\n});","var dpr = 1; // If in browser environment\n\nif (typeof window !== 'undefined') {\n dpr = Math.max(window.devicePixelRatio || 1, 1);\n}\n/**\n * config默认配置项\n * @exports zrender/config\n * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)\n */\n\n/**\n * Debug log mode:\n * 0: Do nothing, for release.\n * 1: console.error, for debug.\n */\n\n\nvar debugMode = 0; // retina 屏幕优化\n\nvar devicePixelRatio = dpr;\nexports.debugMode = debugMode;\nexports.devicePixelRatio = devicePixelRatio;","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n typeof postMessage == 'function' &&\n !global.importScripts &&\n !fails(post) &&\n location.protocol !== 'file:'\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"../coord/single/singleCreator\");\n\nrequire(\"./axis/SingleAxisView\");\n\nrequire(\"../coord/single/AxisModel\");\n\nrequire(\"./axisPointer\");\n\nrequire(\"./axisPointer/SingleAxisPointer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.extendComponentView({\n type: 'single'\n});","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.15';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading and trailing whitespace. */\n var reTrim = /^\\s+|\\s+$/g,\n reTrimStart = /^\\s+/,\n reTrimEnd = /\\s+$/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array == null ? 0 : array.length,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSetting.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartSetting.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartSetting.vue?vue&type=template&id=07b78e5c&\"\nimport script from \"./ChartSetting.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartSetting.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ChartSetting.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export const ENABLE_ACTIVE = 'ENABLE_ACTIVE';\r\nexport const DISABLE_ACTIVE = 'DISABLE_ACTIVE';\r\nexport const UPDATE_CHART_ITEM = 'UPDATE_CHART_ITEM';\r\n\r\nexport default {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n UPDATE_CHART_ITEM,\r\n}","import types from './mutation-types';\r\n\r\nexport default {\r\n setActive({commit, state}, {id}) {\r\n for (let i = 0, l = state.chartLists.length; i < l; i++) {\r\n if (i === id) {\r\n commit(types.ENABLE_ACTIVE, i);\r\n continue;\r\n }\r\n\r\n commit(types.DISABLE_ACTIVE, i);\r\n }\r\n },\r\n unsetActive({commit}, {id}) {\r\n commit(types.DISABLE_ACTIVE, id);\r\n },\r\n updateChartItem({commit}, updateObj) {\r\n commit(types.UPDATE_CHART_ITEM, updateObj);\r\n }\r\n};","export default {\r\n getActive: state => {\r\n for (let i = 0, l = state.chartLists.length; i < l; i++) {\r\n let chartList = state.chartLists[i];\r\n\r\n if (chartList.active) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n}","import { transTextStyle } from '@/utils/chartUtil'\r\n/**\r\n * echarts title transform\r\n * \r\n */\r\nconst transformTitle = function (chartAllTypeArray, title, subtitle) {\r\n const chartPro = chartAllTypeArray[0];\r\n const chartType = chartAllTypeArray[1];\r\n const chartStyle = chartAllTypeArray[2];\r\n\r\n // init object\r\n let resultTitle = {\r\n show: true,\r\n text: '',\r\n left: 'auto',\r\n top: 'auto',\r\n textStyle: {\r\n fontSize: 12,\r\n color: '#333',\r\n fontFamily: 'sans-serif',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n },\r\n subtextStyle: {\r\n fontSize: 12,\r\n color: '#aaa',\r\n fontFamily: 'sans-serif',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n },\r\n subtext: '',\r\n itemGap: 10\r\n };\r\n\r\n // title.show\r\n resultTitle.show = title.show;\r\n\r\n // title.text\r\n resultTitle.text = title.text;\r\n resultTitle.subtext = subtitle.text\r\n\r\n // textstyle\r\n transTextStyle(title , resultTitle , 'textStyle' , 'text')\r\n transTextStyle(subtitle , resultTitle , 'subtextStyle' , 'subtext')\r\n\r\n // title.position\r\n if (title.position.value === 'custom') {\r\n resultTitle.left = title.position.offsetX + '%'\r\n resultTitle.top = title.position.offsetY + '%'\r\n } else {\r\n resultTitle.left = title.position.value.split('-')[0]\r\n resultTitle.top = title.position.value.split('-')[1]\r\n }\r\n\r\n // title.itemgap\r\n let actions = new Map([\r\n ['auto' , 10],\r\n ['far' , 30],\r\n ['close' , 5],\r\n ['normal' , 20],\r\n ['custom' , subtitle.distance.cusGap]\r\n ])\r\n resultTitle.itemGap = actions.get(subtitle.distance.value)\r\n\r\n return resultTitle\r\n}\r\n\r\nexport default transformTitle","/**\r\n * legend转换\r\n */\r\nimport { transTextStyle } from '@/utils/chartUtil'\r\nconst transformLegend = function(chartAllTypeArray , legend){\r\n let resLegend = {\r\n show: true,\r\n textStyle: {\r\n color: '#333',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 12\r\n },\r\n left: 'auto',\r\n top: 'auto',\r\n orient: 'horizontal',\r\n itemWidth: 25,\r\n itemGap: 10\r\n }\r\n // legend.show\r\n resLegend.show = legend.show\r\n // legend.textStyle\r\n transTextStyle(legend , resLegend , 'textStyle')\r\n // legend.position\r\n if (legend.position.value === 'custom') {\r\n resLegend.left = legend.position.offsetX \r\n resLegend.top = legend.position.offsetY \r\n } else {\r\n resLegend.left = legend.position.value.split('-')[0]\r\n resLegend.top = legend.position.value.split('-')[1]\r\n }\r\n // legend.orient\r\n resLegend.orient = legend.position.direction\r\n // legend.itemWidth\r\n let width = new Map([\r\n ['auto' , 25],\r\n ['big' , 45],\r\n ['medium' , 18],\r\n ['small' , 10],\r\n ['custom' , legend.width.cusSize]\r\n ])\r\n let height = new Map([\r\n ['auto' , 14],\r\n ['big' , 30],\r\n ['medium' , 20],\r\n ['small' , 10],\r\n ['custom' , legend.height.cusSize]\r\n ])\r\n resLegend.itemWidth = width.get(legend.width.value)\r\n resLegend.itemHeight = height.get(legend.height.value)\r\n // legend.itemGap\r\n let distance = new Map([\r\n ['auto' , 10],\r\n ['far' , 20],\r\n ['near' , 5],\r\n ['general' , 15],\r\n ['custom' , legend.distance.cusGap]\r\n ])\r\n resLegend.itemGap = distance.get(legend.distance.value) \r\n\r\n return resLegend\r\n}\r\n\r\nexport default transformLegend","/**\r\n * 鼠标提示转换\r\n */\r\nimport { transTextStyle , floatTool} from '@/utils/chartUtil'\r\nconst transformTooltip = function (chartAllTypeArray, tooltip) {\r\n const resTooltip = {\r\n show: true,\r\n trigger: 'item',\r\n textStyle: {\r\n color: '#fff',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 14\r\n },\r\n backgroundColor: 'rgba(50,50,50,0.7)',\r\n triggerOn: 'mousemove|click',\r\n axisPointer: {\r\n type: 'line',\r\n lineStyle: {\r\n type: 'solid',\r\n width: 1,\r\n color: '#555'\r\n }\r\n },\r\n position: 'right'\r\n }\r\n // tooltip.show\r\n resTooltip.show = tooltip.show\r\n // 触发类型\r\n resTooltip.trigger = tooltip.triggerType\r\n // 触发条件\r\n resTooltip.triggerOn = tooltip.triggerOn\r\n // 文字样式\r\n transTextStyle(tooltip, resTooltip, 'textStyle')\r\n // 背景色\r\n resTooltip.backgroundColor = tooltip.backgroundColor\r\n // 指示器配置\r\n resTooltip.axisPointer.lineStyle = tooltip.axisPointer.style\r\n resTooltip.axisPointer.type = tooltip.axisPointer.type\r\n // 提示框位置\r\n resTooltip.position = tooltip.position == 'auto' ? null : tooltip.position\r\n // 提示formatter\r\n let format = tooltip.format\r\n let formatter1 = function (params) {\r\n console.dir(params)\r\n let str = params[0].name + \"
\"\r\n for (var i = 0; i < params.length; i++) {\r\n if(format[params[i].seriesIndex].digit == 'auto'){\r\n params[i].value = floatTool.multiply(+params[i].value,format[params[i].seriesIndex].ratio) + format[params[i].seriesIndex].suffix\r\n }else{\r\n params[i].value = floatTool.multiply(+params[i].value,format[params[i].seriesIndex].ratio).toFixed(format[params[i].seriesIndex].digit) + format[params[i].seriesIndex].suffix\r\n }\r\n\r\n str += \"
 \" + params[i].seriesName + \":  \" + params[i].value + \"
\";\r\n }\r\n return str\r\n }\r\n\r\n let formatter2 = function (params) {\r\n if(format[params.seriesIndex].digit == 'auto'){\r\n params.value = floatTool.multiply(+params.value, format[params.seriesIndex].ratio) + format[params.seriesIndex].suffix\r\n }else{\r\n params.value = floatTool.multiply(+params.value, format[params.seriesIndex].ratio).toFixed(format[params.seriesIndex].digit) + format[params.seriesIndex].suffix\r\n }\r\n let str = params.seriesName + \"
    \" + params.name + \":  \" + params.value;\r\n return str\r\n }\r\n\r\n let actions = new Map([\r\n ['item' , formatter2],\r\n ['axis' , formatter1]\r\n ]) \r\n resTooltip.formatter = actions.get(resTooltip.trigger)\r\n\r\n return resTooltip\r\n}\r\n\r\nexport default transformTooltip","/**\r\n * 坐标轴转换\r\n */\r\nimport { transTextStyle , transLineStyle , floatTool ,transCustom } from '@/utils/chartUtil'\r\nimport { deepCopy } from '@/utils/util'\r\nconst transformAxis = function(chartAllTypeArray , axis){\r\n let chartType = chartAllTypeArray[1]\r\n let option = {\r\n show: true,\r\n name: '',\r\n nameTextStyle: {\r\n color: '#333',\r\n fontStyle: 'normal',\r\n fontWeight: 'normal',\r\n fontSize: 12\r\n },\r\n nameLocation: 'end',\r\n inverse: false,\r\n interval: null,\r\n nameGap: 15,\r\n nameRotate: null,\r\n axisLine: {\r\n show: true,\r\n lineStyle: {\r\n color: '#333',\r\n width: 1\r\n }\r\n },\r\n axisTick: {\r\n show: true,\r\n inside: false,\r\n length: 5,\r\n lineStyle: {\r\n width: 1,\r\n type: 'solid',\r\n color: null\r\n }\r\n },\r\n axisLabel: {\r\n show: true,\r\n rotate: 0,\r\n formatter: null\r\n },\r\n min: null,\r\n max: null,\r\n splitLine: {\r\n show: true,\r\n lineStyle: {\r\n color: '#ccc',\r\n width: 1,\r\n type: 'solid'\r\n },\r\n interval: 'auto'\r\n },\r\n splitArea: {\r\n show: false,\r\n areaStyle: {\r\n color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']\r\n }\r\n }\r\n }\r\n\r\n let transAxis = function(res , ori){\r\n let origin = axis[ori]\r\n // axis.show\r\n res.show = origin.show\r\n // axis.name\r\n res.name = origin.title.text\r\n // axis.label\r\n transTextStyle(origin.title , res , 'nameTextStyle')\r\n res.nameLocation = origin.title.fzPosition\r\n // 反向坐标轴\r\n res.inverse = origin.inverse\r\n // 坐标轴间隔个数\r\n res.interval = origin.tickLabel.optimize\r\n // 标题与轴线距离\r\n res.nameGap = origin.title.rotate\r\n // 刻度线设置\r\n res.axisLine.show = origin.tickLine.show\r\n res.axisLine.lineStyle = transLineStyle(origin.tickLine.width , origin.tickLine.color)\r\n // 刻度设置\r\n res.axisTick.show = origin.tick.show\r\n res.axisTick.lineStyle = transLineStyle(origin.tick.width , origin.tick.color)\r\n res.axisTick.inside = origin.tick.position == 'inside' ? true : false\r\n res.axisTick.length = origin.tick.length\r\n // 刻度标签\r\n res.axisLabel.show = origin.tickLabel.show\r\n res.axisLabel.rotate = origin.tickLabel.rotate\r\n // 标签formatter\r\n if((chartType == 'bar' && ori.slice(0,1) == 'x') || (chartType != 'bar' && ori.slice(0,1) == 'y')){\r\n res.min = origin.tickLabel.min\r\n res.max = origin.tickLabel.max\r\n res.axisLabel.formatter = function(params){\r\n if(origin.tickLabel.digit == 'auto'){\r\n return origin.tickLabel.prefix + floatTool.multiply(+params , origin.tickLabel.ratio) + origin.tickLabel.suffix\r\n }else{\r\n return origin.tickLabel.prefix + floatTool.multiply(+params , origin.tickLabel.ratio).toFixed(origin.tickLabel.digit) + origin.tickLabel.suffix\r\n }\r\n }\r\n }else{\r\n res.axisLabel.formatter = function(params){\r\n return origin.tickLabel.prefix + params + origin.tickLabel.suffix\r\n }\r\n }\r\n // 网格线\r\n res.splitLine.show = origin.netLine.show\r\n res.splitLine.lineStyle = transLineStyle(origin.netLine.width , origin.netLine.color , origin.netLine.type)\r\n res.splitLine.interval = transCustom(origin.netLine.interval.value , origin.netLine.interval.cusNumber)\r\n // 网格区域\r\n res.splitArea.show = origin.netArea.show\r\n res.splitArea.interval = transCustom(origin.netArea.interval.value , origin.netArea.interval.cusNumber)\r\n res.splitArea.areaStyle.color = [origin.netArea.colorOne == 'auto' ? 'rgba(250,250,250,0.3)' : origin.netArea.colorOne , origin.netArea.colorTwo == 'auto' ? 'rgba(200,200,200,0.3)' : origin.netArea.colorTwo]\r\n\r\n return res\r\n }\r\n\r\n return {\r\n xAxisUp: transAxis(deepCopy(option) , 'xAxisUp'),\r\n xAxisDown: transAxis(deepCopy(option) , 'xAxisDown'),\r\n yAxisLeft: transAxis(deepCopy(option) , 'yAxisLeft'),\r\n yAxisRight: transAxis(deepCopy(option) , 'yAxisRight')\r\n }\r\n}\r\n\r\nexport default transformAxis","/**\r\n * echarts转换引擎\r\n */\r\n\r\nimport transformTitle from './transformTitle'\r\nimport transformLegend from './transformLegend'\r\nimport transformTooltip from './transformTooltip'\r\nimport transformAxis from './transformAxis'\r\n\r\nconst echartsEngine = function (chartOptions) {\r\n //TODO: chartOptions 转换后导出\r\n\r\n const chartAllTypeArray = chartOptions.chartAllType.split('|');\r\n const chartPro = chartAllTypeArray[0];\r\n const chartType = chartAllTypeArray[1];\r\n const chartStyle = chartAllTypeArray[2];\r\n\r\n const titleOption = transformTitle(chartAllTypeArray , chartOptions.defaultOption.title,chartOptions.defaultOption.subtitle)\r\n // const configOption = transformConfig(chartOptions.defaultOption.config);\r\n const legendOption = transformLegend(chartAllTypeArray , chartOptions.defaultOption.legend)\r\n const tooltipOption = transformTooltip(chartAllTypeArray , chartOptions.defaultOption.tooltip)\r\n const axisOption = transformAxis(chartAllTypeArray , chartOptions.defaultOption.axis)\r\n axisOption.xAxisDown.data = chartOptions.defaultOption.axis.xAxisDown.data\r\n\r\n const option = {\r\n title:{...titleOption},\r\n tooltip: {\r\n ...tooltipOption\r\n },\r\n legend: {\r\n ...legendOption\r\n },\r\n xAxis: [{\r\n ...axisOption.xAxisDown\r\n },{\r\n ...axisOption.xAxisUp\r\n }],\r\n yAxis: [\r\n axisOption.yAxisLeft,\r\n axisOption.yAxisRight\r\n ],\r\n series: chartOptions.defaultOption.series\r\n };\r\n // 饼图去掉XY轴\r\n if(chartType == 'pie'){\r\n delete option.xAxis\r\n delete option.yAxis\r\n }\r\n\r\n console.dir(option)\r\n console.dir(JSON.stringify(option))\r\n return option;\r\n}\r\n\r\nexport default echartsEngine","import echartsEngine from '@/utils/echartsEngine/index'\r\n// import highchartsEngine from './highchartsEngine'\r\nconst echarts = require('echarts');\r\n\r\n\r\n/**\r\n * update main object's subject attribute by router\r\n * @param {Object} chartOptions main object\r\n * @param {String} router router\r\n * @param {Object} updateObj subject attribute\r\n */\r\nconst setChartOptionsByRouter = function (chartOptions, router, updateObj) {\r\n if (chartOptions == undefined || router == undefined) {\r\n return chartOptions;\r\n }\r\n\r\n let routerArray = router.split('/');\r\n const defaultOption = chartOptions.defaultOption;\r\n\r\n //递归获取内部属性\r\n function deepFind(curObj) {\r\n if (routerArray.length != 0) {\r\n return deepFind(curObj[routerArray.shift()])\r\n } else {\r\n Object.assign(curObj, updateObj)\r\n return curObj\r\n }\r\n\r\n }\r\n deepFind(defaultOption);\r\n return chartOptions;\r\n}\r\n\r\n/**\r\n * 渲染图表的方法,拿到store的配置json(对应于chartJson中的数据格式,可能是初始化图表的数据,也可能是后台传输来的特定配置的数据),执行转换引擎后,渲染到图表插件中,独立于vue组件.可用于编辑器和预览端\r\n * \r\n */\r\nconst renderChart = function (renderChartObj, ele) {\r\n const { chart_id, chartOptions } = renderChartObj;\r\n const chartAllTypeArray = chartOptions.chartAllType.split('|');\r\n const chartPro = chartAllTypeArray[0];\r\n // const container = ele || document.getElementById(chart_id);\r\n const container = document.getElementById(chart_id);\r\n\r\n if (chartPro === 'echarts') {\r\n const options = echartsEngine(chartOptions);\r\n\r\n let chart = echarts.getInstanceByDom(container);\r\n if (chart == null) {\r\n chart = echarts.init(container)\r\n }\r\n\r\n chart.setOption(options, true);\r\n\r\n setTimeout(() => {\r\n echarts.getInstanceById(container.getAttribute('_echarts_instance_')).resize();\r\n }, 0);\r\n }\r\n}\r\n\r\n/**\r\n * textStyle转化\r\n */\r\nconst transTextStyle = function(origin , result , attr , attr1){\r\n // fontGroup\r\n let fontGroupList = ['bold', 'vertical', 'italic'];\r\n origin.label.fontGroup.forEach(element => {\r\n if (fontGroupList.includes(element)) {\r\n switch (element) {\r\n case 'bold':\r\n result[attr].fontWeight = element;\r\n break;\r\n case 'vertical':\r\n // TODO: '标题01'\r\n result[attr1] = origin.text.replace(/\\B/g, '\\n');\r\n break;\r\n case 'italic':\r\n result[attr].fontStyle = element;\r\n break;\r\n }\r\n }\r\n });\r\n // fontColor\r\n result[attr].color = origin.label.color\r\n // fontSize\r\n result[attr].fontSize = transCustom(origin.label.fontSize , origin.label.cusFontSize)\r\n}\r\n\r\n// 解决精度\r\nconst floatTool = function() {\r\n \r\n /*\r\n * 判断obj是否为一个整数\r\n */\r\n function isInteger(obj) {\r\n return Math.floor(obj) === obj;\r\n }\r\n \r\n /*\r\n * 将一个浮点数转成整数,返回整数和倍数。如 3.14 >> 314,倍数是 100\r\n * @param floatNum {number} 小数\r\n * @return {object}\r\n * {times:100, num: 314}\r\n */\r\n function toInteger(floatNum) {\r\n var ret = {times: 1, num: 0};\r\n\r\n if (isInteger(floatNum)) {\r\n ret.num = floatNum;\r\n return ret;\r\n }\r\n\r\n var strfi = floatNum + '';\r\n var dotPos = strfi.indexOf('.');\r\n var len = strfi.substr(dotPos + 1).length;\r\n var times = Math.pow(10, len);\r\n var intNum = parseInt(floatNum * times + 0.5, 10);\r\n\r\n ret.times = times;\r\n ret.num = intNum;\r\n\r\n return ret;\r\n }\r\n \r\n /*\r\n * 核心方法,实现加减乘除运算,确保不丢失精度\r\n * 思路:把小数放大为整数(乘),进行算术运算,再缩小为小数(除)\r\n *\r\n * @param a {number} 运算数1\r\n * @param b {number} 运算数2\r\n * @param digits {number} 精度,保留的小数点数,比如 2, 即保留为两位小数\r\n * @param op {string} 运算类型,有加减乘除(add/subtract/multiply/divide)\r\n *\r\n */\r\n function operation(a, b, op) {\r\n var o1 = toInteger(a);\r\n var o2 = toInteger(b);\r\n var n1 = o1.num;\r\n var n2 = o2.num;\r\n var t1 = o1.times;\r\n var t2 = o2.times;\r\n var max = t1 > t2 ? t1 : t2;\r\n var result = null;\r\n\r\n switch (op) {\r\n case 'add':\r\n if (t1 === t2) { // 两个小数位数相同\r\n result = n1 + n2;\r\n } \r\n else if (t1 > t2) { // o1 小数位 大于 o2\r\n result = n1 + n2 * (t1 / t2);\r\n } \r\n else { // o1 小数位 小于 o2\r\n result = n1 * (t2 / t1) + n2;\r\n }\r\n\r\n return result / max;\r\n case 'subtract':\r\n if (t1 === t2) {\r\n result = n1 - n2;\r\n } \r\n else if (t1 > t2) {\r\n result = n1 - n2 * (t1 / t2);\r\n } \r\n else {\r\n result = n1 * (t2 / t1) - n2;\r\n }\r\n\r\n return result / max;\r\n case 'multiply':\r\n result = (n1 * n2) / (t1 * t2);\r\n \r\n return result;\r\n case 'divide':\r\n return result = function() {\r\n var r1 = n1 / n2;\r\n var r2 = t2 / t1;\r\n return operation(r1, r2, 'multiply');\r\n }();\r\n }\r\n }\r\n \r\n // 加减乘除的四个接口\r\n function add(a, b) {\r\n return operation(a, b, 'add');\r\n }\r\n function subtract(a, b) {\r\n return operation(a, b, 'subtract');\r\n }\r\n function multiply(a, b) {\r\n return operation(a, b, 'multiply');\r\n }\r\n function divide(a, b) {\r\n return operation(a, b, 'divide');\r\n }\r\n \r\n // exports\r\n return {\r\n add: add,\r\n subtract: subtract,\r\n multiply: multiply,\r\n divide: divide\r\n };\r\n}();\r\n\r\n/**\r\n * lineStyle转化\r\n */\r\nconst transLineStyle = function (width , color , type='solid'){\r\n return {\r\n width,\r\n color,\r\n type \r\n }\r\n}\r\n\r\n/**\r\n 自定义* custom数据\r\n */\r\nconst transCustom = function (a , b){\r\n if(a != 'custom'){\r\n return a\r\n }else{\r\n return b\r\n }\r\n}\r\n\r\n\r\nexport {\r\n setChartOptionsByRouter,\r\n renderChart,\r\n transTextStyle,\r\n floatTool,\r\n transLineStyle,\r\n transCustom\r\n}","import {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n UPDATE_CHART_ITEM,\r\n IS_UPDATE\r\n} from './mutation-types';\r\nimport { setChartOptionsByRouter } from '@/utils/chartUtil';\r\n\r\nexport default {\r\n [ENABLE_ACTIVE](state, id) {\r\n // 1. set active\r\n state.chartLists[id].active = true;\r\n\r\n // 2. set current chart index\r\n state.currentChartIndex = id;\r\n },\r\n [DISABLE_ACTIVE](state, id) {\r\n state.chartLists[id].active = false;\r\n },\r\n /**\r\n *根据对象属性的路径, 更新图表子属性的方法\r\n //自定义一种类型'router',updateObj内部也是采用颗粒更新的模式,防止全部替换chartOptions造成的chartsetting内部组件全局重刷\r\n params:{\r\n updateSubObj:{label:{},show:true,...} //子属性新的值\r\n router:'title/label' //属性路径\r\n }\r\n */\r\n [UPDATE_CHART_ITEM](state,params) {\r\n //子组件设置更新到chartOptions上后再更新到fabric组件上\r\n console.info('updateObj', params)\r\n const { router , updateObj } = params\r\n const currentChartOptions = state.chartLists[state.currentChartIndex].chartOptions;\r\n\r\n setChartOptionsByRouter(currentChartOptions,router , updateObj); //更新到子对象\r\n }\r\n};","import { merge, cloneDeep } from 'lodash';\r\nimport { chartOptions } from '@/data/chartJson';\r\nexport default {\r\n // store all chart objects\r\n chartLists:[\r\n {\r\n 'chart_id': 'chart_a_001',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n {\r\n 'chart_id': 'chart_a_002',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n {\r\n 'chart_id': 'chart_a_003',\r\n 'active': false,\r\n 'chartOptions': merge(cloneDeep(chartOptions),{defaultOption:{title:{text:'默认标题'}}})\r\n },\r\n ],\r\n // store current chart index\r\n currentChartIndex: null,\r\n // current chart objects, bind to chartSetting component\r\n // currentChart: {},\r\n};","import actions from './actions';\r\nimport getters from './getters';\r\nimport mutations from './mutations';\r\nimport state from './state';\r\n\r\nexport default {\r\n namespaced: true,\r\n actions,\r\n getters,\r\n mutations,\r\n state\r\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"chartRender\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartRender.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChartRender.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ChartRender.vue?vue&type=template&id=296f5725&scoped=true&\"\nimport script from \"./ChartRender.vue?vue&type=script&lang=js&\"\nexport * from \"./ChartRender.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"296f5725\",\n null\n \n)\n\nexport default component.exports","export const ENABLE_ACTIVE = 'ENABLE_ACTIVE';\r\nexport const DISABLE_ACTIVE = 'DISABLE_ACTIVE';\r\n\r\nexport const ENABLE_DRAGGABLE = 'ENABLE_DRAGGABLE';\r\nexport const DISABLE_DRAGGABLE = 'DISABLE_DRAGGABLE';\r\n\r\nexport const ENABLE_RESIZABLE = 'ENABLE_RESIZABLE';\r\nexport const DISABLE_RESIZABLE = 'DISABLE_RESIZABLE';\r\n\r\nexport const ENABLE_PARENT_LIMITATION = 'ENABLE_PARENT_LIMITATION';\r\nexport const DISABLE_PARENT_LIMITATION = 'DISABLE_PARENT_LIMITATION';\r\n\r\nexport const ENABLE_SNAP_TO_GRID = 'ENABLE_SNAP_TO_GRID';\r\nexport const DISABLE_SNAP_TO_GRID = 'DISABLE_SNAP_TO_GRID';\r\n\r\nexport const ENABLE_ASPECT = 'ENABLE_ASPECT';\r\nexport const DISABLE_ASPECT = 'DISABLE_ASPECT';\r\n\r\nexport const ENABLE_X_AXIS = 'ENABLE_X_AXIS';\r\nexport const ENABLE_Y_AXIS = 'ENABLE_Y_AXIS';\r\nexport const ENABLE_BOTH_AXIS = 'ENABLE_BOTH_AXIS';\r\nexport const ENABLE_NONE_AXIS = 'ENABLE_NONE_AXIS';\r\n\r\nexport const CHANGE_ZINDEX = 'CHANGE_ZINDEX';\r\n\r\nexport const CHANGE_MINW = 'CHANGE_MINW';\r\nexport const CHANGE_MINH = 'CHANGE_MINH';\r\n\r\nexport const CHANGE_WIDTH = 'CHANGE_WIDTH';\r\nexport const CHANGE_HEIGHT = 'CHANGE_HEIGHT';\r\nexport const CHANGE_TOP = 'CHANGE_TOP';\r\nexport const CHANGE_LEFT = 'CHANGE_LEFT';\r\n\r\nexport default {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n ENABLE_DRAGGABLE,\r\n DISABLE_DRAGGABLE,\r\n ENABLE_RESIZABLE,\r\n DISABLE_RESIZABLE,\r\n ENABLE_PARENT_LIMITATION,\r\n DISABLE_PARENT_LIMITATION,\r\n ENABLE_SNAP_TO_GRID,\r\n DISABLE_SNAP_TO_GRID,\r\n ENABLE_ASPECT,\r\n DISABLE_ASPECT,\r\n ENABLE_X_AXIS,\r\n ENABLE_Y_AXIS,\r\n ENABLE_NONE_AXIS,\r\n ENABLE_BOTH_AXIS,\r\n CHANGE_ZINDEX,\r\n CHANGE_MINW,\r\n CHANGE_MINH,\r\n CHANGE_WIDTH,\r\n CHANGE_HEIGHT,\r\n CHANGE_TOP,\r\n CHANGE_LEFT\r\n}","import types, {CHANGE_ZINDEX} from './mutation-types';\r\n\r\nexport default {\r\n setActive({commit, state}, {id}) {\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i === id) {\r\n commit(types.ENABLE_ACTIVE, i);\r\n continue;\r\n }\r\n\r\n commit(types.DISABLE_ACTIVE, i);\r\n }\r\n },\r\n unsetActive({commit}, {id}) {\r\n commit(types.DISABLE_ACTIVE, id);\r\n },\r\n\r\n toggleDraggable({commit, state}, {id}) {\r\n if (!state.rects[id].draggable) {\r\n commit(types.ENABLE_DRAGGABLE, id);\r\n } else {\r\n commit(types.DISABLE_DRAGGABLE, id);\r\n }\r\n },\r\n\r\n toggleResizable({commit, state}, {id}) {\r\n if (!state.rects[id].resizable) {\r\n commit(types.ENABLE_RESIZABLE, id);\r\n } else {\r\n commit(types.DISABLE_RESIZABLE, id);\r\n }\r\n },\r\n\r\n toggleParentLimitation({commit, state}, {id}) {\r\n if (!state.rects[id].parentLim) {\r\n commit(types.ENABLE_PARENT_LIMITATION, id);\r\n } else {\r\n commit(types.DISABLE_PARENT_LIMITATION, id);\r\n }\r\n },\r\n\r\n toggleSnapToGrid({commit, state}, {id}) {\r\n if (!state.rects[id].snapToGrid) {\r\n commit(types.ENABLE_SNAP_TO_GRID, id);\r\n } else {\r\n commit(types.DISABLE_SNAP_TO_GRID, id);\r\n }\r\n },\r\n\r\n setAspect({commit}, {id}) {\r\n commit(types.ENABLE_ASPECT, id);\r\n },\r\n unsetAspect({commit}, {id}) {\r\n commit(types.DISABLE_ASPECT, id);\r\n },\r\n\r\n setWidth({commit}, {id, width}) {\r\n commit(types.CHANGE_WIDTH, {id, width});\r\n },\r\n\r\n setHeight({commit}, {id, height}) {\r\n commit(types.CHANGE_HEIGHT, {id, height});\r\n },\r\n\r\n setTop({commit}, {id, top}) {\r\n commit(types.CHANGE_TOP, {id, top});\r\n },\r\n\r\n setLeft({commit}, {id, left}) {\r\n commit(types.CHANGE_LEFT, {id, left});\r\n },\r\n\r\n changeXLock({commit, state}, {id}) {\r\n switch (state.rects[id].axis) {\r\n case 'both':\r\n commit(types.ENABLE_Y_AXIS, id);\r\n break;\r\n case 'x':\r\n commit(types.ENABLE_NONE_AXIS, id);\r\n break;\r\n case 'y':\r\n commit(types.ENABLE_BOTH_AXIS, id);\r\n break;\r\n case 'none':\r\n commit(types.ENABLE_X_AXIS, id);\r\n break;\r\n }\r\n },\r\n\r\n changeYLock({commit, state}, {id}) {\r\n switch (state.rects[id].axis) {\r\n case 'both':\r\n commit(types.ENABLE_X_AXIS, id);\r\n break;\r\n case 'x':\r\n commit(types.ENABLE_BOTH_AXIS, id);\r\n break;\r\n case 'y':\r\n commit(types.ENABLE_NONE_AXIS, id);\r\n break;\r\n case 'none':\r\n commit(types.ENABLE_Y_AXIS, id);\r\n break;\r\n }\r\n },\r\n\r\n changeZToBottom({commit, state}, {id}) {\r\n if (state.rects[id].zIndex === 1) {\r\n return\r\n }\r\n\r\n commit(types.CHANGE_ZINDEX, {id, zIndex: 1});\r\n\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i !== id) {\r\n if(state.rects[i].zIndex === state.rects.length){\r\n continue\r\n }\r\n commit(types.CHANGE_ZINDEX, {id: i, zIndex: state.rects[i].zIndex + 1});\r\n }\r\n }\r\n },\r\n\r\n changeZToTop({commit, state}, {id}) {\r\n if (state.rects[id].zIndex === state.rects.length) {\r\n return\r\n }\r\n\r\n commit(types.CHANGE_ZINDEX, {id, zIndex: state.rects.length});\r\n\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n if (i !== id) {\r\n if(state.rects[i].zIndex === 1){\r\n continue\r\n }\r\n commit(types.CHANGE_ZINDEX, {id: i, zIndex: state.rects[i].zIndex - 1});\r\n }\r\n }\r\n },\r\n\r\n setMinWidth({commit}, {id, width}) {\r\n commit(types.CHANGE_MINW, {id, minw:width});\r\n },\r\n\r\n setMinHeight({commit}, {id, height}) {\r\n commit(types.CHANGE_MINH, {id, minh:height});\r\n }\r\n};\r\n","export default {\r\n getActive: state => {\r\n for (let i = 0, l = state.rects.length; i < l; i++) {\r\n let rect = state.rects[i];\r\n\r\n if (rect.active) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n}","import {\r\n ENABLE_ACTIVE,\r\n DISABLE_ACTIVE,\r\n ENABLE_ASPECT,\r\n DISABLE_ASPECT,\r\n ENABLE_DRAGGABLE,\r\n DISABLE_DRAGGABLE,\r\n ENABLE_RESIZABLE,\r\n DISABLE_RESIZABLE,\r\n ENABLE_PARENT_LIMITATION,\r\n DISABLE_PARENT_LIMITATION,\r\n ENABLE_SNAP_TO_GRID,\r\n DISABLE_SNAP_TO_GRID,\r\n CHANGE_ZINDEX,\r\n ENABLE_BOTH_AXIS,\r\n ENABLE_X_AXIS,\r\n ENABLE_Y_AXIS,\r\n ENABLE_NONE_AXIS,\r\n CHANGE_HEIGHT,\r\n CHANGE_LEFT,\r\n CHANGE_MINH,\r\n CHANGE_MINW,\r\n CHANGE_TOP,\r\n CHANGE_WIDTH\r\n} from './mutation-types';\r\n\r\nexport default {\r\n [ENABLE_ACTIVE](state, id) {\r\n state.rects[id].active = true;\r\n },\r\n [DISABLE_ACTIVE](state, id) {\r\n state.rects[id].active = false;\r\n },\r\n\r\n [ENABLE_ASPECT](state, id) {\r\n state.rects[id].aspectRatio = true;\r\n },\r\n [DISABLE_ASPECT](state, id) {\r\n state.rects[id].aspectRatio = false;\r\n },\r\n\r\n [ENABLE_DRAGGABLE](state, id) {\r\n state.rects[id].draggable = true;\r\n },\r\n [DISABLE_DRAGGABLE](state, id) {\r\n state.rects[id].draggable = false;\r\n },\r\n\r\n [ENABLE_RESIZABLE](state, id) {\r\n state.rects[id].resizable = true;\r\n },\r\n [DISABLE_RESIZABLE](state, id) {\r\n state.rects[id].resizable = false;\r\n },\r\n\r\n [ENABLE_SNAP_TO_GRID](state, id) {\r\n state.rects[id].snapToGrid = true;\r\n },\r\n [DISABLE_SNAP_TO_GRID](state, id) {\r\n state.rects[id].snapToGrid = false;\r\n },\r\n\r\n [ENABLE_BOTH_AXIS](state, id) {\r\n state.rects[id].axis = 'both';\r\n },\r\n [ENABLE_NONE_AXIS](state, id) {\r\n state.rects[id].axis = 'none';\r\n },\r\n [ENABLE_X_AXIS](state, id) {\r\n state.rects[id].axis = 'x';\r\n },\r\n [ENABLE_Y_AXIS](state, id) {\r\n state.rects[id].axis = 'y';\r\n },\r\n\r\n [ENABLE_PARENT_LIMITATION](state, id) {\r\n state.rects[id].parentLim = true;\r\n },\r\n [DISABLE_PARENT_LIMITATION](state, id) {\r\n state.rects[id].parentLim = false;\r\n },\r\n\r\n [CHANGE_ZINDEX](state, payload) {\r\n state.rects[payload.id].zIndex = payload.zIndex;\r\n },\r\n\r\n [CHANGE_HEIGHT](state, payload) {\r\n state.rects[payload.id].height = payload.height;\r\n },\r\n\r\n [CHANGE_WIDTH](state, payload) {\r\n state.rects[payload.id].width = payload.width;\r\n },\r\n\r\n [CHANGE_TOP](state, payload) {\r\n state.rects[payload.id].top = payload.top;\r\n },\r\n\r\n [CHANGE_LEFT](state, payload) {\r\n state.rects[payload.id].left = payload.left;\r\n },\r\n\r\n [CHANGE_MINH](state, payload) {\r\n\r\n state.rects[payload.id].minh = payload.minh;\r\n },\r\n\r\n [CHANGE_MINW](state, payload) {\r\n state.rects[payload.id].minw = payload.minw;\r\n }\r\n};","export default {\r\n 'rects': [\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 10,\r\n 'left': 10,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 1,\r\n 'color': '#EF9A9A',\r\n 'active': false,\r\n 'chart_id': 'chart_a_001',\r\n },\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 10,\r\n 'left': 220,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 2,\r\n 'color': '#AED581',\r\n 'active': false,\r\n 'chart_id': 'chart_a_002',\r\n },\r\n {\r\n 'width': 200,\r\n 'height': 150,\r\n 'top': 170,\r\n 'left': 10,\r\n 'draggable': true,\r\n 'resizable': true,\r\n 'minw': 10,\r\n 'minh': 10,\r\n 'axis': 'both',\r\n 'parentLim': true,\r\n 'snapToGrid': false,\r\n 'aspectRatio': false,\r\n 'zIndex': 3,\r\n 'color': '#81D4FA',\r\n 'active': false,\r\n 'chart_id': 'chart_a_003',\r\n }\r\n ]\r\n};\r\n","import actions from './actions';\r\nimport getters from './getters';\r\nimport mutations from './mutations';\r\nimport state from './state';\r\n\r\nexport default {\r\n namespaced: true,\r\n actions,\r\n getters,\r\n mutations,\r\n state\r\n};\r\n","// use vuex modules\r\n\r\n//chart display box\r\nconst chartRender = {\r\n state: () => ({\r\n //show or hide\r\n isShow: true\r\n }),\r\n getters: {\r\n\r\n },\r\n mutations: {\r\n\r\n },\r\n actions: {\r\n\r\n }\r\n}\r\n\r\nexport default chartRender","import Vue from 'vue'\r\nimport Vuex from 'vuex'\r\nimport rect from './modules/rect'\r\nimport chartRender from './modules/chartRender'\r\nimport chartSetting from './modules/chartSetting'\r\n\r\nVue.use(Vuex)\r\n\r\nconst store = new Vuex.Store()\r\n\r\nexport { store }\r\n\r\n\r\n\r\nconst debug = process.env.NODE_ENV !== 'production';\r\n\r\nexport default new Vuex.Store({\r\n /**\r\n * Assign the modules to the store\r\n */\r\n modules: {\r\n 'rect': rect,\r\n 'chartRender': chartRender,\r\n 'chartSetting': chartSetting\r\n },\r\n\r\n /**\r\n * If strict mode should be enabled\r\n */\r\n strict: debug\r\n});\r\n","import store from '../store'\r\nimport Vue from 'vue'\r\nimport { generateRandomKey, deepCopy, replaceHtml, getRowColCheck, getRangeSplitArray, getChartDataCache , getChartDataSeriesOrder , addDataToOption } from '../utils/util'\r\nimport { chartOptions } from '../data/chartJson'\r\n\r\nfunction initChart(outDom) {\r\n let dom = document.createElement('div')\r\n dom.id = 'chartmix'\r\n outDom.appendChild(dom);\r\n\r\n new Vue({\r\n el: '#chartmix',\r\n store,\r\n computed: {\r\n chartOptions() {\r\n if (!store.state.chartSetting.currentChartIndex) {\r\n return null\r\n }\r\n return store.state.chartSetting.chartLists[store.state.chartSetting.currentChartIndex].chartOptions\r\n }\r\n },\r\n template: ``\r\n })\r\n\r\n}\r\n\r\n// 创建图表,返回dom便于后续操作\r\nfunction createChart(outDom, chartData) {\r\n\r\n let chart_id = generateRandomKey('chart')\r\n\r\n chartOptions.defaultOption.series = []\r\n\r\n // 随机生成图表\r\n let ratio = Math.random()*10\r\n if(ratio > 5){\r\n chartOptions.chartAllType = 'echarts|pie|default'\r\n }else{\r\n chartOptions.chartAllType = 'echarts|line|default'\r\n }\r\n\r\n // 生成图表数据机构\r\n let chartOption = insertNewChart(chartOptions , chart_id , chartOptions.chartAllType , chartData)\r\n\r\n let renderDom = document.createElement('div')\r\n renderDom.id = 'render' + chart_id\r\n\r\n let modelChartShowHTML =\r\n '
${content}
'\r\n\r\n let chart_id_c = chart_id + '_c'\r\n\r\n let $t = $(\r\n replaceHtml(modelChartShowHTML, {\r\n id: chart_id_c,\r\n addclass: 'jfgrid-data-visualization-chart',\r\n title: '图表生成',\r\n content: ''\r\n })\r\n ).appendTo($(outDom))\r\n\r\n $t.find('.jfgrid-modal-dialog-content').attr('id', chart_id)\r\n\r\n $('.jfgrid-modal-dialog-content').append(renderDom)\r\n\r\n store.state.chartSetting.currentChartIndex = store.state.chartSetting.chartLists.length\r\n store.state.chartSetting.chartLists.push({\r\n 'chart_id': chart_id,\r\n 'active': true,\r\n 'chartOptions': deepCopy(chartOption)\r\n })\r\n\r\n console.dir(chartOption)\r\n\r\n new Vue({\r\n el: '#render' + chart_id,\r\n store,\r\n data() {\r\n return {\r\n chart_id\r\n }\r\n },\r\n computed: {\r\n options() {\r\n console.dir(this.chart_id)\r\n return store.state.chartSetting.chartLists.find(item => item.chart_id == this.chart_id).chartOptions\r\n },\r\n active() {\r\n return store.state.chartSetting.chartLists.find(item => item.chart_id == this.chart_id).active\r\n }\r\n },\r\n template: ``\r\n })\r\n\r\n let render = document.getElementById(chart_id)\r\n let container = document.getElementById(chart_id + '_c')\r\n return {\r\n container,\r\n render\r\n }\r\n}\r\n\r\n// insertChart\r\nfunction insertNewChart (\r\n chartOptions,\r\n chart_id,\r\n chartAllType,\r\n chartData,\r\n chartTheme,\r\n height,\r\n width,\r\n left,\r\n top\r\n) {\r\n var chart_json = {}\r\n\r\n var chartAllTypeArray = chartAllType.split('|')\r\n\r\n var chartPro = chartAllTypeArray[0],\r\n chartType = chartAllTypeArray[1],\r\n chartStyle = chartAllTypeArray[2]\r\n\r\n chart_json.chart_id = chart_id\r\n chart_json.chartAllType = chartAllType\r\n chart_json.chartPro = chartPro\r\n chart_json.chartType = chartType\r\n chart_json.chartStyle = chartStyle\r\n\r\n chart_json.height = height\r\n chart_json.width = width\r\n chart_json.left = left\r\n chart_json.top = top\r\n\r\n //按照图表类型得到图表的默认设置\r\n var defaultOptionIni = chartOptions.defaultOption\r\n //数据的sheet索引\r\n chart_json.chartData = chartData\r\n\r\n //根据数据集得到按钮状态,rangeColCheck表示首列是否标题,rangeRowCheck表示首行是否标题,rangeConfigCheck表示是否转置。\r\n var rowColCheck = getRowColCheck(chartData)\r\n var rangeRowCheck = rowColCheck[0],\r\n rangeColCheck = rowColCheck[1],\r\n rangeConfigCheck = false\r\n\r\n chart_json.rangeColCheck = rangeColCheck\r\n chart_json.rangeRowCheck = rangeRowCheck\r\n chart_json.rangeConfigCheck = rangeConfigCheck\r\n\r\n //按照数据范围文字得到具体数据范围\r\n var rangeSplitArray = getRangeSplitArray(\r\n chartData,\r\n rangeColCheck,\r\n rangeRowCheck\r\n )\r\n chart_json.rangeSplitArray = rangeSplitArray\r\n\r\n //根据数据集、功能按钮状态、图表类型,得到图表可操作的数据格式,例如:{ \"x\":[], \"y\":[], series:[] },可以按照次格式渲染数据页中的系列和轴控件。\r\n //数据为一行且为汉字的时候,chartDataCache的series为空数组\r\n var chartDataCache = getChartDataCache(\r\n chartData,\r\n rangeSplitArray,\r\n chartPro,\r\n chartType,\r\n chartStyle\r\n )\r\n chart_json.chartDataCache = chartDataCache\r\n\r\n //生成默认的系列顺序,默认根据series数组的位置,用户可以在界面上操作更改这个位置。\r\n var chartDataSeriesOrder = getChartDataSeriesOrder(\r\n chartDataCache.series[0].length\r\n )\r\n\r\n chart_json.chartDataSeriesOrder = chartDataSeriesOrder\r\n\r\n //设置图表皮肤\r\n chart_json.chartTheme = chartTheme\r\n\r\n //根据图表的默认设置、图表数据、图表系列顺序,等到一个完整的图表配置串。\r\n var defaultOption = addDataToOption(\r\n defaultOptionIni,\r\n chartDataCache,\r\n chartDataSeriesOrder,\r\n chartPro,\r\n chartType,\r\n chartStyle\r\n )\r\n\r\n //根据图表厂商选择渲染引擎,并根据设置渲染出图表\r\n chart_json.defaultOption = defaultOption\r\n return chart_json\r\n}\r\n\r\n// highlight current chart\r\nfunction highlightChart(id){\r\n let index = store.state.chartSetting.chartLists.findIndex(item => item.chart_id == id)\r\n store.state.chartSetting.currentChartIndex = index\r\n}\r\n\r\n\r\nexport {\r\n initChart,\r\n createChart,\r\n highlightChart\r\n}","// import single vue component\r\nimport ChartSetting from './ChartMix/ChartSetting.vue'\r\nimport chartSetting from '../store/modules/chartSetting'\r\nimport ChartRender from './ChartMix/ChartRender.vue'\r\nimport { initChart , createChart , highlightChart } from '../utils/exportUtil'\r\n\r\n// all components\r\nconst components = [\r\n ChartSetting,\r\n ChartRender\r\n]\r\n\r\n/**\r\n * define install function\r\n *\r\n * @param {Object} Vue \r\n * @param {Object} [options={}] \r\n */\r\nconst install = function (Vue, options = {}) {\r\n if (!install.componentInstalled) {\r\n // map and register all global components\r\n components.map(component => {\r\n Vue.component(component.name, component)\r\n })\r\n\r\n install.componentInstalled = true\r\n }\r\n\r\n if (!install.storeRegistered) {\r\n // register store\r\n if (!options.store) {\r\n console.log('Please provide a store!!')\r\n } else {\r\n options.store.registerModule('chartSetting', chartSetting)\r\n\r\n install.storeRegistered = true;\r\n }\r\n }\r\n\r\n}\r\n\r\nif (typeof window !== 'undefined' && window.Vue) {\r\n install(window.Vue)\r\n}\r\n\r\nexport default {\r\n // must use install function\r\n install,\r\n // components list\r\n ...components,\r\n initChart,\r\n createChart,\r\n highlightChart\r\n // ChartSetting,\r\n // ChartRender\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Eventful = require(\"zrender/lib/mixin/Eventful\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar interactionMutex = require(\"./interactionMutex\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar map = zrUtil.map;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: 'rgba(0,0,0,0.3)',\n fill: 'rgba(0,0,0,0.1)'\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * @alias module:echarts/component/helper/BrushController\n * @constructor\n * @mixin {module:zrender/mixin/Eventful}\n * @event module:echarts/component/helper/BrushController#brush\n * params:\n * areas: Array., coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n *\n * @param {module:zrender/zrender~ZRender} zr\n */\n\nfunction BrushController(zr) {\n Eventful.call(this);\n /**\n * @type {module:zrender/zrender~ZRender}\n * @private\n */\n\n this._zr = zr;\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n\n this.group = new graphic.Group();\n /**\n * Only for drawing (after enabledBrush).\n * 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * Only for drawing (after enabledBrush).\n *\n * @private\n * @type {Object}\n */\n\n this._brushOption;\n /**\n * @private\n * @type {Object}\n */\n\n this._panels;\n /**\n * @private\n * @type {Array.}\n */\n\n this._track = [];\n /**\n * @private\n * @type {boolean}\n */\n\n this._dragging;\n /**\n * @private\n * @type {Array}\n */\n\n this._covers = [];\n /**\n * @private\n * @type {moudule:zrender/container/Group}\n */\n\n this._creatingCover;\n /**\n * `true` means global panel\n * @private\n * @type {module:zrender/container/Group|boolean}\n */\n\n this._creatingPanel;\n /**\n * @private\n * @type {boolean}\n */\n\n this._enableGlobalPan;\n /**\n * @private\n * @type {boolean}\n */\n\n /**\n * @private\n * @type {string}\n */\n this._uid = 'brushController_' + baseUID++;\n /**\n * @private\n * @type {Object}\n */\n\n this._handlers = {};\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = zrUtil.bind(handler, this);\n }, this);\n}\n\nBrushController.prototype = {\n constructor: BrushController,\n\n /**\n * If set to null/undefined/false, select disabled.\n * @param {Object} brushOption\n * @param {string|boolean} brushOption.brushType 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType.\n * ('auto' can not be used in global panel)\n * @param {number} [brushOption.brushMode='single'] 'single' or 'multiple'\n * @param {boolean} [brushOption.transformable=true]\n * @param {boolean} [brushOption.removeOnClick=false]\n * @param {Object} [brushOption.brushStyle]\n * @param {number} [brushOption.brushStyle.width]\n * @param {number} [brushOption.brushStyle.lineWidth]\n * @param {string} [brushOption.brushStyle.stroke]\n * @param {string} [brushOption.brushStyle.fill]\n * @param {number} [brushOption.z]\n */\n enableBrush: function (brushOption) {\n this._brushType && doDisableBrush(this);\n brushOption.brushType && doEnableBrush(this, brushOption);\n return this;\n },\n\n /**\n * @param {Array.} panelOpts If not pass, it is global brush.\n * Each items: {\n * panelId, // mandatory.\n * clipPath, // mandatory. function.\n * isTargetByCursor, // mandatory. function.\n * defaultBrushType, // optional, only used when brushType is 'auto'.\n * getLinearBrushOtherExtent, // optional. function.\n * }\n */\n setPanels: function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels = this._panels = {};\n zrUtil.each(panelOpts, function (panelOpts) {\n panels[panelOpts.panelId] = zrUtil.clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n\n return this;\n },\n\n /**\n * @param {Object} [opt]\n * @return {boolean} [opt.enableGlobalPan=false]\n */\n mount: function (opt) {\n opt = opt || {};\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n\n this._zr.add(thisGroup);\n\n thisGroup.attr({\n position: opt.position || [0, 0],\n rotation: opt.rotation || 0,\n scale: opt.scale || [1, 1]\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n },\n eachCover: function (cb, context) {\n each(this._covers, cb, context);\n },\n\n /**\n * Update covers.\n * @param {Array.} brushOptionList Like:\n * [\n * {id: 'xx', brushType: 'line', range: [23, 44], brushStyle, transformable},\n * {id: 'yy', brushType: 'rect', range: [[23, 44], [23, 54]]},\n * ...\n * ]\n * `brushType` is required in each cover info. (can not be 'auto')\n * `id` is not mandatory.\n * `brushStyle`, `transformable` is not mandatory, use DEFAULT_BRUSH_OPT by default.\n * If brushOptionList is null/undefined, all covers removed.\n */\n updateCovers: function (brushOptionList) {\n brushOptionList = zrUtil.map(brushOptionList, function (brushOption) {\n return zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushOption = brushOptionList[newIndex]; // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbiden.\n\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushOption, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushOption));\n updateCoverAfterCreation(controller, cover);\n }\n }\n\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n },\n unmount: function () {\n this.enableBrush(false); // container may 'removeAll' outside.\n\n clearCovers(this);\n\n this._zr.remove(this.group);\n\n return this;\n },\n dispose: function () {\n this.unmount();\n this.off();\n }\n};\nzrUtil.mixin(BrushController, Eventful);\n\nfunction doEnableBrush(controller, brushOption) {\n var zr = controller._zr; // Consider roam, which takes globalPan too.\n\n if (!controller._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid);\n }\n\n mountHandlers(zr, controller._handlers);\n controller._brushType = brushOption.brushType;\n controller._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n}\n\nfunction doDisableBrush(controller) {\n var zr = controller._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid);\n unmountHandlers(zr, controller._handlers);\n controller._brushType = controller._brushOption = null;\n}\n\nfunction mountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n}\n\nfunction unmountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n}\n\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\n\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n\n return creatingCover;\n}\n\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\n\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\n\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\n\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n} // return target panel or `true` (means global panel)\n\n\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n} // Return a panel or true\n\n\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panelId = cover.__brushOption.panelId; // User may give cover without coord sys info,\n // which is then treated as global panel.\n\n return panelId != null ? panels[panelId] : true;\n}\n\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\n\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = zrUtil.clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', areas, {\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\n\nfunction shouldShowCover(controller) {\n var track = controller._track;\n\n if (!track.length) {\n return false;\n }\n\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\n\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n\nfunction createBaseRectCover(doDrift, controller, brushOption, edgeNames) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(doDrift, controller, cover, 'nswe'),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNames, function (name) {\n cover.add(new graphic.Rect({\n name: name,\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(doDrift, controller, cover, name),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\n\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\n\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each(['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], function (name) {\n var el = cover.childOfName(name);\n var globalDir = getGlobalDirection(controller, name);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\n\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\n\nfunction makeStyle(brushOption) {\n return zrUtil.defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\n\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], // x range\n [min[1], max[1]] // y range\n ];\n}\n\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\n\nfunction getGlobalDirection(controller, localDirection) {\n if (localDirection.length > 1) {\n localDirection = localDirection.split('');\n var globalDir = [getGlobalDirection(controller, localDirection[0]), getGlobalDirection(controller, localDirection[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n } else {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var globalDir = graphic.transformDirection(map[localDirection], getTransform(controller));\n return inverseMap[globalDir];\n }\n}\n\nfunction driftRect(toRectRange, fromRectRange, controller, cover, name, dx, dy, e) {\n var brushOption = cover.__brushOption;\n var rectRange = toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(name.split(''), function (namePart) {\n var ind = DIRECTION_MAP[namePart];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction driftPolygon(controller, cover, dx, dy, e) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\n\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== true ? panel.clipPath(data, controller._transform) : zrUtil.clone(data);\n}\n\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\n\nfunction resetCursor(controller, e, localCursorPoint) {\n if ( // Check active\n !controller._brushType // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e)) {\n return;\n }\n\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint); // Check whether in covers.\n\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n\n if (currPanel && (currPanel === true || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n\n currPanel && zr.setCursorStyle('crosshair');\n}\n\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\n\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\n\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n\n controller._track.push(localCursorPoint.slice());\n\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = zrUtil.clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === true ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n\n controller._covers.push(creatingCover);\n }\n\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n\n return eventParams;\n}\n\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n return panel.defaultBrushType;\n }\n\n return brushType;\n}\n\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mose out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\n\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null; // trigger event shoule be at final, after procedure will be nested.\n\n eventParams && trigger(controller, eventParams);\n }\n}\n\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n * @type {Object}\n */\n\n\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n return range;\n }, function (range) {\n return range;\n }), controller, brushOption, ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw']);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape.\n\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\n\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n }, function (rectRange) {\n return rectRange[xyIndex];\n }), controller, brushOption, [['w', 'e'], ['n', 's']][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent; // If brushWidth not specified, fit the panel.\n\n var panel = getPanelByCover(controller, cover);\n\n if (panel !== true && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex, controller._transform);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\n\nvar _default = BrushController;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar RadiusAxis = require(\"./RadiusAxis\");\n\nvar AngleAxis = require(\"./AngleAxis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @module echarts/coord/polar/Polar\n */\n\n/**\n * @alias {module:echarts/coord/polar/Polar}\n * @constructor\n * @param {string} name\n */\nvar Polar = function (name) {\n /**\n * @type {string}\n */\n this.name = name || '';\n /**\n * x of polar center\n * @type {number}\n */\n\n this.cx = 0;\n /**\n * y of polar center\n * @type {number}\n */\n\n this.cy = 0;\n /**\n * @type {module:echarts/coord/polar/RadiusAxis}\n * @private\n */\n\n this._radiusAxis = new RadiusAxis();\n /**\n * @type {module:echarts/coord/polar/AngleAxis}\n * @private\n */\n\n this._angleAxis = new AngleAxis();\n this._radiusAxis.polar = this._angleAxis.polar = this;\n};\n\nPolar.prototype = {\n type: 'polar',\n axisPointerEnabled: true,\n constructor: Polar,\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['radius', 'angle'],\n\n /**\n * @type {module:echarts/coord/PolarModel}\n */\n model: null,\n\n /**\n * If contain coord\n * @param {Array.} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n },\n\n /**\n * If contain data\n * @param {Array.} data\n * @return {boolean}\n */\n containData: function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n },\n\n /**\n * @param {string} dim\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxis: function (dim) {\n return this['_' + dim + 'Axis'];\n },\n\n /**\n * @return {Array.}\n */\n getAxes: function () {\n return [this._radiusAxis, this._angleAxis];\n },\n\n /**\n * Get axes by type of scale\n * @param {string} scaleType\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxesByScale: function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n },\n\n /**\n * @return {module:echarts/coord/polar/AngleAxis}\n */\n getAngleAxis: function () {\n return this._angleAxis;\n },\n\n /**\n * @return {module:echarts/coord/polar/RadiusAxis}\n */\n getRadiusAxis: function () {\n return this._radiusAxis;\n },\n\n /**\n * @param {module:echarts/coord/polar/Axis}\n * @return {module:echarts/coord/polar/Axis}\n */\n getOtherAxis: function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n },\n\n /**\n * Base axis will be used on stacking.\n *\n * @return {module:echarts/coord/polar/Axis}\n */\n getBaseAxis: function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n },\n\n /**\n * @param {string} [dim] 'radius' or 'angle' or 'auto' or null/undefined\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n getTooltipAxes: function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n },\n\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n * @param {Array.} data\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n dataToPoint: function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n },\n\n /**\n * Convert a (x, y) point to data\n * @param {Array.} point\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n pointToData: function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n },\n\n /**\n * Convert a (x, y) point to (radius, angle) coord\n * @param {Array.} point\n * @return {Array.}\n */\n pointToCoord: function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]); // Fix fixed extent in polarCreator\n // FIXME\n\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180; // move to angleExtent\n\n var dir = radian < minAngle ? 1 : -1;\n\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n\n return [radius, radian];\n },\n\n /**\n * Convert a (radius, angle) coord to (x, y) point\n * @param {Array.} coord\n * @return {Array.}\n */\n coordToPoint: function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx; // Inverse the y\n\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n },\n\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n * @return {Ring}\n */\n getArea: function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n var d2 = dx * dx + dy * dy;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n }\n};\nvar _default = Polar;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Gradient = require(\"zrender/lib/graphic/Gradient\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isFunction = _util.isFunction;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = {\n createOnAllSeries: true,\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.color').split('.'); // Set in itemStyle\n\n var color = seriesModel.get(colorAccessPath);\n var colorCallback = isFunction(color) && !(color instanceof Gradient) ? color : null; // Default color\n\n if (!color || colorCallback) {\n color = seriesModel.getColorFromPalette( // TODO series count changed.\n seriesModel.name, null, ecModel.getSeriesCount());\n }\n\n data.setVisual('color', color);\n var borderColorAccessPath = (seriesModel.visualBorderColorAccessPath || 'itemStyle.borderColor').split('.');\n var borderColor = seriesModel.get(borderColorAccessPath);\n data.setVisual('borderColor', borderColor); // Only visible series has each data be visual encoded\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n if (colorCallback) {\n data.each(function (idx) {\n data.setItemVisual(idx, 'color', colorCallback(seriesModel.getDataParams(idx)));\n });\n } // itemStyle in each data item\n\n\n var dataEach = function (data, idx) {\n var itemModel = data.getItemModel(idx);\n var color = itemModel.get(colorAccessPath, true);\n var borderColor = itemModel.get(borderColorAccessPath, true);\n\n if (color != null) {\n data.setItemVisual(idx, 'color', color);\n }\n\n if (borderColor != null) {\n data.setItemVisual(idx, 'borderColor', borderColor);\n }\n };\n\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n }\n};\nmodule.exports = _default;","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n } // Return NaN if count is 0\n\n\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(min) ? min : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\n\nvar indexSampler = function (frame, value) {\n return Math.round(frame.length / 2);\n};\n\nfunction _default(seriesType) {\n return {\n seriesType: seriesType,\n modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem; // Only cartesian2d support down sampling\n\n if (coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent(); // Coordinste system has been resized\n\n var size = extent[1] - extent[0];\n var rate = Math.round(data.count() / size);\n\n if (rate > 1) {\n var sampler;\n\n if (typeof sampling === 'string') {\n sampler = samplers[sampling];\n } else if (typeof sampling === 'function') {\n sampler = sampling;\n }\n\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar graphicUtil = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PATH_COLOR = ['textStyle', 'color'];\nvar _default = {\n /**\n * Get color property or get color from option.textStyle.color\n * @param {boolean} [isEmphasis]\n * @return {string}\n */\n getTextColor: function (isEmphasis) {\n var ecModel = this.ecModel;\n return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);\n },\n\n /**\n * Create font string from fontStyle, fontWeight, fontSize, fontFamily\n * @return {string}\n */\n getFont: function () {\n return graphicUtil.getFont({\n fontStyle: this.getShallow('fontStyle'),\n fontWeight: this.getShallow('fontWeight'),\n fontSize: this.getShallow('fontSize'),\n fontFamily: this.getShallow('fontFamily')\n }, this.ecModel);\n },\n getTextRect: function (text) {\n return textContain.getBoundingRect(text, this.getFont(), this.getShallow('align'), this.getShallow('verticalAlign') || this.getShallow('baseline'), this.getShallow('padding'), this.getShallow('lineHeight'), this.getShallow('rich'), this.getShallow('truncateText'));\n }\n};\nmodule.exports = _default;","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar _whiskerBoxCommon = require(\"../helper/whiskerBoxCommon\");\n\nvar seriesModelMixin = _whiskerBoxCommon.seriesModelMixin;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar BoxplotSeries = SeriesModel.extend({\n type: 'series.boxplot',\n dependencies: ['xAxis', 'yAxis', 'grid'],\n // TODO\n // box width represents group size, so dimension should have 'size'.\n\n /**\n * @see \n * The meanings of 'min' and 'max' depend on user,\n * and echarts do not need to know it.\n * @readOnly\n */\n defaultValueDimensions: [{\n name: 'min',\n defaultTooltip: true\n }, {\n name: 'Q1',\n defaultTooltip: true\n }, {\n name: 'median',\n defaultTooltip: true\n }, {\n name: 'Q3',\n defaultTooltip: true\n }, {\n name: 'max',\n defaultTooltip: true\n }],\n\n /**\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * @override\n */\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n // 'horizontal' or 'vertical'\n boxWidth: [7, 50],\n // [min, max] can be percent of band width.\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\n emphasis: {\n itemStyle: {\n borderWidth: 2,\n shadowBlur: 5,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(0,0,0,0.4)'\n }\n },\n animationEasing: 'elasticOut',\n animationDuration: 800\n }\n});\nzrUtil.mixin(BoxplotSeries, seriesModelMixin, true);\nvar _default = BoxplotSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar featureManager = require(\"../featureManager\");\n\nvar lang = require(\"../../../lang\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar brushLang = lang.toolbox.brush;\n\nfunction Brush(model, ecModel, api) {\n this.model = model;\n this.ecModel = ecModel;\n this.api = api;\n /**\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * @private\n * @type {string}\n */\n\n this._brushMode;\n}\n\nBrush.defaultOption = {\n show: true,\n type: ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'],\n icon: {\n /* eslint-disable */\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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',\n // jshint ignore:line\n 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' // jshint ignore:line\n\n /* eslint-enable */\n\n },\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: zrUtil.clone(brushLang.title)\n};\nvar proto = Brush.prototype; // proto.updateLayout = function (featureModel, ecModel, api) {\n\n/* eslint-disable */\n\nproto.render =\n/* eslint-enable */\nproto.updateView = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed |= brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n};\n\nproto.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n};\n\nproto.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n};\n\nfeatureManager.register('brush', Brush);\nvar _default = Brush;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar AxisBuilder = require(\"../axis/AxisBuilder\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {module:echarts/model/Model} axisPointerModel\n */\nfunction buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\n\n\nfunction buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get('label.precision'),\n formatter: axisPointerModel.get('label.formatter')\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2]; // Adjust by align.\n\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2); // Not overflow ec container\n\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get('axisLine.lineStyle.color');\n }\n\n elOption.label = {\n shape: {\n x: 0,\n y: 0,\n width: width,\n height: height,\n r: labelModel.get('borderRadius')\n },\n position: position.slice(),\n // TODO: rich\n style: {\n text: text,\n textFont: font,\n textFill: labelModel.getTextColor(),\n textPosition: 'inside',\n textPadding: paddings,\n fill: bgColor,\n stroke: labelModel.get('borderColor') || 'transparent',\n lineWidth: labelModel.get('borderWidth') || 0,\n shadowBlur: labelModel.get('shadowBlur'),\n shadowColor: labelModel.get('shadowColor'),\n shadowOffsetX: labelModel.get('shadowOffsetX'),\n shadowOffsetY: labelModel.get('shadowOffsetY')\n },\n // Lable should be over axisPointer.\n z2: 10\n };\n} // Do not overflow ec container\n\n\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\n/**\n * @param {number} value\n * @param {module:echarts/coord/Axis} axis\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} opt\n * @param {Array.} seriesDataIndices\n * @param {number|string} opt.precision 'auto' or a number\n * @param {string|Function} opt.formatter label formatter\n */\n\n\nfunction getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel( // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n value, {\n precision: opt.precision\n });\n var formatter = opt.formatter;\n\n if (formatter) {\n var params = {\n value: axisHelper.getAxisRawValue(axis, value),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params.seriesData.push(dataParams);\n });\n\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params);\n }\n }\n\n return text;\n}\n/**\n * @param {module:echarts/coord/Axis} axis\n * @param {number} value\n * @param {Object} layoutInfo {\n * rotation, position, labelOffset, labelDirection, labelMargin\n * }\n */\n\n\nfunction getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\n\nfunction buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get('label.margin');\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\n/**\n * @param {Array.} p1\n * @param {Array.} p2\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\n/**\n * @param {Array.} xy\n * @param {Array.} wh\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\n\nfunction makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}\n\nexports.buildElStyle = buildElStyle;\nexports.buildLabelElOption = buildLabelElOption;\nexports.getValueLabel = getValueLabel;\nexports.getTransformedPosition = getTransformedPosition;\nexports.buildCartesianSingleLabelElOption = buildCartesianSingleLabelElOption;\nexports.makeLineShape = makeLineShape;\nexports.makeRectShape = makeRectShape;\nexports.makeSectorShape = makeSectorShape;"],"sourceRoot":""} \ No newline at end of file diff --git a/src/expendPlugins/chart/css/1.68a757d2.css b/src/expendPlugins/chart/css/1.68a757d2.css new file mode 100644 index 000000000..c9f7d9abf --- /dev/null +++ b/src/expendPlugins/chart/css/1.68a757d2.css @@ -0,0 +1 @@ +.chart-base-slider .el-slider__runway.show-input{margin-right:72px}.chart-base-slider .el-slider__input.el-input-number--mini{width:56px}.chart-base-slider .input_content{margin:6px 0 0 5px} \ No newline at end of file diff --git a/src/expendPlugins/chart/css/2.68a757d2.css b/src/expendPlugins/chart/css/2.68a757d2.css new file mode 100644 index 000000000..c9f7d9abf --- /dev/null +++ b/src/expendPlugins/chart/css/2.68a757d2.css @@ -0,0 +1 @@ +.chart-base-slider .el-slider__runway.show-input{margin-right:72px}.chart-base-slider .el-slider__input.el-input-number--mini{width:56px}.chart-base-slider .input_content{margin:6px 0 0 5px} \ No newline at end of file diff --git a/src/expendPlugins/chart/demo.html b/src/expendPlugins/chart/demo.html new file mode 100644 index 000000000..8f96d8c80 --- /dev/null +++ b/src/expendPlugins/chart/demo.html @@ -0,0 +1,10 @@ + +chartmix demo + + + + + + diff --git a/src/expendPlugins/chart/plugin.js b/src/expendPlugins/chart/plugin.js new file mode 100644 index 000000000..5b264bb41 --- /dev/null +++ b/src/expendPlugins/chart/plugin.js @@ -0,0 +1,48 @@ +import { seriesLoadScripts, loadLinks, $$ } from '../../utils/util' +// import { generateRandomKey , deepCopy } from '../../utils/chartUtil' +// import { chartOptions } from '../../data/chartJson' +import chartInfo from '../../store' + +// Dynamically load dependent scripts and styles +const dependScripts = [ + 'https://cdn.jsdelivr.net/npm/vue@2.6.11', + 'https://unpkg.com/vuex@3.4.0', + 'https://unpkg.com/element-ui/lib/index.js', + 'expendPlugins/chart/chartmix.umd.js' +] + +const dependLinks = [ + 'https://unpkg.com/element-ui/lib/theme-chalk/index.css', + 'expendPlugins/chart/chartmix.css' +] + + + +// Initialize the chart component +function chart() { + loadLinks(dependLinks); + + seriesLoadScripts(dependScripts, null, function () { + const store = new Vuex.Store() + console.info('chartmix::', chartmix.default) + + Vue.use(chartmix.default, { store }) + let outDom = document.getElementById('luckysheet_info_detail') + chartmix.default.initChart(outDom) + $('.chartSetting').css({ + position: 'absolute', + right: 0, + width: '300px', + display: 'none', + background: '#fff', + paddingLeft: '10px', + border: '1px solid #ccc', + height: 'auto', + zIndex: 999 + }) + chartInfo.createChart = chartmix.default.createChart + chartInfo.highlightChart = chartmix.default.highlightChart + }); +} + +export { chart } \ No newline at end of file diff --git a/src/function/func.js b/src/function/func.js new file mode 100644 index 000000000..c027dccba --- /dev/null +++ b/src/function/func.js @@ -0,0 +1,1779 @@ +import func_methods from '../global/func_methods'; +import formula from '../global/formula'; +import tooltip from '../global/tooltip'; +import { isRealNum, valueIsError } from '../global/validate'; +import { getdatabyselectionD } from '../global/getdata'; +import { genarate } from '../global/format'; +import { inverse } from '../function/matrix_methods'; +import { getSheetIndex, getluckysheetfile } from '../methods/get'; +import { getObjType, ABCatNum } from '../utils/util'; +import Store from '../store'; + +const error = { + v: "#VALUE!", //错误的参数或运算符 + n: "#NAME?", //公式名称错误 + na: "#N/A", //函数或公式中没有可用数值 + r: "#REF!", //删除了由其他公式引用的单元格 + d: "#DIV/0!", //除数是0或空单元格 + nm: "#NUM!", //当公式或函数中某个数字有问题时 + nl: "#NULL!", //交叉运算符(空格)使用不正确 + sp: "#SPILL!" //数组范围有其它值 +} + +//函数功能:比较或运算 +function luckysheet_compareWith() { + //第一个参数和第三个参数,返回比较结果的布尔值或者运算值 + //formula.operatorjson; 存储运算符和比较符 + let sp = arguments[1]; //操作符 + + //参数一 + let data_fp = arguments[0]; + let fp; + if(getObjType(data_fp) == "object" && data_fp.startCell != null){ //参数是选区 + if(sp == "&"){ + fp = func_methods.getCellDataDyadicArr(data_fp, "text"); + } + else{ + fp = func_methods.getCellDataDyadicArr(data_fp, "number"); + } + + if(fp.length == 1 && fp[0].length == 1){ + fp = fp[0][0]; + } + } + else{ + fp = data_fp; + } + + //参数二 + let data_tp = arguments[2]; + let tp; + if(getObjType(data_tp) == "object" && data_tp.startCell != null){ //参数是选区 + if(sp == "&"){ + tp = func_methods.getCellDataDyadicArr(data_tp, "text"); + } + else{ + tp = func_methods.getCellDataDyadicArr(data_tp, "number"); + } + + if(tp.length == 1 && tp[0].length == 1){ + tp = tp[0][0]; + } + } + else{ + tp = data_tp; + } + + if(valueIsError(fp)){ + return fp; + } + + if(valueIsError(tp)){ + return tp; + } + + //参数是不规则二维数组 时 return #VALUE! 错误 + if(getObjType(fp) == "array" && getObjType(fp[0]) == "array" && !func_methods.isDyadicArr(fp)){ + return error.v; + } + + if(getObjType(tp) == "array" && getObjType(tp[0]) == "array" && !func_methods.isDyadicArr(tp)){ + return error.v; + } + + if(sp == "<>"){ + sp = "!="; + } + + if(sp == "="){ + sp = "=="; + } + + if(sp == "-" && fp == null){ + fp = 0; + } + + //计算result + function booleanOperation(a, operator, b){ + if(isRealNum(a)){ + a = parseFloat(a); + } + + if(isRealNum(b)){ + b = parseFloat(b); + } + + if(operator == "=="){ + if(a == b){ + return true; + } + else{ + return false; + } + } + else if(operator == "!="){ + if(a != b){ + return true; + } + else{ + return false; + } + } + else if(operator == ">="){ + if(a >= b){ + return true; + } + else{ + return false; + } + } + else if(operator == "<="){ + if(a <= b){ + return true; + } + else{ + return false; + } + } + else if(operator == ">"){ + if(a > b){ + return true; + } + else{ + return false; + } + } + else if(operator == "<"){ + if(a < b){ + return true; + } + else{ + return false; + } + } + } + + //布尔值对应数字(true = 1, false = 1) + function booleanToNum(v){ + if(v == null){ + return v; + } + + if(v.toString().toLowerCase() == "true"){ + return 1; + } + + if(v.toString().toLowerCase() == "false"){ + return 0; + } + + return v; + } + + if(sp == "*"){ //乘 + if(getObjType(fp) == "array" && getObjType(tp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array" && getObjType(tp[0]) == "array"){ + //二维数组相乘(m*n 与 m*n 等于 m*n;m*p 与 p*n 等于 m*n;其它错误) + if(fp.length == tp.length && fp[0].length == tp[0].length){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[m][n])){ + value = parseFloat(fp[m][n]) * parseFloat(tp[m][n]); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(fp[0].length == tp.length){ + let rowlen = fp.length; + let collen = tp[0].length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + let value = 0; + + for(let p = 0; p < fp[0].length; p++){ + fp[m][p] = booleanToNum(fp[m][p]); + tp[p][n] = booleanToNum(tp[p][n]); + + if(isRealNum(fp[m][p]) && isRealNum(tp[p][n])){ + value += parseFloat(fp[m][p]) * parseFloat(tp[p][n]); + } + else{ + value += error.v; + } + } + + if(value.toString() == "NaN"){ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(fp.length == tp[0].length){ + let rowlen = tp.length; + let collen = fp[0].length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + let value = 0; + + for(let p = 0; p < tp[0].length; p++){ + fp[p][n] = booleanToNum(fp[p][n]); + tp[m][p] = booleanToNum(tp[m][p]); + + if(isRealNum(tp[m][p]) && isRealNum(fp[p][n])){ + value += parseFloat(tp[m][p]) * parseFloat(fp[p][n]); + } + else{ + value += error.v; + } + } + + if(value.toString() == "NaN"){ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + return error.na; + } + } + else if(getObjType(fp[0]) == "array"){ + //二维数组与一维数组相乘(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) + if(fp[0].length == tp.length){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[n])){ + value = parseFloat(fp[m][n]) * parseFloat(tp[n]); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(fp[0].length == 1){ + let rowlen = fp.length; + let collen = tp.length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + fp[m][0] = booleanToNum(fp[m][0]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[m][0]) && isRealNum(tp[n])){ + value = parseFloat(fp[m][0]) * parseFloat(tp[n]); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + return error.na; + } + } + else if(getObjType(tp[0]) == "array"){ + //二维数组与一维数组相乘(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) + if(tp[0].length == fp.length){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[m][n])){ + value = parseFloat(fp[n]) * parseFloat(tp[m][n]); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(tp[0].length == 1){ + let rowlen = tp.length; + let collen = fp.length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + fp[n] = booleanToNum(fp[n]); + tp[m][0] = booleanToNum(tp[m][0]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[m][0])){ + value = parseFloat(fp[n]) * parseFloat(tp[m][0]); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + return error.na; + } + } + else{ + //一维数组与一维数组相乘时,数组大小不一样是错误 + if(fp.length != tp.length){ + return error.na; + } + + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[n])){ + value = parseFloat(fp[n]) * parseFloat(tp[n]); + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(fp) == "array"){ + tp = booleanToNum(tp); + + let result = []; + + if(getObjType(fp[0]) == "array"){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp)){ + value = parseFloat(fp[m][n]) * parseFloat(tp); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp)){ + value = parseFloat(fp[n]) * parseFloat(tp); + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(tp) == "array"){ + fp = booleanToNum(fp); + + let result = []; + + if(getObjType(tp[0]) == "array"){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[m][n])){ + value = parseFloat(fp) * parseFloat(tp[m][n]); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < tp.length; n++){ + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[n])){ + value = parseFloat(fp) * parseFloat(tp[n]); + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else{ + fp = booleanToNum(fp); + tp = booleanToNum(tp); + + let result; + if(isRealNum(fp) && isRealNum(tp)){ + result = parseFloat(fp) * parseFloat(tp); + } + else{ + result = error.v; + } + + return result; + } + } + else if(sp == "/"){ //除 + if(getObjType(fp) == "array" && getObjType(tp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array" && getObjType(tp[0]) == "array"){ + //二维数组相除(m*n 与 m*n 等于 m*n;m*p 与 p*n 等于 m*n;其它错误) + if(fp.length == tp.length && fp[0].length == tp[0].length){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[m][n])){ + if(parseFloat(tp[m][n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[m][n]) / parseFloat(tp[m][n]); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(fp[0].length == tp.length){ + let tp_inverse = inverse(tp); + + let rowlen = fp.length; + let collen = tp_inverse[0].length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + let value = 0; + + for(let p = 0; p < fp[0].length; p++){ + fp[m][p] = booleanToNum(fp[m][p]); + tp_inverse[p][n] = booleanToNum(tp_inverse[p][n]); + + if(isRealNum(fp[m][p]) && isRealNum(tp_inverse[p][n])){ + value += parseFloat(fp[m][p]) * parseFloat(tp_inverse[p][n]); + } + else{ + value += error.v; + } + } + + if(value.toString() == "NaN"){ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + return error.na; + } + } + else if(getObjType(fp[0]) == "array"){ + //二维数组与一维数组相除(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) + if(fp[0].length == tp.length){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[n])){ + if(parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[m][n]) / parseFloat(tp[n]); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(fp[0].length == 1){ + let rowlen = fp.length; + let collen = tp.length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + fp[m][0] = booleanToNum(fp[m][0]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[m][0]) && isRealNum(tp[n])){ + if(parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[m][0]) / parseFloat(tp[n]); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + return error.na; + } + } + else if(getObjType(tp[0]) == "array"){ + //二维数组与一维数组相除(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) + if(tp[0].length == fp.length){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[m][n])){ + if(parseFloat(tp[m][n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[n]) / parseFloat(tp[m][n]); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(tp[0].length == 1){ + let rowlen = tp.length; + let collen = fp.length; + + for(let m = 0; m < rowlen; m++){ + let rowArr = []; + + for(let n = 0; n < collen; n++){ + fp[n] = booleanToNum(fp[n]); + tp[m][0] = booleanToNum(tp[m][0]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[m][0])){ + if(parseFloat(tp[m][0]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[n]) / parseFloat(tp[m][0]); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + return error.na; + } + } + else{ + //一维数组与一维数组相除时,数组大小不一样是错误 + if(fp.length != tp.length){ + return error.na; + } + + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[n])){ + if(parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[n]) / parseFloat(tp[n]); + } + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(fp) == "array"){ + tp = booleanToNum(tp); + + let result = []; + + if(getObjType(fp[0]) == "array"){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp)){ + if(parseFloat(tp) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[m][n]) / parseFloat(tp); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp)){ + if(parseFloat(tp) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp[n]) / parseFloat(tp); + } + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(tp) == "array"){ + fp = booleanToNum(fp); + + let result = []; + + if(getObjType(tp[0]) == "array"){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[m][n])){ + if(parseFloat(tp[m][n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp) / parseFloat(tp[m][n]); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < tp.length; n++){ + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[n])){ + if(parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = parseFloat(fp) / parseFloat(tp[n]); + } + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else{ + fp = booleanToNum(fp); + tp = booleanToNum(tp); + + let result; + if(isRealNum(fp) && isRealNum(tp)){ + if(parseFloat(tp) == 0){ + result = error.d; + } + else{ + result = parseFloat(fp) / parseFloat(tp); + } + } + else{ + result = error.v; + } + + return result; + } + } + else if(sp == "+" || sp == "-" || sp == "%"){ //加 减 取余 + if(getObjType(fp) == "array" && getObjType(tp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array" && getObjType(tp[0]) == "array"){ + if(fp.length != tp.length && fp[0].length != tp[0].length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[m][n])){ + if(sp == "%" && parseFloat(tp[m][n]) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp[m][n]) + sp + parseFloat(tp[m][n])); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(getObjType(fp[0]) == "array"){ + if(fp[0].length != tp.length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[n])){ + if(sp == "%" && parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp[m][n]) + sp + parseFloat(tp[n])); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(getObjType(tp[0]) == "array"){ + if(tp[0].length != fp.length){ + return error.na; + } + + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[m][n])){ + if(sp == "%" && parseFloat(tp[m][n]) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp[n]) + sp + parseFloat(tp[m][n])); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + if(fp.length != tp.length){ + return error.na; + } + + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[n])){ + if(sp == "%" && parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp[n]) + sp + parseFloat(tp[n])); + } + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(fp) == "array"){ + tp = booleanToNum(tp); + + let result = []; + + if(getObjType(fp[0]) == "array"){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp)){ + if(sp == "%" && parseFloat(tp) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp[m][n]) + sp + parseFloat(tp)); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp)){ + if(sp == "%" && parseFloat(tp) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp[n]) + sp + parseFloat(tp)); + } + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(tp) == "array"){ + fp = booleanToNum(fp); + + let result = []; + + if(getObjType(tp[0]) == "array"){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[m][n])){ + if(sp == "%" && parseFloat(tp[m][n]) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp) + sp + parseFloat(tp[m][n])); + } + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < tp.length; n++){ + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[n])){ + if(sp == "%" && parseFloat(tp[n]) == 0){ + value = error.d; + } + else{ + value = eval(parseFloat(fp) + sp + parseFloat(tp[n])); + } + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else{ + fp = booleanToNum(fp); + tp = booleanToNum(tp); + + let result; + if(isRealNum(fp) && isRealNum(tp)){ + if(sp == "%" && parseFloat(tp) == 0){ + result = error.d; + } + else{ + result = eval(parseFloat(fp) + sp + parseFloat(tp)); + } + } + else{ + result = error.v; + } + + return result; + } + } + else if(sp == "==" || sp == "!=" || sp == ">=" || sp == "<=" || sp == ">" || sp == "<"){ //比较运算符 + if(getObjType(fp) == "array" && getObjType(tp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array" && getObjType(tp[0]) == "array"){ + if(fp.length != tp.length && fp[0].length != tp[0].length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + let value = booleanOperation(fp[m][n], sp, tp[m][n]); + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(getObjType(fp[0]) == "array"){ + if(fp[0].length != tp.length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + let value = booleanOperation(fp[m][n], sp, tp[n]); + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(getObjType(tp[0]) == "array"){ + if(tp[0].length != fp.length){ + return error.na; + } + + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + let value = booleanOperation(fp[n], sp, tp[m][n]); + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + if(fp.length != tp.length){ + return error.na; + } + + for(let n = 0; n < fp.length; n++){ + let value = booleanOperation(fp[n], sp, tp[n]); + result.push(value); + } + } + + return result; + } + else if(getObjType(fp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array"){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + let value = booleanOperation(fp[m][n], sp, tp); + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < fp.length; n++){ + let value = booleanOperation(fp[n], sp, tp); + result.push(value); + } + } + + return result; + } + else if(getObjType(tp) == "array"){ + let result = []; + + if(getObjType(tp[0]) == "array"){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + let value = booleanOperation(fp, sp, tp[m][n]); + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < tp.length; n++){ + let value = booleanOperation(fp, sp, tp[n]); + result.push(value); + } + } + + return result; + } + else{ + return booleanOperation(fp, sp, tp); + } + } + else if(sp == "&"){ //连接符 + if(getObjType(fp) == "array" && getObjType(tp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array" && getObjType(tp[0]) == "array"){ + if(fp.length != tp.length && fp[0].length != tp[0].length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + rowArr.push(fp[m][n] + "" + tp[m][n]); + } + + result.push(rowArr); + } + } + else if(getObjType(fp[0]) == "array"){ + if(fp[0].length != tp.length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + rowArr.push(fp[m][n] + "" + tp[n]); + } + + result.push(rowArr); + } + } + else if(getObjType(tp[0]) == "array"){ + if(tp[0].length != fp.length){ + return error.na; + } + + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + rowArr.push(fp[n] + "" + tp[m][n]); + } + + result.push(rowArr); + } + } + else{ + if(fp.length != tp.length){ + return error.na; + } + + for(let n = 0; n < fp.length; n++){ + result.push(fp[n] + "" + tp[n]); + } + } + + return result; + } + else if(getObjType(fp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array"){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + rowArr.push(fp[m][n] + "" + tp); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < fp.length; n++){ + result.push(fp[n] + "" + tp); + } + } + + return result; + } + else if(getObjType(tp) == "array"){ + let result = []; + + if(getObjType(tp[0]) == "array"){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + rowArr.push(fp + "" + tp[m][n]); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < tp.length; n++){ + result.push(fp + "" + tp[n]); + } + } + + return result; + } + else{ + return fp + "" + tp; + } + } + else if(sp == "^"){ //幂 + if(getObjType(fp) == "array" && getObjType(tp) == "array"){ + let result = []; + + if(getObjType(fp[0]) == "array" && getObjType(tp[0]) == "array"){ + if(fp.length != tp.length && fp[0].length != tp[0].length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[m][n])){ + value = Math.pow(parseFloat(fp[m][n]), parseFloat(tp[m][n])); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(getObjType(fp[0]) == "array"){ + if(fp[0].length != tp.length){ + return error.na; + } + + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp[n])){ + value = Math.pow(parseFloat(fp[m][n]), parseFloat(tp[n])); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else if(getObjType(tp[0]) == "array"){ + if(tp[0].length != fp.length){ + return error.na; + } + + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[m][n])){ + value = Math.pow(parseFloat(fp[n]), parseFloat(tp[m][n])); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + if(fp.length != tp.length){ + return error.na; + } + + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp[n])){ + value = Math.pow(parseFloat(fp[n]), parseFloat(tp[n])); + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(fp) == "array"){ + tp = booleanToNum(tp); + + let result = []; + + if(getObjType(fp[0]) == "array"){ + for(let m = 0; m < fp.length; m++){ + let rowArr = []; + + for(let n = 0; n < fp[m].length; n++){ + fp[m][n] = booleanToNum(fp[m][n]); + + let value; + if(isRealNum(fp[m][n]) && isRealNum(tp)){ + value = Math.pow(parseFloat(fp[m][n]), parseFloat(tp)); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < fp.length; n++){ + fp[n] = booleanToNum(fp[n]); + + let value; + if(isRealNum(fp[n]) && isRealNum(tp)){ + value = Math.pow(parseFloat(fp[n]), parseFloat(tp)); + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else if(getObjType(tp) == "array"){ + fp = booleanToNum(fp); + + let result = []; + + if(getObjType(tp[0]) == "array"){ + for(let m = 0; m < tp.length; m++){ + let rowArr = []; + + for(let n = 0; n < tp[m].length; n++){ + tp[m][n] = booleanToNum(tp[m][n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[m][n])){ + value = Math.pow(parseFloat(fp), parseFloat(tp[m][n])); + } + else{ + value = error.v; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + } + else{ + for(let n = 0; n < tp.length; n++){ + tp[n] = booleanToNum(tp[n]); + + let value; + if(isRealNum(fp) && isRealNum(tp[n])){ + value = Math.pow(parseFloat(fp), parseFloat(tp[n])); + } + else{ + value = error.v; + } + + result.push(value); + } + } + + return result; + } + else{ + fp = booleanToNum(fp); + tp = booleanToNum(tp); + + let result; + if(isRealNum(fp) && isRealNum(tp)){ + result = Math.pow(parseFloat(fp), parseFloat(tp)); + } + else{ + result = error.v; + } + + return result; + } + } +} + +//解析 公式中{1,2,3;2,3,4} 为数组[[1,2,3],[2,3,4]] +function luckysheet_getarraydata() { + let fp = arguments[0]; + + fp = fp.replace("{", "").replace("}", "").replace(/\"/g, ''); + + let arr = []; + + if(fp.indexOf(";") > -1){ + arr = fp.split(";"); + + for(let i = 0; i < arr.length; i++){ + arr[i] = arr[i].split(","); + } + } + else{ + arr = fp.split(","); + } + + return arr; +} + +function luckysheet_getcelldata(txt) { + if (window.luckysheet_getcelldata_cache == null) { + window.luckysheet_getcelldata_cache = {}; + } + + if (txt in window.luckysheet_getcelldata_cache) { + return window.luckysheet_getcelldata_cache[txt]; + } + + let luckysheetfile = getluckysheetfile(); + let val = txt.split("!"); + let sheettxt = "", + rangetxt = "", + sheetIndex = -1, + sheetdata = null; + + if (val.length > 1) { + sheettxt = val[0]; + rangetxt = val[1]; + + for (let i in luckysheetfile) { + if (sheettxt == luckysheetfile[i].name) { + sheetIndex = luckysheetfile[i].index; + sheetdata = luckysheetfile[i].data; + break; + } + } + + if (sheetIndex == -1) { + sheetIndex = 0; + } + } + else { + let index = getSheetIndex(Store.currentSheetIndex); + sheettxt = luckysheetfile[index].name; + sheetIndex = luckysheetfile[index].index; + sheetdata = Store.flowdata; + rangetxt = val[0]; + + if (formula.execFunctionGroupData != null) { + sheetdata = formula.execFunctionGroupData; + } + } + + if (rangetxt.indexOf(":") == -1) { + let row = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; + let col = ABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); + + if (!isNaN(row) && !isNaN(col)) { + let ret = getdatabyselectionD(sheetdata, { + "row": [row, row], + "column": [col, col] + })[0][0]; + + //范围的长宽 + let rowl = 1; + let coll = 1; + let retAll= { + "sheetName": sheettxt, + "startCell": rangetxt, + "rowl": rowl, + "coll": coll, + "data": ret + }; + + window.luckysheet_getcelldata_cache[txt] = retAll; + + return retAll; + } + else { + return []; + } + } + else { + rangetxt = rangetxt.split(":"); + let row = [], col = []; + row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; + row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; + + if (isNaN(row[0])) { + row[0] = 0; + } + + if (isNaN(row[1])) { + row[1] = sheetdata.length - 1; + } + + if (row[0] > row[1]) { + tooltip.info("选择失败", "输入范围错误!"); + return []; + } + + col[0] = ABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); + col[1] = ABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); + + if (isNaN(col[0])) { + col[0] = 0; + } + + if (isNaN(col[1])) { + col[1] = sheetdata[0].length - 1; + } + + if (col[0] > col[1]) { + tooltip.info("选择失败", "输入范围错误!"); + return []; + } + + let ret = getdatabyselectionD(sheetdata, { + "row": row, + "column": col + }); + + //范围的长宽 + let rowl = row[1] - row[0] + 1; + let coll = col[1] - col[0] + 1; + let retAll= { + "sheetName": sheettxt, + "startCell": rangetxt[0], + "rowl": rowl, + "coll": coll, + "data": ret + }; + + window.luckysheet_getcelldata_cache[txt] = retAll; + + return retAll; + } +} + +//解析单个取得的值,有字符串,数字,引用单元格或者函数 +function luckysheet_parseData(value) { + if(typeof value === "object" ){ + if(value == null){ + return ""; + } + else if(Array.isArray(value)){ //函数返回的带期望格式的数组,可提取格式 + let v = genarate(value[0]); + return v[2]; + } + else{ //getcelldat引用单元格对象,带有格式 + if(Array.isArray(value.data)){ //单元格区域 + return error.v; + } + else{ //单个单元格 + if(value.data.v === undefined){ + return ""; + } + else{ + return value.data.v; + } + } + } + } + else if(!formula.isCompareOperator(value).flag){ + let v = genarate(value); + return v[2]; + } + else if(typeof value === "string" || typeof value === "number"){ + return value; + } + + return error.v; +} + +function luckysheet_getValue() { + //解析获取函数参数,无格式,且可包含带操作符的">5" + //数据类型:1.手动输入或函数返回的字符串,普通字符串或数字直接取值,特殊格式需转化 如:"2019-1-1"(特殊格式转化为数字)、">5"或数字 + //2.引用单元格对象,取得二维数组或单个的v 如:A1 + //3.函数返回的带期望格式的数组,取得第一个参数,转化为数字 如:["2019-1-1",true] + let args = arguments[0]; + + for(let i = 0; i < args.length; i++){ + let value = args[i]; + + if(typeof value === "object" ){ + if(value == null){ + value = ""; + } + else if(Array.isArray(value)){ //函数返回的带期望格式的数组,可提取格式 + let v = genarate(value[0]); + value = v[2]; + } + else{ //getcelldat引用单元格对象,带有格式 + if(Array.isArray(value.data)){ //单元格区域 + value = value.data; + } + else{ //单个单元格 + if(value.data.v === undefined){ //空白单元格 + value = ""; + } + else{ + value = value.data.v; + } + } + } + } + else if(!formula.isCompareOperator(value).flag){ + let v = genarate(value); + value = v[2]; + } + + args[i] = value; + } +} + +export { + luckysheet_compareWith, + luckysheet_getarraydata, + luckysheet_getcelldata, + luckysheet_parseData, + luckysheet_getValue, +} \ No newline at end of file diff --git a/src/function/functionImplementation.js b/src/function/functionImplementation.js new file mode 100644 index 000000000..f9e540a8c --- /dev/null +++ b/src/function/functionImplementation.js @@ -0,0 +1,27370 @@ +import { luckysheet_getcelldata, luckysheet_parseData, luckysheet_getValue } from './func'; +import { inverse } from './matrix_methods'; +import { getSheetIndex, getluckysheetfile } from '../methods/get'; +import menuButton from '../controllers/menuButton'; +import luckysheetSparkline from '../controllers/sparkline'; +import formula from '../global/formula'; +import func_methods from '../global/func_methods'; +import editor from '../global/editor'; +import { isdatetime, diff, isdatatype } from '../global/datecontroll'; +import { isRealNum, isRealNull, valueIsError } from '../global/validate'; +import { jfrefreshgrid } from '../global/refresh'; +import { genarate, update } from '../global/format'; +import { orderbydata } from '../global/sort'; +import { getcellvalue } from '../global/getdata'; +import { getObjType, ABCatNum, chatatABC, numFormat } from '../utils/util'; +import Store from '../store'; + +//公式函数计算 +const functionImplementation = { + "SUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + if(getObjType(data) == "boolean"){ + if(data.toString().toLowerCase() == "true"){ + dataArr.push(1); + } + else if(data.toString().toLowerCase() == "false"){ + dataArr.push(0); + } + } + else{ + return formula.error.v; + } + } + else{ + dataArr.push(data); + } + } + } + + var sum = 0; + + if(dataArr.length > 0){ + for(var i = 0; i < dataArr.length; i++){ + if(valueIsError(dataArr[i])){ + return dataArr[i]; + } + + if(!isRealNum(dataArr[i])){ + continue; + } + + sum += parseFloat(dataArr[i]); + } + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AVERAGE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else{ + dataArr = dataArr.concat(data); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + dataArr.push(data); + } + } + + var sum = 0, count = 0; + + for(var i = 0; i < dataArr.length; i++){ + if(valueIsError(dataArr[i])){ + return dataArr[i]; + } + else if(!isRealNum(dataArr[i])){ + return formula.error.v; + } + + sum += parseFloat(dataArr[i]); + count++; + } + + if(count == 0){ + return formula.error.d; + } + + return sum / count; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUNT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else{ + dataArr = dataArr.concat(data); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + if(getObjType(data) == "boolean"){ + if(data.toString().toLowerCase() == "true"){ + dataArr.push(1); + } + else if(data.toString().toLowerCase() == "false"){ + dataArr.push(0); + } + } + else{ + dataArr.push(data); + } + } + } + + var count = 0; + + for(var i = 0; i < dataArr.length; i++){ + if(isRealNum(dataArr[i])){ + count++; + } + } + + return count; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUNTA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data)); + } + else{ + dataArr = dataArr.concat(data); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + dataArr.push(data); + } + } + + return dataArr.length; + } + catch (err) { + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MAX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else{ + dataArr = dataArr.concat(data); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + dataArr.push(data); + } + } + + var max = null; + + for(var i = 0; i < dataArr.length; i++){ + if(valueIsError(dataArr[i])){ + return dataArr[i]; + } + + if(!isRealNum(dataArr[i])){ + continue; + } + + if(max == null || parseFloat(dataArr[i]) > max){ + max = parseFloat(dataArr[i]); + } + } + + return max == null ? 0 : max; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else{ + dataArr = dataArr.concat(data); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + dataArr.push(data); + } + } + + var min = null; + + for(var i = 0; i < dataArr.length; i++){ + if(valueIsError(dataArr[i])){ + return dataArr[i]; + } + + if(!isRealNum(dataArr[i])){ + continue; + } + + if(min == null || parseFloat(dataArr[i]) < min){ + min = parseFloat(dataArr[i]); + } + } + + return min == null ? 0 : min; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AGE_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + var birthday = window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(UUserCard); + if(valueIsError(birthday)){ + return birthday; + } + + birthday = moment(birthday); + + var cuurentdate = moment(); + if(arguments.length == 2){ + cuurentdate = func_methods.getFirstValue(arguments[1]); + if(valueIsError(cuurentdate)){ + return cuurentdate; + } + + cuurentdate = moment(cuurentdate); + } + + var age = cuurentdate.diff(birthday, "years"); + + if(age < 0 || age.toString() == "NaN"){ + return formula.error.v; + } + + return age; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SEX_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) { + return "男"; + } + else { + return "女"; + } + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BIRTHDAY_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + var birthday = ""; + if (UUserCard.length == 15) { + var year = "19" + UUserCard.substring(6, 8) + "/" + UUserCard.substring(8, 10) + "/" + UUserCard.substring(10, 12); + birthday = year; + } + else if (UUserCard.length == 18) { + var year = UUserCard.substring(6, 10) + "/" + UUserCard.substring(10, 12) + "/" + UUserCard.substring(12, 14); + birthday = year; + } + + //生日格式 + var datetype = 0; + if (arguments[1] != null) { + datetype = func_methods.getFirstValue(arguments[1]); + if(valueIsError(datetype)){ + return datetype; + } + } + + if(!isRealNum(datetype)){ + return formula.error.v; + } + + datetype = parseInt(datetype); + + if(datetype < 0 || datetype > 2){ + return formula.error.v; + } + + if(parseInt(datetype) == 0){ + return birthday; + } + else if(parseInt(datetype) == 1){ + return moment(birthday).format("YYYY-MM-DD"); + } + else if(parseInt(datetype) == 2){ + return moment(birthday).format("YYYY年M月D日"); + } + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PROVINCE_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + var native = "未知"; + var provinceArray = formula.classlist.province; + + if (UUserCard.substring(0, 2) in provinceArray) { + native = provinceArray[UUserCard.substring(0, 2)]; + } + + return native; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CITY_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + var dataNum = cityData.length, + native = "未知"; + + for (var i = 0; i < dataNum; i++) { + if (UUserCard.substring(0, 6) == cityData[i].code) { + native = cityData[i].title; + break; + } + } + + return native; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STAR_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + var birthday = window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(UUserCard); + if(valueIsError(birthday)){ + return birthday; + } + + birthday = new Date(birthday); + + var month = birthday.getMonth(), + day = birthday.getDate(); + + var d = new Date(1999, month, day, 0, 0, 0); + var arr = []; + arr.push(["魔羯座", new Date(1999, 0, 1, 0, 0, 0)]); + arr.push(["水瓶座", new Date(1999, 0, 20, 0, 0, 0)]); + arr.push(["双鱼座", new Date(1999, 1, 19, 0, 0, 0)]); + arr.push(["白羊座", new Date(1999, 2, 21, 0, 0, 0)]); + arr.push(["金牛座", new Date(1999, 3, 21, 0, 0, 0)]); + arr.push(["双子座", new Date(1999, 4, 21, 0, 0, 0)]); + arr.push(["巨蟹座", new Date(1999, 5, 22, 0, 0, 0)]); + arr.push(["狮子座", new Date(1999, 6, 23, 0, 0, 0)]); + arr.push(["处女座", new Date(1999, 7, 23, 0, 0, 0)]); + arr.push(["天秤座", new Date(1999, 8, 23, 0, 0, 0)]); + arr.push(["天蝎座", new Date(1999, 9, 23, 0, 0, 0)]); + arr.push(["射手座", new Date(1999, 10, 22, 0, 0, 0)]); + arr.push(["魔羯座", new Date(1999, 11, 22, 0, 0, 0)]); + //console.log(birthday, arr, i); + for (var i = arr.length - 1; i >= 0; i--) { + if (d >= arr[i][1]) { + return arr[i][0]; + } + } + + return "未找到匹配星座信息"; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ANIMAL_BY_IDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //身份证号 + var UUserCard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(UUserCard)){ + return UUserCard; + } + + if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { + return formula.error.v; + } + + var birthday = window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(UUserCard); + if(valueIsError(birthday)){ + return birthday; + } + + birthday = new Date(birthday); + + var list = new Array("猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗"); + var index = (parseInt(birthday.getFullYear()) + 9) % 12; + + if (index != null && !isNaN(index)) { + return list[index]; + } + else { + return "未找到匹配生肖信息"; + } + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISIDCARD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var idcard = func_methods.getFirstValue(arguments[0]); + if(valueIsError(idcard)){ + return idcard; + } + + var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; + + if(reg.test(idcard)){ + return true + } + else{ + return false; + } + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DM_TEXT_CUTWORD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //任意需要分词的文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + //分词模式 + var datetype = 0; + if (arguments[1] != null) { + datetype = func_methods.getFirstValue(arguments[1]); + if(valueIsError(datetype)){ + return datetype; + } + } + + if(!isRealNum(datetype)){ + return formula.error.v; + } + + datetype = parseInt(datetype); + + if(datetype != 0 && datetype != 1 && datetype != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/cutword", { + "text": text, + "type": datetype + }, function(data) { + var d = [].concat(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DM_TEXT_TFIDF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //任意需要分词的文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + //关键词个数 + var count = 20; + if (arguments[1] != null) { + count = func_methods.getFirstValue(arguments[1]); + if(valueIsError(count)){ + return count; + } + } + + if(!isRealNum(count)){ + return formula.error.v; + } + + count = parseInt(count); + + //语料库 + var set = 0; + if (arguments[2] != null) { + set = func_methods.getFirstValue(arguments[2]); + if(valueIsError(set)){ + return set; + } + } + + if(!isRealNum(set)){ + return formula.error.v; + } + + set = parseInt(set); + + if(count < 0){ + return formula.error.v; + } + + if(set != 0 && set != 1 && set != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/tfidf", { + "text": text, + "count": count, + "set": set + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DM_TEXT_TEXTRANK": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //任意需要分词的文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + //关键词个数 + var count = 20; + if (arguments[1] != null) { + count = func_methods.getFirstValue(arguments[1]); + if(valueIsError(count)){ + return count; + } + } + + if(!isRealNum(count)){ + return formula.error.v; + } + + count = parseInt(count); + + //语料库 + var set = 0; + if (arguments[2] != null) { + set = func_methods.getFirstValue(arguments[2]); + if(valueIsError(set)){ + return set; + } + } + + if(!isRealNum(set)){ + return formula.error.v; + } + + set = parseInt(set); + + if(count < 0){ + return formula.error.v; + } + + if(set != 0 && set != 1 && set != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/tfidf", { + "text": text, + "count": count, + "set": set + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATA_CN_STOCK_CLOSE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //股票代码 + var stockcode = func_methods.getFirstValue(arguments[0]); + if(valueIsError(stockcode)){ + return stockcode; + } + + //日期 + var date = null; + + if(arguments[1] != null){ + var data_date = arguments[1]; + + if(getObjType(data_date) == "array"){ + return formula.error.v; + } + else if(getObjType(data_date) == "object" && data_date.startCell != null){ + if(data_date.data != null && getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ + date = update("yyyy-mm-dd", data_date.data.v); + } + else{ + return formula.error.v; + } + } + else{ + date = data_date; + } + + if(!isdatetime(date)){ + return [formula.error.v, "日期错误"]; + } + + date = moment(date).format("YYYY-MM-DD"); + } + + //复权除权 + var price = 0; + if (arguments[2] != null) { + price = func_methods.getFirstValue(arguments[2]); + if(valueIsError(price)){ + return price; + } + } + + if(!isRealNum(price)){ + return formula.error.v; + } + + price = parseInt(price); + + if(price != 0 && price != 1 && price != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/getstockinfo", { + "stockCode": stockcode, + "date": date, + "price": price, + type: "0" + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + var v = numFormat(data); + if (v == null) { + v = data; + } + formula.execFunctionGroup(cell_r, cell_c, v); + d[cell_r][cell_c] = { + "v": v, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATA_CN_STOCK_OPEN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //股票代码 + var stockcode = func_methods.getFirstValue(arguments[0]); + if(valueIsError(stockcode)){ + return stockcode; + } + + //日期 + var date = null; + + if(arguments[1] != null){ + var data_date = arguments[1]; + + if(getObjType(data_date) == "array"){ + return formula.error.v; + } + else if(getObjType(data_date) == "object" && data_date.startCell != null){ + if(data_date.data != null && getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ + date = update("yyyy-mm-dd", data_date.data.v); + } + else{ + return formula.error.v; + } + } + else{ + date = data_date; + } + + if(!isdatetime(date)){ + return [formula.error.v, "日期错误"]; + } + + date = moment(date).format("YYYY-MM-DD"); + } + + //复权除权 + var price = 0; + if (arguments[2] != null) { + price = func_methods.getFirstValue(arguments[2]); + if(valueIsError(price)){ + return price; + } + } + + if(!isRealNum(price)){ + return formula.error.v; + } + + price = parseInt(price); + + if(price != 0 && price != 1 && price != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/getstockinfo", { + "stockCode": stockcode, + "date": date, + "price": price, + type: "1" + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATA_CN_STOCK_MAX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //股票代码 + var stockcode = func_methods.getFirstValue(arguments[0]); + if(valueIsError(stockcode)){ + return stockcode; + } + + //日期 + var date = null; + + if(arguments[1] != null){ + var data_date = arguments[1]; + + if(getObjType(data_date) == "array"){ + return formula.error.v; + } + else if(getObjType(data_date) == "object" && data_date.startCell != null){ + if(data_date.data != null && getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ + date = update("yyyy-mm-dd", data_date.data.v); + } + else{ + return formula.error.v; + } + } + else{ + date = data_date; + } + + if(!isdatetime(date)){ + return [formula.error.v, "日期错误"]; + } + + date = moment(date).format("YYYY-MM-DD"); + } + + //复权除权 + var price = 0; + if (arguments[2] != null) { + price = func_methods.getFirstValue(arguments[2]); + if(valueIsError(price)){ + return price; + } + } + + if(!isRealNum(price)){ + return formula.error.v; + } + + price = parseInt(price); + + if(price != 0 && price != 1 && price != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/getstockinfo", { + "stockCode": stockcode, + "date": date, + "price": price, + type: "2" + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATA_CN_STOCK_MIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //股票代码 + var stockcode = func_methods.getFirstValue(arguments[0]); + if(valueIsError(stockcode)){ + return stockcode; + } + + //日期 + var date = null; + + if(arguments[1] != null){ + var data_date = arguments[1]; + + if(getObjType(data_date) == "array"){ + return formula.error.v; + } + else if(getObjType(data_date) == "object" && data_date.startCell != null){ + if(data_date.data != null && getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ + date = update("yyyy-mm-dd", data_date.data.v); + } + else{ + return formula.error.v; + } + } + else{ + date = data_date; + } + + if(!isdatetime(date)){ + return [formula.error.v, "日期错误"]; + } + + date = moment(date).format("YYYY-MM-DD"); + } + + //复权除权 + var price = 0; + if (arguments[2] != null) { + price = func_methods.getFirstValue(arguments[2]); + if(valueIsError(price)){ + return price; + } + } + + if(!isRealNum(price)){ + return formula.error.v; + } + + price = parseInt(price); + + if(price != 0 && price != 1 && price != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/getstockinfo", { + "stockCode": stockcode, + "date": date, + "price": price, + type: "3" + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATA_CN_STOCK_VOLUMN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //股票代码 + var stockcode = func_methods.getFirstValue(arguments[0]); + if(valueIsError(stockcode)){ + return stockcode; + } + + //日期 + var date = null; + + if(arguments[1] != null){ + var data_date = arguments[1]; + + if(getObjType(data_date) == "array"){ + return formula.error.v; + } + else if(getObjType(data_date) == "object" && data_date.startCell != null){ + if(data_date.data != null && getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ + date = update("yyyy-mm-dd", data_date.data.v); + } + else{ + return formula.error.v; + } + } + else{ + date = data_date; + } + + if(!isdatetime(date)){ + return [formula.error.v, "日期错误"]; + } + + date = moment(date).format("YYYY-MM-DD"); + } + + //复权除权 + var price = 0; + if (arguments[2] != null) { + price = func_methods.getFirstValue(arguments[2]); + if(valueIsError(price)){ + return price; + } + } + + if(!isRealNum(price)){ + return formula.error.v; + } + + price = parseInt(price); + + if(price != 0 && price != 1 && price != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/getstockinfo", { + "stockCode": stockcode, + "date": date, + "price": price, + type: "4" + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATA_CN_STOCK_AMOUNT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + + //股票代码 + var stockcode = func_methods.getFirstValue(arguments[0]); + if(valueIsError(stockcode)){ + return stockcode; + } + + //日期 + var date = null; + + if(arguments[1] != null){ + var data_date = arguments[1]; + + if(getObjType(data_date) == "array"){ + return formula.error.v; + } + else if(getObjType(data_date) == "object" && data_date.startCell != null){ + if(data_date.data != null && getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ + date = update("yyyy-mm-dd", data_date.data.v); + } + else{ + return formula.error.v; + } + } + else{ + date = data_date; + } + + if(!isdatetime(date)){ + return [formula.error.v, "日期错误"]; + } + + date = moment(date).format("YYYY-MM-DD"); + } + + //复权除权 + var price = 0; + if (arguments[2] != null) { + price = func_methods.getFirstValue(arguments[2]); + if(valueIsError(price)){ + return price; + } + } + + if(!isRealNum(price)){ + return formula.error.v; + } + + price = parseInt(price); + + if(price != 0 && price != 1 && price != 2){ + return formula.error.v; + } + + $.post("/dataqk/tu/api/getstockinfo", { + "stockCode": stockcode, + "date": date, + "price": price, + type: "5" + }, function(data) { + var d = editor.deepCopyFlowData(Store.flowdata); + formula.execFunctionGroup(cell_r, cell_c, data); + d[cell_r][cell_c] = { + "v": data, + "f": cell_fp + }; + jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); + }); + + return "loading..."; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISDATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //日期 + var date = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(date)){ + return date; + } + + return isdatetime(date); + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMIF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //=SUMIF(A2:A5,">1600000",B2:B5) + //=SUMIF(A2:A5,">1600000") + //=SUMIF(A2:A5,3000000,B2:B5) + //找出range中匹配的字符串 + var sum = 0; + + var rangeData = arguments[0].data; + var rangeRow = arguments[0].rowl; + var rangeCol = arguments[0].coll; + + var criteria = luckysheet_parseData(arguments[1]); + + rangeData = formula.getRangeArray(rangeData)[0]; + + //如果有第三个参数 + if(arguments[2]){ + var sumRangeData = []; + //根据选择的目标的区域确定实际目标区域 + //初始位置 + var sumRangeStart = arguments[2].startCell; + var sumRangeRow = arguments[2].rowl; + var sumRangeCol = arguments[2].coll; + var sumRangeSheet = arguments[2].sheetName; + + if(rangeRow == sumRangeRow && rangeCol == sumRangeCol){ + sumRangeData = arguments[2].data; + } + else{ + var row=[],col=[]; + var sumRangeEnd = ""; + var realSumRange = ""; + //console.log("开始位置!!!",sumRangeStart,typeof(sumRangeStart)); + row[0] = parseInt(sumRangeStart.replace(/[^0-9]/g,"")) - 1; + col[0] = ABCatNum(sumRangeStart.replace(/[^A-Za-z]/g,"")); + + //根据第一个范围的长宽确定目标范围的末尾位置 + row[1] = row[0] + rangeRow - 1; + col[1] = col[0] + rangeCol - 1; + + //console.log(row[0],col[0],row[1],col[1]); + //末尾位置转化为sheet格式:如 F4 + var real_ABC = chatatABC(col[1]); + var real_Num = row[1] + 1; + sumRangeEnd = real_ABC + real_Num; + //console.log("合成新的末尾位置:" + sumRangeEnd); + + realSumRange = sumRangeSheet + "!" +sumRangeStart + ":" + sumRangeEnd; + sumRangeData = luckysheet_getcelldata(realSumRange).data; + //console.log("最终的目标范围:",sumRangeData); + } + + sumRangeData = formula.getRangeArray(sumRangeData)[0]; + + //循环遍历查找匹配项 + for(var i = 0; i < rangeData.length;i++){ + var v = rangeData[i]; + + if(!!v && formula.acompareb(v, criteria)){ + if(!isRealNum(sumRangeData[i])){ + continue; + } + + sum += parseFloat(sumRangeData[i]); + } + } + } + else{ + //循环遍历查找匹配项 + for(var i = 0; i < rangeData.length;i++){ + var v = rangeData[i]; + + if(!!v && formula.acompareb(v, criteria)){ + if(!isRealNum(v)){ + continue; + } + + sum += parseFloat(v); + } + } + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.tan(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TANH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + var e2 = Math.exp(2 * number); + + return (e2 - 1) / (e2 + 1); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CEILING": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //number + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //significance + var significance = func_methods.getFirstValue(arguments[1]); + if(valueIsError(significance)){ + return significance; + } + + if(!isRealNum(significance)){ + return formula.error.v; + } + + significance = parseFloat(significance); + + if(significance == 0){ + return 0; + } + + if(number > 0 && significance < 0){ + return formula.error.nm; + } + + return Math.ceil(number / significance) * significance; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ATAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.atan(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ASINH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.log(number + Math.sqrt(number * number + 1)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ABS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.abs(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ACOS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number < -1 || number > 1){ + return formula.error.nm; + } + + return Math.acos(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ACOSH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number < 1){ + return formula.error.nm; + } + + return Math.log(number + Math.sqrt(number * number - 1)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MULTINOMIAL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + dataArr.push(data); + } + } + + var sum = 0, divisor = 1; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number < 0){ + return formula.error.nm; + } + + sum += number; + divisor *= func_methods.factorial(number); + } + + return func_methods.factorial(sum) / divisor; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ATANH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number <= -1 || number >= 1){ + return formula.error.nm; + } + + return Math.log((1 + number) / (1 - number)) / 2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ATAN2": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要计算其与x轴夹角大小的线段的终点x坐标 + var number_x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number_x)){ + return number_x; + } + + if(!isRealNum(number_x)){ + return formula.error.v; + } + + number_x = parseFloat(number_x); + + //要计算其与x轴夹角大小的线段的终点y坐标 + var number_y = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number_y)){ + return number_y; + } + + if(!isRealNum(number_y)){ + return formula.error.v; + } + + number_y = parseFloat(number_y); + + if(number_x == 0 && number_y == 0){ + return formula.error.d; + } + + return Math.atan2(number_y, number_x); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUNTBLANK": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var data = arguments[0]; + var sum = 0; + + if(getObjType(data) == "object" && data.startCell != null){ + if(data.data == null){ + return 1; + } + + if(getObjType(data.data) == "array"){ + for(var r = 0; r < data.data.length; r++){ + for(var c = 0; c < data.data[r].length; c++){ + if(data.data[r][c] == null || isRealNull(data.data[r][c].v)){ + sum++; + } + } + } + } + else{ + if(isRealNull(data.data.v)){ + sum++; + } + } + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COSH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return (Math.exp(number) + Math.exp(-number)) / 2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "INT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var data = arguments[0]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + if(!isRealNum(data[0][0])){ + return formula.error.v; + } + + return Math.floor(parseFloat(data[0][0])); + } + else{ + if(!isRealNum(data[0])){ + return formula.error.v; + } + + return Math.floor(parseFloat(data[0])); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + if(data.coll > 1){ + return formula.error.v; + } + + if(data.rowl > 1){ + var cellrange = formula.getcellrange(data.startCell); + var str = cellrange.row[0]; + + if(window.luckysheetCurrentRow < str || window.luckysheetCurrentRow > str + data.rowl - 1){ + return formula.error.v; + } + + var cell = data.data[window.luckysheetCurrentRow - str][0]; + } + else{ + var cell = data.data; + } + + if(cell == null || isRealNull(cell.v)){ + return 0; + } + + if(!isRealNum(cell.v)){ + return formula.error.v; + } + + return Math.floor(parseFloat(cell.v)); + } + else{ + if(getObjType(data) == "boolean"){ + if(data.toString().toLowerCase() == "true"){ + return 1; + } + + if(data.toString().toLowerCase() == "false"){ + return 0; + } + } + + if(!isRealNum(data)){ + return formula.error.v; + } + + return Math.floor(parseFloat(data)); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISEVEN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + return Math.abs(number) & 1 ? false : true; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISODD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + return Math.abs(number) & 1 ? true : false; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LCM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var o = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + o = o.concat(func_methods.getDataArr(data)); + } + else{ + o = o.concat(data); + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + o = o.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + o.push(data); + } + } + + for(var y = 0; y < o.length; y++){ + var number = o[y]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + if(number < 0){ + return formula.error.nm; + } + + o[y] = number; + } + + for (var i, j, n, d, r = 1; (n = o.pop()) !== undefined;) { + if(n == 0){ + r = 0; + } + + while (n > 1) { + if (n % 2) { + for (i = 3, j = Math.floor(Math.sqrt(n)); i <= j && n % i; i += 2) { + //empty + } + + d = (i <= j) ? i : n; + } + else { + d = 2; + } + + for (n /= d, r *= d, i = o.length; i; (o[--i] % d) === 0 && (o[i] /= d) === 1 && o.splice(i, 1)) { + //empty + } + } + } + + if(r >= Math.pow(2, 53)){ + return formula.error.nm; + } + + return r; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number <= 0){ + return formula.error.nm; + } + + return Math.log(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOG": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number <= 0){ + return formula.error.nm; + } + + if(arguments.length == 2){ + var base = func_methods.getFirstValue(arguments[1]); + if(valueIsError(base)){ + return base; + } + + if(!isRealNum(base)){ + return formula.error.v; + } + + base = parseFloat(base); + + if(base <= 0){ + return formula.error.nm; + } + } + else{ + var base = 10; + } + + return Math.log(number) / Math.log(base); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOG10": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number <= 0){ + return formula.error.nm; + } + + return Math.log(number) / Math.log(10); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MOD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //被除数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //除数 + var divisor = func_methods.getFirstValue(arguments[1]); + if(valueIsError(divisor)){ + return divisor; + } + + if(!isRealNum(divisor)){ + return formula.error.v; + } + + divisor = parseFloat(divisor); + + if(divisor == 0){ + return formula.error.d; + } + + //计算结果 + var modulus = Math.abs(number % divisor); + return (divisor > 0) ? modulus : -modulus; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MROUND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要舍入的值 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //要舍入到的倍数 + var multiple = func_methods.getFirstValue(arguments[1]); + if(valueIsError(multiple)){ + return multiple; + } + + if(!isRealNum(multiple)){ + return formula.error.v; + } + + multiple = parseFloat(multiple); + + if (number * multiple < 0){ + return formula.error.nm; + } + + //计算结果 + return Math.round(number / multiple) * multiple; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ODD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + var temp = Math.ceil(Math.abs(number)); + temp = (temp & 1) ? temp : temp + 1; + return (number >= 0) ? temp : -temp; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMSQ": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + dataArr.push(data); + } + } + + var sum = 0; + + if(dataArr.length > 0){ + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + sum += number * number; + } + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COMBIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //项目的数量 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + //每一组合中项目的数量 + var number_chosen = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number_chosen)){ + return number_chosen; + } + + if(!isRealNum(number_chosen)){ + return formula.error.v; + } + + number_chosen = parseInt(number_chosen); + + if (number < 0 || number_chosen < 0 || number < number_chosen){ + return formula.error.nm; + } + + //计算结果 + return func_methods.factorial(number) / (func_methods.factorial(number_chosen) * func_methods.factorial(number - number_chosen)) + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUBTOTAL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 1-11 或 101-111,用于指定要为分类汇总使用的函数 + var data_function_num = arguments[0]; + var function_num; + + if(getObjType(data_function_num) == "array"){ + if(getObjType(data_function_num[0]) == "array"){ + if(!func_methods.isDyadicArr(data_function_num)){ + return formula.error.v; + } + + function_num = []; + + for(var i = 0; i < data_function_num.length; i++){ + var rowArr = []; + + for(var j = 0; j < data_function_num[i].length; j++){ + rowArr.push(data_function_num[i][j]); + } + + function_num.push(rowArr); + } + } + else{ + function_num = []; + + for(var i = 0; i < data_function_num.length; i++){ + function_num.push(data_function_num[i]); + } + } + } + else if(getObjType(data_function_num) == "object" && data_function_num.startCell != null){ + function_num = func_methods.getFirstValue(data_function_num); + } + else{ + function_num = data_function_num; + } + + var arr = Array.prototype.slice.apply(arguments); + arr.shift(); + + //计算结果 + if(getObjType(function_num) == "array"){ + var result = []; + + if(getObjType(function_num[0]) == "array"){ + for(var i = 0; i < function_num.length; i++){ + var rowArr = []; + + for(var j = 0; j < function_num[i].length; j++){ + var value = function_num[i][j]; + + if(valueIsError(value)){ + rowArr.push(value); + } + else if(!isRealNum(value)){ + rowArr.push(formula.error.v); + } + else{ + value = parseInt(value); + + if(value < 1 || value > 111 || (value > 11 && value < 101)){ + rowArr.push(formula.error.v); + } + else{ + rowArr.push(compute(value)); + } + } + } + + result.push(rowArr); + } + } + else{ + for(var i = 0; i < function_num.length; i++){ + var value = function_num[i]; + + if(valueIsError(value)){ + result.push(value); + } + else if(!isRealNum(value)){ + result.push(formula.error.v); + } + else{ + value = parseInt(value); + + if(value < 1 || value > 111 || (value > 11 && value < 101)){ + result.push(formula.error.v); + } + else{ + result.push(compute(value)); + } + } + } + } + + return result; + } + else{ + if(valueIsError(function_num)){ + return function_num; + } + + if(!isRealNum(function_num)){ + return formula.error.v; + } + + function_num = parseInt(function_num); + + if(function_num < 1 || function_num > 111 || (function_num > 11 && function_num < 101)){ + return formula.error.v; + } + + return compute(function_num); + } + + function compute(function_num){ + switch(function_num){ + case 1: //AVERAGE + case 101: + return window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, arr); + break; + case 2: //COUNT + case 102: + return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT, arr); + break; + case 3: //COUNTA + case 103: + return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA, arr); + break; + case 4: //MAX + case 104: + return window.luckysheet_function.MAX.f.apply(window.luckysheet_function.MAX, arr); + break; + case 5: //MIN + case 105: + return window.luckysheet_function.MIN.f.apply(window.luckysheet_function.MIN, arr); + break; + case 6: //PRODUCT + case 106: + return window.luckysheet_function.PRODUCT.f.apply(window.luckysheet_function.PRODUCT, arr); + break; + case 7: //STDEV + case 107: + return window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA, arr); + break; + case 8: //STDEVP + case 108: + return window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP, arr); + break; + case 9: //SUM + case 109: + return window.luckysheet_function.SUM.f.apply(window.luckysheet_function.SUM, arr); + break; + case 10: //VAR + case 110: + return window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S, arr); + break; + case 11: //VARP + case 111: + return window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P, arr); + break; + } + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ASIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number < -1 || number > 1){ + return formula.error.nm; + } + + return Math.asin(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUNTIF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //范围 + var data_range = arguments[0]; + var range; + + if(getObjType(data_range) == "object" && data_range.startCell != null){ + range = data_range.data; + } + else{ + return formula.error.v; + } + + //条件 + var data_criteria = arguments[1]; + var criteria; + + if(getObjType(data_criteria) == "array"){ + criteria = []; + + if(getObjType(data_criteria[0]) == "array"){ + if(!func_methods.isDyadicArr(data_criteria)){ + return formula.error.v; + } + + for(var i = 0; i < data_criteria.length; i++){ + var rowArr = []; + + for(var j = 0; j < data_criteria[i].length; j++){ + rowArr.push(data_criteria[i][j]); + } + + criteria.push(rowArr); + } + } + else{ + for(var i = 0; i < data_criteria.length; i++){ + criteria.push(data_criteria[i]); + } + } + } + else if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.rowl > 1 || data_criteria.coll > 1){ + return 0; + } + + criteria = data_criteria.data; + } + else{ + criteria = data_criteria; + } + + //计算 + if(getObjType(criteria) == "array"){ + var result = []; + + if(getObjType(criteria[0]) == "array"){ + for(var i = 0; i < criteria.length; i++){ + var rowArr = []; + + for(var j = 0; j < criteria[i].length; j++){ + rowArr.push(getCriteriaResult(range, criteria[i][j])); + } + + result.push(rowArr); + } + } + else{ + for(var i = 0; i < criteria.length; i++){ + result.push(getCriteriaResult(range, criteria[i])); + } + } + + return result; + } + else{ + return getCriteriaResult(range, criteria); + } + + function getCriteriaResult(range, criter){ + if (!/[<>=!*?]/.test(criter)) { + criter = '=="' + criter + '"'; + } + + criter = criter.replace("<>", "!="); + + var matches = 0; + + if(getObjType(range) == "array"){ + for (var i = 0; i < range.length; i++) { + for(var j = 0; j < range[i].length; j++){ + if(range[i][j] != null && !isRealNull(range[i][j].v)){ + var value = range[i][j].v; + + if(criter.indexOf("*") > -1 || criter.indexOf("?") > -1){ + if(formula.isWildcard(value, criter)){ + matches++; + } + } + else{ + if (typeof value !== 'string') { + if (eval(value + criter)) { + matches++; + } + } + else { + if (eval('"' + value + '"' + criter)) { + matches++; + } + } + } + } + } + } + } + else{ + if(range != null && !isRealNull(range.v)){ + var value = range.v; + + if(criter.indexOf("*") > -1 || criter.indexOf("?") > -1){ + if(formula.isWildcard(value, criter)){ + matches++; + } + } + else{ + if (typeof value !== 'string') { + if (eval(value + criter)) { + matches++; + } + } + else { + if (eval('"' + value + '"' + criter)) { + matches++; + } + } + } + } + } + + return matches; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RADIANS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return number * Math.PI / 180; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RAND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + try { + return Math.floor(Math.random() * 1000000000) / 1000000000; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUNTUNIQUE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + dataArr.push(data); + } + } + + return window.luckysheet_function.UNIQUE.f(dataArr); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DEGREES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return number * 180 / Math.PI; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ERFC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return jStat.erfc(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EVEN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + var temp = Math.ceil(Math.abs(number)); + temp = (temp & 1) ? temp + 1 : temp; + return (number > 0) ? temp : -temp; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EXP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.exp(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FACT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + if(getObjType(number) == "boolean"){ + if(number.toString().toLowerCase() == "true"){ + number = 1; + } + else if(number.toString().toLowerCase() == "false"){ + number = 0; + } + } + else{ + return formula.error.v; + } + } + + number = parseInt(number); + + if(number < 0){ + return formula.error.nm; + } + + return func_methods.factorial(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FACTDOUBLE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + if(getObjType(number) == "boolean"){ + if(number.toString().toLowerCase() == "true"){ + number = 1; + } + else if(number.toString().toLowerCase() == "false"){ + number = 0; + } + } + else{ + return formula.error.v; + } + } + + number = parseInt(number); + + if(number < 0){ + return formula.error.nm; + } + + return func_methods.factorialDouble(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PI": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + try { + return Math.PI; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FLOOR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //number + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //significance + var significance = func_methods.getFirstValue(arguments[1]); + if(valueIsError(significance)){ + return significance; + } + + if(!isRealNum(significance)){ + return formula.error.v; + } + + significance = parseFloat(significance); + + if(significance == 0){ + return formula.error.d; + } + + if(number > 0 && significance < 0){ + return formula.error.nm; + } + + //计算 + var precision = -Math.floor(Math.log(Math.abs(significance)) / Math.log(10)); + + if (number >= 0) { + return (Math.floor(number / significance) * significance) * Math.pow(10, precision) / Math.pow(10, precision); + } + else { + return -((Math.ceil(Math.abs(number) / significance) * significance) * Math.pow(10, precision)) / Math.pow(10, precision); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GCD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", false)); + } + else{ + dataArr.push(data); + } + } + + if(!isRealNum(dataArr[0])){ + return formula.error.v; + } + + var x = parseInt(dataArr[0]); + + if(x < 0 || x >= Math.pow(2, 53)){ + return formula.error.nm; + } + + for (var i = 1; i < dataArr.length; i++) { + var y = dataArr[i]; + + if(!isRealNum(y)){ + return formula.error.v; + } + + y = parseInt(y); + + if(y < 0 || y >= Math.pow(2, 53)){ + return formula.error.nm; + } + + while (x && y) { + if (x > y) { + x %= y; + } + else { + y %= x; + } + } + + x += y; + } + + return x; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RANDBETWEEN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //下界 + var bottom = func_methods.getFirstValue(arguments[0]); + if(valueIsError(bottom)){ + return bottom; + } + + if(!isRealNum(bottom)){ + return formula.error.v; + } + + bottom = parseInt(bottom); + + //上界 + var top = func_methods.getFirstValue(arguments[1]); + if(valueIsError(top)){ + return top; + } + + if(!isRealNum(top)){ + return formula.error.v; + } + + top = parseInt(top); + + if(bottom > top){ + return formula.error.nm; + } + + //计算 + return bottom + Math.ceil((top - bottom + 1) * Math.random()) - 1; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ROUND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //四舍五入的数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //位数 + var digits = func_methods.getFirstValue(arguments[1]); + if(valueIsError(digits)){ + return digits; + } + + if(!isRealNum(digits)){ + return formula.error.v; + } + + digits = parseInt(digits); + + //计算 + var sign = (number > 0) ? 1 : -1; + return sign * (Math.round(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ROUNDDOWN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //四舍五入的数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //位数 + var digits = func_methods.getFirstValue(arguments[1]); + if(valueIsError(digits)){ + return digits; + } + + if(!isRealNum(digits)){ + return formula.error.v; + } + + digits = parseInt(digits); + + //计算 + var sign = (number > 0) ? 1 : -1; + return sign * (Math.floor(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ROUNDUP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //四舍五入的数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //位数 + var digits = func_methods.getFirstValue(arguments[1]); + if(valueIsError(digits)){ + return digits; + } + + if(!isRealNum(digits)){ + return formula.error.v; + } + + digits = parseInt(digits); + + //计算 + var sign = (number > 0) ? 1 : -1; + return sign * (Math.ceil(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SERIESSUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //幂级数的输入值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //x 的首项乘幂 + var n = func_methods.getFirstValue(arguments[1]); + if(valueIsError(n)){ + return n; + } + + if(!isRealNum(n)){ + return formula.error.v; + } + + n = parseFloat(n); + + //级数中每一项的乘幂 n 的步长增加值 + var m = func_methods.getFirstValue(arguments[2]); + if(valueIsError(m)){ + return m; + } + + if(!isRealNum(m)){ + return formula.error.v; + } + + m = parseFloat(m); + + //与 x 的每个连续乘幂相乘的一组系数 + var data_coefficients = arguments[3]; + var coefficients = []; + + if(getObjType(data_coefficients) == "array"){ + if(getObjType(data_coefficients[0]) == "array" && !func_methods.isDyadicArr(data_coefficients)){ + return formula.error.v; + } + + coefficients = coefficients.concat(func_methods.getDataArr(data_coefficients, false)); + } + else if(getObjType(data_coefficients) == "object" && data_coefficients.startCell != null){ + coefficients = coefficients.concat(func_methods.getCellDataArr(data_coefficients, "number", false)); + } + else{ + coefficients.push(data_coefficients); + } + + //计算 + if(!isRealNum(coefficients[0])){ + return formula.error.v; + } + + var result = parseFloat(coefficients[0]) * Math.pow(x, n); + + for (var i = 1; i < coefficients.length; i++) { + var number = coefficients[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + result += number * Math.pow(x, n + i * m); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SIGN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number > 0){ + return 1; + } + else if(number == 0){ + return 0; + } + else if(number < 0){ + return -1; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.sin(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SINH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return (Math.exp(number) - Math.exp(-number)) / 2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SQRT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number < 0){ + return formula.error.nm; + } + + return Math.sqrt(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SQRTPI": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number < 0){ + return formula.error.nm; + } + + return Math.sqrt(number * Math.PI); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GAMMALN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number <= 0){ + return formula.error.nm; + } + + return jStat.gammaln(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + return Math.cos(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TRUNC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要截取的数据 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //位数 + if(arguments.length == 2){ + var digits = func_methods.getFirstValue(arguments[1]); + if(valueIsError(digits)){ + return digits; + } + + if(!isRealNum(digits)){ + return formula.error.v; + } + + digits = parseInt(digits); + } + else{ + var digits = 0; + } + + //计算 + var sign = (number > 0) ? 1 : -1; + return sign * (Math.floor(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "QUOTIENT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //被除数 + var numerator = func_methods.getFirstValue(arguments[0]); + if(valueIsError(numerator)){ + return numerator; + } + + if(!isRealNum(numerator)){ + return formula.error.v; + } + + numerator = parseFloat(numerator); + + //除数 + var denominator = func_methods.getFirstValue(arguments[1]); + if(valueIsError(denominator)){ + return denominator; + } + + if(!isRealNum(denominator)){ + return formula.error.v; + } + + denominator = parseFloat(denominator); + + if(denominator == 0){ + return formula.error.d; + } + + //计算 + return parseInt(numerator / denominator, 10); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "POWER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //底数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //指数 + var power = func_methods.getFirstValue(arguments[1]); + if(valueIsError(power)){ + return power; + } + + if(!isRealNum(power)){ + return formula.error.v; + } + + power = parseFloat(power); + + if(number == 0 && power == 0){ + return formula.error.nm; + } + + if(number < 0 && power.toString().indexOf(".") > -1){ + return formula.error.nm; + } + + return Math.pow(number, power); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMIFS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var sum = 0; + var args = arguments; + luckysheet_getValue(args); + var rangeData = formula.getRangeArray(args[0])[0]; + var results = new Array(rangeData.length); + + for(var i = 0;i < results.length; i++){ + results[i] = true; + } + + for(var i = 1; i < args.length; i += 2){ + var range = formula.getRangeArray(args[i])[0]; + var criteria = args[i+1]; + for(var j = 0; j < range.length; j++){ + var v = range[j]; + results[j] = results[j] && (!!v) && formula.acompareb(v,criteria); + } + } + + for(var i = 0; i < rangeData.length; i++){ + if(results[i]){ + sum += parseFloat(rangeData[i]); + } + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUNTIFS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var args = arguments; + luckysheet_getValue(args); + var results = new Array(formula.getRangeArray(args[0])[0].length); + for(var i = 0;i < results.length; i++){ + results[i] = true; + } + for(var i = 0; i < args.length; i += 2){ + var range = formula.getRangeArray(args[i])[0]; + var criteria = args[i+1]; + for(var j = 0; j < range.length; j++){ + var v = range[j]; + results[j] = results[j] && (!!v) && formula.acompareb(v,criteria); + } + } + var result = 0; + for(var i = 0; i < results.length; i++){ + if(results[i]){ + result++; + } + } + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PRODUCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + dataArr.push(data); + } + } + + var result = 1; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + result *= number; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HARMEAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + dataArr.push(data); + } + } + + var den = 0, len = 0; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + if(number <= 0){ + return formula.error.nm; + } + + den += 1 / number; + len++; + } + + return len / den; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HYPGEOMDIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //样本中成功的次数 + var sample_s = func_methods.getFirstValue(arguments[0]); + if(valueIsError(sample_s)){ + return sample_s; + } + + if(!isRealNum(sample_s)){ + return formula.error.v; + } + + sample_s = parseInt(sample_s); + + //样本量 + var number_sample = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number_sample)){ + return number_sample; + } + + if(!isRealNum(number_sample)){ + return formula.error.v; + } + + number_sample = parseInt(number_sample); + + //总体中成功的次数 + var population_s = func_methods.getFirstValue(arguments[2]); + if(valueIsError(population_s)){ + return population_s; + } + + if(!isRealNum(population_s)){ + return formula.error.v; + } + + population_s = parseInt(population_s); + + //总体大小 + var number_pop = func_methods.getFirstValue(arguments[3]); + if(valueIsError(number_pop)){ + return number_pop; + } + + if(!isRealNum(number_pop)){ + return formula.error.v; + } + + number_pop = parseInt(number_pop); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[4]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(sample_s < 0 || sample_s > Math.min(number_sample, population_s) || sample_s < Math.max(0, number_sample - number_pop + population_s)){ + return formula.error.nm; + } + + if(number_sample <= 0 || number_sample > number_pop){ + return formula.error.nm; + } + + if(population_s <= 0 || population_s > number_pop){ + return formula.error.nm; + } + + if(number_pop <= 0){ + return formula.error.nm; + } + + //计算 + function pdf(x, n, M, N) { + var a = func_methods.factorial(M) / (func_methods.factorial(x) * func_methods.factorial(M - x)); + var b = func_methods.factorial(N - M) / (func_methods.factorial(n - x) * func_methods.factorial(N - M - n + x)); + var c = func_methods.factorial(N) / (func_methods.factorial(n) * func_methods.factorial(N - n)); + + return a * b / c; + } + + function cdf(x, n, M, N) { + var sum = 0; + + for (var i = 0; i <= x; i++) { + sum += pdf(i, n, M, N); + } + + return sum; + } + + return (cumulative) ? cdf(sample_s, number_sample, population_s, number_pop) : pdf(sample_s, number_sample, population_s, number_pop); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "INTERCEPT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //x轴上用于预测的值 + var x = 0; + + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[0]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + known_y.push(data_known_y); + } + + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[1]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + known_x.push(data_known_x); + } + + if(known_y.length != known_x.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_y = [], data_x = []; + + for(var i = 0; i < known_y.length; i++){ + var num_y = known_y[i]; + var num_x = known_x[i]; + + if(isRealNum(num_y) && isRealNum(num_x)){ + data_y.push(parseFloat(num_y)); + data_x.push(parseFloat(num_x)); + } + } + + if(func_methods.variance_s(data_x) == 0){ + return formula.error.d; + } + + //计算 + var xmean = jStat.mean(data_x); + var ymean = jStat.mean(data_y); + + var n = data_x.length; + var num = 0; + var den = 0; + + for (var i = 0; i < n; i++) { + num += (data_x[i] - xmean) * (data_y[i] - ymean); + den += Math.pow(data_x[i] - xmean, 2); + } + + var b = num / den; + var a = ymean - b * xmean; + + return a + b * x; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "KURT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + dataArr.push(data); + } + } + + //剔除不是数值类型的值 + var dataArr_n = []; + + for(var j = 0; j < dataArr.length; j++){ + var number = dataArr[j]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + dataArr_n.push(number); + } + + if(dataArr_n.length < 4 || func_methods.standardDeviation_s(dataArr_n) == 0){ + return formula.error.d; + } + + //计算 + var mean = jStat.mean(dataArr_n); + var n = dataArr_n.length; + + var sigma = 0; + + for (var i = 0; i < n; i++) { + sigma += Math.pow(dataArr_n[i] - mean, 4); + } + + sigma = sigma / Math.pow(jStat.stdev(dataArr_n, true), 4); + + return ((n * (n + 1)) / ((n - 1) * (n - 2) * (n - 3))) * sigma - 3 * (n - 1) * (n - 1) / ((n - 2) * (n - 3)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LARGE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数组或范围 + var dataArr = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(arguments[0], true)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(arguments[0], "text", true)); + } + else{ + dataArr.push(arguments[0]); + } + + var dataArr_n = []; + + for(var j = 0; j < dataArr.length; j++){ + var number = dataArr[j]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number) + + dataArr_n.push(number); + } + + //要返回的元素的排行位置 + var n; + + if(getObjType(arguments[1]) == "array"){ + if(getObjType(arguments[1][0]) == "array" && !func_methods.isDyadicArr(arguments[1])){ + return formula.error.v; + } + + n = func_methods.getDataArr(arguments[1]); + } + else if(getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ + if(arguments[1].rowl > 1 || arguments[1].coll > 1){ + return formula.error.v; + } + + var cell = arguments[1].data; + + if(cell == null || isRealNull(cell.v)){ + var n = 0; + } + else{ + var n = cell.v; + } + } + else{ + n = arguments[1]; + } + + //计算 + if(getObjType(n) == "array"){ + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + var result = []; + + for(var i = 0; i < n.length; i++){ + if(!isRealNum(n[i])){ + result.push(formula.error.v); + continue; + } + + n[i] = Math.ceil(parseFloat(n[i])); + + if(n[i] <= 0 || n[i] > dataArr_n.length){ + result.push(formula.error.nm); + continue; + } + + result.push(dataArr.sort(function(a, b) { return b - a; })[n[i] - 1]); + } + + return result; + } + else{ + if(!isRealNum(n)){ + return formula.error.v; + } + + n = Math.ceil(parseFloat(n)); + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + if(n <= 0 || n > dataArr_n.length){ + return formula.error.nm; + } + + return dataArr.sort(function(a, b) { + return b - a; + })[n - 1]; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STDEVA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", false)); + } + else{ + dataArr.push(data); + } + } + + //不是数值类型的值转化成数字(true为1,false和文本为0) + var dataArr_n = []; + + for(var j = 0; j < dataArr.length; j++){ + var number = dataArr[j]; + + if(!isRealNum(number)){ + if(number.toString().toLowerCase() == "true"){ + number = 1; + } + else{ + number = 0; + } + } + else{ + number = parseFloat(number); + } + + dataArr_n.push(number); + } + + if(dataArr_n.length == 0){ + return 0; + } + + if(dataArr_n.length == 1){ + return formula.error.d; + } + + return func_methods.standardDeviation_s(dataArr_n); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STDEVP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + dataArr.push(data); + } + } + + //剔除不是数值类型的值 + var dataArr_n = []; + + for(var j = 0; j < dataArr.length; j++){ + var number = dataArr[j]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + dataArr_n.push(number); + } + + if(dataArr_n.length == 0){ + return 0; + } + + if(dataArr_n.length == 1){ + return formula.error.d; + } + + return func_methods.standardDeviation(dataArr_n); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GEOMEAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", true)); + } + else{ + if(getObjType(data) == "boolean"){ + if(data.toString().toLowerCase() == "true"){ + dataArr.push(1); + } + else if(data.toString().toLowerCase() == "false"){ + dataArr.push(0); + } + } + else if(isRealNum(data)){ + dataArr.push(data); + } + else{ + return formula.error.v; + } + } + } + + //剔除不是数值类型的值 + var dataArr_n = []; + + for(var j = 0; j < dataArr.length; j++){ + var number = dataArr[j]; + + if(!isRealNum(number)){ + continue; + } + + number = parseFloat(number); + + if(number <= 0){ + return formula.error.nm; + } + + dataArr_n.push(number); + } + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + return jStat.geomean(dataArr_n); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RANK_EQ": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要确定其排名的值 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //包含相关数据集的数组或范围 + var data_ref = arguments[1]; + var ref = []; + + if(getObjType(data_ref) == "array"){ + if(getObjType(data_ref[0]) == "array" && !func_methods.isDyadicArr(data_ref)){ + return formula.error.v; + } + + ref = ref.concat(func_methods.getDataArr(data_ref, true)); + } + else if(getObjType(data_ref) == "object" && data_ref.startCell != null){ + ref = ref.concat(func_methods.getCellDataArr(data_ref, "number", true)); + } + else{ + ref.push(data_ref); + } + + var ref_n = []; + + for(var j = 0; j < ref.length; j++){ + var num = ref[j]; + + if(!isRealNum(num)){ + return formula.error.v; + } + + num = parseFloat(num); + + ref_n.push(num); + } + + //要按升序还是按降序考虑“data”中的值 + if(arguments.length == 3){ + var order = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(order)){ + return order; + } + } + else{ + var order = false; + } + + //计算 + var sort = (order) ? function(a, b) { + return a - b; + } : function(a, b) { + return b - a; + }; + + ref_n = ref_n.sort(sort); + + var index = ref_n.indexOf(number); + + if(index == -1){ + return formula.error.na; + } + else{ + return index + 1; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RANK_AVG": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要确定其排名的值 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //包含相关数据集的数组或范围 + var data_ref = arguments[1]; + var ref = []; + + if(getObjType(data_ref) == "array"){ + if(getObjType(data_ref[0]) == "array" && !func_methods.isDyadicArr(data_ref)){ + return formula.error.v; + } + + ref = ref.concat(func_methods.getDataArr(data_ref, true)); + } + else if(getObjType(data_ref) == "object" && data_ref.startCell != null){ + ref = ref.concat(func_methods.getCellDataArr(data_ref, "number", true)); + } + else{ + ref.push(data_ref); + } + + var ref_n = []; + + for(var j = 0; j < ref.length; j++){ + var num = ref[j]; + + if(!isRealNum(num)){ + return formula.error.v; + } + + num = parseFloat(num); + + ref_n.push(num); + } + + //要按升序还是按降序考虑“data”中的值 + if(arguments.length == 3){ + var order = func_methods.getFirstValue(arguments[2]); + + if(valueIsError(order)){ + return order; + } + + if(getObjType(order) == "boolean"){ + + } + else if(getObjType(order) == "string" && (order.toLowerCase() == "true" || order.toLowerCase() == "false")){ + if(order.toLowerCase() == "true"){ + order = true; + } + + if(order.toLowerCase() == "false"){ + order = false; + } + } + else if(isRealNum(order)){ + order = parseFloat(order); + + order = order == 0 ? false : true; + } + else{ + return formula.error.v; + } + } + else{ + var order = false; + } + + //计算 + var sort = (order) ? function(a, b) { + return a - b; + } : function(a, b) { + return b - a; + }; + + ref_n = ref_n.sort(sort); + + var count = 0; + for (var i = 0; i < ref_n.length; i++) { + if (ref_n[i] == number) { + count++; + } + } + + return (count > 1) ? (2 * ref_n.indexOf(number) + count + 1) / 2 : ref_n.indexOf(number) + 1; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PERCENTRANK_EXC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //包含相关数据集的数组或范围 + var data_ref = arguments[0]; + var ref = []; + + if(getObjType(data_ref) == "array"){ + if(getObjType(data_ref[0]) == "array" && !func_methods.isDyadicArr(data_ref)){ + return formula.error.v; + } + + ref = ref.concat(func_methods.getDataArr(data_ref, true)); + } + else if(getObjType(data_ref) == "object" && data_ref.startCell != null){ + ref = ref.concat(func_methods.getCellDataArr(data_ref, "number", true)); + } + else{ + ref.push(data_ref); + } + + var ref_n = []; + + for(var j = 0; j < ref.length; j++){ + var number = ref[j]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + ref_n.push(number); + } + + //要确定其百分比排位的值 + var x = func_methods.getFirstValue(arguments[1]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //要在计算中使用的有效位数 + if(arguments.length == 3){ + var significance = func_methods.getFirstValue(arguments[2]); + if(valueIsError(significance)){ + return significance; + } + + if(!isRealNum(significance)){ + return formula.error.v; + } + + significance = parseInt(significance); + } + else{ + var significance = 3; + } + + if(ref_n.length == 0){ + return formula.error.nm; + } + + if(significance < 1){ + return formula.error.nm; + } + + //计算 + if(ref_n.length == 1 && ref_n[0] == x){ + return 1; + } + + ref_n = ref_n.sort(function(a, b) { + return a - b; + }); + var uniques = window.luckysheet_function.UNIQUE.f(ref_n)[0]; + + var n = ref_n.length; + var m = uniques.length; + + var power = Math.pow(10, significance); + var result = 0; + var match = false; + var i = 0; + + while (!match && i < m) { + if (x === uniques[i]) { + result = (ref_n.indexOf(uniques[i]) + 1) / (n + 1); + match = true; + } + else if (x >= uniques[i] && (x < uniques[i + 1] || i === m - 1)) { + result = (ref_n.lastIndexOf(uniques[i]) + 1 + (x - uniques[i]) / (uniques[i + 1] - uniques[i])) / (n + 1); + match = true; + } + + i++; + } + + if(isNaN(result)){ + return formula.error.na; + } + else{ + return Math.floor(result * power) / power; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PERCENTRANK_INC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //包含相关数据集的数组或范围 + var data_ref = arguments[0]; + var ref = []; + + if(getObjType(data_ref) == "array"){ + if(getObjType(data_ref[0]) == "array" && !func_methods.isDyadicArr(data_ref)){ + return formula.error.v; + } + + ref = ref.concat(func_methods.getDataArr(data_ref, true)); + } + else if(getObjType(data_ref) == "object" && data_ref.startCell != null){ + ref = ref.concat(func_methods.getCellDataArr(data_ref, "number", true)); + } + else{ + ref.push(data_ref); + } + + var ref_n = []; + + for(var j = 0; j < ref.length; j++){ + var number = ref[j]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + ref_n.push(number); + } + + //要确定其百分比排位的值 + var x = func_methods.getFirstValue(arguments[1]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //要在计算中使用的有效位数 + if(arguments.length == 3){ + var significance = func_methods.getFirstValue(arguments[2]); + if(valueIsError(significance)){ + return significance; + } + + if(!isRealNum(significance)){ + return formula.error.v; + } + + significance = parseInt(significance); + } + else{ + var significance = 3; + } + + if(ref_n.length == 0){ + return formula.error.nm; + } + + if(significance < 1){ + return formula.error.nm; + } + + //计算 + if(ref_n.length == 1 && ref_n[0] == x){ + return 1; + } + + ref_n = ref_n.sort(function(a, b) { + return a - b; + }); + var uniques = window.luckysheet_function.UNIQUE.f(ref_n)[0]; + + var n = ref_n.length; + var m = uniques.length; + + var power = Math.pow(10, significance); + var result = 0; + var match = false; + var i = 0; + + while (!match && i < m) { + if (x === uniques[i]) { + result = ref_n.indexOf(uniques[i]) / (n - 1); + match = true; + } + else if (x >= uniques[i] && (x < uniques[i + 1] || i === m - 1)) { + result = (ref_n.lastIndexOf(uniques[i]) + (x - uniques[i]) / (uniques[i + 1] - uniques[i])) / (n - 1); + match = true; + } + + i++; + } + + if(isNaN(result)){ + return formula.error.na; + } + else{ + return Math.floor(result * power) / power; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FORECAST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //x轴上用于预测的值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[1]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + known_y.push(data_known_y); + } + + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[2]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + known_x.push(data_known_x); + } + + if(known_y.length != known_x.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_y = [], data_x = []; + + for(var i = 0; i < known_y.length; i++){ + var num_y = known_y[i]; + var num_x = known_x[i]; + + if(isRealNum(num_y) && isRealNum(num_x)){ + data_y.push(parseFloat(num_y)); + data_x.push(parseFloat(num_x)); + } + } + + if(func_methods.variance_s(data_x) == 0){ + return formula.error.d; + } + + //计算 + var xmean = jStat.mean(data_x); + var ymean = jStat.mean(data_y); + + var n = data_x.length; + var num = 0; + var den = 0; + + for (var i = 0; i < n; i++) { + num += (data_x[i] - xmean) * (data_y[i] - ymean); + den += Math.pow(data_x[i] - xmean, 2); + } + + var b = num / den; + var a = ymean - b * xmean; + + return a + b * x; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FISHERINV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var y = func_methods.getFirstValue(arguments[0]); + if(valueIsError(y)){ + return y; + } + + if(!isRealNum(y)){ + return formula.error.v; + } + + y = parseFloat(y); + + var e2y = Math.exp(2 * y); + + return (e2y - 1) / (e2y + 1); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FISHER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + if(x <= -1 || x >= 1){ + return formula.error.nm; + } + + return Math.log((1 + x) / (1 - x)) / 2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MODE_SNGL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + var count = {}; + var maxItems = []; + var max = 0; + var currentItem; + + for (var i = 0; i < dataArr_n.length; i++) { + currentItem = dataArr_n[i]; + count[currentItem] = count[currentItem] ? count[currentItem] + 1 : 1; + + if (count[currentItem] > max) { + max = count[currentItem]; + maxItems = []; + } + + if (count[currentItem] == max) { + maxItems[maxItems.length] = currentItem; + } + } + + if(max <= 1){ + return formula.error.na; + } + + var resultIndex = dataArr_n.indexOf(maxItems[0]); + + for(var j = 0; j < maxItems.length; j++){ + var index = dataArr_n.indexOf(maxItems[j]); + + if(index < resultIndex){ + resultIndex = index; + } + } + + return dataArr_n[resultIndex]; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "WEIBULL_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //WEIBULL 分布函数的输入值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //Weibull 分布函数的形状参数 + var alpha = func_methods.getFirstValue(arguments[1]); + if(valueIsError(alpha)){ + return alpha; + } + + if(!isRealNum(alpha)){ + return formula.error.v; + } + + alpha = parseFloat(alpha); + + //Weibull 分布函数的尺度参数 + var beta = func_methods.getFirstValue(arguments[2]); + if(valueIsError(beta)){ + return beta; + } + + if(!isRealNum(beta)){ + return formula.error.v; + } + + beta = parseFloat(beta); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(x < 0 || alpha <= 0 || beta <= 0){ + return formula.error.nm; + } + + return (cumulative) ? 1 - Math.exp(-Math.pow(x / beta, alpha)) : Math.pow(x, alpha - 1) * Math.exp(-Math.pow(x / beta, alpha)) * alpha / Math.pow(beta, alpha); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AVEDEV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + return jStat.sum(jStat(dataArr_n).subtract(jStat.mean(dataArr_n)).abs()[0]) / dataArr_n.length; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AVERAGEA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(number.toString.toLowerCase() == "true"){ + dataArr.push(1); + } + else if(number.toString.toLowerCase() == "false"){ + dataArr.push(0); + } + else if(isRealNum(data)){ + dataArr.push(data); + } + else{ + return formula.error.v; + } + } + } + + var sum = 0, + count = 0; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + sum += parseFloat(number); + } + else{ + if(number.toString().toLowerCase() == "true"){ + sum += 1; + } + else{ + sum += 0; + } + } + + count++; + } + + if(count == 0){ + return formula.error.d; + } + + return sum / count; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BINOM_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //试验的成功次数 + var number_s = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number_s)){ + return number_s; + } + + if(!isRealNum(number_s)){ + return formula.error.v; + } + + number_s = parseInt(number_s); + + //独立检验的次数 + var trials = func_methods.getFirstValue(arguments[1]); + if(valueIsError(trials)){ + return trials; + } + + if(!isRealNum(trials)){ + return formula.error.v; + } + + trials = parseInt(trials); + + //任一给定检验的成功概率 + var probability_s = func_methods.getFirstValue(arguments[2]); + if(valueIsError(probability_s)){ + return probability_s; + } + + if(!isRealNum(probability_s)){ + return formula.error.v; + } + + probability_s = parseFloat(probability_s); + + //是否使用二项式累积分布 + var cumulative = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(number_s < 0 || number_s > trials){ + return formula.error.nm; + } + + if(probability_s < 0 || probability_s > 1){ + return formula.error.nm; + } + + return (cumulative) ? jStat.binomial.cdf(number_s, trials, probability_s) : jStat.binomial.pdf(number_s, trials, probability_s); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BINOM_INV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //贝努利试验次数 + var trials = func_methods.getFirstValue(arguments[0]); + if(valueIsError(trials)){ + return trials; + } + + if(!isRealNum(trials)){ + return formula.error.v; + } + + trials = parseInt(trials); + + //任一次给定检验的成功概率 + var probability_s = func_methods.getFirstValue(arguments[1]); + if(valueIsError(probability_s)){ + return probability_s; + } + + if(!isRealNum(probability_s)){ + return formula.error.v; + } + + probability_s = parseFloat(probability_s); + + //期望的临界概率 + var alpha = func_methods.getFirstValue(arguments[2]); + if(valueIsError(alpha)){ + return alpha; + } + + if(!isRealNum(alpha)){ + return formula.error.v; + } + + alpha = parseFloat(alpha); + + if(trials < 0){ + return formula.error.nm; + } + + if(probability_s < 0 || probability_s > 1){ + return formula.error.nm; + } + + if(alpha < 0 || alpha > 1){ + return formula.error.nm; + } + + //计算 + var x = 0; + while (x <= trials) { + if (jStat.binomial.cdf(x, trials, probability_s) >= alpha) { + return x; + } + + x++; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CONFIDENCE_NORM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //置信水平 + var alpha = func_methods.getFirstValue(arguments[0]); + if(valueIsError(alpha)){ + return alpha; + } + + if(!isRealNum(alpha)){ + return formula.error.v; + } + + alpha = parseFloat(alpha); + + //数据区域的总体标准偏差 + var standard_dev = func_methods.getFirstValue(arguments[1]); + if(valueIsError(standard_dev)){ + return standard_dev; + } + + if(!isRealNum(standard_dev)){ + return formula.error.v; + } + + standard_dev = parseFloat(standard_dev); + + //样本总量的大小 + var size = func_methods.getFirstValue(arguments[2]); + if(valueIsError(size)){ + return size; + } + + if(!isRealNum(size)){ + return formula.error.v; + } + + size = parseInt(size); + + if(alpha <= 0 || alpha >= 1){ + return formula.error.nm; + } + + if(standard_dev <= 0){ + return formula.error.nm; + } + + if(size < 1){ + return formula.error.nm; + } + + return jStat.normalci(1, alpha, standard_dev, size)[1] - 1; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CORREL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[0]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + known_y.push(data_known_y); + } + + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[1]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + known_x.push(data_known_x); + } + + if(known_y.length != known_x.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_y = [], data_x = []; + + for(var i = 0; i < known_y.length; i++){ + var num_y = known_y[i]; + var num_x = known_x[i]; + + if(isRealNum(num_y) && isRealNum(num_x)){ + data_y.push(parseFloat(num_y)); + data_x.push(parseFloat(num_x)); + } + } + + if(data_y.length == 0 || data_x.length == 0 || func_methods.standardDeviation(data_y) == 0 || func_methods.standardDeviation(data_x) == 0){ + return formula.error.d; + } + + return jStat.corrcoeff(data_y, data_x); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COVARIANCE_P": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[0]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + known_x.push(data_known_x); + } + + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[1]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + known_y.push(data_known_y); + } + + if(known_x.length != known_y.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_x = [], data_y = []; + + for(var i = 0; i < known_x.length; i++){ + var num_x = known_x[i]; + var num_y = known_y[i]; + + if(isRealNum(num_x) && isRealNum(num_y)){ + data_x.push(parseFloat(num_x)); + data_y.push(parseFloat(num_y)); + } + } + + if(data_x.length == 0 || data_y.length == 0){ + return formula.error.d; + } + + //计算 + var mean1 = jStat.mean(data_x); + var mean2 = jStat.mean(data_y); + + var result = 0; + + for (var i = 0; i < data_x.length; i++) { + result += (data_x[i] - mean1) * (data_y[i] - mean2); + } + + result = result / data_x.length; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COVARIANCE_S": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[0]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + known_x.push(data_known_x); + } + + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[1]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + known_y.push(data_known_y); + } + + if(known_x.length != known_y.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_x = [], data_y = []; + + for(var i = 0; i < known_x.length; i++){ + var num_x = known_x[i]; + var num_y = known_y[i]; + + if(isRealNum(num_x) && isRealNum(num_y)){ + data_x.push(parseFloat(num_x)); + data_y.push(parseFloat(num_y)); + } + } + + if(data_x.length == 0 || data_y.length == 0){ + return formula.error.d; + } + + return jStat.covariance(data_x, data_y); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DEVSQ": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + if(getObjType(data) == "boolean"){ + if(data.toString().toLowerCase() == "true"){ + dataArr.push(1); + } + else if(data.toString().toLowerCase() == "false"){ + dataArr.push(0); + } + } + else{ + return formula.error.v; + } + } + else{ + dataArr.push(data); + } + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + var mean = jStat.mean(dataArr_n); + var result = 0; + + for (var i = 0; i < dataArr_n.length; i++) { + result += Math.pow((dataArr_n[i] - mean), 2); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EXPON_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //指数分布函数的输入值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //用于指定指数分布函数的 lambda 值 + var lambda = func_methods.getFirstValue(arguments[1]); + if(valueIsError(lambda)){ + return lambda; + } + + if(!isRealNum(lambda)){ + return formula.error.v; + } + + lambda = parseFloat(lambda); + + //是否使用指数累积分布 + var cumulative = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(x < 0){ + return formula.error.nm; + } + + if(lambda < 0){ + return formula.error.nm; + } + + return (cumulative) ? jStat.exponential.cdf(x, lambda) : jStat.exponential.pdf(x, lambda); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AVERAGEIF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var sum = 0; + var count = 0; + + var rangeData = arguments[0].data; + var rangeRow = arguments[0].rowl; + var rangeCol = arguments[0].coll; + var criteria = luckysheet_parseData(arguments[1]); + var sumRangeData = []; + + //如果有第三个参数 + if(arguments[2]){ + //根据选择的目标的区域确定实际目标区域 + //初始位置 + var sumRangeStart = arguments[2].startCell; + var sumRangeRow = arguments[2].rowl; + var sumRangeCol = arguments[2].coll; + var sumRangeSheet = arguments[2].sheetName; + + if(rangeRow == sumRangeRow && rangeCol == sumRangeCol){ + sumRangeData = arguments[2].data; + } + else{ + var row=[],col=[]; + var sumRangeEnd = ""; + var realSumRange = ""; + //console.log("开始位置!!!",sumRangeStart,typeof(sumRangeStart)); + row[0] = parseInt(sumRangeStart.replace(/[^0-9]/g,"")) - 1; + col[0] = ABCatNum(sumRangeStart.replace(/[^A-Za-z]/g,"")); + + //根据第一个范围的长宽确定目标范围的末尾位置 + row[1] = row[0] + rangeRow - 1; + col[1] = col[0] + rangeCol - 1; + + //console.log(row[0],col[0],row[1],col[1]); + //末尾位置转化为sheet格式:如 F4 + var real_ABC = chatatABC(col[1]); + var real_Num = row[1] + 1; + sumRangeEnd = real_ABC + real_Num; + //console.log("合成新的末尾位置:" + sumRangeEnd); + + realSumRange = sumRangeSheet + "!" +sumRangeStart + ":" + sumRangeEnd; + sumRangeData = luckysheet_getcelldata(realSumRange).data; + //console.log("最终的目标范围:",sumRangeData); + } + + sumRangeData = formula.getRangeArray(sumRangeData)[0]; + } + rangeData = formula.getRangeArray(rangeData)[0]; + + //循环遍历查找匹配项 + for(var i = 0; i < rangeData.length;i++){ + var v = rangeData[i]; + if(!!v && formula.acompareb(v, criteria)){ + var vnow = sumRangeData[i] || v; + + if(!isRealNum(vnow)){ + continue; + } + + sum += parseFloat(vnow); + count++; + } + } + + if(sum == 0 || count == 0){ + return formula.error.d; + } + else{ + return numFormat(sum / count); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AVERAGEIFS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var sum = 0; + var count = 0; + var args = arguments; + luckysheet_getValue(args); + var rangeData = formula.getRangeArray(args[0])[0]; + var results = new Array(rangeData.length); + for(var i = 0;i < results.length; i++){ + results[i] = true; + } + for(var i = 1; i < args.length; i += 2){ + var range = formula.getRangeArray(args[i])[0]; + var criteria = args[i+1]; + for(var j = 0; j < range.length; j++){ + var v = range[j]; + results[j] = results[j] && (!!v) && formula.acompareb(v,criteria); + } + } + for(var i = 0; i < rangeData.length; i++){ + if(results[i] && isRealNum(rangeData[i])){ + sum += parseFloat(rangeData[i]); + count ++; + } + } + + if(sum == 0 || count == 0){ + return formula.error.d; + } + else{ + return numFormat(sum / count); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PERMUT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //表示对象个数的整数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + //表示每个排列中对象个数的整数 + var number_chosen = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number_chosen)){ + return number_chosen; + } + + if(!isRealNum(number_chosen)){ + return formula.error.v; + } + + number_chosen = parseInt(number_chosen); + + if(number <= 0 || number_chosen < 0){ + return formula.error.nm; + } + + if(number < number_chosen){ + return formula.error.nm; + } + + return func_methods.factorial(number) / func_methods.factorial(number - number_chosen); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TRIMMEAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //包含相关数据集的数组或范围 + var data_dataArr = arguments[0]; + var dataArr = []; + + if(getObjType(data_dataArr) == "array"){ + if(getObjType(data_dataArr[0]) == "array" && !func_methods.isDyadicArr(data_dataArr)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data_dataArr, false)); + } + else if(getObjType(data_dataArr) == "object" && data_dataArr.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data_dataArr, "number", false)); + } + else{ + dataArr.push(data_dataArr); + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + //排除比例 + var percent = func_methods.getFirstValue(arguments[1]); + if(valueIsError(percent)){ + return percent; + } + + if(!isRealNum(percent)){ + return formula.error.v; + } + + percent = parseFloat(percent); + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + if(percent < 0 || percent > 1){ + return formula.error.nm; + } + + //计算 + function rest(array, idx) { + idx = idx || 1; + if (!array || typeof array.slice !== 'function') { + return array; + } + return array.slice(idx); + }; + + function initial(array, idx) { + idx = idx || 1; + if (!array || typeof array.slice !== 'function') { + return array; + } + return array.slice(0, array.length - idx); + }; + + dataArr_n.sort(function(a, b) { + return a - b; + }) + + var trim = window.luckysheet_function.FLOOR.f(dataArr_n.length * percent, 2) / 2; + + var result = rest(dataArr_n, trim); + result = initial(result, trim); + result = jStat.mean(result); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PERCENTILE_EXC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //定义相对位置的数组或数据区域 + var data_dataArr = arguments[0]; + var dataArr = []; + + if(getObjType(data_dataArr) == "array"){ + if(getObjType(data_dataArr[0]) == "array" && !func_methods.isDyadicArr(data_dataArr)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data_dataArr, false)); + } + else if(getObjType(data_dataArr) == "object" && data_dataArr.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data_dataArr, "number", false)); + } + else{ + dataArr.push(data_dataArr); + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + //0 到 1 之间的百分点值,不包含 0 和 1 + var k = func_methods.getFirstValue(arguments[1]); + if(valueIsError(k)){ + return k; + } + + if(!isRealNum(k)){ + return formula.error.v; + } + + k = parseFloat(k); + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + if(k <= 0 || k >= 1){ + return formula.error.nm; + } + + //计算 + dataArr_n = dataArr_n.sort(function(a, b) { + return a - b; + }); + + var n = dataArr_n.length; + + if (k < 1 / (n + 1) || k > 1 - 1 / (n + 1)) { + return formula.error.nm; + } + + var l = k * (n + 1) - 1; + var fl = Math.floor(l); + + return (l === fl) ? dataArr_n[l] : dataArr_n[fl] + (l - fl) * (dataArr_n[fl + 1] - dataArr_n[fl]); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PERCENTILE_INC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //定义相对位置的数组或数据区域 + var data_dataArr = arguments[0]; + var dataArr = []; + + if(getObjType(data_dataArr) == "array"){ + if(getObjType(data_dataArr[0]) == "array" && !func_methods.isDyadicArr(data_dataArr)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data_dataArr, false)); + } + else if(getObjType(data_dataArr) == "object" && data_dataArr.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data_dataArr, "number", false)); + } + else{ + dataArr.push(data_dataArr); + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + //0 到 1 之间的百分点值,不包含 0 和 1 + var k = func_methods.getFirstValue(arguments[1]); + if(valueIsError(k)){ + return k; + } + + if(!isRealNum(k)){ + return formula.error.v; + } + + k = parseFloat(k); + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + if(k < 0 || k > 1){ + return formula.error.nm; + } + + //计算 + dataArr_n = dataArr_n.sort(function(a, b) { + return a - b; + }); + + var n = dataArr_n.length; + + var l = k * (n - 1); + var fl = Math.floor(l); + + return (l === fl) ? dataArr_n[l] : dataArr_n[fl] + (l - fl) * (dataArr_n[fl + 1] - dataArr_n[fl]); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PEARSON": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[0]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + known_x.push(data_known_x); + } + + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[1]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + known_y.push(data_known_y); + } + + if(known_x.length != known_y.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_x = [], data_y = []; + + for(var i = 0; i < known_x.length; i++){ + var num_x = known_x[i]; + var num_y = known_y[i]; + + if(isRealNum(num_x) && isRealNum(num_y)){ + data_x.push(parseFloat(num_x)); + data_y.push(parseFloat(num_y)); + } + } + + if(data_y.length == 0 || data_x.length == 0){ + return formula.error.d; + } + + //计算 + var xmean = jStat.mean(data_x); + var ymean = jStat.mean(data_y); + + var n = data_x.length; + var num = 0; + var den1 = 0; + var den2 = 0; + + for (var i = 0; i < n; i++) { + num += (data_x[i] - xmean) * (data_y[i] - ymean); + den1 += Math.pow(data_x[i] - xmean, 2); + den2 += Math.pow(data_y[i] - ymean, 2); + } + + return num / Math.sqrt(den1 * den2); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NORM_S_INV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //对应于正态分布的概率 + var probability = func_methods.getFirstValue(arguments[0]); + if(valueIsError(probability)){ + return probability; + } + + if(!isRealNum(probability)){ + return formula.error.v; + } + + probability = parseFloat(probability); + + if(probability <= 0 || probability >= 1){ + return formula.error.nm; + } + + return jStat.normal.inv(probability, 0, 1); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NORM_S_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //需要计算其分布的数值 + var z = func_methods.getFirstValue(arguments[0]); + if(valueIsError(z)){ + return z; + } + + if(!isRealNum(z)){ + return formula.error.v; + } + + z = parseFloat(z); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[1]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + return (cumulative) ? jStat.normal.cdf(z, 0, 1) : jStat.normal.pdf(z, 0, 1); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NORM_INV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //对应于正态分布的概率 + var probability = func_methods.getFirstValue(arguments[0]); + if(valueIsError(probability)){ + return probability; + } + + if(!isRealNum(probability)){ + if(getObjType(probability) == "boolean"){ + if(probability.toString().toLowerCase() == "true"){ + probability = 1; + } + else if(probability.toString().toLowerCase() == "false"){ + probability = 0; + } + } + else{ + return formula.error.v; + } + } + + probability = parseFloat(probability); + + //分布的算术平均值 + var mean = func_methods.getFirstValue(arguments[1]); + if(valueIsError(mean)){ + return mean; + } + + if(!isRealNum(mean)){ + if(getObjType(mean) == "boolean"){ + if(mean.toString().toLowerCase() == "true"){ + mean = 1; + } + else if(mean.toString().toLowerCase() == "false"){ + mean = 0; + } + } + else{ + return formula.error.v; + } + } + + mean = parseFloat(mean); + + //分布的标准偏差 + var standard_dev = func_methods.getFirstValue(arguments[2]); + if(valueIsError(standard_dev)){ + return standard_dev; + } + + if(!isRealNum(standard_dev)){ + if(getObjType(standard_dev) == "boolean"){ + if(standard_dev.toString().toLowerCase() == "true"){ + standard_dev = 1; + } + else if(standard_dev.toString().toLowerCase() == "false"){ + standard_dev = 0; + } + } + else{ + return formula.error.v; + } + } + + standard_dev = parseFloat(standard_dev); + + if(probability <= 0 || probability >= 1){ + return formula.error.nm; + } + + if(standard_dev <= 0){ + return formula.error.nm; + } + + //计算 + return jStat.normal.inv(probability, mean, standard_dev); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NORM_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //需要计算其分布的数值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + if(getObjType(x) == "boolean"){ + if(x.toString().toLowerCase() == "true"){ + x = 1; + } + else if(x.toString().toLowerCase() == "false"){ + x = 0; + } + } + else{ + return formula.error.v; + } + } + + x = parseFloat(x); + + //分布的算术平均值 + var mean = func_methods.getFirstValue(arguments[1]); + if(valueIsError(mean)){ + return mean; + } + + if(!isRealNum(mean)){ + return formula.error.v; + } + + mean = parseFloat(mean); + + //分布的标准偏差 + var standard_dev = func_methods.getFirstValue(arguments[2]); + if(valueIsError(standard_dev)){ + return standard_dev; + } + + if(!isRealNum(standard_dev)){ + return formula.error.v; + } + + standard_dev = parseFloat(standard_dev); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(standard_dev <= 0){ + return formula.error.nm; + } + + return (cumulative) ? jStat.normal.cdf(x, mean, standard_dev) : jStat.normal.pdf(x, mean, standard_dev); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NEGBINOM_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要模拟的失败次数 + var number_f = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number_f)){ + return number_f; + } + + if(!isRealNum(number_f)){ + return formula.error.v; + } + + number_f = parseInt(number_f); + + //要模拟的成功次数 + var number_s = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number_s)){ + return number_s; + } + + if(!isRealNum(number_s)){ + return formula.error.v; + } + + number_s = parseInt(number_s); + + //任一次给定检验的成功概率 + var probability_s = func_methods.getFirstValue(arguments[2]); + if(valueIsError(probability_s)){ + return probability_s; + } + + if(!isRealNum(probability_s)){ + return formula.error.v; + } + + probability_s = parseFloat(probability_s); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(probability_s < 0 || probability_s > 1){ + return formula.error.nm; + } + + if(number_f < 0 || number_s < 1){ + return formula.error.nm; + } + + return (cumulative) ? jStat.negbin.cdf(number_f, number_s, probability_s) : jStat.negbin.pdf(number_f, number_s, probability_s); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MINA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(number.toString.toLowerCase() == "true"){ + dataArr.push(1); + } + else if(number.toString.toLowerCase() == "false"){ + dataArr.push(0); + } + else if(isRealNum(data)){ + dataArr.push(data); + } + else{ + return formula.error.v; + } + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + else{ + if(number.toString().toLowerCase() == "true"){ + dataArr_n.push(1); + } + else{ + dataArr_n.push(0); + } + } + } + + return (dataArr_n.length === 0) ? 0 : Math.min.apply(Math, dataArr_n); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MEDIAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + return jStat.median(dataArr_n); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MAXA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(number.toString.toLowerCase() == "true"){ + dataArr.push(1); + } + else if(number.toString.toLowerCase() == "false"){ + dataArr.push(0); + } + else if(isRealNum(data)){ + dataArr.push(data); + } + else{ + return formula.error.v; + } + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + else{ + if(number.toString().toLowerCase() == "true"){ + dataArr_n.push(1); + } + else{ + dataArr_n.push(0); + } + } + } + + return (dataArr_n.length === 0) ? 0 : Math.max.apply(Math, dataArr_n); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOGNORM_INV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //与对数分布相关的概率 + var probability = func_methods.getFirstValue(arguments[0]); + if(valueIsError(probability)){ + return probability; + } + + if(!isRealNum(probability)){ + return formula.error.v; + } + + probability = parseFloat(probability); + + //ln(x) 的平均值 + var mean = func_methods.getFirstValue(arguments[1]); + if(valueIsError(mean)){ + return mean; + } + + if(!isRealNum(mean)){ + return formula.error.v; + } + + mean = parseFloat(mean); + + //ln(x) 的标准偏差 + var standard_dev = func_methods.getFirstValue(arguments[2]); + if(valueIsError(standard_dev)){ + return standard_dev; + } + + if(!isRealNum(standard_dev)){ + return formula.error.v; + } + + standard_dev = parseFloat(standard_dev); + + if(probability <= 0 || probability >= 1){ + return formula.error.nm; + } + + if(standard_dev <= 0){ + return formula.error.nm; + } + + return jStat.lognormal.inv(probability, mean, standard_dev); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOGNORM_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //与对数分布相关的概率 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //ln(x) 的平均值 + var mean = func_methods.getFirstValue(arguments[1]); + if(valueIsError(mean)){ + return mean; + } + + if(!isRealNum(mean)){ + return formula.error.v; + } + + mean = parseFloat(mean); + + //ln(x) 的标准偏差 + var standard_dev = func_methods.getFirstValue(arguments[2]); + if(valueIsError(standard_dev)){ + return standard_dev; + } + + if(!isRealNum(standard_dev)){ + return formula.error.v; + } + + standard_dev = parseFloat(standard_dev); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(x <= 0 || standard_dev <= 0){ + return formula.error.nm; + } + + return (cumulative) ? jStat.lognormal.cdf(x, mean, standard_dev) : jStat.lognormal.pdf(x, mean, standard_dev); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "Z_TEST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用来检验 x 的数组或数据区域 + var dataArr = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(arguments[0], true)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(arguments[0], "text", true)); + } + else{ + dataArr.push(arguments[0]); + } + + var dataArr_n = []; + + for(var j = 0; j < dataArr.length; j++){ + var number = dataArr[j]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + //要测试的值 + var x = func_methods.getFirstValue(arguments[1]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + if(dataArr_n.length == 0){ + return formula.error.na; + } + + //总体(已知)标准偏差。 如果省略,则使用样本标准偏差 + var sigma = func_methods.standardDeviation_s(dataArr_n); + if(arguments.length == 3){ + sigma = func_methods.getFirstValue(arguments[2]); + if(valueIsError(sigma)){ + return sigma; + } + + if(!isRealNum(sigma)){ + return formula.error.v; + } + + sigma = parseFloat(sigma); + } + + //计算 + var n = dataArr_n.length; + var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); + + return 1 - window.luckysheet_function.NORM_S_DIST.f((mean - x) / (sigma / Math.sqrt(n)), "true"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PROB": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //x_range + var data_x_range = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + data_x_range = data_x_range.concat(func_methods.getDataArr(arguments[0], false)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + data_x_range = data_x_range.concat(func_methods.getCellDataArr(arguments[0], "text", false)); + } + else{ + data_x_range.push(arguments[0]); + } + + //prob_range + var data_prob_range = []; + + if(getObjType(arguments[1]) == "array"){ + if(getObjType(arguments[1][0]) == "array" && !func_methods.isDyadicArr(arguments[1])){ + return formula.error.v; + } + + data_prob_range = data_prob_range.concat(func_methods.getDataArr(arguments[1], false)); + } + else if(getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ + data_prob_range = data_prob_range.concat(func_methods.getCellDataArr(arguments[1], "text", false)); + } + else{ + data_prob_range.push(arguments[1]); + } + + if(data_x_range.length != data_prob_range.length){ + return formula.error.na; + } + + //data_x_range 和 data_prob_range 只取数值 + var x_range = [], prob_range = [], prob_range_sum = 0; + + for(var i = 0; i < data_x_range.length; i++){ + var num_x_range = data_x_range[i]; + var num_prob_range = data_prob_range[i]; + + if(isRealNum(num_x_range) && isRealNum(num_prob_range)){ + x_range.push(parseFloat(num_x_range)); + prob_range.push(parseFloat(num_prob_range)); + + prob_range_sum += parseFloat(num_prob_range); + + if(parseFloat(num_prob_range) <= 0 || parseFloat(num_prob_range) > 1){ + return formula.error.nm; + } + } + } + + if(prob_range_sum != 1){ + return formula.error.nm; + } + + //要计算其概率的数值下界 + var lower_limit = func_methods.getFirstValue(arguments[2]); + if(valueIsError(lower_limit)){ + return lower_limit; + } + + if(!isRealNum(lower_limit)){ + return formula.error.v; + } + + lower_limit = parseFloat(lower_limit); + + //要计算其概率的数值上界 + var upper_limit = lower_limit; + if(arguments.length == 4){ + upper_limit = func_methods.getFirstValue(arguments[3]); + if(valueIsError(upper_limit)){ + return upper_limit; + } + + if(!isRealNum(upper_limit)){ + return formula.error.v; + } + + upper_limit = parseFloat(upper_limit); + } + + //计算 + var result = 0; + + for (var i = 0; i < x_range.length; i++) { + if (x_range[i] >= lower_limit && x_range[i] <= upper_limit) { + result += prob_range[i]; + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "QUARTILE_EXC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要求得四分位数值的数组或数字型单元格区域 + var data_array = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + data_array = data_array.concat(func_methods.getDataArr(arguments[0], true)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + data_array = data_array.concat(func_methods.getCellDataArr(arguments[0], "text", true)); + } + else{ + if(!isRealNum(arguments[0])){ + return formula.error.v; + } + + data_array.push(arguments[0]); + } + + var array = []; + + for(var i = 0; i < data_array.length; i++){ + var number = data_array[i]; + + if(isRealNum(number)){ + array.push(parseFloat(number)); + } + } + + //要返回第几个四分位值 + var quart = func_methods.getFirstValue(arguments[1]); + if(valueIsError(quart)){ + return quart; + } + + if(!isRealNum(quart)){ + return formula.error.v; + } + + quart = parseInt(quart); + + if(array.length == 0){ + return formula.error.nm; + } + + if(quart <= 0 || quart >= 4){ + return formula.error.nm; + } + + //计算 + switch (quart) { + case 1: + return window.luckysheet_function.PERCENTILE_EXC.f(array, 0.25); + case 2: + return window.luckysheet_function.PERCENTILE_EXC.f(array, 0.5); + case 3: + return window.luckysheet_function.PERCENTILE_EXC.f(array, 0.75); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "QUARTILE_INC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要求得四分位数值的数组或数字型单元格区域 + var data_array = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + data_array = data_array.concat(func_methods.getDataArr(arguments[0], true)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + data_array = data_array.concat(func_methods.getCellDataArr(arguments[0], "text", true)); + } + else{ + if(!isRealNum(arguments[0])){ + return formula.error.v; + } + + data_array.push(arguments[0]); + } + + var array = []; + + for(var i = 0; i < data_array.length; i++){ + var number = data_array[i]; + + if(isRealNum(number)){ + array.push(parseFloat(number)); + } + } + + //要返回第几个四分位值 + var quart = func_methods.getFirstValue(arguments[1]); + if(valueIsError(quart)){ + return quart; + } + + if(!isRealNum(quart)){ + return formula.error.v; + } + + quart = parseInt(quart); + + if(array.length == 0){ + return formula.error.nm; + } + + if(quart < 0 || quart > 4){ + return formula.error.nm; + } + + //计算 + switch (quart) { + case 0: + return Math.min.apply(Math, array); + case 1: + return window.luckysheet_function.PERCENTILE_INC.f(array, 0.25); + case 2: + return window.luckysheet_function.PERCENTILE_INC.f(array, 0.5); + case 3: + return window.luckysheet_function.PERCENTILE_INC.f(array, 0.75); + case 4: + return Math.max.apply(Math, array); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "POISSON_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //事件数 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseInt(x); + + //期望值 + var mean = func_methods.getFirstValue(arguments[1]); + if(valueIsError(mean)){ + return mean; + } + + if(!isRealNum(mean)){ + return formula.error.v; + } + + mean = parseFloat(mean); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(x < 0 || mean < 0){ + return formula.error.nm; + } + + return (cumulative) ? jStat.poisson.cdf(x, mean) : jStat.poisson.pdf(x, mean); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RSQ": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表因变量数据数组或矩阵的范围 + var data_known_y = arguments[0]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(data_known_y, false)); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(data_known_y, "text", false)); + } + else{ + if(!isRealNum(data_known_y)){ + return formula.error.v; + } + + known_y.push(data_known_y); + } + + //代表自变量数据数组或矩阵的范围 + var data_known_x = arguments[1]; + var known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(data_known_x, false)); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(data_known_x, "text", false)); + } + else{ + if(!isRealNum(data_known_x)){ + return formula.error.v; + } + + known_x.push(data_known_x); + } + + if(known_y.length != known_x.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_y = [], data_x = []; + + for(var i = 0; i < known_y.length; i++){ + var num_y = known_y[i]; + var num_x = known_x[i]; + + if(isRealNum(num_y) && isRealNum(num_x)){ + data_y.push(parseFloat(num_y)); + data_x.push(parseFloat(num_x)); + } + } + + if(data_y.length == 0 || data_x.length == 0){ + return formula.error.d; + } + + return Math.pow(window.luckysheet_function.PEARSON.f(data_y, data_x), 2); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //T-分布函数的输入 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //自由度数值 + var degrees_freedom = func_methods.getFirstValue(arguments[1]); + if(valueIsError(degrees_freedom)){ + return degrees_freedom; + } + + if(!isRealNum(degrees_freedom)){ + return formula.error.v; + } + + degrees_freedom = parseInt(degrees_freedom); + + //决定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(degrees_freedom < 1){ + return formula.error.nm; + } + + return (cumulative) ? jStat.studentt.cdf(x, degrees_freedom) : jStat.studentt.pdf(x, degrees_freedom); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T_DIST_2T": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //T-分布函数的输入 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //自由度数值 + var degrees_freedom = func_methods.getFirstValue(arguments[1]); + if(valueIsError(degrees_freedom)){ + return degrees_freedom; + } + + if(!isRealNum(degrees_freedom)){ + return formula.error.v; + } + + degrees_freedom = parseInt(degrees_freedom); + + if(x < 0 || degrees_freedom < 1){ + return formula.error.nm; + } + + return (1 - jStat.studentt.cdf(x , degrees_freedom)) * 2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T_DIST_RT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //T-分布函数的输入 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //自由度数值 + var degrees_freedom = func_methods.getFirstValue(arguments[1]); + if(valueIsError(degrees_freedom)){ + return degrees_freedom; + } + + if(!isRealNum(degrees_freedom)){ + return formula.error.v; + } + + degrees_freedom = parseInt(degrees_freedom); + + if(degrees_freedom < 1){ + return formula.error.nm; + } + + return 1 - jStat.studentt.cdf(x , degrees_freedom); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T_INV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //与学生的 t 分布相关的概率 + var probability = func_methods.getFirstValue(arguments[0]); + if(valueIsError(probability)){ + return probability; + } + + if(!isRealNum(probability)){ + return formula.error.v; + } + + probability = parseFloat(probability); + + //自由度数值 + var deg_freedom = func_methods.getFirstValue(arguments[1]); + if(valueIsError(deg_freedom)){ + return deg_freedom; + } + + if(!isRealNum(deg_freedom)){ + return formula.error.v; + } + + deg_freedom = parseInt(deg_freedom); + + if(probability <= 0 || probability > 1){ + return formula.error.nm; + } + + if(deg_freedom < 1){ + return formula.error.nm; + } + + return jStat.studentt.inv(probability, deg_freedom); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T_INV_2T": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //与学生的 t 分布相关的概率 + var probability = func_methods.getFirstValue(arguments[0]); + if(valueIsError(probability)){ + return probability; + } + + if(!isRealNum(probability)){ + return formula.error.v; + } + + probability = parseFloat(probability); + + //自由度数值 + var deg_freedom = func_methods.getFirstValue(arguments[1]); + if(valueIsError(deg_freedom)){ + return deg_freedom; + } + + if(!isRealNum(deg_freedom)){ + return formula.error.v; + } + + deg_freedom = parseInt(deg_freedom); + + if(probability <= 0 || probability > 1){ + return formula.error.nm; + } + + if(deg_freedom < 1){ + return formula.error.nm; + } + + return Math.abs(jStat.studentt.inv(probability / 2, deg_freedom)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T_TEST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //第一个数据集 + var known_x = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(arguments[0], false)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(arguments[0], "text", false)); + } + else{ + if(!isRealNum(arguments[0])){ + return formula.error.v; + } + + known_x.push(arguments[0]); + } + + // var data_x = []; + var data_x = known_x; + + //第二个数据集 + var known_y = []; + + if(getObjType(arguments[1]) == "array"){ + if(getObjType(arguments[1][0]) == "array" && !func_methods.isDyadicArr(arguments[1])){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(arguments[1], false)); + } + else if(getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(arguments[1], "text", false)); + } + else{ + if(!isRealNum(arguments[1])){ + return formula.error.v; + } + + known_y.push(arguments[1]); + } + + // var data_y = []; + var data_y = known_y; + + //指定分布的尾数 + var tails = func_methods.getFirstValue(arguments[2]); + if(valueIsError(tails)){ + return tails; + } + + if(!isRealNum(tails)){ + return formula.error.v; + } + + tails = parseInt(tails); + + //指定 t 检验的类型 + var type = func_methods.getFirstValue(arguments[3]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseInt(type); + + if([1,2].indexOf(tails) == -1){ + return formula.error.nm; + } + + if([1,2,3].indexOf(type) == -1){ + return formula.error.nm; + } + + //计算 + var t = null, df = null; + if(type == 1){ + var diff_arr = []; + + for (i = 0; i < data_x.length; i++) { + diff_arr.push(data_x[i] - data_y[i]); + } + + var diff_mean = Math.abs(jStat.mean(diff_arr)); + var diff_sd = func_methods.standardDeviation_s(diff_arr); + + t = diff_mean / (diff_sd / Math.sqrt(data_x.length)); + df = data_x.length - 1; + } + else{ + var mean_x = jStat.mean(data_x); + var mean_y = jStat.mean(data_y); + + var s_x = func_methods.variance_s(data_x); + var s_y = func_methods.variance_s(data_y); + + t = Math.abs(mean_x - mean_y) / Math.sqrt(s_x / data_x.length + s_y / data_y.length); + + switch(type){ + case 2: + df = data_x.length + data_y.length - 2; + break; + case 3: + df = Math.pow(s_x / data_x.length + s_y / data_y.length, 2) / (Math.pow(s_x / data_x.length, 2) / (data_x.length - 1) + Math.pow(s_y / data_y.length, 2) / (data_y.length - 1)); + break; + } + } + + if(tails == 1){ + var result = window.luckysheet_function.T_DIST_RT.f(t, df); + } + else if(tails == 2){ + var result = window.luckysheet_function.T_DIST_2T.f(t, df); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "F_DIST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用来计算函数的值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //分子自由度 + var degrees_freedom1 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(degrees_freedom1)){ + return degrees_freedom1; + } + + if(!isRealNum(degrees_freedom1)){ + return formula.error.v; + } + + degrees_freedom1 = parseInt(degrees_freedom1); + + //分母自由度 + var degrees_freedom2 = func_methods.getFirstValue(arguments[2]); + if(valueIsError(degrees_freedom2)){ + return degrees_freedom2; + } + + if(!isRealNum(degrees_freedom2)){ + return formula.error.v; + } + + degrees_freedom2 = parseInt(degrees_freedom2); + + //用于确定函数形式的逻辑值 + var cumulative = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(x < 0){ + return formula.error.nm; + } + + if(degrees_freedom1 < 1){ + return formula.error.nm; + } + + if(degrees_freedom2 < 1){ + return formula.error.nm; + } + + return (cumulative) ? jStat.centralF.cdf(x, degrees_freedom1, degrees_freedom2) : jStat.centralF.pdf(x, degrees_freedom1, degrees_freedom2); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "F_DIST_RT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用来计算函数的值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //分子自由度 + var degrees_freedom1 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(degrees_freedom1)){ + return degrees_freedom1; + } + + if(!isRealNum(degrees_freedom1)){ + return formula.error.v; + } + + degrees_freedom1 = parseInt(degrees_freedom1); + + //分母自由度 + var degrees_freedom2 = func_methods.getFirstValue(arguments[2]); + if(valueIsError(degrees_freedom2)){ + return degrees_freedom2; + } + + if(!isRealNum(degrees_freedom2)){ + return formula.error.v; + } + + degrees_freedom2 = parseInt(degrees_freedom2); + + if(x < 0){ + return formula.error.nm; + } + + if(degrees_freedom1 < 1){ + return formula.error.nm; + } + + if(degrees_freedom2 < 1){ + return formula.error.nm; + } + + return 1 - jStat.centralF.cdf(x, degrees_freedom1, degrees_freedom2); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "VAR_P": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + if(dataArr_n.length == 0){ + return formula.error.d; + } + + var n = dataArr_n.length; + var sigma = 0; + var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); + for (var i = 0; i < n; i++) { + sigma += Math.pow(dataArr_n[i] - mean, 2); + } + + return sigma / n; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "VAR_S": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + if(dataArr_n.length == 0){ + return formula.error.d; + } + + var n = dataArr_n.length; + var sigma = 0; + var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); + for (var i = 0; i < n; i++) { + sigma += Math.pow(dataArr_n[i] - mean, 2); + } + + return sigma / (n - 1); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "VARA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(number.toString.toLowerCase() == "true"){ + dataArr.push(1); + } + else if(number.toString.toLowerCase() == "false"){ + dataArr.push(0); + } + else if(isRealNum(data)){ + dataArr.push(data); + } + else{ + return formula.error.v; + } + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + else{ + if(number.toString().toLowerCase() == "true"){ + dataArr_n.push(1); + } + else{ + dataArr_n.push(0); + } + } + } + + var n = dataArr_n.length; + var sigma = 0; + var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); + for (var i = 0; i < n; i++) { + sigma += Math.pow(dataArr_n[i] - mean, 2); + } + + return sigma / (n - 1); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "VARPA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(number.toString.toLowerCase() == "true"){ + dataArr.push(1); + } + else if(number.toString.toLowerCase() == "false"){ + dataArr.push(0); + } + else if(isRealNum(data)){ + dataArr.push(data); + } + else{ + return formula.error.v; + } + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + else{ + if(number.toString().toLowerCase() == "true"){ + dataArr_n.push(1); + } + else{ + dataArr_n.push(0); + } + } + } + + var n = dataArr_n.length; + var sigma = 0; + var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); + for (var i = 0; i < n; i++) { + sigma += Math.pow(dataArr_n[i] - mean, 2); + } + + return sigma / n; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STEYX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表因变量数据数组或矩阵的范围 + var known_y = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(arguments[0], false)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(arguments[0], "text", false)); + } + else{ + if(!isRealNum(arguments[0])){ + return formula.error.v; + } + + known_y.push(arguments[0]); + } + + //代表自变量数据数组或矩阵的范围 + var known_x = []; + + if(getObjType(arguments[1]) == "array"){ + if(getObjType(arguments[1][0]) == "array" && !func_methods.isDyadicArr(arguments[1])){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(arguments[1], false)); + } + else if(getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(arguments[1], "text", false)); + } + else{ + if(!isRealNum(arguments[1])){ + return formula.error.v; + } + + known_x.push(arguments[1]); + } + + if(known_y.length != known_x.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_y = [], data_x = []; + + for(var i = 0; i < known_y.length; i++){ + var num_y = known_y[i]; + var num_x = known_x[i]; + + if(isRealNum(num_y) && isRealNum(num_x)){ + data_y.push(parseFloat(num_y)); + data_x.push(parseFloat(num_x)); + } + } + + if(data_y.length < 3 || data_x.length < 3){ + return formula.error.d; + } + + //计算 + var xmean = jStat.mean(data_x); + var ymean = jStat.mean(data_y); + + var n = data_x.length; + var lft = 0; + var num = 0; + var den = 0; + + for (var i = 0; i < n; i++) { + lft += Math.pow(data_y[i] - ymean, 2); + num += (data_x[i] - xmean) * (data_y[i] - ymean); + den += Math.pow(data_x[i] - xmean, 2); + } + + return Math.sqrt((lft - num * num / den) / (n - 2)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STANDARDIZE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要正态化的随机变量值 + var x = func_methods.getFirstValue(arguments[0]); + if(valueIsError(x)){ + return x; + } + + if(!isRealNum(x)){ + return formula.error.v; + } + + x = parseFloat(x); + + //分布的均值 + var mean = func_methods.getFirstValue(arguments[1]); + if(valueIsError(mean)){ + return mean; + } + + if(!isRealNum(mean)){ + return formula.error.v; + } + + mean = parseFloat(mean); + + //分布的标准偏差 + var standard_dev = func_methods.getFirstValue(arguments[2]); + if(valueIsError(standard_dev)){ + return standard_dev; + } + + if(!isRealNum(standard_dev)){ + return formula.error.v; + } + + standard_dev = parseFloat(standard_dev); + + if(standard_dev <= 0){ + return formula.error.nm; + } + + return (x - mean) / standard_dev; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SMALL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要正态化的随机变量值 + var dataArr = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(arguments[0], true)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(arguments[0], "number", true)); + } + else{ + if(!isRealNum(arguments[0])){ + return formula.error.v; + } + + dataArr.push(arguments[0]); + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + //要返回的数据在数组或数据区域里的位置(从小到大) + var k = func_methods.getFirstValue(arguments[1]); + if(valueIsError(k)){ + return k; + } + + if(!isRealNum(k)){ + return formula.error.v; + } + + k = parseInt(k); + + if(dataArr_n.length == 0){ + return formula.error.nm; + } + + if(k <= 0 || k > dataArr_n.length){ + return formula.error.nm; + } + + //计算 + + return dataArr_n.sort(function(a, b) { + return a - b; + })[k - 1]; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SLOPE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //代表因变量数据数组或矩阵的范围 + var known_y = []; + + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array" && !func_methods.isDyadicArr(arguments[0])){ + return formula.error.v; + } + + known_y = known_y.concat(func_methods.getDataArr(arguments[0], false)); + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + known_y = known_y.concat(func_methods.getCellDataArr(arguments[0], "text", false)); + } + else{ + if(!isRealNum(arguments[0])){ + return formula.error.v; + } + + known_y.push(arguments[0]); + } + + //代表自变量数据数组或矩阵的范围 + var known_x = []; + + if(getObjType(arguments[1]) == "array"){ + if(getObjType(arguments[1][0]) == "array" && !func_methods.isDyadicArr(arguments[1])){ + return formula.error.v; + } + + known_x = known_x.concat(func_methods.getDataArr(arguments[1], false)); + } + else if(getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ + known_x = known_x.concat(func_methods.getCellDataArr(arguments[1], "text", false)); + } + else{ + if(!isRealNum(arguments[1])){ + return formula.error.v; + } + + known_x.push(arguments[1]); + } + + if(known_y.length != known_x.length){ + return formula.error.na; + } + + //known_y 和 known_x 只取数值 + var data_y = [], data_x = []; + + for(var i = 0; i < known_y.length; i++){ + var num_y = known_y[i]; + var num_x = known_x[i]; + + if(isRealNum(num_y) && isRealNum(num_x)){ + data_y.push(parseFloat(num_y)); + data_x.push(parseFloat(num_x)); + } + } + + if(data_y.length < 3 || data_x.length < 3){ + return formula.error.d; + } + + //计算 + var xmean = jStat.mean(data_x); + var ymean = jStat.mean(data_y); + + var n = data_x.length; + var num = 0; + var den = 0; + + for (var i = 0; i < n; i++) { + num += (data_x[i] - xmean) * (data_y[i] - ymean); + den += Math.pow(data_x[i] - xmean, 2); + } + + return num / den; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SKEW": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + if(dataArr_n.length < 3 || func_methods.standardDeviation_s(dataArr_n) == 0){ + return formula.error.d; + } + + //计算 + var mean = jStat.mean(dataArr_n); + var n = dataArr_n.length; + var sigma = 0; + for (var i = 0; i < n; i++) { + sigma += Math.pow(dataArr_n[i] - mean, 3); + } + + return n * sigma / ((n - 1) * (n - 2) * Math.pow(jStat.stdev(dataArr_n, true), 3)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SKEW_P": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var dataArr = []; + + for (var i = 0; i < arguments.length; i++) { + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + if(!isRealNum(data)){ + return formula.error.v; + } + + dataArr.push(data); + } + } + + var dataArr_n = []; + + for(var i = 0; i < dataArr.length; i++){ + var number = dataArr[i]; + + if(isRealNum(number)){ + dataArr_n.push(parseFloat(number)); + } + } + + if(dataArr_n.length < 3 || func_methods.standardDeviation_s(dataArr_n) == 0){ + return formula.error.d; + } + + //计算 + var mean = jStat.mean(dataArr_n); + var n = dataArr_n.length; + var m2 = 0; + var m3 = 0; + + for (var i = 0; i < n; i++) { + m3 += Math.pow(dataArr_n[i] - mean, 3); + m2 += Math.pow(dataArr_n[i] - mean, 2); + } + + m3 = m3 / n; + m2 = m2 / n; + + return m3 / Math.pow(m2, 3 / 2); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ADDRESS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //行号 + var row_num = func_methods.getFirstValue(arguments[0]); + if(valueIsError(row_num)){ + return row_num; + } + + if(!isRealNum(row_num)){ + return formula.error.v; + } + + row_num = parseInt(row_num); + + //列标 + var column_num = func_methods.getFirstValue(arguments[1]); + if(valueIsError(column_num)){ + return column_num; + } + + if(!isRealNum(column_num)){ + return formula.error.v; + } + + column_num = parseInt(column_num); + + //引用类型 + var abs_num = 1; + if(arguments.length >= 3){ + abs_num = func_methods.getFirstValue(arguments[2]); + if(valueIsError(abs_num)){ + return abs_num; + } + + if(!isRealNum(abs_num)){ + return formula.error.v; + } + + abs_num = parseInt(abs_num); + } + + //A1标记形式 -- R1C1标记形式 + var A1 = true; + if(arguments.length >= 4){ + A1 = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(A1)){ + return A1; + } + } + + if(row_num <= 0 || column_num <= 0){ + return formula.error.v; + } + + if([1,2,3,4].indexOf(abs_num) == -1){ + return formula.error.v; + } + + //计算 + var str; + if(A1){ + column_num = chatatABC(column_num - 1); + + switch(abs_num){ + case 1: + str = "$" + column_num + "$" + row_num; + break; + case 2: + str = column_num + "$" + row_num; + break; + case 3: + str = "$" + column_num + row_num; + break; + case 4: + str = column_num + row_num; + break; + } + } + else{ + switch(abs_num){ + case 1: + str = "R" + row_num + "C" + column_num; + break; + case 2: + str = "R" + row_num + "C[" + column_num + "]"; + break; + case 3: + str = "R[" + row_num + "]" + "C" + column_num; + break; + case 4: + str = "R[" + row_num + "]" + "C[" + column_num + "]"; + break; + } + } + + if(arguments.length == 5){ + //工作表名称 + var sheet_text = func_methods.getFirstValue(arguments[4]); + if(valueIsError(sheet_text)){ + return sheet_text; + } + + return sheet_text + "!" + str; + } + else{ + return str; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "INDIRECT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //以带引号的字符串形式提供的单元格引用 + var ref_text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(ref_text)){ + return ref_text; + } + + //A1标记形式 -- R1C1标记形式 + var A1 = true; + if(arguments.length == 2){ + A1 = func_methods.getCellBoolen(arguments[1]); + + if(valueIsError(A1)){ + return A1; + } + } + + //计算 + if(A1){ + if(formula.iscelldata(ref_text)){ + let cellrange = formula.getcellrange(ref_text); + let row = cellrange.row[0], col = cellrange.column[0]; + + if(row < 0 || row >= Store.flowdata.length || col < 0 || col >= Store.flowdata[0].length){ + return formula.error.r; + } + + if(Store.flowdata[row][col] == null || isRealNull(Store.flowdata[row][col].v)){ + return 0; + } + + return Store.flowdata[row][col].v; + } + else{ + return formula.error.r; + } + } + else{ + if(formula.iscelldata(ref_text)){ + let cellrange = formula.getcellrange(ref_text); + let row = cellrange.row[0], col = cellrange.column[0]; + + if(row < 0 || row >= Store.flowdata.length || col < 0 || col >= Store.flowdata[0].length){ + return formula.error.r; + } + + if(Store.flowdata[row][col] == null || isRealNull(Store.flowdata[row][col].v)){ + return 0; + } + + return Store.flowdata[row][col].v; + } + else{ + return formula.error.r; + } + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ROW": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + if(arguments.length == 1){ + //要返回其行号的单元格 + var reference; + + if(getObjType(arguments[0]) == "array"){ + return formula.error.v; + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + reference = arguments[0].startCell; + } + else{ + reference = arguments[0]; + } + + if(formula.iscelldata(reference)){ + var cellrange = formula.getcellrange(reference); + + return cellrange["row"][0] + 1; + } + else{ + return formula.error.v; + } + } + else{ + return window.luckysheetCurrentRow + 1; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ROWS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要返回其行数的范围 + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array"){ + return arguments[0].length; + } + else{ + return 1; + } + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + return arguments[0].rowl; + } + else{ + return 1; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COLUMN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + if(arguments.length == 1){ + //要返回其列号的单元格 + var reference; + + if(getObjType(arguments[0]) == "array"){ + return formula.error.v; + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + reference = arguments[0].startCell; + } + else{ + reference = arguments[0]; + } + + if(formula.iscelldata(reference)){ + var cellrange = formula.getcellrange(reference); + + return cellrange["column"][0] + 1; + } + else{ + return formula.error.v; + } + } + else{ + return window.luckysheetCurrentColumn + 1; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COLUMNS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //返回指定数组或范围中的列数 + if(getObjType(arguments[0]) == "array"){ + if(getObjType(arguments[0][0]) == "array"){ + return arguments[0][0].length; + } + else{ + return arguments[0].length; + } + } + else if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + return arguments[0].coll; + } + else{ + return 1; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "OFFSET": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用于计算行列偏移量的起点 + if(!(getObjType(arguments[0]) == "object" && arguments[0].startCell != null)){ + return formula.error.v; + } + + var reference = arguments[0].startCell; + + //要偏移的行数 + var rows = func_methods.getFirstValue(arguments[1]); + if(valueIsError(rows)){ + return rows; + } + + if(!isRealNum(rows)){ + return formula.error.v; + } + + rows = parseInt(rows); + + //要偏移的列数 + var cols = func_methods.getFirstValue(arguments[2]); + if(valueIsError(cols)){ + return cols; + } + + if(!isRealNum(cols)){ + return formula.error.v; + } + + cols = parseInt(cols); + + //要从偏移目标开始返回的范围的高度 + var height = arguments[0].rowl; + if(arguments.length >= 4){ + height = func_methods.getFirstValue(arguments[3]); + if(valueIsError(height)){ + return height; + } + + if(!isRealNum(height)){ + return formula.error.v; + } + + height = parseInt(height); + } + + //要从偏移目标开始返回的范围的宽度 + var width = arguments[0].coll; + if(arguments.length == 5){ + width = func_methods.getFirstValue(arguments[4]); + if(valueIsError(width)){ + return width; + } + + if(!isRealNum(width)){ + return formula.error.v; + } + + width = parseInt(width); + } + + if(height < 1 || width < 1){ + return formula.error.r; + } + + //计算 + var cellrange = formula.getcellrange(reference); + var cellRow0 = cellrange["row"][0]; + var cellCol0 = cellrange["column"][0]; + + cellRow0 += rows; + cellCol0 += cols; + + var cellRow1 = cellRow0 + height - 1; + var cellCol1 = cellCol0 + width - 1; + + if(cellRow0 < 0 || cellRow1 >= Store.flowdata.length || cellCol0 < 0 || cellCol1 >= Store.flowdata[0].length){ + return formula.error.r; + } + + var result = []; + + for(var r = cellRow0; r <= cellRow1; r++){ + var rowArr = []; + + for(var c = cellCol0; c <= cellCol1; c++){ + if(Store.flowdata[r][c] != null && !isRealNull(Store.flowdata[r][c].v)){ + rowArr.push(Store.flowdata[r][c].v); + } + else{ + rowArr.push(0); + } + } + + result.push(rowArr); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MATCH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //lookup_value + var lookup_value = func_methods.getFirstValue(arguments[0]); + if(valueIsError(lookup_value)){ + return lookup_value; + } + + //lookup_array + var data_lookup_array = arguments[1]; + var lookup_array = []; + + if(getObjType(data_lookup_array) == "array"){ + if(getObjType(data_lookup_array[0]) == "array"){ + if(!func_methods.isDyadicArr(data_lookup_array)){ + return formula.error.v; + } + + return formula.error.na; + } + else{ + for(var i = 0; i < data_lookup_array.length; i++){ + lookup_array.push(data_lookup_array[i]); + } + } + } + else if(getObjType(data_lookup_array) == "object" && data_lookup_array.startCell != null){ + if(data_lookup_array.rowl > 1 && data_lookup_array.coll > 1){ + return formula.error.na; + } + + if(data_lookup_array.data != null){ + if(getObjType(data_lookup_array.data) == "array"){ + for(var i = 0; i < data_lookup_array.data.length; i++){ + for(var j = 0; j < data_lookup_array.data[i].length; j++){ + if(data_lookup_array.data[i][j] != null && !isRealNull(data_lookup_array.data[i][j].v)){ + lookup_array.push(data_lookup_array.data[i][j].v); + } + } + } + } + else{ + lookup_array.push(data_lookup_array.data.v); + } + } + } + + //match_type + var match_type = 1; + if(arguments.length == 3){ + match_type = func_methods.getFirstValue(arguments[2]); + if(valueIsError(match_type)){ + return match_type; + } + + if(!isRealNum(match_type)){ + return formula.error.v; + } + + match_type = Math.ceil(parseFloat(match_type)); + } + + if([-1,0,1].indexOf(match_type) == -1){ + return formula.error.na; + } + + //计算 + var index; + var indexValue; + + for (var idx = 0; idx < lookup_array.length; idx++) { + if (match_type === 1) { + if (lookup_array[idx] === lookup_value) { + return idx + 1; + } + else if (lookup_array[idx] < lookup_value) { + if (!indexValue) { + index = idx + 1; + indexValue = lookup_array[idx]; + } + else if (lookup_array[idx] > indexValue) { + index = idx + 1; + indexValue = lookup_array[idx]; + } + } + } + else if (match_type === 0) { + if (typeof lookup_value === 'string') { + lookup_value = lookup_value.replace(/\?/g, '.'); + if (lookup_array[idx].toLowerCase().match(lookup_value.toLowerCase())) { + return idx + 1; + } + } + else { + if (lookup_array[idx] === lookup_value) { + return idx + 1; + } + } + } + else if (match_type === -1) { + if (lookup_array[idx] === lookup_value) { + return idx + 1; + } + else if (lookup_array[idx] > lookup_value) { + if (!indexValue) { + index = idx + 1; + indexValue = lookup_array[idx]; + } + else if (lookup_array[idx] < indexValue) { + index = idx + 1; + indexValue = lookup_array[idx]; + } + } + } + } + + return index ? index : formula.error.na; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "VLOOKUP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //lookup_value + var lookup_value = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(lookup_value)){ + return lookup_value; + } + + if(lookup_value.toString().replace(/\s/g, "") == ""){ + return formula.error.na; + } + + //table_array + var data_table_array = arguments[1]; + var table_array = []; + + if(getObjType(data_table_array) == "array"){ + if(getObjType(data_table_array[0]) == "array"){ + if(!func_methods.isDyadicArr(data_table_array)){ + return formula.error.v; + } + + for(var i = 0; i < data_table_array.length; i++){ + var rowArr = []; + + for(var j = 0; j < data_table_array[i].length; j++){ + rowArr.push(data_table_array[i][j]); + } + + table_array.push(rowArr); + } + } + else{ + var rowArr = []; + + for(var i = 0; i < data_table_array.length; i++){ + rowArr.push(data_table_array[i]); + } + + table_array.push(rowArr); + } + } + else if(getObjType(data_table_array) == "object" && data_table_array.startCell != null){ + table_array = func_methods.getCellDataDyadicArr(data_table_array, "text"); + } + else{ + return formula.error.v; + } + + //col_index_num + var col_index_num = func_methods.getFirstValue(arguments[2]); + if(valueIsError(col_index_num)){ + return col_index_num; + } + + if(!isRealNum(col_index_num)){ + return formula.error.v; + } + + col_index_num = parseInt(col_index_num); + + //range_lookup + var range_lookup = true; + if(arguments.length == 4){ + range_lookup = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(range_lookup)){ + return range_lookup; + } + } + + //判断 + if(col_index_num < 1){ + return formula.error.v; + } + else if(col_index_num > table_array[0].length){ + return formula.error.r; + } + + //计算 + if(range_lookup){ + table_array = orderbydata(table_array, 0, true); + + for(var r = 0; r < table_array.length; r++){ + var v = table_array[r][0]; + + var result; + + if (isdatetime(lookup_value) && isdatetime(v)) { + result = diff(lookup_value, v); + } + else if (isRealNum(lookup_value) && isRealNum(v)) { + result = numeral(lookup_value).value() - numeral(v).value(); + } + else if (!isRealNum(lookup_value) && !isRealNum(v)) { + result = lookup_value.localeCompare(v, "zh"); + } + else if (!isRealNum(lookup_value)) { + result = 1; + } + else if (!isRealNum(v)) { + result = -1; + } + + if(result < 0){ + if(r == 0){ + return formula.error.na; + } + else{ + return table_array[r - 1][col_index_num - 1]; + } + } + else{ + if(r == table_array.length - 1){ + return table_array[r][col_index_num - 1]; + } + } + } + } + else{ + var index = null; + + for(var r = 0; r < table_array.length; r++){ + if(lookup_value.toString() == table_array[r][0].toString()){ + index = r; + break; + } + } + + if(index == null){ + return formula.error.na; + } + + return table_array[index][col_index_num - 1]; + } + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HLOOKUP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var searchkey = arguments[0]; + + if(typeof(searchkey) == "object"){ + searchkey = arguments[0].data; + + if (getObjType(searchkey) == "array") { + searchkey = searchkey[r]; + + if (getObjType(searchkey) == "array") { + searchkey = searchkey[c]; + } + } + else{ + searchkey = searchkey.v; + } + } + var range = arguments[1].data; + var index = arguments[2]; + var isaccurate = false; + if (arguments.length > 3) { + isaccurate = !!arguments[3]; + } + if (index > range.rowl) { + return [formula.error.v, "索引超过了范围的长度," + range[0].length]; + } + if (index < 1) { + return [formula.error.v, "索引必须大于1"]; + } + + var result = formula.error.na; + for(var c = 0;c < range[0].length;c++){ + var matchv = getcellvalue(0, c, range); + var showv = getcellvalue(index - 1, c, range); + + if (isaccurate) { + if (matchv.indexOf(searchkey) > -1) { + result = showv; + } + } else { + if (formula.acompareb(matchv,searchkey)) { + result = showv; + return result; + } + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOOKUP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //完成矢量形式(数组形式不推荐,未做) + //=LOOKUP(4.19, A2:A6, B2:B6) + //=LOOKUP(0, A2:A6, B2:B6) + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var searchkey = arguments[0]; + + if(typeof(searchkey) == "object"){ + searchkey = arguments[0].data; + + if (getObjType(searchkey) == "array") { + searchkey = searchkey[r]; + + if (getObjType(searchkey) == "array") { + searchkey = searchkey[c]; + } + } + else{ + searchkey = searchkey.v; + } + } + + //必须为一维数组 + var range = arguments[1].data; + var range2; + var result = formula.error.na; + + function sortNum(a,b){ //用于排序 + return b - a; + } + + //获得两个范围的数组 + range= formula.getRangeArray(range)[0]; + if(arguments[2]){ + range2 = arguments[2].data; + range2 = formula.getRangeArray(range2)[0]; + } + + if(typeof(searchkey) == "string"){ //字符串直接判断是否相等 + + for (var i = 0; i < range.length; i++) { + var matchv = range[i]; + var showv; + if(arguments[2]){ + showv = range2[i]; + if(matchv == searchkey) { + result = showv; + } + }else{ + if (formula.acompareb(matchv,searchkey)) { + result = matchv; + } + } + } + }else if(isdatatype(searchkey) == "num"){ //数字判断1.是否相等2.不等,去找接近值 + var rangeNow = []; + + for (var i = 0; i < range.length; i++) { + var matchv = range[i]; + var showv; + + if(arguments[2]){ + showv = range2[i]; + if(matchv == searchkey) { + result = showv; + return result; + }else if(matchv != searchkey && isdatatype(matchv) == "num"){ + rangeNow.push(matchv); + } + }else{ + if (matchv == searchkey) { + result = matchv; + return result; + }else if(matchv != searchkey && isdatatype(matchv) == "num"){ + rangeNow.push(matchv); + } + } + + } + if(rangeNow.length != 0){ + rangeNow.push(searchkey); + rangeNow.sort(sortNum); + + var index = rangeNow.indexOf(searchkey); + if(index == (rangeNow.length -1)){ + return [formula.error.na, "找不到对应参数"]; + }else{ + var mat = rangeNow[index + 1]; + if(arguments[2]){ + var i = range.indexOf(mat);//改成数组 + result = range2[i]; + }else{ + result = mat; + } + + } + } + + } + + return result; + + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "INDEX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格区域或数组常量 + var data_array = arguments[0]; + var array = []; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array" && !func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + array = func_methods.getDataDyadicArr(data_array); + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + array = func_methods.getCellDataDyadicArr(data_array, "number"); + } + + var rowlen = array.length, collen = array[0].length; + + //选择数组中的某行,函数从该行返回数值 + var row_num = func_methods.getFirstValue(arguments[1]); + if(valueIsError(row_num)){ + return row_num; + } + + if(!isRealNum(row_num)){ + return formula.error.v; + } + + row_num = parseInt(row_num); + + //选择数组中的某列,函数从该列返回数值 + var column_num = func_methods.getFirstValue(arguments[2]); + if(valueIsError(column_num)){ + return column_num; + } + + if(!isRealNum(column_num)){ + return formula.error.v; + } + + column_num = parseInt(column_num); + + if(row_num <= 0 || column_num <= 0){ + return formula.error.v; + } + + if(row_num > rowlen || column_num > collen){ + return formula.error.r; + } + + //计算 + return array[row_num - 1][column_num - 1]; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GETPIVOTDATA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return formula.error.v; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CHOOSE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //指定要返回哪一项 + var index_num = func_methods.getFirstValue(arguments[0]); + if(valueIsError(index_num)){ + return index_num; + } + + if(!isRealNum(index_num)){ + return formula.error.v; + } + + index_num = parseInt(index_num); + + if(index_num < 1 || index_num > arguments.length - 1){ + return formula.error.v; + } + + var data_result = arguments[index_num]; + + if(getObjType(data_result) == "array"){ + if(getObjType(data_result[0]) == "array" && !func_methods.isDyadicArr(data_result)){ + return formula.error.v; + } + + return data_result; + } + else if(getObjType(data_result) == "object" && data_result.startCell != null){ + if(data_result.data == null){ + return 0; + } + + if(getObjType(data_result.data) == "array"){ + var result = func_methods.getCellDataDyadicArr(data_result.data, "number"); + + return result; + } + else{ + if(isRealNull(data_result.data.v)){ + return 0; + } + + return data_result.data.v; + } + } + else{ + return data_result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HYPERLINK": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return formula.error.v; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TIME": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //时 + var hour = func_methods.getFirstValue(arguments[0]); + if(valueIsError(hour)){ + return hour; + } + + if(!isRealNum(hour)){ + return formula.error.v; + } + + hour = parseInt(hour); + + //分 + var minute = func_methods.getFirstValue(arguments[1]); + if(valueIsError(minute)){ + return minute; + } + + if(!isRealNum(minute)){ + return formula.error.v; + } + + minute = parseInt(minute); + + //秒 + var second = func_methods.getFirstValue(arguments[2]); + if(valueIsError(second)){ + return second; + } + + if(!isRealNum(second)){ + return formula.error.v; + } + + second = parseInt(second); + + if(hour < 0 || hour > 32767){ + return formula.error.nm; + } + else if(hour > 24){ + hour = hour % 24; + } + + if(minute < 0 || minute > 32767){ + return formula.error.nm; + } + + if(second < 0 || second > 32767){ + return formula.error.nm; + } + + //计算 + var time = moment().set({'hour': hour, 'minute': minute, 'second': second}); + + return moment(time).format("h:mm:ss a"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TIMEVALUE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用于表示时间的字符串 + var time_text = func_methods.getCellDate(arguments[0]); + if(valueIsError(time_text)){ + return time_text; + } + + //计算 + if(!moment(time_text).isValid()){ + return formula.error.v; + } + + return (3600 * moment(time_text).get('hour') + 60 * moment(time_text).get('minute') + moment(time_text).get('second')) / 86400; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EOMONTH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用于计算结果的参照日期 + var start_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(start_date)){ + return start_date; + } + + //月数 + var months = func_methods.getFirstValue(arguments[1]); + if(valueIsError(months)){ + return months; + } + + if(!isRealNum(months)){ + return formula.error.v; + } + + months = parseInt(months); + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //计算 + var date = moment(start_date).add(months + 1, 'months').set('date', 1).subtract(1, 'days'); + var mask = genarate(moment(date).format("YYYY-MM-DD H:mm:ss")); + + var result = mask[2]; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EDATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用于计算结果的参照日期 + var start_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(start_date)){ + return start_date; + } + + //月数 + var months = func_methods.getFirstValue(arguments[1]); + if(valueIsError(months)){ + return months; + } + + if(!isRealNum(months)){ + return formula.error.v; + } + + months = parseInt(months); + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //计算 + var date = moment(start_date).add(months, 'months'); + var mask = genarate(moment(date).format("YYYY-MM-DD h:mm:ss")); + + var result = mask[2]; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SECOND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //时间值 + var time_text = func_methods.getCellDate(arguments[0]); + if(valueIsError(time_text)){ + return time_text; + } + + if(!moment(time_text).isValid()){ + return formula.error.v; + } + + var result = moment(time_text).seconds(); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MINUTE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //时间值 + var time_text = func_methods.getCellDate(arguments[0]); + if(valueIsError(time_text)){ + return time_text; + } + + if(!moment(time_text).isValid()){ + return formula.error.v; + } + + var result = moment(time_text).minutes(); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HOUR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //时间值 + var time_text = func_methods.getCellDate(arguments[0]); + if(valueIsError(time_text)){ + return time_text; + } + + if(!moment(time_text).isValid()){ + return formula.error.v; + } + + var result = moment(time_text).hours(); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NOW": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return moment().format("YYYY-M-D HH:mm"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NETWORKDAYS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + if(arguments.length == 3){ + var result = window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0], arguments[1], 1, arguments[2]); + } + else{ + var result = window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0], arguments[1], 1); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NETWORKDAYS_INTL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var WEEKEND_TYPES = [ + [], + [6, 0], + [0, 1], + [1, 2], + [2, 3], + [3, 4], + [4, 5], + [5, 6], + undefined, + undefined, + undefined, + [0, 0], + [1, 1], + [2, 2], + [3, 3], + [4, 4], + [5, 5], + [6, 6] + ]; + + //用于计算净工作日天数的时间段开始日期 + var start_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(start_date)){ + return start_date; + } + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //用于计算净工作日天数的时间段结束日期 + var end_date = func_methods.getCellDate(arguments[1]); + if(valueIsError(end_date)){ + return end_date; + } + + if(!moment(end_date).isValid()){ + return formula.error.v; + } + + //用于表示哪些天为周末的数字或字符串 + var weekend = WEEKEND_TYPES[1]; + if(arguments.length >= 3){ + weekend = arguments[2]; + + if(typeof weekend == "string" && weekend.length == "7" && /^[0-1]{7}$/g.test(weekend)){ + + } + else{ + weekend = func_methods.getFirstValue(arguments[2]); + if(valueIsError(weekend)){ + return weekend; + } + + if(!isRealNum(weekend)){ + return formula.error.v; + } + + weekend = parseInt(weekend); + + if(weekend < 1 || (weekend > 7 && weekend < 11) || weekend > 17){ + return formula.error.nm; + } + + weekend = WEEKEND_TYPES[weekend]; + } + } + + //这是一个范围或数组常量,其中包含作为节假日的日期 + var holidays = []; + if(arguments.length == 4){ + holidays = func_methods.getCellrangeDate(arguments[3]); + if(valueIsError(holidays)){ + return holidays; + } + } + + for (var i = 0; i < holidays.length; i++) { + if(!moment(holidays[i]).isValid()){ + return formula.error.v; + } + } + + //计算 + var days = moment(end_date).diff(moment(start_date), 'days') + 1; + var total = days; + var day = moment(start_date); + + for (i = 0; i < days; i++) { + var d = moment(day).weekday(); + var dec = false; + + if(getObjType(weekend) == "array"){ + if (d === weekend[0] || d === weekend[1]) { + dec = true; + } + } + else{ + if(d == 0){ + d = 7; + } + + if(weekend.charAt(d - 1) == "0"){ + dec = true; + } + } + + for (var j = 0; j < holidays.length; j++) { + if(moment(day).diff(moment(holidays[j]), 'days') === 0){ + dec = true; + break; + } + } + + if (dec) { + total--; + } + + day = moment(day).add(1, 'days'); + } + + return total; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISOWEEKNUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用于日期和时间计算的日期 + var date = func_methods.getCellDate(arguments[0]); + if(valueIsError(date)){ + return date; + } + + if(!moment(date).isValid()){ + return formula.error.v; + } + + //计算 + return moment(date).isoWeeks(); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "WEEKNUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var WEEK_STARTS = [ + undefined, + 7, + 1, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ]; + + //用于计算净工作日天数的时间段开始日期 + var serial_number = func_methods.getCellDate(arguments[0]); + if(valueIsError(serial_number)){ + return serial_number; + } + + if(!moment(serial_number).isValid()){ + return formula.error.v; + } + + //用于表示哪些天为周末的数字或字符串 + var return_type = 1; + if(arguments.length == 2){ + return_type = func_methods.getFirstValue(arguments[1]); + if(valueIsError(return_type)){ + return return_type; + } + + if(!isRealNum(return_type)){ + return formula.error.v; + } + + return_type = parseInt(return_type); + } + + if(return_type == 21){ + return window.luckysheet_function.ISOWEEKNUM.f(arguments[0]); + } + + if([1,2,11,12,13,14,15,16,17].indexOf(return_type) == -1){ + return formula.error.nm; + } + + //计算 + var week_start = WEEK_STARTS[return_type]; + var inc = moment(serial_number).isoWeekday() >= week_start ? 1 : 0; + var result = moment(serial_number).isoWeeks() + inc; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "WEEKDAY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var WEEK_TYPES = [ + [], + [1, 2, 3, 4, 5, 6, 7], + [7, 1, 2, 3, 4, 5, 6], + [6, 0, 1, 2, 3, 4, 5], + [], + [], + [], + [], + [], + [], + [], + [7, 1, 2, 3, 4, 5, 6], + [6, 7, 1, 2, 3, 4, 5], + [5, 6, 7, 1, 2, 3, 4], + [4, 5, 6, 7, 1, 2, 3], + [3, 4, 5, 6, 7, 1, 2], + [2, 3, 4, 5, 6, 7, 1], + [1, 2, 3, 4, 5, 6, 7] + ]; + + //用于计算净工作日天数的时间段开始日期 + var serial_number = func_methods.getCellDate(arguments[0]); + if(valueIsError(serial_number)){ + return serial_number; + } + + if(!moment(serial_number).isValid()){ + return formula.error.v; + } + + //以数字指示使用哪种编号顺序来表示星期几 + var return_type = 1; + if(arguments.length == 2){ + return_type = func_methods.getFirstValue(arguments[1]); + if(valueIsError(return_type)){ + return return_type; + } + + if(!isRealNum(return_type)){ + return formula.error.v; + } + + return_type = parseInt(return_type); + } + + if([1,2,3,11,12,13,14,15,16,17].indexOf(return_type) == -1){ + return formula.error.nm; + } + + //计算 + var result = WEEK_TYPES[return_type][moment(serial_number).day()]; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DAY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //用于计算净工作日天数的时间段开始日期 + var serial_number = func_methods.getCellDate(arguments[0]); + if(valueIsError(serial_number)){ + return serial_number; + } + + if(!moment(serial_number).isValid()){ + return formula.error.v; + } + + //计算 + return moment(serial_number).date(); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DAYS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结束日期 + var end_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(end_date)){ + return end_date; + } + + if(!moment(end_date).isValid()){ + return formula.error.v; + } + + //开始日期 + var start_date = func_methods.getCellDate(arguments[1]); + if(valueIsError(start_date)){ + return start_date; + } + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //计算 + var result = moment(end_date).diff(moment(start_date), 'days'); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DAYS360": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //开始日期 + var start_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(start_date)){ + return start_date; + } + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //结束日期 + var end_date = func_methods.getCellDate(arguments[1]); + if(valueIsError(end_date)){ + return end_date; + } + + if(!moment(end_date).isValid()){ + return formula.error.v; + } + + //天数计算方法 + var method = false; + if(arguments.length == 3){ + method = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(method)){ + return method; + } + } + + //计算 + var sm = moment(start_date).month(); + var em = moment(end_date).month(); + var sd, ed; + + if (method) { + sd = moment(start_date).date() === 31 ? 30 : moment(start_date).date(); + ed = moment(end_date).date() === 31 ? 30 : moment(end_date).date(); + } + else { + var smd = moment().set({ 'year': moment(start_date).year(), 'month': sm + 1, 'date': 0 }).date(); + var emd = moment().set({ 'year': moment(end_date).year(), 'month': em + 1, 'date': 0 }).date(); + sd = moment(start_date).date() === smd ? 30 : moment(start_date).date(); + + if (moment(end_date).date() === emd) { + if (sd < 30) { + em++; + ed = 1; + } + else { + ed = 30; + } + } + else { + ed = moment(end_date).date(); + } + } + + var result = 360 * moment(end_date).diff(moment(start_date), 'years') + 30 * (em - sm) + (ed - sd); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //年 + var year = func_methods.getFirstValue(arguments[0]); + if(valueIsError(year)){ + return year; + } + + if(!isRealNum(year)){ + return formula.error.v; + } + + year = parseInt(year); + + //月 + var month = func_methods.getFirstValue(arguments[1]); + if(valueIsError(month)){ + return month; + } + + if(!isRealNum(month)){ + return formula.error.v; + } + + month = parseInt(month); + + //日 + var day = func_methods.getFirstValue(arguments[2]); + if(valueIsError(day)){ + return day; + } + + if(!isRealNum(day)){ + return formula.error.v; + } + + day = parseInt(day); + + if(year < 0 || year >= 10000){ + return formula.error.nm; + } + else if(year >= 0 && year <= 1899){ + year = year + 1900; + } + + var date = moment().set({ 'year': year, 'month': month - 1, "date": day }); + + if(moment(date).year() < 1900){ + return formula.error.nm; + } + + return moment(date).format("YYYY-MM-DD"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATEVALUE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //开始日期 + var date_text = func_methods.getCellDate(arguments[0]); + if(valueIsError(date_text)){ + return date_text; + } + + if(!moment(date_text).isValid()){ + return formula.error.v; + } + + //计算 + date_text = moment(date_text).format("YYYY-MM-DD"); + var result = genarate(date_text)[2]; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DATEDIF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + luckysheet_getValue(arguments); + for (var i = 0; i < arguments.length-1; i++){ + arguments[i] = moment.fromOADate(arguments[i]).format("l"); + if(!isdatetime(arguments[i])){ + return formula.error.v; + } + } + + var startDate = moment(arguments[0]); + var endDate = moment(arguments[1]); + var unit = arguments[2]; + var result = formula.error.v; + if(luckysheet_function.DAYS.f(endDate,startDate) < 0){ + return formula.error.v; + } + + switch(unit){ + case "Y":case "y": + result = endDate.diff(startDate,"years",false); + break; + case "M":case "m": + result = endDate.diff(startDate,"months",false); + break; + case "D":case "d": + result = endDate.diff(startDate,"days",false); + break; + case "MD":case "md": + result = endDate.format('DD') - startDate.format('DD'); + break; + case "YM":case "ym": + var startM = parseInt(startDate.format('M')); //注意字符串转化为数字 + var endM = parseInt(endDate.format('M')); + result = (startM <= endM) ? endM - startM : endM + 12 - startM; + break; + case "YD":case "yd": + var startM = genarate(startDate.format('MM-DD'))[2]; + var endM = genarate(endDate.format('MM-DD'))[2]; + + result = (startM <= endM) ? endM - startM : endM + 365 - startM; + break; + default: + result = formula.error.v; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "WORKDAY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + if(arguments.length == 3){ + var result = window.luckysheet_function.WORKDAY_INTL.f(arguments[0], arguments[1], 1, arguments[2]); + } + else{ + var result = window.luckysheet_function.WORKDAY_INTL.f(arguments[0], arguments[1], 1); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "WORKDAY_INTL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var WEEKEND_TYPES = [ + [], + [6, 0], + [0, 1], + [1, 2], + [2, 3], + [3, 4], + [4, 5], + [5, 6], + undefined, + undefined, + undefined, + [0, 0], + [1, 1], + [2, 2], + [3, 3], + [4, 4], + [5, 5], + [6, 6] + ]; + + //计算的开始日期 + var start_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(start_date)){ + return start_date; + } + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //工作日的天数 + var days = func_methods.getFirstValue(arguments[1]); + if(valueIsError(days)){ + return days; + } + + if(!isRealNum(days)){ + return formula.error.v; + } + + days = parseInt(days); + + //用于表示哪些天为周末的数字或字符串 + var weekend = WEEKEND_TYPES[1]; + if(arguments.length >= 3){ + weekend = arguments[2]; + + if(typeof weekend == "string" && weekend.length == "7" && /^[0-1]{7}$/g.test(weekend)){ + + } + else{ + weekend = func_methods.getFirstValue(arguments[2]); + if(valueIsError(weekend)){ + return weekend; + } + + if(!isRealNum(weekend)){ + return formula.error.v; + } + + weekend = parseInt(weekend); + + if(weekend < 1 || (weekend > 7 && weekend < 11) || weekend > 17){ + return formula.error.nm; + } + + weekend = WEEKEND_TYPES[weekend]; + } + } + + //这是一个范围或数组常量,其中包含作为节假日的日期 + var holidays = []; + if(arguments.length == 4){ + holidays = func_methods.getCellrangeDate(arguments[3]); + if(valueIsError(holidays)){ + return holidays; + } + } + + for (var i = 0; i < holidays.length; i++) { + if(!moment(holidays[i]).isValid()){ + return formula.error.v; + } + } + + //计算 + var d = 0; + + while (d < days) { + start_date = moment(start_date).add(1, 'days'); + var day = moment(start_date).weekday(); + + if(getObjType(weekend)){ + if (day === weekend[0] || day === weekend[1]) { + continue; + } + } + else{ + if(day == 0){ + day = 7; + } + + if(weekend.charAt(day - 1) == "0"){ + continue; + } + } + + for (var j = 0; j < holidays.length; j++) { + if(moment(start_date).diff(moment(holidays[j]), 'days') === 0){ + d--; + break; + } + } + + d++; + } + + return moment(start_date).format("YYYY-MM-DD"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "YEAR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //开始日期 + var serial_number = func_methods.getCellDate(arguments[0]); + if(valueIsError(serial_number)){ + return serial_number; + } + + if(!moment(serial_number).isValid()){ + return formula.error.v; + } + + //计算 + return moment(serial_number).year(); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "YEARFRAC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //开始日期 + var start_date = func_methods.getCellDate(arguments[0]); + if(valueIsError(start_date)){ + return start_date; + } + + if(!moment(start_date).isValid()){ + return formula.error.v; + } + + //结束日期 + var end_date = func_methods.getCellDate(arguments[1]); + if(valueIsError(end_date)){ + return end_date; + } + + if(!moment(end_date).isValid()){ + return formula.error.v; + } + + //日计数基准类型 + var basis = 0; + if(arguments.length == 3){ + basis = func_methods.getFirstValue(arguments[2]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + //计算 + var sd = moment(start_date).date(); + var sm = moment(start_date).month() + 1; + var sy = moment(start_date).year(); + var ed = moment(end_date).date(); + var em = moment(end_date).month() + 1; + var ey = moment(end_date).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(start_date, end_date) || (em === 1 && ed === 29)) { + ylength = 366; + } + + return moment(end_date).diff(moment(start_date), 'days') / ylength; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = moment(end_date).diff(moment(start_date), 'days') / average; + + break; + case 2: // Actual/360 + result = moment(end_date).diff(moment(start_date), 'days') / 360; + + break; + case 3: // Actual/365 + result = moment(end_date).diff(moment(start_date), 'days') / 365; + + break; + case 4: // European 30/360 + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TODAY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return moment().format("YYYY-MM-DD"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MONTH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //开始日期 + var serial_number = func_methods.getCellDate(arguments[0]); + if(valueIsError(serial_number)){ + return serial_number; + } + + if(!moment(serial_number).isValid()){ + return formula.error.v; + } + + //计算 + return moment(serial_number).month() + 1; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EFFECT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //每年的名义利率 + var nominal_rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(nominal_rate)){ + return nominal_rate; + } + + if(!isRealNum(nominal_rate)){ + return formula.error.v; + } + + nominal_rate = parseFloat(nominal_rate); + + //每年的复利计算期数 + var npery = func_methods.getFirstValue(arguments[1]); + if(valueIsError(npery)){ + return npery; + } + + if(!isRealNum(npery)){ + return formula.error.v; + } + + npery = parseInt(npery); + + if(nominal_rate <= 0 || npery < 1){ + return formula.error.nm; + } + + return Math.pow(1 + nominal_rate / npery, npery) - 1; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DOLLAR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要设置格式的值 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //显示的小数位数 + var decimals = 2; + if(arguments.length == 2){ + decimals = func_methods.getFirstValue(arguments[1]); + if(valueIsError(decimals)){ + return decimals; + } + + if(!isRealNum(decimals)){ + return formula.error.v; + } + + decimals = parseInt(decimals); + } + + if(decimals > 9){ + decimals = 9; + } + + var foucsStatus = "0."; + for(var i = 1; i <= decimals; i++){ + foucsStatus += "0"; + } + + //计算 + var sign = (number > 0) ? 1 : -1; + + return sign * (Math.floor(Math.abs(number) * Math.pow(10, decimals))) / Math.pow(10, decimals); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DOLLARDE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //分数 + var fractional_dollar = func_methods.getFirstValue(arguments[0]); + if(valueIsError(fractional_dollar)){ + return fractional_dollar; + } + + if(!isRealNum(fractional_dollar)){ + return formula.error.v; + } + + fractional_dollar = parseFloat(fractional_dollar); + + //用作分数中的分母的整数 + var fraction = func_methods.getFirstValue(arguments[1]); + if(valueIsError(fraction)){ + return fraction; + } + + if(!isRealNum(fraction)){ + return formula.error.v; + } + + fraction = parseInt(fraction); + + if(fraction < 0){ + return formula.error.nm; + } + else if(fraction == 0){ + return formula.error.d; + } + + //计算 + var result = parseInt(fractional_dollar, 10); + + result += (fractional_dollar % 1) * Math.pow(10, Math.ceil(Math.log(fraction) / Math.LN10)) / fraction; + + var power = Math.pow(10, Math.ceil(Math.log(fraction) / Math.LN2) + 1); + result = Math.round(result * power) / power; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DOLLARFR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //小数 + var decimal_dollar = func_methods.getFirstValue(arguments[0]); + if(valueIsError(decimal_dollar)){ + return decimal_dollar; + } + + if(!isRealNum(decimal_dollar)){ + return formula.error.v; + } + + decimal_dollar = parseFloat(decimal_dollar); + + //用作分数中的分母的整数 + var fraction = func_methods.getFirstValue(arguments[1]); + if(valueIsError(fraction)){ + return fraction; + } + + if(!isRealNum(fraction)){ + return formula.error.v; + } + + fraction = parseInt(fraction); + + if(fraction < 0){ + return formula.error.nm; + } + else if(fraction == 0){ + return formula.error.d; + } + + //计算 + var result = parseInt(decimal_dollar, 10); + + result += (decimal_dollar % 1) * Math.pow(10, -Math.ceil(Math.log(fraction) / Math.LN10)) * fraction; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DB": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //资产原值 + var cost = func_methods.getFirstValue(arguments[0]); + if(valueIsError(cost)){ + return cost; + } + + if(!isRealNum(cost)){ + return formula.error.v; + } + + cost = parseFloat(cost); + + //资产残值 + var salvage = func_methods.getFirstValue(arguments[1]); + if(valueIsError(salvage)){ + return salvage; + } + + if(!isRealNum(salvage)){ + return formula.error.v; + } + + salvage = parseFloat(salvage); + + //资产的折旧期数 + var life = func_methods.getFirstValue(arguments[2]); + if(valueIsError(life)){ + return life; + } + + if(!isRealNum(life)){ + return formula.error.v; + } + + life = parseFloat(life); + + //在使用期限内要计算折旧的折旧期 + var period = func_methods.getFirstValue(arguments[3]); + if(valueIsError(period)){ + return period; + } + + if(!isRealNum(period)){ + return formula.error.v; + } + + period = parseInt(period); + + //折旧第一年中的月数 + var month = 12; + if(arguments.length == 5){ + month = func_methods.getFirstValue(arguments[4]); + if(valueIsError(month)){ + return month; + } + + if(!isRealNum(month)){ + return formula.error.v; + } + + month = parseInt(month); + } + + if(cost < 0 || salvage < 0 || life < 0 || period < 0){ + return formula.error.nm; + } + + if(month < 1 || month > 12){ + return formula.error.nm; + } + + if(period > life){ + return formula.error.nm; + } + + if(salvage >= cost){ + return 0; + } + + //计算 + var rate = (1 - Math.pow(salvage / cost, 1 / life)).toFixed(3); + + var initial = cost * rate * month / 12; + + var total = initial; + var current = 0; + var ceiling = (period === life) ? life - 1 : period; + + for (var i = 2; i <= ceiling; i++) { + current = (cost - total) * rate; + total += current; + } + + if (period === 1) { + var result = initial; + } + else if (period === life) { + var result = (cost - total) * rate; + } + else { + var result = current; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DDB": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //资产原值 + var cost = func_methods.getFirstValue(arguments[0]); + if(valueIsError(cost)){ + return cost; + } + + if(!isRealNum(cost)){ + return formula.error.v; + } + + cost = parseFloat(cost); + + //资产残值 + var salvage = func_methods.getFirstValue(arguments[1]); + if(valueIsError(salvage)){ + return salvage; + } + + if(!isRealNum(salvage)){ + return formula.error.v; + } + + salvage = parseFloat(salvage); + + //资产的折旧期数 + var life = func_methods.getFirstValue(arguments[2]); + if(valueIsError(life)){ + return life; + } + + if(!isRealNum(life)){ + return formula.error.v; + } + + life = parseFloat(life); + + //在使用期限内要计算折旧的折旧期 + var period = func_methods.getFirstValue(arguments[3]); + if(valueIsError(period)){ + return period; + } + + if(!isRealNum(period)){ + return formula.error.v; + } + + period = parseInt(period); + + //折旧的递减系数 + var factor = 2; + if(arguments.length == 5){ + factor = func_methods.getFirstValue(arguments[4]); + if(valueIsError(factor)){ + return factor; + } + + if(!isRealNum(factor)){ + return formula.error.v; + } + + factor = parseFloat(factor); + } + + if(cost < 0 || salvage < 0 || life < 0 || period < 0 || factor <= 0){ + return formula.error.nm; + } + + if(period > life){ + return formula.error.nm; + } + + if(salvage >= cost){ + return 0; + } + + //计算 + var total = 0; + var current = 0; + + for (var i = 1; i <= period; i++) { + current = Math.min((cost - total) * (factor / life), (cost - salvage - total)); + total += current; + } + + return current; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //年金的付款总期数。 + var nper = func_methods.getFirstValue(arguments[0]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //每期的付款金额 + var pmt = func_methods.getFirstValue(arguments[1]); + if(valueIsError(pmt)){ + return pmt; + } + + if(!isRealNum(pmt)){ + return formula.error.v; + } + + pmt = parseFloat(pmt); + + //现值 + var pv = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //最后一次付款后希望得到的现金余额 + var fv = 0; + if(arguments.length >= 4){ + fv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(fv)){ + return fv; + } + + if(!isRealNum(fv)){ + return formula.error.v; + } + + fv = parseFloat(fv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length >= 5){ + type = func_methods.getFirstValue(arguments[4]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + //预期利率 + var guess = 0.1; + if(arguments.length == 6){ + guess = func_methods.getFirstValue(arguments[5]); + if(valueIsError(guess)){ + return guess; + } + + if(!isRealNum(guess)){ + return formula.error.v; + } + + guess = parseFloat(guess); + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var epsMax = 1e-6; + + var iterMax = 100; + var iter = 0; + var close = false; + var rate = guess; + + while (iter < iterMax && !close) { + var t1 = Math.pow(rate + 1, nper); + var t2 = Math.pow(rate + 1, nper - 1); + + var f1 = fv + t1 * pv + pmt * (t1 - 1) * (rate * type + 1) / rate; + var f2 = nper * t2 * pv - pmt * (t1 - 1) *(rate * type + 1) / Math.pow(rate,2); + var f3 = nper * pmt * t2 * (rate * type + 1) / rate + pmt * (t1 - 1) * type / rate; + + var newRate = rate - f1 / (f2 + f3); + + if (Math.abs(newRate - rate) < epsMax) close = true; + + iter++ + rate = newRate; + } + + if (!close) return formula.error.nm; + + return rate; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CUMPRINC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //总付款期数 + var nper = func_methods.getFirstValue(arguments[1]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //年金的现值 + var pv = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //首期 + var start_period = func_methods.getFirstValue(arguments[3]); + if(valueIsError(start_period)){ + return start_period; + } + + if(!isRealNum(start_period)){ + return formula.error.v; + } + + start_period = parseInt(start_period); + + //末期 + var end_period = func_methods.getFirstValue(arguments[4]); + if(valueIsError(end_period)){ + return end_period; + } + + if(!isRealNum(end_period)){ + return formula.error.v; + } + + end_period = parseInt(end_period); + + //指定各期的付款时间是在期初还是期末 + var type = func_methods.getFirstValue(arguments[5]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + + if(rate <= 0 || nper <= 0 || pv <= 0){ + return formula.error.nm; + } + + if(start_period < 1 || end_period < 1 || start_period > end_period){ + return formula.error.nm; + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var payment = window.luckysheet_function.PMT.f(rate, nper, pv, 0, type); + var principal = 0; + + if (start_period === 1) { + if (type === 0) { + principal = payment + pv * rate; + } + else { + principal = payment; + } + start_period++; + } + + for (var i = start_period; i <= end_period; i++) { + if (type > 0) { + principal += payment - (window.luckysheet_function.FV.f(rate, i - 2, payment, pv, 1) - payment) * rate; + } + else { + principal += payment - window.luckysheet_function.FV.f(rate, i - 1, payment, pv, 0) * rate; + } + } + + return principal; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUPNUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[2]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 4){ + var basis = func_methods.getFirstValue(arguments[3]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(maturity).date(); + var em = moment(maturity).month() + 1; + var ey = moment(maturity).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / (360 / frequency); + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { + ylength = 366; + } + + return moment(maturity).diff(moment(settlement), 'days') / (ylength / frequency); + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = moment(maturity).diff(moment(settlement), 'days') / (average / frequency); + + break; + case 2: // Actual/360 + result = moment(maturity).diff(moment(settlement), 'days') / (360 / frequency); + + break; + case 3: // Actual/365 + result = moment(maturity).diff(moment(settlement), 'days') / (365 / frequency); + + break; + case 4: // European 30/360 + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / (360 / frequency); + + break; + } + + return Math.round(result); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SYD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //资产原值 + var cost = func_methods.getFirstValue(arguments[0]); + if(valueIsError(cost)){ + return cost; + } + + if(!isRealNum(cost)){ + return formula.error.v; + } + + cost = parseFloat(cost); + + //资产残值 + var salvage = func_methods.getFirstValue(arguments[1]); + if(valueIsError(salvage)){ + return salvage; + } + + if(!isRealNum(salvage)){ + return formula.error.v; + } + + salvage = parseFloat(salvage); + + //资产的折旧期数 + var life = func_methods.getFirstValue(arguments[2]); + if(valueIsError(life)){ + return life; + } + + if(!isRealNum(life)){ + return formula.error.v; + } + + life = parseFloat(life); + + //在使用期限内要计算折旧的折旧期 + var period = func_methods.getFirstValue(arguments[3]); + if(valueIsError(period)){ + return period; + } + + if(!isRealNum(period)){ + return formula.error.v; + } + + period = parseInt(period); + + if(life == 0){ + return formula.error.nm; + } + + if(period < 1 || period > life){ + return formula.error.nm; + } + + return ((cost - salvage) * (life - period + 1) * 2) / (life * (life + 1)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TBILLEQ": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //债券购买时的贴现率 + var discount = func_methods.getFirstValue(arguments[2]); + if(valueIsError(discount)){ + return discount; + } + + if(!isRealNum(discount)){ + return formula.error.v; + } + + discount = parseFloat(discount); + + if(discount <= 0){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) > 0){ + return formula.error.nm; + } + + if(moment(maturity) - moment(settlement) > 365 * 24 * 60 * 60 * 1000){ + return formula.error.nm; + } + + return (365 * discount) / (360 - discount * moment(maturity).diff(moment(settlement), 'days')); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TBILLYIELD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的价格 + var pr = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pr)){ + return pr; + } + + if(!isRealNum(pr)){ + return formula.error.v; + } + + pr = parseFloat(pr); + + if(pr <= 0){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + if(moment(maturity) - moment(settlement) > 365 * 24 * 60 * 60 * 1000){ + return formula.error.nm; + } + + return ((100 - pr) / pr) * (360 / moment(maturity).diff(moment(settlement), 'days')); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TBILLPRICE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的价格 + var discount = func_methods.getFirstValue(arguments[2]); + if(valueIsError(discount)){ + return discount; + } + + if(!isRealNum(discount)){ + return formula.error.v; + } + + discount = parseFloat(discount); + + if(discount <= 0){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) > 0){ + return formula.error.nm; + } + + if(moment(maturity) - moment(settlement) > 365 * 24 * 60 * 60 * 1000){ + return formula.error.nm; + } + + return 100 * (1 - discount * moment(maturity).diff(moment(settlement), 'days') / 360); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //总付款期数 + var nper = func_methods.getFirstValue(arguments[1]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //每期的付款金额 + var pmt = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pmt)){ + return pmt; + } + + if(!isRealNum(pmt)){ + return formula.error.v; + } + + pmt = parseFloat(pmt); + + //最后一次付款后希望得到的现金余额 + var fv = 0; + if(arguments.length >= 4){ + fv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(fv)){ + return fv; + } + + if(!isRealNum(fv)){ + return formula.error.v; + } + + fv = parseFloat(fv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length >= 5){ + type = func_methods.getFirstValue(arguments[4]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + if (rate === 0) { + var result = -pmt * nper - fv; + } + else { + var result = (((1 - Math.pow(1 + rate, nper)) / rate) * pmt * (1 + rate * type) - fv) / Math.pow(1 + rate, nper); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ACCRINT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //有价证券的发行日 + var issue = func_methods.getCellDate(arguments[0]); + if(valueIsError(issue)){ + return issue; + } + + if(!moment(issue).isValid()){ + return formula.error.v; + } + + //有价证券的首次计息日 + var first_interest = func_methods.getCellDate(arguments[1]); + if(valueIsError(first_interest)){ + return first_interest; + } + + if(!moment(first_interest).isValid()){ + return formula.error.v; + } + + //有价证券的结算日 + var settlement = func_methods.getCellDate(arguments[2]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //有价证券的年息票利率 + var rate = func_methods.getFirstValue(arguments[3]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //证券的票面值 + var par = func_methods.getFirstValue(arguments[4]); + if(valueIsError(par)){ + return par; + } + + if(!isRealNum(par)){ + return formula.error.v; + } + + par = parseFloat(par); + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[5]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length >= 7){ + basis = func_methods.getFirstValue(arguments[6]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + //当结算日期晚于首次计息日期时用于计算总应计利息的方法 + var calc_method = true; + if(arguments.length == 8){ + calc_method = func_methods.getCellBoolen(arguments[7]); + + if(valueIsError(calc_method)){ + return calc_method; + } + } + + if(rate <= 0 || par <= 0){ + return formula.error.nm; + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(issue) - moment(settlement) >= 0){ + return formula.error.nm; + } + + //计算 + var result; + if(moment(settlement) - moment(first_interest) >= 0 && !calc_method){ + var sd = moment(first_interest).date(); + var sm = moment(first_interest).month() + 1; + var sy = moment(first_interest).year(); + var ed = moment(settlement).date(); + var em = moment(settlement).month() + 1; + var ey = moment(settlement).year(); + + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(first_interest, settlement) || (em === 1 && ed === 29)) { + ylength = 366; + } + + return moment(settlement).diff(moment(first_interest), 'days') / ylength; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = moment(settlement).diff(moment(first_interest), 'days') / average; + + break; + case 2: // Actual/360 + result = moment(settlement).diff(moment(first_interest), 'days') / 360; + + break; + case 3: // Actual/365 + result = moment(settlement).diff(moment(first_interest), 'days') / 365; + + break; + case 4: // European 30/360 + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + } + } + else{ + var sd = moment(issue).date(); + var sm = moment(issue).month() + 1; + var sy = moment(issue).year(); + var ed = moment(settlement).date(); + var em = moment(settlement).month() + 1; + var ey = moment(settlement).year(); + + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(issue, settlement) || (em === 1 && ed === 29)) { + ylength = 366; + } + + return moment(settlement).diff(moment(issue), 'days') / ylength; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = moment(settlement).diff(moment(issue), 'days') / average; + + break; + case 2: // Actual/360 + result = moment(settlement).diff(moment(issue), 'days') / 360; + + break; + case 3: // Actual/365 + result = moment(settlement).diff(moment(issue), 'days') / 365; + + break; + case 4: // European 30/360 + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + } + } + + return par * rate * result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ACCRINTM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //有价证券的发行日 + var issue = func_methods.getCellDate(arguments[0]); + if(valueIsError(issue)){ + return issue; + } + + if(!moment(issue).isValid()){ + return formula.error.v; + } + + //有价证券的到期日 + var settlement = func_methods.getCellDate(arguments[1]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //有价证券的年息票利率 + var rate = func_methods.getFirstValue(arguments[2]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //证券的票面值 + var par = func_methods.getFirstValue(arguments[3]); + if(valueIsError(par)){ + return par; + } + + if(!isRealNum(par)){ + return formula.error.v; + } + + par = parseFloat(par); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 5){ + basis = func_methods.getFirstValue(arguments[4]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(rate <= 0 || par <= 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(issue) - moment(settlement) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(issue).date(); + var sm = moment(issue).month() + 1; + var sy = moment(issue).year(); + var ed = moment(settlement).date(); + var em = moment(settlement).month() + 1; + var ey = moment(settlement).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(issue, settlement) || (em === 1 && ed === 29)) { + ylength = 366; + } + + return moment(settlement).diff(moment(issue), 'days') / ylength; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = moment(settlement).diff(moment(issue), 'days') / average; + + break; + case 2: // Actual/360 + result = moment(settlement).diff(moment(issue), 'days') / 360; + + break; + case 3: // Actual/365 + result = moment(settlement).diff(moment(issue), 'days') / 365; + + break; + case 4: // European 30/360 + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + } + + return par * rate * result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUPDAYBS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[2]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 4){ + basis = func_methods.getFirstValue(arguments[3]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var interest; //结算日之前的上一个付息日 + + var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; + + for(var i = 1; i <= maxCount; i++){ + var di = moment(maturity).subtract((12 / frequency) * i, 'months'); + + if(di <= moment(settlement)){ + interest = di; + break; + } + } + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + var sd = moment(interest).date(); + var sm = moment(interest).month() + 1; + var sy = moment(interest).year(); + var ed = moment(settlement).date(); + var em = moment(settlement).month() + 1; + var ey = moment(settlement).year(); + + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); + + break; + case 1: // Actual/actual + case 2: // Actual/360 + case 3: // Actual/365 + result = moment(settlement).diff(moment(interest), 'days'); + + break; + case 4: // European 30/360 + var sd = moment(interest).date(); + var sm = moment(interest).month() + 1; + var sy = moment(interest).year(); + var ed = moment(settlement).date(); + var em = moment(settlement).month() + 1; + var ey = moment(settlement).year(); + + result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); + + break; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUPDAYS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[2]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 4){ + basis = func_methods.getFirstValue(arguments[3]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + result = 360 / frequency; + + break; + case 1: // Actual/actual + var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; + + for(var i = 1; i <= maxCount; i++){ + var d1 = moment(maturity).subtract((12 / frequency) * i, 'months'); + if(d1 <= moment(settlement)){ + var d2 = moment(maturity).subtract((12 / frequency) * (i - 1), 'months'); + result = moment(d2).diff(moment(d1), 'days'); + break; + } + } + + break; + case 2: // Actual/360 + result = 360 / frequency; + + break; + case 3: // Actual/365 + result = 365 / frequency; + + break; + case 4: // European 30/360 + result = 360 / frequency; + + break; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUPDAYSNC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[2]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 4){ + basis = func_methods.getFirstValue(arguments[3]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var interest; //结算日之后的下一个付息日 + + var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; + + for(var i = 1; i <= maxCount; i++){ + var di = moment(maturity).subtract((12 / frequency) * i, 'months'); + + if(di <= moment(settlement)){ + interest = moment(maturity).subtract((12 / frequency) * (i - 1), 'months'); + break; + } + } + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(interest).date(); + var em = moment(interest).month() + 1; + var ey = moment(interest).year(); + + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); + + break; + case 1: // Actual/actual + case 2: // Actual/360 + case 3: // Actual/365 + result = moment(interest).diff(moment(settlement), 'days'); + + break; + case 4: // European 30/360 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(interest).date(); + var em = moment(interest).month() + 1; + var ey = moment(interest).year(); + + result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); + + break; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUPNCD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[2]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 4){ + basis = func_methods.getFirstValue(arguments[3]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var interest; //结算日之后的下一个付息日 + + var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; + + for(var i = 1; i <= maxCount; i++){ + var di = moment(maturity).subtract((12 / frequency) * i, 'months'); + + if(di <= moment(settlement)){ + interest = moment(maturity).subtract((12 / frequency) * (i - 1), 'months'); + break; + } + } + + return moment(interest).format("YYYY-MM-DD"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COUPPCD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[2]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 4){ + basis = func_methods.getFirstValue(arguments[3]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var interest; //结算日之前的上一个付息日 + + var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; + + for(var i = 1; i <= maxCount; i++){ + var di = moment(maturity).subtract((12 / frequency) * i, 'months'); + + if(di <= moment(settlement)){ + interest = di; + break; + } + } + + return moment(interest).format("YYYY-MM-DD"); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //总付款期数 + var nper = func_methods.getFirstValue(arguments[1]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //每期的付款金额 + var pmt = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pmt)){ + return pmt; + } + + if(!isRealNum(pmt)){ + return formula.error.v; + } + + pmt = parseFloat(pmt); + + //现值,或一系列未来付款的当前值的累积和 + var pv = 0; + if(arguments.length >= 4){ + pv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length >= 5){ + type = func_methods.getFirstValue(arguments[4]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var result; + if (rate === 0) { + result = pv + pmt * nper; + } + else { + var term = Math.pow(1 + rate, nper); + if (type === 1) { + result = pv * term + pmt * (1 + rate) * (term - 1) / rate; + } + else { + result = pv * term + pmt * (term - 1) / rate; + } + } + + return -result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FVSCHEDULE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //现值 + var principal = func_methods.getFirstValue(arguments[0]); + if(valueIsError(principal)){ + return principal; + } + + if(!isRealNum(principal)){ + return formula.error.v; + } + + principal = parseFloat(principal); + + //一组利率 + var data_schedule = arguments[1]; + var schedule = []; + + if(getObjType(data_schedule) == "array"){ + if(getObjType(data_schedule[0]) == "array" && !func_methods.isDyadicArr(data_schedule)){ + return formula.error.v; + } + + schedule = schedule.concat(func_methods.getDataArr(data_schedule, false)); + } + else if(getObjType(data_schedule) == "object" && data_schedule.startCell != null){ + schedule = schedule.concat(func_methods.getCellDataArr(data_schedule, "number", false)); + } + else{ + schedule.push(data_schedule); + } + + var schedule_n = []; + + for(var i = 0; i < schedule.length; i++){ + var number = schedule[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + schedule_n.push(parseFloat(number)); + } + + //计算 + var n = schedule_n.length; + var future = principal; + + for (var i = 0; i < n; i++) { + future *= 1 + schedule_n[i]; + } + + return future; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "YIELD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的年息票利率 + var rate = func_methods.getFirstValue(arguments[2]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //有价证券的价格 + var pr = func_methods.getFirstValue(arguments[3]); + if(valueIsError(pr)){ + return pr; + } + + if(!isRealNum(pr)){ + return formula.error.v; + } + + pr = parseFloat(pr); + + //有价证券的清偿价值 + var redemption = func_methods.getFirstValue(arguments[4]); + if(valueIsError(redemption)){ + return redemption; + } + + if(!isRealNum(redemption)){ + return formula.error.v; + } + + redemption = parseFloat(redemption); + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[5]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 7){ + basis = func_methods.getFirstValue(arguments[6]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(rate < 0){ + return formula.error.nm; + } + + if(pr <= 0 || redemption <= 0){ + return formula.error.nm; + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var num = window.luckysheet_function.COUPNUM.f(settlement, maturity, frequency, basis); + + if(num > 1){ + var a = 1; + var b = 0; + var yld = a; + + for(var i = 1; i <= 100; i++){ + var price = window.luckysheet_function.PRICE.f(settlement, maturity, rate, yld, redemption, frequency, basis); + + if(Math.abs(price - pr) < 0.000001){ + break; + } + + if(price > pr){ + b = yld; + } + else{ + a = yld; + } + + yld = (a + b) / 2; + } + + var result = yld; + } + else{ + var DSR = window.luckysheet_function.COUPDAYSNC.f(settlement, maturity, frequency, basis); + var E = window.luckysheet_function.COUPDAYS.f(settlement, maturity, frequency, basis); + var A = window.luckysheet_function.COUPDAYBS.f(settlement, maturity, frequency, basis); + + var T1 = redemption / 100 + rate / frequency; + var T2 = pr / 100 + (A / E) * (rate / frequency); + var T3 = frequency * E / DSR; + + var result = ((T1 - T2) / T2) * T3; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "YIELDDISC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的价格 + var pr = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pr)){ + return pr; + } + + if(!isRealNum(pr)){ + return formula.error.v; + } + + pr = parseFloat(pr); + + //有价证券的清偿价值 + var redemption = func_methods.getFirstValue(arguments[3]); + if(valueIsError(redemption)){ + return redemption; + } + + if(!isRealNum(redemption)){ + return formula.error.v; + } + + redemption = parseFloat(redemption); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 5){ + basis = func_methods.getFirstValue(arguments[4]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(pr <= 0 || redemption <= 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + var yearfrac = window.luckysheet_function.YEARFRAC.f(settlement, maturity, basis); + + return (redemption / pr - 1) / yearfrac; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NOMINAL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //每年的实际利率 + var effect_rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(effect_rate)){ + return effect_rate; + } + + if(!isRealNum(effect_rate)){ + return formula.error.v; + } + + effect_rate = parseFloat(effect_rate); + + //每年的复利期数 + var npery = func_methods.getFirstValue(arguments[1]); + if(valueIsError(npery)){ + return npery; + } + + if(!isRealNum(npery)){ + return formula.error.v; + } + + npery = parseInt(npery); + + if(effect_rate <= 0 || npery < 1){ + return formula.error.nm; + } + + return (Math.pow(effect_rate + 1, 1 / npery) - 1) * npery; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "XIRR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //投资相关收益或支出的数组或范围 + var data_values = arguments[0]; + var values = []; + + if(getObjType(data_values) == "array"){ + if(getObjType(data_values[0]) == "array" && !func_methods.isDyadicArr(data_values)){ + return formula.error.v; + } + + values = values.concat(func_methods.getDataArr(data_values, false)); + } + else if(getObjType(data_values) == "object" && data_values.startCell != null){ + values = values.concat(func_methods.getCellDataArr(data_values, "number", false)); + } + else{ + values.push(data_values); + } + + var values_n = []; + + for(var i = 0; i < values.length; i++){ + var number = values[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + values_n.push(parseFloat(number)); + } + + //与现金流数额参数中的现金流对应的日期数组或范围 + var dates = func_methods.getCellrangeDate(arguments[1]); + if(valueIsError(dates)){ + return dates; + } + + for(var i = 0; i < dates.length; i++){ + if(!moment(dates[i]).isValid()){ + return formula.error.v; + } + } + + //对内部回报率的估算值 + var guess = 0.1; + if(arguments.length == 3){ + guess = func_methods.getFirstValue(arguments[2]); + if(valueIsError(guess)){ + return guess; + } + + if(!isRealNum(guess)){ + return formula.error.v; + } + + guess = parseFloat(guess); + } + + var positive = false; + var negative = false; + for (var i = 0; i < values_n.length; i++) { + if (values_n[i] > 0) { + positive = true; + } + + if (values_n[i] < 0) { + negative = true; + } + + if(positive && negative){ + break; + } + } + + if(!positive || !negative){ + return formula.error.nm; + } + + if(values_n.length != dates.length){ + return formula.error.nm; + } + + //计算 + var irrResult = function(values, dates, rate) { + var r = rate + 1; + var result = values[0]; + + for (var i = 1; i < values.length; i++) { + result += values[i] / Math.pow(r, window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365); + } + + return result; + }; + + var irrResultDeriv = function(values, dates, rate) { + var r = rate + 1; + var result = 0; + + for (var i = 1; i < values.length; i++) { + var frac = window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365; + result -= frac * values[i] / Math.pow(r, frac + 1); + } + + return result; + }; + + var resultRate = guess; + var epsMax = 1e-10; + + var newRate, epsRate, resultValue; + var contLoop = true; + + do { + resultValue = irrResult(values_n, dates, resultRate); + newRate = resultRate - resultValue / irrResultDeriv(values_n, dates, resultRate); + epsRate = Math.abs(newRate - resultRate); + resultRate = newRate; + contLoop = (epsRate > epsMax) && (Math.abs(resultValue) > epsMax); + } + while (contLoop); + + return resultRate; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MIRR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //投资相关收益或支出的数组或范围 + var data_values = arguments[0]; + var values = []; + + if(getObjType(data_values) == "array"){ + if(getObjType(data_values[0]) == "array" && !func_methods.isDyadicArr(data_values)){ + return formula.error.v; + } + + values = values.concat(func_methods.getDataArr(data_values, false)); + } + else if(getObjType(data_values) == "object" && data_values.startCell != null){ + values = values.concat(func_methods.getCellDataArr(data_values, "number", false)); + } + else{ + values.push(data_values); + } + + var values_n = []; + + for(var i = 0; i < values.length; i++){ + var number = values[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + values_n.push(parseFloat(number)); + } + + //现金流中使用的资金支付的利率 + var finance_rate = func_methods.getFirstValue(arguments[1]); + if(valueIsError(finance_rate)){ + return finance_rate; + } + + if(!isRealNum(finance_rate)){ + return formula.error.v; + } + + finance_rate = parseFloat(finance_rate); + + //将现金流再投资的收益率 + var reinvest_rate = func_methods.getFirstValue(arguments[2]); + if(valueIsError(reinvest_rate)){ + return reinvest_rate; + } + + if(!isRealNum(reinvest_rate)){ + return formula.error.v; + } + + reinvest_rate = parseFloat(reinvest_rate); + + //计算 + var n = values_n.length; + var payments = []; + var incomes = []; + + for (var i = 0; i < n; i++) { + if (values_n[i] < 0) { + payments.push(values_n[i]); + } + else { + incomes.push(values_n[i]); + } + } + + if(payments.length == 0 || incomes.length == 0){ + return formula.error.d; + } + + var num = -window.luckysheet_function.NPV.f(reinvest_rate, incomes) * Math.pow(1 + reinvest_rate, n - 1); + var den = window.luckysheet_function.NPV.f(finance_rate, payments) * (1 + finance_rate); + + return Math.pow(num / den, 1 / (n - 1)) - 1; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IRR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //投资相关收益或支出的数组或范围 + var data_values = arguments[0]; + var values = []; + + if(getObjType(data_values) == "array"){ + if(getObjType(data_values[0]) == "array" && !func_methods.isDyadicArr(data_values)){ + return formula.error.v; + } + + values = values.concat(func_methods.getDataArr(data_values, false)); + } + else if(getObjType(data_values) == "object" && data_values.startCell != null){ + values = values.concat(func_methods.getCellDataArr(data_values, "number", false)); + } + else{ + values.push(data_values); + } + + var values_n = []; + + for(var i = 0; i < values.length; i++){ + var number = values[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + values_n.push(parseFloat(number)); + } + + //对内部回报率的估算值 + var guess = 0.1; + if(arguments.length == 2){ + guess = func_methods.getFirstValue(arguments[1]); + if(valueIsError(guess)){ + return guess; + } + + if(!isRealNum(guess)){ + return formula.error.v; + } + + guess = parseFloat(guess); + } + + var dates = []; + var positive = false; + var negative = false; + + for (var i = 0; i < values.length; i++) { + dates[i] = (i === 0) ? 0 : dates[i - 1] + 365; + + if (values[i] > 0) { + positive = true; + } + + if (values[i] < 0) { + negative = true; + } + } + + if(!positive || !negative){ + return formula.error.nm; + } + + //计算 + var irrResult = function(values, dates, rate) { + var r = rate + 1; + var result = values[0]; + + for (var i = 1; i < values.length; i++) { + // result += values[i] / Math.pow(r, window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365); + result += values[i] / Math.pow(r, (dates[i] - dates[0]) / 365); + } + + return result; + }; + + var irrResultDeriv = function(values, dates, rate) { + var r = rate + 1; + var result = 0; + + for (var i = 1; i < values.length; i++) { + // var frac = window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365; + var frac = (dates[i] - dates[0]) / 365; + result -= frac * values[i] / Math.pow(r, frac + 1); + } + + return result; + }; + + var resultRate = guess; + var epsMax = 1e-10; + + var newRate, epsRate, resultValue; + var contLoop = true; + + do { + resultValue = irrResult(values_n, dates, resultRate); + newRate = resultRate - resultValue / irrResultDeriv(values_n, dates, resultRate); + epsRate = Math.abs(newRate - resultRate); + resultRate = newRate; + contLoop = (epsRate > epsMax) && (Math.abs(resultValue) > epsMax); + } + while (contLoop); + + return resultRate; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NPV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //某一期间的贴现率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //支出(负值)和收益(正值) + var values = []; + + for(var i = 1; i < arguments.length; i++){ + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + values = values.concat(func_methods.getDataArr(data, true)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + values = values.concat(func_methods.getCellDataArr(data, "number", true)); + } + else{ + values.push(data); + } + } + + var values_n = []; + + for(var i = 0; i < values.length; i++){ + var number = values[i]; + + if(isRealNum(number)){ + values_n.push(parseFloat(number)); + } + } + + //计算 + var result = 0; + + if(values_n.length > 0){ + for(var i = 0; i < values_n.length; i++){ + result += values_n[i] / Math.pow(1 + rate, i + 1); + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "XNPV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //应用于现金流的贴现率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //与 dates 中的支付时间相对应的一系列现金流 + var data_values = arguments[1]; + var values = []; + + if(getObjType(data_values) == "array"){ + if(getObjType(data_values[0]) == "array" && !func_methods.isDyadicArr(data_values)){ + return formula.error.v; + } + + values = values.concat(func_methods.getDataArr(data_values, false)); + } + else if(getObjType(data_values) == "object" && data_values.startCell != null){ + values = values.concat(func_methods.getCellDataArr(data_values, "number", false)); + } + else{ + values.push(data_values); + } + + var values_n = []; + + for(var i = 0; i < values.length; i++){ + var number = values[i]; + + if(!isRealNum(number)){ + return formula.error.v; + } + + values_n.push(parseFloat(number)); + } + + //与现金流支付相对应的支付日期表 + var dates = func_methods.getCellrangeDate(arguments[2]); + if(valueIsError(dates)){ + return dates; + } + + for(var i = 0; i < dates.length; i++){ + if(!moment(dates[i]).isValid()){ + return formula.error.v; + } + } + + if(values_n.length != dates.length){ + return formula.error.nm; + } + + //计算 + var result = 0; + for (var i = 0; i < values_n.length; i++) { + result += values_n[i] / Math.pow(1 + rate, window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CUMIPMT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //总付款期数 + var nper = func_methods.getFirstValue(arguments[1]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //年金的现值 + var pv = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //首期 + var start_period = func_methods.getFirstValue(arguments[3]); + if(valueIsError(start_period)){ + return start_period; + } + + if(!isRealNum(start_period)){ + return formula.error.v; + } + + start_period = parseInt(start_period); + + //末期 + var end_period = func_methods.getFirstValue(arguments[4]); + if(valueIsError(end_period)){ + return end_period; + } + + if(!isRealNum(end_period)){ + return formula.error.v; + } + + end_period = parseInt(end_period); + + //指定各期的付款时间是在期初还是期末 + var type = func_methods.getFirstValue(arguments[5]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + + if(rate <= 0 || nper <= 0 || pv <= 0){ + return formula.error.nm; + } + + if(start_period < 1 || end_period < 1 || start_period > end_period){ + return formula.error.nm; + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var payment = window.luckysheet_function.PMT.f(rate, nper, pv, 0, type); + var interest = 0; + + if (start_period === 1) { + if (type === 0) { + interest = -pv; + start_period++; + } + } + + for (var i = start_period; i <= end_period; i++) { + if (type === 1) { + interest += window.luckysheet_function.FV.f(rate, i - 2, payment, pv, 1) - payment; + } + else { + interest += window.luckysheet_function.FV.f(rate, i - 1, payment, pv, 0); + } + } + + interest *= rate; + + return interest; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PMT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //贷款利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //该项贷款的付款总数 + var nper = func_methods.getFirstValue(arguments[1]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //现值 + var pv = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //最后一次付款后希望得到的现金余额 + var fv = 0; + if(arguments.length >= 4){ + fv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(fv)){ + return fv; + } + + if(!isRealNum(fv)){ + return formula.error.v; + } + + fv = parseFloat(fv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length == 5){ + type = func_methods.getFirstValue(arguments[4]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var result; + + if (rate === 0) { + result = (pv + fv) / nper; + } + else { + var term = Math.pow(1 + rate, nper); + + if (type === 1) { + result = (fv * rate / (term - 1) + pv * rate / (1 - 1 / term)) / (1 + rate); + } + else { + result = fv * rate / (term - 1) + pv * rate / (1 - 1 / term); + } + } + + return -result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IPMT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //用于计算其利息数额的期数 + var per = func_methods.getFirstValue(arguments[1]); + if(valueIsError(per)){ + return per; + } + + if(!isRealNum(per)){ + return formula.error.v; + } + + per = parseFloat(per); + + //总付款期数 + var nper = func_methods.getFirstValue(arguments[2]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //现值 + var pv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //最后一次付款后希望得到的现金余额 + var fv = 0; + if(arguments.length >= 5){ + fv = func_methods.getFirstValue(arguments[4]); + if(valueIsError(fv)){ + return fv; + } + + if(!isRealNum(fv)){ + return formula.error.v; + } + + fv = parseFloat(fv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length >= 6){ + type = func_methods.getFirstValue(arguments[5]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + if(per < 1 || per > nper){ + return formula.error.nm; + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var payment = window.luckysheet_function.PMT.f(rate, nper, pv, fv, type); + var interest; + + if (per === 1) { + if (type === 1) { + interest = 0; + } + else { + interest = -pv; + } + } + else { + if (type === 1) { + interest = window.luckysheet_function.FV.f(rate, per - 2, payment, pv, 1) - payment; + } + else { + interest = window.luckysheet_function.FV.f(rate, per - 1, payment, pv, 0); + } + } + + var result = interest * rate; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PPMT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //用于计算其利息数额的期数 + var per = func_methods.getFirstValue(arguments[1]); + if(valueIsError(per)){ + return per; + } + + if(!isRealNum(per)){ + return formula.error.v; + } + + per = parseFloat(per); + + //总付款期数 + var nper = func_methods.getFirstValue(arguments[2]); + if(valueIsError(nper)){ + return nper; + } + + if(!isRealNum(nper)){ + return formula.error.v; + } + + nper = parseFloat(nper); + + //现值 + var pv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //最后一次付款后希望得到的现金余额 + var fv = 0; + if(arguments.length >= 5){ + fv = func_methods.getFirstValue(arguments[4]); + if(valueIsError(fv)){ + return fv; + } + + if(!isRealNum(fv)){ + return formula.error.v; + } + + fv = parseFloat(fv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length >= 6){ + type = func_methods.getFirstValue(arguments[5]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + if(per < 1 || per > nper){ + return formula.error.nm; + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var payment = window.luckysheet_function.PMT.f(rate, nper, pv, fv, type); + var payment2 = window.luckysheet_function.IPMT.f(rate, per, nper, pv, fv, type); + + return payment - payment2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "INTRATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的投资额 + var investment = func_methods.getFirstValue(arguments[2]); + if(valueIsError(investment)){ + return investment; + } + + if(!isRealNum(investment)){ + return formula.error.v; + } + + investment = parseFloat(investment); + + //有价证券到期时的兑换值 + var redemption = func_methods.getFirstValue(arguments[3]); + if(valueIsError(redemption)){ + return redemption; + } + + if(!isRealNum(redemption)){ + return formula.error.v; + } + + redemption = parseFloat(redemption); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 5){ + basis = func_methods.getFirstValue(arguments[4]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(investment <= 0 || redemption <= 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(maturity).date(); + var em = moment(maturity).month() + 1; + var ey = moment(maturity).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = 360 / ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { + ylength = 366; + } + + result = ylength / moment(maturity).diff(moment(settlement), 'days'); + result = ((redemption - investment) / investment) * result; + + return result; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = average / moment(maturity).diff(moment(settlement), 'days'); + + break; + case 2: // Actual/360 + result = 360 / moment(maturity).diff(moment(settlement), 'days'); + + break; + case 3: // Actual/365 + result = 365 / moment(maturity).diff(moment(settlement), 'days'); + + break; + case 4: // European 30/360 + result = 360 / ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + + break; + } + + result = ((redemption - investment) / investment) * result; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PRICE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的年息票利率 + var rate = func_methods.getFirstValue(arguments[2]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //有价证券的年收益率 + var yld = func_methods.getFirstValue(arguments[3]); + if(valueIsError(yld)){ + return yld; + } + + if(!isRealNum(yld)){ + return formula.error.v; + } + + yld = parseFloat(yld); + + //有价证券的清偿价值 + var redemption = func_methods.getFirstValue(arguments[4]); + if(valueIsError(redemption)){ + return redemption; + } + + if(!isRealNum(redemption)){ + return formula.error.v; + } + + redemption = parseFloat(redemption); + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[5]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 7){ + basis = func_methods.getFirstValue(arguments[6]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(rate < 0 || yld < 0){ + return formula.error.nm; + } + + if(redemption <= 0){ + return formula.error.nm; + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var DSC = window.luckysheet_function.COUPDAYSNC.f(settlement, maturity, frequency, basis); + var E = window.luckysheet_function.COUPDAYS.f(settlement, maturity, frequency, basis); + var A = window.luckysheet_function.COUPDAYBS.f(settlement, maturity, frequency, basis); + var num = window.luckysheet_function.COUPNUM.f(settlement, maturity, frequency, basis); + + if(num > 1){ + var T1 = redemption / Math.pow(1 + yld / frequency, num - 1 + DSC / E); + + var T2 = 0; + for(var i = 1; i <= num; i++){ + T2 += (100 * rate / frequency) / Math.pow(1 + yld / frequency, i - 1 + DSC / E); + } + + var T3 = 100 * (rate / frequency) * (A / E); + + var result = T1 + T2 - T3; + } + else{ + var DSR = E - A; + var T1 = 100 * (rate / frequency) + redemption; + var T2 = (yld / frequency) * (DSR / E) + 1; + var T3 = 100 * (rate / frequency) * (A / E); + + var result = T1 / T2 - T3; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PRICEDISC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的贴现率 + var discount = func_methods.getFirstValue(arguments[2]); + if(valueIsError(discount)){ + return discount; + } + + if(!isRealNum(discount)){ + return formula.error.v; + } + + discount = parseFloat(discount); + + //有价证券的清偿价值 + var redemption = func_methods.getFirstValue(arguments[3]); + if(valueIsError(redemption)){ + return redemption; + } + + if(!isRealNum(redemption)){ + return formula.error.v; + } + + redemption = parseFloat(redemption); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 5){ + basis = func_methods.getFirstValue(arguments[4]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(discount <= 0 || redemption <= 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(maturity).date(); + var em = moment(maturity).month() + 1; + var ey = moment(maturity).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if (sd === 31 && ed === 31) { + sd = 30; + ed = 30; + } + else if (sd === 31) { + sd = 30; + } + else if (sd === 30 && ed === 31) { + ed = 30; + } + + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { + ylength = 366; + } + + result = moment(maturity).diff(moment(settlement), 'days') / ylength; + result = redemption - discount * redemption * result; + + return result; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + result = moment(maturity).diff(moment(settlement), 'days') / average; + + break; + case 2: // Actual/360 + result = moment(maturity).diff(moment(settlement), 'days') / 360; + + break; + case 3: // Actual/365 + result = moment(maturity).diff(moment(settlement), 'days') / 365; + + break; + case 4: // European 30/360 + result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; + + break; + } + + result = redemption - discount * redemption * result; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PRICEMAT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //发行日 + var issue = func_methods.getCellDate(arguments[2]); + if(valueIsError(issue)){ + return issue; + } + + if(!moment(issue).isValid()){ + return formula.error.v; + } + + //有价证券在发行日的利率 + var rate = func_methods.getFirstValue(arguments[3]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //有价证券的年收益率 + var yld = func_methods.getFirstValue(arguments[4]); + if(valueIsError(yld)){ + return yld; + } + + if(!isRealNum(yld)){ + return formula.error.v; + } + + yld = parseFloat(yld); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 6){ + basis = func_methods.getFirstValue(arguments[5]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(rate < 0 || yld < 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(maturity).date(); + var em = moment(maturity).month() + 1; + var ey = moment(maturity).year(); + var td = moment(issue).date(); + var tm = moment(issue).month() + 1; + var ty = moment(issue).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if(sd == 31){ + sd = 30; + } + + if(ed == 31){ + ed = 30; + } + + if(td == 31){ + td = 30; + } + + var B = 360; + var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + var DIM = ((ed + em * 30 + ey * 360) - (td + tm * 30 + ty * 360)); + var A = ((sd + sm * 30 + sy * 360) - (td + tm * 30 + ty * 360)); + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { + ylength = 366; + } + + var B = ylength; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + var DIM = moment(settlement).diff(moment(issue), 'days'); + var A = moment(maturity).diff(moment(issue), 'days'); + + result = (100 + (DIM / B * rate * 100)) / (1 + DSM / B * yld) - (A / B * rate * 100); + + return result; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + var B = average; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + var DIM = moment(settlement).diff(moment(issue), 'days'); + var A = moment(maturity).diff(moment(issue), 'days'); + + break; + case 2: // Actual/360 + var B = 360; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + var DIM = moment(settlement).diff(moment(issue), 'days'); + var A = moment(maturity).diff(moment(issue), 'days'); + + break; + case 3: // Actual/365 + var B = 365; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + var DIM = moment(settlement).diff(moment(issue), 'days'); + var A = moment(maturity).diff(moment(issue), 'days'); + + break; + case 4: // European 30/360 + var B = 360; + var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + var DIM = ((ed + em * 30 + ey * 360) - (td + tm * 30 + ty * 360)); + var A = ((sd + sm * 30 + sy * 360) - (td + tm * 30 + ty * 360)); + + break; + } + + result = (100 + (DIM / B * rate * 100)) / (1 + (DSM / B * yld)) - (A / B * rate * 100); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RECEIVED": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的投资额 + var investment = func_methods.getFirstValue(arguments[2]); + if(valueIsError(investment)){ + return investment; + } + + if(!isRealNum(investment)){ + return formula.error.v; + } + + investment = parseFloat(investment); + + //有价证券的贴现率 + var discount = func_methods.getFirstValue(arguments[3]); + if(valueIsError(discount)){ + return discount; + } + + if(!isRealNum(discount)){ + return formula.error.v; + } + + discount = parseFloat(discount); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 5){ + basis = func_methods.getFirstValue(arguments[4]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseFloat(basis); + } + + if(investment <= 0 || discount <= 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(maturity).date(); + var em = moment(maturity).month() + 1; + var ey = moment(maturity).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if(sd == 31){ + sd = 30; + } + + if(ed == 31){ + ed = 30; + } + + var B = 360; + var DIM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { + ylength = 366; + } + + var B = ylength; + var DIM = moment(maturity).diff(moment(settlement), 'days'); + + result = investment / (1 - discount * DIM / B); + + return result; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + var B = average; + var DIM = moment(maturity).diff(moment(settlement), 'days'); + + break; + case 2: // Actual/360 + var B = 360; + var DIM = moment(maturity).diff(moment(settlement), 'days'); + + break; + case 3: // Actual/365 + var B = 365; + var DIM = moment(maturity).diff(moment(settlement), 'days'); + + break; + case 4: // European 30/360 + var B = 360; + var DIM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + + break; + } + + result = investment / (1 - discount * DIM / B); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DISC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的价格 + var pr = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pr)){ + return pr; + } + + if(!isRealNum(pr)){ + return formula.error.v; + } + + pr = parseFloat(pr); + + //有价证券的清偿价值 + var redemption = func_methods.getFirstValue(arguments[3]); + if(valueIsError(redemption)){ + return redemption; + } + + if(!isRealNum(redemption)){ + return formula.error.v; + } + + redemption = parseFloat(redemption); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 5){ + basis = func_methods.getFirstValue(arguments[4]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseFloat(basis); + } + + if(pr <= 0 || redemption <= 0){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + //计算 + var sd = moment(settlement).date(); + var sm = moment(settlement).month() + 1; + var sy = moment(settlement).year(); + var ed = moment(maturity).date(); + var em = moment(maturity).month() + 1; + var ey = moment(maturity).year(); + + var result; + switch (basis) { + case 0: // US (NASD) 30/360 + if(sd == 31){ + sd = 30; + } + + if(ed == 31){ + ed = 30; + } + + var B = 360; + var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + + break; + case 1: // Actual/actual + var ylength = 365; + if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { + if ((sy === ey && func_methods.isLeapYear(sy)) || func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { + ylength = 366; + } + + var B = ylength; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + + result = ((redemption - pr) / redemption) * (B / DSM); + + return result; + } + + var years = (ey - sy) + 1; + var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, "date": 1 })) / 1000 / 60 / 60 / 24; + var average = days / years; + + var B = average; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + + break; + case 2: // Actual/360 + var B = 360; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + + break; + case 3: // Actual/365 + var B = 365; + var DSM = moment(maturity).diff(moment(settlement), 'days'); + + break; + case 4: // European 30/360 + var B = 360; + var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); + + break; + } + + result = ((redemption - pr) / redemption) * (B / DSM); + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NPER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //利率 + var rate = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rate)){ + return rate; + } + + if(!isRealNum(rate)){ + return formula.error.v; + } + + rate = parseFloat(rate); + + //各期所应支付的金额 + var pmt = func_methods.getFirstValue(arguments[1]); + if(valueIsError(pmt)){ + return pmt; + } + + if(!isRealNum(pmt)){ + return formula.error.v; + } + + pmt = parseFloat(pmt); + + //现值 + var pv = func_methods.getFirstValue(arguments[2]); + if(valueIsError(pv)){ + return pv; + } + + if(!isRealNum(pv)){ + return formula.error.v; + } + + pv = parseFloat(pv); + + //最后一次付款后希望得到的现金余额 + var fv = 0; + if(arguments.length >= 4){ + fv = func_methods.getFirstValue(arguments[3]); + if(valueIsError(fv)){ + return fv; + } + + if(!isRealNum(fv)){ + return formula.error.v; + } + + fv = parseFloat(fv); + } + + //指定各期的付款时间是在期初还是期末 + var type = 0; + if(arguments.length >= 5){ + type = func_methods.getFirstValue(arguments[4]); + if(valueIsError(type)){ + return type; + } + + if(!isRealNum(type)){ + return formula.error.v; + } + + type = parseFloat(type); + } + + if(type != 0 && type != 1){ + return formula.error.nm; + } + + //计算 + var num = pmt * (1 + rate * type) - fv * rate; + var den = (pv * rate + pmt * (1 + rate * type)); + + return Math.log(num / den) / Math.log(1 + rate); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SLN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //资产原值 + var cost = func_methods.getFirstValue(arguments[0]); + if(valueIsError(cost)){ + return cost; + } + + if(!isRealNum(cost)){ + return formula.error.v; + } + + cost = parseFloat(cost); + + //资产残值 + var salvage = func_methods.getFirstValue(arguments[1]); + if(valueIsError(salvage)){ + return salvage; + } + + if(!isRealNum(salvage)){ + return formula.error.v; + } + + salvage = parseFloat(salvage); + + //资产的折旧期数 + var life = func_methods.getFirstValue(arguments[2]); + if(valueIsError(life)){ + return life; + } + + if(!isRealNum(life)){ + return formula.error.v; + } + + life = parseFloat(life); + + if(life == 0){ + return formula.error.d; + } + + return (cost - salvage) / life; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DURATION": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的年息票利率 + var coupon = func_methods.getFirstValue(arguments[2]); + if(valueIsError(coupon)){ + return coupon; + } + + if(!isRealNum(coupon)){ + return formula.error.v; + } + + coupon = parseFloat(coupon); + + //有价证券的年收益率 + var yld = func_methods.getFirstValue(arguments[3]); + if(valueIsError(yld)){ + return yld; + } + + if(!isRealNum(yld)){ + return formula.error.v; + } + + yld = parseFloat(yld); + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[4]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 6){ + basis = func_methods.getFirstValue(arguments[5]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(coupon < 0 || yld < 0){ + return formula.error.nm; + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + var nper = window.luckysheet_function.COUPNUM.f(settlement, maturity, frequency, basis); + + var sum1 = 0; + var sum2 = 0; + for(var i = 1; i <= nper; i++){ + sum1 += 100 * (coupon / frequency) * i / Math.pow(1 + (yld / frequency), i); + sum2 += 100 * (coupon / frequency) / Math.pow(1 + (yld / frequency), i); + } + + var result = (sum1 + 100 * nper / Math.pow(1 + (yld / frequency), nper)) / (sum2 + 100 / Math.pow(1 + (yld / frequency), nper)); + result = result / frequency; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MDURATION": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //结算日 + var settlement = func_methods.getCellDate(arguments[0]); + if(valueIsError(settlement)){ + return settlement; + } + + if(!moment(settlement).isValid()){ + return formula.error.v; + } + + //到期日 + var maturity = func_methods.getCellDate(arguments[1]); + if(valueIsError(maturity)){ + return maturity; + } + + if(!moment(maturity).isValid()){ + return formula.error.v; + } + + //有价证券的年息票利率 + var coupon = func_methods.getFirstValue(arguments[2]); + if(valueIsError(coupon)){ + return coupon; + } + + if(!isRealNum(coupon)){ + return formula.error.v; + } + + coupon = parseFloat(coupon); + + //有价证券的年收益率 + var yld = func_methods.getFirstValue(arguments[3]); + if(valueIsError(yld)){ + return yld; + } + + if(!isRealNum(yld)){ + return formula.error.v; + } + + yld = parseFloat(yld); + + //年付息次数 + var frequency = func_methods.getFirstValue(arguments[4]); + if(valueIsError(frequency)){ + return frequency; + } + + if(!isRealNum(frequency)){ + return formula.error.v; + } + + frequency = parseInt(frequency); + + //日计数基准类型 + var basis = 0; + if(arguments.length == 6){ + basis = func_methods.getFirstValue(arguments[5]); + if(valueIsError(basis)){ + return basis; + } + + if(!isRealNum(basis)){ + return formula.error.v; + } + + basis = parseInt(basis); + } + + if(coupon < 0 || yld < 0){ + return formula.error.nm; + } + + if(frequency != 1 && frequency != 2 && frequency != 4){ + return formula.error.nm; + } + + if(basis < 0 || basis > 4){ + return formula.error.nm; + } + + if(moment(settlement) - moment(maturity) >= 0){ + return formula.error.nm; + } + + var duration = window.luckysheet_function.DURATION.f(settlement, maturity, coupon, yld, frequency, basis); + + return duration / (1 + yld / frequency); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BIN2DEC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //二进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!/^[01]{1,10}$/g.test(number)){ + return formula.error.nm; + } + + //计算 + var result = parseInt(number, 2); + var stringified = number.toString(); + + if (stringified.length === 10 && stringified.substring(0, 1) === '1') { + return parseInt(stringified.substring(1), 2) - 512; + } + else { + return result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BIN2HEX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //二进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if(!/^[01]{1,10}$/g.test(number)){ + return formula.error.nm; + } + + //计算 + var result = parseInt(number, 2).toString(16).toUpperCase(); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BIN2OCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //二进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if(!/^[01]{1,10}$/g.test(number)){ + return formula.error.nm; + } + + //计算 + var stringified = number.toString(); + if (stringified.length === 10 && stringified.substring(0, 1) === '1') { + return (1073741312 + parseInt(stringified.substring(1), 2)).toString(8); + } + + var result = parseInt(number, 2).toString(8); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DEC2BIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //十进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^-?[0-9]{1,3}$/.test(number) || number < -512 || number > 511) { + return formula.error.nm; + } + + //计算 + if (number < 0) { + return '1' + new Array(9 - (512 + number).toString(2).length).join('0') + (512 + number).toString(2); + } + + var result = parseInt(number, 10).toString(2); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DEC2HEX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //十进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^-?[0-9]{1,12}$/.test(number) || number < -549755813888 || number > 549755813887) { + return formula.error.nm; + } + + //计算 + if (number < 0) { + return (1099511627776 + number).toString(16).toUpperCase(); + } + + var result = parseInt(number, 10).toString(16).toUpperCase(); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DEC2OCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //十进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^-?[0-9]{1,9}$/.test(number) || number < -536870912 || number > 536870911) { + return formula.error.nm; + } + + //计算 + if (number < 0) { + return (1073741824 + number).toString(8); + } + + var result = parseInt(number, 10).toString(8); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HEX2BIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //十六进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) { + return formula.error.nm; + } + + //计算 + var negative = (number.length === 10 && number.substring(0, 1).toLowerCase() === 'f') ? true : false; + + var decimal = (negative) ? parseInt(number, 16) - 1099511627776 : parseInt(number, 16); + + if (decimal < -512 || decimal > 511) { + return formula.error.nm; + } + + if (negative) { + return '1' + new Array(9 - (512 + decimal).toString(2).length).join('0') + (512 + decimal).toString(2); + } + + var result = decimal.toString(2); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HEX2DEC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //十六进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) { + return formula.error.nm; + } + + //计算 + var decimal = parseInt(number, 16); + + return (decimal >= 549755813888) ? decimal - 1099511627776 : decimal; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "HEX2OCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //十六进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) { + return formula.error.nm; + } + + //计算 + var decimal = parseInt(number, 16); + + if (decimal > 536870911 && decimal < 1098974756864) { + return formula.error.nm; + } + + if (decimal >= 1098974756864) { + return (decimal - 1098437885952).toString(8); + } + + var result = decimal.toString(8); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "OCT2BIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //八进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^[0-7]{1,10}$/.test(number)) { + return formula.error.nm; + } + + //计算 + number = number.toString(); + + var negative = (number.length === 10 && number.substring(0, 1) === '7') ? true : false; + + var decimal = (negative) ? parseInt(number, 8) - 1073741824 : parseInt(number, 8); + + if (decimal < -512 || decimal > 511) { + return error.num; + } + + if (negative) { + return '1' + new Array(9 - (512 + decimal).toString(2).length).join('0') + (512 + decimal).toString(2); + } + + var result = decimal.toString(2); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "OCT2DEC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //八进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if (!/^[0-7]{1,10}$/.test(number)) { + return formula.error.nm; + } + + //计算 + var decimal = parseInt(number, 8); + + return (decimal >= 536870912) ? decimal - 1073741824 : decimal; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "OCT2HEX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //八进制数 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + //有效位数 + var places = null; + if(arguments.length == 2){ + places = func_methods.getFirstValue(arguments[1]); + if(valueIsError(places)){ + return places; + } + + if(!isRealNum(places)){ + return formula.error.v; + } + + places = parseInt(places); + } + + if (!/^[0-7]{1,10}$/.test(number)) { + return formula.error.nm; + } + + //计算 + var decimal = parseInt(number, 8); + + if (decimal >= 536870912) { + return 'FF' + (decimal + 3221225472).toString(16).toUpperCase(); + } + + var result = decimal.toString(16).toUpperCase(); + + if (places == null) { + return result; + } + else { + if(places < 0 || places < result.length){ + return formula.error.nm; + } + + return new Array(places - result.length + 1).join('0') + result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COMPLEX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //复数的实系数 + var real_num = func_methods.getFirstValue(arguments[0]); + if(valueIsError(real_num)){ + return real_num; + } + + if(!isRealNum(real_num)){ + return formula.error.v; + } + + real_num = parseFloat(real_num); + + //复数的虚系数 + var i_num = func_methods.getFirstValue(arguments[1]); + if(valueIsError(i_num)){ + return i_num; + } + + if(!isRealNum(i_num)){ + return formula.error.v; + } + + i_num = parseFloat(i_num); + + //复数中虚系数的后缀 + var suffix = "i"; + if(arguments.length == 3){ + suffix = arguments[2].toString(); + } + + if(suffix != "i" && suffix != "j"){ + return formula.error.v; + } + + //计算 + if (real_num === 0 && i_num === 0) { + return 0; + } + else if (real_num === 0) { + return (i_num === 1) ? suffix : i_num.toString() + suffix; + } + else if (i_num === 0) { + return real_num.toString(); + } + else { + var sign = (i_num > 0) ? '+' : ''; + return real_num.toString() + sign + ((i_num === 1) ? suffix : i_num.toString() + suffix); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMREAL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //复数 + var inumber = func_methods.getFirstValue(arguments[0]); + if(valueIsError(inumber)){ + return inumber; + } + + inumber = inumber.toString(); + + if(inumber.toLowerCase() == "true" || inumber.toLowerCase() == "false"){ + return formula.error.v; + } + + //计算 + if(inumber == "0"){ + return 0; + } + + if(['i', '+i', '1i', '+1i', '-i', '-1i', 'j', '+j', '1j', '+1j', '-j', '-1j'].indexOf(inumber) >= 0){ + return 0; + } + + var plus = inumber.indexOf('+'); + var minus = inumber.indexOf('-'); + + if (plus === 0) { + plus = inumber.indexOf('+', 1); + } + + if (minus === 0) { + minus = inumber.indexOf('-', 1); + } + + var last = inumber.substring(inumber.length - 1, inumber.length); + var unit = (last === 'i' || last === 'j'); + + if (plus >= 0 || minus >= 0) { + if (!unit) { + return formula.error.nm; + } + + if (plus >= 0) { + return (isNaN(inumber.substring(0, plus)) || isNaN(inumber.substring(plus + 1, inumber.length - 1))) ? formula.error.nm : Number(inumber.substring(0, plus)); + } + else { + return (isNaN(inumber.substring(0, minus)) || isNaN(inumber.substring(minus + 1, inumber.length - 1))) ? formula.error.nm : Number(inumber.substring(0, minus)); + } + } + else { + if (unit) { + return (isNaN(inumber.substring(0, inumber.length - 1))) ? formula.error.nm : 0; + } + else { + return (isNaN(inumber)) ? formula.error.nm : inumber; + } + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMAGINARY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //复数 + var inumber = func_methods.getFirstValue(arguments[0]); + if(valueIsError(inumber)){ + return inumber; + } + + inumber = inumber.toString(); + + if(inumber.toLowerCase() == "true" || inumber.toLowerCase() == "false"){ + return formula.error.v; + } + + //计算 + if(inumber == "0"){ + return 0; + } + + if (['i', 'j'].indexOf(inumber) >= 0) { + return 1; + } + + inumber = inumber.replace('+i', '+1i').replace('-i', '-1i').replace('+j', '+1j').replace('-j', '-1j'); + + var plus = inumber.indexOf('+'); + var minus = inumber.indexOf('-'); + + if (plus === 0) { + plus = inumber.indexOf('+', 1); + } + + if (minus === 0) { + minus = inumber.indexOf('-', 1); + } + + var last = inumber.substring(inumber.length - 1, inumber.length); + var unit = (last === 'i' || last === 'j'); + + if (plus >= 0 || minus >= 0) { + if (!unit) { + return formula.error.nm; + } + + if (plus >= 0) { + return (isNaN(inumber.substring(0, plus)) || isNaN(inumber.substring(plus + 1, inumber.length - 1))) ? formula.error.nm : Number(inumber.substring(plus + 1, inumber.length - 1)); + } + else { + return (isNaN(inumber.substring(0, minus)) || isNaN(inumber.substring(minus + 1, inumber.length - 1))) ? formula.error.nm : -Number(inumber.substring(minus + 1, inumber.length - 1)); + } + } + else { + if (unit) { + return (isNaN(inumber.substring(0, inumber.length - 1))) ? formula.error.nm : inumber.substring(0, inumber.length - 1); + } + else { + return (isNaN(inumber)) ? formula.error.nm : 0; + } + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMCONJUGATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //复数 + var inumber = func_methods.getFirstValue(arguments[0]); + if(valueIsError(inumber)){ + return inumber; + } + + inumber = inumber.toString(); + + var x = window.luckysheet_function.IMREAL.f(inumber); + if(valueIsError(x)){ + return x; + } + + var y = window.luckysheet_function.IMAGINARY.f(inumber); + if(valueIsError(y)){ + return y; + } + + var unit = inumber.substring(inumber.length - 1); + unit = (unit === 'i' || unit === 'j') ? unit : 'i'; + + return (y !== 0) ? window.luckysheet_function.COMPLEX.f(x, -y, unit) : inumber; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMABS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var x = window.luckysheet_function.IMREAL.f(arguments[0]); + if(valueIsError(x)){ + return x; + } + + var y = window.luckysheet_function.IMAGINARY.f(arguments[0]); + if(valueIsError(y)){ + return y; + } + + return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DELTA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //第一个数字 + var number1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number1)){ + return number1; + } + + if(!isRealNum(number1)){ + return formula.error.v; + } + + number1 = parseFloat(number1); + + //第二个数字 + var number2 = 0; + if(arguments.length == 2){ + number2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number2)){ + return number2; + } + + if(!isRealNum(number2)){ + return formula.error.v; + } + + number2 = parseFloat(number2); + } + + return (number1 === number2) ? 1 : 0; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMSUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var x = window.luckysheet_function.IMREAL.f(arguments[0]); + if(valueIsError(x)){ + return x; + } + + var y = window.luckysheet_function.IMAGINARY.f(arguments[0]); + if(valueIsError(y)){ + return y; + } + + var result = arguments[0]; + + for(var i = 1; i < arguments.length; i++){ + var a = window.luckysheet_function.IMREAL.f(result); + if(valueIsError(a)){ + return a; + } + + var b = window.luckysheet_function.IMAGINARY.f(result); + if(valueIsError(b)){ + return b; + } + + var c = window.luckysheet_function.IMREAL.f(arguments[i]); + if(valueIsError(c)){ + return c; + } + + var d = window.luckysheet_function.IMAGINARY.f(arguments[i]); + if(valueIsError(d)){ + return d; + } + + result = window.luckysheet_function.COMPLEX.f(a + c, b + d); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMSUB": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //inumber1 + var inumber1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(inumber1)){ + return inumber1; + } + + inumber1 = inumber1.toString(); + + if(inumber1.toLowerCase() == "true" || inumber1.toLowerCase() == "false"){ + return formula.error.v; + } + + var a = window.luckysheet_function.IMREAL.f(inumber1); + if(valueIsError(a)){ + return a; + } + + var b = window.luckysheet_function.IMAGINARY.f(inumber1); + if(valueIsError(b)){ + return b; + } + + //inumber2 + var inumber2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(inumber2)){ + return inumber2; + } + + inumber2 = inumber2.toString(); + + if(inumber2.toLowerCase() == "true" || inumber2.toLowerCase() == "false"){ + return formula.error.v; + } + + var c = window.luckysheet_function.IMREAL.f(inumber2); + if(valueIsError(c)){ + return c; + } + + var d = window.luckysheet_function.IMAGINARY.f(inumber2); + if(valueIsError(d)){ + return d; + } + + //计算 + var unit1 = inumber1.substring(inumber1.length - 1); + var unit2 = inumber2.substring(inumber2.length - 1); + + var unit = 'i'; + + if (unit1 === 'j') { + unit = 'j'; + } + else if (unit2 === 'j') { + unit = 'j'; + } + + return window.luckysheet_function.COMPLEX.f(a - c, b - d, unit); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMPRODUCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var x = window.luckysheet_function.IMREAL.f(arguments[0]); + if(valueIsError(x)){ + return x; + } + + var y = window.luckysheet_function.IMAGINARY.f(arguments[0]); + if(valueIsError(y)){ + return y; + } + + var result = arguments[0]; + + for(var i = 1; i < arguments.length; i++){ + var a = window.luckysheet_function.IMREAL.f(result); + if(valueIsError(a)){ + return a; + } + + var b = window.luckysheet_function.IMAGINARY.f(result); + if(valueIsError(b)){ + return b; + } + + var c = window.luckysheet_function.IMREAL.f(arguments[i]); + if(valueIsError(c)){ + return c; + } + + var d = window.luckysheet_function.IMAGINARY.f(arguments[i]); + if(valueIsError(d)){ + return d; + } + + result = window.luckysheet_function.COMPLEX.f(a * c - b * d, a * d + b * c); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IMDIV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //inumber1 + var inumber1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(inumber1)){ + return inumber1; + } + + inumber1 = inumber1.toString(); + + if(inumber1.toLowerCase() == "true" || inumber1.toLowerCase() == "false"){ + return formula.error.v; + } + + var a = window.luckysheet_function.IMREAL.f(inumber1); + if(valueIsError(a)){ + return a; + } + + var b = window.luckysheet_function.IMAGINARY.f(inumber1); + if(valueIsError(b)){ + return b; + } + + //inumber2 + var inumber2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(inumber2)){ + return inumber2; + } + + inumber2 = inumber2.toString(); + + if(inumber2.toLowerCase() == "true" || inumber2.toLowerCase() == "false"){ + return formula.error.v; + } + + var c = window.luckysheet_function.IMREAL.f(inumber2); + if(valueIsError(c)){ + return c; + } + + var d = window.luckysheet_function.IMAGINARY.f(inumber2); + if(valueIsError(d)){ + return d; + } + + //计算 + var unit1 = inumber1.substring(inumber1.length - 1); + var unit2 = inumber2.substring(inumber2.length - 1); + + var unit = 'i'; + + if (unit1 === 'j') { + unit = 'j'; + } + else if (unit2 === 'j') { + unit = 'j'; + } + + if (c === 0 && d === 0) { + return formula.error.nm; + } + + var den = c * c + d * d; + + return window.luckysheet_function.COMPLEX.f((a * c + b * d) / den, (b * c - a * d) / den, unit); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NOT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //logical + var logical = func_methods.getCellBoolen(arguments[0]); + + if(valueIsError(logical)){ + return logical; + } + + return !logical; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TRUE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return true; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FALSE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return false; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var result = true; + + for(var i = 0; i < arguments.length; i++){ + var logical = func_methods.getCellBoolen(arguments[i]); + + if(valueIsError(logical)){ + return logical; + } + + if(!logical){ + result = false; + break; + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IFERROR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var value_if_error = func_methods.getFirstValue(arguments[1], "text"); + + var value = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(value)){ + return value_if_error; + } + + return value; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "IF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要测试的条件 + var logical_test = func_methods.getCellBoolen(arguments[0]); + if(valueIsError(logical_test)){ + return logical_test; + } + + //结果为 TRUE + var value_if_true = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(value_if_true)){ + return value_if_true; + } + + //结果为 FALSE + var value_if_false = ""; + if(arguments.length == 3){ + value_if_false = func_methods.getFirstValue(arguments[2], "text"); + if(valueIsError(value_if_false)){ + return value_if_false; + } + } + + if(logical_test){ + return value_if_true; + } + else{ + return value_if_false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "OR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var result = false; + + for(var i = 0; i < arguments.length; i++){ + var logical = func_methods.getCellBoolen(arguments[i]); + + if(valueIsError(logical)){ + return logical; + } + + if(logical){ + result = true; + break; + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + return value1 != value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EQ": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + return value1 == value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 > value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GTE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 >= value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 < value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LTE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 <= value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ADD": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 + value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MINUS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 - value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MULTIPLY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + return value1 * value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DIVIDE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value1)){ + return value1; + } + + if(!isRealNum(value1)){ + return formula.error.v; + } + + value1 = parseFloat(value1); + + //value2 + var value2 = func_methods.getFirstValue(arguments[1]); + if(valueIsError(value2)){ + return value2; + } + + if(!isRealNum(value2)){ + return formula.error.v; + } + + value2 = parseFloat(value2); + + if(value2 == 0){ + return formula.error.d; + } + + return value1 / value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CONCAT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //value1 + var value1 = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(value1)){ + return value1; + } + + //value2 + var value2 = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(value2)){ + return value2; + } + + return value1 + "" + value2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "UNARY_PERCENT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要作为百分比解释的数值 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + var result = number / 100; + + return Math.round(result * 100) / 100; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CONCATENATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var result = ""; + + for(var i = 0; i < arguments.length; i++){ + var text = func_methods.getFirstValue(arguments[i], "text"); + if(valueIsError(text)){ + return text; + } + + result = result + "" + text; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CODE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + if(text == ""){ + return formula.error.v; + } + + return text.charCodeAt(0); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CHAR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + if(number < 1 || number > 255){ + return formula.error.v; + } + + return String.fromCharCode(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ARABIC": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString().toUpperCase(); + + if (!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(text)) { + return formula.error.v; + } + + var r = 0; + text.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g, function(i) { + r += { + M: 1000, + CM: 900, + D: 500, + CD: 400, + C: 100, + XC: 90, + L: 50, + XL: 40, + X: 10, + IX: 9, + V: 5, + IV: 4, + I: 1 + }[i]; + }); + + return r; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ROMAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseInt(number); + + if(number == 0){ + return ""; + } + else if(number < 1 || number > 3999){ + return formula.error.v; + } + + //计算 + function convert(num) { + var a=[ + ["","I","II","III","IV","V","VI","VII","VIII","IX"], + ["","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"], + ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"], + ["","M","MM","MMM"] + ]; + + var i = a[3][Math.floor(num / 1000)]; + var j = a[2][Math.floor(num % 1000 / 100)]; + var k = a[1][Math.floor(num % 100 / 10)]; + var l = a[0][num % 10]; + + return i + j + k + l; + } + + return convert(number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "REGEXEXTRACT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //输入文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + //表达式 + var regular_expression = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(regular_expression)){ + return regular_expression; + } + + var match = text.match(new RegExp(regular_expression)); + return match ? (match[match.length > 1 ? match.length - 1 : 0]) : null; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "REGEXMATCH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //输入文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + //表达式 + var regular_expression = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(regular_expression)){ + return regular_expression; + } + + var match = text.match(new RegExp(regular_expression)); + return match ? true : false; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "REGEXREPLACE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //输入文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + //表达式 + var regular_expression = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(regular_expression)){ + return regular_expression; + } + + //插入文本 + var replacement = func_methods.getFirstValue(arguments[2], "text"); + if(valueIsError(replacement)){ + return replacement; + } + + return text.replace(new RegExp(regular_expression), replacement); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "T": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //文本 + var value = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(value)){ + return value; + } + + return getObjType(value) == "string" ? value : ''; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FIXED": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要进行舍入并转换为文本的数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //小数位数 + var decimals = 2; + if(arguments.length >= 2){ + decimals = func_methods.getFirstValue(arguments[1]); + if(valueIsError(decimals)){ + return decimals; + } + + if(!isRealNum(decimals)){ + return formula.error.v; + } + + decimals = parseInt(decimals); + } + + //逻辑值 + var no_commas = false; + if(arguments.length == 3){ + no_commas = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(no_commas)){ + return no_commas; + } + } + + if(decimals > 127){ + return formula.error.v; + } + + //计算 + var format = no_commas ? '0' : '#,##0'; + + if (decimals <= 0) { + number = Math.round(number * Math.pow(10, decimals)) / Math.pow(10, decimals); + } + else if (decimals > 0) { + format += '.' + new Array(decimals + 1).join('0'); + } + + return update(format, number); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FIND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要查找的文本 + var find_text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(find_text)){ + return find_text; + } + + find_text = find_text.toString(); + + //包含要查找文本的文本 + var within_text = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(within_text)){ + return within_text; + } + + within_text = within_text.toString(); + + //指定开始进行查找的字符 + var start_num = 1; + if(arguments.length == 3){ + start_num = func_methods.getFirstValue(arguments[2]); + if(valueIsError(start_num)){ + return start_num; + } + + if(!isRealNum(start_num)){ + return formula.error.v; + } + + start_num = parseFloat(start_num); + } + + if(start_num < 0 || start_num > within_text.length){ + return formula.error.v; + } + + if(find_text == ""){ + return start_num; + } + + if(within_text.indexOf(find_text) == -1){ + return formula.error.v; + } + + var result = within_text.indexOf(find_text, start_num - 1) + 1; + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FINDB": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要查找的文本 + var find_text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(find_text)){ + return find_text; + } + + find_text = find_text.toString(); + + //包含要查找文本的文本 + var within_text = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(within_text)){ + return within_text; + } + + within_text = within_text.toString(); + + //指定开始进行查找的字符 + var start_num = 1; + if(arguments.length == 3){ + start_num = func_methods.getFirstValue(arguments[2]); + if(valueIsError(start_num)){ + return start_num; + } + + if(!isRealNum(start_num)){ + return formula.error.v; + } + + start_num = parseFloat(start_num); + } + + if(start_num < 0 || start_num > within_text.length){ + return formula.error.v; + } + + if(find_text == ""){ + return start_num; + } + + if(within_text.indexOf(find_text) == -1){ + return formula.error.v; + } + + var strArr = within_text.split(""); + var index = within_text.indexOf(find_text, start_num - 1); + + var result = 0; + for(var i = 0; i < index; i++){ + if(/[^\x00-\xff]/g.test(strArr[i])){ + result += 2; + } + else{ + result += 1; + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "JOIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //定界符 + var separator = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(separator)){ + return separator; + } + + //值或数组 + var dataArr = []; + + for(var i = 1; i < arguments.length; i++){ + var data = arguments[i]; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + dataArr = dataArr.concat(func_methods.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + dataArr = dataArr.concat(func_methods.getCellDataArr(data, "text", false)); + } + else{ + dataArr.push(data); + } + } + + return dataArr.join(separator); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LEFT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //包含要提取的字符的文本字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + //提取的字符的数量 + var num_chars = 1; + if(arguments.length == 2){ + num_chars = func_methods.getFirstValue(arguments[1]); + if(valueIsError(num_chars)){ + return num_chars; + } + + if(!isRealNum(num_chars)){ + return formula.error.v; + } + + num_chars = parseInt(num_chars); + } + + if(num_chars < 0){ + return formula.error.v; + } + + //计算 + if(num_chars >= text.length){ + return text; + } + else if(num_chars == 0){ + return ""; + } + else{ + return text.substr(0, num_chars); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RIGHT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //包含要提取的字符的文本字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + //提取的字符的数量 + var num_chars = 1; + if(arguments.length == 2){ + num_chars = func_methods.getFirstValue(arguments[1]); + if(valueIsError(num_chars)){ + return num_chars; + } + + if(!isRealNum(num_chars)){ + return formula.error.v; + } + + num_chars = parseInt(num_chars); + } + + if(num_chars < 0){ + return formula.error.v; + } + + //计算 + if(num_chars >= text.length){ + return text; + } + else if(num_chars == 0){ + return ""; + } + else{ + return text.substr(-num_chars, num_chars); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MID": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //包含要提取的字符的文本字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + //开始提取的位置 + var start_num = func_methods.getFirstValue(arguments[1]); + if(valueIsError(start_num)){ + return start_num; + } + + if(!isRealNum(start_num)){ + return formula.error.v; + } + + start_num = parseInt(start_num); + + //提取的字符的数量 + var num_chars = func_methods.getFirstValue(arguments[2]); + if(valueIsError(num_chars)){ + return num_chars; + } + + if(!isRealNum(num_chars)){ + return formula.error.v; + } + + num_chars = parseInt(num_chars); + + if(start_num < 1 || num_chars < 0){ + return formula.error.v; + } + + //计算 + if(start_num > text.length){ + return ""; + } + + if(start_num + num_chars > text.length){ + return text.substr(start_num - 1, text.length - start_num + 1); + } + + return text.substr(start_num - 1, num_chars); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LEN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + return text.length; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LENB": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + return text.replace(/[^\x00-\xff]/g, "aa").length; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOWER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + return text ? text.toLowerCase() : text; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "UPPER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + return text ? text.toUpperCase() : text; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "EXACT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串1 + var text1 = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text1)){ + return text1; + } + + text1 = text1.toString(); + + //字符串2 + var text2 = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(text2)){ + return text2; + } + + text2 = text2.toString(); + + return text1 === text2; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "REPLACE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串1 + var old_text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(old_text)){ + return old_text; + } + + old_text = old_text.toString(); + + //进行替换操作的位置 + var start_num = func_methods.getFirstValue(arguments[1]); + if(valueIsError(start_num)){ + return start_num; + } + + if(!isRealNum(start_num)){ + return formula.error.v; + } + + start_num = parseInt(start_num); + + //要在文本中替换的字符个数 + var num_chars = func_methods.getFirstValue(arguments[2]); + if(valueIsError(num_chars)){ + return num_chars; + } + + if(!isRealNum(num_chars)){ + return formula.error.v; + } + + num_chars = parseInt(num_chars); + + //字符串2 + var new_text = func_methods.getFirstValue(arguments[3], "text"); + if(valueIsError(new_text)){ + return new_text; + } + + new_text = new_text.toString(); + + return old_text.substr(0, start_num - 1) + new_text + old_text.substr(start_num - 1 + num_chars); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "REPT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串1 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + //重复次数 + var number_times = func_methods.getFirstValue(arguments[1]); + if(valueIsError(number_times)){ + return number_times; + } + + if(!isRealNum(number_times)){ + return formula.error.v; + } + + number_times = parseInt(number_times); + + if(number_times < 0){ + return formula.error.v; + } + + if(number_times > 100){ + number_times = 100; + } + + return new Array(number_times + 1).join(text); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SEARCH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串1 + var find_text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(find_text)){ + return find_text; + } + + find_text = find_text.toString(); + + //字符串2 + var within_text = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(within_text)){ + return within_text; + } + + within_text = within_text.toString(); + + //开始位置 + var start_num = 1; + if(arguments.length == 3){ + start_num = func_methods.getFirstValue(arguments[2]); + if(valueIsError(start_num)){ + return start_num; + } + + if(!isRealNum(start_num)){ + return formula.error.v; + } + + start_num = parseInt(start_num); + } + + if(start_num <= 0 || start_num > within_text.length){ + return formula.error.v; + } + + var foundAt = within_text.toLowerCase().indexOf(find_text.toLowerCase(), start_num - 1) + 1; + + return (foundAt === 0) ? formula.error.v : foundAt; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUBSTITUTE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //需要替换其中字符的文本 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + //需要替换的文本 + var old_text = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(old_text)){ + return old_text; + } + + old_text = old_text.toString(); + + //用于替换 old_text 的文本 + var new_text = func_methods.getFirstValue(arguments[2], "text"); + if(valueIsError(new_text)){ + return new_text; + } + + new_text = new_text.toString(); + + //instance_num + var instance_num = null; + if(arguments.length == 4){ + instance_num = func_methods.getFirstValue(arguments[3]); + if(valueIsError(instance_num)){ + return instance_num; + } + + if(!isRealNum(instance_num)){ + return formula.error.v; + } + + instance_num = parseInt(instance_num); + } + + //计算 + var reg = new RegExp(old_text, "g"); + + var result; + + if(instance_num == null){ + result = text.replace(reg, new_text); + } + else{ + if(instance_num <= 0){ + return formula.error.v; + } + + var match = text.match(reg); + + if(match == null || instance_num > match.length){ + return text; + } + else{ + var len = old_text.length; + var index = 0; + + for(var i = 1; i <= instance_num; i++){ + index = text.indexOf(old_text, index) + 1; + } + + result = text.substring(0, index - 1) + new_text + text.substring(index - 1 + len); + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CLEAN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + var textArr = []; + for(var i = 0; i < text.length; i++){ + var code = text.charCodeAt(i); + + if(/[\u4e00-\u9fa5]/g.test(text.charAt(i)) || (code > 31 && code < 127)){ + textArr.push(text.charAt(i)); + } + } + + return textArr.join(""); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TEXT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var value = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value)){ + return value; + } + + if(!isRealNum(value)){ + return formula.error.v; + } + + value = parseFloat(value); + + //格式 + var format_text = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(format_text)){ + return format_text; + } + + format_text = format_text.toString(); + + return update(format_text, value); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TRIM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + return text.replace(/ +/g, ' ').trim(); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "VALUE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString(); + + return genarate(text)[2]; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PROPER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //字符串 + var text = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(text)){ + return text; + } + + text = text.toString().toLowerCase(); + + return text.replace(/[a-zA-Z]+/g, function(word){ return word.substring(0,1).toUpperCase() + word.substring(1); }) + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CONVERT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var number = func_methods.getFirstValue(arguments[0]); + if(valueIsError(number)){ + return number; + } + + if(!isRealNum(number)){ + return formula.error.v; + } + + number = parseFloat(number); + + //数值的单位 + var from_unit = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(from_unit)){ + return from_unit; + } + + from_unit = from_unit.toString(); + + //结果的单位 + var to_unit = func_methods.getFirstValue(arguments[2], "text"); + if(valueIsError(to_unit)){ + return to_unit; + } + + to_unit = to_unit.toString(); + + //计算 + var units = [ + ["a.u. of action", "?", null, "action", false, false, 1.05457168181818e-34], + ["a.u. of charge", "e", null, "electric_charge", false, false, 1.60217653141414e-19], + ["a.u. of energy", "Eh", null, "energy", false, false, 4.35974417757576e-18], + ["a.u. of length", "a?", null, "length", false, false, 5.29177210818182e-11], + ["a.u. of mass", "m?", null, "mass", false, false, 9.10938261616162e-31], + ["a.u. of time", "?/Eh", null, "time", false, false, 2.41888432650516e-17], + ["admiralty knot", "admkn", null, "speed", false, true, 0.514773333], + ["ampere", "A", null, "electric_current", true, false, 1], + ["ampere per meter", "A/m", null, "magnetic_field_intensity", true, false, 1], + ["ångström", "Å", ["ang"], "length", false, true, 1e-10], + ["are", "ar", null, "area", false, true, 100], + ["astronomical unit", "ua", null, "length", false, false, 1.49597870691667e-11], + ["bar", "bar", null, "pressure", false, false, 100000], + ["barn", "b", null, "area", false, false, 1e-28], + ["becquerel", "Bq", null, "radioactivity", true, false, 1], + ["bit", "bit", ["b"], "information", false, true, 1], + ["btu", "BTU", ["btu"], "energy", false, true, 1055.05585262], + ["byte", "byte", null, "information", false, true, 8], + ["candela", "cd", null, "luminous_intensity", true, false, 1], + ["candela per square metre", "cd/m?", null, "luminance", true, false, 1], + ["coulomb", "C", null, "electric_charge", true, false, 1], + ["cubic ångström", "ang3", ["ang^3"], "volume", false, true, 1e-30], + ["cubic foot", "ft3", ["ft^3"], "volume", false, true, 0.028316846592], + ["cubic inch", "in3", ["in^3"], "volume", false, true, 0.000016387064], + ["cubic light-year", "ly3", ["ly^3"], "volume", false, true, 8.46786664623715e-47], + ["cubic metre", "m?", null, "volume", true, true, 1], + ["cubic mile", "mi3", ["mi^3"], "volume", false, true, 4168181825.44058], + ["cubic nautical mile", "Nmi3", ["Nmi^3"], "volume", false, true, 6352182208], + ["cubic Pica", "Pica3", ["Picapt3", "Pica^3", "Picapt^3"], "volume", false, true, 7.58660370370369e-8], + ["cubic yard", "yd3", ["yd^3"], "volume", false, true, 0.764554857984], + ["cup", "cup", null, "volume", false, true, 0.0002365882365], + ["dalton", "Da", ["u"], "mass", false, false, 1.66053886282828e-27], + ["day", "d", ["day"], "time", false, true, 86400], + ["degree", "°", null, "angle", false, false, 0.0174532925199433], + ["degrees Rankine", "Rank", null, "temperature", false, true, 0.555555555555556], + ["dyne", "dyn", ["dy"], "force", false, true, 0.00001], + ["electronvolt", "eV", ["ev"], "energy", false, true, 1.60217656514141], + ["ell", "ell", null, "length", false, true, 1.143], + ["erg", "erg", ["e"], "energy", false, true, 1e-7], + ["farad", "F", null, "electric_capacitance", true, false, 1], + ["fluid ounce", "oz", null, "volume", false, true, 0.0000295735295625], + ["foot", "ft", null, "length", false, true, 0.3048], + ["foot-pound", "flb", null, "energy", false, true, 1.3558179483314], + ["gal", "Gal", null, "acceleration", false, false, 0.01], + ["gallon", "gal", null, "volume", false, true, 0.003785411784], + ["gauss", "G", ["ga"], "magnetic_flux_density", false, true, 1], + ["grain", "grain", null, "mass", false, true, 0.0000647989], + ["gram", "g", null, "mass", false, true, 0.001], + ["gray", "Gy", null, "absorbed_dose", true, false, 1], + ["gross registered ton", "GRT", ["regton"], "volume", false, true, 2.8316846592], + ["hectare", "ha", null, "area", false, true, 10000], + ["henry", "H", null, "inductance", true, false, 1], + ["hertz", "Hz", null, "frequency", true, false, 1], + ["horsepower", "HP", ["h"], "power", false, true, 745.69987158227], + ["horsepower-hour", "HPh", ["hh", "hph"], "energy", false, true, 2684519.538], + ["hour", "h", ["hr"], "time", false, true, 3600], + ["imperial gallon (U.K.)", "uk_gal", null, "volume", false, true, 0.00454609], + ["imperial hundredweight", "lcwt", ["uk_cwt", "hweight"], "mass", false, true, 50.802345], + ["imperial quart (U.K)", "uk_qt", null, "volume", false, true, 0.0011365225], + ["imperial ton", "brton", ["uk_ton", "LTON"], "mass", false, true, 1016.046909], + ["inch", "in", null, "length", false, true, 0.0254], + ["international acre", "uk_acre", null, "area", false, true, 4046.8564224], + ["IT calorie", "cal", null, "energy", false, true, 4.1868], + ["joule", "J", null, "energy", true, true, 1], + ["katal", "kat", null, "catalytic_activity", true, false, 1], + ["kelvin", "K", ["kel"], "temperature", true, true, 1], + ["kilogram", "kg", null, "mass", true, true, 1], + ["knot", "kn", null, "speed", false, true, 0.514444444444444], + ["light-year", "ly", null, "length", false, true, 9460730472580800], + ["litre", "L", ["l", "lt"], "volume", false, true, 0.001], + ["lumen", "lm", null, "luminous_flux", true, false, 1], + ["lux", "lx", null, "illuminance", true, false, 1], + ["maxwell", "Mx", null, "magnetic_flux", false, false, 1e-18], + ["measurement ton", "MTON", null, "volume", false, true, 1.13267386368], + ["meter per hour", "m/h", ["m/hr"], "speed", false, true, 0.00027777777777778], + ["meter per second", "m/s", ["m/sec"], "speed", true, true, 1], + ["meter per second squared", "m?s??", null, "acceleration", true, false, 1], + ["parsec", "pc", ["parsec"], "length", false, true, 30856775814671900], + ["meter squared per second", "m?/s", null, "kinematic_viscosity", true, false, 1], + ["metre", "m", null, "length", true, true, 1], + ["miles per hour", "mph", null, "speed", false, true, 0.44704], + ["millimetre of mercury", "mmHg", null, "pressure", false, false, 133.322], + ["minute", "?", null, "angle", false, false, 0.000290888208665722], + ["minute", "min", ["mn"], "time", false, true, 60], + ["modern teaspoon", "tspm", null, "volume", false, true, 0.000005], + ["mole", "mol", null, "amount_of_substance", true, false, 1], + ["morgen", "Morgen", null, "area", false, true, 2500], + ["n.u. of action", "?", null, "action", false, false, 1.05457168181818e-34], + ["n.u. of mass", "m?", null, "mass", false, false, 9.10938261616162e-31], + ["n.u. of speed", "c?", null, "speed", false, false, 299792458], + ["n.u. of time", "?/(me?c??)", null, "time", false, false, 1.28808866778687e-21], + ["nautical mile", "M", ["Nmi"], "length", false, true, 1852], + ["newton", "N", null, "force", true, true, 1], + ["œrsted", "Oe ", null, "magnetic_field_intensity", false, false, 79.5774715459477], + ["ohm", "Ω", null, "electric_resistance", true, false, 1], + ["ounce mass", "ozm", null, "mass", false, true, 0.028349523125], + ["pascal", "Pa", null, "pressure", true, false, 1], + ["pascal second", "Pa?s", null, "dynamic_viscosity", true, false, 1], + ["pferdestärke", "PS", null, "power", false, true, 735.49875], + ["phot", "ph", null, "illuminance", false, false, 0.0001], + ["pica (1/6 inch)", "pica", null, "length", false, true, 0.00035277777777778], + ["pica (1/72 inch)", "Pica", ["Picapt"], "length", false, true, 0.00423333333333333], + ["poise", "P", null, "dynamic_viscosity", false, false, 0.1], + ["pond", "pond", null, "force", false, true, 0.00980665], + ["pound force", "lbf", null, "force", false, true, 4.4482216152605], + ["pound mass", "lbm", null, "mass", false, true, 0.45359237], + ["quart", "qt", null, "volume", false, true, 0.000946352946], + ["radian", "rad", null, "angle", true, false, 1], + ["second", "?", null, "angle", false, false, 0.00000484813681109536], + ["second", "s", ["sec"], "time", true, true, 1], + ["short hundredweight", "cwt", ["shweight"], "mass", false, true, 45.359237], + ["siemens", "S", null, "electrical_conductance", true, false, 1], + ["sievert", "Sv", null, "equivalent_dose", true, false, 1], + ["slug", "sg", null, "mass", false, true, 14.59390294], + ["square ångström", "ang2", ["ang^2"], "area", false, true, 1e-20], + ["square foot", "ft2", ["ft^2"], "area", false, true, 0.09290304], + ["square inch", "in2", ["in^2"], "area", false, true, 0.00064516], + ["square light-year", "ly2", ["ly^2"], "area", false, true, 8.95054210748189e+31], + ["square meter", "m?", null, "area", true, true, 1], + ["square mile", "mi2", ["mi^2"], "area", false, true, 2589988.110336], + ["square nautical mile", "Nmi2", ["Nmi^2"], "area", false, true, 3429904], + ["square Pica", "Pica2", ["Picapt2", "Pica^2", "Picapt^2"], "area", false, true, 0.00001792111111111], + ["square yard", "yd2", ["yd^2"], "area", false, true, 0.83612736], + ["statute mile", "mi", null, "length", false, true, 1609.344], + ["steradian", "sr", null, "solid_angle", true, false, 1], + ["stilb", "sb", null, "luminance", false, false, 0.0001], + ["stokes", "St", null, "kinematic_viscosity", false, false, 0.0001], + ["stone", "stone", null, "mass", false, true, 6.35029318], + ["tablespoon", "tbs", null, "volume", false, true, 0.0000147868], + ["teaspoon", "tsp", null, "volume", false, true, 0.00000492892], + ["tesla", "T", null, "magnetic_flux_density", true, true, 1], + ["thermodynamic calorie", "c", null, "energy", false, true, 4.184], + ["ton", "ton", null, "mass", false, true, 907.18474], + ["tonne", "t", null, "mass", false, false, 1000], + ["U.K. pint", "uk_pt", null, "volume", false, true, 0.00056826125], + ["U.S. bushel", "bushel", null, "volume", false, true, 0.03523907], + ["U.S. oil barrel", "barrel", null, "volume", false, true, 0.158987295], + ["U.S. pint", "pt", ["us_pt"], "volume", false, true, 0.000473176473], + ["U.S. survey mile", "survey_mi", null, "length", false, true, 1609.347219], + ["U.S. survey/statute acre", "us_acre", null, "area", false, true, 4046.87261], + ["volt", "V", null, "voltage", true, false, 1], + ["watt", "W", null, "power", true, true, 1], + ["watt-hour", "Wh", ["wh"], "energy", false, true, 3600], + ["weber", "Wb", null, "magnetic_flux", true, false, 1], + ["yard", "yd", null, "length", false, true, 0.9144], + ["year", "yr", null, "time", false, true, 31557600] + ]; + + var binary_prefixes = { + Yi: ["yobi", 80, 1208925819614629174706176, "Yi", "yotta"], + Zi: ["zebi", 70, 1180591620717411303424, "Zi", "zetta"], + Ei: ["exbi", 60, 1152921504606846976, "Ei", "exa"], + Pi: ["pebi", 50, 1125899906842624, "Pi", "peta"], + Ti: ["tebi", 40, 1099511627776, "Ti", "tera"], + Gi: ["gibi", 30, 1073741824, "Gi", "giga"], + Mi: ["mebi", 20, 1048576, "Mi", "mega"], + ki: ["kibi", 10, 1024, "ki", "kilo"] + }; + + var unit_prefixes = { + Y: ["yotta", 1e+24, "Y"], + Z: ["zetta", 1e+21, "Z"], + E: ["exa", 1e+18, "E"], + P: ["peta", 1e+15, "P"], + T: ["tera", 1e+12, "T"], + G: ["giga", 1e+09, "G"], + M: ["mega", 1e+06, "M"], + k: ["kilo", 1e+03, "k"], + h: ["hecto", 1e+02, "h"], + e: ["dekao", 1e+01, "e"], + d: ["deci", 1e-01, "d"], + c: ["centi", 1e-02, "c"], + m: ["milli", 1e-03, "m"], + u: ["micro", 1e-06, "u"], + n: ["nano", 1e-09, "n"], + p: ["pico", 1e-12, "p"], + f: ["femto", 1e-15, "f"], + a: ["atto", 1e-18, "a"], + z: ["zepto", 1e-21, "z"], + y: ["yocto", 1e-24, "y"] + }; + + var from = null; + var to = null; + var base_from_unit = from_unit; + var base_to_unit = to_unit; + var from_multiplier = 1; + var to_multiplier = 1; + var alt; + + for (var i = 0; i < units.length; i++) { + alt = (units[i][2] === null) ? [] : units[i][2]; + + if (units[i][1] === base_from_unit || alt.indexOf(base_from_unit) >= 0) { + from = units[i]; + } + + if (units[i][1] === base_to_unit || alt.indexOf(base_to_unit) >= 0) { + to = units[i]; + } + } + + if (from === null) { + var from_binary_prefix = binary_prefixes[from_unit.substring(0, 2)]; + var from_unit_prefix = unit_prefixes[from_unit.substring(0, 1)]; + + if (from_unit.substring(0, 2) === 'da') { + from_unit_prefix = ["dekao", 1e+01, "da"]; + } + + if (from_binary_prefix) { + from_multiplier = from_binary_prefix[2]; + base_from_unit = from_unit.substring(2); + } + else if (from_unit_prefix) { + from_multiplier = from_unit_prefix[1]; + base_from_unit = from_unit.substring(from_unit_prefix[2].length); + } + + for (var j = 0; j < units.length; j++) { + alt = (units[j][2] === null) ? [] : units[j][2]; + + if (units[j][1] === base_from_unit || alt.indexOf(base_from_unit) >= 0) { + from = units[j]; + } + } + } + + if (to === null) { + var to_binary_prefix = binary_prefixes[to_unit.substring(0, 2)]; + var to_unit_prefix = unit_prefixes[to_unit.substring(0, 1)]; + + if (to_unit.substring(0, 2) === 'da') { + to_unit_prefix = ["dekao", 1e+01, "da"]; + } + + if (to_binary_prefix) { + to_multiplier = to_binary_prefix[2]; + base_to_unit = to_unit.substring(2); + } + else if (to_unit_prefix) { + to_multiplier = to_unit_prefix[1]; + base_to_unit = to_unit.substring(to_unit_prefix[2].length); + } + + for (var k = 0; k < units.length; k++) { + alt = (units[k][2] === null) ? [] : units[k][2]; + + if (units[k][1] === base_to_unit || alt.indexOf(base_to_unit) >= 0) { + to = units[k]; + } + } + } + + if (from === null || to === null) { + return formula.error.na; + } + + if (from[3] !== to[3]) { + return formula.error.na; + } + + return number * from[6] * from_multiplier / (to[6] * to_multiplier); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMX2MY2": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //第一个数组或数值区域 + var data_array_x = arguments[0]; + var array_x = []; + + if(getObjType(data_array_x) == "array"){ + if(getObjType(data_array_x[0]) == "array" && !func_methods.isDyadicArr(data_array_x)){ + return formula.error.v; + } + + array_x = array_x.concat(func_methods.getDataArr(data_array_x, false)); + } + else if(getObjType(data_array_x) == "object" && data_array_x.startCell != null){ + array_x = array_x.concat(func_methods.getCellDataArr(data_array_x, "text", false)); + } + else{ + array_x.push(data_array_x); + } + + //第二个数组或数值区域 + var data_array_y = arguments[1]; + var array_y = []; + + if(getObjType(data_array_y) == "array"){ + if(getObjType(data_array_y[0]) == "array" && !func_methods.isDyadicArr(data_array_y)){ + return formula.error.v; + } + + array_y = array_y.concat(func_methods.getDataArr(data_array_y, false)); + } + else if(getObjType(data_array_y) == "object" && data_array_y.startCell != null){ + array_y = array_y.concat(func_methods.getCellDataArr(data_array_y, "text", false)); + } + else{ + array_y.push(data_array_y); + } + + if(array_x.length != array_y.length){ + return formula.error.na; + } + + //array_x 和 array_y 只取数值 + var data_x = [], data_y = []; + + for(var i = 0; i < array_x.length; i++){ + var num_x = array_x[i]; + var num_y = array_y[i]; + + if(isRealNum(num_x) && isRealNum(num_y)){ + data_x.push(parseFloat(num_x)); + data_y.push(parseFloat(num_y)); + } + } + + //计算 + var sum = 0; + + for (var i = 0; i < data_x.length; i++) { + sum += Math.pow(data_x[i], 2) - Math.pow(data_y[i], 2); + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMX2PY2": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //第一个数组或数值区域 + var data_array_x = arguments[0]; + var array_x = []; + + if(getObjType(data_array_x) == "array"){ + if(getObjType(data_array_x[0]) == "array" && !func_methods.isDyadicArr(data_array_x)){ + return formula.error.v; + } + + array_x = array_x.concat(func_methods.getDataArr(data_array_x, false)); + } + else if(getObjType(data_array_x) == "object" && data_array_x.startCell != null){ + array_x = array_x.concat(func_methods.getCellDataArr(data_array_x, "text", false)); + } + else{ + array_x.push(data_array_x); + } + + //第二个数组或数值区域 + var data_array_y = arguments[1]; + var array_y = []; + + if(getObjType(data_array_y) == "array"){ + if(getObjType(data_array_y[0]) == "array" && !func_methods.isDyadicArr(data_array_y)){ + return formula.error.v; + } + + array_y = array_y.concat(func_methods.getDataArr(data_array_y, false)); + } + else if(getObjType(data_array_y) == "object" && data_array_y.startCell != null){ + array_y = array_y.concat(func_methods.getCellDataArr(data_array_y, "text", false)); + } + else{ + array_y.push(data_array_y); + } + + if(array_x.length != array_y.length){ + return formula.error.na; + } + + //array_x 和 array_y 只取数值 + var data_x = [], data_y = []; + + for(var i = 0; i < array_x.length; i++){ + var num_x = array_x[i]; + var num_y = array_y[i]; + + if(isRealNum(num_x) && isRealNum(num_y)){ + data_x.push(parseFloat(num_x)); + data_y.push(parseFloat(num_y)); + } + } + + //计算 + var sum = 0; + + for (var i = 0; i < data_x.length; i++) { + sum += Math.pow(data_x[i], 2) + Math.pow(data_y[i], 2); + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMXMY2": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //第一个数组或数值区域 + var data_array_x = arguments[0]; + var array_x = []; + + if(getObjType(data_array_x) == "array"){ + if(getObjType(data_array_x[0]) == "array" && !func_methods.isDyadicArr(data_array_x)){ + return formula.error.v; + } + + array_x = array_x.concat(func_methods.getDataArr(data_array_x, false)); + } + else if(getObjType(data_array_x) == "object" && data_array_x.startCell != null){ + array_x = array_x.concat(func_methods.getCellDataArr(data_array_x, "text", false)); + } + else{ + array_x.push(data_array_x); + } + + //第二个数组或数值区域 + var data_array_y = arguments[1]; + var array_y = []; + + if(getObjType(data_array_y) == "array"){ + if(getObjType(data_array_y[0]) == "array" && !func_methods.isDyadicArr(data_array_y)){ + return formula.error.v; + } + + array_y = array_y.concat(func_methods.getDataArr(data_array_y, false)); + } + else if(getObjType(data_array_y) == "object" && data_array_y.startCell != null){ + array_y = array_y.concat(func_methods.getCellDataArr(data_array_y, "text", false)); + } + else{ + array_y.push(data_array_y); + } + + if(array_x.length != array_y.length){ + return formula.error.na; + } + + //array_x 和 array_y 只取数值 + var data_x = [], data_y = []; + + for(var i = 0; i < array_x.length; i++){ + var num_x = array_x[i]; + var num_y = array_y[i]; + + if(isRealNum(num_x) && isRealNum(num_y)){ + data_x.push(parseFloat(num_x)); + data_y.push(parseFloat(num_y)); + } + } + + //计算 + var sum = 0; + + for (var i = 0; i < data_x.length; i++) { + sum += Math.pow(data_x[i] - data_y[i], 2); + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TRANSPOSE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //从其返回唯一值的数组或区域 + var data_array = arguments[0]; + var array = []; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array" && !func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + array = func_methods.getDataDyadicArr(data_array); + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + array = func_methods.getCellDataDyadicArr(data_array, "number"); + } + + array = array[0].map(function(col, a){ + return array.map(function(row){ + return row[a]; + }); + }); + + return array; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TREND": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //已知的 y 值集合 + var data_known_y = arguments[0]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = func_methods.getDataDyadicArr(data_known_y); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = func_methods.getCellDataDyadicArr(data_known_y, "text"); + } + else{ + if(!isRealNum(data_known_y)){ + return formula.error.v; + } + + var rowArr = []; + + rowArr.push(parseFloat(data_known_y)); + + known_y.push(rowArr); + } + + var known_y_rowlen = known_y.length; + var known_y_collen = known_y[0].length; + + for(var i = 0; i < known_y_rowlen; i++){ + for(var j = 0; j < known_y_collen; j++){ + if(!isRealNum(known_y[i][j])){ + return formula.error.v; + } + + known_y[i][j] = parseFloat(known_y[i][j]); + } + } + + //可选 x 值集合 + var known_x = []; + for(var i = 1; i <= known_y_rowlen; i++){ + for(var j = 1; j <= known_y_collen; j++){ + var number = (i - 1) * known_y_collen + j; + known_x.push(number); + } + } + + if(arguments.length >= 2){ + var data_known_x = arguments[1]; + known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = func_methods.getDataDyadicArr(data_known_x); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = func_methods.getCellDataDyadicArr(data_known_x, "text"); + } + else{ + if(!isRealNum(data_known_x)){ + return formula.error.v; + } + + var rowArr = []; + + rowArr.push(parseFloat(data_known_x)); + + known_x.push(rowArr); + } + + for(var i = 0; i < known_x.length; i++){ + for(var j = 0; j < known_x[0].length; j++){ + if(!isRealNum(known_x[i][j])){ + return formula.error.v; + } + + known_x[i][j] = parseFloat(known_x[i][j]); + } + } + } + + var known_x_rowlen = known_x.length; + var known_x_collen = known_x[0].length; + + //新 x 值 + var new_x = known_x; + + if(arguments.length >= 3){ + var data_new_x = arguments[2]; + new_x = []; + + if(getObjType(data_new_x) == "array"){ + if(getObjType(data_new_x[0]) == "array" && !func_methods.isDyadicArr(data_new_x)){ + return formula.error.v; + } + + new_x = func_methods.getDataDyadicArr(data_new_x); + } + else if(getObjType(data_new_x) == "object" && data_new_x.startCell != null){ + new_x = func_methods.getCellDataDyadicArr(data_new_x, "text"); + } + else{ + if(!isRealNum(data_new_x)){ + return formula.error.v; + } + + var rowArr = []; + + rowArr.push(parseFloat(data_new_x)); + + new_x.push(rowArr); + } + + for(var i = 0; i < new_x.length; i++){ + for(var j = 0; j < new_x[0].length; j++){ + if(!isRealNum(new_x[i][j])){ + return formula.error.v; + } + + new_x[i][j] = parseFloat(new_x[i][j]); + } + } + } + + //逻辑值 + var const_b = true; + + if(arguments.length == 4){ + const_b = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(const_b)){ + return const_b; + } + } + + if(known_y_rowlen != known_x_rowlen || known_y_collen != known_x_collen){ + return formula.error.r; + } + + //计算 + function leastSquare(arr_x, arr_y){ + var xSum = 0, ySum = 0, xySum = 0, x2Sum = 0; + + for(var i = 0; i < arr_x.length; i++){ + for(var j = 0; j < arr_x[i].length; j++){ + xSum += arr_x[i][j]; + ySum += arr_y[i][j]; + xySum += arr_x[i][j] * arr_y[i][j]; + x2Sum += arr_x[i][j] * arr_x[i][j]; + } + } + + var n = arr_x.length * arr_x[0].length; + + var xMean = xSum / n; + var yMean = ySum / n; + var xyMean = xySum / n; + var x2Mean = x2Sum / n; + + var m = (xyMean - xMean * yMean) / (x2Mean - xMean * xMean); + var b = yMean - m * xMean; + + return [m, b]; + } + + var ls = leastSquare(known_x, known_y); + var m = ls[0]; + + if(const_b){ + var b = ls[1]; + } + else{ + var b = 0; + } + + var result = []; + + for(var i = 0; i < new_x.length; i++){ + for(var j = 0; j < new_x[i].length; j++){ + var x = new_x[i][j]; + var y = m * x + b; + + result.push(Math.round(y * 1000000000) / 1000000000); + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FREQUENCY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //频率数组 + var data_data_array = arguments[0]; + var data_array = []; + + if(getObjType(data_data_array) == "array"){ + if(getObjType(data_data_array[0]) == "array" && !func_methods.isDyadicArr(data_data_array)){ + return formula.error.v; + } + + data_array = data_array.concat(func_methods.getDataArr(data_data_array, true)); + } + else if(getObjType(data_data_array) == "object" && data_data_array.startCell != null){ + data_array = data_array.concat(func_methods.getCellDataArr(data_data_array, "number", true)); + } + else{ + if(!isRealNum(data_data_array)){ + return formula.error.v; + } + + data_array.push(data_data_array); + } + + var data_array_n = []; + + for(var i = 0; i < data_array.length; i++){ + if(isRealNum(data_array[i])){ + data_array_n.push(parseFloat(data_array[i])); + } + } + + //间隔数组 + var data_bins_array = arguments[1]; + var bins_array = []; + + if(getObjType(data_bins_array) == "array"){ + if(getObjType(data_bins_array[0]) == "array" && !func_methods.isDyadicArr(data_bins_array)){ + return formula.error.v; + } + + bins_array = bins_array.concat(func_methods.getDataArr(data_bins_array, true)); + } + else if(getObjType(data_bins_array) == "object" && data_bins_array.startCell != null){ + bins_array = bins_array.concat(func_methods.getCellDataArr(data_bins_array, "number", true)); + } + else{ + if(!isRealNum(data_bins_array)){ + return formula.error.v; + } + + bins_array.push(data_bins_array); + } + + var bins_array_n = []; + + for(var i = 0; i < bins_array.length; i++){ + if(isRealNum(bins_array[i])){ + bins_array_n.push(parseFloat(bins_array[i])); + } + } + + //计算 + if(data_array_n.length == 0 && bins_array_n.length == 0){ + return [[0], [0]]; + } + else if(data_array_n.length == 0){ + var result = [[0]]; + + for(var i = 0; i < bins_array_n.length; i++){ + result.push([0]); + } + + return result; + } + else if(bins_array_n.length == 0){ + return [[0], [data_array_n.length]]; + } + else{ + bins_array_n.sort(function(a, b){ + return a - b; + }); + + var result = []; + + for(var i = 0; i < bins_array_n.length; i++){ + if(i == 0){ + var count = 0; + + for(var j = 0; j < data_array_n.length; j++){ + if(data_array_n[j] <= bins_array_n[0]){ + count++; + } + } + + result.push([count]); + } + else if(i == bins_array_n.length - 1){ + var count1 = 0, count2 = 0; + + for(var j = 0; j < data_array_n.length; j++){ + if(data_array_n[j] <= bins_array_n[i] && data_array_n[j] > bins_array_n[i - 1]){ + count1++; + } + + if(data_array_n[j] > bins_array_n[i]){ + count2++; + } + } + + result.push([count1]); + result.push([count2]); + } + else{ + var count = 0; + + for(var j = 0; j < data_array_n.length; j++){ + if(data_array_n[j] <= bins_array_n[i] && data_array_n[j] > bins_array_n[i - 1]){ + count++; + } + } + + result.push([count]); + } + } + + return result; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "GROWTH": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //已知的 y 值集合 + var data_known_y = arguments[0]; + var known_y = []; + + if(getObjType(data_known_y) == "array"){ + if(getObjType(data_known_y[0]) == "array" && !func_methods.isDyadicArr(data_known_y)){ + return formula.error.v; + } + + known_y = func_methods.getDataDyadicArr(data_known_y); + } + else if(getObjType(data_known_y) == "object" && data_known_y.startCell != null){ + known_y = func_methods.getCellDataDyadicArr(data_known_y, "text"); + } + else{ + if(!isRealNum(data_known_y)){ + return formula.error.v; + } + + var rowArr = []; + + rowArr.push(parseFloat(data_known_y)); + + known_y.push(rowArr); + } + + var known_y_rowlen = known_y.length; + var known_y_collen = known_y[0].length; + + for(var i = 0; i < known_y_rowlen; i++){ + for(var j = 0; j < known_y_collen; j++){ + if(!isRealNum(known_y[i][j])){ + return formula.error.v; + } + + known_y[i][j] = parseFloat(known_y[i][j]); + } + } + + //可选 x 值集合 + var known_x = []; + for(var i = 1; i <= known_y_rowlen; i++){ + for(var j = 1; j <= known_y_collen; j++){ + var number = (i - 1) * known_y_collen + j; + known_x.push(number); + } + } + + if(arguments.length >= 2){ + var data_known_x = arguments[1]; + known_x = []; + + if(getObjType(data_known_x) == "array"){ + if(getObjType(data_known_x[0]) == "array" && !func_methods.isDyadicArr(data_known_x)){ + return formula.error.v; + } + + known_x = func_methods.getDataDyadicArr(data_known_x); + } + else if(getObjType(data_known_x) == "object" && data_known_x.startCell != null){ + known_x = func_methods.getCellDataDyadicArr(data_known_x, "text"); + } + else{ + if(!isRealNum(data_known_x)){ + return formula.error.v; + } + + var rowArr = []; + + rowArr.push(parseFloat(data_known_x)); + + known_x.push(rowArr); + } + + for(var i = 0; i < known_x.length; i++){ + for(var j = 0; j < known_x[0].length; j++){ + if(!isRealNum(known_x[i][j])){ + return formula.error.v; + } + + known_x[i][j] = parseFloat(known_x[i][j]); + } + } + } + + var known_x_rowlen = known_x.length; + var known_x_collen = known_x[0].length; + + //新 x 值 + var new_x = known_x; + + if(arguments.length >= 3){ + var data_new_x = arguments[2]; + new_x = []; + + if(getObjType(data_new_x) == "array"){ + if(getObjType(data_new_x[0]) == "array" && !func_methods.isDyadicArr(data_new_x)){ + return formula.error.v; + } + + new_x = func_methods.getDataDyadicArr(data_new_x); + } + else if(getObjType(data_new_x) == "object" && data_new_x.startCell != null){ + new_x = func_methods.getCellDataDyadicArr(data_new_x, "text"); + } + else{ + if(!isRealNum(data_new_x)){ + return formula.error.v; + } + + var rowArr = []; + + rowArr.push(parseFloat(data_new_x)); + + new_x.push(rowArr); + } + + for(var i = 0; i < new_x.length; i++){ + for(var j = 0; j < new_x[0].length; j++){ + if(!isRealNum(new_x[i][j])){ + return formula.error.v; + } + + new_x[i][j] = parseFloat(new_x[i][j]); + } + } + } + + //逻辑值 + var const_b = true; + + if(arguments.length == 4){ + const_b = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(const_b)){ + return const_b; + } + } + + if(known_y_rowlen != known_x_rowlen || known_y_collen != known_x_collen){ + return formula.error.r; + } + + //计算 + function leastSquare(arr_x, arr_y){ + var xSum = 0, ySum = 0, xySum = 0, x2Sum = 0; + + for(var i = 0; i < arr_x.length; i++){ + for(var j = 0; j < arr_x[i].length; j++){ + xSum += arr_x[i][j]; + // ySum += arr_y[i][j]; + ySum += Math.log(arr_y[i][j]); + // xySum += arr_x[i][j] * arr_y[i][j]; + xySum += arr_x[i][j] * Math.log(arr_y[i][j]); + x2Sum += arr_x[i][j] * arr_x[i][j]; + } + } + + var n = arr_x.length * arr_x[0].length; + + var xMean = xSum / n; + var yMean = ySum / n; + var xyMean = xySum / n; + var x2Mean = x2Sum / n; + + var m = (xyMean - xMean * yMean) / (x2Mean - xMean * xMean); + var b = yMean - m * xMean; + + return [Math.exp(m), Math.exp(b)]; + } + + var ls = leastSquare(known_x, known_y); + var m = ls[0]; + + if(const_b){ + var b = ls[1]; + } + else{ + var b = 1; + } + + var result = []; + + for(var i = 0; i < new_x.length; i++){ + for(var j = 0; j < new_x[i].length; j++){ + var x = new_x[i][j]; + var y = b * Math.pow(m, x); + // var y = Math.exp(b + m * x); + + result.push(Math.round(y * 1000000000) / 1000000000); + } + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LINEST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return formula.error.v; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LOGEST": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return formula.error.v; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MDETERM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数组 + var data_array = arguments[0]; + var array = []; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array" && !func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + array = func_methods.getDataDyadicArr(data_array); + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + array = func_methods.getCellDataDyadicArr(data_array, "text"); + } + else{ + var rowArr = []; + rowArr.push(data_array); + array.push(rowArr); + } + + for(var i = 0; i < array.length; i++){ + for(var j = 0; j < array[i].length; j++){ + if(!isRealNum(array[i][j])){ + return formula.error.v; + } + + array[i][j] = parseFloat(array[i][j]); + } + } + + if(array.length != array[0].length){ + return formula.error.v; + } + + //计算 + function Ma(a, n){ + var A; + var b = new Array(); + + if(n == 1){ + A = a[0][0]; + + return A; + } + else if(n == 2){ + A = a[0][0] * a[1][1] - a[0][1] * a[1][0]; + + return A; + } + else if(n == 3){ + A = a[0][0]*a[1][1]*a[2][2] + a[1][0]*a[2][1]*a[0][2] + a[2][0]*a[0][1]*a[1][2] - a[2][0]*a[1][1]*a[0][2] - a[0] [0]*a[2][1]*a[1][2] - a[1][0]*a[0][1]*a[2][2]; + + return A; + } + else{ + A = 0; + var c = new Array(); + var e = new Array(); + + for(var i = 0; i < n; i++){ + b[i] = a[i][0] * Math.pow(-1, i + 1 + 1); + } + + for(var i = 0; i < n; i++){ + e[i] = new Array(); + + for(var j = 0; j < n - 1; j++){ + e[i][j] = a[i][j + 1]; + } + } + + for(var i = 0; i < n; i++){ + for(var j = 0; j < n; j++){ + c[j] = new Array(); + + for(var k = 0; k < n - 1; k++){ + if(i > j){ + c[j][k] = e[j][k]; + } + else if(i < j){ + c[j - 1][k] = e[j][k]; + } + } + } + + A += b[i] * arguments.callee(c, n - 1); + } + + return A; + } + } + + return Ma(array, array.length); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MINVERSE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数组 + var data_array = arguments[0]; + var array = []; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array" && !func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + array = func_methods.getDataDyadicArr(data_array); + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + array = func_methods.getCellDataDyadicArr(data_array, "text"); + } + else{ + var rowArr = []; + rowArr.push(data_array); + array.push(rowArr); + } + + for(var i = 0; i < array.length; i++){ + for(var j = 0; j < array[i].length; j++){ + if(!isRealNum(array[i][j])){ + return formula.error.v; + } + + array[i][j] = parseFloat(array[i][j]); + } + } + + if(array.length != array[0].length){ + return formula.error.v; + } + + //计算 + return inverse(array); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "MMULT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数组1 + var data_array1 = arguments[0]; + var array1 = []; + + if(getObjType(data_array1) == "array"){ + if(getObjType(data_array1[0]) == "array" && !func_methods.isDyadicArr(data_array1)){ + return formula.error.v; + } + + array1 = func_methods.getDataDyadicArr(data_array1); + } + else if(getObjType(data_array1) == "object" && data_array1.startCell != null){ + array1 = func_methods.getCellDataDyadicArr(data_array1, "text"); + } + else{ + var rowArr = []; + rowArr.push(data_array1); + array1.push(rowArr); + } + + for(var i = 0; i < array1.length; i++){ + for(var j = 0; j < array1[i].length; j++){ + if(!isRealNum(array1[i][j])){ + return formula.error.v; + } + + array1[i][j] = parseFloat(array1[i][j]); + } + } + + //数组2 + var data_array2 = arguments[1]; + var array2 = []; + + if(getObjType(data_array2) == "array"){ + if(getObjType(data_array2[0]) == "array" && !func_methods.isDyadicArr(data_array2)){ + return formula.error.v; + } + + array2 = func_methods.getDataDyadicArr(data_array2); + } + else if(getObjType(data_array2) == "object" && data_array2.startCell != null){ + array2 = func_methods.getCellDataDyadicArr(data_array2, "text"); + } + else{ + var rowArr = []; + rowArr.push(data_array2); + array2.push(rowArr); + } + + for(var i = 0; i < array2.length; i++){ + for(var j = 0; j < array2[i].length; j++){ + if(!isRealNum(array2[i][j])){ + return formula.error.v; + } + + array2[i][j] = parseFloat(array2[i][j]); + } + } + + //计算 + if(array1[0].length != array2.length){ + return formula.error.v; + } + + var rowlen = array1.length; + var collen = array2[0].length; + + var result = []; + + for(var m = 0; m < rowlen; m++){ + var rowArr = []; + + for(var n = 0; n < collen; n++){ + var value = 0; + + for(var p = 0; p < array1[0].length; p++){ + value += array1[m][p] * array2[p][n]; + } + + rowArr.push(value); + } + + result.push(rowArr); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SUMPRODUCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //第一个数组 + //数组1 + var data_array1 = arguments[0]; + var array1 = []; + + if(getObjType(data_array1) == "array"){ + if(getObjType(data_array1[0]) == "array" && !func_methods.isDyadicArr(data_array1)){ + return formula.error.v; + } + + array1 = func_methods.getDataDyadicArr(data_array1); + } + else if(getObjType(data_array1) == "object" && data_array1.startCell != null){ + array1 = func_methods.getCellDataDyadicArr(data_array1, "text"); + } + else{ + var rowArr = []; + rowArr.push(data_array1); + array1.push(rowArr); + } + + for(var i = 0; i < array1.length; i++){ + for(var j = 0; j < array1[i].length; j++){ + if(!isRealNum(array1[i][j])){ + array1[i][j] = 0; + } + else{ + array1[i][j] = parseFloat(array1[i][j]); + } + } + } + + var rowlen = array1.length; + var collen = array1[0].length; + + if(arguments.length >= 2){ + for(var i = 1; i < arguments.length; i++){ + var data = arguments[i]; + var arr = []; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !func_methods.isDyadicArr(data)){ + return formula.error.v; + } + + arr = func_methods.getDataDyadicArr(data); + } + else if(getObjType(data) == "object" && data.startCell != null){ + arr = func_methods.getCellDataDyadicArr(data, "text"); + } + else{ + var rowArr = []; + rowArr.push(data); + arr.push(rowArr); + } + + if(arr.length != rowlen || arr[0].length != collen){ + return formula.error.v; + } + + for(var m = 0; m < rowlen; m++){ + for(var n = 0; n < collen; n++){ + if(!isRealNum(arr[m][n])){ + array1[m][n] = 0; + } + else{ + array1[m][n] = array1[m][n] * parseFloat(arr[m][n]); + } + } + } + } + } + + var sum = 0; + + for(var m = 0; m < rowlen; m++){ + for(var n = 0; n < collen; n++){ + sum += array1[m][n]; + } + } + + return sum; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISFORMULA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var data_cell = arguments[0]; + var cell; + + if(getObjType(data_cell) == "object" && data_cell.startCell != null){ + if(data_cell.data == null){ + return false; + } + + if(getObjType(data_cell.data) == "array"){ + cell = data_cell.data[0][0]; + } + else{ + cell = data_cell.data; + } + + if(cell != null && cell.f != null){ + return true; + } + else{ + return false; + } + } + else{ + return formula.error.v; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "CELL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格信息的类型 + var data_info_type = arguments[0]; + var info_type; + + if(getObjType(data_info_type) == "array"){ + if(getObjType(data_info_type[0]) == "array"){ + if(!func_methods.isDyadicArr(data_info_type)){ + return formula.error.v; + } + + info_type = data_info_type[0][0]; + } + else{ + info_type = data_info_type[0]; + } + } + else if(getObjType(data_info_type) == "object" && data_info_type.startCell != null){ + if(data_info_type.data == null){ + return formula.error.v; + } + else{ + if(getObjType(data_info_type.data) == "array"){ + return formula.error.v; + } + + info_type = data_info_type.data.v; + + if(isRealNull(info_type)){ + return formula.error.v; + } + } + } + else{ + info_type = data_info_type; + } + + //单元格 + var data_reference = arguments[1]; + var reference; + + if(getObjType(data_reference) == "object" && data_reference.startCell != null){ + reference = data_reference.startCell; + } + else{ + return formula.error.v; + } + + if(["address", "col", "color", "contents", "filename", "format", "parentheses", "prefix", "protect", "row", "type", "width"].indexOf(info_type) == -1){ + return formula.error.v; + } + + var file = getluckysheetfile()[getSheetIndex(Store.currentSheetIndex)]; + + var cellrange = formula.getcellrange(reference); + var row_index = cellrange.row[0]; + var col_index = cellrange.column[0]; + + switch(info_type){ + case "address": + return reference; + break; + case "col": + return col_index + 1; + break; + case "color": + return 0; + break; + case "contents": + if(Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].v == null || Store.flowdata[row_index][col_index].v ==""){ + return 0; + } + + return Store.flowdata[row_index][col_index].v; + break; + case "filename": + return file.name; + break; + case "format": + if(Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].ct == null){ + return "G"; + } + + return Store.flowdata[row_index][col_index].ct.fa; + break; + case "parentheses": + if(Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].v == null || Store.flowdata[row_index][col_index].v ==""){ + return 0; + } + + if(Store.flowdata[row_index][col_index].v > 0){ + return 1; + } + else{ + return 0; + } + break; + case "prefix": + if(Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].ht == null || Store.flowdata[row_index][col_index].v == null || Store.flowdata[row_index][col_index].v ==""){ + return ""; + } + + if(Store.flowdata[row_index][col_index].ht == 0){//居中对齐 + return "^"; + } + else if(Store.flowdata[row_index][col_index].ht == 1){//左对齐 + return "'"; + } + else if(Store.flowdata[row_index][col_index].ht == 2){//右对齐 + return '"'; + } + else{ + return ""; + } + break; + case "protect": + return 0; + break; + case "row": + return row_index + 1; + break; + case "type": + if(Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].v == null || Store.flowdata[row_index][col_index].v ==""){ + return "b"; + } + + return "l"; + break; + case "width": + var cfg = file.config; + + if(cfg["columlen"] != null && col_index in cfg["columlen"]){ + return cfg["columlen"][col_index]; + } + + return Store.defaultcollen; + break; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "NA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + return formula.error.na; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ERROR_TYPE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_error_val = arguments[0]; + var error_val; + + if(getObjType(data_error_val) == "array"){ + if(getObjType(data_error_val[0]) == "array"){ + if(!func_methods.isDyadicArr(data_error_val)){ + return formula.error.v; + } + + error_val = data_error_val[0][0]; + } + else{ + error_val = data_error_val[0]; + } + } + else if(getObjType(data_error_val) == "object" && data_error_val.startCell != null){ + if(data_error_val.data == null){ + return formula.error.na; + } + + if(getObjType(data_error_val.data) == "array"){ + error_val = data_error_val.data[0][0]; + + if(error_val == null || isRealNull(error_val.v)){ + return formula.error.na; + } + + error_val = error_val.v; + } + else{ + if(isRealNull(data_error_val.data.v)){ + return formula.error.na; + } + + error_val = data_error_val.data.v; + } + } + else{ + error_val = data_error_val; + } + + var error_obj = { + "#NULL!": 1, + "#DIV/0!": 2, + "#VALUE!": 3, + "#REF!": 4, + "#NAME?": 5, + "#NUM!": 6, + "#N/A": 7, + "#GETTING_DATA": 8 + } + + if(error_val in error_obj){ + return error_obj[error_val]; + } + else{ + return formula.error.na; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISBLANK": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_error_val = arguments[0]; + var error_val; + + if(getObjType(data_error_val) == "object" && data_error_val.startCell != null){ + if(data_error_val.data == null){ + return true; + } + else{ + return false; + } + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISERR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return true; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return false; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(["#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISERROR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return true; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return false; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISLOGICAL": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return false + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return false; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISNA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return false; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return false; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(value.toString() == "#N/A"){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISNONTEXT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return true; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return true; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ + return true; + } + else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ + return true; + } + else if(isRealNum(value)){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISNUMBER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return false; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return false; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(isRealNum(value)){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISREF": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + if(getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ + return true; + } + else{ + return false; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "ISTEXT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return false; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return false; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ + return false; + } + else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ + return false; + } + else if(isRealNum(value)){ + return false; + } + else{ + return true; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TYPE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + return 64; + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + return 16; + } + + if(data_value.data == null || isRealNull(data_value.data.v)){ + return 1; + } + + value = data_value.data.v; + } + else{ + value = data_value; + } + + if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ + return 16; + } + else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ + return 4; + } + else if(isRealNum(value)){ + return 1; + } + else{ + return 2; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "N": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //单元格 + var data_value = arguments[0]; + var value; + + if(getObjType(data_value) == "array"){ + if(getObjType(data_value[0]) == "array"){ + if(!func_methods.isDyadicArr(data_value)){ + return formula.error.v; + } + + value = data_value[0][0]; + } + else{ + value = data_value[0]; + } + } + else if(getObjType(data_value) == "object" && data_value.startCell != null){ + if(getObjType(data_value.data) == "array"){ + value = data_value.data[0][0]; + + if(value == null || isRealNull(value.v)){ + return 0; + } + + value = value.v; + } + else{ + if(data_value.data == null || isRealNull(data_value.data.v)){ + return 0; + } + + value = data_value.data.v; + } + } + else{ + value = data_value; + } + + if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ + return value; + } + else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ + if(value.toString().toLowerCase() == "true"){ + return 1; + } + else{ + return 0; + } + } + else if(isRealNum(value)){ + return parseFloat(value); + } + else{ + return 0; + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TO_DATE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var value = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value)){ + return value; + } + + if(!isRealNum(value)){ + return formula.error.v; + } + + value = parseFloat(value); + + return update("yyyy-mm-dd", value); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TO_PURE_NUMBER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var value = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(value)){ + return value; + } + + if(moment(value).isValid()){ + return genarate(value)[2]; + } + else{ + return numeral(value).value() == null ? value : numeral(value).value(); + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TO_TEXT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var value = func_methods.getFirstValue(arguments[0], "text"); + if(valueIsError(value)){ + return value; + } + + return update("@", value); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TO_DOLLARS": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var value = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value)){ + return value; + } + + if(!isRealNum(value)){ + return formula.error.v; + } + + value = parseFloat(value); + + return update("$ 0.00", value); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TO_PERCENT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数字 + var value = func_methods.getFirstValue(arguments[0]); + if(valueIsError(value)){ + return value; + } + + if(!isRealNum(value)){ + return formula.error.v; + } + + value = parseFloat(value); + + return update("0%", value); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DGET": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + if (resultIndexes.length === 0) { + return formula.error.v; + } + + if (resultIndexes.length > 1) { + return formula.error.nm; + } + + return targetFields[resultIndexes[0]]; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DMAX": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var maxValue = targetFields[resultIndexes[0]]; + + for (var i = 1; i < resultIndexes.length; i++) { + if (maxValue < targetFields[resultIndexes[i]]) { + maxValue = targetFields[resultIndexes[i]]; + } + } + + return maxValue; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DMIN": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = findField(database, field); + targetFields = rest(database[index]); + } + else { + targetFields = rest(database[field]); + } + + var minValue = targetFields[resultIndexes[0]]; + + for (var i = 1; i < resultIndexes.length; i++) { + if (minValue > targetFields[resultIndexes[i]]) { + minValue = targetFields[resultIndexes[i]]; + } + } + + return minValue; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DAVERAGE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var sum = 0; + + for (var i = 0; i < resultIndexes.length; i++) { + sum += targetFields[resultIndexes[i]]; + } + + return resultIndexes.length === 0 ? formula.error.d : sum / resultIndexes.length; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DCOUNT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT, targetValues); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DCOUNTA": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA, targetValues); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DPRODUCT": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + targetValues = func_methods.compact(targetValues); + + var result = 1; + + for (i = 0; i < targetValues.length; i++) { + result *= targetValues[i]; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DSTDEV": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + targetValues = func_methods.compact(targetValues); + + return window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA, targetValues); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DSTDEVP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + targetValues = func_methods.compact(targetValues); + + return window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP, targetValues); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DSUM": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + targetValues = func_methods.compact(targetValues); + + var result = 0; + + for (i = 0; i < targetValues.length; i++) { + result += targetValues[i]; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DVAR": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + targetValues = func_methods.compact(targetValues); + + return window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S, targetValues); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DVARP": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //数据库的单元格区域 + var data_database = arguments[0]; + var database = []; + + if(getObjType(data_database) == "object" && data_database.startCell != null){ + if(data_database.data == null){ + return formula.error.v; + } + + database = func_methods.getCellDataDyadicArr(data_database, "text"); + } + else{ + return formula.error.v; + } + + //列 + var field = func_methods.getFirstValue(arguments[1], "text"); + if(valueIsError(field)){ + return field; + } + + if(isRealNull(field)){ + return formula.error.v; + } + + //条件的单元格区域 + var data_criteria = arguments[2]; + var criteria = []; + + if(getObjType(data_criteria) == "object" && data_criteria.startCell != null){ + if(data_criteria.data == null){ + return formula.error.v; + } + + criteria = func_methods.getCellDataDyadicArr(data_criteria, "text"); + } + else{ + return formula.error.v; + } + + if (!isRealNum(field) && getObjType(field) !== "string") { + return formula.error.v; + } + + var resultIndexes = func_methods.findResultIndex(database, criteria); + var targetFields = []; + + if (getObjType(field) === "string") { + var index = func_methods.findField(database, field); + targetFields = func_methods.rest(database[index]); + } + else { + targetFields = func_methods.rest(database[field]); + } + + var targetValues = []; + + for (var i = 0; i < resultIndexes.length; i++) { + targetValues[i] = targetFields[resultIndexes[i]]; + } + + targetValues = func_methods.compact(targetValues); + + return window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P, targetValues); + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "LINESPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + var lineColor = arguments[1]; + var lineWidth = arguments[2]; + var normalValue = arguments[3]; + var normalColor = arguments[4]; + var maxSpot = arguments[5]; + var minSpot = arguments[6]; + var spotRadius = arguments[7]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + if(lineWidth==null){ + lineWidth = 1; + } + sparksetting["lineWidth"] = lineWidth; + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting["offsetY"] = lineWidth+1; + sparksetting.height = height-(lineWidth+1); + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + if(lineColor==null){ + lineColor = "#2ec7c9"; + } + sparkColorSetting("lineColor", lineColor); + //sparkColorSetting("fillColor", fillColor); + sparksetting["fillColor"] = 0; + + + + + //设置辅助线,可以支持min、max、avg、median等几个字符变量,或者具体的数值。 + if(!!normalValue){ + if(typeof(normalValue)=="string"){ + normalValue = normalValue.toLowerCase(); + var nv = null; + if(normalValue=="min"){ + nv = window.luckysheet_function.MIN.f({"data":dataformat}); + } + else if(normalValue=="max"){ + nv = window.luckysheet_function.MAX.f({"data":dataformat}); + } + else if(normalValue=="avg" || normalValue=="mean"){ + nv = window.luckysheet_function.AVERAGE.f({"data":dataformat}); + } + else if(normalValue=="median"){ + nv = window.luckysheet_function.MEDIAN.f({"data":dataformat}); + } + + if(!!nv){ + sparksetting["normalRangeMin"] = nv; + sparksetting["normalRangeMax"] = nv; + } + } + else{ + sparksetting["normalRangeMin"] = normalValue; + sparksetting["normalRangeMax"] = normalValue; + } + + } + + if(normalColor==null){ + normalColor = "#000"; + } + sparkColorSetting("normalRangeColor", normalColor); + + sparkColorSetting("maxSpotColor", maxSpot); + sparkColorSetting("minSpotColor", minSpot); + + if(spotRadius==null){ + spotRadius = "1.5"; + } + sparksetting["spotRadius"] = spotRadius; + + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + // { + // height:rowlen, + // width:firstcolumlen, + // normalRangeMin:6, + // normalRangeMax:6, + // normalRangeColor:"#000" + // } + //return ""; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "AREASPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + var lineColor = arguments[1]; + var fillColor = arguments[2]; + var lineWidth = arguments[3]; + var normalValue = arguments[4]; + var normalColor = arguments[5]; + // var maxSpot = arguments[5]; + // var minSpot = arguments[6]; + // var spotRadius = arguments[7]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + if(lineWidth==null){ + lineWidth = 1; + } + sparksetting["lineWidth"] = lineWidth; + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting["offsetY"] = lineWidth+1; + sparksetting.height = height-(lineWidth+1); + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + if(lineColor==null){ + lineColor = "#2ec7c9"; + } + sparkColorSetting("lineColor", lineColor); + sparkColorSetting("fillColor", fillColor); + // sparksetting["fillColor"] = 0; + + if(lineWidth==null){ + lineWidth = "1"; + } + sparksetting["lineWidth"] = lineWidth; + + //设置辅助线,可以支持min、max、avg、median等几个字符变量,或者具体的数值。 + if(!!normalValue){ + if(typeof(normalValue)=="string"){ + normalValue = normalValue.toLowerCase(); + var nv = null; + if(normalValue=="min"){ + nv = window.luckysheet_function.MIN.f({"data":dataformat}); + } + else if(normalValue=="max"){ + nv = window.luckysheet_function.MAX.f({"data":dataformat}); + } + else if(normalValue=="avg" || normalValue=="mean"){ + nv = window.luckysheet_function.AVERAGE.f({"data":dataformat}); + } + else if(normalValue=="median"){ + nv = window.luckysheet_function.MEDIAN.f({"data":dataformat}); + } + + if(!!nv){ + sparksetting["normalRangeMin"] = nv; + sparksetting["normalRangeMax"] = nv; + } + } + else{ + sparksetting["normalRangeMin"] = normalValue; + sparksetting["normalRangeMax"] = normalValue; + } + + } + + if(normalColor==null){ + normalColor = "#000"; + } + sparkColorSetting("normalRangeColor", normalColor); + + // sparkColorSetting("maxSpotColor", maxSpot); + // sparkColorSetting("minSpotColor", minSpot); + + // if(spotRadius==null){ + // spotRadius = "1.5"; + // } + // sparksetting["spotRadius"] = spotRadius; + + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + // { + // height:rowlen, + // width:firstcolumlen, + // normalRangeMin:6, + // normalRangeMax:6, + // normalRangeColor:"#000" + // } + //return ""; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "COLUMNSPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var barSpacing = arguments[1]; + var barColor = arguments[2]; + var negBarColor = arguments[3]; + var chartRangeMax = arguments[4]; + + ////具体实现 + sparksetting["type"] = "column"; + if(barSpacing==null){ + barSpacing = "1"; + } + sparksetting["barSpacing"] = barSpacing; + + if(barColor==null){ + barColor = "#fc5c5c"; + } + sparkColorSetting("barColor", barColor); + + if(negBarColor==null){ + negBarColor = "#97b552"; + } + sparkColorSetting("negBarColor", negBarColor); + + if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ + sparksetting["chartRangeMax"] = undefined; + } + else{ + sparksetting["chartRangeMax"] = chartRangeMax; + } + + var colorLists = formula.sparklinesColorMap(arguments); + if(!!colorLists){ + sparksetting["colorMap"] = colorLists; + } + ////具体实现 + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STACKCOLUMNSPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + //var dataformat = formula.readCellDataToOneArray(rangeValue); + + var dataformat = []; + + var data = []; + if(rangeValue!=null && rangeValue.data!=null){ + data = rangeValue.data; + } + + if(getObjType(data) == "array"){ + data = formula.getPureValueByData(data); + } + else if(getObjType(data) == "object"){ + data = data.v; + + return [data]; + } + else{ + if(/\{.*?\}/.test(data)){ + data = data.replace(/\{/g, "[").replace(/\}/g, "]"); + } + data = eval('('+ data +')'); + } + + var stackconfig = arguments[1]; + var offsetY = data.length; + if(stackconfig==null || !!stackconfig){ + for(var c=0;c19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var barSpacing = arguments[2]; + var chartRangeMax = arguments[3]; + + ////具体实现 + sparksetting["type"] = "column"; + if(barSpacing==null){ + barSpacing = "1"; + } + sparksetting["barSpacing"] = barSpacing; + + if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ + sparksetting["chartRangeMax"] = undefined; + } + else{ + sparksetting["chartRangeMax"] = chartRangeMax; + } + + var colorLists = formula.sparklinesColorMap(arguments, 4); + if(!!colorLists){ + sparksetting["colorMap"] = colorLists; + } + ////具体实现 + + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BARSPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var barSpacing = arguments[1]; + var barColor = arguments[2]; + var negBarColor = arguments[3]; + var chartRangeMax = arguments[4]; + + ////具体实现 + sparksetting["type"] = "bar"; + if(barSpacing==null){ + barSpacing = "1"; + } + sparksetting["barSpacing"] = barSpacing; + + if(barColor==null){ + barColor = "#fc5c5c"; + } + sparkColorSetting("barColor", barColor); + + if(negBarColor==null){ + negBarColor = "#97b552"; + } + sparkColorSetting("negBarColor", negBarColor); + + if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ + sparksetting["chartRangeMax"] = undefined; + } + else{ + sparksetting["chartRangeMax"] = chartRangeMax; + } + + var colorLists = formula.sparklinesColorMap(arguments); + if(!!colorLists){ + sparksetting["colorMap"] = colorLists; + } + ////具体实现 + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "STACKBARSPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + //var dataformat = formula.readCellDataToOneArray(rangeValue); + + var dataformat = []; + + var data = []; + if(rangeValue!=null && rangeValue.data!=null){ + data = rangeValue.data; + } + + if(getObjType(data) == "array"){ + data = formula.getPureValueByData(data); + } + else if(getObjType(data) == "object"){ + data = data.v; + return [data]; + } + else{ + if(/\{.*?\}/.test(data)){ + data = data.replace(/\{/g, "[").replace(/\}/g, "]"); + } + data = eval('('+ data +')'); + } + + var stackconfig = arguments[1]; + var offsetY = data.length; + if(stackconfig==null || !!stackconfig){ + for(var c=0;c19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var barSpacing = arguments[2]; + var chartRangeMax = arguments[3]; + + ////具体实现 + sparksetting["type"] = "bar"; + if(barSpacing==null){ + barSpacing = "1"; + } + sparksetting["barSpacing"] = barSpacing; + + if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ + sparksetting["chartRangeMax"] = undefined; + } + else{ + sparksetting["chartRangeMax"] = chartRangeMax; + } + + var colorLists = formula.sparklinesColorMap(arguments, 4); + if(!!colorLists){ + sparksetting["colorMap"] = colorLists; + } + ////具体实现 + + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "DISCRETESPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var thresholdValue = arguments[1]; + var barColor = arguments[2]; + var negBarColor = arguments[3]; + + ////具体实现 + sparksetting["type"] = "discrete"; + + if(thresholdValue==null){ + thresholdValue = 0; + } + sparksetting["thresholdValue"] = thresholdValue; + + if(barColor==null){ + barColor = "#2ec7c9"; + } + sparkColorSetting("lineColor", barColor); + + if(negBarColor==null){ + negBarColor = "#fc5c5c"; + } + sparkColorSetting("thresholdColor", negBarColor); + ////具体实现 + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "TRISTATESPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var barSpacing = arguments[1]; + var barColor = arguments[2]; + var negBarColor = arguments[3]; + var zeroBarColor = arguments[4]; + + ////具体实现 + sparksetting["type"] = "tristate"; + if(barSpacing==null){ + barSpacing = "1"; + } + sparksetting["barSpacing"] = barSpacing; + + if(barColor==null){ + barColor = "#fc5c5c"; + } + sparkColorSetting("barColor", barColor); + + if(negBarColor==null){ + negBarColor = "#97b552"; + } + sparkColorSetting("negBarColor", negBarColor); + + if(zeroBarColor==null){ + zeroBarColor = "#999"; + } + sparkColorSetting("zeroBarColor", zeroBarColor); + + var colorLists = formula.sparklinesColorMap(arguments); + if(!!colorLists){ + sparksetting["colorMap"] = colorLists; + } + ////具体实现 + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "PIESPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var offset = arguments[1]; + var borderWidth = arguments[2]; + var borderColor = arguments[3]; + + ////具体实现 + sparksetting["type"] = "pie"; + if(offset==null){ + offset = 0; + } + sparksetting["offset"] = offset; + + if(borderWidth==null){ + borderWidth = 0; + } + sparkColorSetting("borderWidth", borderWidth); + + if(borderColor==null){ + borderColor = "#97b552"; + } + sparkColorSetting("borderColor", borderColor); + + var colorLists = formula.sparklinesColorMap(arguments, 4); + if(!!colorLists){ + sparksetting["colorMap"] = colorLists; + } + ////具体实现 + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BOXSPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + var rangeValue = arguments[0]; + + //定义需要格式化data数据 + var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + var outlierIQR = arguments[1]; + var target = arguments[2]; + var spotRadius = arguments[3]; + + ////具体实现 + sparksetting["type"] = "box"; + if(outlierIQR==null){ + outlierIQR = 1.5; + } + sparksetting["outlierIQR"] = outlierIQR; + + if(target==null){ + target = 0; + } + else{ + sparkColorSetting("target", target); + } + + if(spotRadius==null){ + spotRadius = 1.5; + } + sparkColorSetting("spotRadius", spotRadius); + ////具体实现 + + var temp1 = luckysheetSparkline.init(dataformat, sparksetting); + + return temp1; + } + catch (e) { + var err = e; + //计算错误检测 + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "BULLETSPLINES": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + var cell_r = window.luckysheetCurrentRow; + var cell_c = window.luckysheetCurrentColumn; + var cell_fp = window.luckysheetCurrentFunction; + //色表,接下来会用到 + var colorList = formula.colorList; + //var rangeValue = arguments[0]; + + //定义需要格式化data数据 + //var dataformat = formula.readCellDataToOneArray(rangeValue); + + //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 + var cellSize = menuButton.getCellRealSize(Store.flowdata, cell_r, cell_c); + var width = cellSize[0]; + var height = cellSize[1]; + + //开始进行sparklines的详细设置,宽和高为单元格的宽高。 + var sparksetting = {}; + + //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) + sparksetting.height = height; + sparksetting.width = width; + + //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 + var sparkColorSetting = function(attr, value){ + if(!!value){ + if(typeof(value)=="number"){ + if(value>19){ + value = value % 20; + } + value = colorList[value]; + } + sparksetting[attr] = value; + } + } + + ////具体实现 + var dataformat = []; + luckysheet_getValue(arguments); + + var data1 = formula.getValueByFuncData(arguments[0]); + var data2 = formula.getValueByFuncData(arguments[1]); + + dataformat.push(data1); + dataformat.push(data2); + + for(var i=2;i this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要排序的范围或数组 + var data_array = arguments[0]; + var array = [], rowlen = 1, collen = 1; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array"){ + if(!func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + for(var i = 0; i < data_array.length; i++){ + var rowArr = []; + + for(var j = 0; j < data_array[i].length; j++){ + var number = data_array[i][j]; + + rowArr.push(number); + } + + array.push(rowArr); + } + + rowlen = array.length; + collen = array[0].length; + } + else{ + for(var i = 0; i < data_array.length; i++){ + var number = data_array[i]; + + array.push(number); + } + + rowlen = array.length; + } + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + if(data_array.data != null){ + if(getObjType(data_array.data) == "array"){ + for(var i = 0; i < data_array.data.length; i++){ + var rowArr = []; + + for(var j = 0; j < data_array.data[i].length; j++){ + if(data_array.data[i][j] != null){ + var number = data_array.data[i][j].v; + + if(isRealNull(number)){ + number = 0; + } + + rowArr.push(number); + } + else{ + rowArr.push(0); + } + } + + array.push(rowArr); + } + + rowlen = array.length; + collen = array[0].length; + } + else{ + var number = data_array.data.v; + + if(isRealNull(number)){ + number = 0; + } + + array.push(number); + } + } + else{ + array.push(0); + } + } + else{ + var number = data_array; + + array.push(number); + } + + //表示要排序的行或列的数字(默认row1/col1) + var sort_index = 1; + if(arguments.length >= 2){ + sort_index = func_methods.getFirstValue(arguments[1]); + if(valueIsError(sort_index)){ + return sort_index; + } + + if(!isRealNum(sort_index)){ + return formula.error.v; + } + + sort_index = parseInt(sort_index); + } + + //表示所需排序顺序的数字;1表示升序(默认),-1表示降序。 + var sort_order = 1; + if(arguments.length >= 3){ + sort_order = func_methods.getFirstValue(arguments[2]); + if(valueIsError(sort_order)){ + return sort_order; + } + + if(!isRealNum(sort_order)){ + return formula.error.v; + } + + sort_order = Math.floor(parseFloat(sort_order)); + } + + //表示所需排序方向的逻辑值;按行排序为FALSE(默认),按列排序为TRUE。 + var by_col = false; + if(arguments.length == 4){ + by_col = func_methods.getCellBoolen(arguments[3]); + + if(valueIsError(by_col)){ + return by_col; + } + } + + if(by_col){ + if(sort_index < 1 || sort_index > rowlen){ + return formula.error.v; + } + } + else{ + if(sort_index < 1 || sort_index > collen){ + return formula.error.v; + } + } + + if(sort_order != 1 && sort_order != -1){ + return formula.error.v; + } + + //计算 + var asc = function(x, y){ + if(getObjType(x) == "array"){ + x = x[sort_index - 1]; + } + + if(getObjType(y) == "array"){ + y = y[sort_index - 1]; + } + + if(!isNaN(x) && !isNaN(y)){ + return x - y; + } + else if(!isNaN(x)){ + return -1; + } + else if(!isNaN(y)){ + return 1; + } + else{ + if(x > y){ + return 1; + } + else if(x < y){ + return -1; + } + } + } + + var desc = function(x, y){ + if(getObjType(x) == "array"){ + x = x[sort_index - 1]; + } + + if(getObjType(y) == "array"){ + y = y[sort_index - 1]; + } + + if(!isNaN(x) && !isNaN(y)){ + return y - x; + } + else if(!isNaN(x)){ + return 1; + } + else if(!isNaN(y)){ + return -1; + } + else{ + if(x > y){ + return -1; + } + else if(x < y){ + return 1; + } + } + } + + if(by_col){ + array = array[0].map(function(col, a){ + return array.map(function(row){ + return row[a]; + }); + }); + + if(sort_order == 1){ + array.sort(asc); + } + + if(sort_order == -1){ + array.sort(desc); + } + + array = array[0].map(function(col, b){ + return array.map(function(row){ + return row[b]; + }); + }); + } + else{ + if(sort_order == 1){ + array.sort(asc); + } + + if(sort_order == -1){ + array.sort(desc); + } + } + + return array; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "FILTER": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要筛选的数组或范围 + var data_array = arguments[0]; + var array = []; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array" && !func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + array = func_methods.getDataDyadicArr(data_array); + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + array = func_methods.getCellDataDyadicArr(data_array, "number"); + } + else{ + var rowArr = []; + + rowArr.push(parseFloat(data_array)); + + array.push(rowArr); + } + + var rowlen = array.length, + collen = array[0].length; + + //布尔数组,其高度或宽度与数组相同 + var data_include = arguments[1]; + var include = []; + var type = "row"; //筛选方式 row - 行,col - 列 + + if(getObjType(data_include) == "array"){ + if(getObjType(data_include[0]) == "array"){ + if(!func_methods.isDyadicArr(data_include)){ + return formula.error.v; + } + + if(data_include.length > 1 && data_include[0].length > 1){ + return formula.error.v; + } + + if(data_include.length > 1){ + if(data_include.length != array.length){ + return formula.error.v; + } + + type = "row"; + + for(var i = 0; i < data_include.length; i++){ + var txt = data_include[i][0]; + + if(getObjType(txt) == "boolean"){ + + } + else if(getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ + if(txt.toLowerCase() == "true"){ + txt = true; + } + else if(txt.toLowerCase() == "false"){ + txt = false; + } + } + else if(isRealNum(txt)){ + txt = parseFloat(txt); + + txt = txt == 0 ? false : true; + } + else{ + return formula.error.v; + } + + include.push(txt); + } + } + + if(data_include[0].length > 1){ + if(data_include[0].length != array[0].length){ + return formula.error.v; + } + + type = "col"; + + for(var i = 0; i < data_include[0].length; i++){ + var txt = data_include[0][i]; + + if(getObjType(txt) == "boolean"){ + + } + else if(getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ + if(txt.toLowerCase() == "true"){ + txt = true; + } + else if(txt.toLowerCase() == "false"){ + txt = false; + } + } + else if(isRealNum(txt)){ + txt = parseFloat(txt); + + txt = txt == 0 ? false : true; + } + else{ + return formula.error.v; + } + + include.push(txt); + } + } + } + else{ + if(data_include.length != array[0].length){ + return formula.error.v; + } + + type = "col"; + + for(var i = 0; i < data_include.length; i++){ + var txt = data_include[i]; + + if(getObjType(txt) == "boolean"){ + + } + else if(getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ + if(txt.toLowerCase() == "true"){ + txt = true; + } + else if(txt.toLowerCase() == "false"){ + txt = false; + } + } + else if(isRealNum(txt)){ + txt = parseFloat(txt); + + txt = txt == 0 ? false : true; + } + else{ + return formula.error.v; + } + + include.push(txt); + } + } + } + else if(getObjType(data_include) == "object" && data_include.data != null && getObjType(data_include.data) == "array"){ + if(data_include.data.length > 1 && data_include.data[0].length > 1){ + return formula.error.v; + } + + if(data_include.data.length > 1){ + if(data_include.data.length != array.length){ + return formula.error.v; + } + + type = "row"; + + for(var i = 0; i < data_include.data.length; i++){ + var txt = data_include.data[i][0].v; + + if(isRealNull(txt)){ + txt = 0; + } + + if(getObjType(txt) == "boolean"){ + + } + else if(getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ + if(txt.toLowerCase() == "true"){ + txt = true; + } + else if(txt.toLowerCase() == "false"){ + txt = false; + } + } + else if(isRealNum(txt)){ + txt = parseFloat(txt); + + txt = txt == 0 ? false : true; + } + else{ + return formula.error.v; + } + + include.push(txt); + } + } + + if(data_include.data[0].length > 1){ + if(data_include.data[0].length != array[0].length){ + return formula.error.v; + } + + type = "col"; + + for(var i = 0; i < data_include.data[0].length; i++){ + var txt = data_include.data[0][i].v; + + if(isRealNull(txt)){ + txt = 0; + } + + if(getObjType(txt) == "boolean"){ + + } + else if(getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ + if(txt.toLowerCase() == "true"){ + txt = true; + } + else if(txt.toLowerCase() == "false"){ + txt = false; + } + } + else if(isRealNum(txt)){ + txt = parseFloat(txt); + + txt = txt == 0 ? false : true; + } + else{ + return formula.error.v; + } + + include.push(txt); + } + } + } + else{ + return formula.error.v; + } + + //如果包含数组中的所有值都为空(filter不返回任何值),则返回的值 + var if_empty = ""; + if(arguments.length == 3){ + if_empty = func_methods.getFirstValue(arguments[2], "text"); + if(valueIsError(if_empty)){ + return if_empty; + } + } + + //计算 + var result = []; + if(type == "row"){ + for(var i = 0; i < array.length; i++){ + if(include[i]){ + result.push(array[i]); + } + } + } + else{ + for(var i = 0; i < array.length; i++){ + var rowArr = []; + + for(var j = 0; j < array[0].length; j++){ + if(include[j]){ + rowArr.push(array[i][j]); + } + } + + if(rowArr.length > 0){ + result.push(rowArr); + } + } + } + + if(result.length == 0){ + return if_empty; + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "UNIQUE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //从其返回唯一值的数组或区域 + var data_array = arguments[0]; + var array = []; + + if(getObjType(data_array) == "array"){ + if(getObjType(data_array[0]) == "array" && !func_methods.isDyadicArr(data_array)){ + return formula.error.v; + } + + array = func_methods.getDataDyadicArr(data_array); + } + else if(getObjType(data_array) == "object" && data_array.startCell != null){ + array = func_methods.getCellDataDyadicArr(data_array, "number"); + } + else{ + var rowArr = []; + + rowArr.push(parseFloat(data_array)); + + array.push(rowArr); + } + + //逻辑值,指示如何比较;按行 = FALSE 或省略;按列 = TRUE + var by_col = false; + if(arguments.length >= 2){ + by_col = func_methods.getCellBoolen(arguments[1]); + + if(valueIsError(by_col)){ + return by_col; + } + } + + //逻辑值,仅返回唯一值中出现一次 = TRUE;包括所有唯一值 = FALSE 或省略 + var occurs_once = false; + if(arguments.length == 3){ + occurs_once = func_methods.getCellBoolen(arguments[2]); + + if(valueIsError(occurs_once)){ + return occurs_once; + } + } + + //计算 + if(by_col){ + array = array[0].map(function(col, a){ + return array.map(function(row){ + return row[a]; + }); + }); + + var strObj = {}, strArr = []; + var allUnique = []; + + for(var i = 0; i < array.length; i++){ + var str = ''; + + for(var j = 0; j < array[i].length; j++){ + str += array[i][j].toString() + "|||"; + } + + strArr.push(str); + + if(!(str in strObj)){ + strObj[str] = 0; + + allUnique.push(array[i]); + } + } + + if(occurs_once){ + var oneUnique = []; + + for(var i = 0; i < strArr.length; i++){ + if(strArr.indexOf(strArr[i]) == strArr.lastIndexOf(strArr[i])){ + oneUnique.push(array[i]); + } + } + + oneUnique = oneUnique[0].map(function(col, a){ + return oneUnique.map(function(row){ + return row[a]; + }); + }); + + return oneUnique; + } + else{ + allUnique = allUnique[0].map(function(col, a){ + return allUnique.map(function(row){ + return row[a]; + }); + }); + + return allUnique; + } + } + else{ + var strObj = {}, strArr = []; + var allUnique = []; + + for(var i = 0; i < array.length; i++){ + var str = ''; + + for(var j = 0; j < array[i].length; j++){ + str += array[i][j].toString() + "|||"; + } + + strArr.push(str); + + if(!(str in strObj)){ + strObj[str] = 0; + + allUnique.push(array[i]); + } + } + + if(occurs_once){ + var oneUnique = []; + + for(var i = 0; i < strArr.length; i++){ + if(strArr.indexOf(strArr[i]) == strArr.lastIndexOf(strArr[i])){ + oneUnique.push(array[i]); + } + } + + return oneUnique; + } + else{ + return allUnique; + } + } + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "RANDARRAY": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要返回的行数 + var rows = 1; + if(arguments.length >= 1){ + rows = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rows)){ + return rows; + } + + if(!isRealNum(rows)){ + return formula.error.v; + } + + rows = parseInt(rows); + } + + //要返回的列数 + var cols = 1; + if(arguments.length == 2){ + cols = func_methods.getFirstValue(arguments[1]); + if(valueIsError(cols)){ + return cols; + } + + if(!isRealNum(cols)){ + return formula.error.v; + } + + cols = parseInt(cols); + } + + if(rows <= 0 || cols <= 0){ + return formula.error.v; + } + + //计算 + var result = []; + + for(var i = 0; i < rows; i++){ + var result_row = []; + + for(var j = 0; j < cols; j++){ + result_row.push(Math.random().toFixed(9)); + } + + result.push(result_row); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, + "SEQUENCE": function() { + //必要参数个数错误检测 + if (arguments.length < this.m[0] || arguments.length > this.m[1]) { + return formula.error.na; + } + + //参数类型错误检测 + for (var i = 0; i < arguments.length; i++) { + var p = formula.errorParamCheck(this.p, arguments[i], i); + + if (!p[0]) { + return formula.error.v; + } + } + + try { + //要返回的行数 + var rows = func_methods.getFirstValue(arguments[0]); + if(valueIsError(rows)){ + return rows; + } + + if(!isRealNum(rows)){ + return formula.error.v; + } + + rows = parseInt(rows); + + //要返回的列数 + var cols = 1; + if(arguments.length >= 2){ + cols = func_methods.getFirstValue(arguments[1]); + if(valueIsError(cols)){ + return cols; + } + + if(!isRealNum(cols)){ + return formula.error.v; + } + + cols = parseInt(cols); + } + + //序列中的第一个数字 + var start = 1; + if(arguments.length >= 3){ + start = func_methods.getFirstValue(arguments[2]); + if(valueIsError(start)){ + return start; + } + + if(!isRealNum(start)){ + return formula.error.v; + } + + start = parseFloat(start); + } + + //序列中每个序列值的增量 + var step = 1; + if(arguments.length == 4){ + step = func_methods.getFirstValue(arguments[3]); + if(valueIsError(step)){ + return step; + } + + if(!isRealNum(step)){ + return formula.error.v; + } + + step = parseFloat(step); + } + + if(rows <= 0 || cols <= 0){ + return formula.error.v; + } + + //计算 + var result = []; + + for(var i = 0; i < rows; i++){ + var result_row = []; + + for(var j = 0; j < cols; j++){ + var number = start + step * (j + cols * i); + result_row.push(number); + } + + result.push(result_row); + } + + return result; + } + catch (e) { + var err = e; + err = formula.errorInfo(err); + return [formula.error.v, err]; + } + }, +}; + +export default functionImplementation; \ No newline at end of file diff --git a/src/function/functionlist.js b/src/function/functionlist.js new file mode 100644 index 000000000..69b050a42 --- /dev/null +++ b/src/function/functionlist.js @@ -0,0 +1,9049 @@ +import functionImplementation from './functionImplementation'; + +//{"0":"数学","1":"统计","2":"查找","3":"Luckysheet内置","4":"数据挖掘","5":"数据源","6":"日期","7":"过滤器","8":"财务","9":"工程计算","10":"逻辑","11":"运算符","12":"文本","13":"转换工具","14":"数组"} +const functionlist = [ + { + 'n': 'SUMIF', + 't': 0, + 'd': '对范围中符合指定条件的值求和。', + 'a': '对范围中符合指定条件的值求和。', + 'm': [2, 3], + 'p': [{ + 'name': '范围', + 'detail': '要根据条件进行检测的范围。', + 'example': 'A1:A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '条件', + 'detail': '要应用于范围的模式或测试条件。\n\n如果范围包含的是要检测的文本,则条件必须为字符串。条件可以包含通配符,包括用于匹配单个字符的?或用于匹配零个或连续多个字符的*。要匹配问号星号本身,请在该字符前面加上波浪号(~)前缀(即~?和~*)。字符串条件必须用引号括起来。函数会检查范围中的每个单元格与条件是否相等或匹配(如果使用了通配符)。\n\n如果范围包含的是要检测的数字,则条件可以是字符串也可以是数字。如果给定的条件是一个数字,则检查范围中的每个单元格是否等于条件。另外,条件也可能是包含数字的字符串(也将对其进行相等检测),或者带有以下前缀的数字:=(检查是否相等)、>(检查范围单元格的值是否大于条件值)或<(检查范围单元格的值是否小于条件值)', + 'example': '">20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '求和范围', + 'detail': '要求和的范围(如果与范围不同)。', + 'example': 'B1:B10', + 'require': 'o', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'TAN', + 't': 0, + 'd': '返回已知角度的正切值。', + 'a': '返回已知角度的正切值。', + 'm': [1, 1], + 'p': [{ + 'name': '角度', + 'detail': '要求其正切值的角度,以弧度表示。', + 'example': '45*PI()/180', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TANH', + 't': 0, + 'd': '返回给定实数的双曲正切值。', + 'a': '返回给定实数的双曲正切值。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其双曲正切值的实数。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CEILING', + 't': 0, + 'd': '将数值向上取整为最接近的指定因数的倍数。', + 'a': '将数值向上取整为最接近的指定因数的倍数。', + 'm': [2, 2], + 'p': [{ + 'name': '值', + 'detail': '要向上舍入的数值。', + 'example': '23.25', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '因数', + 'detail': '要将值舍入到此数的整数倍。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ATAN', + 't': 0, + 'd': '返回数值的反正切值,以弧度表示。', + 'a': '返回数值的反正切值', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其反正切值的数值。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ASINH', + 't': 0, + 'd': '返回数值的反双曲正弦值。', + 'a': '返回数值的反双曲正弦值。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其反双曲正弦值的数值。', + 'example': '0.9', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ABS', + 't': 0, + 'd': '返回数值的绝对值。', + 'a': '返回数值的绝对值。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要返回其绝对值的数。', + 'example': '-2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ACOS', + 't': 0, + 'd': '返回数值的反余弦值,以弧度表示。', + 'a': '返回数值的反余弦值', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其反余弦值的数值。必须介于-1和1之间,包括两端值。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ACOSH', + 't': 0, + 'd': '返回数值的反双曲余弦值。', + 'a': '返回数值的反双曲余弦值。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其反双曲余弦值的数值。必须大于等于1。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MULTINOMIAL', + 't': 0, + 'd': '返回参数和的阶乘除以各参数阶乘的乘积后得到的值。', + 'a': '返回参数和的阶乘除以各参数阶乘的乘积后得到的值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '用于计算的第一项数值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2', + 'detail': '用于计算的其他数值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'ATANH', + 't': 0, + 'd': '返回数值的反双曲正切值。', + 'a': '返回数值的反双曲正切值。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其反双曲正切值的数值。必须介于-1和1之间(不包括-1和1)。', + 'example': '0.9', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ATAN2', + 't': 0, + 'd': '以弧度为单位返回 x 轴与从原点 (0,0) 到指定坐标点 (`x`,`y`) 之间连线的夹角。', + 'a': '以弧度为单位返回 x 轴与从原点 (0,0) 到指定坐标点 (`x`,`y`) 之间连线的夹角。', + 'm': [2, 2], + 'p': [{ + 'name': 'x', + 'detail': '要计算其与x轴夹角大小的线段的终点x坐标。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'y', + 'detail': '要计算其与x轴夹角大小的线段的终点y坐标。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUNTBLANK', + 't': 1, + 'd': '返回给定范围内的空单元格数。', + 'a': '返回给定范围内的空单元格数。', + 'm': [1, 1], + 'p': [{ + 'name': '范围', + 'detail': '要统计空白单元格数量的范围。', + 'example': 'A2:C100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'COSH', + 't': 0, + 'd': '返回给定实数的双曲余弦值。', + 'a': '返回给定实数的双曲余弦值。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其双曲余弦值的实数值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'INT', + 't': 0, + 'd': '将数值向下取整为小于或等于该数的最接近的整数。', + 'a': '将数值向下取整为小于或等于该数的最接近的整数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要向下取整为最接近的整数的数值。', + 'example': '99.44', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ISEVEN', + 't': 0, + 'd': '检查所提供的数值是否为偶数。', + 'a': '检查所提供的数值是否为偶数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要验证其是否为偶数的数值。\n\n如果值为偶数或指向包含偶数的单元格的引用,ISEVEN将返回TRUE,否则返回FALSE。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ISODD', + 't': 0, + 'd': '检查所提供的数值是否为奇数。', + 'a': '检查所提供的数值是否为奇数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要验证其是否为奇数的数值。\n\n如果值为奇数或指向包含奇数的单元格,ISODD将返回TRUE,否则返回FALSE。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'LCM', + 't': 0, + 'd': '返回一个或多个整数的最小公倍数。', + 'a': '返回一个或多个整数的最小公倍数。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '要在求最小公倍数数的计算中检查其因数的第一项数值或范围。', + 'example': 'A2:A5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2', + 'detail': '[可选] - 在求最小公倍数时要考虑其因数的其他数值或范围。', + 'example': '3', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'LN', + 't': 0, + 'd': '返回数值以 e(欧拉数)为底的对数。', + 'a': '返回数值以 e(欧拉数)为底的对数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要以 e 为底数计算其对数的值。\n\n值必须为正数。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'LOG', + 't': 0, + 'd': '根据指定底数返回数字的对数。', + 'a': '根据指定底数返回数字的对数。', + 'm': [1, 2], + 'p': [{ + 'name': '值', + 'detail': '想要计算其对数的正实数。', + 'example': '128', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '底数', + 'detail': '[可选] - 对数的底数。', + 'example': '2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'LOG10', + 't': 0, + 'd': '返回数值以10为底的对数。', + 'a': '返回数值以10为底的对数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其以10为底的对数的数值。\n\n值必须为正值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MOD', + 't': 0, + 'd': '返回两数相除的余数, 结果的符号与除数相同。', + 'a': '返回两数相除的余数。', + 'm': [2, 2], + 'p': [{ + 'name': '被除数', + 'detail': '要将其相除以得到余数的数值。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '除数', + 'detail': '用于除其他数的数值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MROUND', + 't': 0, + 'd': '将数值取整为另一整数最接近的整数倍。', + 'a': '将数值取整为另一整数最接近的整数倍。', + 'm': [2, 2], + 'p': [{ + 'name': '值', + 'detail': '要取整为另一整数最接近的整数倍的数值。', + 'example': '21', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '因数', + 'detail': '值将取此因数的整数倍。', + 'example': '14', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ODD', + 't': 0, + 'd': '将数值向上取整为最接近的奇整数。', + 'a': '将数值向上取整为最接近的奇整数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要向上取整的数值,取整值为大于此值的最接近的奇数。\n\n如果值为负数,则将其取整为绝对值大于该值的相邻负奇数。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUMSQ', + 't': 0, + 'd': '返回一组数值和/或单元格的平方总和。', + 'a': '返回一组数值和/或单元格的平方总和。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '要将其平方相加的第一个数值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 要将其平方与值1的平方相加的其他数值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'COMBIN', + 't': 0, + 'd': '给定集合中的对象总数和要选择的对象数量,返回共有多少种不同选择方式。', + 'a': '给定集合中的对象总数和要选择的对象数量', + 'm': [2, 2], + 'p': [{ + 'name': 'n', + 'detail': '要从中进行选择的对象集合的大小。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'k', + 'detail': '要选择的对象数量。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUM', + 't': 0, + 'd': '返回一组数值和/或单元格的总和。', + 'a': '返回一组数值和/或单元格的总和。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '要相加的第一个数值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2', + 'detail': '[可选] - 要相加的其他数值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'SUBTOTAL', + 't': 0, + 'd': '使用指定的汇总函数,返回一系列纵向单元格的分类汇总。', + 'a': '使用指定的汇总函数', + 'm': [2, 256], + 'p': [{ + 'name': '函数代码', + 'detail': '用于计算分类汇总的函数。\n\n1代表AVERAGE\n\n2代表COUNT\n\n3代表COUNTA\n\n4代表MAX\n\n5代表MIN\n\n6代表PRODUCT\n\n7代表STDEV\n\n8代表STDEVP\n\n9代表SUM\n\n10代表VAR\n\n11代表VARP\n\n通过在这些2位代码前附加10(对于1位代码)或1(对于2位代码),可以将隐藏值忽略。例如,102代表忽略隐藏单元格的COUNT,而110则代表忽略隐藏值的VAR。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '范围1', + 'detail': '要计算分类汇总的第一个范围。', + 'example': 'A2:A5', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '范围2', + 'detail': '[可选] - 要计算分类汇总的其他范围。', + 'example': 'B2:B8', + 'require': 'o', + 'repeat': 'y', + 'type': 'range' + }] + }, { + 'n': 'ASIN', + 't': 0, + 'd': '返回数值的反正弦值,以弧度表示。', + 'a': '返回数值的反正弦值', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其反正弦值的数值。必须介于-1和1之间,包括两端值。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUNTIF', + 't': 1, + 'd': '返回范围内满足某个条件的单元格的数量。', + 'a': '返回范围内满足某个条件的单元格的数量。', + 'm': [2, 2], + 'p': [{ + 'name': '范围', + 'detail': '要根据条件进行检测的范围。', + 'example': 'A1:A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '条件', + 'detail': '要应用于范围的模式或测试条件。\n\n如果范围包含的是要检测的文本,则条件必须为字符串。条件可以包含通配符,包括用于匹配单个字符的?或用于匹配零个或连续多个字符的*。要匹配问号星号本身,请在该字符前面加上波浪号(~)前缀(即~?和~*)。字符串条件必须用引号括起来。函数会检查范围中的每个单元格与条件是否相等或匹配(如果使用了通配符)。\n\n如果范围包含的是要检测的数字,则条件可以是字符串也可以是数字。如果给定的条件是一个数字,则检查范围中的每个单元格是否等于条件。另外,条件也可能是包含数字的字符串(也将对其进行相等检测),或者带有以下前缀的数字:=、>、>=、<或<=,这些条件将分别用于检查范围中的单元格是否等于、大于、大于等于、小于、小于等于条件值。', + 'example': '">20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'RADIANS', + 't': 0, + 'd': '将以度表示的角度值转换为弧度。', + 'a': '将以度表示的角度值转换为弧度。', + 'm': [1, 1], + 'p': [{ + 'name': '角度', + 'detail': '要从度转换为弧度的角度。', + 'example': '180', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'RAND', + 't': 0, + 'd': '返回一个介于0和1之间(包括0但不包括1)的随机数。', + 'a': '返回一个介于0和1之间(包括0但不包括1)的随机数。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'COUNTUNIQUE', + 't': 0, + 'd': '计算一列指定值和范围中不重复数值的个数。', + 'a': '计算一列指定值和范围中不重复数值的个数。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '要检查其是否唯一的第一个值或范围。', + 'example': 'A1:C100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2', + 'detail': '[可选] - 要检查是否唯一的其他值或范围。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'DEGREES', + 't': 0, + 'd': '将以弧度表示的角度值转换为度。', + 'a': '将以弧度表示的角度值转换为度。', + 'm': [1, 1], + 'p': [{ + 'name': '角度', + 'detail': '要从弧度转换为度的角度。', + 'example': 'PI()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ERFC', + 't': 9, + 'd': '返回数值的互补高斯误差函数。', + 'a': '返回数值的互补高斯误差函数。', + 'm': [1, 1], + 'p': [{ + 'name': 'z', + 'detail': '要为其计算互补高斯误差函数的数值。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'EVEN', + 't': 0, + 'd': '将数值向上取整为最接近的偶整数。', + 'a': '将数值向上取整为最接近的偶整数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要向上取整的数值,取整值为大于此值的最接近的偶数。\n\n如果值为负数,则将其取整为绝对值大于该值的相邻负偶数。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'EXP', + 't': 0, + 'd': '返回欧拉数 e (~2.718) 的指定次幂。', + 'a': '返回欧拉数 e (~2.718) 的指定次幂。', + 'm': [1, 1], + 'p': [{ + 'name': '指数', + 'detail': '指定e的自乘幂次值。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FACT', + 't': 0, + 'd': '返回数值的阶乘。', + 'a': '返回数值的阶乘。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算并返回其阶乘的数字或对数字(所在单元格)的引用。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FACTDOUBLE', + 't': 0, + 'd': '返回数值的“双阶乘”。', + 'a': '返回数值的“双阶乘”。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算并返回其双阶乘的数字或对数字(所在单元格)的引用。', + 'example': '6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PI', + 't': 0, + 'd': '返回带有14位小数的 PI 值。', + 'a': '返回带有14位小数的 PI 值。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'FLOOR', + 't': 0, + 'd': '将数值向下取整为指定因数的最接近的整数倍。', + 'a': '将数值向下取整为指定因数的最接近的整数倍。', + 'm': [2, 2], + 'p': [{ + 'name': '值', + 'detail': '要向下舍入为因数的最接近整数倍的数值。', + 'example': '23.25', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '因数', + 'detail': '要将值舍入到此数的整数倍。\n\n因数不得为0。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'GCD', + 't': 0, + 'd': '返回一个或多个整数的最大公约数。', + 'a': '返回一个或多个整数的最大公约数。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '要在查找最大公约数的计算中检查其因数的第一项数值或范围。', + 'example': 'A2:A5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2', + 'detail': '[可选] - 在求最大公约数时要考虑其因数的其他数值或范围。', + 'example': '96', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'RANDBETWEEN', + 't': 0, + 'd': '返回介于两个整数之间(包括这两个整数)的随机数。', + 'a': '返回介于两个整数之间(包括这两个整数)的随机数。', + 'm': [2, 2], + 'p': [{ + 'name': '下界', + 'detail': '随机值范围的下界。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '上界', + 'detail': '随机值范围的上界。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ROUND', + 't': 0, + 'd': '将数字四舍五入到指定的位数。', + 'a': '将数字四舍五入到指定的位数。', + 'm': [2, 2], + 'p': [{ + 'name': '值', + 'detail': '要四舍五入的数字。', + 'example': '99.44', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '位数', + 'detail': '要进行四舍五入运算的位数。\n\n位数可以取负值,在这种情况下会将值的小数点左侧部分舍入到指定的位数。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ROUNDDOWN', + 't': 0, + 'd': '朝着零的方向将数字进行向下舍入。', + 'a': '朝着零的方向将数字进行向下舍入。', + 'm': [2, 2], + 'p': [{ + 'name': '值', + 'detail': '需要向下舍入的任意实数。', + 'example': '99.44', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '位数', + 'detail': '要通过舍入达到的小数位数。\n\n位数可以取负值,在这种情况下会将值的小数点左侧部分舍入到指定的位数。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ROUNDUP', + 't': 0, + 'd': '朝着远离 0(零)的方向将数字进行向上舍入。', + 'a': '朝着远离 0(零)的方向将数字进行向上舍入。', + 'm': [2, 2], + 'p': [{ + 'name': '值', + 'detail': '要将其舍入为位数位数字的值,始终向上舍入。', + 'example': '99.44', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '位数', + 'detail': '要通过舍入达到的小数位数。\n\n位数可以取负值,在这种情况下会将值的小数点左侧部分舍入到指定的位数。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SERIESSUM', + 't': 0, + 'd': '给定参数 x、n、m 和 a,返回幂级数的和 a1xn + a2x(n+m) + ... + aix(n+(i-1)m),其中 i 为范围 a 中的项数。', + 'a': '给定参数 x、n、m 和 a', + 'm': [4, 4], + 'p': [{ + 'name': 'x', + 'detail': '幂级数的输入值。随相应的近似类型而变,有可能为角度、指数或其他一些值。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'n', + 'detail': '在幂级数中x的初始自乘幂次。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'm', + 'detail': 'x的幂次中的附加增量。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'a', + 'detail': '包含幂级数系数的数组或范围。', + 'example': '{FACT(0)', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SIGN', + 't': 0, + 'd': '给定输入数值,如果为负返回-1;如果为正返回1;如果为零则返回0。', + 'a': '给定输入数值', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要返回其符号的数值。', + 'example': '-42', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SIN', + 't': 0, + 'd': '给定角度(以弧度表示),返回其正弦值。', + 'a': '给定角度(以弧度表示)', + 'm': [1, 1], + 'p': [{ + 'name': '角度', + 'detail': '要返回其正弦值的角度,以弧度表示。', + 'example': 'PI()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SINH', + 't': 0, + 'd': '返回给定实数的双曲正弦值。', + 'a': '返回给定实数的双曲正弦值。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其双曲正弦值的实数值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SQRT', + 't': 0, + 'd': '返回一个正数的正平方根。', + 'a': '返回一个正数的正平方根。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要计算其正平方根的数值。\n\n值必须为正数;如果为负,SQRT 将返回 #NUM! 错误。', + 'example': '9', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SQRTPI', + 't': 0, + 'd': '返回 PI 与给定正数乘积的正平方根。', + 'a': '返回 PI 与给定正数乘积的正平方根。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '要将其与 PI 相乘并返回该乘积的平方根的数值\n\n值必须为正数;如果为负数,SQRTPI 将返回 #NUM! 错误。', + 'example': '9', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'GAMMALN', + 't': 1, + 'd': '返回指定伽玛函数的以 e(欧拉数)为底的对数。', + 'a': '返回指定伽玛函数的以 e(欧拉数)为底的对数。', + 'm': [1, 1], + 'p': [{ + 'name': '值', + 'detail': '伽玛函数的输入值。返回的将是伽玛 (值) 的自然对数。\n\n值必须为正数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COS', + 't': 0, + 'd': '返回给定角度的余弦值(角度以弧度表示)。', + 'a': '返回给定角度的余弦值(角度以弧度表示)。', + 'm': [1, 1], + 'p': [{ + 'name': '角度', + 'detail': '要取其余弦值的角度,以弧度表示。', + 'example': 'PI()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TRUNC', + 't': 0, + 'd': '截除指定有效位之外的部分,取数据的指定有效位。', + 'a': '截除指定有效位之外的部分', + 'm': [1, 2], + 'p': [{ + 'name': '值', + 'detail': '要截取的数据。', + 'example': '3.141592654', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '位数', + 'detail': '[可选 - 默认值为0] - 小数点右侧要保留的有效位数。\n\n如果位数大于值中的有效位数,则将“值”原样返回。\n\n位数可以取负值,在这种情况下会将小数点左侧指定位数的值更改为零。小数点右侧的所有位数都会被舍弃。如果值的所有位都被更改为零,则TRUNC会返回0。', + 'example': '2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'QUOTIENT', + 't': 0, + 'd': '返回以一个数除以另一个数所得的结果,不包含余数。', + 'a': '返回以一个数除以另一个数所得的结果', + 'm': [2, 2], + 'p': [{ + 'name': '被除数', + 'detail': '要被除的数值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '除数', + 'detail': '用于除其他数的数值。\n\n除数不得为0。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'POWER', + 't': 0, + 'd': '返回数值的指定次幂。', + 'a': '返回数值的指定次幂。', + 'm': [2, 2], + 'p': [{ + 'name': '底数', + 'detail': '要计算其指数次幂的数值。\n\n如果底数为负,则指数必须为整数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '指数', + 'detail': '指定底数的自乘幂次值。', + 'example': '0.5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUMIFS', + 't': 0, + 'd': '根据多项条件返回范围之和。', + 'a': '根据多项条件返回范围之和。', + 'm': [3, 257], + 'p': [{ + 'name': '求和范围', + 'detail': '要对其求和的范围。', + 'example': 'A1:A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '条件范围1', + 'detail': '要在哪个范围内检查条件1。', + 'example': ' B1:B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '条件1', + 'detail': '要应用于条件范围1的模式或测试条件。', + 'example': ' ">20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '条件范围2, 条件2...', + 'detail': '[ 可选 ] - 要检查的其他范围和条件。', + 'example': ' C1:C10', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'COUNTIFS', + 't': 1, + 'd': '根据多项条件返回范围中的单元格数量。', + 'a': '根据多项条件返回范围中的单元格数量。', + 'm': [2, 256], + 'p': [{ + 'name': '条件范围1', + 'detail': '要在哪个范围内检查条件1。', + 'example': 'A1:A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '条件1', + 'detail': '要应用于条件范围1的模式或测试条件。', + 'example': ' ">20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '条件范围2, 条件2...', + 'detail': '[ 可选 ] - 要检查的其他范围和条件,可重复。', + 'example': ' B1:B10', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'PRODUCT', + 't': 0, + 'd': '返回将一组数相乘所得的结果。', + 'a': '返回将一组数相乘所得的结果。', + 'm': [1, 255], + 'p': [{ + 'name': '乘数1', + 'detail': '用于计算乘积的第一个数值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '乘数2 ... 乘数30', + 'detail': '[可选] - 要相乘的其他数值。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'HARMEAN', + 't': 1, + 'd': '计算数据集的调和平均值。', + 'a': '计算数据集的调和平均值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他数值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'HYPGEOMDIST', + 't': 1, + 'd': '返回超几何分布。 如果已知样本量、总体成功次数和总体大小,则 HYPGEOM.DIST 返回样本取得已知成功次数的概率。', + 'a': '返回超几何分布。', + 'm': [5, 5], + 'p': [{ + 'name': 'Sample_s', + 'detail': '样本中成功的次数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'Number_sample', + 'detail': '样本量。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'Population_s', + 'detail': '总体中成功的次数。', + 'example': '20', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'Number_pop', + 'detail': '总体大小。', + 'example': '40', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '决定函数形式的逻辑值。\n\n如果 cumulative 为 TRUE(),则 HYPGEOM.DIST 返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', + 'example': 'TRUE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'INTERCEPT', + 't': 1, + 'd': '计算数据集的线性回归方程直线与 Y 轴的相交点 (x=0) 的 y 值。', + 'a': '计算数据集的线性回归方程直线与 Y 轴的相交点 (x=0) 的 y 值。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'KURT', + 't': 1, + 'd': '计算数据集的峭度,该指标指示数据集(分布)的形态,尤其是该形态的陡峭程度。', + 'a': '计算数据集的峭度', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '数据集中的第一个值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'LARGE', + 't': 1, + 'd': '返回数据集中第 n 个最大元素,n 由用户指定。', + 'a': '返回数据集中第 n 个最大元素', + 'm': [2, 2], + 'p': [{ + 'name': '数据', + 'detail': '包含相关数据集的数组或范围。', + 'example': 'A2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'n', + 'detail': '要返回的元素的排行位置(从大到小顺序)。\n\n例如,将n设为4将使LARGE返回数据中排名第4的最大元素。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'STDEVA', + 't': 1, + 'd': '基于样本计算标准偏差,将文本取值为0。', + 'a': '基于样本计算标准偏差', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2,…', + 'detail': '[可选] - 样本中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'STDEVP', + 't': 1, + 'd': '基于样本总体计算标准偏差。', + 'a': '基于样本总体计算标准偏差。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '数据集中的第一个值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'GEOMEAN', + 't': 1, + 'd': '计算数据集的几何平均值。', + 'a': '计算数据集的几何平均值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他数值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'RANK_EQ', + 't': 1, + 'd': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回其中的最高排名。', + 'a': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回其中的最高排名。', + 'm': [2, 3], + 'p': [{ + 'name': 'number', + 'detail': '要确定其排名的值。', + 'example': 'A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'ref', + 'detail': '包含相关数据集的数组或范围。', + 'example': 'A1:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'order', + 'detail': '[可选 - 默认为按降序 (FALSE()) ] - 要按升序还是按降序考虑“data”中的值。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'RANK_AVG', + 't': 1, + 'd': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回这些项排名的平均值。', + 'a': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回这些项排名的平均值。', + 'm': [2, 3], + 'p': [{ + 'name': 'number', + 'detail': '要确定其排名的值。', + 'example': 'A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'ref', + 'detail': '包含相关数据集的数组或范围。', + 'example': 'A1:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'order', + 'detail': '[可选 - 默认为按降序 (FALSE()) ] - 要按升序还是按降序考虑“data”中的值。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'PERCENTRANK_EXC', + 't': 1, + 'd': '以百分数形式返回指定值在给定数据集中的百分比排名(介于0和1之间,不包括两端值)。', + 'a': '以百分数形式返回指定值在给定数据集中的百分比排名(介于0和1之间,不包括两端值)。', + 'm': [2, 3], + 'p': [{ + 'name': 'data', + 'detail': '包含相关数据集的数组或范围。', + 'example': 'A1:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'x', + 'detail': '要确定其百分比排位的值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'significance', + 'detail': '[可选 - 默认值为 3] - 要在计算中使用的有效位数。', + 'example': '4', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PERCENTRANK_INC', + 't': 1, + 'd': '以百分比形式返回指定值在给定数据集中的百分比排名(介于0和1之间,包括两端值)。', + 'a': '以百分比形式返回指定值在给定数据集中的百分比排名(介于0和1之间,包括两端值)。', + 'm': [2, 3], + 'p': [{ + 'name': 'data', + 'detail': '包含相关数据集的数组或范围。', + 'example': 'A1:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'x', + 'detail': '要确定其百分比排位的值。', + 'example': ' A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'significance', + 'detail': '[可选 - 默认值为 3] - 要在计算中使用的有效位数。', + 'example': '4', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FORECAST', + 't': 1, + 'd': '基于数据集的线性回归,计算指定 x 的预期 y 值。', + 'a': '基于数据集的线性回归', + 'm': [3, 3], + 'p': [{ + 'name': 'x', + 'detail': 'x轴上用于预测的值。', + 'example': 'A1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FISHERINV', + 't': 1, + 'd': '返回指定数值的 Fisher 逆变换。', + 'a': '返回指定数值的 Fisher 逆变换。', + 'm': [1, 1], + 'p': [{ + 'name': 'y', + 'detail': '要计算其Fisher逆变换的数值。', + 'example': '0.962', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FISHER', + 't': 1, + 'd': '返回指定数值的 Fisher 变换。', + 'a': '返回指定数值的 Fisher 变换。', + 'm': [1, 1], + 'p': [{ + 'name': 'x', + 'detail': '要计算其Fisher变换的数值。', + 'example': '0.962', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MODE_SNGL', + 't': 1, + 'd': '返回数据集中出现次数最多的值。', + 'a': '返回数据集中出现次数最多的值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算模式时要检查的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 在计算模式时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'WEIBULL_DIST', + 't': 1, + 'd': '给定形状和尺度,返回韦伯分布函数(或韦伯累积分布函数)的值。', + 'a': '给定形状和尺度', + 'm': [4, 4], + 'p': [{ + 'name': 'x', + 'detail': 'WEIBULL 分布函数的输入值。', + 'example': '2.4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'alpha', + 'detail': 'Weibull 分布函数的形状参数。\n\nalpha 值必须大于 0。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'beta', + 'detail': 'Weibull 分布函数的尺度参数。\n\nbeta 值必须大于 0。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': 'TRUE() 表示使用累积分布函数,FALSE() 则表示使用概率密度函数。', + 'example': 'TRUE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'COUNT', + 't': 1, + 'd': '返回数据集中数值的个数。', + 'a': '返回数据集中数值的个数。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计数时要检查的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 在计数时要检查的其他值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'COUNTA', + 't': 1, + 'd': '返回数据集中值的数量。', + 'a': '返回数据集中值的数量。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计数时要检查的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 在计数时要检查的其他值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'AVEDEV', + 't': 1, + 'd': '计算数据与数据集均值之间的偏差大小的平均值。', + 'a': '计算数据与数据集均值之间的偏差大小的平均值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 样本中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'AVERAGE', + 't': 1, + 'd': '返回数据集的算术平均值,对文本忽略不计。', + 'a': '返回数据集的算术平均值', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算平均值时用到的第一个数值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 在计算平均值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'AVERAGEA', + 't': 1, + 'd': '返回数据集的算术平均值。', + 'a': '返回数据集的算术平均值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算平均值时用到的第一个数值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 在计算平均值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'BINOM_DIST', + 't': 1, + 'd': '返回一元二项式分布的概率。', + 'a': '返回一元二项式分布的概率。', + 'm': [4, 4], + 'p': [{ + 'name': 'number_s', + 'detail': '试验的成功次数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'trials', + 'detail': '独立检验的次数。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'probability_s', + 'detail': '任一给定检验的成功概率。', + 'example': '0.005', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '是否使用二项式累积分布。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'BINOM_INV', + 't': 1, + 'd': '计算累积二项式分布大于或等于指定条件的最小值。', + 'a': '计算累积二项式分布大于或等于指定条件的最小值。', + 'm': [3, 3], + 'p': [{ + 'name': 'trials', + 'detail': '贝努利试验次数。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'probability_s', + 'detail': '任一次给定检验的成功概率。', + 'example': '0.005', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'alpha', + 'detail': '期望的临界概率。', + 'example': '0.8', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CONFIDENCE_NORM', + 't': 1, + 'd': '计算正态分布的置信区间的一半宽度。', + 'a': '计算正态分布的置信区间的一半宽度。', + 'm': [3, 3], + 'p': [{ + 'name': 'alpha', + 'detail': '用来计算置信水平的显著性水平。\n\n置信水平等于 100*(1 - alpha)%,亦即,如果 alpha 为 0.05,则置信水平为 95%。', + 'example': '0.05', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'standard_dev', + 'detail': '数据区域的总体标准偏差。', + 'example': '1.6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'size', + 'detail': '样本总量的大小。', + 'example': '250', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CORREL', + 't': 1, + 'd': '计算给定数据集的皮尔逊积矩相关系数 r。', + 'a': '计算给定数据集的皮尔逊积矩相关系数 r。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COVARIANCE_P', + 't': 1, + 'd': '计算数据集的总体协方差。', + 'a': '计算数据集的总体协方差。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COVARIANCE_S', + 't': 1, + 'd': '计算数据集的样本协方差。', + 'a': '计算数据集的样本协方差。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DEVSQ', + 't': 1, + 'd': '基于样本计算其偏差的平方和。', + 'a': '基于样本计算其偏差的平方和。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 样本中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'EXPON_DIST', + 't': 1, + 'd': '返回带有指定 Lambda 和指定值的指数分布函数的值。', + 'a': '返回带有指定 Lambda 和指定值的指数分布函数的值。', + 'm': [3, 3], + 'p': [{ + 'name': 'x', + 'detail': '指数分布函数的输入值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'lambda', + 'detail': '用于指定指数分布函数的 lambda 值。', + 'example': '0.5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '是否使用指数累积分布。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'AVERAGEIF', + 't': 1, + 'd': '根据条件返回范围的平均值。', + 'a': '根据条件返回范围的平均值。', + 'm': [2, 3], + 'p': [{ + 'name': 'criteria_range', + 'detail': '要对其检查 criterion 的范围。', + 'example': 'A1:A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criterion', + 'detail': '要应用于 criteria_range 的模式或测试条件。\n\n等于:"文本" 或 1 或 "=文本" 或 "=1"\n\n大于:">1"\n\n大于等于:">=1"\n\n小于:"<1"\n\n小于等于:"<=1"\n\n不等于:"<>1"或"<>文本"', + 'example': '">20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'average_range', + 'detail': '[可选] - 要计算平均值的范围。如果未提供此参数,则改用 criteria_range 来计算平均值。', + 'example': 'B1:B10', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'AVERAGEIFS', + 't': 1, + 'd': '根据多项条件返回范围的平均值。', + 'a': '根据多项条件返回范围的平均值。', + 'm': [2, 255], + 'p': [{ + 'name': 'average_range', + 'detail': '要计算平均值的范围。', + 'example': 'A1:A10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria_range1', + 'detail': '要对其检查 criterion1 的范围。', + 'example': ' B1:B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criterion1', + 'detail': '要应用于 criteria_range1 的模式或测试条件。', + 'example': ' ">20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria_range2, criterion2, ...', + 'detail': '[可选] - 要检查的其他范围和条件。', + 'example': ' C1:C10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'PERMUT', + 't': 1, + 'd': '返回可从数字对象中选择的给定数目对象的排列数。', + 'a': '返回可从数字对象中选择的给定数目对象的排列数。', + 'm': [2, 2], + 'p': [{ + 'name': 'number', + 'detail': '表示对象个数的整数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'number_chosen', + 'detail': '表示每个排列中对象个数的整数。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TRIMMEAN', + 't': 1, + 'd': '在排除数据集高低两端的部分数据之后计算所得的均值。', + 'a': '在排除数据集高低两端的部分数据之后计算所得的均值。', + 'm': [2, 2], + 'p': [{ + 'name': '数据', + 'detail': '包含相关数据集的数组或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': '排除比例', + 'detail': '要从数据集的极值部分排除的数据占数据集的比例。\n\n排除比例必须大于等于0且小于1。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PERCENTILE_EXC', + 't': 1, + 'd': '返回数组的 K 百分点值,K 介于 0 到 1 之间,不含 0 与 1。', + 'a': '返回数组的 K 百分点值,K 介于 0 到 1 之间,不含 0 与 1。', + 'm': [2, 2], + 'p': [{ + 'name': 'array', + 'detail': '定义相对位置的数组或数据区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'k', + 'detail': '0 到 1 之间的百分点值,不包含 0 和 1。', + 'example': '0.25', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PERCENTILE_INC', + 't': 1, + 'd': '返回数组的 K 百分点值,K 介于 0 到 1 之间,包含 0 与 1。', + 'a': '返回数组的 K 百分点值,K 介于 0 到 1 之间,包含 0 与 1。', + 'm': [2, 2], + 'p': [{ + 'name': 'array', + 'detail': '定义相对位置的数组或数据区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'k', + 'detail': '0 到 1 之间的百分点值,包含 0 和 1。', + 'example': '0.25', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PEARSON', + 't': 1, + 'd': '返回皮尔生(Pearson)乘积矩相关系数 r。', + 'a': '返回皮尔生(Pearson)乘积矩相关系数 r。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'NORM_S_INV', + 't': 1, + 'd': '返回标准正态累积分布函数的反函数值。 该分布的平均值为 0,标准偏差为 1。', + 'a': '返回标准正态累积分布函数的反函数值。 该分布的平均值为 0,标准偏差为 1。', + 'm': [1, 1], + 'p': [{ + 'name': 'probability', + 'detail': '对应于正态分布的概率。', + 'example': '0.75', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'NORM_S_DIST', + 't': 1, + 'd': '返回标准正态分布函数(该分布的平均值为 0,标准偏差为 1)。', + 'a': '返回标准正态分布函数(该分布的平均值为 0,标准偏差为 1)。', + 'm': [2, 2], + 'p': [{ + 'name': 'z', + 'detail': '需要计算其分布的数值。', + 'example': '2.4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'NORM_INV', + 't': 1, + 'd': '返回指定平均值和标准偏差的正态累积分布函数的反函数值。', + 'a': '返回指定平均值和标准偏差的正态累积分布函数的反函数值。', + 'm': [3, 3], + 'p': [{ + 'name': 'probability', + 'detail': '对应于正态分布的概率。', + 'example': '0.75', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'mean', + 'detail': '分布的算术平均值。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'standard_dev', + 'detail': '分布的标准偏差。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'NORM_DIST', + 't': 1, + 'd': '返回指定平均值和标准偏差的正态分布函数。', + 'a': '返回指定平均值和标准偏差的正态分布函数。', + 'm': [4, 4], + 'p': [{ + 'name': 'x', + 'detail': '需要计算其分布的数值。', + 'example': '2.4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'mean', + 'detail': '分布的算术平均值。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'standard_dev', + 'detail': '分布的标准偏差。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'NEGBINOM_DIST', + 't': 1, + 'd': '返回负二项式分布。', + 'a': '返回负二项式分布。', + 'm': [4, 4], + 'p': [{ + 'name': 'number_f', + 'detail': '要模拟的失败次数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'number_s', + 'detail': '要模拟的成功次数。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'probability_s', + 'detail': '任一次给定检验的成功概率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'MINA', + 't': 1, + 'd': '返回数据集中的最小数值。', + 'a': '返回数据集中的最小数值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算最小值时所用的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2', + 'detail': '[可选] - 在计算最小值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'MIN', + 't': 1, + 'd': '返回数值数据集中的最小值。', + 'a': '返回数值数据集中的最小值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算最小值时所用的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2', + 'detail': '[可选] - 在计算最小值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'MEDIAN', + 't': 1, + 'd': '返回数值数据集中的中值。', + 'a': '返回数值数据集中的中值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算中值时所用的第一个数值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2', + 'detail': '[可选] - 在计算中值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'MAXA', + 't': 1, + 'd': '返回数据集中的最大数值。', + 'a': '返回数据集中的最大数值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算最大值时所用的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 在计算最大值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'MAX', + 't': 1, + 'd': '返回数值数据集中的最大值。', + 'a': '返回数值数据集中的最大值。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '计算最大值时所用的第一个值或范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2', + 'detail': '[可选] - 在计算最大值时要考虑的其他数值或范围。', + 'example': 'B2:B100', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'LOGNORM_INV', + 't': 1, + 'd': '返回 x 的对数累积分布函数的反函数值。', + 'a': '返回 x 的对数累积分布函数的反函数值。', + 'm': [3, 3], + 'p': [{ + 'name': 'probability', + 'detail': '与对数分布相关的概率,介于 0 与 1 之间(不含 0 与 1)。', + 'example': '0.4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'mean', + 'detail': 'ln(x) 的平均值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'standard_dev', + 'detail': 'ln(x) 的标准偏差,正数。', + 'example': '6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'LOGNORM_DIST', + 't': 1, + 'd': '返回 x 的对数分布函数。', + 'a': '返回 x 的对数分布函数。', + 'm': [4, 4], + 'p': [{ + 'name': 'x', + 'detail': '用来计算函数的值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'mean', + 'detail': 'ln(x) 的平均值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'standard_dev', + 'detail': 'ln(x) 的标准偏差,正数。', + 'example': '6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'Z_TEST', + 't': 1, + 'd': '返回 z 检验的单尾 P 值。', + 'a': '返回 z 检验的单尾 P 值。', + 'm': [2, 3], + 'p': [{ + 'name': 'array', + 'detail': '用来检验 x 的数组或数据区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'x', + 'detail': '要测试的值。', + 'example': 'B2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'sigma', + 'detail': '[可选] - 总体(已知)标准偏差。 如果省略,则使用样本标准偏差。', + 'example': '3', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PROB', + 't': 1, + 'd': '返回区域中的数值落在指定区间内的概率。', + 'a': '返回区域中的数值落在指定区间内的概率。', + 'm': [3, 4], + 'p': [{ + 'name': 'x_range', + 'detail': '具有各自相应概率值的 x 数值区域。', + 'example': 'A3:A6', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'prob_range', + 'detail': '与 x_range 中的值相关联的一组概率值。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'lower_limit', + 'detail': '要计算其概率的数值下界。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'upper_limit', + 'detail': '[可选 - 默认值为下界] - 要计算其概率的可选数值上界。\n\n如果省略上界,PROB则计算随机选取相应值的次数恰好等于下界的概率。', + 'example': '4', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'QUARTILE_EXC', + 't': 1, + 'd': '基于 0 到 1 之间(不包括 0 和 1)的百分点值返回数据集的四分位数。', + 'a': '基于 0 到 1 之间(不包括 0 和 1)的百分点值返回数据集的四分位数。', + 'm': [2, 2], + 'p': [{ + 'name': 'array', + 'detail': '要求得四分位数值的数组或数字型单元格区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'quart', + 'detail': '要返回第几个四分位值。\n\n1返回数据中最靠近第一个四分位值的值(25%标记)。\n\n2返回数据中最接近中值的值(50%标记)。\n\n3返回数据中最接近第三个四分位值的值(75%标记)。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'QUARTILE_INC', + 't': 1, + 'd': '根据 0 到 1 之间的百分点值(包含 0 和 1)返回数据集的四分位数。', + 'a': '根据 0 到 1 之间的百分点值(包含 0 和 1)返回数据集的四分位数。', + 'm': [2, 2], + 'p': [{ + 'name': 'array', + 'detail': '要求得四分位数值的数组或数字型单元格区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'quart', + 'detail': '要返回第几个四分位值。\n\n0返回数据中的最小值(0%标记)。\n\n1返回数据中最靠近第一个四分位值的值(25%标记)。\n\n2返回数据中最接近中值的值(50%标记)。\n\n3返回数据中最接近第三个四分位值的值(75%标记)。\n\n4返回数据中的最大值(100%标记)。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'POISSON_DIST', + 't': 1, + 'd': '返回泊松分布。', + 'a': '返回泊松分布。', + 'm': [3, 3], + 'p': [{ + 'name': 'x', + 'detail': '事件数。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'mean', + 'detail': '期望值。非负数', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '一逻辑值,确定所返回的概率分布的形式。\n\n如果为 TRUE(),则返回发生的随机事件数在零(含零)和 x(含 x)之间的累积泊松概率;\n\n如果为 FALSE(),则返回发生的事件数正好是 x 的泊松概率密度函数。', + 'example': 'FALSE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'RSQ', + 't': 1, + 'd': '返回皮尔生(Pearson)乘积矩相关系数 r 的平方。', + 'a': '返回皮尔生(Pearson)乘积矩相关系数 r 的平方。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'T_DIST', + 't': 1, + 'd': '返回学生的左尾 t 分布。', + 'a': '返回学生的左尾 t 分布。', + 'm': [3, 3], + 'p': [{ + 'name': 'x', + 'detail': 'T-分布函数的输入。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom', + 'detail': '自由度数值。', + 'example': '30', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'tails', + 'detail': '决定函数形式的逻辑值。\n\n如果 cumulative 为 TRUE(),则 HYPGEOM.DIST 返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', + 'example': 'TRUE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'T_DIST_2T', + 't': 1, + 'd': '返回学生的双尾 t 分布。', + 'a': '返回学生的双尾 t 分布。', + 'm': [2, 2], + 'p': [{ + 'name': 'x', + 'detail': 'T-分布函数的输入。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom', + 'detail': '自由度数值。', + 'example': '30', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'T_DIST_RT', + 't': 1, + 'd': '返回学生的右尾 t 分布。', + 'a': '返回学生的右尾 t 分布。', + 'm': [2, 2], + 'p': [{ + 'name': 'x', + 'detail': 'T-分布函数的输入。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom', + 'detail': '自由度数值。', + 'example': '30', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'T_INV', + 't': 1, + 'd': '返回学生的 t 分布的左尾反函数。', + 'a': '返回学生的 t 分布的左尾反函数。', + 'm': [2, 2], + 'p': [{ + 'name': 'probability', + 'detail': '与学生的 t 分布相关的概率。\n\n必须大于 0 且小于 1。', + 'example': '0.35', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'deg_freedom', + 'detail': '自由度数值。\n\n如果所提供的参数不是整数,将截取其整数部分。\n\n必须大于等于 1。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'T_INV_2T', + 't': 1, + 'd': '返回学生 t 分布的双尾反函数。', + 'a': '返回学生 t 分布的双尾反函数。', + 'm': [2, 2], + 'p': [{ + 'name': 'probability', + 'detail': '与学生的 t 分布相关的概率。\n\n必须大于 0 且小于1。', + 'example': '0.35', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'deg_freedom', + 'detail': '自由度数值。\n\n如果所提供的参数不是整数,将截取其整数部分。\n\n必须大于等于 1。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'T_TEST', + 't': 1, + 'd': '返回与t-检验相关的概率。用于判断两个样本是否可能是出自平均值相同的两个样本总体。', + 'a': '返回与t-检验相关的概率。用于判断两个样本是否可能是出自平均值相同的两个样本总体。', + 'm': [4, 4], + 'p': [{ + 'name': 'array1', + 'detail': '将用于 t 检验的第一个数据样本或第一组单元格。', + 'example': 'A1:A4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'array2', + 'detail': '将用于 t 检验的第二个数据样本或第二组单元格。', + 'example': 'B1:B4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'tails', + 'detail': '指定分布的尾数。\n\n如果为 1:使用单尾分布。\n\n如果为 2:使用双尾分布。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '指定 t 检验的类型。\n\n如果为 1:执行配对检验。\n\n如果为 2:执行双样本等方差(同方差)检验。\n\n如果为3:执行双样本不等方差(异方差)检验。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'F_DIST', + 't': 1, + 'd': '给定输入值 x,计算两个数据集的左尾 F 概率分布(差异程度)。此分布也称为 Fisher-Snedecor 分布或 Snedecor F 分布。', + 'a': '给定输入值 x', + 'm': [4, 4], + 'p': [{ + 'name': 'x', + 'detail': '用来计算函数的值。', + 'example': '15.35', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom1', + 'detail': '分子自由度。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom2', + 'detail': '分母自由度。', + 'example': '6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cumulative', + 'detail': '用于确定函数形式的逻辑值。默认值为 FALSE。\n\n如果为 TRUE():F.DIST 将返回累积分布函数值。\n\n如果为 FALSE():F.DIST 将返回概率密度函数值。', + 'example': 'TRUE()', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'F_DIST_RT', + 't': 1, + 'd': '给定输入x,计算两个数据集的右尾F概率分布(差异程度)。 此分布也称为Fisher-Snedecor分布或Snedecor F分布。', + 'a': '给定输入x', + 'm': [3, 3], + 'p': [{ + 'name': 'x', + 'detail': '用来计算函数的值。', + 'example': '15.35', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom1', + 'detail': '分子自由度。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'degrees_freedom2', + 'detail': '分母自由度。', + 'example': '6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'VAR_P', + 't': 1, + 'd': '基于样本总体计算方差。', + 'a': '基于样本总体计算方差。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '数据集中的第一个值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, …', + 'detail': '[可选] - 数据集中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'VAR_S', + 't': 1, + 'd': '基于样本计算方差。', + 'a': '基于样本计算方差。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, …', + 'detail': '[可选] - 样本中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'VARA', + 't': 1, + 'd': '基于样本计算方差,将文本取值为0。', + 'a': '基于样本计算方差', + 'm': [1, 255], + 'p': [{ + 'name': 'value1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value2, ...', + 'detail': '[可选] - 样本中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'VARPA', + 't': 1, + 'd': '基于样本总体计算方差,将文本取值为0。', + 'a': '基于样本总体计算方差', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '样本中的第一项值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他数值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'STEYX', + 't': 1, + 'd': '返回通过线性回归法预测每个 x 的 y 值时所产生的标准误差。', + 'a': '返回通过线性回归法预测每个 x 的 y 值时所产生的标准误差。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'STANDARDIZE', + 't': 1, + 'd': '给定分布的均值和标准偏差,计算一个随机变量正态化的相应值。', + 'a': '给定分布的均值和标准偏差,计算一个随机变量正态化的相应值。', + 'm': [3, 3], + 'p': [{ + 'name': 'x', + 'detail': '要正态化的随机变量值。', + 'example': '96', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'mean', + 'detail': '分布的均值。', + 'example': '80', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'standard_dev', + 'detail': '分布的标准偏差。', + 'example': '6.7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SMALL', + 't': 1, + 'd': '返回数据集中的第 k 个最小值。', + 'a': '返回数据集中的第 k 个最小值。', + 'm': [2, 2], + 'p': [{ + 'name': 'array', + 'detail': '需要找到第 k 个最小值的数组或数值数据区域。', + 'example': 'A2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'k', + 'detail': '要返回的数据在数组或数据区域里的位置(从小到大)。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SLOPE', + 't': 1, + 'd': '计算通过数据集的线性回归得到的直线的斜率。', + 'a': '计算通过数据集的线性回归得到的直线的斜率。', + 'm': [2, 2], + 'p': [{ + 'name': '数据_y', + 'detail': '代表因变量数据数组或矩阵的范围。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '数据_x', + 'detail': '代表自变量数据数组或矩阵的范围。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SKEW', + 't': 1, + 'd': '返回分布的偏斜度。 偏斜度表明分布相对于平均值的不对称程度。 正偏斜度表明分布的不对称尾部趋向于更多正值。 负偏斜度表明分布的不对称尾部趋向于更多负值。', + 'a': '返回分布的偏斜度。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '数据集中的第一个值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'SKEW_P', + 't': 1, + 'd': '返回基于样本总体的分布不对称度:表明分布相对于平均值的不对称程度。', + 'a': '返回基于样本总体的分布不对称度:表明分布相对于平均值的不对称程度。', + 'm': [1, 255], + 'p': [{ + 'name': '值1', + 'detail': '数据集中的第一个值或范围。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '值2, ...', + 'detail': '[可选] - 数据集中包含的其他值或范围。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'VLOOKUP', + 't': 2, + 'd': '纵向查找。在范围的第一列中自上而下搜索某个键值,并返回所找到的行中指定单元格的值。', + 'a': '纵向查找。在范围的第一列中自上而下搜索某个键值', + 'm': [3, 4], + 'p': [{ + 'name': '搜索键值', + 'detail': '要搜索的值,如 42、"Cats" 或 I24。', + 'example': '10003', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '范围', + 'detail': '要进行搜索的范围。VLOOKUP 将在该范围的第一列中搜索搜索键值中指定的键值。', + 'example': 'A2:B26', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '索引', + 'detail': '要返回的值的列索引,范围中的第一列编号为 1。\n\n如果索引不是介于 1 和范围中的列数之间,将返回 #VALUE! 。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '已排序', + 'detail': '[默认值为 TRUE() ] - 指示要搜索的列(指定范围的第一列)是否已排序。大多数情况下,建议设为 FALSE()。\n\n建议将已排序设为 FALSE。如果设为 FALSE,将返回完全匹配项。如果存在多个匹配值,将返回找到的第一个值对应的单元格的内容,如果找不到匹配值,则返回 #N/A。\n\n如果将已排序设为 TRUE 或省略,将返回(小于或等于搜索键值的)最接近的匹配项。如果搜索的列中所有的值均大于搜索键值,则返回 #N/A。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'HLOOKUP', + 't': 2, + 'd': '横向查找。在范围的第一行中搜索某个键值,并返回所找到的列中指定单元格的值。', + 'a': '横向查找。在范围的第一行中搜索某个键值', + 'm': [3, 4], + 'p': [{ + 'name': '搜索键值', + 'detail': '要搜索的值。例如,42、"Cats"或I24。', + 'example': '10003', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '范围', + 'detail': '要进行搜索的范围。将在该范围的第一行中搜索在搜索键值中指定的键值。', + 'example': 'A2:Z6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '索引', + 'detail': '要返回的值的行索引,范围中的第一行编号为1。\n\n如果索引不是介于1和范围中的行数之间,将返回#VALUE!。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '已排序', + 'detail': '[可选 - 默认值为TRUE()] - 指示要搜索的行(指定范围的第一行)是否已排序。\n\n如果将已排序设为TRUE或省略,将返回最接近的匹配值(小于或等于搜索键值)。如果在搜索的行中所有的值均大于搜索键值,则返回#N/A。\n\n如果将已排序设为TRUE或将其省略,而范围的首行并非处于已排序状态,则返回值可能会是错误的。\n\n如果将已排序设为FALSE,则仅返回完全匹配。如果存在多个匹配值,将返回与找到的第一个值对应的单元格的内容,如果找不到匹配值则返回#N/A。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LOOKUP', + 't': 2, + 'd': '在行或列中查找相应键,并将相应单元格的值返回到与搜索行或列所在位置相同的结果范围中。', + 'a': '在行或列中查找相应键', + 'm': [2, 3], + 'p': [{ + 'name': '搜索键值', + 'detail': '要在行或列中搜索的值。例如,42、"Cats" 或 I24。', + 'example': '10003', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '搜索范围 | 搜索结果数组', + 'detail': '使用 LOOKUP 的一种方法是给定单行或单列形式的搜索范围进行搜索查找,这种方式要用到另一个参数结果范围。另一种方式是将这两个参数合并为一个搜索结果数组,其中第一行或第一列用于搜索,并将返回值放在该数组的最后一行或最后一列中。', + 'example': 'A1:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '结果范围', + 'detail': '[ 可选 ] - 用于存放返回结果的范围。返回值对应于在搜索范围中找到搜索键值的位置。此范围必须仅为单行或单列,而如果您使用的是搜索结果数组方式,则不应提供此参数。', + 'example': 'B1:B100', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ADDRESS', + 't': 2, + 'd': '返回字符串形式的单元格引用。', + 'a': '返回字符串形式的单元格引用。', + 'm': [2, 5], + 'p': [{ + 'name': 'row_num', + 'detail': '一个数值,指定要在单元格引用中使用的行号。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'column_num', + 'detail': '一个数值,指定要在单元格引用中使用的列号(而非名称)。A列的编号为1。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'abs_num', + 'detail': '[可选 - 默认值为1] - 一个数值,指定要返回的引用类型。\n\n1 表示行列均采用绝对值(例如$A$1);\n\n2 表示采用绝对行号,相对列标(例如A$1);\n\n3 表示采用相对行号,绝对列标(例如$A1);\n\n4 表示行列均采用相对值(例如A1)。', + 'example': '4', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'A1', + 'detail': '[可选 - 默认值为TRUE()] - 一个布尔值,指示采用A1标记形式(TRUE)还是R1C1标记形式(FALSE)。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'sheet_text', + 'detail': '[可选 - 默认缺省] - 用于指定地址所指向的工作表名称。', + 'example': '"Sheet2"', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'INDIRECT', + 't': 2, + 'd': '返回以字符串指定的单元格引用。', + 'a': '返回以字符串指定的单元格引用。', + 'm': [1, 2], + 'p': [{ + 'name': 'ref_text', + 'detail': '以带引号的字符串形式提供的单元格引用。', + 'example': '"Sheet2!"&B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'A1', + 'detail': '[可选 - 默认值为TRUE()] - 一个布尔值,指示采用A1标记形式(TRUE)还是R1C1标记形式(FALSE)。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ROW', + 't': 2, + 'd': '返回指定单元格的行号', + 'a': '返回指定单元格的行号', + 'm': [0, 1], + 'p': [{ + 'name': 'reference', + 'detail': '[可选 - 默认为此公式所在的单元格] - 要返回其行号的单元格。\n\n如果单元格引用指向的范围其宽度大于一个单元格,而此公式不是用作数组公式的,这时会仅返回单元格引用中首行的编号值。', + 'example': 'A9', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ROWS', + 't': 2, + 'd': '返回指定数组或范围中的行数。', + 'a': '返回指定数组或范围中的行数。', + 'm': [1, 1], + 'p': [{ + 'name': 'array', + 'detail': '要返回其行数的范围。', + 'example': 'A9:A62', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COLUMN', + 't': 2, + 'd': '按照 `A=1` 的规则返回指定单元格的列号。', + 'a': '按照 `A=1` 的规则返回指定单元格的列号。', + 'm': [0, 1], + 'p': [{ + 'name': 'reference', + 'detail': '[可选 - 默认为包含此公式的单元格] - 要返回其列号的单元格。A列对应的编号为1。\n\n如果单元格引用是宽度超过一个单元格的范围,而此公式不是作为数组公式来使用的,因此将返回单元格引用中的第一列的位置。', + 'example': 'A9', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'COLUMNS', + 't': 2, + 'd': '返回指定数组或范围中的列数。', + 'a': '返回指定数组或范围中的列数。', + 'm': [1, 1], + 'p': [{ + 'name': 'array', + 'detail': '要返回其列数的范围。', + 'example': 'A9:W62', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'OFFSET', + 't': 2, + 'd': '给定某范围的起始单元格引用以及该范围涵盖的行列数量,返回该范围的引用。', + 'a': '给定某范围的起始单元格引用以及该范围涵盖的行列数量,返回该范围的引用。', + 'm': [3, 5], + 'p': [{ + 'name': 'reference', + 'detail': '用于计算行列偏移量的起点。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'rows', + 'detail': '要偏移的行数。\n\n行偏移量必须是整数,但也可以是负数。如果提供的参数带有小数,小数部分将被截去。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'cols', + 'detail': '要偏移的列数。\n\n列偏移量必须是整数,但也可以是负数。如果提供的参数带有小数,小数部分将被截去。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'height', + 'detail': '[可选] - 要从偏移目标开始返回的范围的高度。', + 'example': '2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'width', + 'detail': '[可选] - 要从偏移目标开始返回的范围的宽度。', + 'example': '2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MATCH', + 't': 2, + 'd': '在单元格中搜索指定项,然后返回该项在单元格区域中的相对位置。', + 'a': '在单元格中搜索指定项,然后返回该项在单元格区域中的相对位置。', + 'm': [2, 3], + 'p': [{ + 'name': 'lookup_value', + 'detail': '要在 lookup_array 中匹配的值。', + 'example': '"Sunday"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'lookup_array', + 'detail': '要搜索的单元格区域。\n\n如果所用的范围的高度和宽度均大于1,MATCH将返回#N/A!。', + 'example': 'A2:A9', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'match_type', + 'detail': '[可选 - 默认值为1] - 要采用的搜索方式。\n\n1为默认类型,此时MATCH会假设范围已按升序排序,并返回小于等于搜索键值的最大值。\n\n0表示完全匹配,在范围未排序的情况下需要使用此方式。\n\n-1让MATCH假设范围是按降序排序的,并返回大于等于搜索键值的最小值。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'INDEX', + 't': 2, + 'd': '返回表格或中的元素值,此元素由行号和列号的索引值给定。', + 'a': '返回表格或中的元素值,此元素由行号和列号的索引值给定。', + 'm': [3, 3], + 'p': [{ + 'name': 'array', + 'detail': '单元格区域或数组常量。', + 'example': 'A1:C20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'row_num', + 'detail': '选择数组中的某行,函数从该行返回数值。', + 'example': '5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'column_num', + 'detail': '选择数组中的某列,函数从该列返回数值。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'GETPIVOTDATA', + 't': 2, + 'd': '从与指定行和列标题对应的数据透视表中提取汇总值。', + 'a': '从与指定行和列标题对应的数据透视表中提取汇总值。', + 'm': [2, 254], + 'p': [{ + 'name': 'data_field', + 'detail': '您想从数据透视表中获取其数据的值名称。\n值名称必须括在引号中或是指向包含相关文本的任何单元格的引用。\n如果有多个值字段,则必须使用数据透视表中显示的确切名称(如“销售总额”)。', + 'example': '"SUM of number of units"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'pivot_table', + 'detail': '目标数据透视表中的任何单元格的引用(推荐位于顶角的单元格)。', + 'example': "'Pivot table'!A1", + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'field1', + 'detail': '[可选] - 源数据集(不是数据透视表)中列的名称。', + 'example': '"division"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }, { + 'name': 'item1', + 'detail': '[可选] - 数据透视表中显示的与您要检索的字段名称 1 相对应的行或列的名称。', + 'example': '"east"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'CHOOSE', + 't': 2, + 'd': '基于索引返回选项列表中的元素。', + 'a': '基于索引返回选项列表中的元素。', + 'm': [2, 255], + 'p': [{ + 'name': 'index_num', + 'detail': '指定要返回哪一项。\n\n如果索引为零、负值或大于提供的选择数量,将返回#VALUE!错误。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value1', + 'detail': '一项可能的返回值。必须提供。可以是单元格引用或单独的值。', + 'example': '"A"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '[可选] - 其他可以选择的值。选择', + 'example': '"B"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'HYPERLINK', + 't': 2, + 'd': '在单元格内创建一个超链接。', + 'a': '在单元格内创建一个超链接。', + 'p': [{ + 'name': '网址', + 'detail': '以引号括住的链接位置的完整网址,或对包含这种网址的单元格的引用。\n\n仅允许某些链接类型。其中包括:http://、https://、mailto:、aim:、ftp://、gopher://、telnet://和news://,明确禁用使用其他协议。如果指定的是其他协议,将会在单元格中显示链接标签,但该标签不会以链接形式呈现。\n\n如果未指定协议,则假设使用http://,并将其作为网址的前缀。', + 'example': '"http://www.google.com/"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '链接标签', + 'detail': '[可选 - 默认为网址] - 要在单元格中作为链接显示的文本(用引号括起来的),或者指向包含这种标签的单元格的引用。\n\n如果链接标签是指向某个空单元格的引用,如果网址有效,就将其作为链接显示,否则作为纯文本显示。\n\n如果链接标签为空字符串常量(""),所在单元格显示的内容将为空白,但通过点击该单元格或转入该单元格仍然可以访问链接。', + 'example': '"Google"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TIME', + 't': 6, + 'd': '将给定的小时、分钟和秒转换为时间。', + 'a': '将给定的小时、分钟和秒转换为时间。', + 'm': [3, 3], + 'p': [{ + 'name': '小时', + 'detail': '0(零)到 32767 之间的数字,代表小时。\n\n任何大于 23 的值都会除以 24,余数将作为小时值。', + 'example': '11', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '分钟', + 'detail': '0(零)到 32767 之间的数字,代表分钟。\n\n任何大于 59 的值将转换为小时和分钟。', + 'example': '40', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': '秒', + 'detail': '0(零)到 32767 之间的数字,代表秒。\n\n任何大于 59 的值将转换为小时、分钟和秒。', + 'example': '59', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TIMEVALUE', + 't': 6, + 'd': '按一天24小时返回该时间的分数表示。', + 'a': '按一天24小时返回该时间的分数表示。', + 'm': [1, 1], + 'p': [{ + 'name': 'time_text', + 'detail': '用于表示时间的字符串。', + 'example': '"2:15 PM"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'EOMONTH', + 't': 6, + 'd': '返回某个月份最后一天的序列号,该月份在另一个日期之前或之后的数个月(月数由参数指定)。', + 'a': '返回某个月份最后一天的序列号', + 'm': [2, 2], + 'p': [{ + 'name': 'start_date', + 'detail': '用于计算结果的参照日期。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'months', + 'detail': '用于计算的起始日期之前(负)或之后(正)的月数。返回的是计算所得月份的最后那天。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'EDATE', + 't': 6, + 'd': '返回表示某个日期的序列号,该日期在另一个日期的数月之前/之后。', + 'a': '返回表示某个日期的序列号', + 'm': [2, 2], + 'p': [{ + 'name': 'start_date', + 'detail': '用于计算结果的参照日期。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'months', + 'detail': '用于计算的起始日期之前(负)或之后(正)的月数。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SECOND', + 't': 6, + 'd': '返回时间值的秒数。 秒数是 0(零)到 59 范围内的整数。', + 'a': '返回时间值的秒数。 秒数是 0(零)到 59 范围内的整数。', + 'm': [1, 1], + 'p': [{ + 'name': '时间', + 'detail': '用于计算秒钟部分的时间。必须为以下值之一:指向包含日期/时间值的单元格的引用、返回日期/时间的函数或者数字。', + 'example': 'TIME(11', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'MINUTE', + 't': 6, + 'd': '以数字格式返回特定时间的分钟部分。', + 'a': '以数字格式返回特定时间的分钟部分。', + 'm': [1, 1], + 'p': [{ + 'name': '时间', + 'detail': '用于计算分钟部分的时间。必须为以下值之一:指向包含日期/时间值的单元格的引用、返回日期/时间的函数或者数字。', + 'example': 'TIME(11', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'HOUR', + 't': 6, + 'd': '以数字格式返回特定时间的小时部分。', + 'a': '以数字格式返回特定时间的小时部分。', + 'm': [1, 1], + 'p': [{ + 'name': '时间', + 'detail': '用于计算小时部分的时间。必须为以下值之一:指向包含日期/时间值的单元格的引用、返回日期/时间的函数或者数字。', + 'example': 'TIME(11', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'NOW', + 't': 6, + 'd': '以日期值格式返回当前日期和时间。', + 'a': '以日期值格式返回当前日期和时间。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'NETWORKDAYS', + 't': 6, + 'd': '返回所提供的两个日期之间的净工作日天数。', + 'a': '返回所提供的两个日期之间的净工作日天数。', + 'm': [2, 3], + 'p': [{ + 'name': 'start_date', + 'detail': '用于计算净工作日天数的时间段开始日期。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'end_date', + 'detail': '用于计算净工作日天数的时间段结束日期。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'holidays', + 'detail': '[可选] - 一个范围或数组常量,其中包含作为节假日的日期序号。\n\n在节假日数组中提供的值必须是日期序号值(例如由N所返回的值)或日期值(例如由DATE、DATEVALUE或TO_DATE返回的值)。由范围指定的值应该是标准的日期值或日期序数值。', + 'example': '16)', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'NETWORKDAYS_INTL', + 't': 6, + 'd': '返回给定的两个日期之间的净工作日天数(排除指定的周末和节假日)。', + 'a': '返回给定的两个日期之间的净工作日天数(排除指定的周末和节假日)。', + 'm': [2, 4], + 'p': [{ + 'name': 'start_date', + 'detail': '用于计算净工作日天数的时间段开始日期。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'end_date', + 'detail': '用于计算净工作日天数的时间段结束日期。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'weekend', + 'detail': '[可选 - 默认值为1] - 用于表示哪些天为周末的数字或字符串。\n字符串方式:可以使用由0和1组成的字符串来指定周末,串中的第一个数字字符代表周一,最后一个则代表周日。零表示这一天是工作日,1表示这一天为周末。例如,“0000011”表示将周六和周日作为周末。\n数字方式:这种方式不使用上述字符串形式,而是使用一个数字。1 =周六/周日为周末,2 =周日/周一为周末,依此类推则7 =周五/周六。11 =周日为唯一周末,12 =周一为唯一周末,依此类推则17 =周六为唯一周末。', + 'example': '16)', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'holidays', + 'detail': '[ 可选 ] - 这是一个范围或数组常量,其中包含作为节假日的日期。\n在节假日数组内提供的值必须为日期序数值(例如N的返回值)或日期值(例如DATE、DATEVALUE或TO_DATE的返回值)。由范围指定的值应该是标准的日期值或日期序数值。', + 'example': 'DATE(1969', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISOWEEKNUM', + 't': 6, + 'd': '返回给定日期在全年中的 ISO 周数。', + 'a': '返回给定日期在全年中的 ISO 周数。', + 'm': [1, 1], + 'p': [{ + 'name': 'date', + 'detail': '用于日期和时间计算的日期-时间代码。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'WEEKNUM', + 't': 6, + 'd': '返回特定日期的周数。', + 'a': '返回特定日期的周数。', + 'm': [1, 2], + 'p': [{ + 'name': 'serial_number', + 'detail': '要确定其位于第几周的日期,必须是对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'return_type', + 'detail': '[可选 - 默认值为 1 ] - 代表一周起始日的数字,系统也使用该数字来确定一年的第一周(1=周日,2=周一)。', + 'example': '7', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'WEEKDAY', + 't': 6, + 'd': '返回一个数字,对应于给定日期所在的星期几。', + 'a': '返回一个数字,对应于给定日期所在的星期几。', + 'm': [1, 2], + 'p': [{ + 'name': 'serial_number', + 'detail': '要为其确定星期几的日期。必须是对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'return_type', + 'detail': '[可选 - 默认值为 1] - 以数字指示使用哪种编号顺序来表示星期几。默认情况下,按星期日 (= 1) 开始计算。\n\n如果类型为 1,则星期值将从星期日开始算起,并且星期日的值为 1,因此星期六的值就是 7。\n\n如果类型为 2,则星期值将从星期一开始算起,并且星期一的值为 1,因此星期日的值就是 7。\n\n如果类型为 3,则星期值将从星期一算起,并且星期一的值为 0,因此星期日的值就是 6。', + 'example': '7', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DAY', + 't': 6, + 'd': '以数字格式返回特定日期所在的当月几号。', + 'a': '以数字格式返回特定日期所在的当月几号。', + 'm': [1, 1], + 'p': [{ + 'name': 'serial_number', + 'detail': '要从中提取具体几号的日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'DAYS', + 't': 6, + 'd': '返回两个日期之间的天数。', + 'a': '返回两个日期之间的天数。', + 'm': [2, 2], + 'p': [{ + 'name': 'end_date', + 'detail': '计算中要使用的结束日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': '2011-3-15', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'start_date', + 'detail': '计算中要使用的开始日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': '2011-2-1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'DAYS360', + 't': 6, + 'd': '按照每年360天,返回两个日期之间的差(用于计算利息)。', + 'a': '按照每年360天,返回两个日期之间的差(用于计算利息)。', + 'm': [2, 3], + 'p': [{ + 'name': 'start_date', + 'detail': '计算中要使用的开始日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'end_date', + 'detail': '计算中要使用的结束日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'method', + 'detail': '[可选 - 默认为FALSE()] - 指示要使用哪种天数计算方法。\n\nFALSE - 采用美国 (NASD) 方法时,如果起始日期为某月的最后一天,为便于计算,会将起始日期的当月几号更改为30。此外,如果结束日期是所在月份的最后一天,而且起始日期在其所在月的30号之前,则将结束日期更改为结束日期之后那个月的第一天,否则将结束日期更改为该月的30号。\n\nTRUE - 采用欧洲方法时,会将所有日期在31号的起始日期或结束日期更改为当月的30号。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'DATE', + 't': 6, + 'd': '将提供的年、月、日转换为日期。', + 'a': '将提供的年、月、日转换为日期。', + 'm': [3, 3], + 'p': [{ + 'name': 'year', + 'detail': '日期的年份部分,包含一到四位数字。\n\n介于 0(零)到 1899 之间,会将该值与 1900 相加来计算年份;\n\n介于 1900 到 9999 之间,将使用该数值作为年份;\n\n小于 0 或大于等于 10000,返回 错误值 #NUM!。', + 'example': '1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'month', + 'detail': '日期的月份部分,一个正整数或负整数。\n\n如果 month 大于 12,则 month 会将该月份数与指定年中的第一个月相加。\n\n如果 month 小于 1,month 则从指定年份的一月份开始递减该月份数,然后再加上 1 个月。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'day', + 'detail': '日期的日部分,一个正整数或负整数。\n\n如果 day 大于月中指定的天数,则 day 会将天数与该月中的第一天相加。\n\n如果 day 小于 1,则 day 从指定月份的第一天开始递减该天数,然后再加上 1 天。', + 'example': '20', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DATEVALUE', + 't': 6, + 'd': '将提供的日期字符串转换为日期的序列号。', + 'a': '将提供的日期字符串转换为日期的序列号。', + 'm': [1, 1], + 'p': [{ + 'name': 'date_text', + 'detail': '表示日期的字符串。', + 'example': '"1969-7-20"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'DATEDIF', + 't': 6, + 'd': '计算两个日期之间的天数、月数或年数。', + 'a': '计算两个日期之间的天数、月数或年数。', + 'm': [3, 3], + 'p': [{ + 'name': '起始日期', + 'detail': '计算中要使用的开始日期。必须是对包含DATE值的单元格的引用、返回DATE类型的函数或数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '结束日期', + 'detail': '计算中要使用的结束日期。必须是对包含DATE值的单元格的引用、返回DATE类型的函数或数字。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '单位', + 'detail': '时间单位的缩写文字。例如 "M" 代表月。有效值包括:"Y"、"M"、"D"、"MD"、"YM" 和 "YD"。\n\n"Y":返回起始日期和结束日期之间的整年数。\n\n"M":返回起始日期和结束日期之间的整月数。\n\n"D":返回起始日期和结束日期之间的天数。\n\n"MD":返回起始日期和结束日期之间的天数(不计整月数)。\n\n"YM":返回起始日期和结束日期之间的整月数(不计整年数)。\n\n"YD":返回起始日期和结束日期之间的天数(假设起始日期和结束日期的间隔不超过一年)。', + 'example': '16)', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'WORKDAY', + 't': 6, + 'd': '指定工作日天数,计算结束日期。', + 'a': '指定工作日天数,计算结束日期。', + 'm': [2, 3], + 'p': [{ + 'name': 'start_date', + 'detail': '计算的开始日期。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'days', + 'detail': 'start_date 之前或之后不含周末及节假日的天数。\n\n为正值将生成未来日期;\n\n为负值生成过去日期。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'holidays', + 'detail': '[可选] - 一个范围或数组常量,其中包含作为节假日的日期序号。\n\n在节假日数组中提供的值必须是日期序号值(例如由N所返回的值)或日期值(例如由DATE、DATEVALUE或TO_DATE返回的值)。由范围指定的值应该是标准的日期值或日期序数值。', + 'example': '16)', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'WORKDAY_INTL', + 't': 6, + 'd': '返回指定的若干个工作日之前或之后的日期的序列号(使用自定义周末参数)。 ', + 'a': '返回指定的若干个工作日之前或之后的日期的序列号(使用自定义周末参数)。 ', + 'm': [2, 4], + 'p': [{ + 'name': 'start_date', + 'detail': '开始日期(将被截尾取整)。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'days', + 'detail': 'start_date 之前或之后的工作日的天数。\n\n正值表示未来日期;\n\n负值表示过去日期;\n\n零值表示开始日期。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'weekend', + 'detail': '[可选 - 默认值为1] - 用于表示哪些天为周末的数字或字符串。\n字符串方式:可以使用由0和1组成的字符串来指定周末,串中的第一个数字字符代表周一,最后一个则代表周日。零表示这一天是工作日,1表示这一天为周末。例如,“0000011”表示将周六和周日作为周末。\n数字方式:这种方式不使用上述字符串形式,而是使用一个数字。1 =周六/周日为周末,2 =周日/周一为周末,依此类推则7 =周五/周六。11 =周日为唯一周末,12 =周一为唯一周末,依此类推则17 =周六为唯一周末。', + 'example': '16)', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'holidays', + 'detail': '[ 可选 ] - 这是一个范围或数组常量,其中包含作为节假日的日期。\n在节假日数组内提供的值必须为日期序数值(例如N的返回值)或日期值(例如DATE、DATEVALUE或TO_DATE的返回值)。由范围指定的值应该是标准的日期值或日期序数值。', + 'example': 'DATE(1969', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'YEAR', + 't': 6, + 'd': '返回对应于某个日期的年份。 Year 作为 1900 - 9999 之间的整数返回。', + 'a': '返回对应于某个日期的年份。 Year 作为 1900 - 9999 之间的整数返回。', + 'm': [1, 1], + 'p': [{ + 'name': 'serial_number', + 'detail': '用于计算年份的日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'YEARFRAC', + 't': 6, + 'd': '返回 start_date 和 end_date 之间的天数占全年天数的百分比。', + 'a': '返回 start_date 和 end_date 之间的天数占全年天数的百分比。', + 'm': [2, 3], + 'p': [{ + 'name': 'start_date', + 'detail': '计算中要使用的开始日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'end_date', + 'detail': '计算中要使用的结束日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': '7', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 要使用的日计数基准类型。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '16)', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TODAY', + 't': 6, + 'd': '以日期值格式返回当前日期。', + 'a': '以日期值格式返回当前日期。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'MONTH', + 't': 6, + 'd': '返回日期(以序列数表示)中的月份。 月份是介于 1(一月)到 12(十二月)之间的整数。', + 'a': '返回日期(以序列数表示)中的月份。 月份是介于 1(一月)到 12(十二月)之间的整数。', + 'm': [1, 1], + 'p': [{ + 'name': 'serial_number', + 'detail': '要从中提取月份的日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'EFFECT', + 't': 8, + 'd': '根据名义利率及每年的复利计息期数来计算实际年利率。', + 'a': '根据名义利率及每年的复利计息期数来计算实际年利率。', + 'm': [2, 2], + 'p': [{ + 'name': 'nominal_rate', + 'detail': '每年的名义利率。', + 'example': '0.99', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'npery', + 'detail': '每年的复利计算期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DOLLAR', + 't': 12, + 'd': '将数字格式设置为与语言区域相对应的货币格式。', + 'a': '将数字格式设置为与语言区域相对应的货币格式。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要设置格式的值。', + 'example': '1.2351', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'decimals', + 'detail': '[可选 - 默认值为 2] - 要显示的小数位数。\n\n如果这是负数,则将数字四舍五入到小数点左侧。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DOLLARDE', + 't': 8, + 'd': '将以整数部分和分数部分转换为以小数部分表示的金额数字', + 'a': '将以整数部分和分数部分转换为以小数部分表示的金额数字', + 'm': [2, 2], + 'p': [{ + 'name': 'fractional_dollar', + 'detail': '以整数部份和分数部分表示的数字,用小数点隔开。', + 'example': '100.10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fraction', + 'detail': '用作分数中的分母的整数。', + 'example': '32', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DOLLARFR', + 't': 8, + 'd': '将小数转换为分数表示的金额数字。', + 'a': '将小数转换为分数表示的金额数字。', + 'm': [2, 2], + 'p': [{ + 'name': 'decimal_dollar', + 'detail': '小数。', + 'example': '100.125', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fraction', + 'detail': '用作分数中的分母的整数。', + 'example': '32', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DB', + 't': 8, + 'd': '使用固定余额递减法,返回指定期间内某项固定资产的折旧值。', + 'a': '使用固定余额递减法,返回指定期间内某项固定资产的折旧值。', + 'm': [4, 5], + 'p': [{ + 'name': 'cost', + 'detail': '资产原值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'salvage', + 'detail': '折旧末尾时的值(有时也称为资产残值)。', + 'example': '50', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'life', + 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'period', + 'detail': '在使用期限内要计算折旧的折旧期。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'month', + 'detail': '[可选 - 默认值为12] - 折旧第一年中的月数。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DDB', + 't': 8, + 'd': '用双倍余额递减法,返回指定期间内某项固定资产的折旧值。', + 'a': '用双倍余额递减法,返回指定期间内某项固定资产的折旧值。', + 'm': [4, 5], + 'p': [{ + 'name': 'cost', + 'detail': '资产原值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'salvage', + 'detail': '折旧末尾时的值(有时也称为资产残值)。', + 'example': '50', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'life', + 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'period', + 'detail': '在使用期限内要计算折旧的折旧期。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'factor', + 'detail': '[可选 - 默认值为2] - 折旧的递减系数。', + 'example': '2.25', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'RATE', + 't': 8, + 'd': '返回年金每期的利率。', + 'a': '返回年金每期的利率。', + 'm': [3, 6], + 'p': [{ + 'name': 'nper', + 'detail': '年金的付款总期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pmt', + 'detail': '每期的付款金额,在年金周期内不能更改。', + 'example': '-100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '现值即一系列未来付款当前值的总和。', + 'example': '400', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fv', + 'detail': '[可选 - 默认值为0] - 未来值,或在最后一次付款后希望得到的现金余额。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'guess', + 'detail': '[可选 - 默认值为0.1] - 预期利率。', + 'example': '0.1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CUMPRINC', + 't': 8, + 'd': '基于等额分期付款和固定利率,计算投资在多个付款期内的累计本金偿还额。', + 'a': '基于等额分期付款和固定利率,计算投资在多个付款期内的累计本金偿还额。', + 'm': [6, 6], + 'p': [{ + 'name': 'rate', + 'detail': '利率。', + 'example': '0.12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '总付款期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '年金的现值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'start_period', + 'detail': '开始累计计算的付款期序号。\n\n首期必须大于等于1。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'end_period', + 'detail': '结束累计计算的付款期序号。\n\n末期必须大于首期。', + 'example': '5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUPNUM', + 't': 8, + 'd': '返回在结算日和到期日之间的付息次数,向上舍入到最近的整数。', + 'a': '返回在结算日和到期日之间的付息次数,向上舍入到最近的整数。', + 'm': [3, 4], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。到期日是有价证券有效期截止时的日期。', + 'example': '02', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SYD', + 't': 8, + 'd': '返回在指定期间内资产按年限总和折旧法计算的折旧。', + 'a': '返回在指定期间内资产按年限总和折旧法计算的折旧。', + 'm': [4, 4], + 'p': [{ + 'name': 'cost', + 'detail': '资产原值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'salvage', + 'detail': '折旧末尾时的值(有时也称为资产残值)。', + 'example': '50', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'life', + 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'period', + 'detail': '在使用期限内要计算折旧的折旧期。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TBILLEQ', + 't': 8, + 'd': '基于贴现率计算美国政府短期债券的等效年化收益率。', + 'a': '基于贴现率计算美国政府短期债券的等效年化收益率。', + 'm': [3, 3], + 'p': [{ + 'name': 'settlement', + 'detail': '债券的结算日期,此日期为债券发行后交付给买家的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '债券的到期或结束日期,届时可将其以面值或票面价值赎回。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'discount', + 'detail': '债券购买时的贴现率。', + 'example': '2)', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TBILLYIELD', + 't': 8, + 'd': '基于价格计算美国政府短期债券的收益率。', + 'a': '基于价格计算美国政府短期债券的收益率。', + 'm': [3, 3], + 'p': [{ + 'name': 'settlement', + 'detail': '债券的结算日期,此日期为债券发行后交付给买家的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '债券的到期或结束日期,届时可将其以面值或票面价值赎回。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'pr', + 'detail': '债券的购买价格。', + 'example': '95', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TBILLPRICE', + 't': 8, + 'd': '基于贴现率计算美国政府短期债券的价格。', + 'a': '基于贴现率计算美国政府短期债券的价格。', + 'm': [3, 3], + 'p': [{ + 'name': 'settlement', + 'detail': '债券的结算日期,此日期为债券发行后交付给买家的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '债券的到期或结束日期,届时可将其以面值或票面价值赎回。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'discount', + 'detail': '债券购买时的贴现率。', + 'example': '0.09', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PV', + 't': 8, + 'd': '基于等额分期付款和固定利率,计算年金投资的现值。', + 'a': '基于等额分期付款和固定利率,计算年金投资的现值。', + 'm': [3, 5], + 'p': [{ + 'name': 'rate', + 'detail': '各期利率。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '年金的付款总期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pmt', + 'detail': '每期的付款金额,在年金周期内不能更改。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fv', + 'detail': '[可选] - 未来值,或在最后一次付款后希望得到的现金余额。', + 'example': 'D2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ACCRINT', + 't': 8, + 'd': '返回定期付息证券的应计利息。', + 'a': '返回定期付息证券的应计利息。', + 'm': [6, 8], + 'p': [{ + 'name': 'issue', + 'detail': '有价证券的发行日。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'first_interest', + 'detail': '有价证券的首次计息日。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'rate', + 'detail': '有价证券的年息票利率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'par', + 'detail': '证券的票面值。', + 'example': '10000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示““欧洲30/360”方法” - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'calc_method', + 'detail': '[可选 - 默认为TRUE()] - 一个逻辑值,指定当结算日期晚于首次计息日期时用于计算总应计利息的方法。\n\n如果值为 TRUE,则返回从发行日到结算日的总应计利息。\n\n如果值为 FALSE,则返回从首次计息日到结算日的应计利息。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ACCRINTM', + 't': 8, + 'd': '返回在到期日支付利息的有价证券的应计利息。', + 'a': '返回在到期日支付利息的有价证券的应计利息。', + 'm': [4, 5], + 'p': [{ + 'name': 'issue', + 'detail': '有价证券的发行日。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'settlement', + 'detail': '有价证券的到期日。', + 'example': 'DATE(1969', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'rate', + 'detail': '有价证券的年息票利率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'par', + 'detail': '证券的票面值。', + 'example': '1000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUPDAYBS', + 't': 8, + 'd': '返回从付息期开始到结算日的天数。', + 'a': '返回从付息期开始到结算日的天数。', + 'm': [3, 4], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUPDAYS', + 't': 8, + 'd': '返回结算日所在的付息期的天数。', + 'a': '返回结算日所在的付息期的天数。', + 'm': [3, 4], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUPDAYSNC', + 't': 8, + 'd': '返回从结算日到下一票息支付日之间的天数。', + 'a': '返回从结算日到下一票息支付日之间的天数。', + 'm': [3, 4], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUPNCD', + 't': 8, + 'd': '计算结算日之后的下一票息或利息派发日期。', + 'a': '计算结算日之后的下一票息或利息派发日期。', + 'm': [3, 4], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '01)', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': 'DATE(2019', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COUPPCD', + 't': 8, + 'd': '计算结算日之前的最后一个票息或利息支付日。', + 'a': '计算结算日之前的最后一个票息或利息支付日。', + 'm': [3, 4], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '01)', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': 'DATE(2019', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FV', + 't': 8, + 'd': '基于等额分期付款和固定利率,计算年金投资的未来价值。', + 'a': '基于等额分期付款和固定利率,计算年金投资的未来价值。', + 'm': [3, 5], + 'p': [{ + 'name': 'rate', + 'detail': '各期利率。', + 'example': '0.12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '年金的付款总期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pmt', + 'detail': '各期所应支付的金额,在整个年金期间保持不变。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '[可选 - 默认值为 0 ] - 现值,或一系列未来付款的当前值的累积和。', + 'example': '400', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为 0 ] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FVSCHEDULE', + 't': 8, + 'd': '返回应用一系列复利率计算的初始本金的未来值。', + 'a': '返回应用一系列复利率计算的初始本金的未来值。', + 'm': [2, 2], + 'p': [{ + 'name': 'principal', + 'detail': '现值。', + 'example': '10000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'schedule', + 'detail': '用于计算本金复利的一组利率。\n\n利率表必须是范围或数组,其中包含要用于计算复利的一组利率。这些利率值应该以十进制小数形式表示,或者使用UNARY_PERCENT以百分比形式表示,即表示为0.09或UNARY_PERCENT(9),而不要表示为9。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'YIELD', + 't': 8, + 'd': '返回定期支付利息的债券的收益率。', + 'a': '返回定期支付利息的债券的收益率。', + 'm': [6, 7], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'rate', + 'detail': '有价证券的年息票利率。', + 'example': '0.057', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pr', + 'detail': '有价证券的价格。', + 'example': '95', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'redemption', + 'detail': '有价证券的清偿价值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'YIELDDISC', + 't': 8, + 'd': '基于价格计算折价发行的(不带息)债券的年收益率。', + 'a': '基于价格计算折价发行的(不带息)债券的年收益率。', + 'm': [4, 5], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'pr', + 'detail': '有价证券的价格。', + 'example': '95', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'redemption', + 'detail': '有价证券的清偿价值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'NOMINAL', + 't': 8, + 'd': '基于给定的实际利率和年复利期数,返回名义年利率。', + 'a': '基于给定的实际利率和年复利期数,返回名义年利率。', + 'm': [2, 2], + 'p': [{ + 'name': 'effect_rate', + 'detail': '每年的实际利率。', + 'example': '0.85', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'npery', + 'detail': '每年的复利期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'XIRR', + 't': 8, + 'd': '返回一组不一定定期发生的现金流的内部收益率。', + 'a': '返回一组不一定定期发生的现金流的内部收益率。', + 'm': [2, 3], + 'p': [{ + 'name': 'values', + 'detail': '其中含有投资相关收益或支出的数组或范围。\n\n现金流数额中必须至少包含一项负的和一项正的现金流金额才能计算回报率。', + 'example': 'B2:B25', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'dates', + 'detail': '与现金流数额参数中的现金流对应的日期数组或范围。', + 'example': 'C2:C25', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'guess', + 'detail': '[可选 - 默认值为0.1] - 对内部回报率的估算值。', + 'example': '250', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MIRR', + 't': 8, + 'd': '返回一系列定期现金流的修改后内部收益率。', + 'a': '返回一系列定期现金流的修改后内部收益率。', + 'm': [3, 3], + 'p': [{ + 'name': 'values', + 'detail': '其中含有投资相关收益或支出的数组或范围。\n\n现金流数额中必须至少包含一项负的和一项正的现金流金额才能计算回报率。', + 'example': 'A2:A25', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'finance_rate', + 'detail': '现金流中使用的资金支付的利率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'reinvest_rate', + 'detail': '将现金流再投资的收益率。', + 'example': '0.12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'IRR', + 't': 8, + 'd': '返回由值中的数字表示的一系列现金流的内部收益率。 ', + 'a': '返回由值中的数字表示的一系列现金流的内部收益率。 ', + 'm': [1, 2], + 'p': [{ + 'name': 'values', + 'detail': '其中含有投资相关收益或支出的数组或范围。\n\n现金流数额中必须至少包含一项负的和一项正的现金流金额才能计算回报率。', + 'example': 'A2:A25', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'guess', + 'detail': '[可选 - 默认为 0.1] - 内部收益率的估值。', + 'example': '200', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'NPV', + 't': 8, + 'd': '使用贴现率和一系列未来支出(负值)和收益(正值)来计算一项投资的净现值。', + 'a': '使用贴现率和一系列未来支出(负值)和收益(正值)来计算一项投资的净现值。', + 'm': [2, 255], + 'p': [{ + 'name': 'rate', + 'detail': '某一期间的贴现率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value1', + 'detail': '第一笔支出(负值)和收益(正值)。', + 'example': '200', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2, ...', + 'detail': '[可选] - 其他支出(负值)和收益(正值)。', + 'example': '250', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'XNPV', + 't': 8, + 'd': '返回一组现金流的净现值,这些现金流不一定定期发生。', + 'a': '返回一组现金流的净现值,这些现金流不一定定期发生。', + 'm': [3, 3], + 'p': [{ + 'name': 'rate', + 'detail': '应用于现金流的贴现率。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'values', + 'detail': '与 dates 中的支付时间相对应的一系列现金流。', + 'example': 'B2:B25', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'dates', + 'detail': '与现金流支付相对应的支付日期表。', + 'example': 'C2:C25', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'CUMIPMT', + 't': 8, + 'd': '基于等额分期付款和固定利率,计算投资在一系列付款期内的累计利息。', + 'a': '基于等额分期付款和固定利率,计算投资在一系列付款期内的累计利息。', + 'm': [6, 6], + 'p': [{ + 'name': 'rate', + 'detail': '利息率。', + 'example': '0.12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '总付款期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '现值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'start_period', + 'detail': '开始累计计算的付款期序号。\n\n首期必须大于等于1。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'end_period', + 'detail': '结束累计计算的付款期序号。\n\n末期必须大于首期。', + 'example': '5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '0', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PMT', + 't': 8, + 'd': '用于根据固定付款额和固定利率计算贷款的付款额。', + 'a': '用于根据固定付款额和固定利率计算贷款的付款额。', + 'm': [3, 5], + 'p': [{ + 'name': 'rate', + 'detail': '贷款利率。', + 'example': '0.08', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '该项贷款的付款总数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '现值,或一系列未来付款额现在所值的总额,也叫本金。', + 'example': ' 100000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fv', + 'detail': '[可选 - 默认值为 0] - 未来值,或在最后一次付款后希望得到的现金余额。', + 'example': 'D2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为 0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'IPMT', + 't': 8, + 'd': '基于固定利率及等额分期付款方式,返回给定期数内对投资的利息偿还额。', + 'a': '基于固定利率及等额分期付款方式,返回给定期数内对投资的利息偿还额。', + 'm': [4, 6], + 'p': [{ + 'name': 'rate', + 'detail': '各期利率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'per', + 'detail': '用于计算其利息数额的期数,必须在 1 到 nper 之间。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '年金的付款总期数。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '现值,或一系列未来付款的当前值的累积和。', + 'example': '80000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fv', + 'detail': '[可选 - 默认值为 0] - 未来值,或在最后一次付款后希望得到的现金余额。', + 'example': 'E2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为 0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PPMT', + 't': 8, + 'd': '返回根据定期固定付款和固定利率而定的投资在已知期间内的本金偿付额。', + 'a': '返回根据定期固定付款和固定利率而定的投资在已知期间内的本金偿付额。', + 'm': [4, 6], + 'p': [{ + 'name': 'rate', + 'detail': '各期利率。', + 'example': '0.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'per', + 'detail': '指定期数,该值必须在 1 到 nper 范围内。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'nper', + 'detail': '年金的付款总期数。', + 'example': '3*12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '现值即一系列未来付款当前值的总和。', + 'example': '100000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fv', + 'detail': '[可选 - 默认值为 0] - 未来值,或在最后一次付款后希望得到的现金余额。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为 0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'INTRATE', + 't': 8, + 'd': '返回完全投资型证券的利率。', + 'a': '返回完全投资型证券的利率。', + 'm': [4, 5], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'investment', + 'detail': '有价证券的投资额。', + 'example': '100000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'redemption', + 'detail': '有价证券到期时的兑换值。', + 'example': '101200', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PRICE', + 't': 8, + 'd': '返回定期付息的面值 ¥100 的有价证券的价格。', + 'a': '返回定期付息的面值 ¥100 的有价证券的价格。', + 'm': [6, 7], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'rate', + 'detail': '有价证券的年息票利率。', + 'example': '0.057', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'yld', + 'detail': '有价证券的年收益率。', + 'example': '0.065', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'redemption', + 'detail': '面值 ¥100 的有价证券的清偿价值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PRICEDISC', + 't': 8, + 'd': '返回折价发行的面值 ¥100 的有价证券的价格。', + 'a': '返回折价发行的面值 ¥100 的有价证券的价格。', + 'm': [4, 5], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'discount', + 'detail': '有价证券的贴现率。', + 'example': '0.0525', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'redemption', + 'detail': '面值 ¥100 的有价证券的清偿价值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'PRICEMAT', + 't': 8, + 'd': '返回到期付息的面值 ¥100 的有价证券的价格。', + 'a': '返回到期付息的面值 ¥100 的有价证券的价格。', + 'm': [5, 6], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'issue', + 'detail': '有价证券的发行日。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'rate', + 'detail': '有价证券在发行日的利率。', + 'example': '0.061', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'yld', + 'detail': '有价证券的年收益率。', + 'example': '0.061', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'RECEIVED', + 't': 8, + 'd': '返回一次性付息的有价证券到期收回的金额。', + 'a': '返回一次性付息的有价证券到期收回的金额。', + 'm': [4, 5], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'investment', + 'detail': '有价证券的投资额。', + 'example': '10000000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'discount', + 'detail': '有价证券的贴现率。', + 'example': '0.0575', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '12', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DISC', + 't': 8, + 'd': '返回有价证券的贴现率。', + 'a': '返回有价证券的贴现率。', + 'm': [4, 5], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'pr', + 'detail': '有价证券的价格(按面值为 ¥100 计算)。', + 'example': '97.975', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'redemption', + 'detail': '面值 ¥100 的有价证券的清偿价值。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '12', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'NPER', + 't': 8, + 'd': '基于固定利率及等额分期付款方式,返回某项投资的总期数。', + 'a': '基于固定利率及等额分期付款方式,返回某项投资的总期数。', + 'm': [3, 5], + 'p': [{ + 'name': 'rate', + 'detail': '各期利率。', + 'example': '0.12', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pmt', + 'detail': '各期所应支付的金额,在整个年金期间保持不变。', + 'example': '500', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'pv', + 'detail': '现值,或一系列未来付款的当前值的累积和。', + 'example': '40000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'fv', + 'detail': '[可选 - 默认值为0] - 未来值,或在最后一次付款后希望得到的现金余额。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'type', + 'detail': '[可选 - 默认值为0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SLN', + 't': 8, + 'd': '返回一个期间内的资产的直线折旧。', + 'a': '返回一个期间内的资产的直线折旧。', + 'm': [3, 3], + 'p': [{ + 'name': 'cost', + 'detail': '资产原值。', + 'example': '300000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'salvage', + 'detail': '折旧末尾时的值(有时也称为资产残值)。', + 'example': '75000', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'life', + 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', + 'example': '10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DURATION', + 't': 8, + 'd': '返回假设面值 ¥100 的定期付息有价证券的修正期限。', + 'a': '返回假设面值 ¥100 的定期付息有价证券的修正期限。', + 'm': [5, 6], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'coupon', + 'detail': '有价证券的年息票利率。', + 'example': '0.08', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'yld', + 'detail': '有价证券的年收益率。', + 'example': '0.09', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MDURATION', + 't': 8, + 'd': '返回假设面值 ¥100 的有价证券的 Macauley 修正期限。', + 'a': '返回假设面值 ¥100 的有价证券的 Macauley 修正期限。', + 'm': [5, 6], + 'p': [{ + 'name': 'settlement', + 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'maturity', + 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', + 'example': 'DATE(2010', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'coupon', + 'detail': '有价证券的年息票利率。', + 'example': '0.08', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'yld', + 'detail': '有价证券的年收益率。', + 'example': '0.09', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'frequency', + 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'basis', + 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', + 'example': '0', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'BIN2DEC', + 't': 9, + 'd': '将二进制数转换为十进制数。', + 'a': '将二进制数转换为十进制数。', + 'm': [1, 1], + 'p': [{ + 'name': 'number', + 'detail': '要转换为十进制数的带符号的10位二进制数值(以字符串形式提供)。\n\n带符号的二进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n对于此函数,最大的正数输入值为0111111111,最小的负数输入值为1000000000。\n\n如果所提供的带符号的二进制数是有效的二进制数,会自动将其转换为相应的字符串输入。例如,BIN2DEC(100)和BIN2DEC("100")得出的结果相同,均为4。', + 'example': '101', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'BIN2HEX', + 't': 9, + 'd': '将二进制数转换为十六进制数。', + 'a': '将二进制数转换为十六进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的十六进制数的带符号的10位二进制数值(以字符串形式提供)。\n\n带符号的二进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n对于此函数,最大的正数输入值为0111111111,最小的负数输入值为1000000000。\n\n如果所提供的带符号的二进制数是有效的二进制数,会自动将其转换为相应的字符串输入。例如,BIN2HEX(11111)和BIN2HEX("11111")得出 的结果相同,均为1F。', + 'example': '101', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。例如,BIN2HEX("11111",8)所得的结果值为0000001F。\n\n如果带符号的二进制数的最高位为1,则忽略此值;即当提供的带符号的二进制数大于等于1000000000时忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'BIN2OCT', + 't': 9, + 'd': '将二进制数转换为八进制数。', + 'a': '将二进制数转换为八进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的八进制数的带符号的10位二进制数值(以字符串形式提供)。\n\n带符号的二进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n对于此函数,最大的正数输入值为0111111111,最小的负数输入值为1000000000。\n\n如果所提供的带符号的二进制数是有效的二进制数,会自动将其转换为相应的字符串输入。例如,BIN2OCT(11111)和BIN2OCT("11111")得出的结果相同,均为37。', + 'example': '101', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。例如,BIN2OCT("11111")得到的结果值为00000037。\n\n如果带符号的二进制数的最高位为1,则忽略此值;即当提供的带符号的二进制数大于等于1000000000时忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DEC2BIN', + 't': 9, + 'd': '将十进制数转换为二进制数。', + 'a': '将十进制数转换为二进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的二进制数的十进制数值(以字符串形式提供)。\n\n对于此函数,最大的正数输入值为511,最小的负数输入值为-512。\n\n如果所提供的十进制数是有效的十进制数,会自动将其转换为相应的字符串输入。例如,DEC2BIN(199)和DEC2BIN("199")得出的结果相同,均为11000111。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果十进制数为负数,则忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DEC2HEX', + 't': 9, + 'd': '将十进制数转换为十六进制数。', + 'a': '将十进制数转换为十六进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的十六进制数的十进制数值(以字符串形式提供)。\n\n此函数可接受的最大正数值为549755813887,最小负数值为-549755814888。\n\n如果所提供的十进制数是有效的十进制数,会自动将其转换为相应的字符串输入。例如,DEC2HEX(100)和DEC2HEX("100")得出的结果相同,均为64。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果十进制数为负数,则忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DEC2OCT', + 't': 9, + 'd': '将十进制数转换为八进制数。', + 'a': '将十进制数转换为八进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的八进制数的十进制数值(以字符串形式提供)。\n\n此函数可接受的最大正数值为536870911,最小负数值为-53687092。\n\n如果所提供的十进制数是有效的十进制数,会自动将其转换为相应的字符串输入。例如,DEC2OCT(199)和DEC2OCT("199")得出的结果相同,均为307。', + 'example': '100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果十进制数为负数,则忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'HEX2BIN', + 't': 9, + 'd': '将十六进制数转换为二进制数。', + 'a': '将十六进制数转换为二进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的二进制数的带符号的40位十六进制数值(以字符串形式提供)。\n\n带符号的十六进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为1FF,最小负数值为FFFFFFFE00。\n\n如果所提供的带符号的十六进制数是有效的十六进制数,函数会自动将其转换为相应的字符串输入。例如,HEX2BIN(199)和HEX2BIN("199")得出的结果相同,均为110011001。', + 'example': '"f3"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的十六进制数的最高位为1,则忽略此值;即当提供的带符号的十六进制数大于等于8000000000时忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'HEX2DEC', + 't': 9, + 'd': '将十六进制数转换为十进制数。', + 'a': '将十六进制数转换为十进制数。', + 'm': [1, 1], + 'p': [{ + 'name': 'number', + 'detail': '要转换为十进制数的带符号的40位十六进制数值(以字符串形式提供)。\n\n带符号的十六进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为7fffffffff,最小负数值为8000000000。\n\n如果所提供的带符号的十六进制数是有效的十六进制数,函数会自动将其转换为相应的字符串输入。例如,HEX2DEC(199)和HEX2DEC("199")得出的结果相同,均为409。', + 'example': '"f3"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'HEX2OCT', + 't': 9, + 'd': '将十六进制数转换为八进制数。', + 'a': '将十六进制数转换为八进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的八进制数的带符号的40位十六进制数值(以字符串形式提供)。\n\n带符号的十六进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为1FFFFFFF,最小负数值为FFE0000000。\n\n如果所提供的带符号的十六进制数是有效的十六进制数,函数会自动将其转换为相应的字符串输入。例如,HEX2OCT(199)和HEX2OCT("199")得出的结果相同,均为631。', + 'example': '"f3"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的十六进制数的最高位为1,则忽略此值;即当给定的带符号的十六进制数大于等于8000000000时忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'OCT2BIN', + 't': 9, + 'd': '将八进制数转换为二进制数。', + 'a': '将八进制数转换为二进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的二进制数的带符号的30位八进制数值(以字符串形式提供)。\n\n带符号的八进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为777,最小负数值为7777777000。\n\n如果所提供的带符号的八进制数是有效的八进制数,函数会自动将其转换为相应的字符串输入。例如,OCT2BIN(177)和OCT2BIN("177")得出的结果相同,均为1111111。', + 'example': '37', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的八进制数的最高位为1,则忽略此值;即当给定的带符号的八进制数大于等于4000000000时忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'OCT2DEC', + 't': 9, + 'd': '将八进制数转换为十进制数。', + 'a': '将八进制数转换为十进制数。', + 'm': [1, 1], + 'p': [{ + 'name': 'number', + 'detail': '要转换为十进制数的带符号的30位八进制数值(以字符串形式提供)。\n\n带符号的ba进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为3777777777,最小负数值为4000000000。\n\n如果所提供的带符号的八进制数是有效的八进制数,函数会自动将其转换为相应的字符串输入。例如,OCT2DEC(177)和OCT2DEC("177")得出的结果相同,均为127。', + 'example': '37', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'OCT2HEX', + 't': 9, + 'd': '将八进制数转换为十六进制数。', + 'a': '将八进制数转换为十六进制数。', + 'm': [1, 2], + 'p': [{ + 'name': 'number', + 'detail': '要转换为带符号的十六进制数的带符号的30位八进制数值(以字符串形式提供)。\n\n带符号的ba进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为3777777777,最小负数值为4000000000。\n\n如果所提供的带符号的八进制数是有效的八进制数,函数会自动将其转换为相应的字符串输入。例如,OCT2HEX(177)和OCT2HEX("177")得出的结果相同,均为7F。', + 'example': '37', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'places', + 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的八进制数的最高位为1,则忽略此值;即当给定的带符号的八进制数大于等于4000000000时忽略此值。', + 'example': '8', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'COMPLEX', + 't': 9, + 'd': '将实系数及虚系数转换为 x+yi 或 x+yj 形式的复数。', + 'a': '将实系数及虚系数转换为 x+yi 或 x+yj 形式的复数。', + 'm': [2, 3], + 'p': [{ + 'name': 'real_num', + 'detail': '复数的实系数。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'i_num', + 'detail': '复数的虚系数。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'suffix', + 'detail': '[可选 - 默认为 "i"] - 复数中虚系数的后缀。', + 'example': '"j"', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangestring' + }] + }, { + 'n': 'IMREAL', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的实系数。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的实系数。', + 'm': [1, 1], + 'p': [{ + 'name': 'inumber', + 'detail': '需要计算其实系数的复数。', + 'example': '"4+5i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'IMAGINARY', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的虚系数。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的虚系数。', + 'm': [1, 1], + 'p': [{ + 'name': 'inumber', + 'detail': '需要计算其虚系数的复数。', + 'example': '"4+5i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'IMCONJUGATE', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的共轭复数。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的共轭复数。', + 'm': [1, 1], + 'p': [{ + 'name': 'inumber', + 'detail': '需要计算其共轭数的复数。', + 'example': '"3+4i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'IMABS', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的绝对值(模)。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的绝对值(模)。', + 'm': [1, 1], + 'p': [{ + 'name': 'inumber', + 'detail': '要计算其绝对值的复数。', + 'example': '"3+4i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'DELTA', + 't': 9, + 'd': '检验两个值是否相等。 如果 number1=number2,则返回 1;否则返回 0。', + 'a': '检验两个值是否相等。 如果 number1=number2,则返回 1;否则返回 0。', + 'm': [1, 2], + 'p': [{ + 'name': 'number1', + 'detail': '第一个数字。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'number2', + 'detail': '[可选 - 默认为 0] - 第二个数字。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'IMSUM', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的和。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的和。', + 'm': [1, 255], + 'p': [{ + 'name': 'inumber1', + 'detail': '要相加的第一个复数', + 'example': '"3+4i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'inumber2, …', + 'detail': '[可选] - 要与值1 相加的其他复数', + 'example': '"5-3i"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'IMSUB', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的差。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的差。', + 'm': [2, 2], + 'p': [{ + 'name': 'inumber1', + 'detail': '从(复)数中减去 inumber2。', + 'example': '"6+5i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'inumber2', + 'detail': '从 inumber1 中减(复)数。', + 'example': '"2+3i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'IMPRODUCT', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的乘积。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的乘积。', + 'm': [1, 255], + 'p': [{ + 'name': 'inumber1', + 'detail': '用于计算乘积的第一个复数', + 'example': '"3+4i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'inumber2, …', + 'detail': '[可选] - 要相乘的其他复数。', + 'example': '"5-3i"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'IMDIV', + 't': 9, + 'd': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的商。', + 'a': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的商。', + 'm': [2, 2], + 'p': [{ + 'name': 'inumber1', + 'detail': '复数分子或被除数。', + 'example': '"11+16i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'inumber2', + 'detail': '复数分母或除数。', + 'example': '"3+2i"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'NOT', + 't': 10, + 'd': '返回某个逻辑值的相反值 - “NOT(TRUE())”将返回 FALSE;“NOT(FALSE())”将返回 TRUE。', + 'a': '返回某个逻辑值的相反值 - “NOT(TRUE())”将返回 FALSE;“NOT(FALSE())”将返回 TRUE。', + 'm': [1, 1], + 'p': [{ + 'name': 'logical', + 'detail': '计算结果为 TRUE 或 FALSE 的任何值或表达式。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TRUE', + 't': 10, + 'd': '返回逻辑值 TRUE。', + 'a': '返回逻辑值 TRUE。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'FALSE', + 't': 10, + 'd': '返回逻辑值 FALSE。', + 'a': '返回逻辑值 FALSE。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'AND', + 't': 10, + 'd': '所有参数的计算结果为 TRUE 时,返回 TRUE;只要有一个参数的计算结果为 FALSE,即返回 FALSE。', + 'a': '所有参数的计算结果为 TRUE 时,返回 TRUE;只要有一个参数的计算结果为 FALSE,即返回 FALSE。', + 'm': [1, 255], + 'p': [{ + 'name': 'logical1', + 'detail': '要测试的第一个条件,其计算结果可以为 TRUE 或 FALSE。', + 'example': 'A2 = "foo"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'logical2,...', + 'detail': '[可选] - 要测试的其他条件,其计算结果可以为 TRUE 或 FALSE,最多可包含 255 个条件。', + 'example': 'A3 = "bar"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'IFERROR', + 't': 10, + 'd': '如果第一个参数不是错误值,就返回第一个参数;否则,返回第二个参数。', + 'a': '如果第一个参数不是错误值', + 'm': [2, 2], + 'p': [{ + 'name': 'value', + 'detail': '检查是否存在错误的参数。', + 'example': 'A1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value_if_error', + 'detail': '公式的计算结果错误时返回的值。 计算以下错误类型:#N/A、#VALUE!、#REF!、#DIV/0!、#NUM!、#NAME? 或 #NULL!。', + 'example': '"Error in cell A1"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'IF', + 't': 10, + 'd': '当逻辑表达式的值为 TRUE 时返回一个值,而当其为 FALSE 时返回另一个值。', + 'a': '当逻辑表达式的值为 TRUE 时返回一个值,而当其为 FALSE 时返回另一个值。', + 'm': [2, 3], + 'p': [{ + 'name': 'logical_test', + 'detail': '一个表达式或对包含表达式的单元格的引用,该表达式代表某种逻辑值(即TRUE或FALSE)。', + 'example': 'A2 = "foo"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value_if_true', + 'detail': '当逻辑表达式为TRUE时的返回值。', + 'example': '"A2 is foo"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value_if_false', + 'detail': '[可选 - 默认为空白] - 当逻辑表达式等于FALSE时的函数返回值。', + 'example': '"A2 was false"', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'OR', + 't': 10, + 'd': '只要有一个参数的计算结果为 TRUE 时,返回 TRUE;所有参数的计算结果为 FALSE,即返回 FALSE。', + 'a': '只要有一个参数的计算结果为 TRUE 时,返回 TRUE;所有参数的计算结果为 FALSE,即返回 FALSE。', + 'm': [1, 255], + 'p': [{ + 'name': 'logical1', + 'detail': '要测试的第一个条件,其计算结果可以为 TRUE 或 FALSE。', + 'example': 'A2 = "foo"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': '逻辑表达式2', + 'detail': '[可选] - 其他表达式或对包含表达式的单元格的引用,这些表达式代表某种逻辑值(即TRUE或FALSE)或者可以强制转换为逻辑值。', + 'example': ' A3 = "bar"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'NE', + 't': 11, + 'd': '如果指定的值不相等,则返回“TRUE”;否则返回“FALSE”。相当于“<>”运算符。', + 'a': '如果指定的值不相等,则返回“TRUE”;否则返回“FALSE”。相当于“<>”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '第一个值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '要检查是否与 value1 不相等的值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'EQ', + 't': 11, + 'd': '如果指定的值相等,则返回“TRUE”;否则返回“FALSE”。相当于“=”运算符。', + 'a': '如果指定的值相等,则返回“TRUE”;否则返回“FALSE”。相当于“=”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '第一个值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '要检查是否与 value1 相等的值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'GT', + 't': 11, + 'd': '如果第一个参数严格大于第二个,则返回 TRUE;否则返回 FALSE。相当于“>”运算符。', + 'a': '如果第一个参数严格大于第二个,则返回 TRUE;否则返回 FALSE。相当于“>”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '要测试其是否大于 value2 的值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '第二个值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'GTE', + 't': 11, + 'd': '如果第一个参数大于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“>=”运算符。', + 'a': '如果第一个参数大于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“>=”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '要测试其是否大于等于 value2 的值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '第二个值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LT', + 't': 11, + 'd': '如果第一个参数严格小于第二个,则返回 TRUE;否则返回 FALSE。相当于“<”运算符。', + 'a': '如果第一个参数严格小于第二个,则返回 TRUE;否则返回 FALSE。相当于“<”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '要测试其是否小于 value2 的值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '第二个值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LTE', + 't': 11, + 'd': '如果第一个参数小于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“<=”运算符。', + 'a': '如果第一个参数小于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“<=”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '要测试其是否小于等于 value2 的值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '第二个值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ADD', + 't': 11, + 'd': '返回两个数值之和。相当于 `+` 运算符。', + 'a': '返回两个数值之和。相当于 `+` 运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '第一个加数。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value2', + 'detail': '第二个加数。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MINUS', + 't': 11, + 'd': '返回两个数值之差。相当于“-”运算符。', + 'a': '返回两个数值之差。相当于“-”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '被减数,即要对其计减的数值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value2', + 'detail': '减数,即要从 value1 中减除的数值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MULTIPLY', + 't': 11, + 'd': '返回两个数的乘积。相当于“*”运算符。', + 'a': '返回两个数的乘积。相当于“*”运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '第一个乘数。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value2', + 'detail': '第二个乘数。', + 'example': 'B2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DIVIDE', + 't': 11, + 'd': '返回两个参数相除所得的结果。相当于 `/` 运算符。', + 'a': '返回两个参数相除所得的结果。相当于 `/` 运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': '要被除的数值。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'value2', + 'detail': '用于除其他数的数值。\n\n除数不得为0。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CONCAT', + 't': 11, + 'd': '返回两个值的串联。相当于 `&` 运算符。', + 'a': '返回两个值的串联。相当于 `&` 运算符。', + 'm': [2, 2], + 'p': [{ + 'name': 'value1', + 'detail': 'value2 将附于其后的值。', + 'example': '"de"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'value2', + 'detail': '要附于 value1 之后的值。', + 'example': '"mystify"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'UNARY_PERCENT', + 't': 11, + 'd': '返回按百分比解释的数值。例如,“UNARY_PERCENT(100)”等于1。', + 'a': '返回按百分比解释的数值。例如,“UNARY_PERCENT(100)”等于1。', + 'm': [1, 1], + 'p': [{ + 'name': 'number', + 'detail': '要作为百分比解释的数值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CONCATENATE', + 't': 12, + 'd': '将两个或多个文本字符串联接为一个字符串。', + 'a': '将两个或多个文本字符串联接为一个字符串。', + 'm': [1, 255], + 'p': [{ + 'name': 'text1', + 'detail': '初始字符串。', + 'example': '"Super"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'text2 ...', + 'detail': '[可选] - 要按顺序连接在一起的其他字符串。', + 'example': '"calla"', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'CODE', + 't': 12, + 'd': '返回所提供的字符串中首字符的 Unicode 映射值。', + 'a': '返回所提供的字符串中首字符的 Unicode 映射值。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要返回其首字符的Unicode映射值的字符串。', + 'example': '"a"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'CHAR', + 't': 12, + 'd': '按照当前 Unicode 编码表,将数字转换为对应的字符。', + 'a': '按照当前 Unicode 编码表,将数字转换为对应的字符。', + 'm': [1, 1], + 'p': [{ + 'name': 'number', + 'detail': '介于 1 到 255 之间的数字。', + 'example': '97', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'ARABIC', + 't': 12, + 'd': '将罗马数字转换为阿拉伯数字。', + 'a': '将罗马数字转换为阿拉伯数字。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要转换格式的罗马数字', + 'example': '"XIV"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ROMAN', + 't': 12, + 'd': '将数字格式设置为罗马数字形式。', + 'a': '将数字格式设置为罗马数字形式。', + 'm': [1, 1], + 'p': [{ + 'name': 'number', + 'detail': '要设置格式的数字,介于1到3999之间(包括这两个数字)。', + 'example': '499', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'REGEXEXTRACT', + 't': 12, + 'd': '按照正则表达式提取匹配的子串。', + 'a': '按照正则表达式提取匹配的子串。', + 'm': [2, 2], + 'p': [{ + 'name': 'text', + 'detail': '输入文本。', + 'example': '"Needle in a haystack"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'regular_expression', + 'detail': '此函数将返回文本中符合此表达式的第一个子串。', + 'example': '".e{2}dle"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'REGEXMATCH', + 't': 12, + 'd': '判断一段文本是否与正则表达式相匹配。', + 'a': '判断一段文本是否与正则表达式相匹配。', + 'm': [2, 2], + 'p': [{ + 'name': 'text', + 'detail': '要用正则表达式测试的文本。', + 'example': '"Spreadsheets"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'regular_expression', + 'detail': '用来测试文本的正则表达式。', + 'example': '"S.r"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'REGEXREPLACE', + 't': 12, + 'd': '使用正则表达式将文本字符串中的一部分替换为其他文本字符串。', + 'a': '使用正则表达式将文本字符串中的一部分替换为其他文本字符串。', + 'm': [3, 3], + 'p': [{ + 'name': 'text', + 'detail': '要对其局部进行替换操作的文本。', + 'example': '"Spreadsheets"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'regular_expression', + 'detail': '正则表达式。 text 中所有匹配的实例都将被替换。', + 'example': '"S.*d"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'replacement', + 'detail': '要插入到原有文本中的文本。', + 'example': '"Bed"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'T', + 't': 12, + 'd': '返回文本格式的字符串参数。', + 'a': '返回文本格式的字符串参数。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为文本的参数。\n\n如果值为文本,T将返回值本身。\n\n如果值为指向包含文本的单元格的引用,T将返回值中的内容。\n\n如果值为错误值或包含错误值的单元格,T将返回该错误值。\n\n对于所有其他情况,T将返回空串。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'FIXED', + 't': 12, + 'd': '以固定的小数位数设置数字的格式。', + 'a': '以固定的小数位数设置数字的格式。', + 'm': [1, 3], + 'p': [{ + 'name': 'number', + 'detail': '要进行舍入并转换为文本的数字。', + 'example': '3.141592653', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'decimals', + 'detail': '[可选 - 默认值为2] - 结果中要显示的小数位数。\n\n如果数值的有效位数小于小数位数,将以零填充。如果数值的有效位数大于小数位数,则将其舍入到所需的小数位数而不是将其截断。', + 'example': '2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'no_commas', + 'detail': '[可选 - 默认值为FALSE()] - 一个逻辑值,如果为 TRUE(),则会禁止 FIXED 在返回的文本中包含逗号。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'FIND', + 't': 12, + 'd': '返回字符串在文本中首次出现的位置(区分大小写)。', + 'a': '返回字符串在文本中首次出现的位置(区分大小写)。', + 'm': [2, 3], + 'p': [{ + 'name': 'find_text', + 'detail': '要在要搜索的文本中查找的字符串。', + 'example': '"n"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'within_text', + 'detail': '要在其中搜索搜索字符串的首次出现位置的文本。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'start_num', + 'detail': '[可选 - 默认值为1] - 要在要搜索的文本中开始搜索的字符位置。', + 'example': '14', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'FINDB', + 't': 12, + 'd': '返回某个字符串在文本中首次出现的位置(每个双字节字符占两个位置)。', + 'a': '返回某个字符串在文本中首次出现的位置(每个双字节字符占两个位置)。', + 'm': [2, 3], + 'p': [{ + 'name': 'find_text', + 'detail': '要在要搜索的文本中查找的字符串。', + 'example': '"新"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'within_text', + 'detail': '要在其中搜索搜索字符串的首次出现位置的文本。', + 'example': '"农历新年"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'start_num', + 'detail': '[可选 - 默认值为 1] - 要在要搜索的文本中开始搜索的字符位置。', + 'example': '2', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'JOIN', + 't': 12, + 'd': '将一个或多个使用指定定界符的一维数组的元素连接到一起。', + 'a': '将一个或多个使用指定定界符的一维数组的元素连接到一起。', + 'm': [2, 255], + 'p': [{ + 'name': 'separator', + 'detail': '置于相互连接的值之间的字符或字符串。\n\n定界符可以为空,例如JOIN(,{1,2,3})。', + 'example': '" and-a "', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'array1', + 'detail': '要使用定界符连接的一个或多个值。', + 'example': '{1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'array2, ...', + 'detail': '[可选] - 要使用定界符连接的其他值或数组。', + 'example': '2', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangeall' + }] + }, { + 'n': 'LEFT', + 't': 12, + 'd': '从文本字符串的第一个字符开始返回指定个数的字符。', + 'a': '从文本字符串的第一个字符开始返回指定个数的字符。', + 'm': [1, 2], + 'p': [{ + 'name': 'text', + 'detail': '包含要提取的字符的文本字符串。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'num_chars', + 'detail': '[可选 - 默认值为1] - 指定要由 LEFT 提取的字符的数量。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'RIGHT', + 't': 12, + 'd': '根据所指定的字符数返回文本字符串中最后一个或多个字符。', + 'a': '根据所指定的字符数返回文本字符串中最后一个或多个字符。', + 'm': [1, 2], + 'p': [{ + 'name': 'text', + 'detail': '包含要提取的字符的文本字符串。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'num_chars', + 'detail': '[可选 - 默认值为1] - 指定要由 RIGHT 提取的字符的数量。', + 'example': '2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MID', + 't': 12, + 'd': '返回文本字符串中从指定位置开始的特定数目的字符。', + 'a': '返回文本字符串中从指定位置开始的特定数目的字符。', + 'm': [3, 3], + 'p': [{ + 'name': 'text', + 'detail': '包含要提取的字符的文本字符串。', + 'example': '"get this"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'start_num', + 'detail': '要从字符串中开始提取的位置。字符串中第一个字符的索引为1。', + 'example': '5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'num_chars', + 'detail': '指定要由 MID 提取的字符的数量。\n\n如果提取的字符数尚不足提取长度个字符时就到达了字符串尾部,则MID返回从开始位置到字符串尾部的字符。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'LEN', + 't': 12, + 'd': '返回给定字符串的长度。', + 'a': '返回给定字符串的长度。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要返回其长度的字符串。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LENB', + 't': 12, + 'd': '返回文本中所包含的字符数。与双字节字符集(DBCS)一起使用。', + 'a': '返回文本中所包含的字符数。与双字节字符集(DBCS)一起使用。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要返回其字节数的字符串。(一个汉字为两个字节数)', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LOWER', + 't': 12, + 'd': '将指定字符串中的字母转换为小写。', + 'a': '将指定字符串中的字母转换为小写。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要转换为小写的字符串。', + 'example': '"LOREM IPSUM"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'UPPER', + 't': 12, + 'd': '将指定字符串中的字母转换为大写。', + 'a': '将指定字符串中的字母转换为大写。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要转换为大写的字符串。', + 'example': '"lorem ipsum"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'EXACT', + 't': 12, + 'd': '比较两个字符串是否相同。', + 'a': '比较两个字符串是否相同。', + 'm': [2, 2], + 'p': [{ + 'name': 'text1', + 'detail': '要比较的第一个字符串。', + 'example': 'A1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'text2', + 'detail': '要比较的第二个字符串。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'REPLACE', + 't': 12, + 'd': '将文本字符串的一部分替换为其他文本字符串。', + 'a': '将文本字符串的一部分替换为其他文本字符串。', + 'm': [4, 4], + 'p': [{ + 'name': 'old_text', + 'detail': '要对其局部进行替换操作的文本。', + 'example': '"Spreadsheets"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'start_num', + 'detail': '开始进行替换操作的位置(文本开头位置为 1)。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'num_chars', + 'detail': '要在文本中替换的字符个数。', + 'example': '6', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'new_text', + 'detail': '要插入到原有文本中的文本。', + 'example': '"Bed"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'REPT', + 't': 12, + 'd': '返回指定文本的多次重复。', + 'a': '返回指定文本的多次重复。', + 'm': [2, 2], + 'p': [{ + 'name': 'text', + 'detail': '要重复的字符或字符串。', + 'example': '"ha"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'number_times', + 'detail': '要重复的文本要在返回值中出现的次数。\n\n最大重复次数为100。即使重复次数大于100,REPT也仅将相应文本重复100次。', + 'example': '4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SEARCH', + 't': 12, + 'd': '返回字符串在文本中首次出现的位置(不区分大小写)。', + 'a': '返回字符串在文本中首次出现的位置(不区分大小写)。', + 'm': [2, 3], + 'p': [{ + 'name': 'find_text', + 'detail': '要在要搜索的文本中查找的字符串。', + 'example': '"n"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'within_text', + 'detail': '要在其中搜索搜索字符串的首次出现位置的文本。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'start_num', + 'detail': '[ 可选 - 默认值为1 ] - 要在要搜索的文本中开始搜索的字符位置。', + 'example': '14', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUBSTITUTE', + 't': 12, + 'd': '在文本字符串中用 new_text 替换 old_text。', + 'a': '在文本字符串中用 new_text 替换 old_text。', + 'm': [3, 4], + 'p': [{ + 'name': 'text', + 'detail': '需要替换其中字符的文本,或对含有文本(需要替换其中字符)的单元格的引用。', + 'example': '"search for it"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'old_text', + 'detail': '需要替换的文本。', + 'example': '"search for"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'new_text', + 'detail': '用于替换 old_text 的文本。', + 'example': '"Google"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'instance_num', + 'detail': '[ 可选 ] - 指定要用 new_text 替换 old_text 的事件。 如果指定了 instance_num,则只有满足要求的 old_text 被替换。 否则,文本中出现的所有 old_text 都会更改为 new_text。', + 'example': '3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'CLEAN', + 't': 12, + 'd': '移除文本中的不可打印 ASCII 字符后将其返回。', + 'a': '移除文本中的不可打印 ASCII 字符后将其返回。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要移除其中不可打印字符的文本。', + 'example': '"AF"&CHAR(31)', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TEXT', + 't': 12, + 'd': '按照指定格式将数字转换为文本。', + 'a': '按照指定格式将数字转换为文本。', + 'm': [2, 2], + 'p': [{ + 'name': 'value', + 'detail': '要设置格式的数字、日期或时间。', + 'example': '1.23', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'format_text', + 'detail': '以括号括起来的模式串,将按该模式设置数字的格式。\n\n0表示在数值位数少于格式指定的位数时必定以零填充。例如,TEXT(12.3,"000.00")将返回012.30。当数值的小数位数超过模式指定的小数位数时,四舍五入为指定的小数位数。例如,TEXT(12.305,"00.00")将返回12.31。\n\n#类似于0,但并不是在小数点的两侧都以零填充。例如,TEXT(12.3,"###.##")将返回12.3。', + 'example': '"$0.00"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TRIM', + 't': 12, + 'd': '删除指定字符串前后的空格。', + 'a': '删除指定字符串前后的空格。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要修剪的字符串或指向包含该字符串的单元格的引用。', + 'example': '" lorem ipsum"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'VALUE', + 't': 12, + 'd': '将可识别的任何日期、时间或数字格式的字符串转换为数字。', + 'a': '将可识别的任何日期、时间或数字格式的字符串转换为数字。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '包含要转换的值的字符串。', + 'example': '"123"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'PROPER', + 't': 12, + 'd': '将指定字符串中每个单词的首字母转为大写。', + 'a': '将指定字符串中每个单词的首字母转为大写。', + 'm': [1, 1], + 'p': [{ + 'name': 'text', + 'detail': '要转换的文本,其中每个单词的首字母都将转为大写,所有其他字母则转为小写。', + 'example': '"united states"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'CONVERT', + 't': 13, + 'd': '将数字从一种度量系统转换为另一种度量系统。', + 'a': '将数字从一种度量系统转换为另一种度量系统。', + 'm': [3, 3], + 'p': [{ + 'name': 'number', + 'detail': '是以 from_unit 为单位的需要进行转换的数值。', + 'example': '5.1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'from_unit', + 'detail': '是数值的单位。', + 'example': '"g"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'to_unit', + 'detail': '是结果的单位。', + 'example': '"kg"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'SUMX2MY2', + 't': 14, + 'd': '返回两数组中对应数值的平方差之和。', + 'a': '返回两数组中对应数值的平方差之和。', + 'm': [2, 2], + 'p': [{ + 'name': 'array_x', + 'detail': '第一个数组或数值区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'array_y', + 'detail': '第二个数组或数值区域。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUMX2PY2', + 't': 14, + 'd': '返回两数组中对应数值的平方和之和。', + 'a': '返回两数组中对应数值的平方和之和。', + 'm': [2, 2], + 'p': [{ + 'name': 'array_x', + 'detail': '第一个数组或数值区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'array_y', + 'detail': '第二个数组或数值区域。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUMXMY2', + 't': 14, + 'd': '返回两数组中对应数值之差的平方和。', + 'a': '返回两数组中对应数值之差的平方和。', + 'm': [2, 2], + 'p': [{ + 'name': 'array_x', + 'detail': '第一个数组或数值区域。', + 'example': 'A2:A100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'array_y', + 'detail': '第二个数组或数值区域。', + 'example': 'B2:B100', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TRANSPOSE', + 't': 14, + 'd': '将数组或单元格范围的行列转置。', + 'a': '将数组或单元格范围的行列转置。', + 'm': [1, 1], + 'p': [{ + 'name': 'array', + 'detail': '要将其行列互换的数组或范围。', + 'example': '{1,2}', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'TREND', + 't': 14, + 'd': '返回线性趋势值。', + 'a': '返回线性趋势值。', + 'm': [1, 4], + 'p': [{ + 'name': 'known_y', + 'detail': '关系表达式 y = mx + b 中已知的 y 值集合。\n\n如果 known_y 为二维数组或范围,则 known_x 的维数必须与之相同,或者省略此参数。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', + 'example': 'B2:B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'known_x', + 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = mx + b 中已知的可选 x 值集合。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', + 'example': 'A2:A10', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'new_x', + 'detail': '[可选 - 默认与 known_x 相同] - 需要函数 TREND 返回对应 y 值的新 x 值。', + 'example': 'A11:A13', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'const', + 'detail': '[可选 - 默认值为TRUE()] - 一个逻辑值,用于指定是否将常量 b 强制设为 0。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 0(零),m 将被调整以使 y = mx。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'FREQUENCY', + 't': 14, + 'd': '计算数值在某个区域内的出现频率,然后返回一个垂直数组。', + 'a': '计算数值在某个区域内的出现频率,然后返回一个垂直数组。', + 'm': [2, 2], + 'p': [{ + 'name': 'data_array', + 'detail': '要对其频率进行计数的一组数值或对这组数值的引用。', + 'example': 'A2:A40', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'bins_array', + 'detail': '要将 data_array 中的值插入到的间隔数组或对间隔的引用。\n\n为清晰起见,应将类别排序,但如果未排序,FREQUENCY会在内部对这些指定的值进行排序并返回正确结果。', + 'example': 'B2:B5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'GROWTH', + 't': 14, + 'd': '使用现有数据计算预测的指数等比。', + 'a': '使用现有数据计算预测的指数等比。', + 'm': [1, 4], + 'p': [{ + 'name': 'known_y', + 'detail': '关系表达式 y = b*m^x 中已知的 y 值集合。\n\n如果已知数据_y为二维数组或范围,则已知数据_x的维数必须与之相同,或者省略此参数。\n\n如果已知数据_y为一维数组或范围,已知数据_x则可代表二维数组或范围中的多个自变量。也就是说,如果已知数据_y为单行,则将已知数据_x中的每行解释为各自独立的值,类似情况也适用于已知数据_y为单列的情况。', + 'example': 'B2:B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'known_x', + 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = b*m^x 中已知的可选 x 值集合。\n\n如果已知数据_y为一维数组或范围,已知数据_x则可代表二维数组或范围中的多个自变量。也就是说,如果已知数据_y为单行,则将已知数据_x中的每行解释为各自独立的值,类似情况也适用于已知数据_y为单列的情况。', + 'example': 'A2:A10', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'new_x', + 'detail': '[可选 - 默认与 known_x 相同] - 需要函数 GROWTH 返回对应 y 值的新 x 值。', + 'example': 'A11:A13', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'const', + 'detail': '[可选 - 默认值为TRUE()] -一个逻辑值,用于指定是否将常量 b 强制设为 1。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 1,m 将被调整以使 y = m^x。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LINEST', + 't': 14, + 'd': '可通过使用最小二乘法计算与现有数据最佳拟合的直线,来计算某直线的统计值,然后返回描述此直线的数组。', + 'a': '可通过使用最小二乘法计算与现有数据最佳拟合的直线,来计算某直线的统计值,然后返回描述此直线的数组。', + 'm': [1, 4], + 'p': [{ + 'name': 'known_y', + 'detail': '关系表达式 y = mx + b 中已知的 y 值集合。\n\n如果 known_y 为二维数组或范围,则 known_x 的维数必须与之相同,或者省略此参数。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', + 'example': 'B2:B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'known_x', + 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = mx + b 中已知的可选 x 值集合。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', + 'example': 'A2:A10', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'const', + 'detail': '[可选 - 默认值为TRUE()] - 一个逻辑值,用于指定是否将常量 b 强制设为 0。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 0(零),m 将被调整以使 y = mx。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'stats', + 'detail': '[可选 - 默认值为FALSE()] - 一个逻辑值,用于指定是否返回附加回归统计值。\n\n如果详细为TRUE,除了对应于每个自变量的一组线性系数和y截距之外,LINEST还返回以下信息:\n\n每项系数和截距的标准误差、\n\n限定系数(介于0和1之间,1表示完全相关)、\n\n因变量值的标准误差、\n\nF统计或F观测值,指示所观测到的因变量和自变量变量之间的关系是随机的还是线性的、\n\n自由度,用于在参照表中查找F统计值以估算可信度、\n\n回归平方和,以及\n\n残差平方和。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'LOGEST', + 't': 14, + 'd': '在回归分析中,计算最符合数据的指数回归拟合曲线,并返回描述该曲线的数值数组。', + 'a': '在回归分析中,计算最符合数据的指数回归拟合曲线,并返回描述该曲线的数值数组。', + 'm': [1, 4], + 'p': [{ + 'name': 'known_y', + 'detail': '关系表达式 y = mx + b 中已知的 y 值集合。\n\n如果 known_y 为二维数组或范围,则 known_x 的维数必须与之相同,或者省略此参数。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', + 'example': 'B2:B10', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'known_x', + 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = mx + b 中已知的可选 x 值集合。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', + 'example': 'A2:A10', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'const', + 'detail': '[可选 - 默认值为TRUE()] - 一个逻辑值,用于指定是否将常量 b 强制设为 0。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 0(零),m 将被调整以使 y = mx。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'stats', + 'detail': '[可选 - 默认值为FALSE()] - 一个逻辑值,用于指定是否返回附加回归统计值。\n\n如果详细为TRUE,则除了为每个自变量和系数 b 返回一组指数值之外,LOGEST 还将返回以下数据:\n\n每项指数和系数的标准误差、\n\n限定系数(介于 0 和 1 之间,1 表示完全相关)、\n\n因变量值的标准误差、\n\nF 统计或 F 观测值,指示所观测到的因变量和自变量之间的关系是随机的还是指数的、\n\n自由度 - 用于在参照表中查找 F 统计值以估算可信度、\n\n回归平方和,以及\n\n残差平方和。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'MDETERM', + 't': 14, + 'd': '返回一个数组的矩阵行列式的值。', + 'a': '返回一个数组的矩阵行列式的值。', + 'm': [1, 1], + 'p': [{ + 'name': 'array', + 'detail': '行数和列数相等的数值数组。', + 'example': 'A1:D4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MINVERSE', + 't': 14, + 'd': '返回数组中存储的矩阵的逆矩阵。', + 'a': '返回数组中存储的矩阵的逆矩阵。', + 'm': [1, 1], + 'p': [{ + 'name': 'array', + 'detail': '行数和列数相等的数值数组。', + 'example': 'A1:D4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'MMULT', + 't': 14, + 'd': '返回两个数组的矩阵乘积。结果矩阵的行数与 array1 的行数相同,矩阵的列数与 array2 的列数相同。', + 'a': '返回两个数组的矩阵乘积。结果矩阵的行数与 array1 的行数相同,矩阵的列数与 array2 的列数相同。', + 'm': [2, 2], + 'p': [{ + 'name': 'array1', + 'detail': '要进行矩阵乘法运算的第一个矩阵数组。\n\narray1 列数必须与 array2 的行数相同', + 'example': 'A1:B3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'array2', + 'detail': '要进行矩阵乘法运算的第二个矩阵数组。\n\narray2 的行数必须与 array1 列数相同', + 'example': 'C1:F2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SUMPRODUCT', + 't': 14, + 'd': '在给定的几组数组中,将数组间对应的元素相乘,并返回乘积之和。', + 'a': '在给定的几组数组中,将数组间对应的元素相乘,并返回乘积之和。', + 'm': [1, 255], + 'p': [{ + 'name': 'array1', + 'detail': '其相应元素需要进行相乘并求和的第一个数组参数。', + 'example': 'A2:C5', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }, { + 'name': 'array2', + 'detail': '[可选] - 其相应元素需要进行相乘并求和的其它数组参数。', + 'example': 'D2:F5', + 'require': 'o', + 'repeat': 'y', + 'type': 'rangenumber' + }] + }, { + 'n': 'ISFORMULA', + 't': 15, + 'd': '检查公式是否位于引用的单元格中。', + 'a': '检查公式是否位于引用的单元格中。', + 'm': [1, 1], + 'p': [{ + 'name': 'cell', + 'detail': '要检查是否存在公式的单元格。\n\n如果 cell 为包含公式的单元格,则 ISFORMULA 将返回 TRUE。如果 cell 为相应单元格范围,则当该范围内的首个单元格包含公式时,系统会返回 TRUE。如果是任何其他值,系统都将返回 FALSE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'CELL', + 't': 15, + 'd': '返回有关单元格的格式、位置或内容的信息。', + 'a': '返回有关单元格的格式、位置或内容的信息。', + 'm': [2, 2], + 'p': [{ + 'name': 'info_type', + 'detail': '一个文本值,指定要返回的单元格信息的类型。', + 'example': '"type"', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'reference', + 'detail': '需要其相关信息的单元格。', + 'example': 'C2', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'NA', + 't': 15, + 'd': '返回错误值 #N/A。', + 'a': '返回错误值 #N/A。', + 'm': [0, 0], + 'p': [] + }, { + 'n': 'ERROR_TYPE', + 't': 15, + 'd': '返回与其他单元格中的错误值相对应的数字。', + 'a': '返回与其他单元格中的错误值相对应的数字。', + 'm': [1, 1], + 'p': [{ + 'name': 'error_val', + 'detail': '用于查找错误号的单元格,虽然您也可以直接提供错误值。', + 'example': 'A3', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISBLANK', + 't': 15, + 'd': '检查所引用的单元格是否为空。', + 'a': '检查所引用的单元格是否为空。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '对要检查其是否为空的单元格的引用。\n\n如果是空单元格,则 TRUE;否则返回 FALSE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'ISERR', + 't': 15, + 'd': '检查某个值是否为 #N/A 以外的错误值。', + 'a': '检查某个值是否为 #N/A 以外的错误值。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要验证其是否为#N/A以外的错误类型的值。\n\n如果值是除#N/A之外的任何错误(包括#DIV/0!、#NAME?、#NULL!、#NUM!、#VALUE!和#REF!),ISERR将返回TRUE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISERROR', + 't': 15, + 'd': '检查某个值是否为错误值。', + 'a': '检查某个值是否为错误值。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要验证其是否为错误类型的值。\n\n只要值是某种错误值(包括#DIV/0!、#N/A、#NAME?、#NULL!、#NUM!、#VALUE!和#REF!),ISERROR就会返回TRUE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISLOGICAL', + 't': 15, + 'd': '检查某个值是 TRUE 还是 FALSE。', + 'a': '检查某个值是 TRUE 还是 FALSE。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要验证其为逻辑TRUE还是逻辑FALSE的值。\n\n*如果值为TRUE或FALSE,或为指向值为TRUE或FALSE的单元格的引用,ISLOGICAL将返回TRUE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISNA', + 't': 15, + 'd': '检查某个值是否为错误值 #N/A。', + 'a': '检查某个值是否为错误值 #N/A。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要与错误值#N/A进行比较的值。\n\n*如果值为#N/A或指向包含#N/A的单元格的引用,则ISNA将返回TRUE,否则返回FALSE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISNONTEXT', + 't': 15, + 'd': '检查某个值是否为非文本。', + 'a': '检查某个值是否为非文本。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要检查的文本。\n\n*如果参数为文本值或指向包含文本的单元格的引用,ISNONTEXT将返回FALSE,否则返回TRUE。\n\n当值为指向空单元格的引用时,ISNONTEXT会返回TRUE。\n\n当值为空字符串时,ISNONTEXT将返回FALSE,因为空串被视作文本。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISNUMBER', + 't': 15, + 'd': '检查某个值是否为数字。', + 'a': '检查某个值是否为数字。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要验证其是否为数字的值。\n\n*如果参数为数字或指向内容为数字值的单元格的引用,ISNUMBER将返回TRUE,否则返回FALSE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'ISREF', + 't': 15, + 'd': '检查某个值是否为有效的单元格引用。', + 'a': '检查某个值是否为有效的单元格引用。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要验证其是否为单元格引用的值。\n\n*如果参数是有效的单元格引用,ISREF将返回TRUE,否则返回FALSE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'ISTEXT', + 't': 15, + 'd': '检查某个值是否为文本。', + 'a': '检查某个值是否为文本。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要验证其是否为文本的值。\n\n如果参数为文本值或指向包含文本值的单元格的引用,ISTEXT将返回TRUE,否则返回FALSE。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TYPE', + 't': 15, + 'd': '返回数值的类型。', + 'a': '返回数值的类型。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要确定其类型的数据。\n\n数字 返回 1;\n\n文本 返回 2;\n\n逻辑值 返回 4;\n\n错误值 返回 16;\n\n数组 返回 64;', + 'example': 'C4', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'N', + 't': 15, + 'd': '返回转化为数值后的值。', + 'a': '返回转化为数值后的值。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为数字的参数。\n\n如果值为数字,则返回该数字。\n\n如果值为日期,则返回该日期的序列号。\n\n如果值为TRUE,则返回1。\n\n如果值为FALSE,则返回0。\n\n如果值为错误值,则返回错误值。\n\n如果值为其他值,则返回0。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TO_DATE', + 't': 16, + 'd': '将指定的数字转换为日期。', + 'a': '将指定的数字转换为日期。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为日期的参数或其单元格引用。\n\n如果值为数字或指向内容为数值的单元格的引用,TO_DATE会将值转换为相应的日期并返回,值代表从十二月30日到对应的日期之间的天数,\n\n负值表示对应的日期在十二月30日之前,而小数值则代表一天中从午夜算起的时间。\n如果值不是数字或指向内容为数值的单元格的引用,则TO_DATE将在不做任何修改的情况下返回值。', + 'example': '25405', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TO_PURE_NUMBER', + 't': 16, + 'd': '将给定的日期/时间、百分比、货币金额或其他格式的数值转换为不带格式的纯数字。', + 'a': '将给定的日期/时间、百分比、货币金额或其他格式的数值转换为不带格式的纯数字。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为纯数字的参数或其单元格引用。\n\n如果值为数字或指向包含数值的单元格的引用,TO_PURE_NUMBER将以不带任何格式与解释的形式返回值。\n\n如果值不是数字或指向内容为数值的单元格的引用,则TO_PERCENT将在不做任何修改的情况下返回值。', + 'example': '50%', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TO_TEXT', + 't': 16, + 'd': '将给定的数字值转换为文本格式。', + 'a': '将给定的数字值转换为文本格式。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为文本的参数或其单元格引用。\n\n如果值为数字或指向包含数值的单元格的引用,TO_TEXT将返回字符串形式的值,并保持现有格式。即原为货币的仍为货币,原为十进制数的仍为十进制数,原为百分比的仍为百分比,原为日期的仍为日期。\n\n如果值不是数字或指向内容为数值的单元格的引用,则TO_TEXT将在不做任何修改的情况下返回值。', + 'example': '24', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'TO_DOLLARS', + 't': 16, + 'd': '将指定的数字转换为美元金额。', + 'a': '将指定的数字转换为美元金额。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为美元金额的参数或其单元格引用。\n\n如果值不是数字或指向内容为数值的单元格的引用,则 TO_DOLLARS 将在不做任何修改的情况下返回值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'TO_PERCENT', + 't': 16, + 'd': '将指定的数字转换为百分比。', + 'a': '将指定的数字转换为百分比。', + 'm': [1, 1], + 'p': [{ + 'name': 'value', + 'detail': '要转换为百分比的参数或其单元格引用。\n\n如果值为数字或指向包含数值的单元格的引用,TO_PERCENT会以1 = 100%为标准,将值转换为百分比。\n\n如果值不是数字或指向内容为数值的单元格的引用,则TO_PERCENT将在不做任何修改的情况下返回值。', + 'example': 'A2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'DGET', + 't': 17, + 'd': '使用 SQL 式查询,从列表或数据库的列中提取符合指定条件的单个值。', + 'a': '使用 SQL 式查询,从列表或数据库的列中提取符合指定条件的单个值。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DMAX', + 't': 17, + 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最大数字。', + 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最大数字。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DMIN', + 't': 17, + 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最小数字。', + 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最小数字。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DAVERAGE', + 't': 17, + 'd': '使用 SQL 式查询,对列表或数据库中满足指定条件的记录字段(列)中的数值求平均值。', + 'a': '使用 SQL 式查询,对列表或数据库中满足指定条件的记录字段(列)中的数值求平均值。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DCOUNT', + 't': 17, + 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中包含数字的单元格的个数。', + 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中包含数字的单元格的个数。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DCOUNTA', + 't': 17, + 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的非空单元格的个数。', + 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的非空单元格的个数。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DPRODUCT', + 't': 17, + 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数值的乘积。', + 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数值的乘积。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DSTDEV', + 't': 17, + 'd': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体标准偏差。', + 'a': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体标准偏差。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DSTDEVP', + 't': 17, + 'd': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为样本总体计算出的总体标准偏差。', + 'a': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为样本总体计算出的总体标准偏差。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DSUM', + 't': 17, + 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数字之和。', + 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数字之和。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DVAR', + 't': 17, + 'd': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体方差。', + 'a': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体方差。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + 'n': 'DVARP', + 't': 17, + 'd': '使用 SQL 式查询,通过使用列表或数据库中满足指定条件的记录字段(列)中的数字计算样本总体的样本总体方差。', + 'a': '使用 SQL 式查询,通过使用列表或数据库中满足指定条件的记录字段(列)中的数字计算样本总体的样本总体方差。', + 'm': [3, 3], + 'p': [{ + 'name': 'database', + 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', + 'example': 'A2:F20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }, { + 'name': 'field', + 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', + 'example': 'G2', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangeall' + }, { + 'name': 'criteria', + 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', + 'example': 'A22:D23', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + }] + }, { + "n": "AGE_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出年龄。支持15为或18位身份证", + "a": "根据身份证号得到年龄。", + "m": [1, 2], + "p": [{ + "name": "身份证号", + "example": "A1", + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "截止日期", + "example": '"2017-10-01"', + "detail": "年龄计算的截止日期或范围,默认为当日。", + "require": "o", + "repeat": "n", + "type": "rangedatetime" + }] + }, + // SEX_BY_IDCARD + { + "n": "SEX_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出性别。支持15为或18位身份证", + "a": "根据身份证号得到性别。", + "m": [1, 1], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + // BIRTHDAY_BY_IDCARD + { + "n": "BIRTHDAY_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出生日。支持15为或18位身份证", + "a": "根据身份证号得到生日。", + "m": [1, 2], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "生日格式", + "example": '0', + "detail": "日期类型,默认0:[1900/01/01], 1:[1900-01-01], 2:[1900年1月1日]", + "require": "o", + "repeat": "n", + "type": "rangeall" + }] + }, + // PROVINCE_BY_IDCARD + { + "n": "PROVINCE_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出籍贯的省份。支持15为或18位身份证", + "a": "根据身份证号得到籍贯的省份。", + "m": [1, 1], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + // CITY_BY_IDCARD + { + "n": "CITY_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出籍贯的城市。支持15为或18位身份证", + "a": "根据身份证号得到籍贯的城市。", + "m": [1, 1], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + // STAR_BY_IDCARD + { + "n": "STAR_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出星座。支持15为或18位身份证", + "a": "根据身份证号得到星座。", + "m": [1, 1], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + // ANIMAL_BY_IDCARD + { + "n": "ANIMAL_BY_IDCARD", + "t": "3", + "d": "根据中国身份证号计算出生肖(鼠、牛、虎、兔...)。支持15为或18位身份证", + "a": "根据身份证号得到生肖。", + "m": [1, 1], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + // ISIDCARD + { + "n": "ISIDCARD", + "t": "3", + "d": "验证身份证的格式是否正确。支持15为或18位身份证", + "a": "验证身份证格式正确性。", + "m": [1, 1], + "p": [{ + "name": "身份证号", + "example": '"31033519900101XXXX"', + "detail": "15位或者18位的身份证号或范围。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + // DM_TEXT_CUTWORD + { + "n": "DM_TEXT_CUTWORD", + "t": "4", + "d": "文本分词。把一连串文字拆分为一系列单独词语", + "a": "中文文本分词。", + "m": [1, 2], + "p": [{ + "name": "文本", + "example": '"我来到北京清华大学"', + "detail": "任意需要分词的文本。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "分词模式", + "example": '0', + "detail": "默认为0[精确模式], 1[全模式], 2[搜索引擎模式]。", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DM_TEXT_TFIDF + { + "n": "DM_TEXT_TFIDF", + "t": "4", + "d": "采用tf-idf算法进行关键词提取。从一连串文字中识别关键词", + "a": "tf-idf关键词识别。", + "m": [1, 3], + "p": [{ + "name": "文本", + "example": '"我来到北京清华大学"', + "detail": "任意需要分词的文本。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "关键词个数", + "example": '20', + "detail": "算法返回的关键词个数,默认20", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }, { + "name": "语料库", + "example": '1', + "detail": "选择特定领域的语料库,默认0[通用], 1[金融], 2[医疗]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DM_TEXT_TEXTRANK + { + "n": "DM_TEXT_TEXTRANK", + "t": "4", + "d": "采用TextRank算法进行关键词提取。从一连串文字中识别关键词", + "a": "TextRank关键词识别。", + "m": [1, 3], + "p": [{ + "name": "文本", + "example": '"我来到北京清华大学"', + "detail": "任意需要分词的文本。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "关键词个数", + "example": '20', + "detail": "算法返回的关键词个数,默认20", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }, { + "name": "语料库", + "example": '1', + "detail": "选择特定领域的语料库,默认0[通用], 1[金融], 2[医疗]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DATA_CN_STOCK_CLOSE + { + "n": "DATA_CN_STOCK_CLOSE", + "t": "5", + "d": "根据股票代码和日期,返回A股对应股票收盘价。", + "a": "返回A股对应股票收盘价。", + "m": [1, 3], + "p": [{ + "name": "股票代码", + "example": '"000001"', + "detail": "6位股票代码,必填项。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "日期", + "example": '2015-01-08', + "detail": "股票的交易日,默认为最新交易日", + "require": "o", + "repeat": "n", + "type": "rangedate" + }, { + "name": "复权除权", + "example": '0', + "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DATA_CN_STOCK_OPEN + { + "n": "DATA_CN_STOCK_OPEN", + "t": "5", + "d": "根据股票代码和日期,返回A股对应股票开盘价。", + "a": "返回A股对应股票开盘价。", + "m": [1, 3], + "p": [{ + "name": "股票代码", + "example": '"000001"', + "detail": "6位股票代码,必填项。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "日期", + "example": '2015-01-08', + "detail": "股票的交易日,默认为最新交易日", + "require": "o", + "repeat": "n", + "type": "rangedate" + }, { + "name": "复权除权", + "example": '0', + "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DATA_CN_STOCK_MAX + { + "n": "DATA_CN_STOCK_MAX", + "t": "5", + "d": "根据股票代码和日期,返回A股对应股票最高价。", + "a": "返回A股对应股票最高价。", + "m": [1, 3], + "p": [{ + "name": "股票代码", + "example": '"000001"', + "detail": "6位股票代码,必填项。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "日期", + "example": '2015-01-08', + "detail": "股票的交易日,默认为最新交易日", + "require": "o", + "repeat": "n", + "type": "rangedate" + }, { + "name": "复权除权", + "example": '0', + "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DATA_CN_STOCK_MIN + { + "n": "DATA_CN_STOCK_MIN", + "t": "5", + "d": "根据股票代码和日期,返回A股对应股票最低价。", + "a": "返回A股对应股票最低价。", + "m": [1, 3], + "p": [{ + "name": "股票代码", + "example": '"000001"', + "detail": "6位股票代码,必填项。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "日期", + "example": '2015-01-08', + "detail": "股票的交易日,默认为最新交易日", + "require": "o", + "repeat": "n", + "type": "rangedate" + }, { + "name": "复权除权", + "example": '0', + "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DATA_CN_STOCK_VOLUMN + { + "n": "DATA_CN_STOCK_VOLUMN", + "t": "5", + "d": "根据股票代码和日期,返回A股对应股票成交量。", + "a": "返回A股对应股票成交量。", + "m": [1, 3], + "p": [{ + "name": "股票代码", + "example": '"000001"', + "detail": "6位股票代码,必填项。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "日期", + "example": '2015-01-08', + "detail": "股票的交易日,默认为最新交易日", + "require": "o", + "repeat": "n", + "type": "rangedate" + }, { + "name": "复权除权", + "example": '0', + "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // DATA_CN_STOCK_AMOUNT + { + "n": "DATA_CN_STOCK_AMOUNT", + "t": "5", + "d": "根据股票代码和日期,返回A股对应股票成交额。", + "a": "返回A股对应股票成交额。", + "m": [1, 3], + "p": [{ + "name": "股票代码", + "example": '"000001"', + "detail": "6位股票代码,必填项。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, { + "name": "日期", + "example": '2015-01-08', + "detail": "股票的交易日,默认为最新交易日", + "require": "o", + "repeat": "n", + "type": "rangedate" + }, { + "name": "复权除权", + "example": '0', + "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", + "require": "o", + "repeat": "n", + "type": "rangenumber" + }] + }, + // ISDATE + { + "n": "ISDATE", + "t": "6", + "d": "验证日期的格式是否正确。支持多种日期格式", + "a": "验证日期格式正确性。", + "m": [1, 1], + "p": [{ + "name": "日期", + "example": '"1990-01-01"', + "detail": "日期值,例如1990/01/01, 1990年1月1日等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }] + }, + //sparklines函数,线图 + { + "n": "LINESPLINES", + "t": "3", + "d": "生成嵌入在单元格内的折线图sparklines,用于描述数据的连续走势", + "a": "生成单元格折线图", + "m": [1, 8], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //lineColor + { + "name": "线条颜色", + "example": '#2ec7c9', + "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#2ec7c9", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + // { + // "name": "填充颜色", + // "example": '#CCF3F4', + // "detail": "形成面积图,同线条颜色配置,默认0不显示", + // "require": "o", + // "repeat": "n", + // "type": "rangeall" + // }, + //lineWidth + { + "name": "线条粗细", + "example": '1', + "detail": "折线图线段粗细,默认为1px", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //normalRangeMin和normalRangeMax设为相同的值,min、max、avg、median需要计算 + { + "name": "辅助线", + "example": 'avg', + "detail": "一条横线,可以是min、max、avg、median、范围或自定义数值,默认0无", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //normalRangeColor + { + "name": "辅助线颜色", + "example": '#000', + "detail": "辅助线的颜色设置,同线条颜色配置,默认#000", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //maxSpotColor + { + "name": "最大值标识", + "example": '#fc5c5c', + "detail": "标识线图最大值,同线条颜色配置,默认0不显示", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //minSpotColor + { + "name": "最小值标识", + "example": '#fc5c5c', + "detail": "标识线图最大值,同线条颜色配置,默认0不显示", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //spotRadius + { + "name": "标识大小", + "example": '1.5', + "detail": "最大值和最小值的标识大小设置,默认为1.5", + "require": "o", + "repeat": "n", + "type": "rangeall" + }] + }, + //sparklines面积图 + { + "n": "AREASPLINES", + "t": "3", + "d": "生成嵌入在单元格内的面积图sparklines,一般用于描述数据的连续累积值走势", + "a": "生成单元格面积图", + "m": [1, 5], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //lineColor + { + "name": "线条颜色", + "example": '#2ec7c9', + "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#2ec7c9", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //fillColor + { + "name": "填充颜色", + "example": '#CCF3F4', + "detail": "形成面积图,同线条颜色配置,默认0不显示", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //lineWidth + { + "name": "线条粗细", + "example": '1', + "detail": "折线图线段粗细,默认为1px", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //normalRangeMin和normalRangeMax设为相同的值,min、max、avg、median需要计算 + { + "name": "辅助线", + "example": 'avg', + "detail": "一条横线,可以是min、max、avg、median、范围或自定义数值,默认0无", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //normalRangeColor + { + "name": "辅助线颜色", + "example": '#000', + "detail": "辅助线的颜色设置,同线条颜色配置,默认#000", + "require": "o", + "repeat": "n", + "type": "rangeall" + } + // //maxSpotColor + // { + // "name": "最大值标识", + // "example": '#fc5c5c', + // "detail": "标识线图最大值,同线条颜色配置,默认0不显示", + // "require": "o", + // "repeat": "n", + // "type": "rangeall" + // }, + // //minSpotColor + // { + // "name": "最小值标识", + // "example": '#fc5c5c', + // "detail": "标识线图最大值,同线条颜色配置,默认0不显示", + // "require": "o", + // "repeat": "n", + // "type": "rangeall" + // }, + // //spotRadius + // { + // "name": "标识大小", + // "example": '1.5', + // "detail": "最大值和最小值的标识大小设置,默认为1.5", + // "require": "o", + // "repeat": "n", + // "type": "rangeall" + // } + ] + }, + //sparklines柱状图 + { + "n": "COLUMNSPLINES", + "t": "3", + "d": "生成嵌入在单元格内的垂直柱状图sparklines,一般用于描述离散数据之间的大小情况", + "a": "生成单元格垂直柱状图", + "m": [1, 6], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //barSpacing + { + "name": "柱条间隔", + "example": '1', + "detail": "柱条之间的间隔距离,默认为1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //barColor + { + "name": "柱条颜色", + "example": '#fc5c5c', + "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#fc5c5c", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //negBarColor + { + "name": "负向柱条颜色", + "example": '#97b552', + "detail": "负向柱条颜色设置,代表负值的颜色,同柱条颜色配置,默认#97b552", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //chartRangeMax + { + "name": "最大值", + "example": '100', + "detail": "柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //colorMap + { + "name": "色板", + "example": '#97b552', + "detail": "调色板可以单独设置每个柱条的颜色,可设置多个,支持两种格式:1颜色例如#000,代表第一个柱的颜色是黑色;2数值范围:颜色,例如-2:#000表示数值为-2的柱为黑色,0:5:#000表示数值0-5的柱为黑色,默认为空", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines累积柱状图 + { + "n": "STACKCOLUMNSPLINES", + "t": "3", + "d": "生成嵌入在单元格内的累积垂直柱状图sparklines,一般用于描述离散数据多个维度的数值大小", + "a": "生成单元格累积垂直柱状图", + "m": [1, 5], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //stackconfig + { + "name": "按列堆积", + "example": '1', + "detail": "如果需要按行堆积则本项设为false或0,默认为是1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //barSpacing + { + "name": "柱条间隔", + "example": '1', + "detail": "柱条之间的间隔距离,默认为1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //chartRangeMax + { + "name": "最大值", + "example": '100', + "detail": "累积柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //stackedBarColor + { + "name": "累积色板", + "example": '#97b552', + "detail": "调色板可以单独设置每个维度的柱条颜色,可设置为A1:A10等范围,默认为#2ec7c9, #fc5c5c, #5ab1ef, #ffb980...", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines条形图 + { + "n": "BARSPLINES", + "t": "3", + "d": "生成嵌入在单元格内的横向条形图sparklines,一般用于描述离散数据之间的大小情况", + "a": "生成单元格横向条形图", + "m": [1, 6], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //barSpacing + { + "name": "柱条间隔", + "example": '1', + "detail": "柱条之间的间隔距离,默认为1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //barColor + { + "name": "柱条颜色", + "example": '#fc5c5c', + "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#fc5c5c", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //negBarColor + { + "name": "负向柱条颜色", + "example": '#97b552', + "detail": "负向柱条颜色设置,代表负值的颜色,同柱条颜色配置,默认#97b552", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //chartRangeMax + { + "name": "最大值", + "example": '100', + "detail": "柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //colorMap + { + "name": "色板", + "example": '#97b552', + "detail": "调色板可以单独设置每个柱条的颜色,可设置多个,支持两种格式:1颜色例如#000,代表第一个柱的颜色是黑色;2数值范围:颜色,例如-2:#000表示数值为-2的柱为黑色,0:5:#000表示数值0-5的柱为黑色,默认为空", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines累积条形图 + { + "n": "STACKBARSPLINES", + "t": "3", + "d": "生成嵌入在单元格内的累积横向条形图sparklines,一般用于描述离散数据多个维度的数值大小", + "a": "生成单元格累积横向条形图", + "m": [1, 5], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //stackconfig + { + "name": "按列堆积", + "example": '1', + "detail": "如果需要按行堆积则本项设为false或0,默认为是1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //barSpacing + { + "name": "柱条间隔", + "example": '1', + "detail": "柱条之间的间隔距离,默认为1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //chartRangeMax + { + "name": "最大值", + "example": '100', + "detail": "累积柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //stackedBarColor + { + "name": "累积色板", + "example": '#97b552', + "detail": "调色板可以单独设置每个维度的柱条颜色,可设置为A1:A10等范围,默认为#2ec7c9, #fc5c5c, #5ab1ef, #ffb980...", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines离散图 + { + "n": "DISCRETESPLINES", + "t": "3", + "d": "生成嵌入在单元格内的离散图sparklines,一般用于描述离散数据走势", + "a": "生成单元格离散图", + "m": [1, 4], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //thresholdValue + { + "name": "分割阈值", + "example": '1', + "detail": "离散图柱形颜色的区分,例如:该值为0,则大于0为蓝色,小于0为红色,默认为0", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //lineColor + { + "name": "阈值以上颜色", + "example": '#2ec7c9', + "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#2ec7c9", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //thresholdColor + { + "name": "阈值以下颜色", + "example": '#fc5c5c', + "detail": "阈值以下柱条颜色设置,同阈值以上颜色,默认#fc5c5c", + "require": "o", + "repeat": "n", + "type": "rangeall" + } + ] + }, + //sparklines三态图 + { + "n": "TRISTATESPLINES", + "t": "3", + "d": "生成嵌入在单元格内的三态图sparklines,一般用于描述三种态势的走势例如胜负平", + "a": "生成单元格离散图", + "m": [1, 6], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //barSpacing + { + "name": "柱条间隔", + "example": '1', + "detail": "柱条之间的间隔距离,默认为1", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //posBarColor + { + "name": "柱条颜色", + "example": '#fc5c5c', + "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#fc5c5c", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //negBarColor + { + "name": "负向柱条颜色", + "example": '#97b552', + "detail": "负向柱条颜色设置,代表负值的颜色,同柱条颜色配置,默认#97b552", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //zeroBarColor + { + "name": "零值柱条颜色", + "example": '#999', + "detail": "零值柱条颜色设置,代表0值颜色,同柱条颜色配置,默认#999", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //colorMap + { + "name": "色板", + "example": '#97b552', + "detail": "调色板可以单独设置每个柱条的颜色,可设置多个,支持两种格式:1颜色例如#000,代表第一个柱的颜色是黑色;2数值范围:颜色,例如-2:#000表示数值为-2的柱为黑色,0-5:#000表示数值0-5的柱为黑色,默认为空", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines饼图 + { + "n": "PIESPLINES", + "t": "3", + "d": "生成嵌入在单元格内的饼图sparklines,一般用于描述数据占比", + "a": "生成单元格饼图", + "m": [1, 5], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //offset + { + "name": "旋转角度", + "example": '0', + "detail": "饼图的旋转角度,默认为0", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //borderWidth + { + "name": "饼图边框", + "example": '0', + "detail": "饼图边框大小,默认为无0", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //borderColor + { + "name": "边框颜色", + "example": '#000', + "detail": "饼图边框颜色,默认为#000", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //sliceColors + { + "name": "饼图色板", + "example": '#97b552', + "detail": "调色板可以设置切片的颜色,可设置为A1:A10等范围,默认为#2ec7c9, #fc5c5c, #5ab1ef, #ffb980...", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines箱线图 + { + "n": "BOXSPLINES", + "t": "3", + "d": "生成嵌入在单元格内的箱线图sparklines,一般用于描述数据集的统计分布", + "a": "生成单元格箱线图", + "m": [1, 4], + "p": [ + //data + { + "name": "数据范围", + "example": 'A1:A20', + "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //outlierIQR,如果为0或false则showOutliers设为false,否则为true + { + "name": "离群点比例", + "example": '1.5', + "detail": "离群点的阈值范围,如果为0或false则不显示,默认为1.5倍", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //target + { + "name": "目标点值", + "example": '10', + "detail": "箱线图上的目标值设置,默认为false不显示", + "require": "o", + "repeat": "n", + "type": "rangeall" + }, + //spotRadius + { + "name": "数据点大小", + "example": '1.5', + "detail": "目标点和利群点的半径大小设置,默认为1.5", + "require": "o", + "repeat": "n", + "type": "rangeall" + } + ] + }, + //sparklines子弹图 + { + "n": "BULLETSPLINES", + "t": "3", + "d": "生成嵌入在单元格内的子弹图sparklines,一般用于描述任务达成率", + "a": "生成单元格子弹图", + "m": [2, 3], + "p": [ + //目标data1 + { + "name": "目标", + "example": '10', + "detail": "达成的目标值,数值才能被有效计算,例如A1, 100等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //目前达成data2 + { + "name": "实际完成", + "example": '8', + "detail": "目前完成值,数值才能被有效计算,例如A1, 100等。", + "require": "m", + "repeat": "n", + "type": "rangeall" + }, + //对比值datax + { + "name": "对比值", + "example": '12', + "detail": "对比值,例如超额、最低、获奖底线等,数值才能被有效计算,例如A1, 100等。可以设置最多9个对比值", + "require": "o", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //sparklines组合图,支持多个类型的图画在同一个单元格 + { + "n": "COMPOSESPLINES", + "t": "3", + "d": "支持多个类型的图画在同一个单元格,每个参数代表一个sparklines图", + "a": "组合sparklines图到一个单元格", + "m": [1, 1], + "p": [ + //data + { + "name": "图设置", + "example": 'PIESPLINES(A1:A20)', + "detail": "sparklines图设置,例如A1:A20, 一个完成的饼图、线图设置等。", + "require": "m", + "repeat": "y", + "type": "rangeall" + } + ] + }, + //动态数组公式 + { + 'n': 'SORT', + 't': '14', + 'd': '返回数组中元素的排序数组。返回的数组与提供的数组参数形状相同。', + 'a': '返回数组中元素的排序数组。返回的数组与提供的数组参数形状相同。', + 'm': [1, 4], + 'p': [{ + 'name': 'array', + 'detail': '要排序的范围或数组。', + 'example': 'A2:A17', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'sort_index', + 'detail': '[可选] - 表示要排序的行或列的数字。(默认row1/col1)', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'sort_order', + 'detail': '[可选] - 表示所需排序顺序的数字;1表示升序(默认),-1表示降序。', + 'example': '-1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'by_col', + 'detail': '[可选] - 表示所需排序方向的逻辑值;按行排序为FALSE()(默认),按列排序为TRUE()。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'FILTER', + 't': '14', + 'd': '基于一个布尔(真/假)数组过滤一个数组。', + 'a': '基于一个布尔(真/假)数组过滤一个数组。', + 'm': [2, 3], + 'p': [{ + 'name': 'array', + 'detail': '要筛选的数组或范围。', + 'example': 'A5:D20', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + },{ + 'name': 'include', + 'detail': '布尔数组,其高度或宽度与数组相同', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'range' + },{ + 'name': 'if_empty', + 'detail': '[可选] - 如果包含数组中的所有值都为空(filter不返回任何值),则返回的值。', + 'example': '""', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'UNIQUE', + 't': '14', + 'd': '返回列表或区域中的唯一值的列表。', + 'a': '返回列表或区域中的唯一值的列表。', + 'm': [1, 3], + 'p': [{ + 'name': 'array', + 'detail': '从其返回唯一值的数组或区域。', + 'example': 'A2:B26', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'by_col', + 'detail': '[可选] - 逻辑值,指示如何比较;按行 = FALSE() 或省略;按列 = TRUE()。', + 'example': 'TRUE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + },{ + 'name': 'occurs_once', + 'detail': '[可选] - 逻辑值,仅返回唯一值中出现一次 = TRUE();包括所有唯一值 = FALSE() 或省略。', + 'example': 'FALSE()', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangeall' + }] + }, { + 'n': 'RANDARRAY', + 't': '14', + 'd': '返回 0 到 1 之间的随机数字数组。', + 'a': '返回 0 到 1 之间的随机数字数组。', + 'm': [0, 2], + 'p': [{ + 'name': 'rows', + 'detail': '[可选] - 要返回的行数。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'cols', + 'detail': '[可选] - 要返回的列数。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, { + 'n': 'SEQUENCE', + 't': '14', + 'd': '生成数字序列的列表。', + 'a': '生成数字序列的列表。', + 'm': [1, 4], + 'p': [{ + 'name': 'rows', + 'detail': '要返回的行数。', + 'example': '1', + 'require': 'm', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'cols', + 'detail': '[可选] - 要返回的列数。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'start', + 'detail': '[可选] - 序列中的第一个数字。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + },{ + 'name': 'step', + 'detail': '[可选] - 序列中每个序列值的增量。', + 'example': '1', + 'require': 'o', + 'repeat': 'n', + 'type': 'rangenumber' + }] + }, +]; + +for(let i = 0; i < functionlist.length; i++){ + let func = functionlist[i]; + func.f = functionImplementation[func.n]; +} + +export default functionlist; \ No newline at end of file diff --git a/src/function/luckysheet_function.js b/src/function/luckysheet_function.js new file mode 100644 index 000000000..7fbb242c7 --- /dev/null +++ b/src/function/luckysheet_function.js @@ -0,0 +1,12 @@ +import functionlist from './functionlist'; + +const luckysheet_function = {}; + +for (let i = 0; i < functionlist.length; i++) { + let func = functionlist[i]; + luckysheet_function[func.n] = func; +} + +window.luckysheet_function = luckysheet_function; //挂载window 用于 eval() 计算公式 + +export default luckysheet_function; \ No newline at end of file diff --git a/src/function/matrix_methods.js b/src/function/matrix_methods.js new file mode 100644 index 000000000..35eadf9b8 --- /dev/null +++ b/src/function/matrix_methods.js @@ -0,0 +1,340 @@ +var matrix = ({}); + +var init = function init(matrix){ + var sylvester_matrix = function() {}; + + sylvester_matrix.precision = 1e-6; + + sylvester_matrix.create = function(elements) { + var M = new sylvester_matrix(); + return M.setElements(elements); + }; + var $M = sylvester_matrix.create; + + sylvester_matrix.I = function(n) { + var els = [], i = n, j; + while (i--) { j = n; + els[i] = []; + while (j--) { + els[i][j] = (i === j) ? 1 : 0; + } + } + return sylvester_matrix.create(els); + }; + + sylvester_matrix.prototype = { + e: function(i,j) { + if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; } + return this.elements[i-1][j-1]; + }, + dimensions: function() { + var cols = (this.elements.length === 0) ? 0 : this.elements[0].length; + return {rows: this.elements.length, cols: cols}; + }, + rows: function() { + return this.elements.length; + }, + cols: function() { + if (this.elements.length === 0) { return 0; } + return this.elements[0].length; + }, + eql: function(matrix) { + var M = matrix.elements || matrix; + if (!M[0] || typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } + if (this.elements.length === 0 || M.length === 0) { + return this.elements.length === M.length; + } + if (this.elements.length !== M.length) { return false; } + if (this.elements[0].length !== M[0].length) { return false; } + var i = this.elements.length, nj = this.elements[0].length, j; + while (i--) { j = nj; + while (j--) { + if (Math.abs(this.elements[i][j] - M[i][j]) > sylvester_matrix.precision) { return false; } + } + } + return true; + }, + dup: function() { + return sylvester_matrix.create(this.elements); + }, + map: function(fn, context) { + if (this.elements.length === 0) { + return sylvester_matrix.create([]); + } + var els = [], i = this.elements.length, nj = this.elements[0].length, j; + while (i--) { + j = nj; + els[i] = []; + while (j--) { + els[i][j] = fn.call(context, this.elements[i][j], i + 1, j + 1); + } + } + return sylvester_matrix.create(els); + }, + isSameSizeAs: function(matrix) { + var M = matrix.elements || matrix; + if (typeof(M[0][0]) === 'undefined') { + M = sylvester_matrix.create(M).elements; + } + if (this.elements.length === 0) { + return M.length === 0; + } + return (this.elements.length === M.length && this.elements[0].length === M[0].length); + }, + add: function(matrix) { + if (this.elements.length === 0) return this.map(function(x) { return x }); + var M = matrix.elements || matrix; + if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } + if (!this.isSameSizeAs(M)) { return null; } + return this.map(function(x, i, j) { return x + M[i-1][j-1]; }); + }, + subtract: function(matrix) { + if (this.elements.length === 0) return this.map(function(x) { return x }); + var M = matrix.elements || matrix; + if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } + if (!this.isSameSizeAs(M)) { return null; } + return this.map(function(x, i, j) { return x - M[i-1][j-1]; }); + }, + canMultiplyFromLeft: function(matrix) { + if (this.elements.length === 0) { return false; } + var M = matrix.elements || matrix; + if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } + // this.columns should equal matrix.rows + return (this.elements[0].length === M.length); + }, + multiply: function(matrix) { + if (this.elements.length === 0) { return null; } + if (!matrix.elements) { + return this.map(function(x) { return x * matrix; }); + } + var returnVector = matrix.modulus ? true : false; + var M = matrix.elements || matrix; + if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } + if (!this.canMultiplyFromLeft(M)) { return null; } + var i = this.elements.length, nj = M[0].length, j; + var cols = this.elements[0].length, c, elements = [], sum; + while (i--) { j = nj; + elements[i] = []; + while (j--) { c = cols; + sum = 0; + while (c--) { + sum += this.elements[i][c] * M[c][j]; + } + elements[i][j] = sum; + } + } + var M = sylvester_matrix.create(elements); + return returnVector ? M.col(1) : M; + }, + minor: function(a, b, c, d) { + if (this.elements.length === 0) { return null; } + var elements = [], ni = c, i, nj, j; + var rows = this.elements.length, cols = this.elements[0].length; + while (ni--) { i = c - ni - 1; + elements[i] = []; + nj = d; + while (nj--) { j = d - nj - 1; + elements[i][j] = this.elements[(a+i-1)%rows][(b+j-1)%cols]; + } + } + return sylvester_matrix.create(elements); + }, + transpose: function() { + if (this.elements.length === 0) return sylvester_matrix.create([]); + var rows = this.elements.length, i, cols = this.elements[0].length, j; + var elements = [], i = cols; + while (i--) { j = rows; + elements[i] = []; + while (j--) { + elements[i][j] = this.elements[j][i]; + } + } + return sylvester_matrix.create(elements); + }, + isSquare: function() { + var cols = (this.elements.length === 0) ? 0 : this.elements[0].length; + return (this.elements.length === cols); + }, + max: function() { + if (this.elements.length === 0) { return null; } + var m = 0, i = this.elements.length, nj = this.elements[0].length, j; + while (i--) { j = nj; + while (j--) { + if (Math.abs(this.elements[i][j]) > Math.abs(m)) { m = this.elements[i][j]; } + } + } + return m; + }, + indexOf: function(x) { + if (this.elements.length === 0) { return null; } + var index = null, ni = this.elements.length, i, nj = this.elements[0].length, j; + for (i = 0; i < ni; i++) { + for (j = 0; j < nj; j++) { + if (this.elements[i][j] === x) { return {i: i+1, j: j+1}; } + } + } + return null; + }, + diagonal: function() { + if (!this.isSquare) { return null; } + var els = [], n = this.elements.length; + for (var i = 0; i < n; i++) { + els.push(this.elements[i][i]); + } + return sylvester_matrix.create(els); + }, + toRightTriangular: function() { + if (this.elements.length === 0) return sylvester_matrix.create([]); + var M = this.dup(), els; + var n = this.elements.length, i, j, np = this.elements[0].length, p; + for (i = 0; i < n; i++) { + if (M.elements[i][i] === 0) { + for (j = i + 1; j < n; j++) { + if (M.elements[j][i] !== 0) { + els = []; + for (p = 0; p < np; p++) { + els.push(M.elements[i][p] + M.elements[j][p]); + } + M.elements[i] = els; + break; + } + } + } + if (M.elements[i][i] !== 0) { + for (j = i + 1; j < n; j++) { + var multiplier = M.elements[j][i] / M.elements[i][i]; + els = []; + for (p = 0; p < np; p++) { + // Elements with column numbers up to an including the number of the + // row that we're subtracting can safely be set straight to zero, + // since that's the point of this routine and it avoids having to + // loop over and correct rounding errors later + els.push(p <= i ? 0 : M.elements[j][p] - M.elements[i][p] * multiplier); + } + M.elements[j] = els; + } + } + } + return M; + }, + determinant: function() { + if (this.elements.length === 0) { return 1; } + if (!this.isSquare()) { return null; } + var M = this.toRightTriangular(); + var det = M.elements[0][0], n = M.elements.length; + for (var i = 1; i < n; i++) { + det = det * M.elements[i][i]; + } + return det; + }, + isSingular: function() { + return (this.isSquare() && this.determinant() === 0); + }, + trace: function() { + if (this.elements.length === 0) { return 0; } + if (!this.isSquare()) { return null; } + var tr = this.elements[0][0], n = this.elements.length; + for (var i = 1; i < n; i++) { + tr += this.elements[i][i]; + } + return tr; + }, + rank: function() { + if (this.elements.length === 0) { return 0; } + var M = this.toRightTriangular(), rank = 0; + var i = this.elements.length, nj = this.elements[0].length, j; + while (i--) { j = nj; + while (j--) { + if (Math.abs(M.elements[i][j]) > sylvester_matrix.precision) { rank++; break; } + } + } + return rank; + }, + augment: function(matrix) { + if (this.elements.length === 0) { return this.dup(); } + var M = matrix.elements || matrix; + if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } + var T = this.dup(), cols = T.elements[0].length; + var i = T.elements.length, nj = M[0].length, j; + if (i !== M.length) { return null; } + while (i--) { + j = nj; + while (j--) { + T.elements[i][cols + j] = M[i][j]; + } + } + return T; + }, + inverse: function() { + if (this.elements.length === 0) { return null; } + if (!this.isSquare() || this.isSingular()) { return null; } + var n = this.elements.length, i= n, j; + var M = this.augment(sylvester_matrix.I(n)).toRightTriangular(); + var np = M.elements[0].length, p, els, divisor; + var inverse_elements = [], new_element; + // Sylvester.Matrix is non-singular so there will be no zeros on the + // diagonal. Cycle through rows from last to first. + while (i--) { + // First, normalise diagonal elements to 1 + els = []; + inverse_elements[i] = []; + divisor = M.elements[i][i]; + for (p = 0; p < np; p++) { + new_element = M.elements[i][p] / divisor; + els.push(new_element); + // Shuffle off the current row of the right hand side into the results + // array as it will not be modified by later runs through this loop + if (p >= n) { inverse_elements[i].push(new_element); } + } + M.elements[i] = els; + // Then, subtract this row from those above it to give the identity matrix + // on the left hand side + j = i; + while (j--) { + els = []; + for (p = 0; p < np; p++) { + els.push(M.elements[j][p] - M.elements[i][p] * M.elements[j][i]); + } + M.elements[j] = els; + } + } + return sylvester_matrix.create(inverse_elements); + }, + round: function() { + return this.map(function(x) { return Math.round(x); }); + }, + snapTo: function(x) { + return this.map(function(p) { + return (Math.abs(p - x) <= sylvester_matrix.precision) ? x : p; + }); + }, + setElements: function(els) { + var i, j, elements = els.elements || els; + if (elements[0] && typeof(elements[0][0]) !== 'undefined') { + i = elements.length; + this.elements = []; + while (i--) { j = elements[i].length; + this.elements[i] = []; + while (j--) { + this.elements[i][j] = elements[i][j]; + } + } + return this; + } + var n = elements.length; + this.elements = []; + for (i = 0; i < n; i++) { + this.elements.push([elements[i]]); + } + return this; + } + }; + + matrix.sylvester_matrix = sylvester_matrix; +} +init(matrix); + +export function inverse(els){ + var M = matrix.sylvester_matrix.create(els); + return M.inverse().elements; +} \ No newline at end of file diff --git a/src/global/analysis.js b/src/global/analysis.js new file mode 100644 index 000000000..3a205169b --- /dev/null +++ b/src/global/analysis.js @@ -0,0 +1,38 @@ +import { numFormat } from '../utils/util'; + +const analysis = { + "STDEVP": function (mean, array1d) { + let cov = 0; + for (let i = 0; i < array1d.length; i++) { + let xi = array1d[i]; + cov += Math.pow(xi - mean, 2); + } + return numFormat(Math.sqrt(cov / array1d.length)); + }, + "STDEV": function (mean, array1d) { + let cov = 0; + for (let i = 0; i < array1d.length; i++) { + let xi = array1d[i]; + cov += Math.pow(xi - mean, 2); + } + return numFormat(Math.sqrt(cov / (array1d.length - 1))); + }, + "VARP": function (mean, array1d) { + let cov = 0; + for (let i = 0; i < array1d.length; i++) { + let xi = array1d[i]; + cov += Math.pow(xi - mean, 2); + } + return numFormat(cov / array1d.length); + }, + "let": function (mean, array1d) { + let cov = 0; + for (let i = 0; i < array1d.length; i++) { + let xi = array1d[i]; + cov += Math.pow(xi - mean, 2); + } + return numFormat(cov / (array1d.length - 1)); + }, +}; + +export default analysis; \ No newline at end of file diff --git a/src/global/array.js b/src/global/array.js new file mode 100644 index 000000000..730095820 --- /dev/null +++ b/src/global/array.js @@ -0,0 +1,67 @@ +import { getcellvalue } from './getdata'; + +const luckysheetArray = { + transpose: function (getdata) { + let arr = []; + if (getdata.length == 0) { + return []; + } + + if (getdata[0].length == 0) { + return []; + } + + for (let c = 0; c < getdata[0].length; c++) { + let a = []; + for (let r = 0; r < getdata.length; r++) { + let value = ""; + if (getdata[r] != null && getdata[r][c] != null) { + value = getcellvalue(r, c, getdata); + } + a.push(value); + } + arr.push(a); + } + + return arr; + }, + minusClear: function(p, m){ + if(m.row[0] > p.row[1] || m.row[1] < p.row[0] || m.column[0] > p.column[1] || m.column[1] < p.column[0]){ + return null; + } + + if(m.row[0] == p.row[0] && m.row[1] < p.row[1] && m.column[0] > p.column[0] && m.column[1] < p.column[1]){ + return []; + } + + let ret = [], range = {row:[], column:[]}; + + let row1 = null, column1 = [p.column[0], p.column[1]]; + if(m.row[1] > p.row[0] && m.row[1] < p.row[1]){ + row1 = [m.row[1] + 1, p.row[1]]; + } + else if(m.row[0] > p.row[0] && m.row[0] < p.row[1]){ + row1 = [p.row[0], m.row[0] - 1]; + } + + if(row1 != null){ + ret.push({"row": row1, "column": column1}); + } + + let row2 = [p.row[0], p.row[1]], column2 = null; + if(m.column[1] > p.column[0] && m.column[1] < p.column[1]){ + column2 = [m.column[1] + 1, p.column[1]]; + } + else if(m.column[0] > p.column[0] && m.column[0] < p.column[1]){ + column2 = [p.column[0], m.column[0] - 1]; + } + + if(column2 != null){ + ret.push({"row": row2, "column": column2}); + } + + return ret; + } +} + +export default luckysheetArray; \ No newline at end of file diff --git a/src/global/border.js b/src/global/border.js new file mode 100644 index 000000000..c9270d0bf --- /dev/null +++ b/src/global/border.js @@ -0,0 +1,1034 @@ +import { getSheetIndex } from '../methods/get'; +import { getObjType } from '../utils/util'; +import Store from '../store'; + +//获取表格边框数据计算值 +function getBorderInfoCompute(sheetIndex) { + let borderInfoCompute = {}; + + let cfg, data; + if(sheetIndex == null){ + cfg = Store.config; + data = Store.flowdata; + } + else{ + cfg = Store.luckysheetfile[getSheetIndex(sheetIndex)].config; + data = Store.luckysheetfile[getSheetIndex(sheetIndex)].data; + } + + let borderInfo = cfg["borderInfo"]; + + if(borderInfo != null && borderInfo.length > 0){ + for(let i = 0; i < borderInfo.length; i++){ + let rangeType = borderInfo[i].rangeType; + + if(rangeType == "range"){ + let borderType = borderInfo[i].borderType; + let borderColor = borderInfo[i].color; + let borderStyle = borderInfo[i].style; + + let borderRange = borderInfo[i].range; + + for(let j = 0; j < borderRange.length; j++){ + let bd_r1 = borderRange[j].row[0], bd_r2 = borderRange[j].row[1]; + let bd_c1 = borderRange[j].column[0], bd_c2 = borderRange[j].column[1]; + + if(borderType == "border-left"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + if(borderInfoCompute[bd_r + "_" + bd_c1] == null){ + borderInfoCompute[bd_r + "_" + bd_c1] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c1].l = { "color": borderColor, "style": borderStyle }; + + let bd_c_left = bd_c1 - 1; + + if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ + let cell_left = data[bd_r][bd_c_left]; + + let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; + + if(mc.c + mc.cs - 1 == bd_c_left){ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; + } + } + } + } + else if(borderType == "border-right"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + if(borderInfoCompute[bd_r + "_" + bd_c2] == null){ + borderInfoCompute[bd_r + "_" + bd_c2] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c2].r = { "color": borderColor, "style": borderStyle }; + + let bd_c_right = bd_c2 + 1; + + if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ + let cell_right = data[bd_r][bd_c_right]; + + let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; + + if(mc.c == bd_c_right){ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; + } + } + } + } + else if(borderType == "border-top"){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r1] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(borderInfoCompute[bd_r1 + "_" + bd_c] == null){ + borderInfoCompute[bd_r1 + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r1 + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + + let bd_r_top = bd_r1 - 1; + + if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ + if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ + let cell_top = data[bd_r_top][bd_c]; + + let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; + + if(mc.r + mc.rs - 1 == bd_r_top){ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + } + } + else if(borderType == "border-bottom"){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r2] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(borderInfoCompute[bd_r2 + "_" + bd_c] == null){ + borderInfoCompute[bd_r2 + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r2 + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + + let bd_r_bottom = bd_r2 + 1; + + if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ + if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ + let cell_bottom = data[bd_r_bottom][bd_c]; + + let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; + + if(mc.r == bd_r_bottom){ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + } + } + else if(borderType == "border-all"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.r == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + + if(mc.r + mc.rs - 1 == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + + if(mc.c == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + } + + if(mc.c + mc.cs - 1 == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + + if(bd_r == bd_r1){ + let bd_r_top = bd_r1 - 1; + + if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ + if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ + let cell_top = data[bd_r_top][bd_c]; + + let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; + + if(mc.r + mc.rs - 1 == bd_r_top){ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + } + + if(bd_r == bd_r2){ + let bd_r_bottom = bd_r2 + 1; + + if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ + if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ + let cell_bottom = data[bd_r_bottom][bd_c]; + + let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; + + if(mc.r == bd_r_bottom){ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + } + + if(bd_c == bd_c1){ + let bd_c_left = bd_c1 - 1; + + if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ + let cell_left = data[bd_r][bd_c_left]; + + let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; + + if(mc.c + mc.cs - 1 == bd_c_left){ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; + } + } + } + + if(bd_c == bd_c2){ + let bd_c_right = bd_c2 + 1; + + if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ + let cell_right = data[bd_r][bd_c_right]; + + let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; + + if(mc.c == bd_c_right){ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; + } + } + } + } + } + } + else if(borderType == "border-outside"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(!(bd_r == bd_r1 || bd_r == bd_r2 || bd_c == bd_c1 || bd_c == bd_c2)){ + continue; + } + + if(bd_r == bd_r1){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + + let bd_r_top = bd_r1 - 1; + + if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ + if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ + let cell_top = data[bd_r_top][bd_c]; + + let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; + + if(mc.r + mc.rs - 1 == bd_r_top){ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + } + + if(bd_r == bd_r2){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + + let bd_r_bottom = bd_r2 + 1; + + if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ + if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ + let cell_bottom = data[bd_r_bottom][bd_c]; + + let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; + + if(mc.r == bd_r_bottom){ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + } + + if(bd_c == bd_c1){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + + let bd_c_left = bd_c1 - 1; + + if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ + let cell_left = data[bd_r][bd_c_left]; + + let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; + + if(mc.c + mc.cs - 1 == bd_c_left){ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; + } + } + } + + if(bd_c == bd_c2){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + + let bd_c_right = bd_c2 + 1; + + if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ + let cell_right = data[bd_r][bd_c_right]; + + let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; + + if(mc.c == bd_c_right){ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; + } + } + } + } + } + } + else if(borderType == "border-inside"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(bd_r == bd_r1 && bd_c == bd_c1){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_r == bd_r2 && bd_c == bd_c1){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_r == bd_r1 && bd_c == bd_c2){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_r == bd_r2 && bd_c == bd_c2){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_r == bd_r1){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.c == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + } + else if(mc.c + mc.cs - 1 == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_r == bd_r2){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.c == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + } + else if(mc.c + mc.cs - 1 == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_c == bd_c1){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.r == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + else if(mc.r + mc.rs - 1 == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_c == bd_c2){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.r == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + else if(mc.r + mc.rs - 1 == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.r == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + else if(mc.r + mc.rs - 1 == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + + if(mc.c == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + } + else if(mc.c + mc.cs - 1 == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + } + } + } + else if(borderType == "border-horizontal"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(bd_r == bd_r1){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_r == bd_r2){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.r == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + } + else if(mc.r + mc.rs - 1 == bd_r){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; + } + } + } + } + } + else if(borderType == "border-vertical"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(bd_c == bd_c1){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + else if(bd_c == bd_c2){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(mc.c == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + } + else if(mc.c + mc.cs - 1 == bd_c){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + else{ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; + } + } + } + } + } + else if(borderType == "border-none"){ + for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ + if(borderInfoCompute[bd_r + "_" + bd_c] != null){ + delete borderInfoCompute[bd_r + "_" + bd_c]; + } + + if(bd_r == bd_r1){ + let bd_r_top = bd_r1 - 1; + + if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ + delete borderInfoCompute[bd_r_top + "_" + bd_c].b; + } + } + + if(bd_r == bd_r2){ + let bd_r_bottom = bd_r2 + 1; + + if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ + delete borderInfoCompute[bd_r_bottom + "_" + bd_c].t; + } + } + + if(bd_c == bd_c1){ + let bd_c_left = bd_c1 - 1; + + if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ + delete borderInfoCompute[bd_r + "_" + bd_c_left].r; + } + } + + if(bd_c == bd_c2){ + let bd_c_right = bd_c2 + 1; + + if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ + delete borderInfoCompute[bd_r + "_" + bd_c_right].l; + } + } + } + } + } + } + } + else if(rangeType == "cell"){ + let value = borderInfo[i].value; + + let bd_r = value.row_index, bd_c = value.col_index; + + if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { + continue; + } + + if(value.l != null || value.r != null || value.t != null || value.b != null){ + if(borderInfoCompute[bd_r + "_" + bd_c] == null){ + borderInfoCompute[bd_r + "_" + bd_c] = {}; + } + + if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ + let cell = data[bd_r][bd_c]; + let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; + + if(value.l != null && bd_c == mc.c){ //左边框 + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style }; + + let bd_c_left = bd_c - 1; + + if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ + let cell_left = data[bd_r][bd_c_left]; + + let mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; + + if(mc_l.c + mc_l.cs - 1 == bd_c_left){ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].l = null; + } + + if(value.r != null && bd_c == mc.c + mc.cs - 1){ //右边框 + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style }; + + let bd_c_right = bd_c + 1; + + if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ + let cell_right = data[bd_r][bd_c_right]; + + let mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; + + if(mc_r.c == bd_c_right){ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].r = null; + } + + if(value.t != null && bd_r == mc.r){ //上边框 + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style }; + + let bd_r_top = bd_r - 1; + + if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ + if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ + let cell_top = data[bd_r_top][bd_c]; + + let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; + + if(mc_t.r + mc_t.rs - 1 == bd_r_top){ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; + } + } + else{ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].t = null; + } + + if(value.b != null && bd_r == mc.r + mc.rs - 1){ //下边框 + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style }; + + let bd_r_bottom = bd_r + 1; + + if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ + if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ + let cell_bottom = data[bd_r_bottom][bd_c]; + + let mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; + + if(mc_b.r == bd_r_bottom){ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; + } + } + else{ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].b = null; + } + } + else{ + if(value.l != null){ //左边框 + borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style }; + + let bd_c_left = bd_c - 1; + + if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ + let cell_left = data[bd_r][bd_c_left]; + + let mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; + + if(mc_l.c + mc_l.cs - 1 == bd_c_left){ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].l = null; + } + + if(value.r != null){ //右边框 + borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style }; + + let bd_c_right = bd_c + 1; + + if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ + if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ + let cell_right = data[bd_r][bd_c_right]; + + let mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; + + if(mc_r.c == bd_c_right){ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].r = null; + } + + if(value.t != null){ //上边框 + borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style }; + + let bd_r_top = bd_r - 1; + + if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ + if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ + let cell_top = data[bd_r_top][bd_c]; + + let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; + + if(mc_t.r + mc_t.rs - 1 == bd_r_top){ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; + } + } + else{ + borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].t = null; + } + + if(value.b != null){ //下边框 + borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style }; + + let bd_r_bottom = bd_r + 1; + + if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ + if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ + let cell_bottom = data[bd_r_bottom][bd_c]; + + let mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; + + if(mc_b.r == bd_r_bottom){ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; + } + } + else{ + borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; + } + } + } + else{ + borderInfoCompute[bd_r + "_" + bd_c].b = null; + } + } + } + else{ + delete borderInfoCompute[bd_r + "_" + bd_c]; + } + } + } + } + + return borderInfoCompute; +} + +export { + getBorderInfoCompute, +} \ No newline at end of file diff --git a/src/global/browser.js b/src/global/browser.js new file mode 100644 index 000000000..052edd26a --- /dev/null +++ b/src/global/browser.js @@ -0,0 +1,131 @@ +const browser = { + mobilecheck: function() { + var a = !1; + return function(b) { + (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(b) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0, 4))) && (a = !0); + }(navigator.userAgent || navigator.vendor || window.opera), document.body && document.body.clientWidth && document.body.clientHeight && document.body.clientWidth < 350 && document.body.clientHeight < 500 && (a = !0), a; + }, + iphoneCheck: function() { + var a = !1; + return /iPhone/i.test(navigator.userAgent) && (a = !0), !0; + }, + isWeixin:function() { + var a = navigator.userAgent.toLowerCase(); + return "micromessenger" == a.match(/MicroMessenger/i) ? !0 : !1; + }, + isAndroid:function() { + var a = navigator.userAgent, + b = (navigator.appVersion, a.indexOf("Android") > -1 || a.indexOf("Linux") > -1); + return b; + }, + tabletCheck:function() { + var a = /ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase()); + return a; + }, + BrowserType: function() { + var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 + var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 + var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 + var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; + var isEdge = userAgent.indexOf("Edge") > -1; //判断是否IE的Edge浏览器 + var isFF = userAgent.indexOf("Firefox") > -1; //判断是否Firefox浏览器 + var isSafari = userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1; //判断是否Safari浏览器 + var isChrome = userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1; //判断Chrome浏览器 + if (isIE) { + var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); + reIE.test(userAgent); + var fIEVersion = parseFloat(RegExp["$1"]); + if (fIEVersion == 7) { + return "IE7"; + } else if (fIEVersion == 8) { + return "IE8"; + } else if (fIEVersion == 9) { + return "IE9"; + } else if (fIEVersion == 10) { + return "IE10"; + // } else if (fIEVersion == 11) { + // return "IE11"; + } else { + return "0"; + } //IE版本过低 + } //isIE end + if (isFF) { + return "FF"; + } + if (isOpera) { + return "Opera"; + } + if (isSafari) { + return "Safari"; + } + if (isChrome) { + return "Chrome"; + } + if (isEdge) { + return "Edge"; + } + if (isIE11) { + return "IE11"; + } + }, //myBrowser() end + //判断是否是IE浏览器 + isIE: function() { + var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 + var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 + var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 + var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; + if (isIE || isIE11) { + return "1"; + } else { + return "-1"; + } + }, + //判断是否是IE浏览器,包括Edge浏览器 + IEVersion: function() { + var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 + var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 + var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 + var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; + var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器 + if (isIE) { + var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); + reIE.test(userAgent); + var fIEVersion = parseFloat(RegExp["$1"]); + if (fIEVersion == 7) { + return "IE7"; + } else if (fIEVersion == 8) { + return "IE8"; + } else if (fIEVersion == 9) { + return "IE9"; + } else if (fIEVersion == 10) { + return "IE10"; + // } else if (fIEVersion == 11) { + // return "IE11"; + } else { + return "0"; + } //IE版本过低 + } else if (isEdge) { + return "Edge"; + } else if (isIE11) { + return "IE11"; + } else { + return "-1"; //非IE + } + }, + luckysheetrefreshfixednum:null, + luckysheetrefreshfixed:function(){ + var _this = this; + if(_this.luckysheetrefreshfixednum==null){ + if(_this.BrowserType()=="FF"){ + _this.luckysheetrefreshfixednum = 5; + } + else{ + _this.luckysheetrefreshfixednum = 0; + } + } + + return _this.luckysheetrefreshfixednum; + } +}; + +export default browser; \ No newline at end of file diff --git a/src/global/cleargridelement.js b/src/global/cleargridelement.js new file mode 100644 index 000000000..f4cf66895 --- /dev/null +++ b/src/global/cleargridelement.js @@ -0,0 +1,34 @@ +import selection from '../controllers/selection'; +import menuButton from '../controllers/menuButton'; + +export default function cleargridelement(event) { + $("#luckysheet-cols-h-hover").hide(); + $("#luckysheet-rightclick-menu").hide(); + + $("#luckysheet-cell-selected-boxs .luckysheet-cell-selected").hide(); + $("#luckysheet-cols-h-selected .luckysheet-cols-h-selected").hide(); + $("#luckysheet-rows-h-selected .luckysheet-rows-h-selected").hide(); + + $("#luckysheet-cell-selected-focus").hide(); + $("#luckysheet-rows-h-hover").hide(); + $("#luckysheet-selection-copy .luckysheet-selection-copy").hide(); + $("#luckysheet-cols-menu-btn").hide(); + $("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(); + if (!event) { + selection.clearcopy(event); + } + //else{ + // selection.clearcopy(); + //} + + //选区下拉icon隐藏 + if($("#luckysheet-dropCell-icon").is(":visible")){ + if(event){ + $("#luckysheet-dropCell-icon").remove(); + } + } + //格式刷 + if(menuButton.luckysheetPaintModelOn && !event){ + menuButton.cancelPaintModel(); + } +} \ No newline at end of file diff --git a/src/global/count.js b/src/global/count.js new file mode 100644 index 000000000..adc75c249 --- /dev/null +++ b/src/global/count.js @@ -0,0 +1,72 @@ +import Store from '../store'; +import { getdatabyselectionNoCopy } from './getdata'; +import { isRealNull, isRealNum } from './validate'; +import { update } from './format'; + +//表格计数栏 +export function countfunc() { + if(Store.luckysheet_select_save.length == 0){ + return; + } + + let min = Infinity, //最小值 + max = -Infinity, //最大值 + sum = 0, //求和 + count = 0, //计数(非空单元格) + mean = 0; //平均值 + + for(let s = 0; s < Store.luckysheet_select_save.length; s++){ + let data = getdatabyselectionNoCopy(Store.luckysheet_select_save[s]); + + for (let r = 0; r < data.length; r++) { + for (let c = 0; c < data[0].length; c++) { + if(isRealNull(data[r][c])){ + continue; + } + + count++; + + if(data[r][c].ct != null && data[r][c].ct.t == "d"){ + continue; + } + + let value = data[r][c].v; + + if(!isRealNum(value)){ + continue; + } + + value = parseFloat(value); + + sum += value; + + if(value < min){ + min = value; + } + + if(value > max){ + max = value; + } + } + } + } + + let ret = ""; + ret += "计数:" + count + ""; + + //处理成亿万格式 + if (isFinite(max) || isFinite(min)) { + ret += "求和:" + update("w", sum) + ""; + ret += "平均值:" + update("w", Math.round(sum / count * 10000) / 10000) + ""; + } + + if (isFinite(max)) { + ret += "最大值:" + update("w", max) + ""; + } + + if (isFinite(min)) { + ret += "最小值:" + update("w", min) + ""; + } + + $("#luckysheet-sta-content").html(ret); +} diff --git a/src/global/createdom.js b/src/global/createdom.js new file mode 100644 index 000000000..646352f61 --- /dev/null +++ b/src/global/createdom.js @@ -0,0 +1,108 @@ +import { + gridHTML, + menuToolBar, + flow, + columnHeaderHTML, + maskHTML, + colsmenuHTML, + rightclickHTML, + inputHTML, + filtermenuHTML, + filtersubmenuHTML, + sheetconfigHTML, +} from '../controllers/constant'; +import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting'; +import luckysheetPostil from '../controllers/postil'; +import { datagridgrowth } from './getdata'; +import editor from './editor'; +import rhchInit from './rhchInit'; +import { replaceHtml } from '../utils/util'; +import Store from '../store'; + +export default function luckysheetcreatedom(colwidth, rowheight, data, menu, title) { + //最少30行 + if(rowheight < 30){ + rowheight = 30; + } + + //最少22列 + if(colwidth < 22){ + colwidth = 22; + } + + let gh = gridHTML; + gh = replaceHtml(gh, { "logotitle": title });//设置title + gh = replaceHtml(gh, { "menu": menuToolBar() });//设置需要显示的菜单 + + if (data.length == 0) { + Store.flowdata = datagridgrowth(data, rowheight, colwidth); + } + else if (data.length < rowheight && data[0].length < colwidth) { + Store.flowdata = datagridgrowth(data, rowheight - data.length, colwidth - data[0].length); + } + else if (data.length < rowheight) { + Store.flowdata = datagridgrowth(data, rowheight - data.length, 0); + } + else if (data[0].length < colwidth) { + Store.flowdata = datagridgrowth(data, 0, colwidth - data[0].length); + } + else { + Store.flowdata = data; + } + + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + + let flowHTML = flow; + if(Store.config == null){ + Store.config = {}; + } + + rhchInit(rowheight, colwidth); + + let addControll = '(在底部添加)'; + let backControll = ' '; + // let pageControll = ' 共'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页,每页'+ luckysheetConfigsetting.pageInfo.pageSize +'条 '; + let pageControll = ' 共'+ luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页 '; + let pageControll2 = ' 共'+ luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页'; + + let bottomControll = ""; + if(luckysheetConfigsetting.enableAddRow){ + bottomControll += addControll; + } + + if(luckysheetConfigsetting.enablePage){ + if(parseInt(luckysheetConfigsetting.pageInfo.totalPage) == 1){ + bottomControll += pageControll2; + } + else{ + bottomControll += pageControll; + } + } + + bottomControll += backControll; + + let flowstr = replaceHtml('
'+ bottomControll +'
', { "height": Store.rh_height, "width": Store.ch_width - 1 }); + + let colsheader = replaceHtml(columnHeaderHTML, { "width": Store.ch_width, "index": 0, "column": "" }); + + flowHTML = replaceHtml(flowHTML, { "width": Store.ch_width, "flow": flowstr, "index": 0 }); + + gh = replaceHtml(gh, { "flow": flowHTML, "rowHeader": "
", "columnHeader": colsheader, "functionButton": luckysheetConfigsetting.functionButton });//设置需要显示的菜单 + + $("#" + Store.container).append(gh); + + $("#luckysheet-scrollbar-x div").width(Store.ch_width); + $("#luckysheet-scrollbar-y div").height(Store.rh_height - 30); + + //新建行菜单 + $("body").append(maskHTML); + $("body").append(colsmenuHTML); + $("body").append(rightclickHTML()); + $("body").append(inputHTML); + $("body").append(replaceHtml(filtermenuHTML(), { "menuid": "filter" })); + $("body").append(replaceHtml(filtersubmenuHTML(), { "menuid": "filter" })); + $("body").append(sheetconfigHTML()); + + //批注 + luckysheetPostil.buildAllPs(Store.flowdata); +} \ No newline at end of file diff --git a/src/global/createsheet.js b/src/global/createsheet.js new file mode 100644 index 000000000..2894bb21f --- /dev/null +++ b/src/global/createsheet.js @@ -0,0 +1,56 @@ +import { datagridgrowth } from './getdata'; +import editor from './editor'; +import rhchInit from './rhchInit'; +import formula from './formula'; +import { luckysheetrefreshgrid } from './refresh'; +import sheetmanage from '../controllers/sheetmanage'; +import Store from '../store'; + +export default function luckysheetcreatesheet(colwidth, rowheight, data, cfg, active) { + if(active == null){ + active = true; + } + + Store.visibledatarow = []; + Store.visibledatacolumn = []; + Store.ch_width = 0; + Store.rh_height = 0; + + if(cfg != null){ + Store.config = cfg; + } + else{ + Store.config = {}; + } + + if (data.length == 0) { + Store.flowdata = datagridgrowth(data, rowheight, colwidth); + } + else if (data.length < rowheight && data[0].length < colwidth) { + Store.flowdata = datagridgrowth(data, rowheight - data.length, colwidth - data[0].length); + } + else if (data.length < rowheight) { + Store.flowdata = datagridgrowth(data, rowheight - data.length, 0); + } + else if (data[0].length < colwidth) { + Store.flowdata = datagridgrowth(data, 0, colwidth - data[0].length); + } + else { + Store.flowdata = data; + } + + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + + rhchInit(rowheight, colwidth); + + if(active){ + sheetmanage.showSheet(); + + setTimeout(function () { + sheetmanage.restoreCache(); + formula.execFunctionGroup(); + sheetmanage.restoreSheetAll(Store.currentSheetIndex); + luckysheetrefreshgrid(); + }, 1); + } +} diff --git a/src/global/cursorPos.js b/src/global/cursorPos.js new file mode 100644 index 000000000..12eb63e66 --- /dev/null +++ b/src/global/cursorPos.js @@ -0,0 +1,51 @@ +function luckysheetRangeLast(obj) { + let range; + + if(document.createRange){ //chrome, firefox, opera, safari, ie9+ + if(obj.innerHTML != obj.innerText || obj.innerHTML == ""){ + obj.focus(); //解决ff不获取焦点无法定位问题 + range = window.getSelection();//创建range + range.selectAllChildren(obj);//range 选择obj下所有子内容 + range.collapseToEnd();//光标移至最后 + } + else{ + let len = obj.innerText.length; + + range = document.createRange(); + range.selectNodeContents(obj); + range.setStart(obj.childNodes[0], len); + range.collapse(true); + + let selection = window.getSelection(); + selection.removeAllRanges(); + selection.addRange(range); + } + } + else if(document.selection){ //ie8 and lower + range = document.body.createTextRange(); + range.moveToElementText(obj); + range.collapse(false); + range.select(); + } +} + +function getCursortPosition(textDom){ + let cursorPos = 0; + + if(document.selection){ + textDom.focus(); + let selectRange = document.selection.createRange(); + selectRange.moveStart("character", -textDom.value.length); + cursorPos = selectRange.text.length; + } + else if(textDom.selectionStart || textDom.selectionStart == "0"){ + cursorPos = textDom.selectionStart; + } + + return cursorPos; +} + +export { + luckysheetRangeLast, + getCursortPosition, +} \ No newline at end of file diff --git a/src/global/datecontroll.js b/src/global/datecontroll.js new file mode 100644 index 000000000..999d1a80d --- /dev/null +++ b/src/global/datecontroll.js @@ -0,0 +1,87 @@ +import { hasChinaword } from './validate'; + +function isdatetime(s) { + if (s == null || s.toString().length < 5) { + return false; + } + else if(checkDateTime(s)){ + return true; + } + else { + return false; + } + + function checkDateTime(str){ + var reg1 = /^(\d{4})-(\d{1,2})-(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/; + var reg2 = /^(\d{4})\/(\d{1,2})\/(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/; + + if(!reg1.test(str) && !reg2.test(str)){ + return false; + } + + var year = RegExp.$1, + month = RegExp.$2, + day = RegExp.$3; + + if(year < 1900){ + return false; + } + + if(month > 12){ + return false; + } + + if(day > 31){ + return false; + } + + if(month == 2){ + if(new Date(year, 1, 29).getDate() == 29 && day > 29){ + return false; + } + else if(new Date(year, 1, 29).getDate() != 29 && day > 28){ + return false; + } + } + + return true; + } +} + +function diff(now, then) { + return moment(now).diff(moment(then)); +} + +function isdatatypemulti(s) { + let type = {}; + + if (isdatetime(s)) { + type["date"] = true; + } + + if (!isNaN(parseFloat(s)) && !hasChinaword(s)) { + type["num"] = true; + } + + return type; +} + +function isdatatype(s) { + let type = "string"; + + if (isdatetime(s)) { + type = "date"; + } + else if (!isNaN(parseFloat(s)) && !hasChinaword(s)) { + type = "num"; + } + + return type; +} + +export { + isdatetime, + diff, + isdatatypemulti, + isdatatype, +} \ No newline at end of file diff --git a/src/global/draw.js b/src/global/draw.js new file mode 100644 index 000000000..fa044c085 --- /dev/null +++ b/src/global/draw.js @@ -0,0 +1,2451 @@ +import sheetmanage from '../controllers/sheetmanage'; +import pivotTable from '../controllers/pivotTable'; +import conditionformat from '../controllers/conditionformat'; +import alternateformat from '../controllers/alternateformat'; +import luckysheetSparkline from '../controllers/sparkline'; +import menuButton from '../controllers/menuButton'; +import { luckysheetdefaultstyle, luckysheet_CFiconsImg } from '../controllers/constant'; +import { luckysheet_searcharray } from '../controllers/sheetSearch'; +import { dynamicArrayCompute } from './dynamicArray'; +import browser from './browser'; +import { isRealNull } from './validate'; +import { getCellTextSplitArr } from './getRowlen'; +import { getcellvalue } from './getdata'; +import { getBorderInfoCompute } from './border'; +import { getObjType, chatatABC, luckysheetfontformat } from '../utils/util'; +import Store from '../store'; + +function luckysheetDrawgrid(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop) { + if($("#luckysheetTableContent").length == 0){ + return; + } + + if(Store.luckysheetfile[sheetmanage.getSheetIndex(Store.currentSheetIndex)]["isPivotTable"]){ + luckysheetDrawMain_back(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop); + } + else{ + luckysheetDrawMain(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop); + } + + $("#luckysheetTableContent").get(0).getContext("2d").clearRect(0, 0, 46, 20); + + luckysheetDrawgridColumnTitle(scrollWidth, drawWidth, offsetLeft); + luckysheetDrawgridRowTitle(scrollHeight, drawHeight, offsetTop); +} + +function luckysheetDrawgridRowTitle(scrollHeight, drawHeight, offsetTop) { + if (scrollHeight == null) { + scrollHeight = $("#luckysheet-cell-main").scrollTop(); + } + + if (drawHeight == null) { + drawHeight = Store.luckysheetTableContentHW[1]; + } + + if (offsetTop == null) { + offsetTop = Store.columeHeaderHeight; + } + + let luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); + luckysheetTableContent.clearRect( + 0, + offsetTop * Store.devicePixelRatio, + (Store.rowHeaderWidth - 1) * Store.devicePixelRatio, + drawHeight * Store.devicePixelRatio + ); + + luckysheetTableContent.font = luckysheetdefaultstyle.font; + luckysheetTableContent.textBaseline = luckysheetdefaultstyle.textBaseline; //基准线 垂直居中 + luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; + + let dataset_row_st, dataset_row_ed; + dataset_row_st = luckysheet_searcharray(Store.visibledatarow, scrollHeight); + dataset_row_ed = luckysheet_searcharray(Store.visibledatarow, scrollHeight + drawHeight); + + if (dataset_row_st == -1) { + dataset_row_st = 0; + } + if (dataset_row_ed == -1) { + dataset_row_ed = Store.visibledatarow.length - 1; + } + + let end_r, start_r; + + for (let r = dataset_row_st; r <= dataset_row_ed; r++) { + if (r == 0) { + start_r = -scrollHeight - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - scrollHeight - 1; + } + end_r = Store.visibledatarow[r] - scrollHeight; + + //若超出绘制区域终止 + if(end_r > scrollHeight + drawHeight){ + break; + } + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + + } + else { + //行标题栏序列号 + let textMetrics = luckysheetTableContent.measureText(r + 1); + + let horizonAlignPos = (Store.rowHeaderWidth * Store.devicePixelRatio - textMetrics.width) / 2; + let verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop) * Store.devicePixelRatio; + + luckysheetTableContent.fillText(r + 1, horizonAlignPos, verticalAlignPos); + } + + //行标题栏横线 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + -1, + (end_r + offsetTop - 2 + 0.5) * Store.devicePixelRatio + ); + luckysheetTableContent.lineTo( + (Store.rowHeaderWidth - 1) * Store.devicePixelRatio, + (end_r + offsetTop - 2 + 0.5) * Store.devicePixelRatio + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + //行标题栏竖线 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + (Store.rowHeaderWidth - 2 + 0.5) * Store.devicePixelRatio, + (offsetTop - 1) * Store.devicePixelRatio + ); + luckysheetTableContent.lineTo( + (Store.rowHeaderWidth - 2 + 0.5) * Store.devicePixelRatio, + (Store.rh_height + offsetTop) * Store.devicePixelRatio + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + + + //清除canvas左上角区域 防止列标题栏序列号溢出显示 + luckysheetTableContent.clearRect(0, 0, Store.rowHeaderWidth * Store.devicePixelRatio, Store.columeHeaderHeight * Store.devicePixelRatio); +} + +function luckysheetDrawgridColumnTitle(scrollWidth, drawWidth, offsetLeft) { + if (scrollWidth == null) { + scrollWidth = $("#luckysheet-cell-main").scrollLeft(); + } + + if (drawWidth == null) { + drawWidth = Store.luckysheetTableContentHW[0]; + } + + if (offsetLeft == null) { + offsetLeft = Store.rowHeaderWidth; + } + + let luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); + luckysheetTableContent.clearRect( + offsetLeft * Store.devicePixelRatio, + -0.5, + drawWidth * Store.devicePixelRatio, + (Store.columeHeaderHeight - 1.5) * Store.devicePixelRatio + ); + + + luckysheetTableContent.font = luckysheetdefaultstyle.font; + luckysheetTableContent.textBaseline = luckysheetdefaultstyle.textBaseline; //基准线 垂直居中 + luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; + + let dataset_col_st, dataset_col_ed; + dataset_col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollWidth); + dataset_col_ed = luckysheet_searcharray(Store.visibledatacolumn, scrollWidth + drawWidth); + + if (dataset_col_st == -1) { + dataset_col_st = 0; + } + if (dataset_col_ed == -1) { + dataset_col_ed = Store.visibledatacolumn.length - 1; + } + + let end_c, start_c; + + for (let c = dataset_col_st; c <= dataset_col_ed; c++) { + if (c == 0) { + start_c = -scrollWidth; + } + else { + start_c = Store.visibledatacolumn[c - 1] - scrollWidth; + } + end_c = Store.visibledatacolumn[c] - scrollWidth; + + //若超出绘制区域终止 + if(end_c > scrollWidth + drawWidth){ + break; + } + + //列标题栏序列号 + let abc = chatatABC(c); + let textMetrics = luckysheetTableContent.measureText(abc); + + let horizonAlignPos = Math.round((start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - textMetrics.width / 2); + let verticalAlignPos = Math.round(Store.columeHeaderHeight / 2 * Store.devicePixelRatio); + + luckysheetTableContent.fillText(abc, horizonAlignPos, verticalAlignPos); + + //列标题栏竖线 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + (end_c + offsetLeft - 2 + 0.5) * Store.devicePixelRatio, + 0.5 + ); + luckysheetTableContent.lineTo( + (end_c + offsetLeft - 2 + 0.5) * Store.devicePixelRatio, + (Store.columeHeaderHeight - 2) * Store.devicePixelRatio + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + //列标题栏横线 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + (offsetLeft - 1) * Store.devicePixelRatio, + (Store.columeHeaderHeight - 2 + 0.5) * Store.devicePixelRatio + ); + luckysheetTableContent.lineTo( + (Store.ch_width + offsetLeft - 2) * Store.devicePixelRatio, + (Store.columeHeaderHeight - 2 + 0.5) * Store.devicePixelRatio + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + + //清除canvas左上角区域 防止列标题栏序列号溢出显示 + luckysheetTableContent.clearRect(0, 0, Store.rowHeaderWidth * Store.devicePixelRatio, Store.columeHeaderHeight * Store.devicePixelRatio); +} + +function luckysheetDrawMain(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop, columnOffsetCell, rowOffsetCell, mycanvas, ctx, ctxdata) { + if(ctxdata != null){ + Store.flowdata = ctxdata; + } + + if(Store.flowdata == null){ + return; + } + + if (scrollWidth == null) { + scrollWidth = $("#luckysheet-cell-main").scrollLeft(); + } + if (scrollHeight == null) { + scrollHeight = $("#luckysheet-cell-main").scrollTop(); + } + + if (drawWidth == null) { + drawWidth = Store.luckysheetTableContentHW[0]; + } + if (drawHeight == null) { + drawHeight = Store.luckysheetTableContentHW[1]; + } + + if (offsetLeft == null) { + offsetLeft = Store.rowHeaderWidth; + } + if (offsetTop == null) { + offsetTop = Store.columeHeaderHeight; + } + + if (columnOffsetCell == null) { + columnOffsetCell = 0; + } + if (rowOffsetCell == null) { + rowOffsetCell = 0; + } + + let luckysheetTableContent = null; + if(ctx != null){ + let luckysheetTableElement = document.createElement('canvas'); + luckysheetTableElement.width = drawWidth; + luckysheetTableElement.height = drawHeight; + luckysheetTableContent = luckysheetTableElement.getContext("2d"); + } + else{ + if(mycanvas == null){ + luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); + } + else { + if(getObjType(mycanvas) == "object"){ + try{ + luckysheetTableContent = mycanvas.get(0).getContext("2d"); + } + catch(err){ + luckysheetTableContent = mycanvas; + } + } + else{ + luckysheetTableContent = $("#" + mycanvas).get(0).getContext("2d"); + } + } + } + + luckysheetTableContent.clearRect( + 0, + 0, + Store.luckysheetTableContentHW[0] * Store.devicePixelRatio, + Store.luckysheetTableContentHW[1] * Store.devicePixelRatio + ); + + //离屏canvas + let offlinecanvas = null; + if(ctx != null){ + let offlineElement = document.createElement('canvas'); + offlineElement.width = drawWidth; + offlineElement.height = drawHeight; + offlinecanvas = offlineElement.getContext("2d"); + } + else{ + offlinecanvas = $("#luckysheetTableContentF").get(0).getContext("2d"); + } + offlinecanvas.fillStyle = "#ffffff"; + offlinecanvas.fillRect( + 0, + 0, + Store.luckysheetTableContentHW[0] * Store.devicePixelRatio, + Store.luckysheetTableContentHW[1] * Store.devicePixelRatio + ); + offlinecanvas.font = luckysheetdefaultstyle.font; + offlinecanvas.textBaseline = "top"; + offlinecanvas.fillStyle = luckysheetdefaultstyle.fillStyle; + + // + let dataset_row_st, dataset_row_ed, dataset_col_st, dataset_col_ed; + + dataset_row_st = luckysheet_searcharray(Store.visibledatarow, scrollHeight); + dataset_row_ed = luckysheet_searcharray(Store.visibledatarow, scrollHeight + drawHeight); + + if (dataset_row_st == -1) { + dataset_row_st = 0; + } + + dataset_row_st += rowOffsetCell; + + if (dataset_row_ed == -1) { + dataset_row_ed = Store.visibledatarow.length - 1; + } + + dataset_row_ed += rowOffsetCell; + + if (dataset_row_ed >= Store.visibledatarow.length) { + dataset_row_ed = Store.visibledatarow.length - 1; + } + + dataset_col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollWidth); + dataset_col_ed = luckysheet_searcharray(Store.visibledatacolumn, scrollWidth + drawWidth); + + if (dataset_col_st == -1) { + dataset_col_st = 0; + } + + dataset_col_st += columnOffsetCell; + + if (dataset_col_ed == -1) { + dataset_col_ed = Store.visibledatacolumn.length - 1; + } + + dataset_col_ed += columnOffsetCell; + + if (dataset_col_ed >= Store.visibledatacolumn.length) { + dataset_col_ed = Store.visibledatacolumn.length - 1; + } + + + let fill_row_st, fill_row_ed, fill_col_st, fill_col_ed; + if(dataset_row_st == 0){ + fill_row_st = 0; + } + else{ + fill_row_st = Store.visibledatarow[dataset_row_st - 1]; + } + + fill_row_ed = Store.visibledatarow[dataset_row_ed]; + + if(dataset_col_st == 0){ + fill_col_st = 0; + } + else{ + fill_col_st = Store.visibledatacolumn[dataset_col_st - 1]; + } + + fill_col_ed = Store.visibledatacolumn[dataset_col_ed]; + + luckysheetTableContent.fillStyle = "#ffffff"; + luckysheetTableContent.fillRect( + (offsetLeft - 1) * Store.devicePixelRatio, + (offsetTop - 1) * Store.devicePixelRatio, + (fill_col_ed - scrollWidth) * Store.devicePixelRatio, + (fill_row_ed - scrollHeight) * Store.devicePixelRatio + ); + luckysheetTableContent.font = luckysheetdefaultstyle.font; + luckysheetTableContent.textBaseline = "top"; + luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; + + let end_r, start_r, end_c, start_c; + + let cellupdate = []; + let mergeCache = {}; + + let borderOffset = {}; + + for (let r = dataset_row_st; r <= dataset_row_ed; r++) { + if (r == 0) { + start_r = -scrollHeight - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - scrollHeight - 1; + } + + end_r = Store.visibledatarow[r] - scrollHeight; + + for (let c = dataset_col_st; c <= dataset_col_ed; c++) { + if (c == 0) { + start_c = -scrollWidth; + } + else { + start_c = Store.visibledatacolumn[c - 1] - scrollWidth; + } + + end_c = Store.visibledatacolumn[c] - scrollWidth; + + //横线 + if(c == dataset_col_ed && !Store.luckysheetcurrentisPivotTable){ + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (offsetLeft - 1), + Store.devicePixelRatio * (end_r + offsetTop - 2 + 0.5) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (fill_col_ed - scrollWidth + offsetLeft - 2), + Store.devicePixelRatio * (end_r + offsetTop - 2 + 0.5) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + //竖线 + if(r == dataset_row_st && !Store.luckysheetcurrentisPivotTable){ + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (end_c + offsetLeft - 2 + 0.5), + Store.devicePixelRatio * (offsetTop - 1) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c + offsetLeft - 2 + 0.5), + Store.devicePixelRatio * (fill_row_ed - scrollHeight + offsetTop - 2) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + //数据透视表 + if (!!Store.luckysheetcurrentisPivotTable && pivotTable.drawPivotTable) { + if ((c == 0 || c == 5) && r <= 11) { + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (start_r + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + if ((r == 2 || r == 11) && c <= 5) { + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (start_c - 1 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c - 2 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + if (r == 6 && c == 3) { + luckysheetTableContent.fillText( + "数据透视表", + Store.devicePixelRatio * (start_c + 4 + offsetLeft), + Store.devicePixelRatio *(start_r + (end_r - start_r) / 2 - 1 + offsetTop) + ); + } + } + else if (!!Store.luckysheetcurrentisPivotTable) { + if (c < pivotTable.pivotTableBoundary[1] && r < pivotTable.pivotTableBoundary[0]) { + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio*(start_r + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio*(end_r - 2 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio*(start_c - 1 + offsetLeft), + Store.devicePixelRatio*(end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio*(end_c - 2 + offsetLeft), + Store.devicePixelRatio*(end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + } + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + + } + else { + let firstcolumlen = Store.defaultcollen; + if (Store.config["columlen"] != null && Store.config["columlen"][c] != null) { + firstcolumlen = Store.config["columlen"][c]; + } + + if (Store.flowdata[r] != null && Store.flowdata[r][c] != null) { + let value = Store.flowdata[r][c]; + + if(getObjType(value) == "object" && ("mc" in value)){ + borderOffset[r + "_" + c] = { + "start_r": start_r, + "start_c": start_c, + "end_r": end_r, + "end_c": end_c + }; + + if("rs" in value["mc"]){ + let key = "r"+ r + "c" + c; + mergeCache[key] = cellupdate.length; + } + else{ + let key = "r"+ value["mc"].r + "c" + value["mc"].c; + let margeMain = cellupdate[mergeCache[key]]; + + if(margeMain == null){ + mergeCache[key] = cellupdate.length; + cellupdate.push({ + "r": r, + "c": c, + "start_c": start_c, + "start_r": start_r, + "end_r": end_r, + "end_c": end_c, + "firstcolumlen": firstcolumlen, + startlist: [] + }); + } + else{ + if(margeMain.c == c){ + margeMain.end_r += (end_r - start_r - 1); + margeMain.startlist.push(start_r); + } + + if(margeMain.r == r){ + margeMain.end_c += (end_c - start_c); + margeMain.firstcolumlen += firstcolumlen; + } + } + + continue; + } + } + } + + cellupdate.push({ + "r": r, + "c": c, + "start_r": start_r, + "start_c": start_c, + "end_r": end_r, + "end_c": end_c, + "firstcolumlen": firstcolumlen, + startlist: [] + }); + borderOffset[r + "_" + c] = { + "start_r": start_r, + "start_c": start_c, + "end_r": end_r, + "end_c": end_c + }; + } + } + } + + //动态数组公式计算 + let dynamicArray_compute = dynamicArrayCompute(Store.luckysheetfile[sheetmanage.getSheetIndex(Store.currentSheetIndex)]["dynamicArray"]); + + //交替颜色计算 + let af_compute = alternateformat.getComputeMap(); + + //条件格式计算 + let cf_compute = conditionformat.getComputeMap(); + + //sparklines渲染 + let sparklinesRender = function(r, c, offsetX, offsetY, canvasid, ctx){ + if(Store.flowdata[r] == null || Store.flowdata[r][c] == null){ + return; + } + + let sparklines = Store.flowdata[r][c].spl; + if(sparklines != null){ + if(typeof sparklines == "string"){ + sparklines = eval('('+ sparklines +')'); + } + + if(getObjType(sparklines) == "object"){ + let temp1 = sparklines; + let x = temp1.offsetX; + let y = temp1.offsetY; + x = x == null ? 0 : x; + y = y == null ? 0 : y; + luckysheetSparkline.render( + temp1.shapeseq, + temp1.shapes, + offsetX + x, + offsetY + y, + temp1.pixelWidth, + temp1.pixelHeight, + canvasid, + ctx + ); + } + else if(getObjType(sparklines) == "array" && getObjType(sparklines[0]) == "object"){ + for(let i = 0; i < sparklines.length; i++){ + let temp1 = sparklines[i]; + let x = temp1.offsetX; + let y = temp1.offsetY; + x = x == null ? 0 : x; + y = y == null ? 0 : y; + luckysheetSparkline.render( + temp1.shapeseq, + temp1.shapes, + offsetX + x, + offsetY + y, + temp1.pixelWidth, + temp1.pixelHeight, + canvasid, + ctx + ); + } + } + } + } + + //空白单元格渲染 + let nullCellRender = function(r, c, start_r, start_c, end_r, end_c){ + let checksAF = alternateformat.checksAF(r, c, af_compute); //交替颜色 + let checksCF = conditionformat.checksCF(r, c, cf_compute); //条件格式 + + let borderfix = menuButton.borderfix(Store.flowdata, r, c); + + //背景色 + luckysheetTableContent.fillStyle = menuButton.checkstatus(Store.flowdata, r, c , "bg"); + + if(checksAF != null && checksAF[1] != null){//交替颜色 + luckysheetTableContent.fillStyle = checksAF[1]; + } + + if(checksCF != null && checksCF["cellColor"] != null){//条件格式 + luckysheetTableContent.fillStyle = checksCF["cellColor"]; + } + + if(Store.flowdata[r][c] != null && Store.flowdata[r][c].tc != null){//标题色 + luckysheetTableContent.fillStyle = Store.flowdata[r][c].tc; + } + + let cellsize = [ + Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0]), + Store.devicePixelRatio * (start_r + offsetTop + 1 + borderfix[1]), + Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), + Store.devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) + ]; + luckysheetTableContent.fillRect(cellsize[0], cellsize[1], cellsize[2], cellsize[3]); + + if((r + "_" + c) in dynamicArray_compute){ + let value = dynamicArray_compute[r + "_" + c].v; + + luckysheetTableContent.fillStyle = "#000000"; + //文本宽度和高度 + let fontset = luckysheetdefaultstyle.font; + luckysheetTableContent.font = fontset; + + let textMetrics = luckysheetTableContent.measureText(value).width; + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + + //水平对齐 (默认为1,左对齐) + let horizonAlignPos = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + + //垂直对齐 (默认为2,下对齐) + let verticalFixed = browser.luckysheetrefreshfixed(); + let verticalAlignPos = (end_r + offsetTop - 2) * Store.devicePixelRatio; + luckysheetTableContent.textBaseline = 'bottom'; + + luckysheetTableContent.fillText(value == null ? "" : value, horizonAlignPos, verticalAlignPos); + } + + //若单元格有批注 + if(Store.flowdata[r][c] != null && Store.flowdata[r][c].ps != null){ + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo(Store.devicePixelRatio * (end_c + offsetLeft - 6), Store.devicePixelRatio * (start_r + offsetTop)); + luckysheetTableContent.lineTo(Store.devicePixelRatio * (end_c + offsetLeft - 1), Store.devicePixelRatio * (start_r + offsetTop)); + luckysheetTableContent.lineTo(Store.devicePixelRatio * (end_c + offsetLeft - 1), Store.devicePixelRatio * (start_r + offsetTop + 5)); + luckysheetTableContent.fillStyle = "#FC6666"; + luckysheetTableContent.fill(); + luckysheetTableContent.closePath(); + } + + //右边框 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo(Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), Store.devicePixelRatio * (start_r + offsetTop)); + luckysheetTableContent.lineTo(Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), Store.devicePixelRatio * (end_r - 2 + offsetTop)); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + + if (!!Store.luckysheetcurrentisPivotTable && !pivotTable.drawPivotTable) { + luckysheetTableContent.strokeStyle = "#000000"; + } + else{ + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + } + + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + + //下边框 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo(Store.devicePixelRatio * (start_c - 2 + offsetLeft), Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); + luckysheetTableContent.lineTo(Store.devicePixelRatio * (end_c + offsetLeft - 2), Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + + if (!!Store.luckysheetcurrentisPivotTable && !pivotTable.drawPivotTable) { + luckysheetTableContent.strokeStyle = "#000000"; + } + else{ + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + } + + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + } + + //非空白单元格渲染 + let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, canvasType){ + let checksAF = alternateformat.checksAF(r, c, af_compute); //交替颜色 + let checksCF = conditionformat.checksCF(r, c, cf_compute); //条件格式 + + let borderfix = menuButton.borderfix(Store.flowdata, r, c); + + //文本宽度和高度 + let fontset = luckysheetfontformat(Store.flowdata[r][c]); + luckysheetTableContent.font = fontset; + + let textMetrics = luckysheetTableContent.measureText(value).width; + // let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + let oneLineTextHeight = menuButton.getTextSize(value, fontset)[1]; + + let textW, textH; + + if(Store.flowdata[r][c].tb == "2"){ + let strValue = value.toString(); + let tbWidth = luckysheetTableContent.measureText(strValue).width; + let cellWidth = end_c - start_c - 8; + + if(tbWidth > cellWidth){ + let strArr = [];//文本截断数组 + strArr = getCellTextSplitArr(strValue, strArr, cellWidth, luckysheetTableContent); + textH = strArr.length * oneLineTextHeight; + } + else{ + textH = oneLineTextHeight; + } + } + else if(Store.flowdata[r][c].tr != null && Store.flowdata[r][c].tr != "0"){ + let tr = Store.flowdata[r][c].tr; + + if(tr == "1" || tr == "2"){ + textW = 0.707 * (textMetrics + oneLineTextHeight); + textH = 0.707 * (textMetrics + oneLineTextHeight); + } + else if(tr == "3"){ + value = value.toString(); + + let vArr; + if(value.length > 1){ + vArr = value.split(""); + } + else{ + vArr = []; + vArr.push(value); + } + + textW = luckysheetTableContent.measureText(vArr[0]).width; + textH = vArr.length * oneLineTextHeight; + } + else if(tr == "4" || tr == "5"){ + textW = oneLineTextHeight; + textH = textMetrics; + } + } + else{ + textW = textMetrics; + textH = oneLineTextHeight; + } + + //水平对齐 + let horizonAlign = menuButton.checkstatus(Store.flowdata, r, c , "ht"); + //垂直对齐 + let verticalAlign = menuButton.checkstatus(Store.flowdata, r, c , "vt"); + + //水平对齐方式是 居中或居右对齐 且单元格宽度小于文字宽度 (用离屏canvas渲染) + let canvasName, cellsize; + if(browser.BrowserType() != "Safari" && (canvasType == "offline" || ((horizonAlign == "0" || horizonAlign == "2") && (end_c - start_c) < textW) || ((end_r - start_r) < textH))){ + canvasName = offlinecanvas; + canvasName.font = fontset; + + cellsize = [ + Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0]), + Store.devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), + Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), + Store.devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) + ]; + } + else{ + canvasName = luckysheetTableContent; + + cellsize = [ + Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0]), + Store.devicePixelRatio * (start_r + offsetTop + 1 + borderfix[1]), + Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), + Store.devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) + ]; + } + + //horizonAlign默认为1,左对齐 + let horizonAlignPos = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + if(horizonAlign == "0"){ + //居中对齐 + horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (textMetrics) / 2; + } + else if(horizonAlign == "2"){ + //右对齐 + horizonAlignPos = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (textMetrics); + } + + //verticalAlign默认为2,下对齐 + let verticalFixed = browser.luckysheetrefreshfixed(); + let verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight; + let verticalAlignPos_text = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio; + canvasName.textBaseline = "bottom"; + + if(verticalAlign == "0"){ + //居中对齐 + verticalAlignPos = (start_r + offsetTop + (end_r - start_r) / 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight / 2; + verticalAlignPos_text = (start_r + offsetTop + (end_r - start_r) / 2 + verticalFixed) * Store.devicePixelRatio; + canvasName.textBaseline = "middle"; + } + else if(verticalAlign == "1"){ + //上对齐 + verticalAlignPos = (start_r + offsetTop + 2 + verticalFixed) * Store.devicePixelRatio; + verticalAlignPos_text = (start_r + offsetTop + 2 + verticalFixed) * Store.devicePixelRatio; + canvasName.textBaseline = "top"; + } + + //单元格 背景颜色 + canvasName.fillStyle= menuButton.checkstatus(Store.flowdata, r, c , "bg"); + + //若单元格有交替颜色 背景颜色 + if(checksAF != null && checksAF[1] != null){ + canvasName.fillStyle = checksAF[1]; + } + + //若单元格有条件格式 背景颜色 + if(checksCF != null && checksCF["cellColor"] != null){ + canvasName.fillStyle = checksCF["cellColor"]; + } + + //若单元格有标题色 + if(Store.flowdata[r][c] != null && Store.flowdata[r][c].tc != null){ + luckysheetTableContent.fillStyle = Store.flowdata[r][c].tc; + } + + canvasName.fillRect(cellsize[0], cellsize[1], cellsize[2], cellsize[3]); + + //若单元格有批注 + if(Store.flowdata[r][c].ps != null){ + canvasName.beginPath(); + canvasName.moveTo(Store.devicePixelRatio * (end_c + offsetLeft - 6), Store.devicePixelRatio * (start_r + offsetTop)); + canvasName.lineTo(Store.devicePixelRatio * (end_c + offsetLeft - 1), Store.devicePixelRatio * (start_r + offsetTop)); + canvasName.lineTo(Store.devicePixelRatio * (end_c + offsetLeft - 1), Store.devicePixelRatio * (start_r + offsetTop + 5)); + canvasName.fillStyle = "#FC6666"; + canvasName.fill(); + canvasName.closePath(); + } + + //若单元格有条件格式数据条 + if(checksCF != null && checksCF["dataBar"] != null){ + let x = Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0] + 2); + let y = Store.devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1] + 2); + let w = Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2] - 4); + let h = Store.devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3] - 4); + + let valueType = checksCF["dataBar"]["valueType"]; + let valueLen = checksCF["dataBar"]["valueLen"]; + let format = checksCF["dataBar"]["format"]; + + if(format.length > 1){ //渐变 + if(valueType == "minus"){ + //负数 + let minusLen = checksCF["dataBar"]["minusLen"]; + + let my_gradient = canvasName.createLinearGradient(x + w * minusLen * (1 - valueLen), y, x + w * minusLen, y); + my_gradient.addColorStop(0, "#ffffff"); + my_gradient.addColorStop(1, "#ff0000"); + canvasName.fillStyle = my_gradient; + canvasName.fillRect(x + w * minusLen * (1 - valueLen), y, w * minusLen * valueLen, h); + + canvasName.beginPath(); + canvasName.moveTo(x + w * minusLen * (1 - valueLen), y); + canvasName.lineTo(x + w * minusLen * (1 - valueLen), y + h); + canvasName.lineTo(x + w * minusLen, y + h); + canvasName.lineTo(x + w * minusLen, y); + canvasName.lineTo(x + w * minusLen * (1 - valueLen), y); + canvasName.lineWidth = Store.devicePixelRatio; + canvasName.strokeStyle = "#ff0000"; + canvasName.stroke(); + canvasName.closePath(); + } + else if(valueType == "plus"){ + //正数 + let plusLen = checksCF["dataBar"]["plusLen"]; + + if(plusLen == 1){ + let my_gradient = canvasName.createLinearGradient(x, y, x + w * valueLen, y); + my_gradient.addColorStop(0, format[0]); + my_gradient.addColorStop(1, format[1]); + canvasName.fillStyle = my_gradient; + canvasName.fillRect(x, y, w * valueLen, h); + + canvasName.beginPath(); + canvasName.moveTo(x, y); + canvasName.lineTo(x, y + h); + canvasName.lineTo(x + w * valueLen, y + h); + canvasName.lineTo(x + w * valueLen, y); + canvasName.lineTo(x, y); + canvasName.lineWidth = Store.devicePixelRatio; + canvasName.strokeStyle = format[0]; + canvasName.stroke(); + canvasName.closePath(); + } + else{ + let minusLen = checksCF["dataBar"]["minusLen"]; + + let my_gradient = canvasName.createLinearGradient(x + w * minusLen, y, x + w * minusLen + w * plusLen * valueLen, y); + my_gradient.addColorStop(0, format[0]); + my_gradient.addColorStop(1, format[1]); + canvasName.fillStyle = my_gradient; + canvasName.fillRect(x + w * minusLen, y, w * plusLen * valueLen, h); + + canvasName.beginPath(); + canvasName.moveTo(x + w * minusLen, y); + canvasName.lineTo(x + w * minusLen, y + h); + canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y + h); + canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y); + canvasName.lineTo(x + w * minusLen, y); + canvasName.lineWidth = Store.devicePixelRatio; + canvasName.strokeStyle = format[0]; + canvasName.stroke(); + canvasName.closePath(); + } + } + } + else{ //单色 + if(valueType == "minus"){ + //负数 + let minusLen = checksCF["dataBar"]["minusLen"]; + + canvasName.fillStyle = "#ff0000"; + canvasName.fillRect(x + w * minusLen * (1 - valueLen), y, w * minusLen * valueLen, h); + + canvasName.beginPath(); + canvasName.moveTo(x + w * minusLen * (1 - valueLen), y); + canvasName.lineTo(x + w * minusLen * (1 - valueLen), y + h); + canvasName.lineTo(x + w * minusLen, y + h); + canvasName.lineTo(x + w * minusLen, y); + canvasName.lineTo(x + w * minusLen * (1 - valueLen), y); + canvasName.lineWidth = Store.devicePixelRatio; + canvasName.strokeStyle = "#ff0000"; + canvasName.stroke(); + canvasName.closePath(); + } + else if(valueType == "plus"){ + //正数 + let plusLen = checksCF["dataBar"]["plusLen"]; + + if(plusLen == 1){ + canvasName.fillStyle = format[0]; + canvasName.fillRect(x, y, w * valueLen, h); + + canvasName.beginPath(); + canvasName.moveTo(x, y); + canvasName.lineTo(x, y + h); + canvasName.lineTo(x + w * valueLen, y + h); + canvasName.lineTo(x + w * valueLen, y); + canvasName.lineTo(x, y); + canvasName.lineWidth = Store.devicePixelRatio; + canvasName.strokeStyle = format[0]; + canvasName.stroke(); + canvasName.closePath(); + } + else{ + let minusLen = checksCF["dataBar"]["minusLen"]; + + canvasName.fillStyle = format[0]; + canvasName.fillRect(x + w * minusLen, y, w * plusLen * valueLen, h); + + canvasName.beginPath(); + canvasName.moveTo(x + w * minusLen, y); + canvasName.lineTo(x + w * minusLen, y + h); + canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y + h); + canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y); + canvasName.lineTo(x + w * minusLen, y); + canvasName.lineWidth = Store.devicePixelRatio; + canvasName.strokeStyle = format[0]; + canvasName.stroke(); + canvasName.closePath(); + } + } + } + } + + //若单元格有条件格式图标集 + if(checksCF != null && checksCF["icons"] != null){ + let l = checksCF["icons"]["left"]; + let t = checksCF["icons"]["top"]; + + canvasName.drawImage( + luckysheet_CFiconsImg, + l * 42, + t * 32, + 32, + 32, + cellsize[0], + verticalAlignPos + 2, + oneLineTextHeight - 2, + oneLineTextHeight - 2 + ); + + if(horizonAlign != "0" && horizonAlign != "2"){ //左对齐时 文本渲染空出一个图标的距离 + horizonAlignPos = horizonAlignPos + oneLineTextHeight - 2; + } + } + + //单元格 文本颜色 + canvasName.fillStyle = menuButton.checkstatus(Store.flowdata, r, c , "fc"); + + //若单元格有交替颜色 文本颜色 + if(checksAF != null && checksAF[0] != null){ + canvasName.fillStyle = checksAF[0]; + } + + //若单元格有条件格式 文本颜色 + if(checksCF != null && checksCF["textColor"] != null){ + canvasName.fillStyle = checksCF["textColor"]; + } + + //单元格有下钻属性,文本颜色变成超链接的颜色 + if(Store.flowdata[r][c].dd != null){ + canvasName.fillStyle = "#0000ff"; + + canvasName.fillText(value == null ? "" : value, horizonAlignPos, verticalAlignPos_text); + + canvasName.beginPath(); + canvasName.strokeStyle = "#0000ff"; + canvasName.moveTo(horizonAlignPos, verticalAlignPos + oneLineTextHeight); + canvasName.lineTo(horizonAlignPos + textMetrics, verticalAlignPos + oneLineTextHeight); + canvasName.closePath(); + canvasName.stroke(); + } + else{ + //自动换行、旋转、删除线功能 + if(Store.flowdata[r][c].tb == "2"){ + canvasName.textBaseline = 'top'; //自动换行 textBaseline以top计算 + + let strValue = value.toString(); + let cellWidth = end_c - start_c - 8; + + let strArr = [];//文本截断数组 + strArr = getCellTextSplitArr(strValue, strArr, cellWidth, canvasName); + + for(let iFill = 0; iFill < strArr.length; iFill++){ + //水平对齐计算 + let strWidth = canvasName.measureText(strArr[iFill]).width; + if(horizonAlign == "0"){ + horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (strWidth)/2; + } + else if(horizonAlign == "2"){ + horizonAlignPos = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (strWidth); + } + + //垂直对齐计算 + if(verticalAlign == "0"){ + verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight * strArr.length / 2; + } + else if(verticalAlign == "1"){ + verticalAlignPos = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + else{ + verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight * strArr.length; + } + + canvasName.fillText(strArr[iFill], horizonAlignPos, (verticalAlignPos + iFill * oneLineTextHeight)); + } + } + else if(Store.flowdata[r][c].tr != null && Store.flowdata[r][c].tr != "0"){ + canvasName.textBaseline = 'top'; //旋转 textBaseline以top计算 + + //单元格旋转属性 + let tr = Store.flowdata[r][c].tr; + + if(tr == "1" || tr == "2"){ + //旋转重新计算水平、垂直方向坐标 + let textW = 0.707 * (textMetrics + oneLineTextHeight); + let textH = 0.707 * (textMetrics + oneLineTextHeight); + + let hAP = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + if(horizonAlign == "0"){ + hAP = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (textW) / 2; + } + else if(horizonAlign == "2"){ + hAP = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (textW); + } + + let vAP = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - textH; + if(verticalAlign == "0"){ + vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - textH / 2; + } + else if(verticalAlign == "1"){ + vAP = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + + //向下倾斜(45 旋转) + if(tr == "1"){ + canvasName.save(); + canvasName.translate(hAP, vAP); + canvasName.rotate(45 * Math.PI / 180); + canvasName.translate(-hAP, -vAP); + canvasName.fillText(value == null ? "" : value, hAP + (0.707 * 0.707 * oneLineTextHeight), vAP - (0.707 * 0.707 * oneLineTextHeight)); + canvasName.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !isRealNull(value)){ + canvasName.beginPath(); + canvasName.strokeStyle = "#000"; + canvasName.moveTo(hAP + oneLineTextHeight / 2, vAP + oneLineTextHeight / 2); + canvasName.lineTo(hAP + textW - oneLineTextHeight / 2, vAP + textH - oneLineTextHeight / 2); + canvasName.closePath(); + canvasName.stroke(); + } + } + + //向上倾斜(-45 旋转) + if(tr == "2"){ + canvasName.save(); + canvasName.translate(hAP, vAP + textH); + canvasName.rotate(-45 * Math.PI / 180); + canvasName.translate(-hAP, -(vAP + textH)); + canvasName.fillText(value == null ? "" : value, hAP + (0.707 * 0.707 * oneLineTextHeight), vAP + textH - (0.707 * 0.707 * oneLineTextHeight)); + canvasName.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !isRealNull(value)){ + canvasName.beginPath(); + canvasName.strokeStyle = "#000"; + canvasName.moveTo(hAP + oneLineTextHeight / 2, vAP + textH - oneLineTextHeight / 2); + canvasName.lineTo(hAP + textW - oneLineTextHeight / 2, vAP + oneLineTextHeight / 2); + canvasName.closePath(); + canvasName.stroke(); + } + } + } + else if(tr == "3"){ + if(!isRealNull(value)){ + value = value.toString(); + + let vArr; + if(value.length > 1){ + vArr = value.split(""); + } + else{ + vArr = []; + vArr.push(value); + } + + let textW = canvasName.measureText(vArr[0]).width; + let textH = vArr.length * oneLineTextHeight; + + for(let i = 0; i < vArr.length; i++){ + let vWidth = canvasName.measureText(vArr[i]).width; + + //水平对齐计算 + if(horizonAlign == "0"){ + horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (vWidth)/2; + } + else if(horizonAlign == "2"){ + horizonAlignPos = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (vWidth); + } + else{ + horizonAlignPos = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + } + + //垂直对齐计算 + if(verticalAlign == "0"){ + verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight * vArr.length/2; + } + else if(verticalAlign == "1"){ + verticalAlignPos = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + else{ + verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight * vArr.length; + } + + canvasName.fillText(vArr[i], horizonAlignPos, (verticalAlignPos + i * oneLineTextHeight)); + } + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !isRealNull(value)){ + canvasName.beginPath(); + canvasName.strokeStyle = "#000"; + canvasName.moveTo(horizonAlignPos + textW / 2, verticalAlignPos); + canvasName.lineTo(horizonAlignPos + textW / 2, verticalAlignPos + textH); + canvasName.closePath(); + canvasName.stroke(); + } + } + } + else if(tr == "4" || tr == "5"){ + //旋转重新计算水平、垂直方向坐标 + let textW = oneLineTextHeight; + let textH = textMetrics; + + let hAP = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + if(horizonAlign == "0"){ + hAP = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (textW) / 2; + } + else if(horizonAlign == "2"){ + hAP = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (textW); + } + + let vAP = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - textH; + if(verticalAlign == "0"){ + vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - textH / 2; + } + else if(verticalAlign == "1"){ + vAP = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + + //向下90(90 旋转) + if(tr == "4"){ + canvasName.save(); + canvasName.translate(hAP, vAP); + canvasName.rotate(90 * Math.PI / 180); + canvasName.translate(-hAP, -vAP); + canvasName.fillText(value == null ? "" : value, hAP, vAP - textW); + canvasName.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !isRealNull(value)){ + canvasName.beginPath(); + canvasName.strokeStyle = "#000"; + canvasName.moveTo(hAP + textW / 2, vAP); + canvasName.lineTo(hAP + textW / 2, vAP + textH); + canvasName.closePath(); + canvasName.stroke(); + } + } + + //向上90(-90 旋转) + if(tr == "5"){ + canvasName.save(); + canvasName.translate(hAP + textH, vAP); + canvasName.rotate(-90 * Math.PI / 180); + canvasName.translate(-(hAP + textH), -vAP); + canvasName.fillText(value == null ? "" : value, hAP, vAP - textH); + canvasName.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !isRealNull(value)){ + canvasName.beginPath(); + canvasName.strokeStyle = "#000"; + canvasName.moveTo(hAP + textW / 2, vAP); + canvasName.lineTo(hAP + textW / 2, vAP + textH); + canvasName.closePath(); + canvasName.stroke(); + } + } + } + } + else{ + canvasName.fillText(value == null ? "" : value, horizonAlignPos, verticalAlignPos_text); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !isRealNull(value)){ + canvasName.beginPath(); + canvasName.strokeStyle = "#000"; + canvasName.moveTo(horizonAlignPos, verticalAlignPos + oneLineTextHeight / 2); + canvasName.lineTo(horizonAlignPos + textMetrics, verticalAlignPos + oneLineTextHeight / 2); + canvasName.closePath(); + canvasName.stroke(); + } + } + } + + //水平对齐方式是 居中或居右对齐 且单元格宽度小于文字宽度 (用离屏canvas渲染) + if(browser.BrowserType() != "Safari" && (canvasType == "offline" || ((horizonAlign == "0" || horizonAlign == "2") && (end_c - start_c) < textW) || ((verticalAlign == "0" || verticalAlign == "2") && (end_r - start_r) < textH))){ + canvasName.font = luckysheetdefaultstyle.font; + + if($("#luckysheetTableContentF").length > 0){ + luckysheetTableContent.drawImage($("#luckysheetTableContentF").get(0), cellsize[0], cellsize[1], cellsize[2], cellsize[3], cellsize[0], cellsize[1], cellsize[2], cellsize[3]); + } + else{ + luckysheetTableContent.drawImage(offlineElement, cellsize[0], cellsize[1], cellsize[2], cellsize[3], cellsize[0], cellsize[1], cellsize[2], cellsize[3]); + } + } + + luckysheetTableContent.font = luckysheetdefaultstyle.font; + + //右边框 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo(Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), Store.devicePixelRatio * (start_r + offsetTop)); + luckysheetTableContent.lineTo(Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), Store.devicePixelRatio * (end_r - 2 + offsetTop)); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + + if (!!Store.luckysheetcurrentisPivotTable && !pivotTable.drawPivotTable) { + luckysheetTableContent.strokeStyle = "#000000"; + } + else{ + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + } + + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + + //下边框 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo(Store.devicePixelRatio * (start_c - 2 + offsetLeft), Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); + luckysheetTableContent.lineTo(Store.devicePixelRatio * (end_c + offsetLeft - 2), Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + + if (!!Store.luckysheetcurrentisPivotTable && !pivotTable.drawPivotTable) { + luckysheetTableContent.strokeStyle = "#000000"; + } + else{ + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + } + + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + } + + let mcArr = []; + + for(let cud = 0; cud < cellupdate.length; cud++){ + let item = cellupdate[cud]; + let r = item.r, + c = item.c, + start_r = item.start_r, + start_c = item.start_c, + end_r = item.end_r, + end_c = item.end_c; + let firstcolumlen = item.firstcolumlen; + + if(Store.flowdata[r] == null){ + continue; + } + + if(Store.flowdata[r][c] == null){ //空单元格 + nullCellRender(r, c, start_r, start_c, end_r, end_c); + } + else{ + let cell = Store.flowdata[r][c]; + let value = null, er = r, ec = c, end_ec = end_c; + + if((typeof cell == "object") && "mc" in cell){ + mcArr.push(cellupdate[cud]); + + let margeMaindata = cell["mc"]; + value = getcellvalue(margeMaindata.r, margeMaindata.c, null, "m"); + + if(value == null){ + value = getcellvalue(margeMaindata.r, margeMaindata.c); + } + + r = margeMaindata.r; + c = margeMaindata.c; + + er += margeMaindata.rs; + ec += margeMaindata.rc; + + if (c == 0) { + start_c = -scrollWidth; + } + else { + start_c = Store.visibledatacolumn[c - 1] - scrollWidth; + } + + if (r == 0) { + start_r = -scrollHeight - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - scrollHeight - 1; + } + + end_ec = Store.visibledatacolumn[ec] - scrollWidth; + } + else{ + value = getcellvalue(r, c, null, "m"); + if(value == null){ + value = getcellvalue(r, c); + } + } + + if(value == null || value.toString().length == 0){ + nullCellRender(r, c, start_r, start_c, end_r, end_c); + + //sparklines渲染 + let borderfix = menuButton.borderfix(Store.flowdata, r, c); + let cellsize = [ + Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0]), + Store.devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), + Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), + Store.devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) + ]; + sparklinesRender(r, c, cellsize[0], cellsize[1], "luckysheetTableContent", luckysheetTableContent); + } + else{ + if((r + "_" + c) in dynamicArray_compute){//动态数组公式 + value = dynamicArray_compute[r + "_" + c].v; + } + + cellRender(r, c, start_r, start_c, end_r, end_c, value); + } + } + } + + //合并单元格再处理 + for(let m = 0; m < mcArr.length; m++){ + let item = mcArr[m]; + let r = item.r, + c = item.c, + start_r = item.start_r, + start_c = item.start_c, + end_r = item.end_r, + end_c = item.end_c; + let firstcolumlen = item.firstcolumlen; + + let cell = Store.flowdata[r][c]; + let value = null, er = r, ec = c, end_ec = end_c; + + let margeMaindata = cell["mc"]; + value = getcellvalue(margeMaindata.r, margeMaindata.c, null, "m"); + + if(value == null){ + value = getcellvalue(margeMaindata.r, margeMaindata.c); + } + + r = margeMaindata.r; + c = margeMaindata.c; + + er += margeMaindata.rs; + ec += margeMaindata.rc; + + if (c == 0) { + start_c = -scrollWidth; + } + else { + start_c = Store.visibledatacolumn[c - 1] - scrollWidth; + } + + if (r == 0) { + start_r = -scrollHeight - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - scrollHeight - 1; + } + + end_ec = Store.visibledatacolumn[ec] - scrollWidth; + + if(value == null || value.toString().length == 0){ + nullCellRender(r, c, start_r, start_c, end_r, end_c); + + //sparklines渲染 + let borderfix = menuButton.borderfix(Store.flowdata, r, c); + let cellsize = [ + Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0]), + Store.devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), + Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), + Store.devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) + ]; + sparklinesRender(r, c, cellsize[0], cellsize[1], "luckysheetTableContent", luckysheetTableContent); + } + else{ + if((r + "_" + c) in dynamicArray_compute){//动态数组公式 + value = dynamicArray_compute[r + "_" + c].v; + } + + cellRender(r, c, start_r, start_c, end_r, end_c, value, "offline"); + } + } + + //边框单独渲染 + if(Store.config["borderInfo"] != null && Store.config["borderInfo"].length > 0){ + //边框渲染 + let borderLeftRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ + let linetype = style; + + let m_st = Store.devicePixelRatio * (start_c - 2 + 0.5 + offsetLeft); + let m_ed = Store.devicePixelRatio * (start_r + offsetTop); + let line_st = Store.devicePixelRatio * (start_c - 2 + 0.5 + offsetLeft); + let line_ed = Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop); + + menuButton.setLineDash(canvas, linetype, "v", m_st, m_ed, line_st, line_ed); + + canvas.strokeStyle = color; + + canvas.stroke(); + canvas.closePath(); + canvas.restore(); + } + + let borderRightRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ + let linetype = style; + + let m_st = Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft); + let m_ed = Store.devicePixelRatio * (start_r + offsetTop); + let line_st = Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft); + let line_ed = Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop); + + menuButton.setLineDash(canvas, linetype, "v", m_st, m_ed, line_st, line_ed); + + canvas.strokeStyle = color; + + canvas.stroke(); + canvas.closePath(); + canvas.restore(); + } + + let borderBottomRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ + let linetype = style; + + let m_st = Store.devicePixelRatio * (start_c - 2 + offsetLeft); + let m_ed = Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop); + let line_st = Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft); + let line_ed = Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop); + + menuButton.setLineDash(canvas, linetype, "h", m_st, m_ed, line_st, line_ed); + + canvas.strokeStyle = color; + + canvas.stroke(); + canvas.closePath(); + canvas.restore(); + } + + let borderTopRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ + let linetype = style; + + let m_st = Store.devicePixelRatio * (start_c - 2 + offsetLeft); + let m_ed = Store.devicePixelRatio * (start_r - 1 + 0.5 + offsetTop); + let line_st = Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft); + let line_ed = Store.devicePixelRatio * (start_r - 1 + 0.5 + offsetTop); + + menuButton.setLineDash(canvas, linetype, "h", m_st, m_ed, line_st, line_ed); + + canvas.strokeStyle = color; + + canvas.stroke(); + canvas.closePath(); + canvas.restore(); + } + + let borderInfoCompute = getBorderInfoCompute(); + + for(let x in borderInfoCompute){ + let bd_r = x.split("_")[0], bd_c = x.split("_")[1]; + + if(borderOffset[bd_r + "_" + bd_c]){ + let start_r = borderOffset[bd_r + "_" + bd_c].start_r; + let start_c = borderOffset[bd_r + "_" + bd_c].start_c; + let end_r = borderOffset[bd_r + "_" + bd_c].end_r; + let end_c = borderOffset[bd_r + "_" + bd_c].end_c; + + let borderLeft = borderInfoCompute[x].l; + if(borderLeft != null){ + borderLeftRender(borderLeft.style, borderLeft.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); + } + + let borderRight = borderInfoCompute[x].r; + if(borderRight != null){ + borderRightRender(borderRight.style, borderRight.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); + } + + let borderTop = borderInfoCompute[x].t; + if(borderTop != null){ + borderTopRender(borderTop.style, borderTop.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); + } + + let borderBottom = borderInfoCompute[x].b; + if(borderBottom != null){ + borderBottomRender(borderBottom.style, borderBottom.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); + } + } + } + } + + //渲染表格时有尾列时,清除右边灰色区域,防止表格有值溢出 + if(dataset_col_ed == Store.visibledatacolumn.length - 1){ + luckysheetTableContent.clearRect( + (fill_col_ed - scrollWidth + offsetLeft - 1) * Store.devicePixelRatio, + (offsetTop - 1) * Store.devicePixelRatio, + (Store.ch_width - Store.visibledatacolumn[dataset_col_ed]) * Store.devicePixelRatio, + (fill_row_ed - scrollHeight) * Store.devicePixelRatio + ); + } + + if(ctx != null){ + ctx.drawImage( + luckysheetTableElement, + 0, + 0, + drawWidth, + drawHeight, + -drawWidth/2 + offsetLeft, + -drawHeight/2 + offsetTop, + drawWidth, + drawHeight + ); + } +} + +function luckysheetDrawMain_back(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop, columnOffsetCell, rowOffsetCell, mycanvas) { + if (scrollWidth == null) { + scrollWidth = $("#luckysheet-cell-main").scrollLeft(); + } + if (scrollHeight == null) { + scrollHeight = $("#luckysheet-cell-main").scrollTop(); + } + + if (drawWidth == null) { + drawWidth = Store.luckysheetTableContentHW[0]; + } + if (drawHeight == null) { + drawHeight = Store.luckysheetTableContentHW[1]; + } + + if (offsetLeft == null) { + offsetLeft = Store.rowHeaderWidth; + } + if (offsetTop == null) { + offsetTop = Store.columeHeaderHeight; + } + + if (columnOffsetCell == null) { + columnOffsetCell = 0; + } + if (rowOffsetCell == null) { + rowOffsetCell = 0; + } + + let luckysheetTableContent = null; + if(mycanvas == null){ + luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); + } + else { + if(getObjType(mycanvas) == "object"){ + try{ + luckysheetTableContent = mycanvas.get(0).getContext("2d"); + } + catch(err){ + luckysheetTableContent = mycanvas; + } + } + else{ + luckysheetTableContent = $("#" + mycanvas).get(0).getContext("2d"); + } + } + + luckysheetTableContent.clearRect( + offsetLeft * Store.devicePixelRatio, + offsetTop * Store.devicePixelRatio, + drawWidth * Store.devicePixelRatio, + drawHeight * Store.devicePixelRatio + ); + + //离屏canvas + let offlinecanvas = $("#luckysheetTableContentF").get(0).getContext("2d"); + offlinecanvas.fillStyle = "#ffffff"; + offlinecanvas.fillRect( + 0, + 0, + Store.luckysheetTableContentHW[0] * Store.devicePixelRatio, + Store.luckysheetTableContentHW[1] * Store.devicePixelRatio + ); + + offlinecanvas.font = luckysheetdefaultstyle.font; + offlinecanvas.textBaseline = "top"; + offlinecanvas.fillStyle = luckysheetdefaultstyle.fillStyle; + + let dataset_row_st, dataset_row_ed, dataset_col_st, dataset_col_ed; + + dataset_row_st = luckysheet_searcharray(Store.visibledatarow, scrollHeight); + dataset_row_ed = luckysheet_searcharray(Store.visibledatarow, scrollHeight + drawHeight); + + if (dataset_row_st == -1) { + dataset_row_st = 0; + } + + dataset_row_st += rowOffsetCell; + + if (dataset_row_ed == -1) { + dataset_row_ed = Store.visibledatarow.length - 1; + } + + dataset_row_ed += rowOffsetCell; + + if (dataset_row_ed >= Store.visibledatarow.length) { + dataset_row_ed = Store.visibledatarow.length - 1; + } + + dataset_col_st = luckysheet_searcharray(Store.visibledatacolumn, scrollWidth); + dataset_col_ed = luckysheet_searcharray(Store.visibledatacolumn, scrollWidth + drawWidth); + + if (dataset_col_st == -1) { + dataset_col_st = 0; + } + + dataset_col_st += columnOffsetCell; + + if (dataset_col_ed == -1) { + dataset_col_ed = Store.visibledatacolumn.length - 1; + } + + dataset_col_ed += columnOffsetCell; + + if (dataset_col_ed >= Store.visibledatacolumn.length) { + dataset_col_ed = Store.visibledatacolumn.length - 1; + } + + let fill_row_st, fill_row_ed, fill_col_st, fill_col_ed; + if(dataset_row_st==0){ + fill_row_st = 0; + } + else{ + fill_row_st = Store.visibledatarow[dataset_row_st-1]; + } + + fill_row_ed = Store.visibledatarow[dataset_row_ed]; + + if(dataset_col_st==0){ + fill_col_st = 0; + } + else{ + fill_col_st = Store.visibledatacolumn[dataset_col_st-1]; + } + + fill_col_ed = Store.visibledatacolumn[dataset_col_ed]; + + luckysheetTableContent.fillStyle="#ffffff"; + luckysheetTableContent.fillRect( + (offsetLeft - 1) * Store.devicePixelRatio, + (offsetTop - 1) * Store.devicePixelRatio, + (fill_col_ed - fill_col_st) * Store.devicePixelRatio, + (fill_row_ed - fill_row_st) * Store.devicePixelRatio + ); + + let end_r, start_r, end_c, start_c; + + let cellupdate = []; + let mergeCache = {}; + for (let r = dataset_row_st; r <= dataset_row_ed; r++) { + if (r == 0) { + start_r = -scrollHeight - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - scrollHeight - 1; + } + end_r = Store.visibledatarow[r] - scrollHeight; + + for (let c = dataset_col_st; c <= dataset_col_ed; c++) { + if (c == 0) { + start_c = -scrollWidth; + } + else { + start_c = Store.visibledatacolumn[c - 1] - scrollWidth; + } + end_c = Store.visibledatacolumn[c] - scrollWidth; + + if(c==dataset_col_ed){ + if (!Store.luckysheetcurrentisPivotTable && end_r <= drawHeight && start_r >= -1) { + //行 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (offsetLeft - 1), + Store.devicePixelRatio * (end_r + offsetTop - 2 + 0.5) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c + offsetLeft-2), + Store.devicePixelRatio * (end_r + offsetTop - 2 + 0.5) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + } + + if (r == dataset_row_st) { + if (!Store.luckysheetcurrentisPivotTable && end_c <= drawWidth + 18 && start_c >= -1) { + //列 + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (end_c + offsetLeft - 2 + 0.5), + Store.devicePixelRatio * (offsetTop - 1) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c + offsetLeft - 2 + 0.5), + Store.devicePixelRatio * (fill_row_ed - fill_row_st + offsetTop-2) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + } + + if (!!Store.luckysheetcurrentisPivotTable && pivotTable.drawPivotTable) { + if ((c == 0 || c == 5) && r <= 11) { + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (start_r + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + if ((r == 2 || r == 11) && c <= 5) { + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (start_c - 1 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c + offsetLeft-2), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + + if (r == 6 && c == 3) { + luckysheetTableContent.fillText( + "数据透视表", + Store.devicePixelRatio * (start_c + 4 + offsetLeft), + Store.devicePixelRatio * (start_r + (end_r - start_r) / 2 - 1 + offsetTop) + ); + } + } + else if (!!Store.luckysheetcurrentisPivotTable) { + if (c < pivotTable.pivotTableBoundary[1] && r < pivotTable.pivotTableBoundary[0]) { + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (start_r + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + offsetTop) + ); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + + luckysheetTableContent.beginPath(); + luckysheetTableContent.moveTo( + Store.devicePixelRatio * (start_c - 1 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) + ); + luckysheetTableContent.lineTo( + Store.devicePixelRatio * (end_c + offsetLeft - 2), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); + luckysheetTableContent.lineWidth = Store.devicePixelRatio; + luckysheetTableContent.strokeStyle = "#000000"; + luckysheetTableContent.closePath(); + luckysheetTableContent.stroke(); + } + } + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + + } + else { + if (Store.flowdata[r] != null && Store.flowdata[r][c] != null && start_r >= -1 && start_c >= -1 ) { + let value = Store.flowdata[r][c]; + + let firstcolumlen = Store.defaultcollen; + if (Store.config["columlen"] != null && Store.config["columlen"][c] != null) { + firstcolumlen = Store.config["columlen"][c]; + } + + if(getObjType(value) == "object" && ("mc" in value)){ + if("rs" in value["mc"]){ + let key = "r"+ r + "c" + c; + mergeCache[key] = cellupdate.length; + } + else{ + let key = "r"+ value["mc"].r + "c" + value["mc"].c; + let margeMain = cellupdate[mergeCache[key]]; + + if(margeMain==null){ + mergeCache[key] = cellupdate.length; + cellupdate.push({ + "r": r, + "c": c, + "start_c": start_c, + "start_r": start_r, + "end_r": end_r, + "end_c": end_c, + "firstcolumlen": firstcolumlen, + "startlist": [] + }); + } + else{ + if(margeMain.c==c){ + margeMain.end_r += (end_r-start_r-1); + margeMain.startlist.push(start_r); + } + + if(margeMain.r==r){ + margeMain.end_c += (end_c-start_c); + margeMain.firstcolumlen += firstcolumlen; + } + + + let margeMaindata = Store.flowdata[margeMain.r][margeMain.c]; + if((margeMain.c + margeMaindata.mc.cs-1)==c && (margeMain.r + margeMaindata.mc.rs-1)==r){ + //margeMain.end_r -= 10; + //margeMain.end_c -= 1; + } + } + + continue; + } + } + cellupdate.push({ + "r": r, + "c": c, + "start_c": start_c, + "start_r": start_r, + "end_r": end_r, + "end_c": end_c, + "firstcolumlen": firstcolumlen, + "startlist": [] + }); + } + } + } + } + + for(let cud = 0; cud < cellupdate.length; cud++){ + let item = cellupdate[cud]; + let r= item.r, + c = item.c, + start_c = item.start_c, + start_r = item.start_r, + end_c = item.end_c, + end_r = item.end_r; + let firstcolumlen = item.firstcolumlen; + + let cell = Store.flowdata[r][c]; + let value = null, er = r, ec = c, end_ec = end_c; + if((typeof cell == "object") && "mc" in cell){ + let margeMaindata = cell["mc"]; + value = getcellvalue(margeMaindata.r, margeMaindata.c, null,"m"); + if(value == null){ + value = getcellvalue(margeMaindata.r, margeMaindata.c); + } + + r = margeMaindata.r; + c = margeMaindata.c; + + er += margeMaindata.rs; + ec += margeMaindata.rc; + + if (c == 0) { + start_c = -scrollWidth; + } + else { + start_c = Store.visibledatacolumn[c - 1] - scrollWidth; + } + + if (r == 0) { + start_r = -scrollHeight - 1; + } + else { + start_r = Store.visibledatarow[r - 1] - scrollHeight - 1; + } + + end_ec = Store.visibledatacolumn[ec] - scrollWidth; + } + else{ + value = getcellvalue(r, c, null,"m"); + if(value == null){ + value = getcellvalue(r, c); + } + } + + let borderfix = menuButton.borderfix(Store.flowdata, r, c); + offlinecanvas.fillStyle= menuButton.checkstatus(Store.flowdata, r, c , "bg"); + + let cellsize = [ + Store.devicePixelRatio * (start_c + offsetLeft + borderfix[0]), + Store.devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), + Store.devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), + Store.devicePixelRatio * (end_r - start_r-3 - 0.5 + borderfix[3]) + ]; + offlinecanvas.fillRect(cellsize[0], cellsize[1], cellsize[2], cellsize[3]); + + offlinecanvas.fillStyle= menuButton.checkstatus(Store.flowdata, r, c , "fc"); + + let fontset = luckysheetfontformat(Store.flowdata[r][c]); + offlinecanvas.font = fontset; + + let textMetrics = offlinecanvas.measureText(value).width; + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + + offlinecanvas.fillStyle= menuButton.checkstatus(Store.flowdata, r, c , "fc"); + + let horizonAlign = menuButton.checkstatus(Store.flowdata, r, c , "ht"); + let horizonAlignPos = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + if(horizonAlign == "0"){ + horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (textMetrics)/2; + } + else if(horizonAlign=="2"){ + horizonAlignPos = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (textMetrics); + } + + let verticalAlign = menuButton.checkstatus(Store.flowdata, r, c , "vt"); + let verticalFixed = browser.luckysheetrefreshfixed(); + let verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight; + if(verticalAlign == "0"){ + verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight/2; + } + else if(verticalAlign == "1"){ + verticalAlignPos = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + + //自动换行、旋转、删除线功能 + if(Store.flowdata[r][c].tb == "2" && textMetrics > (end_c - start_c)){ + let strValue = value.toString(); + let cellWidth = end_c-start_c-8; + let strArr = []; + + for(let strI = 1; strI <= strValue.length; strI++){ + let strV = strValue.substring(strArr.join("").length,strI); + let strtextMetrics = offlinecanvas.measureText(strV).width; + if(strtextMetrics > cellWidth){ + strArr.push(strValue.substring(strArr.join("").length,strI - 1)); + strI = strI - 2; + } + else if(strtextMetrics <= cellWidth && strI == strValue.length){ + strArr.push(strV); + } + } + + for(let iFill = 0; iFill < strArr.length; iFill++){ + //水平对齐计算 + let strWidth = offlinecanvas.measureText(strArr[iFill]).width; + if(horizonAlign == "0"){ + horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (strWidth)/2; + } + else if(horizonAlign == "2"){ + horizonAlignPos = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (strWidth); + } + else{ + horizonAlignPos = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + } + + //垂直对齐计算 + if(verticalAlign == "0"){ + verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight * strArr.length / 2; + } + else if(verticalAlign == "1"){ + verticalAlignPos = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + else{ + verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight * strArr.length; + } + + offlinecanvas.fillText(strArr[iFill], horizonAlignPos, (verticalAlignPos + iFill * Store.oneLineTextHeight)); + } + } + else if(!!Store.flowdata[r][c].tr && Store.flowdata[r][c].tr != "0"){ + //单元格旋转属性 + let tr = Store.flowdata[r][c].tr; + + if(tr == "1" || tr == "2"){ + //旋转重新计算水平、垂直方向坐标 + let textW = 0.707 * (textMetrics + oneLineTextHeight); + let textH = 0.707 * (textMetrics + oneLineTextHeight); + + let hAP = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + if(horizonAlign=="0"){ + hAP = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (textW)/2; + } + else if(horizonAlign=="2"){ + hAP = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (textW); + } + + let vAP = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - textH; + if(verticalAlign=="0"){ + vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - textH/2; + } + else if(verticalAlign=="1"){ + vAP = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + + //向下倾斜(45 旋转) + if(tr == "1"){ + offlinecanvas.save(); + offlinecanvas.translate(hAP, vAP); + offlinecanvas.rotate(45 * Math.PI / 180); + offlinecanvas.translate(-hAP, -vAP); + offlinecanvas.fillText( + value == null ? "" : value, + hAP + (0.707 * 0.707 * oneLineTextHeight), + vAP - (0.707 * 0.707 * oneLineTextHeight) + ); + offlinecanvas.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !!value){ + offlinecanvas.beginPath(); + offlinecanvas.moveTo(hAP + oneLineTextHeight/2, vAP + oneLineTextHeight/2); + offlinecanvas.lineTo(hAP + textW - oneLineTextHeight/2, vAP + textH - oneLineTextHeight/2); + offlinecanvas.closePath(); + offlinecanvas.stroke(); + } + } + //向上倾斜(-45 旋转) + if(tr == "2"){ + offlinecanvas.save(); + offlinecanvas.translate(hAP + textW, vAP); + offlinecanvas.rotate(-45 * Math.PI / 180); + offlinecanvas.translate(-(hAP + textW), -vAP); + offlinecanvas.fillText( + value == null ? "" : value, + hAP - (0.707 * 0.707 * oneLineTextHeight), + vAP - (0.707 * 0.707 * oneLineTextHeight) + ); + offlinecanvas.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !!value){ + offlinecanvas.beginPath(); + offlinecanvas.moveTo(hAP + oneLineTextHeight/2, vAP + textH - oneLineTextHeight/2); + offlinecanvas.lineTo(hAP + textW - oneLineTextHeight/2, vAP + oneLineTextHeight/2); + offlinecanvas.closePath(); + offlinecanvas.stroke(); + } + } + } + else if(tr == "3"){ + if(!!value){ + value = value.toString(); + + let vArr; + if(value.length > 1){ + vArr = value.split(""); + } + else{ + vArr = []; + vArr.push(value); + } + + let textW = offlinecanvas.measureText(vArr[0]).width; + let textH = vArr.length * oneLineTextHeight; + + for(let i = 0; i < vArr.length; i++){ + let vWidth = offlinecanvas.measureText(vArr[i]).width; + + //水平对齐计算 + if(horizonAlign == "0"){ + horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (vWidth)/2; + } + else if(horizonAlign == "2"){ + horizonAlignPos = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (vWidth); + } + else{ + horizonAlignPos = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + } + + //垂直对齐计算 + if(verticalAlign == "0"){ + verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight*vArr.length/2; + } + else if(verticalAlign == "1"){ + verticalAlignPos = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + else{ + verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - oneLineTextHeight*vArr.length; + } + + offlinecanvas.fillText(vArr[i], horizonAlignPos, (verticalAlignPos + i * oneLineTextHeight)); + } + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !!value){ + offlinecanvas.beginPath(); + offlinecanvas.moveTo(horizonAlignPos + textW/2, verticalAlignPos); + offlinecanvas.lineTo(horizonAlignPos + textW/2, verticalAlignPos + textH); + offlinecanvas.closePath(); + offlinecanvas.stroke(); + } + } + } + else if(tr == "4" || tr == "5"){ + //旋转重新计算水平、垂直方向坐标 + let textW = oneLineTextHeight; + let textH = textMetrics; + + let hAP = (start_c + 4 + offsetLeft) * Store.devicePixelRatio; + if(horizonAlign=="0"){ + hAP = (start_c + (end_c - start_c) / 2 + offsetLeft) * Store.devicePixelRatio - (textW)/2; + } + else if(horizonAlign=="2"){ + hAP = (end_c + offsetLeft - 8) * Store.devicePixelRatio - (textW); + } + + let vAP = (end_r + offsetTop - 2 + verticalFixed) * Store.devicePixelRatio - textH; + if(verticalAlign=="0"){ + vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * Store.devicePixelRatio - textH/2; + } + else if(verticalAlign=="1"){ + vAP = (start_r + offsetTop + verticalFixed) * Store.devicePixelRatio; + } + + //向下90(90 旋转) + if(tr == "4"){ + offlinecanvas.save(); + offlinecanvas.translate(hAP, vAP); + offlinecanvas.rotate(90 * Math.PI / 180); + offlinecanvas.translate(-hAP, -vAP); + offlinecanvas.fillText(value == null ? "" : value, hAP, vAP - textW); + offlinecanvas.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !!value){ + offlinecanvas.beginPath(); + offlinecanvas.moveTo(hAP + textW/2, vAP); + offlinecanvas.lineTo(hAP + textW/2, vAP + textH); + offlinecanvas.closePath(); + offlinecanvas.stroke(); + } + } + //向上90(-90 旋转) + if(tr == "5"){ + offlinecanvas.save(); + offlinecanvas.translate(hAP + textH, vAP); + offlinecanvas.rotate(-90 * Math.PI / 180); + offlinecanvas.translate(-(hAP + textH), -vAP); + offlinecanvas.fillText(value == null ? "" : value, hAP, vAP - textH); + offlinecanvas.restore(); + + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !!value){ + offlinecanvas.beginPath(); + offlinecanvas.moveTo(hAP + textW/2, vAP); + offlinecanvas.lineTo(hAP + textW/2, vAP + textH); + offlinecanvas.closePath(); + offlinecanvas.stroke(); + } + } + } + } + else{ + //是否有删除线 + let cl = menuButton.checkstatus(Store.flowdata, r, c , "cl"); + if(cl == "1" && !!value){ + luckysheetTableContent.strokeStyle = "#000000"; + + offlinecanvas.beginPath(); + offlinecanvas.moveTo(horizonAlignPos, verticalAlignPos + oneLineTextHeight/2); + offlinecanvas.lineTo(horizonAlignPos + textMetrics, verticalAlignPos + oneLineTextHeight/2); + offlinecanvas.closePath(); + offlinecanvas.stroke(); + + offlinecanvas.textBaseline = "middle"; + offlinecanvas.fillText(value==null?"":value, horizonAlignPos, verticalAlignPos + oneLineTextHeight/2); + } + else{ + offlinecanvas.textBaseline = "top"; + offlinecanvas.fillText(value==null?"":value, horizonAlignPos, verticalAlignPos); + } + } + + offlinecanvas.font = luckysheetdefaultstyle.font; + + luckysheetTableContent.drawImage($("#luckysheetTableContentF").get(0), cellsize[0], cellsize[1], cellsize[2], cellsize[3], cellsize[0], cellsize[1], cellsize[2], cellsize[3]); + + let bs = menuButton.checkstatus(Store.flowdata, r, c , "bs"); + let bc = menuButton.checkstatus(Store.flowdata, r, c , "bc"); + let bs_t = menuButton.checkstatus(Store.flowdata, r, c , "bs_t"); + let bc_t = menuButton.checkstatus(Store.flowdata, r, c , "bc_t"); + let bs_b = menuButton.checkstatus(Store.flowdata, r, c , "bs_b"); + let bc_b = menuButton.checkstatus(Store.flowdata, r, c , "bc_b"); + let bs_l = menuButton.checkstatus(Store.flowdata, r, c , "bs_l"); + let bc_l = menuButton.checkstatus(Store.flowdata, r, c , "bc_l"); + let bs_r = menuButton.checkstatus(Store.flowdata, r, c , "bs_r"); + let bc_r = menuButton.checkstatus(Store.flowdata, r, c , "bc_r"); + + //左边框 + if(bs_l!="none" || bs!="none"){ + let linetype = bs_l=="none" ?bs:bs_l; + + menuButton.setLineDash( + luckysheetTableContent, + linetype, + "v", + Store.devicePixelRatio * (start_c - 2+ 0.5 + offsetLeft), + Store.devicePixelRatio * (start_r + offsetTop), + Store.devicePixelRatio * (start_c - 2+ 0.5 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + offsetTop) + ); + + luckysheetTableContent.strokeStyle = bs_l == "none" ? bc : bc_l; + + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + } + + // //右边框 + if(bs_r!="none" || bs!="none"){ + let linetype = bs_r=="none" ?bs:bs_r; + + menuButton.setLineDash( + luckysheetTableContent, + linetype, + "v", + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (start_r + offsetTop), + Store.devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + offsetTop) + ); + + luckysheetTableContent.strokeStyle = bs_r == "none" ? bc : bc_r; + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + } + + //下边框 + if(bs_b!="none" || bs!="none"){ + let linetype = bs_b=="none" ?bs:bs_b; + + menuButton.setLineDash( + luckysheetTableContent, + linetype, + "h", + Store.devicePixelRatio * (start_c - 2 + offsetLeft), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop), + Store.devicePixelRatio * (end_c + offsetLeft-2), + Store.devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) + ); + + luckysheetTableContent.strokeStyle = bs_b == "none" ? bc : bc_b; + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + } + + //上边框 + if(bs_t!="none" || bs!="none"){ + let linetype = bs_t=="none" ?bs:bs_t; + + menuButton.setLineDash( + luckysheetTableContent, + linetype, + "h", + Store.devicePixelRatio * (start_c - 2 + offsetLeft), + Store.devicePixelRatio * (start_r - 1 + 0.5 + offsetTop), + Store.devicePixelRatio * (end_c + offsetLeft-2), + Store.devicePixelRatio * (start_r - 1 + 0.5 + offsetTop) + ); + + luckysheetTableContent.strokeStyle = bs_t == "none" ? bc : bc_t; + luckysheetTableContent.stroke(); + luckysheetTableContent.closePath(); + } + } +} + +export { + luckysheetDrawgrid, + luckysheetDrawgridRowTitle, + luckysheetDrawgridColumnTitle, + luckysheetDrawMain, + luckysheetDrawMain_back, +} \ No newline at end of file diff --git a/src/global/dynamicArray.js b/src/global/dynamicArray.js new file mode 100644 index 000000000..dc6a642b4 --- /dev/null +++ b/src/global/dynamicArray.js @@ -0,0 +1,138 @@ +import { getObjType } from '../utils/util'; +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; + +//动态数组计算 +function dynamicArrayCompute(dynamicArray) { + let dynamicArray_compute = {}; + + if(getObjType(dynamicArray) == "array"){ + for(let i = 0; i < dynamicArray.length; i++){ + let d_row = dynamicArray[i].r; + let d_col = dynamicArray[i].c; + let d_f = dynamicArray[i].f; + + if(Store.flowdata[d_row][d_col] != null && Store.flowdata[d_row][d_col].f != null && Store.flowdata[d_row][d_col].f == d_f){ + if((d_row + "_" + d_col) in dynamicArray_compute){ + dynamicArray_compute = dynamicArraySpillEditCompute(dynamicArray_compute, d_row , d_col); + } + + let d_data = dynamicArray[i].data; + let d_rowlen = d_data.length; + let d_collen = 1; + + if(getObjType(d_data[0]) == "array"){ + d_collen = d_data[0].length; + } + + if(dynamicArrayRangeIsAllNull({ "row": [d_row, d_row + d_rowlen - 1], "column": [d_col, d_col + d_collen - 1] }, Store.flowdata)){ + for(let x = 0; x < d_rowlen; x++){ + for(let y = 0; y < d_collen; y++){ + let rowIndex = d_row + x; + let colIndex = d_col + y; + + if(getObjType(d_data[0]) == "array"){ + dynamicArray_compute[rowIndex + "_" + colIndex] = {"v": d_data[x][y], "r": d_row, "c": d_col}; + } + else{ + dynamicArray_compute[rowIndex + "_" + colIndex] = {"v": d_data[x], "r": d_row, "c": d_col}; + } + } + } + } + else{ + dynamicArray_compute[d_row + "_" + d_col] = {"v": "#SPILL!", "r": d_row, "c": d_col}; + } + } + } + } + + return dynamicArray_compute; +} + +function dynamicArraySpillEditCompute(computeObj, r, c) { + let rowIndex = computeObj[r + "_" + c].r; + let colIndex = computeObj[r + "_" + c].c; + + for(let x in computeObj){ + if(x == (rowIndex + "_" + colIndex)){ + computeObj[x].v = "#SPILL!"; + } + else if(computeObj[x].r == rowIndex && computeObj[x].c == colIndex){ + delete computeObj[x]; + } + } + + return computeObj; +} + +//范围是否都是空单元格(除第一个单元格) +function dynamicArrayRangeIsAllNull(range, data) { + let r1 = range["row"][0], r2 = range["row"][1]; + let c1 = range["column"][0], c2 = range["column"][1]; + + let isAllNull = true; + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + if(!(r == r1 && c == c1) && data[r][c] != null && data[r][c].v != null && data[r][c].v.toString() != ""){ + isAllNull = false; + break; + } + } + } + + return isAllNull; +} + +//点击表格区域是否属于动态数组区域 +function dynamicArrayHightShow(r, c) { + let dynamicArray = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["dynamicArray"] == null ? [] : Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["dynamicArray"]; + let dynamicArray_compute = dynamicArrayCompute(dynamicArray); + + if((r + "_" + c) in dynamicArray_compute && dynamicArray_compute[r + "_" + c].v != "#SPILL!"){ + let d_row = dynamicArray_compute[r + "_" + c].r; + let d_col = dynamicArray_compute[r + "_" + c].c; + + let d_f = Store.flowdata[d_row][d_col].f; + + let rlen, clen; + for(let i = 0; i < dynamicArray.length; i++){ + if(dynamicArray[i].f == d_f){ + rlen = dynamicArray[i].data.length; + + if(getObjType(dynamicArray[i].data[0]) == "array"){ + clen = dynamicArray[i].data[0].length; + } + else{ + clen = 1; + } + } + } + + let d_row_end = d_row + rlen - 1; + let d_col_end = d_col + clen - 1; + + let row = Store.visibledatarow[d_row_end], + row_pre = d_row - 1 == -1 ? 0 : Store.visibledatarow[d_row - 1]; + let col = Store.visibledatacolumn[d_col_end], + col_pre = d_col - 1 == -1 ? 0 : Store.visibledatacolumn[d_col - 1]; + + $("#luckysheet-dynamicArray-hightShow").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1, + "display": "block" + }); + } + else{ + $("#luckysheet-dynamicArray-hightShow").hide(); + } +} + +export { + dynamicArrayCompute, + dynamicArraySpillEditCompute, + dynamicArrayRangeIsAllNull, + dynamicArrayHightShow, +} \ No newline at end of file diff --git a/src/global/editor.js b/src/global/editor.js new file mode 100644 index 000000000..54ada9b4b --- /dev/null +++ b/src/global/editor.js @@ -0,0 +1,162 @@ +import browser from './browser'; +import formula from './formula'; +import { datagridgrowth } from './getdata'; +import { jfrefreshgrid, jfrefreshgridall, jfrefreshrange } from './refresh'; +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; + +const editor = { + //worker+blob实现深拷贝替换extend + deepCopyFlowDataState:false, + deepCopyFlowDataCache:"", + deepCopyFlowDataWorker:null, + deepCopyFlowData:function(flowData){ + let _this = this; + + if(_this.deepCopyFlowDataState){ + if(_this.deepCopyFlowDataWorker != null){ + _this.deepCopyFlowDataWorker.terminate(); + } + return _this.deepCopyFlowDataCache; + } + else{ + if(flowData == null){ + flowData = Store.flowdata; + } + + return $.extend(true, [], flowData); + } + }, + webWorkerFlowDataCache:function(flowData){ + let _this = this; + + try{ + if(_this.deepCopyFlowDataWorker != null){//存新的webwork前先销毁以前的 + _this.deepCopyFlowDataWorker.terminate(); + } + + let funcTxt = 'data:text/javascript;chartset=US-ASCII,onmessage = function (e) { postMessage(e.data); };'; + _this.deepCopyFlowDataState = false; + + //适配IE + let worker; + if(browser.isIE() == 1){ + let response = "self.onmessage=function(e){postMessage(e.data);}"; + worker = new Worker('./plugins/Worker-helper.js'); + worker.postMessage(response); + } + else{ + worker = new Worker(funcTxt); + } + + _this.deepCopyFlowDataWorker = worker; + worker.postMessage(flowData); + worker.onmessage = function(e) { + _this.deepCopyFlowDataCache = e.data; + _this.deepCopyFlowDataState = true; + }; + } + catch(e){ + _this.deepCopyFlowDataCache = $.extend(true, [], flowData); + } + }, + controlHandler: function (dataChe) { + let _this = this; + + let d = _this.deepCopyFlowData(Store.flowdata);//取数据 + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let curR = last["row"] == null ? 0 : last["row"][0]; + let curC = last["column"] == null ? 0 : last["column"][0]; + let rlen = dataChe.length, clen = dataChe[0].length; + + let addr = curR + rlen - d.length, addc = curC + clen - d[0].length; + if(addr > 0 || addc > 0){ + d = datagridgrowth([].concat(d), addr, addc, true); + } + + for (let r = 0; r < rlen; r++) { + let x = [].concat(d[r + curR]); + for (let c = 0; c < clen; c++) { + let value = ""; + if (dataChe[r] != null && dataChe[r][c] != null) { + value = dataChe[r][c]; + } + x[c + curC] = value; + } + d[r + curR] = x; + } + + if (addr > 0 || addc > 0) { + jfrefreshgridall(d[0].length, d.length, d, null, Store.luckysheet_select_save, "datachangeAll"); + } + else { + jfrefreshrange(d, Store.luckysheet_select_save); + } + }, + clearRangeByindex: function (st_r, ed_r, st_c, ed_c, sheetIndex) { + let index = getSheetIndex(sheetIndex); + let d = $.extend(true, [], Store.luckysheetfile[index]["data"]); + + for (let r = st_r; r <= ed_r; r++) { + let x = [].concat(d[r]); + for (let c = st_c; c <= ed_c; c++) { + formula.delFunctionGroup(r, c); + formula.execFunctionGroup(r, c, ""); + x[c] = null; + } + d[r] = x; + } + + if(sheetIndex == Store.currentSheetIndex){ + let rlen = ed_r - st_r + 1, + clen = ed_c - st_c + 1; + + if (rlen > 5000) { + jfrefreshgrid(d, st_r, ed_r, st_c, ed_c); + } + else { + jfrefreshrange(d, { "row": [st_r, ed_r], "column": [st_c, ed_c] }); + } + } + else{ + Store.luckysheetfile[index]["data"] = d; + } + }, + controlHandlerD: function (dataChe) { + let _this = this; + + let d = _this.deepCopyFlowData(Store.flowdata);//取数据 + + let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; + let r1 = last["row"][0], r2 = last["row"][1]; + let c1 = last["column"][0], c2 = last["column"][1]; + let rlen = dataChe.length, clen = dataChe[0].length; + + let addr = r1 + rlen - d.length, addc = c1 + clen - d[0].length; + if(addr >0 || addc > 0){ + d = datagridgrowth([].concat(d), addr, addc, true); + } + + for(let r = r1; r <= r2; r++){ + for(let c = c1; c <= c2; c++){ + d[r][c] = null; + } + } + + for(let i = 0; i < rlen; i++){ + for(let j = 0; j < clen; j++){ + d[r1 + i][c1 + j] = dataChe[i][j]; + } + } + + let range = [ + { "row": [r1, r2], "column": [c1, c2] }, + { "row": [r1, r1 + rlen - 1], "column": [c1, c1 + clen - 1] } + ]; + + jfrefreshgrid(d, range); + } +}; + +export default editor; \ No newline at end of file diff --git a/src/global/extend.js b/src/global/extend.js new file mode 100644 index 000000000..34fcd5653 --- /dev/null +++ b/src/global/extend.js @@ -0,0 +1,1488 @@ +import editor from './editor'; +import formula from './formula'; +import { jfrefreshgrid_adRC, jfrefreshgrid_rhcw } from './refresh'; +import { datagridgrowth } from './getdata'; +import { setcellvalue } from './setdata'; +import luckysheetFreezen from '../controllers/freezen'; +import { selectHightlightShow } from '../controllers/select'; +import { luckysheet_searcharray } from '../controllers/sheetSearch'; +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; + +//增加行列 +function luckysheetextendtable(type, index, value, direction) { + let d = editor.deepCopyFlowData(Store.flowdata); + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + value = Math.floor(value); + let cfg = $.extend(true, {}, Store.config); + + //合并单元格配置变动 + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + let merge_new = {}; + for(let m in cfg["merge"]){ + let mc = cfg["merge"][m]; + + let r = mc.r, + c = mc.c, + rs = mc.rs, + cs = mc.cs; + + if(type == "row"){ + if(index < r){ + merge_new[(r + value) + "_" + c] = { "r": r + value, "c": c, "rs": rs, "cs": cs }; + } + else if(index == r){ + if(direction == "lefttop"){ + merge_new[(r + value) + "_" + c] = { "r": r + value, "c": c, "rs": rs, "cs": cs }; + } + else{ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs + value, "cs": cs }; + } + } + else if(index < r + rs - 1){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs + value, "cs": cs }; + } + else if(index == r + rs - 1){ + if(direction == "lefttop"){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs + value, "cs": cs }; + } + else{ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; + } + } + else{ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; + } + } + else if(type == "column"){ + if(index < c){ + merge_new[r + "_" + (c + value)] = { "r": r, "c": c + value, "rs": rs, "cs": cs }; + } + else if(index == c){ + if(direction == "lefttop"){ + merge_new[r + "_" + (c + value)] = { "r": r, "c": c + value, "rs": rs, "cs": cs }; + } + else{ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs + value }; + } + } + else if(index < c + cs - 1){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs + value }; + } + else if(index == c + cs - 1){ + if(direction == "lefttop"){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs + value }; + } + else{ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; + } + } + else{ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; + } + } + } + cfg["merge"] = merge_new; + + //公式配置变动 + let calcChain = file.calcChain; + let newCalcChain = []; + if(calcChain != null && calcChain.length > 0){ + for(let i = 0; i < calcChain.length; i++){ + let calc = $.extend(true, {}, calcChain[i]); + let calc_r = calc.r, calc_c = calc.c, calc_i = calc.index, calc_funcStr = calc.func[2]; + + if(type == "row"){ + let functionStr = "=" + formula.functionStrChange(calc_funcStr, "add", "row", direction, index, value); + + if(d[calc_r][calc_c].f == calc_funcStr){ + d[calc_r][calc_c].f = functionStr; + } + + calc.func[2] = functionStr; + + if(direction == "lefttop"){ + if(calc_r >= index){ + calc.r += value; + } + } + else if(direction == "rightbottom"){ + if(calc_r > index){ + calc.r += value; + } + } + + newCalcChain.push(calc); + } + else if(type == "column"){ + let functionStr = "=" + formula.functionStrChange(calc_funcStr, "add", "col", direction, index, value); + + if(d[calc_r][calc_c].f == calc_funcStr){ + d[calc_r][calc_c].f = functionStr; + } + + calc.func[2] = functionStr; + + if(direction == "lefttop"){ + if(calc_c >= index){ + calc.c += value; + } + } + else if(direction == "rightbottom"){ + if(calc_c > index){ + calc.c += value; + } + } + + newCalcChain.push(calc); + } + } + } + + //筛选配置变动 + let filter_select = file.filter_select; + let filter = file.filter; + let newFilterObj = null; + if(filter_select != null && JSON.stringify(filter_select) != "{}"){ + newFilterObj = { "filter_select": null, "filter": null }; + + let f_r1 = filter_select.row[0], f_r2 = filter_select.row[1]; + let f_c1 = filter_select.column[0], f_c2 = filter_select.column[1]; + + if(type == "row"){ + if(f_r1 < index){ + if(f_r2 == index && direction == "lefttop"){ + f_r2 += value; + } + else if(f_r2 > index){ + f_r2 += value; + } + } + else if(f_r1 == index){ + if(direction == "lefttop"){ + f_r1 += value; + f_r2 += value; + } + else if(direction == "rightbottom" && f_r2 > index){ + f_r2 += value; + } + } + else{ + f_r1 += value; + f_r2 += value; + } + + if(filter != null){ + newFilterObj.filter = {}; + + for(let k in filter){ + let f_rowhidden = filter[k].rowhidden; + let f_rowhidden_new = {}; + + for(let n in f_rowhidden){ + n = parseFloat(n); + + if(n < index){ + f_rowhidden_new[n] = 0; + } + else if(n == index){ + if(direction == "lefttop"){ + f_rowhidden_new[n + value] = 0; + } + else if(direction == "rightbottom"){ + f_rowhidden_new[n] = 0; + } + } + else{ + f_rowhidden_new[n + value] = 0; + } + } + + newFilterObj.filter[k] = $.extend(true, {}, filter[k]); + newFilterObj.filter[k].rowhidden = f_rowhidden_new; + newFilterObj.filter[k].str = f_r1; + newFilterObj.filter[k].edr = f_r2; + } + } + } + else if(type == "column"){ + if(f_c1 < index){ + if(f_c2 == index && direction == "lefttop"){ + f_c2 += value; + } + else if(f_c2 > index){ + f_c2 += value; + } + } + else if(f_c1 == index){ + if(direction == "lefttop"){ + f_c1 += value; + f_c2 += value; + } + else if(direction == "rightbottom" && f_c2 > index){ + f_c2 += value; + } + } + else{ + f_c1 += value; + f_c2 += value; + } + + if(filter != null){ + newFilterObj.filter = {}; + + for(let k in filter){ + let f_cindex = filter[k].cindex; + + if(f_cindex == index && direction == "lefttop"){ + f_cindex += value; + } + else if(f_cindex > index){ + f_cindex += value; + } + + newFilterObj.filter[f_cindex - f_c1] = $.extend(true, {}, filter[k]); + newFilterObj.filter[f_cindex - f_c1].cindex = f_cindex; + newFilterObj.filter[f_cindex - f_c1].stc = f_c1; + newFilterObj.filter[f_cindex - f_c1].edc = f_c2; + } + } + } + + newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; + } + + if(newFilterObj != null && newFilterObj.filter != null){ + cfg["rowhidden"] = {}; + + for(let k in newFilterObj.filter){ + let f_rowhidden = newFilterObj.filter[k].rowhidden; + + for(let n in f_rowhidden){ + cfg["rowhidden"][n] = 0; + } + } + } + else{ + delete cfg["rowhidden"]; + } + + //条件格式配置变动 + let CFarr = file.luckysheet_conditionformat_save; + let newCFarr = []; + if(CFarr != null && CFarr.length > 0){ + for(let i = 0; i < CFarr.length; i++){ + let cf_range = CFarr[i].cellrange; + let cf_new_range = []; + + for(let j = 0; j < cf_range.length; j++){ + let CFr1 = cf_range[j].row[0], + CFr2 = cf_range[j].row[1], + CFc1 = cf_range[j].column[0], + CFc2 = cf_range[j].column[1]; + + if(type == "row"){ + if(CFr1 < index){ + if(CFr2 == index && direction == "lefttop"){ + CFr2 += value; + } + else if(CFr2 > index){ + CFr2 += value; + } + } + else if(CFr1 == index){ + if(direction == "lefttop"){ + CFr1 += value; + CFr2 += value; + } + else if(direction == "rightbottom" && CFr2 > index){ + CFr2 += value; + } + } + else{ + CFr1 += value; + CFr2 += value; + } + } + else if(type == "column"){ + if(CFc1 < index){ + if(CFc2 == index && direction == "lefttop"){ + CFc2 += value; + } + else if(CFc2 > index){ + CFc2 += value; + } + } + else if(CFc1 == index){ + if(direction == "lefttop"){ + CFc1 += value; + CFc2 += value; + } + else if(direction == "rightbottom" && CFc2 > index){ + CFc2 += value; + } + } + else{ + CFc1 += value; + CFc2 += value; + } + } + + cf_new_range.push({ "row": [CFr1, CFr2], "column": [CFc1, CFc2] }); + } + + let cf = $.extend(true, {}, CFarr[i]); + cf.cellrange = cf_new_range; + + newCFarr.push(cf); + } + } + + //交替颜色配置变动 + let AFarr = file.luckysheet_alternateformat_save; + let newAFarr = []; + if(AFarr != null && AFarr.length > 0){ + for(let i = 0; i < AFarr.length; i++){ + let AFr1 = AFarr[i].cellrange.row[0], + AFr2 = AFarr[i].cellrange.row[1], + AFc1 = AFarr[i].cellrange.column[0], + AFc2 = AFarr[i].cellrange.column[1]; + + let af = $.extend(true, {}, AFarr[i]); + + if(type == "row"){ + if(AFr1 < index){ + if(AFr2 == index && direction == "lefttop"){ + AFr2 += value; + } + else if(AFr2 > index){ + AFr2 += value; + } + } + else if(AFr1 == index){ + if(direction == "lefttop"){ + AFr1 += value; + AFr2 += value; + } + else if(direction == "rightbottom" && AFr2 > index){ + AFr2 += value; + } + } + else{ + AFr1 += value; + AFr2 += value; + } + } + else if(type == "column"){ + if(AFc1 < index){ + if(AFc2 == index && direction == "lefttop"){ + AFc2 += value; + } + else if(AFc2 > index){ + AFc2 += value; + } + } + else if(AFc1 == index){ + if(direction == "lefttop"){ + AFc1 += value; + AFc2 += value; + } + else if(direction == "rightbottom" && AFc2 > index){ + AFc2 += value; + } + } + else{ + AFc1 += value; + AFc2 += value; + } + } + + af.cellrange = { "row": [AFr1, AFr2], "column": [AFc1, AFc2] }; + + newAFarr.push(af); + } + } + + //冻结配置变动 + let newFreezen = { "freezenhorizontaldata": null, "freezenverticaldata": null }; + if(luckysheetFreezen.freezenhorizontaldata != null && type == "row"){ + let freezen_scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + let freezen_row_st = luckysheetFreezen.freezenhorizontaldata[1] - 1; + + if(freezen_row_st == index && direction == "lefttop"){ + freezen_row_st += value; + } + else if(freezen_row_st > index){ + freezen_row_st += value; + } + + let freezen_top = Store.visibledatarow[freezen_row_st] - 2 - freezen_scrollTop + Store.columeHeaderHeight; + + newFreezen.freezenhorizontaldata = [ + Store.visibledatarow[freezen_row_st], + freezen_row_st + 1, + freezen_scrollTop, + luckysheetFreezen.cutVolumn(Store.visibledatarow, freezen_row_st + 1), + freezen_top + ]; + } + else{ + newFreezen.freezenhorizontaldata = luckysheetFreezen.freezenhorizontaldata; + } + + if(luckysheetFreezen.freezenverticaldata != null && type == "column"){ + let freezen_scrollLeft = luckysheetFreezen.freezenverticaldata[2]; + let freezen_col_st = luckysheetFreezen.freezenverticaldata[1] - 1; + + if(freezen_col_st == index && direction == "lefttop"){ + freezen_col_st += value; + } + else if(freezen_col_st > index){ + freezen_col_st += value; + } + + let freezen_left = Store.visibledatacolumn[freezen_col_st] - 2 - freezen_scrollLeft + Store.rowHeaderWidth; + + newFreezen.freezenverticaldata = [ + Store.visibledatacolumn[freezen_col_st], + freezen_col_st + 1, + freezen_scrollLeft, + luckysheetFreezen.cutVolumn(Store.visibledatacolumn, freezen_col_st + 1), + freezen_left + ]; + } + else{ + newFreezen.freezenverticaldata = luckysheetFreezen.freezenverticaldata; + } + + let type1; + if (type == "row") { + type1 = "r"; + + //行高配置变动 + if(cfg["rowlen"] != null){ + let rowlen_new = {}; + + for(let r in cfg["rowlen"]){ + r = parseFloat(r); + + if(r < index){ + rowlen_new[r] = cfg["rowlen"][r]; + } + else if(r == index){ + if(direction == "lefttop"){ + rowlen_new[(r + value)] = cfg["rowlen"][r]; + } + else if(direction == "rightbottom"){ + rowlen_new[r] = cfg["rowlen"][r]; + } + } + else{ + rowlen_new[(r + value)] = cfg["rowlen"][r]; + } + } + + cfg["rowlen"] = rowlen_new; + } + + //空行模板 + let row = []; + for(let c = 0; c < d[0].length; c++){ + row.push(null); + } + + //边框 + if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ + let borderInfo = []; + + for(let i = 0; i < cfg["borderInfo"].length; i++){ + let rangeType = cfg["borderInfo"][i].rangeType; + + if(rangeType == "range"){ + let borderRange = cfg["borderInfo"][i].range; + + let emptyRange = []; + + for(let j = 0; j < borderRange.length; j++){ + let bd_r1 = borderRange[j].row[0], + bd_r2 = borderRange[j].row[1]; + + if(direction == "lefttop"){ + if(index <= bd_r1){ + bd_r1 += value; + bd_r2 += value; + } + else if(index <= bd_r2){ + bd_r2 += value; + } + } + else{ + if(index < bd_r1){ + bd_r1 += value; + bd_r2 += value; + } + else if(index < bd_r2){ + bd_r2 += value; + } + } + + if(bd_r2 >= bd_r1){ + emptyRange.push({ "row": [bd_r1, bd_r2], "column": borderRange[j].column }); + } + } + + if(emptyRange.length > 0){ + let bd_obj = { + "rangeType": "range", + "borderType": cfg["borderInfo"][i].borderType, + "style": cfg["borderInfo"][i].style, + "color": cfg["borderInfo"][i].color, + "range": emptyRange + } + + borderInfo.push(bd_obj); + } + } + else if(rangeType == "cell"){ + let row_index = cfg["borderInfo"][i].value.row_index; + + if(direction == "lefttop"){ + if(index <= row_index){ + row_index += value; + } + } + else{ + if(index < row_index){ + row_index += value; + } + } + + cfg["borderInfo"][i].value.row_index = row_index; + borderInfo.push(cfg["borderInfo"][i]); + } + } + + cfg["borderInfo"] = borderInfo; + } + + let arr = []; + for (let r = 0; r < value; r++) { + arr.push(JSON.stringify(row)); + } + + if(direction == "lefttop"){ + if(index == 0){ + eval('d.unshift(' + arr.join(",") + ')'); + } + else{ + eval('d.splice(' + index + ', 0, ' + arr.join(",") + ')'); + } + } + else{ + eval('d.splice(' + (index + 1) + ', 0, ' + arr.join(",") + ')'); + } + } + else { + type1 = "c"; + + //行高配置变动 + if(cfg["columlen"] != null){ + let columlen_new = {}; + + for(let c in cfg["columlen"]){ + c = parseFloat(c); + + if(c < index){ + columlen_new[c] = cfg["columlen"][c]; + } + else if(c == index){ + if(direction == "lefttop"){ + columlen_new[(c + value)] = cfg["columlen"][c]; + } + else if(direction == "rightbottom"){ + columlen_new[c] = cfg["columlen"][c]; + } + } + else{ + columlen_new[(c + value)] = cfg["columlen"][c]; + } + } + + cfg["columlen"] = columlen_new; + } + + //空列模板 + let col = []; + for(let r = 0; r < d.length; r++){ + col.push(null); + } + + //边框 + if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ + let borderInfo = []; + + for(let i = 0; i < cfg["borderInfo"].length; i++){ + let rangeType = cfg["borderInfo"][i].rangeType; + + if(rangeType == "range"){ + let borderRange = cfg["borderInfo"][i].range; + + let emptyRange = []; + + for(let j = 0; j < borderRange.length; j++){ + let bd_c1 = borderRange[j].column[0], + bd_c2 = borderRange[j].column[1]; + + if(direction == "lefttop"){ + if(index <= bd_c1){ + bd_c1 += value; + bd_c2 += value; + } + else if(index <= bd_c2){ + bd_c2 += value; + } + } + else{ + if(index < bd_c1){ + bd_c1 += value; + bd_c2 += value; + } + else if(index < bd_c2){ + bd_c2 += value; + } + } + + if(bd_c2 >= bd_c1){ + emptyRange.push({ "row": borderRange[j].row, "column": [bd_c1, bd_c2] }); + } + } + + if(emptyRange.length > 0){ + let bd_obj = { + "rangeType": "range", + "borderType": cfg["borderInfo"][i].borderType, + "style": cfg["borderInfo"][i].style, + "color": cfg["borderInfo"][i].color, + "range": emptyRange + } + + borderInfo.push(bd_obj); + } + } + else if(rangeType == "cell"){ + let col_index = cfg["borderInfo"][i].value.col_index; + + if(direction == "lefttop"){ + if(index <= col_index){ + col_index += value; + } + } + else{ + if(index < col_index){ + col_index += value; + } + } + + cfg["borderInfo"][i].value.col_index = col_index; + borderInfo.push(cfg["borderInfo"][i]); + } + } + + cfg["borderInfo"] = borderInfo; + } + + for (let r = 0; r < d.length; r++) { + let row = d[r]; + + for(let i = 0; i < value; i++){ + if(direction == "lefttop"){ + if(index == 0){ + row.unshift(col[r]); + } + else{ + row.splice(index, 0, col[r]); + } + } + else{ + row.splice((index + 1), 0, col[r]); + } + } + } + } + + jfrefreshgrid_adRC( + d, + cfg, + "addRC", + { "index": index, "len": value, "direction": direction, "rc": type1, "restore": false }, + newCalcChain, + newFilterObj, + newCFarr, + newAFarr, + newFreezen + ); + + let range = null; + if(type == "row"){ + if(direction == "lefttop"){ + range = [{ "row": [index, index + value - 1], "column": [0 , d[0].length - 1] }]; + } + else{ + range = [{ "row": [index + 1, index + value], "column": [0 , d[0].length - 1] }]; + } + } + else{ + if(direction == "lefttop"){ + range = [{ "row": [0, d.length - 1], "column": [index, index + value - 1] }]; + } + else{ + range = [{ "row": [0, d.length - 1], "column": [index + 1, index + value] }]; + } + } + + Store.luckysheet_select_save = range; + selectHightlightShow(); + + if (type == "row"){ + let scrollLeft = $("#luckysheet-cell-main").scrollLeft(), + scrollTop = $("#luckysheet-cell-main").scrollTop(); + let winH = $("#luckysheet-cell-main").height(), + winW = $("#luckysheet-cell-main").width(); + + let row = Store.visibledatarow[range[0].row[1]], + row_pre = range[0].row[0] - 1 == -1 ? 0 : Store.visibledatarow[range[0].row[0] - 1]; + + if (row - scrollTop - winH + 20 > 0) { + $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); + } + else if (row_pre - scrollTop - 20 < 0) { + $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); + } + + if(value > 30){ + $("#luckysheet-row-count-show").hide(); + $("#luckysheet-column-count-show").hide(); + } + } +} + +function luckysheetextendData(rowlen, newData) { + let d = editor.deepCopyFlowData(Store.flowdata); + + let cfg = $.extend(true, {}, Store.config); + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + let collen = d[0].length; + let addNullData = datagridgrowth([], rowlen, collen); + + d = d.concat(addNullData); + + for(let i = 0; i < newData.length; i++){ + let r = newData[i].r, + c = newData[i].c, + v = newData[i].v; + + setcellvalue(r, c, d, v); + + if(v != null && v.mc != null && v.mc.rs != null){ + cfg["merge"][v.mc.r + "_" + v.mc.c] = $.extend(true, {}, v.mc); + } + } + + //luckysheet.flowdata + Store.flowdata = d; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = d; + + //config + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + //行高、列宽刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); +} + +function luckysheetdeletetable(type, st, ed) { + let d = editor.deepCopyFlowData(Store.flowdata); + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + let slen = ed - st + 1; + let cfg = $.extend(true, {}, Store.config); + + //合并单元格配置变动 + if(cfg["merge"] == null){ + cfg["merge"] = {}; + } + + let merge_new = {}; + for(let m in cfg["merge"]){ + let mc = cfg["merge"][m]; + + let r = mc.r, + c = mc.c, + rs = mc.rs, + cs = mc.cs; + + if(type == "row"){ + if(r < st){ + if(r + rs - 1 < st){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; + } + else if(r + rs - 1 >= st && r + rs - 1 < ed){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": st - r, "cs": cs }; + } + else if(r + rs - 1 >= ed){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs - slen, "cs": cs }; + } + } + else if(r >= st && r <= ed){ + if(r + rs - 1 > ed){ + merge_new[st + "_" + c] = { "r": st, "c": c, "rs": r + rs - 1 - ed, "cs": cs }; + } + } + else if(r > ed){ + merge_new[(r - slen) + "_" + c] = { "r": r - slen, "c": c, "rs": rs, "cs": cs }; + } + } + else if(type == "column"){ + if(c < st){ + if(c + cs - 1 < st){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; + } + else if(c + cs - 1 >= st && c + cs - 1 < ed){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": st - c }; + } + else if(c + cs - 1 >= ed){ + merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs - slen }; + } + } + else if(c >= st && c <= ed){ + if(c + cs - 1 > ed){ + merge_new[r + "_" + st] = { "r": r, "c": st, "rs": rs, "cs": c + cs - 1 - ed }; + } + } + else if(c > ed){ + merge_new[r + "_" + (c - slen)] = { "r": r, "c": c - slen, "rs": rs, "cs": cs }; + } + } + } + cfg["merge"] = merge_new; + + //公式配置变动 + let calcChain = file.calcChain; + let newCalcChain = []; + if(calcChain != null && calcChain.length > 0){ + for(let i = 0; i < calcChain.length; i++){ + let calc = $.extend(true, {}, calcChain[i]); + let calc_r = calc.r, calc_c = calc.c, calc_i = calc.index, calc_funcStr = calc.func[2]; + + if(type == "row"){ + if(calc_r < st || calc_r > ed){ + let functionStr = "=" + formula.functionStrChange(calc_funcStr, "del", "row", null, st, slen); + + if(d[calc_r][calc_c].f == calc_funcStr){ + d[calc_r][calc_c].f = functionStr; + } + + calc.func[2] = functionStr; + + if(calc_r > ed){ + calc.r = calc_r - slen; + } + + newCalcChain.push(calc); + } + } + else if(type == "column"){ + if(calc_c < st || calc_c > ed){ + let functionStr = "=" + formula.functionStrChange(calc_funcStr, "del", "col", null, st, slen); + + if(d[calc_r][calc_c].f == calc_funcStr){ + d[calc_r][calc_c].f = functionStr; + } + + calc.func[2] = functionStr; + + if(calc_c > ed){ + calc.c = calc_c - slen; + } + + newCalcChain.push(calc); + } + } + } + } + + //筛选配置变动 + let filter_select = file.filter_select; + let filter = file.filter; + let newFilterObj = null; + if(filter_select != null && JSON.stringify(filter_select) != "{}"){ + newFilterObj = { "filter_select": null, "filter": null }; + + let f_r1 = filter_select.row[0], f_r2 = filter_select.row[1]; + let f_c1 = filter_select.column[0], f_c2 = filter_select.column[1]; + + if(type == "row"){ + if(f_r1 > ed){ + f_r1 -= slen; + f_r2 -= slen; + + newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; + } + else if(f_r1 < st){ + if(f_r2 < st){ + + } + else if(f_r2 <= ed){ + f_r2 = st - 1; + } + else{ + f_r2 -= slen; + } + + newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; + } + + if(newFilterObj.filter_select != null && filter != null){ + for(let k in filter){ + let f_rowhidden = filter[k].rowhidden; + let f_rowhidden_new = {}; + + for(let n in f_rowhidden){ + if(n < st){ + f_rowhidden_new[n] = 0; + } + else if(n > ed){ + f_rowhidden_new[n - slen] = 0; + } + } + + if(JSON.stringify(f_rowhidden_new) != "{}"){ + if(newFilterObj.filter == null){ + newFilterObj.filter = {}; + } + + newFilterObj.filter[k] = $.extend(true, {}, filter[k]); + newFilterObj.filter[k].rowhidden = f_rowhidden_new; + newFilterObj.filter[k].str = f_r1; + newFilterObj.filter[k].edr = f_r2; + } + } + } + } + else if(type == "column"){ + if(f_c1 > ed){ + f_c1 -= slen; + f_c2 -= slen; + + newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; + } + else if(f_c1 < st){ + if(f_c2 < st){ + + } + else if(f_c2 <= ed){ + f_c2 = st - 1; + } + else{ + f_c2 -= slen; + } + + newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; + } + else{ + if(f_c2 > ed){ + f_c1 = st; + f_c2 -= slen; + + newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; + } + } + + if(newFilterObj.filter_select != null && filter != null){ + for(let k in filter){ + let f_cindex = filter[k].cindex; + + if(f_cindex < st){ + if(newFilterObj.filter == null){ + newFilterObj.filter = {}; + } + + newFilterObj.filter[f_cindex - f_c1] = $.extend(true, {}, filter[k]); + newFilterObj.filter[f_cindex - f_c1].edc = f_c2; + } + else if(f_cindex > ed){ + f_cindex -= slen; + + if(newFilterObj.filter == null){ + newFilterObj.filter = {}; + } + + newFilterObj.filter[f_cindex - f_c1] = $.extend(true, {}, filter[k]); + newFilterObj.filter[f_cindex - f_c1].cindex = f_cindex; + newFilterObj.filter[f_cindex - f_c1].stc = f_c1; + newFilterObj.filter[f_cindex - f_c1].edc = f_c2; + } + } + } + } + } + + if(newFilterObj != null && newFilterObj.filter != null){ + cfg["rowhidden"] = {}; + + for(let k in newFilterObj.filter){ + let f_rowhidden = newFilterObj.filter[k].rowhidden; + + for(let n in f_rowhidden){ + cfg["rowhidden"][n] = 0; + } + } + } + else{ + delete cfg["rowhidden"]; + } + + //条件格式配置变动 + let CFarr = file.luckysheet_conditionformat_save; + let newCFarr = []; + if(CFarr != null && CFarr.length > 0){ + for(let i = 0; i < CFarr.length; i++){ + let cf_range = CFarr[i].cellrange; + let cf_new_range = []; + + for(let j = 0; j < cf_range.length; j++){ + let CFr1 = cf_range[j].row[0], + CFr2 = cf_range[j].row[1], + CFc1 = cf_range[j].column[0], + CFc2 = cf_range[j].column[1]; + + if(type == "row"){ + if(!(CFr1 >= st && CFr2 <= ed)){ + if(CFr1 > ed){ + CFr1 -= slen; + CFr2 -= slen; + } + else if(CFr1 < st){ + if(CFr2 < st){ + + } + else if(CFr2 <= ed){ + CFr2 = st - 1; + } + else{ + CFr2 -= slen; + } + } + else{ + if(CFr2 > ed){ + CFr1 = st; + CFr2 -= slen; + } + } + + cf_new_range.push({ "row": [CFr1, CFr2], "column": [CFc1, CFc2] }); + } + } + else if(type == "column"){ + if(!(CFc1 >= st && CFc2 <= ed)){ + if(CFc1 > ed){ + CFc1 -= slen; + CFc2 -= slen; + } + else if(CFc1 < st){ + if(CFc2 < st){ + + } + else if(CFc2 <= ed){ + CFc2 = st - 1; + } + else{ + CFc2 -= slen; + } + } + else{ + if(CFc2 > ed){ + CFc1 = st; + CFc2 -= slen; + } + } + + cf_new_range.push({ "row": [CFr1, CFr2], "column": [CFc1, CFc2] }); + } + } + } + + if(cf_new_range.length > 0){ + let cf = $.extend(true, {}, CFarr[i]); + cf.cellrange = cf_new_range; + + newCFarr.push(cf); + } + } + } + + //交替颜色配置变动 + let AFarr = file.luckysheet_alternateformat_save; + let newAFarr = []; + if(AFarr != null && AFarr.length > 0){ + for(let i = 0; i < AFarr.length; i++){ + let AFr1 = AFarr[i].cellrange.row[0], + AFr2 = AFarr[i].cellrange.row[1], + AFc1 = AFarr[i].cellrange.column[0], + AFc2 = AFarr[i].cellrange.column[1]; + + if(type == "row"){ + if(!(AFr1 >= st && AFr2 <= ed)){ + let af = $.extend(true, {}, AFarr[i]); + + if(AFr1 > ed){ + AFr1 -= slen; + AFr2 -= slen; + } + else if(AFr1 < st){ + if(AFr2 < st){ + + } + else if(AFr2 <= ed){ + AFr2 = st - 1; + } + else{ + AFr2 -= slen; + } + } + else{ + if(AFr2 > ed){ + AFr1 = st; + AFr2 -= slen; + } + } + + af.cellrange = { "row": [AFr1, AFr2], "column": [AFc1, AFc2] }; + + newAFarr.push(af); + } + } + else if(type == "column"){ + if(!(AFc1 >= st && AFc2 <= ed)){ + let af = $.extend(true, {}, AFarr[i]); + + if(AFc1 > ed){ + AFc1 -= slen; + AFc2 -= slen; + } + else if(AFc1 < st){ + if(AFc2 < st){ + + } + else if(AFc2 <= ed){ + AFc2 = st - 1; + } + else{ + AFc2 -= slen; + } + } + else{ + if(AFc2 > ed){ + AFc1 = st; + AFc2 -= slen; + } + } + + af.cellrange = { "row": [AFr1, AFr2], "column": [AFc1, AFc2] }; + + newAFarr.push(af); + } + } + } + } + + //冻结配置变动 + let newFreezen = { "freezenhorizontaldata": null, "freezenverticaldata": null }; + if(luckysheetFreezen.freezenhorizontaldata != null && type == "row"){ + let freezen_scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + let freezen_st = luckysheet_searcharray(Store.visibledatarow, freezen_scrollTop); + if(freezen_st == -1){ + freezen_st = 0; + } + + let freezen_row_st = luckysheetFreezen.freezenhorizontaldata[1] - 1; + + if(freezen_row_st >= st){ + if(freezen_row_st < ed){ + freezen_row_st = st - 1; + } + else{ + freezen_row_st -= slen; + } + } + + if(freezen_row_st < freezen_st){ + freezen_row_st = freezen_st; + } + + let freezen_top = Store.visibledatarow[freezen_row_st] - 2 - freezen_scrollTop + Store.columeHeaderHeight; + + newFreezen.freezenhorizontaldata = [ + Store.visibledatarow[freezen_row_st], + freezen_row_st + 1, + freezen_scrollTop, + luckysheetFreezen.cutVolumn(Store.visibledatarow, freezen_row_st + 1), + freezen_top + ]; + } + else{ + newFreezen.freezenhorizontaldata = luckysheetFreezen.freezenhorizontaldata; + } + + if(luckysheetFreezen.freezenverticaldata != null && type == "column"){ + let freezen_scrollLeft = luckysheetFreezen.freezenverticaldata[2]; + let freezen_st2 = luckysheet_searcharray(Store.visibledatacolumn, freezen_scrollLeft); + if(freezen_st2 == -1){ + freezen_st2 = 0; + } + + let freezen_col_st = luckysheetFreezen.freezenverticaldata[1] - 1; + + if(freezen_col_st >= st){ + if(freezen_col_st < ed){ + freezen_col_st = st - 1; + } + else{ + freezen_col_st -= slen; + } + } + + if(freezen_col_st < freezen_st2){ + freezen_col_st = freezen_st2; + } + + let freezen_left = Store.visibledatacolumn[freezen_col_st] - 2 - freezen_scrollLeft + Store.rowHeaderWidth; + + newFreezen.freezenverticaldata = [ + Store.visibledatacolumn[freezen_col_st], + freezen_col_st + 1, + freezen_scrollLeft, + luckysheetFreezen.cutVolumn(Store.visibledatacolumn, freezen_col_st + 1), + freezen_left + ]; + } + else{ + newFreezen.freezenverticaldata = luckysheetFreezen.freezenverticaldata; + } + + //主逻辑 + let type1; + if (type == "row") { + type1 = "r"; + + //行高配置变动 + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + let rowlen_new = {}; + for(let r in cfg["rowlen"]){ + if(r < st){ + rowlen_new[r] = cfg["rowlen"][r]; + } + else if(r > ed){ + rowlen_new[r - slen] = cfg["rowlen"][r]; + } + } + + cfg["rowlen"] = rowlen_new; + + //边框配置变动 + if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ + let borderInfo = []; + + for(let i = 0; i < cfg["borderInfo"].length; i++){ + let rangeType = cfg["borderInfo"][i].rangeType; + + if(rangeType == "range"){ + let borderRange = cfg["borderInfo"][i].range; + + let emptyRange = []; + + for(let j = 0; j < borderRange.length; j++){ + let bd_r1 = borderRange[j].row[0], + bd_r2 = borderRange[j].row[1]; + + for(let r = st; r <= ed; r++){ + if(r < borderRange[j].row[0]){ + bd_r1 -= 1; + bd_r2 -= 1; + } + else if(r <= borderRange[j].row[1]){ + bd_r2 -= 1; + } + } + + if(bd_r2 >= bd_r1){ + emptyRange.push({ "row": [bd_r1, bd_r2], "column": borderRange[j].column }); + } + } + + if(emptyRange.length > 0){ + let bd_obj = { + "rangeType": "range", + "borderType": cfg["borderInfo"][i].borderType, + "style": cfg["borderInfo"][i].style, + "color": cfg["borderInfo"][i].color, + "range": emptyRange + } + + borderInfo.push(bd_obj); + } + } + else if(rangeType == "cell"){ + let row_index = cfg["borderInfo"][i].value.row_index; + + if(row_index < st){ + borderInfo.push(cfg["borderInfo"][i]); + } + else if(row_index > ed){ + cfg["borderInfo"][i].value.row_index = row_index - (ed - st + 1); + borderInfo.push(cfg["borderInfo"][i]); + } + } + } + + cfg["borderInfo"] = borderInfo; + } + + //删除选中行 + d.splice(st, slen); + + //空白行模板 + let row = []; + for (let c = 0; c < d[0].length; c++) { + row.push(null); + } + + //删除多少行,增加多少行空白行 + for (let r = 0; r < slen; r++) { + d.push(row); + } + } + else { + type1 = "c"; + + //列宽配置变动 + if(cfg["columlen"] == null){ + cfg["columlen"] = {}; + } + + let columlen_new = {}; + for(let c in cfg["columlen"]){ + if(c < st){ + columlen_new[c] = cfg["columlen"][c]; + } + else if(c > ed){ + columlen_new[c - slen] = cfg["columlen"][c]; + } + } + + cfg["columlen"] = columlen_new; + + //边框配置变动 + if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ + let borderInfo = []; + + for(let i = 0; i < cfg["borderInfo"].length; i++){ + let rangeType = cfg["borderInfo"][i].rangeType; + + if(rangeType == "range"){ + let borderRange = cfg["borderInfo"][i].range; + + let emptyRange = []; + + for(let j = 0; j < borderRange.length; j++){ + let bd_c1 = borderRange[j].column[0], + bd_c2 = borderRange[j].column[1]; + + for(let c = st; c <= ed; c++){ + if(c < borderRange[j].column[0]){ + bd_c1 -= 1; + bd_c2 -= 1; + } + else if(c <= borderRange[j].column[1]){ + bd_c2 -= 1; + } + } + + if(bd_c2 >= bd_c1){ + emptyRange.push({ "row": borderRange[j].row, "column": [bd_c1, bd_c2] }); + } + } + + if(emptyRange.length > 0){ + let bd_obj = { + "rangeType": "range", + "borderType": cfg["borderInfo"][i].borderType, + "style": cfg["borderInfo"][i].style, + "color": cfg["borderInfo"][i].color, + "range": emptyRange + } + + borderInfo.push(bd_obj); + } + } + else if(rangeType == "cell"){ + let col_index = cfg["borderInfo"][i].value.col_index; + + if(col_index < st){ + borderInfo.push(cfg["borderInfo"][i]); + } + else if(col_index > ed){ + cfg["borderInfo"][i].value.col_index = col_index - (ed - st + 1); + borderInfo.push(cfg["borderInfo"][i]); + } + } + } + + cfg["borderInfo"] = borderInfo; + } + + //空白列模板 + let addcol = []; + for (let r = 0; r < slen; r++) { + addcol.push(null); + } + + for (let r = 0; r < d.length; r++) { + let row = [].concat(d[r]); + + //删除选中列 + row.splice(st, slen); + + d[r] = row.concat(addcol); + } + } + + jfrefreshgrid_adRC( + d, + cfg, + "delRC", + { "index": st, "len": ed - st + 1, "rc": type1 }, + newCalcChain, + newFilterObj, + newCFarr, + newAFarr, + newFreezen + ); +} + +export { + luckysheetextendtable, + luckysheetextendData, + luckysheetdeletetable, +} \ No newline at end of file diff --git a/src/global/format.js b/src/global/format.js new file mode 100644 index 000000000..21e54b773 --- /dev/null +++ b/src/global/format.js @@ -0,0 +1,1935 @@ +import { isRealNum, valueIsError } from './validate'; +import { isdatetime } from './datecontroll'; +import { getcellvalue } from './getdata'; + +var SSF = ({}); + +var make_ssf = function make_ssf(SSF) { + SSF.version = '0.10.2'; + + function _strrev(x) { + var o = "", + i = x.length - 1; + while (i >= 0) o += x.charAt(i--); + return o; + } + + function fill(c, l) { + var o = ""; + while (o.length < l) o += c; + return o; + } + + function pad0(v, d) { + var t = "" + v; + return t.length >= d ? t : fill('0', d - t.length) + t; + } + + function pad_(v, d) { + var t = "" + v; + return t.length >= d ? t : fill(' ', d - t.length) + t; + } + + function rpad_(v, d) { + var t = "" + v; + return t.length >= d ? t : t + fill(' ', d - t.length); + } + + function pad0r1(v, d) { + var t = "" + Math.round(v); + return t.length >= d ? t : fill('0', d - t.length) + t; + } + + function pad0r2(v, d) { + var t = "" + v; + return t.length >= d ? t : fill('0', d - t.length) + t; + } + + var p2_32 = Math.pow(2, 32); + + function pad0r(v, d) { + if (v > p2_32 || v < -p2_32) return pad0r1(v, d); + var i = Math.round(v); + return pad0r2(i, d); + } + + function isgeneral(s, i) { + i = i || 0; + return s.length >= 7 + i && (s.charCodeAt(i) | 32) === 103 && (s.charCodeAt(i + 1) | 32) === 101 && (s.charCodeAt(i + 2) | 32) === 110 && (s.charCodeAt(i + 3) | 32) === 101 && (s.charCodeAt(i + 4) | 32) === 114 && (s.charCodeAt(i + 5) | 32) === 97 && (s.charCodeAt(i + 6) | 32) === 108; + } + + var days = [ + ['Sun', 'Sunday'], + ['Mon', 'Monday'], + ['Tue', 'Tuesday'], + ['Wed', 'Wednesday'], + ['Thu', 'Thursday'], + ['Fri', 'Friday'], + ['Sat', 'Saturday'] + ]; + + var months = [ + ['J', 'Jan', 'January'], + ['F', 'Feb', 'February'], + ['M', 'Mar', 'March'], + ['A', 'Apr', 'April'], + ['M', 'May', 'May'], + ['J', 'Jun', 'June'], + ['J', 'Jul', 'July'], + ['A', 'Aug', 'August'], + ['S', 'Sep', 'September'], + ['O', 'Oct', 'October'], + ['N', 'Nov', 'November'], + ['D', 'Dec', 'December'] + ]; + + function init_table(t) { + t[0] = 'General'; + t[1] = '0'; + t[2] = '0.00'; + t[3] = '#,##0'; + t[4] = '#,##0.00'; + t[9] = '0%'; + t[10] = '0.00%'; + t[11] = '0.00E+00'; + t[12] = '# ?/?'; + t[13] = '# ??/??'; + t[14] = 'm/d/yy'; + t[15] = 'd-mmm-yy'; + t[16] = 'd-mmm'; + t[17] = 'mmm-yy'; + t[18] = 'h:mm AM/PM'; + t[19] = 'h:mm:ss AM/PM'; + t[20] = 'h:mm'; + t[21] = 'h:mm:ss'; + t[22] = 'm/d/yy h:mm'; + t[37] = '#,##0 ;(#,##0)'; + t[38] = '#,##0 ;[Red](#,##0)'; + t[39] = '#,##0.00;(#,##0.00)'; + t[40] = '#,##0.00;[Red](#,##0.00)'; + t[45] = 'mm:ss'; + t[46] = '[h]:mm:ss'; + t[47] = 'mmss.0'; + t[48] = '##0.0E+0'; + t[49] = '@'; + t[56] = '"上午/下午 "hh"時"mm"分"ss"秒 "'; + t[65535] = 'General'; + } + + var table_fmt = {}; + init_table(table_fmt); + + function frac(x, D, mixed) { + var sgn = x < 0 ? -1 : 1; + var B = x * sgn; + var P_2 = 0, + P_1 = 1, + P = 0; + var Q_2 = 1, + Q_1 = 0, + Q = 0; + var A = Math.floor(B); + while (Q_1 < D) { + A = Math.floor(B); + P = A * P_1 + P_2; + Q = A * Q_1 + Q_2; + if ((B - A) < 0.00000005) break; + B = 1 / (B - A); + P_2 = P_1; + P_1 = P; + Q_2 = Q_1; + Q_1 = Q; + } + if (Q > D) { + if (Q_1 > D) { + Q = Q_2; + P = P_2; + } else { + Q = Q_1; + P = P_1; + } + } + if (!mixed) return [0, sgn * P, Q]; + var q = Math.floor(sgn * P / Q); + return [q, sgn * P - q * Q, Q]; + } + + function parse_date_code(v, opts, b2) { + if (v > 2958465 || v < 0) return null; + var date = (v | 0), + time = Math.floor(86400 * (v - date)), + dow = 0; + var dout = []; + var out = { + D: date, + T: time, + u: 86400 * (v - date) - time, + y: 0, + m: 0, + d: 0, + H: 0, + M: 0, + S: 0, + q: 0 + }; + if (Math.abs(out.u) < 1e-6) out.u = 0; + if (opts && opts.date1904) date += 1462; + if (out.u > 0.9999) { + out.u = 0; + if (++time == 86400) { + out.T = time = 0; + ++date; + ++out.D; + } + } + if (date === 60) { + dout = b2 ? [1317, 10, 29] : [1900, 2, 29]; + dow = 3; + } else if (date === 0) { + dout = b2 ? [1317, 8, 29] : [1900, 1, 0]; + dow = 6; + } else { + if (date > 60) --date; + /* 1 = Jan 1 1900 in Gregorian */ + var d = new Date(1900, 0, 1); + d.setDate(d.getDate() + date - 1); + dout = [d.getFullYear(), d.getMonth() + 1, d.getDate()]; + dow = d.getDay(); + if (date < 60) dow = (dow + 6) % 7; + if (b2) dow = fix_hijri(d, dout); + } + out.y = dout[0]; + out.m = dout[1]; + out.d = dout[2]; + out.S = time % 60; + time = Math.floor(time / 60); + out.M = time % 60; + time = Math.floor(time / 60); + out.H = time; + out.q = dow; + return out; + } + + SSF.parse_date_code = parse_date_code; + var basedate = new Date(1899, 11, 31, 0, 0, 0); + var dnthresh = basedate.getTime(); + var base1904 = new Date(1900, 2, 1, 0, 0, 0); + + function datenum_local(v, date1904) { + var epoch = v.getTime(); + if (date1904) epoch -= 1461 * 24 * 60 * 60 * 1000; + else if (v >= base1904) epoch += 24 * 60 * 60 * 1000; + return (epoch - (dnthresh + (v.getTimezoneOffset() - basedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000); + } + + function general_fmt_int(v) { + return v.toString(10); + } + + SSF._general_int = general_fmt_int; + var general_fmt_num = (function make_general_fmt_num() { + var gnr1 = /\.(\d*[1-9])0+$/, + gnr2 = /\.0*$/, + gnr4 = /\.(\d*[1-9])0+/, + gnr5 = /\.0*[Ee]/, + gnr6 = /(E[+-])(\d)$/; + + function gfn2(v) { + var w = (v < 0 ? 12 : 11); + var o = gfn5(v.toFixed(12)); + if (o.length <= w) return o; + o = v.toPrecision(10); + if (o.length <= w) return o; + return v.toExponential(5); + } + + function gfn3(v) { + var o = v.toFixed(11).replace(gnr1, ".$1"); + if (o.length > (v < 0 ? 12 : 11)) o = v.toPrecision(6); + return o; + } + + function gfn4(o) { + for (var i = 0; i != o.length; ++i) + if ((o.charCodeAt(i) | 0x20) === 101) return o.replace(gnr4, ".$1").replace(gnr5, "E").replace("e", "E").replace(gnr6, "$10$2"); + return o; + } + + function gfn5(o) { + return o.indexOf(".") > -1 ? o.replace(gnr2, "").replace(gnr1, ".$1") : o; + } + return function general_fmt_num(v) { + var V = Math.floor(Math.log(Math.abs(v)) * Math.LOG10E), + o; + if (V >= -4 && V <= -1) o = v.toPrecision(10 + V); + else if (Math.abs(V) <= 9) o = gfn2(v); + else if (V === 10) o = v.toFixed(10).substr(0, 12); + else o = gfn3(v); + return gfn5(gfn4(o)); + }; + })(); + SSF._general_num = general_fmt_num; + + function general_fmt(v, opts) { + switch (typeof v) { + case 'string': + return v; + case 'boolean': + return v ? "TRUE" : "FALSE"; + case 'number': + return (v | 0) === v ? general_fmt_int(v) : general_fmt_num(v); + case 'undefined': + return ""; + case 'object': + if (v == null) return ""; + if (v instanceof Date) return format(14, datenum_local(v, opts && opts.date1904), opts); + } + throw new Error("unsupported value in General format: " + v); + } + SSF._general = general_fmt; + + function fix_hijri() { + return 0; + } + /*jshint -W086 */ + function write_date(type, fmt, val, ss0) { + var o = "", + ss = 0, + tt = 0, + y = val.y, + out, outl = 0; + switch (type) { + case 98: + /* 'b' buddhist year */ y = val.y + 543; + /* falls through */ + case 121: + /* 'y' year */ switch (fmt.length) { + case 1: + case 2: + out = y % 100; + outl = 2; + break; + default: + out = y % 10000; + outl = 4; + break; + } + break; + case 109: + /* 'm' month */ switch (fmt.length) { + case 1: + case 2: + out = val.m; + outl = fmt.length; + break; + case 3: + return months[val.m - 1][1]; + case 5: + return months[val.m - 1][0]; + default: + return months[val.m - 1][2]; + } + break; + case 100: + /* 'd' day */ switch (fmt.length) { + case 1: + case 2: + out = val.d; + outl = fmt.length; + break; + case 3: + return days[val.q][0]; + default: + return days[val.q][1]; + } + break; + case 104: + /* 'h' 12-hour */ switch (fmt.length) { + case 1: + case 2: + out = 1 + (val.H + 11) % 12; + outl = fmt.length; + break; + default: + throw 'bad hour format: ' + fmt; + } + break; + case 72: + /* 'H' 24-hour */ switch (fmt.length) { + case 1: + case 2: + out = val.H; + outl = fmt.length; + break; + default: + throw 'bad hour format: ' + fmt; + } + break; + case 77: + /* 'M' minutes */ switch (fmt.length) { + case 1: + case 2: + out = val.M; + outl = fmt.length; + break; + default: + throw 'bad minute format: ' + fmt; + } + break; + case 115: + /* 's' seconds */ if (fmt != 's' && fmt != 'ss' && fmt != '.0' && fmt != '.00' && fmt != '.000') throw 'bad second format: ' + fmt; + if (val.u === 0 && (fmt == "s" || fmt == "ss")) return pad0(val.S, fmt.length); + if (ss0 >= 2) tt = ss0 === 3 ? 1000 : 100; + else tt = ss0 === 1 ? 10 : 1; + ss = Math.round((tt) * (val.S + val.u)); + if (ss >= 60 * tt) ss = 0; + if (fmt === 's') return ss === 0 ? "0" : "" + ss / tt; + o = pad0(ss, 2 + ss0); + if (fmt === 'ss') return o.substr(0, 2); + return "." + o.substr(2, fmt.length - 1); + case 90: + /* 'Z' absolute time */ switch (fmt) { + case '[h]': + case '[hh]': + out = val.D * 24 + val.H; + break; + case '[m]': + case '[mm]': + out = (val.D * 24 + val.H) * 60 + val.M; + break; + case '[s]': + case '[ss]': + out = ((val.D * 24 + val.H) * 60 + val.M) * 60 + Math.round(val.S + val.u); + break; + default: + throw 'bad abstime format: ' + fmt; + } + outl = fmt.length === 3 ? 1 : 2; + break; + case 101: + /* 'e' era */ out = y; + outl = 1; + } + if (outl > 0) return pad0(out, outl); + else return ""; + } + /*jshint +W086 */ + function commaify(s) { + var w = 3; + if (s.length <= w) return s; + var j = (s.length % w), + o = s.substr(0, j); + for (; j != s.length; j += w) o += (o.length > 0 ? "," : "") + s.substr(j, w); + return o; + } + var write_num = (function make_write_num() { + var pct1 = /%/g; + + function write_num_pct(type, fmt, val) { + var sfmt = fmt.replace(pct1, ""), + mul = fmt.length - sfmt.length; + return write_num(type, sfmt, val * Math.pow(10, 2 * mul)) + fill("%", mul); + } + + function write_num_cm(type, fmt, val) { + var idx = fmt.length - 1; + while (fmt.charCodeAt(idx - 1) === 44) --idx; + return write_num(type, fmt.substr(0, idx), val / Math.pow(10, 3 * (fmt.length - idx))); + } + + function write_num_exp(fmt, val) { + var o; + var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1; + if (fmt.match(/^#+0.0E\+0$/)) { + if (val == 0) return "0.0E+0"; + else if (val < 0) return "-" + write_num_exp(fmt, -val); + var period = fmt.indexOf("."); + if (period === -1) period = fmt.indexOf('E'); + var ee = Math.floor(Math.log(val) * Math.LOG10E) % period; + if (ee < 0) ee += period; + o = (val / Math.pow(10, ee)).toPrecision(idx + 1 + (period + ee) % period); + if (o.indexOf("e") === -1) { + var fakee = Math.floor(Math.log(val) * Math.LOG10E); + if (o.indexOf(".") === -1) o = o.charAt(0) + "." + o.substr(1) + "E+" + (fakee - o.length + ee); + else o += "E+" + (fakee - ee); + while (o.substr(0, 2) === "0.") { + o = o.charAt(0) + o.substr(2, period) + "." + o.substr(2 + period); + o = o.replace(/^0+([1-9])/, "$1").replace(/^0+\./, "0."); + } + o = o.replace(/\+-/, "-"); + } + o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function($$, $1, $2, $3) { + return $1 + $2 + $3.substr(0, (period + ee) % period) + "." + $3.substr(ee) + "E"; + }); + } else o = val.toExponential(idx); + if (fmt.match(/E\+00$/) && o.match(/e[+-]\d$/)) o = o.substr(0, o.length - 1) + "0" + o.charAt(o.length - 1); + if (fmt.match(/E\-/) && o.match(/e\+/)) o = o.replace(/e\+/, "e"); + return o.replace("e", "E"); + } + var frac1 = /# (\?+)( ?)\/( ?)(\d+)/; + + function write_num_f1(r, aval, sign) { + var den = parseInt(r[4], 10), + rr = Math.round(aval * den), + base = Math.floor(rr / den); + var myn = (rr - base * den), + myd = den; + return sign + (base === 0 ? "" : "" + base) + " " + (myn === 0 ? fill(" ", r[1].length + 1 + r[4].length) : pad_(myn, r[1].length) + r[2] + "/" + r[3] + pad0(myd, r[4].length)); + } + + function write_num_f2(r, aval, sign) { + return sign + (aval === 0 ? "" : "" + aval) + fill(" ", r[1].length + 2 + r[4].length); + } + var dec1 = /^#*0*\.([0#]+)/; + var closeparen = /\).*[0#]/; + var phone = /\(###\) ###\\?-####/; + + function hashq(str) { + var o = "", + cc; + for (var i = 0; i != str.length; ++i) switch ((cc = str.charCodeAt(i))) { + case 35: + break; + case 63: + o += " "; + break; + case 48: + o += "0"; + break; + default: + o += String.fromCharCode(cc); + } + return o; + } + + function rnd(val, d) { + var dd = Math.pow(10, d); + return "" + (Math.round(val * dd) / dd); + } + + function dec(val, d) { + if (d < ('' + Math.round((val - Math.floor(val)) * Math.pow(10, d))).length) { + return 0; + } + return Math.round((val - Math.floor(val)) * Math.pow(10, d)); + } + + function carry(val, d) { + if (d < ('' + Math.round((val - Math.floor(val)) * Math.pow(10, d))).length) { + return 1; + } + return 0; + } + + function flr(val) { + if (val < 2147483647 && val > -2147483648) return "" + (val >= 0 ? (val | 0) : (val - 1 | 0)); + return "" + Math.floor(val); + } + + function write_num_flt(type, fmt, val) { + if (type.charCodeAt(0) === 40 && !fmt.match(closeparen)) { + var ffmt = fmt.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, ""); + if (val >= 0) return write_num_flt('n', ffmt, val); + return '(' + write_num_flt('n', ffmt, -val) + ')'; + } + if (fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val); + if (fmt.indexOf('%') !== -1) return write_num_pct(type, fmt, val); + if (fmt.indexOf('E') !== -1) return write_num_exp(fmt, val); + if (fmt.charCodeAt(0) === 36) return "$" + write_num_flt(type, fmt.substr(fmt.charAt(1) == ' ' ? 2 : 1), val); + var o; + var r, ri, ff, aval = Math.abs(val), + sign = val < 0 ? "-" : ""; + if (fmt.match(/^00+$/)) return sign + pad0r(aval, fmt.length); + if (fmt.match(/^[#?]+$/)) { + o = pad0r(val, 0); + if (o === "0") o = ""; + return o.length > fmt.length ? o : hashq(fmt.substr(0, fmt.length - o.length)) + o; + } + if ((r = fmt.match(frac1))) return write_num_f1(r, aval, sign); + if (fmt.match(/^#+0+$/)) return sign + pad0r(aval, fmt.length - fmt.indexOf("0")); + if ((r = fmt.match(dec1))) { + o = rnd(val, r[1].length).replace(/^([^\.]+)$/, "$1." + hashq(r[1])).replace(/\.$/, "." + hashq(r[1])).replace(/\.(\d*)$/, function($$, $1) { + return "." + $1 + fill("0", hashq(r[1]).length - $1.length); + }); + return fmt.indexOf("0.") !== -1 ? o : o.replace(/^0\./, "."); + } + fmt = fmt.replace(/^#+([0.])/, "$1"); + if ((r = fmt.match(/^(0*)\.(#*)$/))) { + return sign + rnd(aval, r[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, r[1].length ? "0." : "."); + } + if ((r = fmt.match(/^#{1,3},##0(\.?)$/))) return sign + commaify(pad0r(aval, 0)); + if ((r = fmt.match(/^#,##0\.([#0]*0)$/))) { + return val < 0 ? "-" + write_num_flt(type, fmt, -val) : commaify("" + (Math.floor(val) + carry(val, r[1].length))) + "." + pad0(dec(val, r[1].length), r[1].length); + } + if ((r = fmt.match(/^#,#*,#0/))) return write_num_flt(type, fmt.replace(/^#,#*,/, ""), val); + if ((r = fmt.match(/^([0#]+)(\\?-([0#]+))+$/))) { + o = _strrev(write_num_flt(type, fmt.replace(/[\\-]/g, ""), val)); + ri = 0; + return _strrev(_strrev(fmt.replace(/\\/g, "")).replace(/[0#]/g, function(x) { + return ri < o.length ? o.charAt(ri++) : x === '0' ? '0' : ""; + })); + } + if (fmt.match(phone)) { + o = write_num_flt(type, "##########", val); + return "(" + o.substr(0, 3) + ") " + o.substr(3, 3) + "-" + o.substr(6); + } + var oa = ""; + if ((r = fmt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))) { + ri = Math.min(r[4].length, 7); + ff = frac(aval, Math.pow(10, ri) - 1, false); + o = "" + sign; + oa = write_num("n", r[1], ff[1]); + if (oa.charAt(oa.length - 1) == " ") oa = oa.substr(0, oa.length - 1) + "0"; + o += oa + r[2] + "/" + r[3]; + oa = rpad_(ff[2], ri); + if (oa.length < r[4].length) oa = hashq(r[4].substr(r[4].length - oa.length)) + oa; + o += oa; + return o; + } + if ((r = fmt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))) { + ri = Math.min(Math.max(r[1].length, r[4].length), 7); + ff = frac(aval, Math.pow(10, ri) - 1, true); + return sign + (ff[0] || (ff[1] ? "" : "0")) + " " + (ff[1] ? pad_(ff[1], ri) + r[2] + "/" + r[3] + rpad_(ff[2], ri) : fill(" ", 2 * ri + 1 + r[2].length + r[3].length)); + } + if ((r = fmt.match(/^[#0?]+$/))) { + o = pad0r(val, 0); + if (fmt.length <= o.length) return o; + return hashq(fmt.substr(0, fmt.length - o.length)) + o; + } + if ((r = fmt.match(/^([#0?]+)\.([#0]+)$/))) { + o = "" + val.toFixed(Math.min(r[2].length, 10)).replace(/([^0])0+$/, "$1"); + ri = o.indexOf("."); + var lres = fmt.indexOf(".") - ri, + rres = fmt.length - o.length - lres; + return hashq(fmt.substr(0, lres) + o + fmt.substr(fmt.length - rres)); + } + if ((r = fmt.match(/^00,000\.([#0]*0)$/))) { + ri = dec(val, r[1].length); + return val < 0 ? "-" + write_num_flt(type, fmt, -val) : commaify(flr(val)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function($$) { + return "00," + ($$.length < 3 ? pad0(0, 3 - $$.length) : "") + $$; + }) + "." + pad0(ri, r[1].length); + } + switch (fmt) { + case "###,##0.00": + return write_num_flt(type, "#,##0.00", val); + case "###,###": + case "##,###": + case "#,###": + var x = commaify(pad0r(aval, 0)); + return x !== "0" ? sign + x : ""; + case "###,###.00": + return write_num_flt(type, "###,##0.00", val).replace(/^0\./, "."); + case "#,###.00": + return write_num_flt(type, "#,##0.00", val).replace(/^0\./, "."); + default: + } + throw new Error("unsupported format |" + fmt + "|"); + } + + function write_num_cm2(type, fmt, val) { + var idx = fmt.length - 1; + while (fmt.charCodeAt(idx - 1) === 44) --idx; + return write_num(type, fmt.substr(0, idx), val / Math.pow(10, 3 * (fmt.length - idx))); + } + + function write_num_pct2(type, fmt, val) { + var sfmt = fmt.replace(pct1, ""), + mul = fmt.length - sfmt.length; + return write_num(type, sfmt, val * Math.pow(10, 2 * mul)) + fill("%", mul); + } + + function write_num_exp2(fmt, val) { + var o; + var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1; + if (fmt.match(/^#+0.0E\+0$/)) { + if (val == 0) return "0.0E+0"; + else if (val < 0) return "-" + write_num_exp2(fmt, -val); + var period = fmt.indexOf("."); + if (period === -1) period = fmt.indexOf('E'); + var ee = Math.floor(Math.log(val) * Math.LOG10E) % period; + if (ee < 0) ee += period; + o = (val / Math.pow(10, ee)).toPrecision(idx + 1 + (period + ee) % period); + if (!o.match(/[Ee]/)) { + var fakee = Math.floor(Math.log(val) * Math.LOG10E); + if (o.indexOf(".") === -1) o = o.charAt(0) + "." + o.substr(1) + "E+" + (fakee - o.length + ee); + else o += "E+" + (fakee - ee); + o = o.replace(/\+-/, "-"); + } + o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function($$, $1, $2, $3) { + return $1 + $2 + $3.substr(0, (period + ee) % period) + "." + $3.substr(ee) + "E"; + }); + } else o = val.toExponential(idx); + if (fmt.match(/E\+00$/) && o.match(/e[+-]\d$/)) o = o.substr(0, o.length - 1) + "0" + o.charAt(o.length - 1); + if (fmt.match(/E\-/) && o.match(/e\+/)) o = o.replace(/e\+/, "e"); + return o.replace("e", "E"); + } + + function write_num_int(type, fmt, val) { + if (type.charCodeAt(0) === 40 && !fmt.match(closeparen)) { + var ffmt = fmt.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, ""); + if (val >= 0) return write_num_int('n', ffmt, val); + return '(' + write_num_int('n', ffmt, -val) + ')'; + } + if (fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val); + if (fmt.indexOf('%') !== -1) return write_num_pct2(type, fmt, val); + if (fmt.indexOf('E') !== -1) return write_num_exp2(fmt, val); + if (fmt.charCodeAt(0) === 36) return "$" + write_num_int(type, fmt.substr(fmt.charAt(1) == ' ' ? 2 : 1), val); + var o; + var r, ri, ff, aval = Math.abs(val), + sign = val < 0 ? "-" : ""; + if (fmt.match(/^00+$/)) return sign + pad0(aval, fmt.length); + if (fmt.match(/^[#?]+$/)) { + o = ("" + val); + if (val === 0) o = ""; + return o.length > fmt.length ? o : hashq(fmt.substr(0, fmt.length - o.length)) + o; + } + if ((r = fmt.match(frac1))) return write_num_f2(r, aval, sign); + if (fmt.match(/^#+0+$/)) return sign + pad0(aval, fmt.length - fmt.indexOf("0")); + if ((r = fmt.match(dec1))) { + o = ("" + val).replace(/^([^\.]+)$/, "$1." + hashq(r[1])).replace(/\.$/, "." + hashq(r[1])); + o = o.replace(/\.(\d*)$/, function($$, $1) { + return "." + $1 + fill("0", hashq(r[1]).length - $1.length); + }); + return fmt.indexOf("0.") !== -1 ? o : o.replace(/^0\./, "."); + } + fmt = fmt.replace(/^#+([0.])/, "$1"); + if ((r = fmt.match(/^(0*)\.(#*)$/))) { + return sign + ("" + aval).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, r[1].length ? "0." : "."); + } + if ((r = fmt.match(/^#{1,3},##0(\.?)$/))) return sign + commaify(("" + aval)); + if ((r = fmt.match(/^#,##0\.([#0]*0)$/))) { + return val < 0 ? "-" + write_num_int(type, fmt, -val) : commaify(("" + val)) + "." + fill('0', r[1].length); + } + if ((r = fmt.match(/^#,#*,#0/))) return write_num_int(type, fmt.replace(/^#,#*,/, ""), val); + if ((r = fmt.match(/^([0#]+)(\\?-([0#]+))+$/))) { + o = _strrev(write_num_int(type, fmt.replace(/[\\-]/g, ""), val)); + ri = 0; + return _strrev(_strrev(fmt.replace(/\\/g, "")).replace(/[0#]/g, function(x) { + return ri < o.length ? o.charAt(ri++) : x === '0' ? '0' : ""; + })); + } + if (fmt.match(phone)) { + o = write_num_int(type, "##########", val); + return "(" + o.substr(0, 3) + ") " + o.substr(3, 3) + "-" + o.substr(6); + } + var oa = ""; + if ((r = fmt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))) { + ri = Math.min(r[4].length, 7); + ff = frac(aval, Math.pow(10, ri) - 1, false); + o = "" + sign; + oa = write_num("n", r[1], ff[1]); + if (oa.charAt(oa.length - 1) == " ") oa = oa.substr(0, oa.length - 1) + "0"; + o += oa + r[2] + "/" + r[3]; + oa = rpad_(ff[2], ri); + if (oa.length < r[4].length) oa = hashq(r[4].substr(r[4].length - oa.length)) + oa; + o += oa; + return o; + } + if ((r = fmt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))) { + ri = Math.min(Math.max(r[1].length, r[4].length), 7); + ff = frac(aval, Math.pow(10, ri) - 1, true); + return sign + (ff[0] || (ff[1] ? "" : "0")) + " " + (ff[1] ? pad_(ff[1], ri) + r[2] + "/" + r[3] + rpad_(ff[2], ri) : fill(" ", 2 * ri + 1 + r[2].length + r[3].length)); + } + if ((r = fmt.match(/^[#0?]+$/))) { + o = "" + val; + if (fmt.length <= o.length) return o; + return hashq(fmt.substr(0, fmt.length - o.length)) + o; + } + if ((r = fmt.match(/^([#0]+)\.([#0]+)$/))) { + o = "" + val.toFixed(Math.min(r[2].length, 10)).replace(/([^0])0+$/, "$1"); + ri = o.indexOf("."); + var lres = fmt.indexOf(".") - ri, + rres = fmt.length - o.length - lres; + return hashq(fmt.substr(0, lres) + o + fmt.substr(fmt.length - rres)); + } + if ((r = fmt.match(/^00,000\.([#0]*0)$/))) { + return val < 0 ? "-" + write_num_int(type, fmt, -val) : commaify("" + val).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function($$) { + return "00," + ($$.length < 3 ? pad0(0, 3 - $$.length) : "") + $$; + }) + "." + pad0(0, r[1].length); + } + switch (fmt) { + case "###,###": + case "##,###": + case "#,###": + var x = commaify("" + aval); + return x !== "0" ? sign + x : ""; + default: + if (fmt.match(/\.[0#?]*$/)) return write_num_int(type, fmt.slice(0, fmt.lastIndexOf(".")), val) + hashq(fmt.slice(fmt.lastIndexOf("."))); + } + throw new Error("unsupported format |" + fmt + "|"); + } + return function write_num(type, fmt, val) { + return (val | 0) === val ? write_num_int(type, fmt, val) : write_num_flt(type, fmt, val); + }; + })(); + + function split_fmt(fmt) { + var out = []; + var in_str = false /*, cc*/ ; + for (var i = 0, j = 0; i < fmt.length; ++i) switch (( /*cc=*/ fmt.charCodeAt(i))) { + case 34: + /* '"' */ in_str = !in_str; + break; + case 95: + case 42: + case 92: + /* '_' '*' '\\' */ + ++i; + break; + case 59: + /* ';' */ out[out.length] = fmt.substr(j, i - j); + j = i + 1; + } + out[out.length] = fmt.substr(j); + if (in_str === true) throw new Error("Format |" + fmt + "| unterminated string "); + return out; + } + SSF._split = split_fmt; + var abstime = /\[[HhMmSs]*\]/; + + function fmt_is_date(fmt) { + var i = 0, + /*cc = 0,*/ c = "", + o = ""; + while (i < fmt.length) { + switch ((c = fmt.charAt(i))) { + case 'G': + if (isgeneral(fmt, i)) i += 6; + i++; + break; + case '"': + for (; + ( /*cc=*/ fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) ++i; + ++i; + break; + case '\\': + i += 2; + break; + case '_': + i += 2; + break; + case '@': + ++i; + break; + case 'B': + case 'b': + if (fmt.charAt(i + 1) === "1" || fmt.charAt(i + 1) === "2") return true; + /* falls through */ + case 'M': + case 'D': + case 'Y': + case 'H': + case 'S': + case 'E': + /* falls through */ + case 'm': + case 'd': + case 'y': + case 'h': + case 's': + case 'e': + case 'g': + return true; + case 'A': + case 'a': + if (fmt.substr(i, 3).toUpperCase() === "A/P") return true; + if (fmt.substr(i, 5).toUpperCase() === "AM/PM") return true; + ++i; + break; + case '[': + o = c; + while (fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i); + if (o.match(abstime)) return true; + break; + case '.': + /* falls through */ + case '0': + case '#': + while (i < fmt.length && ("0#?.,E+-%".indexOf(c = fmt.charAt(++i)) > -1 || (c == '\\' && fmt.charAt(i + 1) == "-" && "0#".indexOf(fmt.charAt(i + 2)) > -1))) { /* empty */ } + break; + case '?': + while (fmt.charAt(++i) === c) { /* empty */ } + break; + case '*': + ++i; + if (fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; + break; + case '(': + case ')': + ++i; + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + while (i < fmt.length && "0123456789".indexOf(fmt.charAt(++i)) > -1) { /* empty */ } + break; + case ' ': + ++i; + break; + default: + ++i; + break; + } + } + return false; + } + SSF.is_date = fmt_is_date; + + function eval_fmt(fmt, v, opts, flen) { + var out = [], + o = "", + i = 0, + c = "", + lst = 't', + dt, j, cc; + var hr = 'H'; + /* Tokenize */ + while (i < fmt.length) { + switch ((c = fmt.charAt(i))) { + case 'G': + /* General */ if (!isgeneral(fmt, i)) throw new Error('unrecognized character ' + c + ' in ' + fmt); + out[out.length] = { + t: 'G', + v: 'General' + }; + i += 7; + break; + case '"': + /* Literal text */ for (o = ""; + (cc = fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) o += String.fromCharCode(cc); + out[out.length] = { + t: 't', + v: o + }; + ++i; + break; + case '\\': + var w = fmt.charAt(++i), + t = (w === "(" || w === ")") ? w : 't'; + out[out.length] = { + t: t, + v: w + }; + ++i; + break; + case '_': + out[out.length] = { + t: 't', + v: " " + }; + i += 2; + break; + case '@': + /* Text Placeholder */ out[out.length] = { + t: 'T', + v: v + }; + ++i; + break; + case 'B': + case 'b': + if (fmt.charAt(i + 1) === "1" || fmt.charAt(i + 1) === "2") { + if (dt == null) { + dt = parse_date_code(v, opts, fmt.charAt(i + 1) === "2"); + if (dt == null) return ""; + } + out[out.length] = { + t: 'X', + v: fmt.substr(i, 2) + }; + lst = c; + i += 2; + break; + } + /* falls through */ + case 'M': + case 'D': + case 'Y': + case 'H': + case 'S': + case 'E': + c = c.toLowerCase(); + /* falls through */ + case 'm': + case 'd': + case 'y': + case 'h': + case 's': + case 'e': + case 'g': + if (v < 0) return ""; + if (dt == null) { + dt = parse_date_code(v, opts); + if (dt == null) return "######"; + } + o = c; + while (++i < fmt.length && fmt.charAt(i).toLowerCase() === c) o += c; + if (c === 'm' && lst.toLowerCase() === 'h') c = 'M'; + if (c === 'h') c = hr; + out[out.length] = { + t: c, + v: o + }; + lst = c; + break; + case 'A': + case 'a': + var q = { + t: c, + v: c + }; + if (dt == null) dt = parse_date_code(v, opts); + if (fmt.substr(i, 3).toUpperCase() === "A/P") { + if (dt != null) q.v = dt.H >= 12 ? "P" : "A"; + q.t = 'T'; + hr = 'h'; + i += 3; + } else if (fmt.substr(i, 5).toUpperCase() === "AM/PM") { + if (dt != null) q.v = dt.H >= 12 ? "PM" : "AM"; + q.t = 'T'; + i += 5; + hr = 'h'; + } else { + q.t = "t"; + ++i; + } + if (dt == null && q.t === 'T') return ""; + out[out.length] = q; + lst = c; + break; + case '[': + o = c; + while (fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i); + if (o.slice(-1) !== ']') throw 'unterminated "[" block: |' + o + '|'; + if (o.match(abstime)) { + if (dt == null) { + dt = parse_date_code(v, opts); + if (dt == null) return ""; + } + out[out.length] = { + t: 'Z', + v: o.toLowerCase() + }; + lst = o.charAt(1); + } else if (o.indexOf("$") > -1) { + o = (o.match(/\$([^-\[\]]*)/) || [])[1] || "$"; + if (!fmt_is_date(fmt)) out[out.length] = { + t: 't', + v: o + }; + } + break; + /* Numbers */ + case '.': + if (dt != null) { + o = c; + while (++i < fmt.length && (c = fmt.charAt(i)) === "0") o += c; + out[out.length] = { + t: 's', + v: o + }; + break; + } + /* falls through */ + case '0': + case '#': + o = c; + while ((++i < fmt.length && "0#?.,E+-%".indexOf(c = fmt.charAt(i)) > -1) || (c == '\\' && fmt.charAt(i + 1) == "-" && i < fmt.length - 2 && "0#".indexOf(fmt.charAt(i + 2)) > -1)) o += c; + out[out.length] = { + t: 'n', + v: o + }; + break; + case '?': + o = c; + while (fmt.charAt(++i) === c) o += c; + out[out.length] = { + t: c, + v: o + }; + lst = c; + break; + case '*': + ++i; + if (fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; + break; // ** + case '(': + case ')': + out[out.length] = { + t: (flen === 1 ? 't' : c), + v: c + }; + ++i; + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + o = c; + while (i < fmt.length && "0123456789".indexOf(fmt.charAt(++i)) > -1) o += fmt.charAt(i); + out[out.length] = { + t: 'D', + v: o + }; + break; + case ' ': + out[out.length] = { + t: c, + v: c + }; + ++i; + break; + default: + // if ("¤฿BsBr₵₡₫ƒFtRs.₭kr£₤Lm₥₦₱PQRSkRp৲৳R$S/.〒₮₩¥NT¥zł₴₪៛руб€$,$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt); + if ("¤฿BsBr₵₡₫ƒFtRs.₭kr£₤Lm₥₦₱PQRSkRp৲৳R$S/.〒₮₩¥NT¥zł₴₪៛руб€$,$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP$¥LekdinAf$dhAflRial?£BirrKzMOPPGKRsGsB/R$ррlevkrKMzBsPNuFBuKPkrRD$NfkCFA?CVEGMDFrCDHTGNAfLFdjKGSFGGHSRielKCFknKshLSLL£LtRFRONArRfMWKRMMURsMROS/KMDLMTnRC$kr€GELCHFSLLSCRDbSZLSDGSOSSomFCFPTShT$VUVQUGXгрнsomWSTNT$FtDramRpZMWFCFA".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt); + out[out.length] = { + t: 't', + v: c + }; + ++i; + break; + } + } + var bt = 0, + ss0 = 0, + ssm; + for (i = out.length - 1, lst = 't'; i >= 0; --i) { + switch (out[i].t) { + case 'h': + case 'H': + out[i].t = hr; + lst = 'h'; + if (bt < 1) bt = 1; + break; + case 's': + if ((ssm = out[i].v.match(/\.0+$/))) ss0 = Math.max(ss0, ssm[0].length - 1); + if (bt < 3) bt = 3; + /* falls through */ + case 'd': + case 'y': + case 'M': + case 'e': + lst = out[i].t; + break; + case 'm': + if (lst === 's') { + out[i].t = 'M'; + if (bt < 2) bt = 2; + } + break; + case 'X': + /*if(out[i].v === "B2");*/ break; + case 'Z': + if (bt < 1 && out[i].v.match(/[Hh]/)) bt = 1; + if (bt < 2 && out[i].v.match(/[Mm]/)) bt = 2; + if (bt < 3 && out[i].v.match(/[Ss]/)) bt = 3; + } + } + switch (bt) { + case 0: + break; + case 1: + if (dt.u >= 0.5) { + dt.u = 0; + ++dt.S; + } + if (dt.S >= 60) { + dt.S = 0; + ++dt.M; + } + if (dt.M >= 60) { + dt.M = 0; + ++dt.H; + } + break; + case 2: + if (dt.u >= 0.5) { + dt.u = 0; + ++dt.S; + } + if (dt.S >= 60) { + dt.S = 0; + ++dt.M; + } + break; + } + /* replace fields */ + var nstr = "", + jj; + for (i = 0; i < out.length; ++i) { + switch (out[i].t) { + case 't': + case 'T': + case ' ': + case 'D': + break; + case 'X': + out[i].v = ""; + out[i].t = ";"; + break; + case 'd': + case 'm': + case 'y': + case 'h': + case 'H': + case 'M': + case 's': + case 'e': + case 'b': + case 'Z': + out[i].v = write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0); + out[i].t = 't'; + break; + case 'n': + case '(': + case '?': + jj = i + 1; + while (out[jj] != null && ( + (c = out[jj].t) === "?" || c === "D" || ((c === " " || c === "t") && out[jj + 1] != null && (out[jj + 1].t === '?' || out[jj + 1].t === "t" && out[jj + 1].v === '/')) || (out[i].t === '(' && (c === ' ' || c === 'n' || c === ')')) || (c === 't' && (out[jj].v === '/' || out[jj].v === ' ' && out[jj + 1] != null && out[jj + 1].t == '?')))) { + out[i].v += out[jj].v; + out[jj] = { + v: "", + t: ";" + }; + ++jj; + } + nstr += out[i].v; + i = jj - 1; + break; + case 'G': + out[i].t = 't'; + out[i].v = general_fmt(v, opts); + break; + } + } + var vv = "", + myv, ostr; + if (nstr.length > 0) { + if (nstr.charCodeAt(0) == 40) /* '(' */ { + myv = (v < 0 && nstr.charCodeAt(0) === 45 ? -v : v); + ostr = write_num('(', nstr, myv); + } else { + myv = (v < 0 && flen > 1 ? -v : v); + ostr = write_num('n', nstr, myv); + if (myv < 0 && out[0] && out[0].t == 't') { + ostr = ostr.substr(1); + out[0].v = "-" + out[0].v; + } + } + jj = ostr.length - 1; + var decpt = out.length; + for (i = 0; i < out.length; ++i) + if (out[i] != null && out[i].t != 't' && out[i].v.indexOf(".") > -1) { + decpt = i; + break; + } + var lasti = out.length; + if (decpt === out.length && ostr.toUpperCase().indexOf("E") === -1) { + for (i = out.length - 1; i >= 0; --i) { + if (out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; + if (jj >= out[i].v.length - 1) { + jj -= out[i].v.length; + out[i].v = ostr.substr(jj + 1, out[i].v.length); + } else if (jj < 0) out[i].v = ""; + else { + out[i].v = ostr.substr(0, jj + 1); + jj = -1; + } + out[i].t = 't'; + lasti = i; + } + if (jj >= 0 && lasti < out.length) out[lasti].v = ostr.substr(0, jj + 1) + out[lasti].v; + } else if (decpt !== out.length && ostr.toUpperCase().indexOf("E") === -1) { + jj = ostr.indexOf(".") - 1; + for (i = decpt; i >= 0; --i) { + if (out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; + j = out[i].v.indexOf(".") > -1 && i === decpt ? out[i].v.indexOf(".") - 1 : out[i].v.length - 1; + vv = out[i].v.substr(j + 1); + for (; j >= 0; --j) { + if (jj >= 0 && (out[i].v.charAt(j) === "0" || out[i].v.charAt(j) === "#")) vv = ostr.charAt(jj--) + vv; + } + out[i].v = vv; + out[i].t = 't'; + lasti = i; + } + if (jj >= 0 && lasti < out.length) out[lasti].v = ostr.substr(0, jj + 1) + out[lasti].v; + jj = ostr.indexOf(".") + 1; + for (i = decpt; i < out.length; ++i) { + if (out[i] == null || ('n?('.indexOf(out[i].t) === -1 && i !== decpt)) continue; + j = out[i].v.indexOf(".") > -1 && i === decpt ? out[i].v.indexOf(".") + 1 : 0; + vv = out[i].v.substr(0, j); + for (; j < out[i].v.length; ++j) { + if (jj < ostr.length) vv += ostr.charAt(jj++); + } + out[i].v = vv; + out[i].t = 't'; + lasti = i; + } + } + } + for (i = 0; i < out.length; ++i) + if (out[i] != null && 'n(?'.indexOf(out[i].t) > -1) { + myv = (flen > 1 && v < 0 && i > 0 && out[i - 1].v === "-" ? -v : v); + out[i].v = write_num(out[i].t, out[i].v, myv); + out[i].t = 't'; + } + var retval = ""; + for (i = 0; i !== out.length; ++i) + if (out[i] != null) retval += out[i].v; + return retval; + } + SSF._eval = eval_fmt; + var cfregex = /\[[=<>]/; + var cfregex2 = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/; + + function chkcond(v, rr) { + if (rr == null) return false; + var thresh = parseFloat(rr[2]); + switch (rr[1]) { + case "=": + if (v == thresh) return true; + break; + case ">": + if (v > thresh) return true; + break; + case "<": + if (v < thresh) return true; + break; + case "<>": + if (v != thresh) return true; + break; + case ">=": + if (v >= thresh) return true; + break; + case "<=": + if (v <= thresh) return true; + break; + } + return false; + } + + function choose_fmt(f, v) { + var fmt = split_fmt(f); + var l = fmt.length, + lat = fmt[l - 1].indexOf("@"); + if (l < 4 && lat > -1) --l; + if (fmt.length > 4) throw new Error("cannot find right format for |" + fmt.join("|") + "|"); + if (typeof v !== "number") return [4, fmt.length === 4 || lat > -1 ? fmt[fmt.length - 1] : "@"]; + switch (fmt.length) { + case 1: + fmt = lat > -1 ? ["General", "General", "General", fmt[0]] : [fmt[0], fmt[0], fmt[0], "@"]; + break; + case 2: + fmt = lat > -1 ? [fmt[0], fmt[0], fmt[0], fmt[1]] : [fmt[0], fmt[1], fmt[0], "@"]; + break; + case 3: + fmt = lat > -1 ? [fmt[0], fmt[1], fmt[0], fmt[2]] : [fmt[0], fmt[1], fmt[2], "@"]; + break; + case 4: + break; + } + var ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2]; + if (fmt[0].indexOf("[") === -1 && fmt[1].indexOf("[") === -1) return [l, ff]; + if (fmt[0].match(cfregex) != null || fmt[1].match(cfregex) != null) { + var m1 = fmt[0].match(cfregex2); + var m2 = fmt[1].match(cfregex2); + return chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != null ? 2 : 1]]; + } + return [l, ff]; + } + + function format(fmt, v, o) { + if (o == null) o = {}; + var sfmt = ""; + switch (typeof fmt) { + case "string": + if (fmt == "m/d/yy" && o.dateNF) sfmt = o.dateNF; + else sfmt = fmt; + break; + case "number": + if (fmt == 14 && o.dateNF) sfmt = o.dateNF; + else sfmt = (o.table != null ? (o.table) : table_fmt)[fmt]; + break; + } + + //new runze 增加万 亿 格式 + //注:"w":2万2500 "w0":2万2500 "w0.0":2万2500.2 "w0.00":2万2500.23......自定义精确度 + var reg = /^(w|W)((0?)|(0\.0+))$/; + if(!!sfmt.match(reg)){ + if(isNaN(v)){ + return v; + } + + //var v =300101886.436; + var acc = sfmt.slice(1); //取得0/0.0/0.00 + var isNegative = false; + if(!isNaN(v) && Number(v) < 0){ + isNegative = true; + v = Math.abs(v); + } + var vInt = parseInt(v); + + var vlength = vInt.toString().length; + if( vlength> 4){ + if(vlength > 8){ + var y =parseInt (v / 100000000); //亿 + var w = parseInt(parseFloat(v).subtract(y*100000000) / 10000); //万 + var q = parseFloat(v).subtract(y*100000000 + w*10000); //千以后 + if(acc != ""){ + q = numeral(q).format(acc); //处理精确度 + } + v = y + "亿" + w + "万" + q; + }else{ + var w = parseInt(v / 10000); //万 + var q = parseFloat(v).subtract(w*10000) //千以后 + if(acc != ""){ + q = numeral(q).format(acc); //处理精确度 + } + v = w + "万" + q; + } + + + if(v.indexOf("亿0万0") != -1){ + v = v.replace("0万0",""); + }else if(v.indexOf("亿0万") != -1){ + v = v.replace("0万",""); + }else if(v.indexOf("万0") != -1){ + v = v.replace("万0","万"); + } + + //舍弃正则后顾断言写法,旧浏览器不识别(360 V9) + if (v.indexOf("亿") != -1 && v.indexOf("万") == -1) { //1亿/1亿111 => 1亿/1亿0111 + var afterYi = v.substring(v.indexOf("亿") + 1); + if (afterYi.substring(0, 1) !== "." && afterYi != "") { + switch ((parseInt(afterYi) + "").length) { + case 1: + afterYi = "000" + afterYi; + break; + case 2: + afterYi = "00" + afterYi; + break; + case 3: + afterYi = "0" + afterYi; + break; + } + v = v.substring(0, v.indexOf("亿") + 1) + afterYi; + } + } else if (v.indexOf("亿") == -1 && v.indexOf("万") != -1) { //3万0011 + var afterWan = v.substring(v.indexOf("万") + 1); + if (afterWan.substring(0, 1) !== "." && afterWan != "") { + switch ((parseInt(afterWan) + "").length) { + case 1: + afterWan = "000" + afterWan; + break; + case 2: + afterWan = "00" + afterWan; + break; + case 3: + afterWan = "0" + afterWan; + break; + } + v = v.substring(0, v.indexOf("万") + 1) + afterWan; + } + } else if (v.indexOf("亿") != -1 && v.indexOf("万") != -1) { //1亿0053万0611 + var afterYi = v.substring(v.indexOf("亿") + 1,v.indexOf("万")), + afterWan = v.substring(v.indexOf("万") + 1); + + switch ((parseInt(afterYi) + "").length) { + case 1: + afterYi = "000" + afterYi; + break; + case 2: + afterYi = "00" + afterYi; + break; + case 3: + afterYi = "0" + afterYi; + break; + } + v = v.substring(0, v.indexOf("亿") + 1) + afterYi + v.substring(v.indexOf("万")) + + + if (afterWan.substring(0, 1) !== "." && afterWan != "") { + switch ((parseInt(afterWan) + "").length) { + case 1: + afterWan = "000" + afterWan; + break; + case 2: + afterWan = "00" + afterWan; + break; + case 3: + afterWan = "0" + afterWan; + break; + } + v = v.substring(0, v.indexOf("万") + 1) + afterWan + } + } + + }else{ + if(acc != ""){ + v = numeral(v).format(acc); //处理精确度 + } + } + if(isNegative){ + return '-' + v; + }else{ + return v; + } + + } + + if (isgeneral(sfmt, 0)) return general_fmt(v, o); + if (v instanceof Date) v = datenum_local(v, o.date1904); + var f = choose_fmt(sfmt, v); + if (isgeneral(f[1])) return general_fmt(v, o); + if (v === true) v = "TRUE"; + else if (v === false) v = "FALSE"; + else if (v === "" || v == null) return ""; + return eval_fmt(f[1], v, o, f[0]); + } + + function load_entry(fmt, idx) { + if (typeof idx != 'number') { + idx = +idx || -1; + for (var i = 0; i < 0x0188; ++i) { + if (table_fmt[i] == undefined) { + if (idx < 0) idx = i; + continue; + } + if (table_fmt[i] == fmt) { + idx = i; + break; + } + } + if (idx < 0) idx = 0x187; + } + table_fmt[idx] = fmt; + return idx; + } + SSF.load = load_entry; + SSF._table = table_fmt; + SSF.get_table = function get_table() { + return table_fmt; + }; + SSF.load_table = function load_table(tbl) { + for (var i = 0; i != 0x0188; ++i) + if (tbl[i] !== undefined) load_entry(tbl[i], i); + }; + SSF.init_table = init_table; + SSF.format = format; +}; +make_ssf(SSF); + +var XLMLFormatMap /*{[string]:string}*/ = ({ + "General Number": "General", + "General Date": SSF._table[22], + "Long Date": "dddd, mmmm dd, yyyy", + "Medium Date": SSF._table[15], + "Short Date": SSF._table[14], + "Long Time": SSF._table[19], + "Medium Time": SSF._table[18], + "Short Time": SSF._table[20], + "Currency": '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)', + "Fixed": SSF._table[2], + "Standard": SSF._table[4], + "Percent": SSF._table[10], + "Scientific": SSF._table[11], + "Yes/No": '"Yes";"Yes";"No";@', + "True/False": '"True";"True";"False";@', + "On/Off": '"Yes";"Yes";"No";@' +}); + +var unescapexml = (function() { + /* 22.4.2.4 bstr (Basic String) */ + var encregex = /&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/g, + coderegex = /_x([\da-fA-F]{4})_/g; + return function unescapexml(text) { + var s = text + '', + i = s.indexOf(" -1 ? 16 : 10)) || $$; + }).replace(coderegex, function(m, c) { + return String.fromCharCode(parseInt(c, 16)); + }); + var j = s.indexOf("]]>"); + return unescapexml(s.slice(0, i)) + s.slice(i + 9, j) + unescapexml(s.slice(j + 3)); + }; +})(); + +function xlml_format(format, value) { + var fmt = XLMLFormatMap[format] || unescapexml(format); + if (fmt === "General") return SSF._general(value); + return SSF.format(fmt, value); +} + +var basedate = new Date(1899, 11, 31, 0, 0, 0); +var dnthresh = basedate.getTime(); +var base1904 = new Date(1900, 2, 1, 0, 0, 0); + +function datenum(v, date1904) { + var epoch = v.getTime(); + if (date1904) epoch -= 1462 * 24 * 60 * 60 * 1000; + return (epoch - dnthresh) / (24 * 60 * 60 * 1000); +} + +function datenum_local(v, date1904) { + var epoch = Date.UTC(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds()); + var dnthresh_utc = Date.UTC(1899, 11, 31, 0, 0, 0); + + if (date1904) epoch -= 1461 * 24 * 60 * 60 * 1000; + else if (v >= base1904) epoch += 24 * 60 * 60 * 1000; + return (epoch - dnthresh_utc) / (24 * 60 * 60 * 1000); +} + +function numdate(v) { + var out = new Date(); + out.setTime(v * 24 * 60 * 60 * 1000 + dnthresh); + return out; +} +/* ISO 8601 Duration */ +function parse_isodur(s) { + var sec = 0, + mt = 0, + time = false; + var m = s.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/); + if (!m) throw new Error("|" + s + "| is not an ISO8601 Duration"); + for (var i = 1; i != m.length; ++i) { + if (!m[i]) continue; + mt = 1; + if (i > 3) time = true; + switch (m[i].slice(m[i].length - 1)) { + case 'Y': + throw new Error("Unsupported ISO Duration Field: " + m[i].slice(m[i].length - 1)); + case 'D': + mt *= 24; + /* falls through */ + case 'H': + mt *= 60; + /* falls through */ + case 'M': + if (!time) throw new Error("Unsupported ISO Duration Field: M"); + else mt *= 60; + /* falls through */ + case 'S': + break; + } + sec += mt * parseInt(m[i], 10); + } + return sec; +} +var good_pd_date = new Date('2017-02-19T19:06:09.000Z'); +if (isNaN(good_pd_date.getFullYear())) good_pd_date = new Date('2/19/17'); +var good_pd = good_pd_date.getFullYear() == 2017; +/* parses a date as a local date */ +function parseDate(str, fixdate) { + var d = new Date(str); + //console.log(d); + if (good_pd) { + if (fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000); + else if (fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000); + return d; + } + if (str instanceof Date) return str; + if (good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) { + var s = d.getFullYear(); + if (str.indexOf("" + s) > -1) return d; + d.setFullYear(d.getFullYear() + 100); + return d; + } + var n = str.match(/\d+/g) || ["2017", "2", "19", "0", "0", "0"]; + var out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3] || 0), (+n[4] || 0), (+n[5] || 0)); + if (str.indexOf("Z") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000); + return out; +} + +/* TODO: stress test */ +function fuzzynum(s) { + var v = Number(s); + if(typeof s == "number"){ + return s; + } + if (!isNaN(v)) return v; + var wt = 1; + var ss = s.replace(/([\d]),([\d])/g, "$1$2").replace(/[$]/g, "").replace(/[%]/g, function() { + wt *= 100; + return ""; + }); + if (!isNaN(v = Number(ss))) return v / wt; + ss = ss.replace(/[(](.*)[)]/, function($$, $1) { + wt = -wt; + return $1; + }); + if (!isNaN(v = Number(ss))) return v / wt; + return v; +} + +function fuzzydate(s) { + var o = new Date(s), + n = new Date(NaN); + var y = o.getYear(), + m = o.getMonth(), + d = o.getDate(); + if (isNaN(d)) return n; + if (y < 0 || y > 8099) return n; + if ((m > 0 || d > 1) && y != 101) return o; + if (s.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) return o; + if (s.match(/[^-0-9:,\/\\]/)) return n; + return o; +} + +export function genarate(value) {//万 单位格式增加!!! + var ret = []; + var m = null, ct = {}, v = value; + + if(value == null){ + return null; + } + + if(value.toString().substr(0, 1) === "'"){ + m = value.toString().substr(1); + ct = { "fa": "@", "t": "s" }; + } + else if(value.toString().toUpperCase() === "TRUE"){ + m = "TRUE"; + ct = { "fa": "General", "t": "b" }; + v = true; + } + else if(value.toString().toUpperCase() === "FALSE"){ + m = "FALSE"; + ct = { "fa": "General", "t": "b" }; + v = false; + } + else if(valueIsError(value)){ + m = value.toString(); + ct = { "fa": "General", "t": "e" }; + } + else if(/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(value)){ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + else if(isRealNum(value) && Math.abs(parseFloat(value)) > 0 && (Math.abs(parseFloat(value)) >= 1e+11 || Math.abs(parseFloat(value)) < 1e-9)){ + v = numeral(value).value(); + + var str = v.toExponential(); + if(str.indexOf(".") > -1){ + var strlen = str.split(".")[1].split("e")[0].length; + if(strlen > 5){ + strlen = 5; + } + + ct = { "fa": "#0."+ new Array(strlen + 1).join("0") +"E+00", "t": "n" }; + } + else{ + ct = { "fa": "#0.E+00", "t": "n" }; + } + + m = SSF.format(ct.fa, v); + } + else if(value.toString().indexOf("%") > -1){ + var index = value.toString().indexOf("%"); + var value2 = value.toString().substr(0, index); + var value3 = value2.replace(/,/g, ""); + + if(index == value.toString().length - 1 && isRealNum(value3)){ + if(value2.indexOf(".") > -1){ + if(value2.indexOf(".") == value2.lastIndexOf(".")){ + var value4 = value2.split(".")[0]; + var value5 = value2.split(".")[1]; + + var len = value5.length; + if(len > 9){ + len = 9; + } + + if(value4.indexOf(",") > -1){ + var isThousands = true; + var ThousandsArr = value4.split(","); + + for(var i = 1; i < ThousandsArr.length; i++){ + if(ThousandsArr[i].length < 3){ + isThousands = false; + break; + } + } + + if(isThousands){ + ct = { "fa": "#,##0." + new Array(len + 1).join("0") + "%", "t": "n" }; + v = numeral(value).value(); + m = SSF.format(ct.fa, v); + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + else{ + ct = { "fa": "0." + new Array(len + 1).join("0") + "%", "t": "n" }; + v = numeral(value).value(); + m = SSF.format(ct.fa, v); + } + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + else if(value2.indexOf(",") > -1){ + var isThousands = true; + var ThousandsArr = value2.split(","); + + for(var i = 1; i < ThousandsArr.length; i++){ + if(ThousandsArr[i].length < 3){ + isThousands = false; + break; + } + } + + if(isThousands){ + ct = { "fa": "#,##0%", "t": "n" }; + v = numeral(value).value(); + m = SSF.format(ct.fa, v); + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + else{ + ct = { "fa": "0%", "t": "n" }; + v = numeral(value).value(); + m = SSF.format(ct.fa, v); + } + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + else if(value.toString().indexOf(".") > -1){ + if(value.toString().indexOf(".") == value.toString().lastIndexOf(".")){ + var value1 = value.toString().split(".")[0]; + var value2 = value.toString().split(".")[1]; + + var len = value2.length; + if(len > 9){ + len = 9; + } + + if(value1.indexOf(",") > -1){ + var isThousands = true; + var ThousandsArr = value1.split(","); + + for(var i = 1; i < ThousandsArr.length; i++){ + if(!isRealNum(ThousandsArr[i]) || ThousandsArr[i].length < 3){ + isThousands = false; + break; + } + } + + if(isThousands){ + ct = { "fa": "#,##0." + new Array(len + 1).join("0"), "t": "n" }; + v = numeral(value).value(); + m = SSF.format(ct.fa, v); + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + else{ + if(isRealNum(value1) && isRealNum(value2)){ + ct = { "fa": "0." + new Array(len + 1).join("0"), "t": "n" }; + v = numeral(value).value(); + m = SSF.format(ct.fa, v); + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + } + else{ + m = value.toString(); + ct = { "fa": "@", "t": "s" }; + } + } + else if(isRealNum(value)){ + m = value.toString(); + ct = { "fa": "General", "t": "n" }; + v = parseFloat(value); + } + else if (isdatetime(value) && (value.toString().indexOf(".") > -1 || value.toString().indexOf(":") > -1 || value.toString().length < 16)){ + v = datenum_local(parseDate(value.toString().replace(/-/g, "/"))); + + if(v.toString().indexOf(".") > -1){ + if(value.toString().length > 18){ + ct.fa = "yyyy-MM-dd hh:mm:ss"; + } + else if(value.toString().length > 11){ + ct.fa = "yyyy-MM-dd hh:mm"; + } + else{ + ct.fa = "yyyy-MM-dd"; + } + } + else{ + ct.fa = "yyyy-MM-dd"; + } + + ct.t = "d"; + m = SSF.format(ct.fa, v); + } + else{ + m = value; + ct.fa = "General"; + ct.t = "g"; + } + + return [m, ct, v]; +} + +export function update(fmt, v) { + return SSF.format(fmt, v); +} + +export function is_date(fmt, v) { + return SSF.is_date(fmt, v); +} + +export function valueShowEs(r, c, d) { + var value = getcellvalue(r, c, d, "m"); + if(value == null){ + value = getcellvalue(r, c, d, "v"); + } + else{ + if (!isNaN(fuzzynum(value))){ + if(typeof(value) == "string" && value.indexOf("%") > -1){ + + } + else{ + value = getcellvalue(r, c, d, "v"); + } + } + // else if (!isNaN(parseDate(value).getDate())){ + else if (d[r][c].ct != null && d[r][c].ct.t == "d"){ + + } + else if (d[r][c].ct != null && d[r][c].ct.t == "b"){ + + } + else{ + value = getcellvalue(r, c, d, "v"); + } + } + return value; +} diff --git a/src/global/formula.js b/src/global/formula.js new file mode 100644 index 000000000..868a554dd --- /dev/null +++ b/src/global/formula.js @@ -0,0 +1,4549 @@ +import { replaceHtml, getObjType, chatatABC, ABCatNum, luckysheetfontformat } from '../utils/util'; +import { getSheetIndex, getRangetxt, getluckysheetfile } from '../methods/get'; +import { setluckysheetfile } from '../methods/set'; +import { luckyColor } from '../controllers/constant'; +import sheetmanage from '../controllers/sheetmanage'; +import menuButton from '../controllers/menuButton'; +import server from '../controllers/server'; +import luckysheetFreezen from '../controllers/freezen'; +import { seletedHighlistByindex, luckysheet_count_show } from '../controllers/select'; +import { isRealNum, isRealNull, valueIsError, isEditMode } from './validate'; +import { isdatetime, isdatatype } from './datecontroll'; +import { getCellTextSplitArr } from '../global/getRowlen'; +import { getcellvalue } from './getdata'; +import { setcellvalue } from './setdata'; +import { genarate, valueShowEs } from './format'; +import editor from './editor'; +import tooltip from './tooltip'; +import { rowLocation, colLocation, colLocationByIndex, mouseposition } from './location'; +import { luckysheetRangeLast } from './cursorPos'; +import { jfrefreshgrid } from './refresh'; +import luckysheet_function from '../function/luckysheet_function'; +import functionlist from '../function/functionlist'; +import { luckysheet_compareWith, luckysheet_getcelldata } from '../function/func'; +import Store from '../store'; + +const luckysheetformula = { + error: { + v: "#VALUE!", //错误的参数或运算符 + n: "#NAME?", //公式名称错误 + na: "#N/A", //函数或公式中没有可用数值 + r: "#REF!", //删除了由其他公式引用的单元格 + d: "#DIV/0!", //除数是0或空单元格 + nm: "#NUM!", //当公式或函数中某个数字有问题时 + nl: "#NULL!", //交叉运算符(空格)使用不正确 + sp: "#SPILL!" //数组范围有其它值 + }, + errorInfo: function(err) { + return err; + }, + errorParamCheck: function(thisp, data, i) { + let type, require; + if(i < thisp.length){ + type = thisp[i].type; + require = thisp[i].require; + } + else{ + type = thisp[thisp.length - 1].type; + require = thisp[thisp.length - 1].require; + } + + if(require == "o" && (data == null || data == "")){ + return [true, "成功"]; + } + + if(type.indexOf("all") > -1){ + return [true, "成功"]; + } + else{ + if(type.indexOf("range") > -1 && (getObjType(data) == "object" || getObjType(data) == "array")){ + return [true, "成功"]; + } + + if(type.indexOf("number") > -1 && (isRealNum(data) || getObjType(data) == "boolean")){ + return [true, "成功"]; + } + + if(type.indexOf("string") > -1 && getObjType(data) == "string"){ + return [true, "成功"]; + } + + if(type.indexOf("date") > -1 && isdatetime(data)){ + return [true, "成功"]; + } + + return [false, "参数类型错误"]; + } + }, + getPureValueByData: function(data){ + if(data.length == 0){ + return []; + } + + let output = []; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + for(let r = 0; r < data.length; r++){ + let row = []; + + for(let c = 0; c < data[0].length; c++){ + let cell = data[r][c]; + + if(getObjType(cell) == "object"){ + row.push(cell.v); + } + else{ + row.push(cell); + } + } + + output.push(row); + } + } + else{ + for(let i = 0; i < data.length; i++){ + let cell = data[i]; + + if(getObjType(cell) == "object"){ + output.push(cell.v); + } + else{ + output.push(cell); + } + } + } + } + else { + let cell = data; + + if(getObjType(cell) == "object"){ + output.push(cell.v); + } + else{ + output.push(cell); + } + } + + return output; + }, + //sparklines添加 + readCellDataToOneArray: function(rangeValue){ + let _this = this; + + if(rangeValue == null){ + return []; + } + + if(getObjType(rangeValue) != "object"){ + return [rangeValue]; + } + + let dataformat = []; + let data = []; + + if(rangeValue != null && rangeValue.data != null){ + data = rangeValue.data; + } + else if(rangeValue != null && !isRealNull(rangeValue.v)){ + return [rangeValue.v]; + } + else{ + return []; + } + + //适配excel的动态数组格式,{1,2,3,4,5}或者{{1,2,3},{4,5,6},{7,8,9}} + if(getObjType(data) == "array"){ + data = _this.getPureValueByData(data); + } + else if(getObjType(data) == "object"){ + data = data.v; + + return [data]; + } + else{ + if(/\{.*?\}/.test(data)){ + data = data.replace(/\{/g, "[").replace(/\}/g, "]"); + } + + data = eval('('+ data +')'); + } + + //把二维数组转换为一维数组,sparklines要求数据格式为一维数组 + //let dataformat = []; + if(getObjType(data[0]) == "array"){ + for(let i = 0; i < data.length; i++){ + dataformat = dataformat.concat(data[i]); + } + } + else{ + dataformat = data; + } + + return dataformat; + }, + //sparklines添加 + //获得函数里某个参数的值,使用此函数需要在函数中执行luckysheet_getValue方法 + getValueByFuncData: function(value, arg){ + if(value == null){ + return null; + } + + let _this = this; + + if(getObjType(value) == "array"){ + if(arg == "avg"){ + return luckysheet_function.AVERAGE.f.apply(luckysheet_function.AVERAGE, value); + } + else if(arg == "sum"){ + return luckysheet_function.SUM.f.apply(luckysheet_function.SUM, value); + } + else{ + if(getObjType(value[0]) == "object"){ + return luckysheet.mask.getValueByFormat(value[0]); + } + else{ + return value[0]; + } + } + } + else if(getObjType(value) == "object"){ + return luckysheet.mask.getValueByFormat(value); + } + else{ + return value; + } + }, + //sparklines添加 + sparklinesColorMap:function(args, len){ + let _this = this; + let colorLists = null; + + if(len == null){ + len = 5; + } + + let index = 0; + + if(args.length > len){ + for(let i = len; i < args.length; i++){ + let colorMap = args[i]; + let colorListArray = _this.readCellDataToOneArray(colorMap); + + for(let a = 0; a < colorListArray.length; a++){ + let ca = colorListArray[a]; + + if(ca.indexOf(":") > -1){ + if(!colorLists){ + colorLists = {}; + } + + let calist = ca.split(":"); + + if(calist.length == 2){ + colorLists[calist[0]] = calist[1]; + } + else if(calist.length > 1){ + colorLists[calist[0] + ":" + calist[1]] = calist[2]; + } + } + else{ + if(!colorLists){ + colorLists = []; + } + + colorLists.push(ca); + } + } + + index++; + } + } + + return colorLists; + }, + //sparklines添加 + colorList: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], + classlist: { + "province": { + 11: "北京", + 12: "天津", + 13: "河北", + 14: "山西", + 15: "内蒙古", + 21: "辽宁", + 22: "吉林", + 23: "黑龙江", + 31: "上海", + 32: "江苏", + 33: "浙江", + 34: "安徽", + 35: "福建", + 36: "江西", + 37: "山东", + 41: "河南", + 42: "湖北", + 43: "湖南", + 44: "广东", + 45: "广西", + 46: "海南", + 50: "重庆", + 51: "四川", + 52: "贵州", + 53: "云南", + 54: "西藏", + 61: "陕西", + 62: "甘肃", + 63: "青海", + 64: "宁夏", + 65: "新疆", + 71: "台湾", + 81: "香港", + 82: "澳门", + 91: "国外" + } + }, + oldvalue: null, + dontupdate: function() { + let _this = this; + + Store.luckysheetCellUpdate.length = 0; //clear array + $("#luckysheet-functionbox-cell, #luckysheet-rich-text-editor").html(_this.oldvalue); + + _this.cancelNormalSelected(); + if (_this.rangetosheet != Store.currentSheetIndex) { + sheetmanage.changeSheetExec(_this.rangetosheet); + } + }, + fucntionboxshow: function(r, c) { + let _this = this; + + let d = Store.flowdata; + let value = ""; + + if (d[r] != null && d[r][c] != null && d[r][c].v != null) { + let cell = d[r][c]; + + if(cell.f != null){ + value = getcellvalue(r, c, d, "f"); + } + else{ + value = valueShowEs(r, c, d); + } + } + + _this.oldvalue = value; + $("#luckysheet-functionbox-cell").html(value); + }, + //获得某个单元格或区域的偏移一定距离后的单元格( Sheet1!B6:C8 格式) + cellOffset: function(range,rows,cols,height,width){// 参数:range or cell , rows,cols,height,width + let startCell = range.startCell; + let rowl = range.rowl; + let coll = range.coll; + let startCellRow = parseInt(startCell.replace(/[^0-9]/g, "")); + let startCellCol = ABCatNum(startCell.replace(/[^A-Za-z]/g, "")); + + let row = [],col = [],offsetRange; + row[0] = startCellRow + rows; + col[0] = startCellCol + cols; + + row[1] = row[0] + height - 1; + col[1] = col[0] + width - 1; + + col[0] = chatatABC(col[0]); + col[1] = chatatABC(col[1]); + + let cellF = col[0] + row[0]; + let cellL = col[1] + row[1]; + + if(cellF == cellL){ + offsetRange = range.sheetName + "!"+ cellF; + } + else{ + offsetRange = range.sheetName + "!"+ cellF + ":" + cellL; + } + + return offsetRange; + }, + parseDatetoNum: function(date){ //函数中获取到时间格式或者数字形式统一转化为数字进行运算 + let _this = this; + + if(typeof(date) == "object" && typeof date.v == "number"){ + date = date.v; + } + else if(isdatatype(date) == "num"){ + date = parseFloat(date); + } + else if(isdatatype(date) == "date"){ + date = genarate(date)[2]; + } + else{ + return _this.error.v; + } + + return date; + }, + //获取一维数组 + getRangeArray: function(range){ + let rangeNow = []; + let fmt = "General"; + + if(range.length == 1){ //一行 + for(let c = 0; c < range[0].length; c++){ + if(range[0][c] != null && range[0][c].v){ + rangeNow.push(range[0][c].v); + let f = range[0][c].ct.fa; + fmt = (fmt == "General") ? f : fmt; + } + else{ + //若单元格为null或为空,此处推入null(待考虑是否使用"null") + rangeNow.push(null); + } + } + } + else if(range[0].length == 1){ //一列 + for(let r = 0; r < range.length; r++){ + if(range[r][0] != null && range[r][0].v){ + rangeNow.push(range[r][0].v); + let f = range[r][0].ct.fa; + fmt = (fmt == "General") ? f : fmt; + } + else{ + rangeNow.push(null); + } + } + } + else{ + for(let r = 0; r < range.length; r++){ + for(let c = 0; c < range[r].length; c++){ + if(range[r][c] != null && range[r][c].v){ + rangeNow.push(range[r][c].v); + let f = range[r][c].ct.fa; + fmt = (fmt == "General") ? f : fmt; + } + else{ + rangeNow.push(null); + } + } + } + } + + range = rangeNow; + + return [range, fmt]; + }, + //获取二维数组:qksheet格式[[{v,m,ct}] ==> [1] + getRangeArrayTwo: function(range){ + let data = $.extend(true, [], range); + + if(data.length == 1){ //一行 + for(let c = 0; c < data[0].length; c++){ + if(data[0][c] instanceof Object){ + if(data[0][c] != null && data[0][c] instanceof Object && !!data[0][c].m){ + data[0][c] = data[0][c].m; + } + else{ + if(data[0][c] != null && data[0][c] instanceof Object && !!data[0][c].v){ + data[0][c] = data[0][c].v; + } + else{ + data[0][c] = null; + } + } + } + } + } + else if(data[0].length == 1){ //一列 + for(let r = 0; r < data.length; r++){ + if(data[r][0] instanceof Object){ + if(data[r][0] != null && data[r][0] instanceof Object && !!data[r][0].m){ + data[r][0] = data[r][0].m; + } + else{ + if(data[r][0] != null && data[r][0] instanceof Object && !!data[r][0].v){ + data[r][0] = data[r][0].v; + } + else{ + data[r][0] = null; + } + } + } + } + } + else{ + for(let r = 0; r < data.length; r++){ + for(let c = 0; c < data[r].length; c++){ + if(data[r][c] instanceof Object){ + if(data[r][c] != null && data[r][c] instanceof Object && !!data[r][c].m){ + data[r][c] = data[r][c].m; + } + else{ + if(data[r][c] != null && data[r][c] instanceof Object && !!data[r][c].v){ + data[r][c] = data[r][c].v; + } + else{ + data[r][c] = null; + } + } + } + } + } + } + + return data; + }, + isWildcard: function(a, b){ //正则匹配通配符: * ? ~* ~?,a目标参数,b通配符 + let _this = this; + + a = a.toString(); + b = b.toString(); + + if(_this.isCompareOperator(b).flag){ + b = _this.isCompareOperator(b).num; + } + + let str = ""; + for(let i = 0; i < b.length; i++){ + let v = b.charAt(i); + + if(v == "*" ){ + str += ".*"; + } + else if(v == "?"){ + str += "."; + } + else if(v == "~"){ + if(b.charAt(i+1) == "*"){ + str += "\\*"; + i++; + } + else if(b.charAt(i+1) == "?"){ + str += "\\?"; + i++; + } + else{ + str += "~"; + } + } + else{ + str += v; + } + } + + let reg = new RegExp("^" + str + "$", "g"); + + return !!a.match(reg); + }, + isCompareOperator: function(str){ //判断前一个或者两个字符是否是比较运算符 + str = str.toString(); + let ope = ""; //存放比较运算符 + let num = ""; //截取比较运算符之后的数字用于实际比较 + let strOne = str.substr(0,1); + let strTwo = str.substr(1,1); + let flag = false; + let ret; + + if(strOne == ">"){ + if(strTwo == "="){ + ope = str.substr(0,2); + num = str.substr(2); + flag = true; + } + else if(strTwo != "="){ + ope = str.substr(0,1); + num = str.substr(1); + flag = true; + } + } + else if(strOne == "<"){ + if(strTwo == "=" || strTwo == ">"){ + ope = str.substr(0,2); + num = str.substr(2); + flag = true; + } + else if(strTwo != "=" && strTwo != ">"){ + ope = str.substr(0,1); + num = str.substr(1); + flag = true; + } + } + else if(strOne == "=" && strTwo != "="){ + ope = str.substr(0,1); + num = str.substr(1); + flag = true; + } + + ret = { "flag": flag, "ope": ope, "num": num }; + + return ret; + }, + acompareb: function(a, b){ //a 与 b比较,b可为含比较符,通配符 + let _this = this; + let flag = false; + + if(isRealNum(b)){ + flag = luckysheet_compareWith(a, "==", b); + } + else if(typeof(b) == "string"){ //条件输入字符串,如:">233" + if(b.indexOf("*") != -1 || b.indexOf("?") != -1){ // 正则匹配:输入通配符:"黑*","白?",以及"白?黑*~*" + //通配符函数 + return _this.isWildcard(a, b); + } + else if(_this.isCompareOperator(b).flag){ //"黑糖" + let ope = _this.isCompareOperator(b).ope; + let num = _this.isCompareOperator(b).num; + flag = luckysheet_compareWith(a, ope, num); + } + else{ + flag = luckysheet_compareWith(a, "==", b); + } + } + + return flag; + }, + compareParams: function(fp, sp, sym){ //比较两个字符串或者数字的大小,支持比较对象,暂不支持数组 + let flag = false; + + //判断a和b的数据类型 + let classNameA = toString.call(fp), + classNameB = toString.call(sp); + + if(sym == ">" && fp > sp){ + flag = true; + } + else if(sym == ">=" && fp >= sp){ + flag = true; + } + else if(sym == "<" && fp < sp){ + flag = true; + } + else if(sym == "<=" && fp <= sp){ + flag = true; + } + else if(sym == "=" && fp == sp){ + flag = true; + } + else if(sym == "<>" && fp != sp){ + flag = true; + } + + //对象类型比较相等 + if(classNameA == '[object Object]' && classNameB == '[object Object]'){ + //获取a和b的属性长度 + let propsA = Object.getOwnPropertyNames(fp), + propsB = Object.getOwnPropertyNames(sp); + + if(propsA.length != propsB.length){ + return false; + } + + for(let i = 0; i < propsA.length; i++){ + let propName=propsA[i]; + //如果对应属性对应值不相等,则返回false + if(fp[propName] !== sp[propName]){ + return false; + } + } + + return true; + } + + //数组类型 + if(classNameA == '[object Array]' && classNameB == '[object Array]'){ + if(fp.toString() == sp.toString()){ + return true; + } + + return false; + } + + return flag; + }, + parseDecimal: function(num){ + num = parseFloat(num); + let d = parseInt(num, 10); + + if(d == 0){ + return num; + } + + num = num % d; + return num; + }, + getcellrange: function(txt) { + let val = txt.split("!"); + + let sheettxt = "", + rangetxt = "", + sheetIndex = -1, + sheetdata = null; + + let luckysheetfile = getluckysheetfile(); + + if (val.length > 1) { + sheettxt = val[0]; + rangetxt = val[1]; + + for (let i in luckysheetfile) { + if (sheettxt == luckysheetfile[i].name) { + sheetIndex = luckysheetfile[i].index; + sheetdata = luckysheetfile[i].data; + break; + } + } + } + else { + let index = getSheetIndex(Store.currentSheetIndex); + sheettxt = luckysheetfile[index].name; + sheetIndex = luckysheetfile[index].index; + sheetdata = Store.flowdata; + rangetxt = val[0]; + } + + if (rangetxt.indexOf(":") == -1) { + let row = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; + let col = ABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); + + if (!isNaN(row) && !isNaN(col)) { + return { + "row": [row, row], + "column": [col, col], + "sheetIndex": sheetIndex + }; + } + else { + return null; + } + } + else { + rangetxt = rangetxt.split(":"); + let row = [],col = []; + row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; + row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; + if (isNaN(row[0])) { + row[0] = 0; + } + if (isNaN(row[1])) { + row[1] = sheetdata.length - 1; + } + if (row[0] > row[1]) { + return null; + } + col[0] = ABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); + col[1] = ABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); + if (isNaN(col[0])) { + col[0] = 0; + } + if (isNaN(col[1])) { + col[1] = sheetdata[0].length - 1; + } + if (col[0] > col[1]) { + return null; + } + + return { + "row": row, + "column": col, + "sheetIndex": sheetIndex + }; + } + }, + rangeHightlightHTML: '
', + createRangeHightlight: function() { + let _this = this; + + let $span = $("#luckysheet-rich-text-editor").find("span.luckysheet-formula-functionrange-cell"); + $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); + + $span.each(function() { + let rangeindex = $(this).attr("rangeindex"), + range = $(this).text(); + + $("#luckysheet-formula-functionrange").append(replaceHtml(_this.rangeHightlightHTML, { + "id": rangeindex + })); + + let cellrange = _this.getcellrange(range); + let rangeid = "luckysheet-formula-functionrange-highlight-" + rangeindex; + + if (cellrange == null) { + + } + else if (cellrange.sheetIndex == Store.currentSheetIndex || (cellrange.sheetIndex == -1 && _this.rangetosheet == Store.currentSheetIndex)) { + $("#" + rangeid).data("range", cellrange) + .find(".luckysheet-copy") + .css({ "background": luckyColor[rangeindex] }) + .end() + .find(".luckysheet-highlight") + .css({ "background": luckyColor[rangeindex] }) + .end() + .find(".luckysheet-selection-copy-hc") + .css({ "background": luckyColor[rangeindex] }); + + seletedHighlistByindex(rangeid, cellrange.row[0], cellrange.row[1], cellrange.column[0], cellrange.column[1]); + } + }); + + $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").show(); + }, + searchHTML: '
', + helpHTML: '
SUM ( A2:A100, 101 )
示例
SUM ( A2:A100, 101 )
摘要
${detail}
${param}
', + getrangeseleciton: function() { + let currSelection = window.getSelection(); + let anchor = $(currSelection.anchorNode); + let anchorOffset = currSelection.anchorOffset; + + if (anchor.parent().is("span") && anchorOffset != 0) { + let txt = $.trim(anchor.text()), + lasttxt = ""; + + if (txt.length == 0 && anchor.parent().prev().length > 0) { + let ahr = anchor.parent().prev(); + txt = $.trim(ahr.text()); + lasttxt = txt.substr(txt.length - 1, 1); + return ahr; + } + else { + lasttxt = txt.substr(anchorOffset - 1, 1); + return anchor.parent(); + } + } + else if (anchor.is("#luckysheet-rich-text-editor") || anchor.is("#luckysheet-functionbox-cell")) { + let txt = $.trim(anchor.find("span").last().text()); + + if (txt.length == 0 && anchor.find("span").length > 1) { + let ahr = anchor.find("span"); + txt = $.trim(ahr.eq(ahr.length - 2).text()); + return ahr; + } + else { + return anchor.find("span").last(); + } + } + else if (anchor.parent().is("#luckysheet-rich-text-editor") || anchor.parent().is("#luckysheet-functionbox-cell") || anchorOffset == 0) { + if (anchorOffset == 0) { + anchor = anchor.parent(); + } + + if (anchor.prev().length > 0) { + let txt = $.trim(anchor.prev().text()); + let lasttxt = txt.substr(txt.length - 1, 1); + return anchor.prev(); + } + } + + return null; + }, + searchFunctionPosition: function($menu, $editor, x, y, isparam) { + let winH = $(window).height(), + winW = $(window).width(); + let menuW = $menu.outerWidth(), + menuH = $menu.outerHeight(); + + if (isparam == null) { + isparam = false; + } + + let left = x; + if (x + menuW > winW) { + left = x - menuW + $editor.outerWidth(); + } + else { + left = x; + } + + let top = y; + if (y + menuH > winH) { + top = y - menuH; + } + else { + top = y + $editor.outerHeight(); + if (!isparam) { + $menu.html($menu.find(".luckysheet-formula-search-item").get().reverse()); + } + } + + if (top < 0) { + top = 0; + } + if (left < 0) { + left = 0; + } + + $menu.css({ + "top": top, + "left": left + }).show(); + }, + searchFunctionCell: null, + searchFunction: function($editer) { + let _this = this; + + let $cell = _this.getrangeseleciton(); + _this.searchFunctionCell = $cell; + + if ($cell == null || $editer == null) { + return; + } + + let searchtxt = $cell.text().toUpperCase(); + let reg = /^[a-zA-Z]|[a-zA-Z_]+$/; + + if (!reg.test(searchtxt)) { + return; + } + + let result = { + "f": [], + "s": [], + "t": [] + }, + result_i = 0; + + for (let i = 0; i < functionlist.length; i++) { + let item = functionlist[i], + n = item.n; + + if (n == searchtxt) { + result.f.unshift(item); + result_i++; + } + else if (n.substr(0, searchtxt.length) == searchtxt) { + result.s.unshift(item); + result_i++; + } + else if (n.indexOf(searchtxt) > -1) { + result.t.unshift(item); + result_i++; + } + + if (result_i >= 10) { + break; + } + } + + let list = result.t.concat(result.s.concat(result.f)); + if (list.length <= 0) { + return; + } + + let listHTML = _this.searchFunctionHTML(list); + $("#luckysheet-formula-search-c").html(listHTML).show(); + $("#luckysheet-formula-help-c").hide(); + + let $c = $editer.parent(), + offset = $c.offset(); + _this.searchFunctionPosition($("#luckysheet-formula-search-c"), $c, offset.left, offset.top); + }, + searchFunctionEnter: function($obj) { + let _this = this; + + let functxt = $obj.data("func"); + _this.searchFunctionCell.text(functxt).after('('); + _this.setCaretPosition(_this.searchFunctionCell.next().get(0), 0, 1); + $("#luckysheet-formula-search-c").hide(); + _this.helpFunctionExe(_this.searchFunctionCell.closest("div"), _this.searchFunctionCell.next()); + }, + searchFunctionHTML: function(list) { + let _this = this; + + if ($("#luckysheet-formula-search-c").length == 0) { + $("body").append(_this.searchHTML); + $("#luckysheet-formula-search-c").on("mouseover", ".luckysheet-formula-search-item", function() { + $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); + $(this).addClass("luckysheet-formula-search-item-active"); + }).on("mouseout", ".luckysheet-formula-search-item", function() { + + }).on("click", ".luckysheet-formula-search-item", function() { + if (_this.searchFunctionCell == null) { + return; + } + _this.searchFunctionEnter($(this)); + }); + } + + let itemHTML = '
${n}
${a}
'; + let retHTML = ""; + + for (let i = 0; i < list.length; i++) { + let item = list[i]; + + if (i == list.length - 1) { + retHTML += replaceHtml(itemHTML, { + "class": "luckysheet-formula-search-item-active", + "n": item.n, + "a": item.a + }); + } + else { + retHTML += replaceHtml(itemHTML, { + "class": "", + "n": item.n, + "a": item.a + }); + } + } + + return retHTML; + }, + functionlistPosition: {}, + helpFunction: function($editer, funcname, paramIndex) { + let _this = this; + + let $func = functionlist[_this.functionlistPosition[$.trim(funcname).toUpperCase()]]; + if ($func == null) { + return; + } + + $("#luckysheet-formula-help-c .luckysheet-arguments-help-function-name").html($func.n); + $("#luckysheet-formula-help-c .luckysheet-arguments-help-parameter-content").html($func.d); + + let helpformula = '${name} ( ${param} )'; + let helpformulaItem = '${param}'; + let helpformulaArg = '
${param}
${content}
'; + + //"n": "AVERAGE", + //"t": "1", + //"d": "返回数据集的算术平均值,对文本忽略不计。", + //"a": "返回数据集的算术平均值", + //"p": [{ "name": "数值1", "example": "A2:A100", "detail": "计算平均值时用到的第一个数值或范围。", "require": "m", "repeat": "n", "type": "rangenumber" }, + // { "name": "数值2", "example": "B2:B100", "detail": "计算平均值时用到的其他数值或范围。", "require": "o", "repeat": "y", "type": "rangenumber" } + //] + let fht = "", + ahf = "", + fhcp = ""; + + for (let i = 0; i < $func.p.length; i++) { + let paramitem = $func.p[i]; + let name = paramitem.name, + nameli = paramitem.name; + + if (paramitem.repeat == "y") { + name += ", ..."; + nameli += '...-可重复'; + } + if (paramitem.require == "o") { + name = "[" + name + "]"; + nameli += '-[可选]'; + } + + fht += '' + name + ', '; + ahf += '' + paramitem.example + ', '; + fhcp += replaceHtml(helpformulaArg, { + "param": nameli, + "content": paramitem.detail + }); + } + + fht = fht.substr(0, fht.length - 2); + ahf = ahf.substr(0, ahf.length - 2); + + $("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder").html(fht); //介绍 + $("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder").html(ahf); //示例 + $("#luckysheet-formula-help-c .luckysheet-formula-help-content-param").html(fhcp); //参数 + + if(paramIndex == null){ + $("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight", "bold"); + } + else{ + $("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight", "normal"); + let index = paramIndex >= $func.p.length ? $func.p.length - 1 : paramIndex; + $("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"); + $("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(index).addClass("luckysheet-arguments-help-parameter-active"); + $("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"); + $("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(index).addClass("luckysheet-arguments-help-parameter-active"); + $("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").removeClass("luckysheet-arguments-help-parameter-active"); + $("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").eq(index).addClass("luckysheet-arguments-help-parameter-active"); + } + + let $c = $editer.parent(), + offset = $c.offset(); + _this.searchFunctionPosition($("#luckysheet-formula-help-c"), $c, offset.left, offset.top, true); + }, + helpFunctionExe: function($editer, currSelection) { + let _this = this; + + if ($("#luckysheet-formula-help-c").length == 0) { + $("body").after(_this.helpHTML); + $("#luckysheet-formula-help-c .luckysheet-formula-help-close").click(function() { + $("#luckysheet-formula-help-c").hide(); + }); + $("#luckysheet-formula-help-c .luckysheet-formula-help-collapse").click(function() { + let $content = $("#luckysheet-formula-help-c .luckysheet-formula-help-content"); + $content.slideToggle(100, function() { + let $c = _this.rangeResizeTo.parent(), + offset = $c.offset(); + _this.searchFunctionPosition($("#luckysheet-formula-help-c"), $c, offset.left, offset.top, true); + }); + + if ($content.is(":hidden")) { + $(this).html(''); + } + else { + $(this).html(''); + } + }); + + for (let i = 0; i < functionlist.length; i++) { + _this.functionlistPosition[functionlist[i].n] = i; + } + } + + if(!currSelection){ + return; + } + + let $prev = currSelection, + funcLen = $editer.length, + $span = $editer.find("span"), + currentIndex = currSelection.index(), + i = currentIndex; + + if ($prev == null) { + return; + } + + let funcName = null, paramindex= null; + + if($span.eq(i).is(".luckysheet-formula-text-func")){ + funcName = $span.eq(i).text(); + } + else{ + let $cur = null, exceptIndex = [-1, -1]; + + while (--i > 0) { + $cur = $span.eq(i); + + if($cur.is(".luckysheet-formula-text-func") || $.trim($cur.text()).toUpperCase() in _this.functionlistPosition){ + funcName = $cur.text(); + paramindex = null; + let endstate = true; + + for(let a = i; a <= currentIndex; a++){ + if(!paramindex){ + paramindex = 0; + } + + if(a >= exceptIndex[0] && a <= exceptIndex[1]){ + continue; + } + + $cur = $span.eq(a); + if($cur.is(".luckysheet-formula-text-rpar")){ + exceptIndex = [i , a]; + funcName = null; + endstate = false; + break; + } + + if($cur.is(".luckysheet-formula-text-comma")){ + paramindex++; + } + } + + if(endstate){ + break; + } + } + } + } + + if(funcName == null){ + return; + } + + _this.helpFunction($editer, funcName, paramindex); + }, + rangeHightlightselected: function($editer, kcode) { + let _this = this; + + let currSelection = _this.getrangeseleciton(); + $("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(); + $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight .luckysheet-selection-copy-hc").css("opacity", "0.03"); + $("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(); + _this.helpFunctionExe($editer, currSelection); + + if ($(currSelection).closest(".luckysheet-formula-functionrange-cell").length == 0) { + _this.searchFunction($editer); + return; + } + + let $anchorOffset = $(currSelection).closest(".luckysheet-formula-functionrange-cell"); + let rangeindex = $anchorOffset.attr("rangeindex"); + let rangeid = "luckysheet-formula-functionrange-highlight-" + rangeindex; + + $("#" + rangeid).find(".luckysheet-selection-copy-hc").css({ + "opacity": "0.13" + }); + }, + updatecell: function(r, c) { + let _this = this; + + let $input = $("#luckysheet-rich-text-editor"), + value = $input.text(); + + if (_this.rangetosheet != Store.currentSheetIndex) { + sheetmanage.changeSheetExec(_this.rangetosheet); + } + + let curv = Store.flowdata[r][c]; + + if(isRealNull(value)){ + if(curv == null || isRealNull(curv.v)){ + _this.cancelNormalSelected(); + return; + } + } + else{ + if (getObjType(curv) == "object" && (value == curv.f || value == curv.v || value == curv.m)) { + _this.cancelNormalSelected(); + return; + } + else if (value == curv) { + _this.cancelNormalSelected(); + return; + } + } + + if (value.slice(0, 1) == "=" && value.length > 1) { + + } + else if(getObjType(curv) == "object" && curv.ct != null && curv.ct.fa != null && curv.ct.fa != "@" && !isRealNull(value)){ + delete curv.m;//更新时间m处理 , 会实际删除单元格数据的参数(flowdata时已删除) + if(curv.f != null){ //如果原来是公式,而更新的数据不是公式,则把公式删除 + delete curv.f; + delete curv.spl; //删除单元格的sparklines的配置串 + } + } + + window.luckysheet_getcelldata_cache = null; + + let d = editor.deepCopyFlowData(Store.flowdata); + + if (getObjType(curv) == "object") { + if(getObjType(value) == "string" && value.slice(0, 1) == "=" && value.length > 1){ + let v = _this.execfunction(value, r, c, true); + + curv = _this.execFunctionGroupData[r][c]; + curv.f = v[2]; + + //打进单元格的sparklines的配置串, 报错需要单独处理。 + if(v.length == 4 && v[3].type == "sparklines"){ + delete curv.m; + delete curv.v; + + let curCalv = v[3].data; + + if(getObjType(curCalv) == "array" && getObjType(curCalv[0]) != "object"){ + curv.v = curCalv[0]; + } + else{ + curv.spl = v[3].data; + } + } + } + else{ + _this.delFunctionGroup(r, c); + _this.execFunctionGroup(r, c, value); + + curv = _this.execFunctionGroupData[r][c]; + + delete curv.f; + delete curv.spl; + } + + value = curv; + } + else { + if(getObjType(value) == "string" && value.slice(0, 1) == "=" && value.length > 1){ + let v = _this.execfunction(value, r, c, true); + + value = { + "v": v[1], + "f": v[2] + }; + + //打进单元格的sparklines的配置串, 报错需要单独处理。 + if(v.length == 4 && v[3].type == "sparklines"){ + let curCalv = v[3].data; + + if(getObjType(curCalv) == "array" && getObjType(curCalv[0]) != "object"){ + value.v = curCalv[0]; + } + else{ + value.spl = v[3].data; + } + } + } + else{ + _this.delFunctionGroup(r, c); + _this.execFunctionGroup(r, c, value); + } + } + + setcellvalue(r, c, d, value); + _this.cancelNormalSelected(); + + let RowlChange = false; + let cfg = $.extend(true, {}, getluckysheetfile()[getSheetIndex(Store.currentSheetIndex)]["config"]); + if(cfg["rowlen"] == null){ + cfg["rowlen"] = {}; + } + + if(d[r][c].tb == "2" && d[r][c].v != null){//自动换行 + let defaultrowlen = 19; + + let offlinecanvas = $("#luckysheetTableContentF").get(0).getContext("2d"); + let fontset = luckysheetfontformat(d[r][c]); + offlinecanvas.font = fontset; + + let currentRowLen = defaultrowlen; + if(cfg["rowlen"][r] != null){ + currentRowLen = cfg["rowlen"][r]; + } + + let strValue = getcellvalue(r, c, d).toString(); + let tbWidth = offlinecanvas.measureText(strValue).width; + let cellWidth = colLocationByIndex(c)[1] - colLocationByIndex(c)[0] - 8; + + if(tbWidth > cellWidth){ + let strArr = [];//文本截断数组 + strArr = getCellTextSplitArr(strValue, strArr, cellWidth, offlinecanvas); + + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + let computeRowlen = oneLineTextHeight * strArr.length; + //比较计算高度和当前高度取最大高度 + if(computeRowlen > currentRowLen){ + currentRowLen = computeRowlen; + } + } + + if(currentRowLen != defaultrowlen){ + cfg["rowlen"][r] = currentRowLen; + RowlChange = true; + } + } + + if(RowlChange){ + jfrefreshgrid(d, [{"row": [r, r], "column": [c, c]}], cfg, null, RowlChange); + } + else{ + jfrefreshgrid(d, [{"row": [r, r], "column": [c, c]}]); + } + + // Store.luckysheetCellUpdate.length = 0; //clear array + _this.execFunctionGroupData = null; //销毁 + }, + cancelNormalSelected: function() { + let _this = this; + + _this.canceFunctionrangeSelected(); + + $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); + $("#luckysheet-input-box").removeAttr("style"); + $("#luckysheet-input-box-index").hide(); + $("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").removeClass("luckysheet-wa-calculate-active"); + + _this.rangestart = false; + _this.rangedrag_column_start = false; + _this.rangedrag_row_start = false; + }, + canceFunctionrangeSelected: function() { + $("#luckysheet-formula-functionrange-select").hide(); + $("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(); + // $("#luckysheet-cols-h-selected, #luckysheet-rows-h-selected").hide(); + $("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(); + }, + iscellformat: function(txt) { + let re_abc = /[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][123456789]/; + }, + iscelldata: function(txt) { //判断是否为单元格格式 + let val = txt.split("!"), + rangetxt; + + if (val.length > 1) { + rangetxt = val[1]; + } + else { + rangetxt = val[0]; + } + + let reg_cell = /^(([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+))$/g; //增加正则判断单元格为字母+数字的格式:如 A1:B3 + let reg_cellRange = /^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+))))$/g; //增加正则判断单元格为字母+数字或字母的格式:如 A1:B3,A:A + + if (rangetxt.indexOf(":") == -1) { + let row = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; + let col = ABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); + + if (!isNaN(row) && !isNaN(col) && rangetxt.toString().match(reg_cell)) { + return true; + } + else if (!isNaN(row)) { + return false; + } + else if (!isNaN(col)) { + return false; + } + else { + return false; + } + } + else { + reg_cellRange = /^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+)))|((([0-9]+)|([$][0-9]+s))))$/g; + + rangetxt = rangetxt.split(":"); + + let row = [],col = []; + row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; + row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; + if (row[0] > row[1]) { + return false; + } + + col[0] = ABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); + col[1] = ABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); + if (col[0] > col[1]) { + return false; + } + + if(rangetxt[0].toString().match(reg_cellRange) && rangetxt[1].toString().match(reg_cellRange)){ + return true; + } + else{ + return false; + } + } + }, + operator: '==|!=|<>|<=|>=|=|+|-|>|<|/|*|%|&|^', + operatorjson: null, + functionCopy: function(txt, mode, step) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (mode == null) { + mode = "down"; + } + + if (step == null) { + step = 1; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = "", + ispassby = true; + + let matchConfig = { + "bracket": 0, + "comma": 0, + "squote": 0, + "dquote": 0 + }; + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0) { + matchConfig.bracket += 1; + + if (str.length > 0) { + function_str += str + "("; + } + else { + function_str += "("; + } + + str = ""; + } + else if (s == ")" && matchConfig.dquote == 0) { + matchConfig.bracket -= 1; + function_str += _this.functionCopy(str, mode, step) + ")"; + str = ""; + } + else if (s == '"' && matchConfig.squote == 0) { + if (matchConfig.dquote > 0) { + function_str += str + '"'; + matchConfig.dquote -= 1; + str = ""; + } + else { + matchConfig.dquote += 1; + str += '"'; + } + } + else if (s == ',' && matchConfig.dquote == 0) { + function_str += _this.functionCopy(str, mode, step) + ','; + str = ""; + } + else if (s == '&' && matchConfig.dquote == 0) { + if (str.length > 0) { + function_str += _this.functionCopy(str, mode, step) + "&"; + str = ""; + } + else { + function_str += "&"; + } + } + else if (s in _this.operatorjson && matchConfig.dquote == 0) { + let s_next = ""; + + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + let p = i - 1, + s_pre = null; + + if(p >= 0){ + do { + s_pre = funcstack[p--]; + } + while (p>=0 && s_pre ==" ") + } + + if ((s + s_next) in _this.operatorjson) { + if (str.length > 0) { + function_str += _this.functionCopy(str, mode, step) + s + s_next; + str = ""; + } + else { + function_str += s + s_next; + } + + i++; + } + else if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in _this.operatorjson ) ){ + str += s; + } + else { + if (str.length > 0) { + function_str += _this.functionCopy(str, mode, step) + s; + str = ""; + } + else { + function_str += s; + } + } + } + else { + str += s; + } + + if (i == funcstack.length - 1) { + if (_this.iscelldata($.trim(str))) { + if (mode == "down") { + function_str += _this.downparam($.trim(str), step); + } + else if (mode == "up") { + function_str += _this.upparam($.trim(str), step); + } + else if (mode == "left") { + function_str += _this.leftparam($.trim(str), step); + } + else if (mode == "right") { + function_str += _this.rightparam($.trim(str), step); + } + } + else { + function_str += $.trim(str); + } + } + + i++; + } + + return function_str; + }, + isfreezonFuc: function(txt) { + let row = txt.replace(/[^0-9]/g, ""); + let col = txt.replace(/[^A-Za-z]/g, ""); + let row$ = txt.substr(txt.indexOf(row) - 1, 1); + let col$ = txt.substr(txt.indexOf(col) - 1, 1); + let ret = [false, false]; + + if (row$ == "$") { + ret[0] = true; + } + if (col$ == "$") { + ret[1] = true; + } + + return ret; + }, + setfreezonFuceExe: function(rangetxt) { + let row = parseInt(rangetxt.replace(/[^0-9]/g, "")); + let col = ABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); + let $row = "$", + $col = "$"; + + if (!isNaN(row) && !isNaN(col)) { + return $col + chatatABC(col) + $row + (row); + } + else if (!isNaN(row)) { + return $row + (row); + } + else if (!isNaN(col)) { + return $col + chatatABC(col); + } + else { + return rangetxt; + } + }, + setfreezonFuc: function(event) { + let _this = this; + + let obj = _this.getrangeseleciton(); + if (!_this.iscelldata(obj.text())) { + return; + } + + let txt = obj.text(), + pos = window.getSelection().anchorOffset; + let val = txt.split("!"), + rangetxt, prefix = ""; + + if (val.length > 1) { + rangetxt = val[1]; + prefix = val[0] + "!"; + } + else { + rangetxt = val[0]; + } + + let newtxt = "", + newpos = ""; + let rangetxtIndex = rangetxt.indexOf(":"); + + if (rangetxtIndex == -1) { + newtxt = prefix + _this.setfreezonFuceExe(rangetxt); + newpos = newtxt.length; + } + else { + rangetxt = rangetxt.split(":"); + + if (pos > rangetxtIndex) { + let ret = prefix + rangetxt[0] + ":" + _this.setfreezonFuceExe(rangetxt[1]); + newtxt = ret; + newpos = ret.length; + } + else { + let firsttxt = prefix + _this.setfreezonFuceExe(rangetxt[0]); + let ret = firsttxt + ":" + rangetxt[1]; + newtxt = ret; + newpos = firsttxt.length; + } + } + + obj.text(prefix + newtxt); + _this.setCaretPosition(obj.get(0), 0, newpos); + }, + updateparam: function(orient, txt, step) { + let _this = this; + + let val = txt.split("!"), + rangetxt, prefix = ""; + + if (val.length > 1) { + rangetxt = val[1]; + prefix = val[0] + "!"; + } + else { + rangetxt = val[0]; + } + + if (rangetxt.indexOf(":") == -1) { + let row = parseInt(rangetxt.replace(/[^0-9]/g, "")); + let col = ABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); + let freezonFuc = _this.isfreezonFuc(rangetxt); + let $row = freezonFuc[0] ? "$" : "", + $col = freezonFuc[1] ? "$" : ""; + + if (orient == "u" && !freezonFuc[0]) { + row -= step; + } + else if (orient == "r" && !freezonFuc[1]) { + col += step; + } + else if (orient == "l" && !freezonFuc[1]) { + col -= step; + } + else if (!freezonFuc[0]) { + row += step; + } + + if(row[0] < 0 || col[0] < 0){ + return _this.error.r; + } + + if (!isNaN(row) && !isNaN(col)) { + return prefix + $col + chatatABC(col) + $row + (row); + } + else if (!isNaN(row)) { + return prefix + $row + (row); + } + else if (!isNaN(col)) { + return prefix + $col + chatatABC(col); + } + else { + return txt; + } + } + else { + rangetxt = rangetxt.split(":"); + let row = [], + col = []; + + row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")); + row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")); + if (row[0] > row[1]) { + return txt; + } + + col[0] = ABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); + col[1] = ABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); + if (col[0] > col[1]) { + return txt; + } + + let freezonFuc0 = _this.isfreezonFuc(rangetxt[0]); + let freezonFuc1 = _this.isfreezonFuc(rangetxt[1]); + let $row0 = freezonFuc0[0] ? "$" : "", + $col0 = freezonFuc0[1] ? "$" : ""; + let $row1 = freezonFuc1[0] ? "$" : "", + $col1 = freezonFuc1[1] ? "$" : ""; + + if (orient == "u") { + if (!freezonFuc0[0]) { + row[0] -= step; + } + + if (!freezonFuc1[0]) { + row[1] -= step; + } + } + else if (orient == "r") { + if (!freezonFuc0[1]) { + col[0] += step; + } + + if (!freezonFuc1[1]) { + col[1] += step; + } + } + else if (orient == "l") { + if (!freezonFuc0[1]) { + col[0] -= step; + } + + if (!freezonFuc1[1]) { + col[1] -= step; + } + } + else { + if (!freezonFuc0[0]) { + row[0] += step; + } + + if (!freezonFuc1[0]) { + row[1] += step; + } + } + + if(row[0] < 0 || col[0] < 0){ + return _this.error.r; + } + + if (isNaN(col[0]) && isNaN(col[1])) { + return prefix + $row0 + (row[0]) + ":" + $row1 + (row[1]); + } + else if (isNaN(row[0]) && isNaN(row[1])) { + return prefix + $col0 + chatatABC(col[0]) + ":" + $col1 + chatatABC(col[1]); + } + else { + return prefix + $col0 + chatatABC(col[0]) + $row0 + (row[0]) + ":" + $col1 + chatatABC(col[1]) + $row1 + (row[1]); + } + } + }, + downparam: function(txt, step) { + return this.updateparam("d", txt, step); + }, + upparam: function(txt, step) { + return this.updateparam("u", txt, step); + }, + leftparam: function(txt, step) { + return this.updateparam("l", txt, step); + }, + rightparam: function(txt, step) { + return this.updateparam("r", txt, step); + }, + functionStrChange: function(txt, type, rc, orient, stindex, step) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = "", + ispassby = true; + + let matchConfig = { + "bracket": 0, //括号 + "comma": 0, //逗号 + "squote": 0, //单引号 + "dquote": 0 //双引号 + }; + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0) { + matchConfig.bracket += 1; + + if (str.length > 0) { + function_str += str + "("; + } + else { + function_str += "("; + } + + str = ""; + } + else if (s == ")" && matchConfig.dquote == 0) { + matchConfig.bracket -= 1; + function_str += _this.functionStrChange(str, type, rc, orient, stindex, step) + ")"; + str = ""; + } + else if (s == '"' && matchConfig.squote == 0) { + if (matchConfig.dquote > 0) { + function_str += str + '"'; + matchConfig.dquote -= 1; + str = ""; + } + else { + matchConfig.dquote += 1; + str += '"'; + } + } + else if (s == ',' && matchConfig.dquote == 0) { + function_str += _this.functionStrChange(str, type, rc, orient, stindex, step) + ','; + str = ""; + } + else if (s == '&' && matchConfig.dquote == 0) { + if (str.length > 0) { + function_str += _this.functionStrChange(str, type, rc, orient, stindex, step) + "&"; + str = ""; + } + else { + function_str += "&"; + } + } + else if (s in _this.operatorjson && matchConfig.dquote == 0) { + let s_next = ""; + + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + let p = i - 1, + s_pre = null;; + + if(p >= 0){ + do { + s_pre = funcstack[p--]; + } + while (p>=0 && s_pre ==" ") + } + + if ((s + s_next) in _this.operatorjson) { + if (str.length > 0) { + function_str += _this.functionStrChange(str, type, rc, orient, stindex, step) + s + s_next; + str = ""; + } + else { + function_str += s + s_next; + } + + i++; + } + else if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in _this.operatorjson ) ){ + str += s; + } + else { + if (str.length > 0) { + function_str += _this.functionStrChange(str, type, rc, orient, stindex, step) + s; + str = ""; + } + else { + function_str += s; + } + } + } + else { + str += s; + } + + if (i == funcstack.length - 1) { + if (_this.iscelldata($.trim(str))) { + function_str += _this.functionStrChange_range($.trim(str), type, rc, orient, stindex, step); + } + else { + function_str += $.trim(str); + } + } + + i++; + } + + return function_str; + }, + functionStrChange_range: function(txt, type, rc, orient, stindex, step){ + let _this = this; + + let val = txt.split("!"), + rangetxt, prefix = ""; + + if (val.length > 1) { + rangetxt = val[1]; + prefix = val[0] + "!"; + } + else { + rangetxt = val[0]; + } + + let r1, r2, c1, c2; + let $row0, $row1, $col0, $col1; + + if (rangetxt.indexOf(":") == -1) { + r1 = r2 = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; + c1 = c2 = ABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); + + let freezonFuc = _this.isfreezonFuc(rangetxt); + + $row0 = $row1 = freezonFuc[0] ? "$" : "", + $col0 = $col1 = freezonFuc[1] ? "$" : ""; + } + else { + rangetxt = rangetxt.split(":"); + + r1 = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; + r2 = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; + if (r1 > r2) { + return txt; + } + + c1 = ABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); + c2 = ABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); + if (c1 > c2) { + return txt; + } + + let freezonFuc0 = _this.isfreezonFuc(rangetxt[0]); + $row0 = freezonFuc0[0] ? "$" : ""; + $col0 = freezonFuc0[1] ? "$" : ""; + + let freezonFuc1 = _this.isfreezonFuc(rangetxt[1]); + $row1 = freezonFuc1[0] ? "$" : ""; + $col1 = freezonFuc1[1] ? "$" : ""; + } + + if(type == "del"){ + if(rc == "row"){ + if(r1 >= stindex && r2 <= stindex + step - 1){ + return _this.error.r; + } + + if(r1 > stindex + step - 1){ + r1 -= step; + } + else if(r1 >= stindex){ + r1 = stindex; + } + + if(r2 > stindex + step - 1){ + r2 -= step; + } + else if(r2 >= stindex){ + r2 = stindex - 1; + } + + if(r1 < 0){ + r1 = 0; + } + + if(r2 < r1){ + r2 = r1; + } + } + else if(rc == "col"){ + if(c1 >= stindex && c2 <= stindex + step - 1){ + return _this.error.r; + } + + if(c1 > stindex + step - 1){ + c1 -= step; + } + else if(c1 >= stindex){ + c1 = stindex; + } + + if(c2 > stindex + step - 1){ + c2 -= step; + } + else if(c2 >= stindex){ + c2 = stindex - 1; + } + + if(c1 < 0){ + c1 = 0; + } + + if(c2 < c1){ + c2 = c1; + } + } + + if(r1 == r2 && c1 == c2){ + if (!isNaN(r1) && !isNaN(c1)) { + return prefix + $col0 + chatatABC(c1) + $row0 + (r1 + 1); + } + else if (!isNaN(r1)) { + return prefix + $row0 + (r1 + 1); + } + else if (!isNaN(c1)) { + return prefix + $col0 + chatatABC(c1); + } + else { + return txt; + } + } + else{ + if (isNaN(c1) && isNaN(c2)) { + return prefix + $row0 + (r1 + 1) + ":" + $row1 + (r2 + 1); + } + else if (isNaN(r1) && isNaN(r2)) { + return prefix + $col0 + chatatABC(c1) + ":" + $col1 + chatatABC(c2); + } + else { + return prefix + $col0 + chatatABC(c1) + $row0 + (r1 + 1) + ":" + $col1 + chatatABC(c2) + $row1 + (r2 + 1); + } + } + } + else if(type == "add"){ + if(rc == "row"){ + if(orient == "lefttop"){ + if(r1 >= stindex){ + r1 += step; + } + + if(r2 >= stindex){ + r2 += step; + } + } + else if(orient == "rightbottom"){ + if(r1 > stindex){ + r1 += step; + } + + if(r2 > stindex){ + r2 += step; + } + } + } + else if(rc == "col"){ + if(orient == "lefttop"){ + if(c1 >= stindex){ + c1 += step; + } + + if(c2 >= stindex){ + c2 += step; + } + } + else if(orient == "rightbottom"){ + if(c1 > stindex){ + c1 += step; + } + + if(c2 > stindex){ + c2 += step; + } + } + } + + if(r1 == r2 && c1 == c2){ + if (!isNaN(r1) && !isNaN(c1)) { + return prefix + $col0 + chatatABC(c1) + $row0 + (r1 + 1); + } + else if (!isNaN(r1)) { + return prefix + $row0 + (r1 + 1); + } + else if (!isNaN(c1)) { + return prefix + $col0 + chatatABC(c1); + } + else { + return txt; + } + } + else{ + if (isNaN(c1) && isNaN(c2)) { + return prefix + $row0 + (r1 + 1) + ":" + $row1 + (r2 + 1); + } + else if (isNaN(r1) && isNaN(r2)) { + return prefix + $col0 + chatatABC(c1) + ":" + $col1 + chatatABC(c2); + } + else { + return prefix + $col0 + chatatABC(c1) + $row0 + (r1 + 1) + ":" + $col1 + chatatABC(c2) + $row1 + (r2 + 1); + } + } + } + }, + israngeseleciton: function(istooltip) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (istooltip == null) { + istooltip = false; + } + + let currSelection = window.getSelection(); + let anchor = $(currSelection.anchorNode); + let anchorOffset = currSelection.anchorOffset; + + if (anchor.parent().is("span") && anchorOffset != 0) { + let txt = $.trim(anchor.text()), + lasttxt = ""; + + if (txt.length == 0 && anchor.parent().prev().length > 0) { + let ahr = anchor.parent().prev(); + txt = $.trim(ahr.text()); + lasttxt = txt.substr(txt.length - 1, 1); + _this.rangeSetValueTo = ahr; + } + else { + lasttxt = txt.substr(anchorOffset - 1, 1); + _this.rangeSetValueTo = anchor.parent(); + } + + if ((istooltip && (lasttxt == "(" || lasttxt == ",")) || (!istooltip && (lasttxt == "(" || lasttxt == "," || lasttxt == "=" || lasttxt in _this.operatorjson || lasttxt == "&"))) { + return true; + } + } + else if (anchor.is("#luckysheet-rich-text-editor") || anchor.is("#luckysheet-functionbox-cell")) { + let txt = $.trim(anchor.find("span").last().text()), + lasttxt; + + _this.rangeSetValueTo = anchor.find("span").last(); + + if (txt.length == 0 && anchor.find("span").length > 1) { + let ahr = anchor.find("span"); + txt = $.trim(ahr.eq(ahr.length - 2).text()); + _this.rangeSetValueTo = ahr; + } + + lasttxt = txt.substr(txt.length - 1, 1); + + if ((istooltip && (lasttxt == "(" || lasttxt == ",")) || (!istooltip && (lasttxt == "(" || lasttxt == "," || lasttxt == "=" || lasttxt in _this.operatorjson || lasttxt == "&"))) { + return true; + } + } + else if (anchor.parent().is("#luckysheet-rich-text-editor") || anchor.parent().is("#luckysheet-functionbox-cell") || anchorOffset == 0) { + if (anchorOffset == 0) { + anchor = anchor.parent(); + } + + if (anchor.prev().length > 0) { + let txt = $.trim(anchor.prev().text()); + let lasttxt = txt.substr(txt.length - 1, 1); + + _this.rangeSetValueTo = anchor.prev(); + + if ((istooltip && (lasttxt == "(" || lasttxt == ",")) || (!istooltip && (lasttxt == "(" || lasttxt == "," || lasttxt == "=" || lasttxt in _this.operatorjson || lasttxt == "&"))) { + return true; + } + } + } + + return false; + }, + rangechangeindex: null, + rangestart: false, + rangetosheet: null, + rangeSetValueTo: null, + func_selectedrange: {}, //函数选区范围 + rangeSetValue: function(selected, obj) { + let _this = this; + + let range = getRangetxt(Store.currentSheetIndex, selected, _this.rangetosheet); + let $editor; + + if (_this.rangestart || _this.rangedrag_column_start || _this.rangedrag_row_start) { + if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ + //公式参数框选取范围 + $editor = $("#luckysheet-rich-text-editor"); + $("#luckysheet-search-formula-parm-select-input").val(range); + $("#luckysheet-search-formula-parm .parmBox").eq(_this.data_parm_index).find(".txt input").val(range); + + //参数对应值显示 + let txtdata = luckysheet_getcelldata(range).data; + if(txtdata instanceof Array){ + //参数为多个单元格选区 + let txtArr=[]; + + for(let i = 0; i < txtdata.length; i++){ + for(let j = 0; j < txtdata[i].length; j++){ + if(txtdata[i][j] == null){ + txtArr.push(null); + } + else{ + txtArr.push(txtdata[i][j].v); + } + } + } + + $("#luckysheet-search-formula-parm .parmBox").eq(_this.data_parm_index).find(".val").text(" = {"+ txtArr.join(",") +"}"); + } + else{ + //参数为单个单元格选区 + $("#luckysheet-search-formula-parm .parmBox").eq(_this.data_parm_index).find(".val").text(" = {"+ txtdata.v +"}"); + } + + //计算结果显示 + let isVal = true; //参数不为空 + let parmValArr = []; //参数值集合 + let lvi = -1; //最后一个有值的参数索引 + $("#luckysheet-search-formula-parm .parmBox").each(function(i, e){ + let parmtxt = $(e).find(".txt input").val(); + if(parmtxt == "" && $(e).find(".txt input").attr("data_parm_require") == "m"){ + isVal = false; + } + if(parmtxt != ""){ + lvi = i; + } + }) + + //单元格显示 + let functionHtmlTxt; + if(lvi == -1){ + functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "()"; + } + else if(lvi == 0){ + functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + $("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val() + ")"; + } + else{ + for(let j = 0; j <= lvi; j++){ + parmValArr.push($("#luckysheet-search-formula-parm .parmBox").eq(j).find(".txt input").val()); + } + functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + parmValArr.join(",") + ")"; + } + + let function_str = _this.functionHTMLGenerate(functionHtmlTxt); + $("#luckysheet-rich-text-editor").html(function_str); + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + + if(isVal){ + //公式计算 + let fp = $.trim(_this.functionParser($("#luckysheet-rich-text-editor").text())); + let result = eval(fp); + $("#luckysheet-search-formula-parm .result span").text(result); + } + } + else{ + let currSelection = window.getSelection(); + let anchorOffset = currSelection.anchorNode; + $editor = $(anchorOffset).closest("div"); + + let $span = $editor.find("span[rangeindex='" + _this.rangechangeindex + "']").html(range); + + _this.setCaretPosition($span.get(0), 0, range.length); + } + } + else { + let function_str = '' + range + ''; + let $t = $(function_str).insertAfter(_this.rangeSetValueTo); + _this.rangechangeindex = _this.functionHTMLIndex; + $editor = $(_this.rangeSetValueTo).closest("div"); + + _this.setCaretPosition($editor.find("span[rangeindex='" + _this.rangechangeindex + "']").get(0), 0, range.length); + _this.functionHTMLIndex++; + } + + if ($editor.attr("id") == "luckysheet-rich-text-editor") { + $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); + } + else { + $("#luckysheet-rich-text-editor").html($("#luckysheet-functionbox-cell").html()); + } + }, + rangedrag: function(event) { + let _this = this; + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let top = 0, + height = 0, + rowseleted = []; + + if (_this.func_selectedrange.top > row_pre) { + top = row_pre; + height = _this.func_selectedrange.top + _this.func_selectedrange.height - row_pre; + rowseleted = [row_index, _this.func_selectedrange.row[1]]; + } + else if (_this.func_selectedrange.top == row_pre) { + top = row_pre; + height = _this.func_selectedrange.top + _this.func_selectedrange.height - row_pre; + rowseleted = [row_index, _this.func_selectedrange.row[0]]; + } + else { + top = _this.func_selectedrange.top; + height = row - _this.func_selectedrange.top - 1; + rowseleted = [_this.func_selectedrange.row[0], row_index]; + } + + let left = 0, + width = 0, + columnseleted = []; + + if (_this.func_selectedrange.left > col_pre) { + left = col_pre; + width = _this.func_selectedrange.left + _this.func_selectedrange.width - col_pre; + columnseleted = [col_index, _this.func_selectedrange.column[1]]; + } + else if (_this.func_selectedrange.left == col_pre) { + left = col_pre; + width = _this.func_selectedrange.left + _this.func_selectedrange.width - col_pre; + columnseleted = [col_index, _this.func_selectedrange.column[0]]; + } + else { + left = _this.func_selectedrange.left; + width = col - _this.func_selectedrange.left - 1; + columnseleted = [_this.func_selectedrange.column[0], col_index]; + } + + rowseleted[0] = luckysheetFreezen.changeFreezenIndex(rowseleted[0], "h"); + rowseleted[1] = luckysheetFreezen.changeFreezenIndex(rowseleted[1], "h"); + columnseleted[0] = luckysheetFreezen.changeFreezenIndex(columnseleted[0], "v"); + columnseleted[1] = luckysheetFreezen.changeFreezenIndex(columnseleted[1], "v"); + + let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, _this.func_selectedrange, top , height, left , width); + if(changeparam != null){ + columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + _this.func_selectedrange["row"] = rowseleted; + _this.func_selectedrange["column"] = columnseleted; + + _this.func_selectedrange["left_move"] = left; + _this.func_selectedrange["width_move"] = width; + _this.func_selectedrange["top_move"] = top; + _this.func_selectedrange["height_move"] = height; + + luckysheet_count_show(left, top, width, height, rowseleted, columnseleted); + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": top, + "height": height + }).show(); + + if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){ + //if公式生成器 选择范围 + let range = getRangetxt(Store.currentSheetIndex, { "row": rowseleted, "column": columnseleted }, Store.currentSheetIndex); + $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); + } + else{ + _this.rangeSetValue({ + "row": rowseleted, + "column": columnseleted + }); + } + + luckysheetFreezen.scrollFreezen(rowseleted, columnseleted); + }, + rangedrag_column_start: false, + rangedrag_row_start: false, + rangedrag_column: function(event) { + let _this = this; + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let visibledatarow = Store.visibledatarow; + let row_index = visibledatarow.length - 1, + row = visibledatarow[row_index], + row_pre = 0; + + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + let left = 0, + width = 0, + columnseleted = []; + + if (_this.func_selectedrange.left > col_pre) { + left = col_pre; + width = _this.func_selectedrange.left + _this.func_selectedrange.width - col_pre; + columnseleted = [col_index, _this.func_selectedrange.column[1]]; + } + else if (_this.func_selectedrange.left == col_pre) { + left = col_pre; + width = _this.func_selectedrange.left + _this.func_selectedrange.width - col_pre; + columnseleted = [col_index, _this.func_selectedrange.column[0]]; + } + else { + left = _this.func_selectedrange.left; + width = col - _this.func_selectedrange.left - 1; + columnseleted = [_this.func_selectedrange.column[0], col_index]; + } + + //rowseleted[0] = luckysheetFreezen.changeFreezenIndex(rowseleted[0], "h"); + //rowseleted[1] = luckysheetFreezen.changeFreezenIndex(rowseleted[1], "h"); + columnseleted[0] = luckysheetFreezen.changeFreezenIndex(columnseleted[0], "v"); + columnseleted[1] = luckysheetFreezen.changeFreezenIndex(columnseleted[1], "v"); + + let changeparam = menuButton.mergeMoveMain(columnseleted, [0, row_index], _this.func_selectedrange, row_pre , row - row_pre - 1, left , width); + if(changeparam != null){ + columnseleted = changeparam[0]; + // rowseleted= changeparam[1]; + // top = changeparam[2]; + // height = changeparam[3]; + left = changeparam[4]; + width = changeparam[5]; + } + + _this.func_selectedrange["column"] = columnseleted; + _this.func_selectedrange["left_move"] = left; + _this.func_selectedrange["width_move"] = width; + + luckysheet_count_show(left, row_pre, width, row - row_pre - 1, [0, row_index], columnseleted); + + _this.rangeSetValue({ + "row": [null, null], + "column": columnseleted + }); + + $("#luckysheet-formula-functionrange-select").css({ + "left": left, + "width": width, + "top": row_pre, + "height": row - row_pre - 1 + }).show(); + + luckysheetFreezen.scrollFreezen([0, row_index], columnseleted); + }, + rangedrag_row: function(event) { + let _this = this; + + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); + let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + + let visibledatacolumn = Store.visibledatacolumn; + let col_index = visibledatacolumn.length - 1, + col = visibledatacolumn[col_index], + col_pre = 0; + + let top = 0, + height = 0, + rowseleted = []; + + if (_this.func_selectedrange.top > row_pre) { + top = row_pre; + height = _this.func_selectedrange.top + _this.func_selectedrange.height - row_pre; + rowseleted = [row_index, _this.func_selectedrange.row[1]]; + } + else if (_this.func_selectedrange.top == row_pre) { + top = row_pre; + height = _this.func_selectedrange.top + _this.func_selectedrange.height - row_pre; + rowseleted = [row_index, _this.func_selectedrange.row[0]]; + } + else { + top = _this.func_selectedrange.top; + height = row - _this.func_selectedrange.top - 1; + rowseleted = [_this.func_selectedrange.row[0], row_index]; + } + + rowseleted[0] = luckysheetFreezen.changeFreezenIndex(rowseleted[0], "h"); + rowseleted[1] = luckysheetFreezen.changeFreezenIndex(rowseleted[1], "h"); + // columnseleted[0] = luckysheetFreezen.changeFreezenIndex(columnseleted[0], "v"); + // columnseleted[1] = luckysheetFreezen.changeFreezenIndex(columnseleted[1], "v"); + + let changeparam = menuButton.mergeMoveMain([0, col_index], rowseleted, _this.func_selectedrange, top, height, col_pre, col - col_pre - 1); + if(changeparam != null){ + // columnseleted = changeparam[0]; + rowseleted= changeparam[1]; + top = changeparam[2]; + height = changeparam[3]; + // left = changeparam[4]; + // width = changeparam[5]; + } + + _this.func_selectedrange["row"] = rowseleted; + _this.func_selectedrange["top_move"] = top; + _this.func_selectedrange["height_move"] = height; + + luckysheet_count_show(col_pre, top, col - col_pre - 1, height, rowseleted, [0, col_index]); + + _this.rangeSetValue({ + "row": rowseleted, + "column": [null, null] + }); + + $("#luckysheet-formula-functionrange-select").css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": top, + "height": height + }).show(); + + luckysheetFreezen.scrollFreezen(rowseleted, [0, col_index]); + }, + rangedragged: function() {}, + rangeResizeObj: null, + rangeResize: null, + rangeResizeIndex: null, + rangeResizexy: null, + rangeResizeWinH: null, + rangeResizeWinW: null, + rangeResizeTo: null, + rangeResizeDraging: function(event, luckysheetCurrentChartResizeObj, luckysheetCurrentChartResizeXy, luckysheetCurrentChartResize, luckysheetCurrentChartResizeWinW, luckysheetCurrentChartResizeWinH, ch_width, rh_height) { + let _this = this; + + let scrollTop = $("#luckysheet-scrollbar-y").scrollTop(), + scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(); + let mouse = mouseposition(event.pageX, event.pageY); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let row_location = rowLocation(y), + row = row_location[1], + row_pre = row_location[0], + row_index = row_location[2]; + let col_location = colLocation(x), + col = col_location[1], + col_pre = col_location[0], + col_index = col_location[2]; + + if (x < 0 || y < 0) { + return false; + } + + let topchange = row_pre - luckysheetCurrentChartResizeXy[1], + leftchange = col_pre - luckysheetCurrentChartResizeXy[0]; + let top = luckysheetCurrentChartResizeXy[5], + height = luckysheetCurrentChartResizeXy[3], + left = luckysheetCurrentChartResizeXy[4], + width = luckysheetCurrentChartResizeXy[2]; + + if (luckysheetCurrentChartResize == "lt" || luckysheetCurrentChartResize == "lb") { + if (luckysheetCurrentChartResizeXy[0] + luckysheetCurrentChartResizeXy[2] < col_pre) { + return; + } + + left = col_pre; + width = luckysheetCurrentChartResizeXy[2] - leftchange; + + if (left > luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[4] - col + col_pre) { + left = luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[4] - col + col_pre; + width = luckysheetCurrentChartResizeXy[2] - (luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[4] - col + col_pre - luckysheetCurrentChartResizeXy[0]); + } + else if (left <= 0) { + left = 0; + width = luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[0]; + } + } + + if (luckysheetCurrentChartResize == "rt" || luckysheetCurrentChartResize == "rb") { + if (luckysheetCurrentChartResizeXy[6] - luckysheetCurrentChartResizeXy[2] > col) { + return; + } + + width = luckysheetCurrentChartResizeXy[2] + col - luckysheetCurrentChartResizeXy[6]; + + if (width < col - col_pre - 1) { + width = col - col_pre - 1; + } + else if (width >= ch_width - left) { + width = ch_width - left; + } + } + + if (luckysheetCurrentChartResize == "lt" || luckysheetCurrentChartResize == "rt") { + if (luckysheetCurrentChartResizeXy[1] + luckysheetCurrentChartResizeXy[3] < row_pre) { + return; + } + + top = row_pre; + height = luckysheetCurrentChartResizeXy[3] - topchange; + + if (top > luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[5] - row + row_pre) { + top = luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[5] - row + row_pre; + height = luckysheetCurrentChartResizeXy[3] - (luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[5] - row + row_pre - luckysheetCurrentChartResizeXy[1]); + } + else if (top <= 0) { + top = 0; + height = luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[1]; + } + } + + if (luckysheetCurrentChartResize == "lb" || luckysheetCurrentChartResize == "rb") { + if (luckysheetCurrentChartResizeXy[7] - luckysheetCurrentChartResizeXy[3] > row) { + return; + } + + height = luckysheetCurrentChartResizeXy[3] + row - luckysheetCurrentChartResizeXy[7]; + + if (height < row - row_pre - 1) { + height = row - row_pre - 1; + } + else if (height >= rh_height - top) { + height = rh_height - top; + } + } + + let rangeindex = _this.rangeResizeIndex; + let selected = { + "top": top, + "left": left, + "height": height, + "width": width + }; + let range = _this.getSelectedFromRange(selected); + let rangetxt = getRangetxt(Store.currentSheetIndex, range, _this.rangetosheet); + let $span = _this.rangeResizeTo.find("span[rangeindex='" + rangeindex + "']").html(rangetxt); + luckysheetRangeLast(_this.rangeResizeTo[0]); + luckysheetCurrentChartResizeObj.css(selected).data("range", range); + }, + getSelectedFromRange: function(obj) { + let row_st = obj.top + 2, + row_ed = obj.top + obj.height - 2; + let col_st = obj.left + 2, + col_ed = obj.left + obj.width - 2; + + let ret = { + "row": [ + rowLocation(row_st)[2], + rowLocation(row_ed)[2] + ], + "column": [ + colLocation(col_st)[2], + colLocation(col_ed)[2] + ] + }; + + return ret; + }, + rangeResizeDragged: function(event, luckysheetCurrentChartResizeObj, luckysheetCurrentChartResizeXy, luckysheetCurrentChartResize, luckysheetCurrentChartResizeWinW, luckysheetCurrentChartResizeWinH) { + let _this = this; + + _this.rangeResize = null; + $("#luckysheet-formula-functionrange-highlight-" + _this.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.03); + }, + rangeMovexy: null, + rangeMove: false, + rangeMoveObj: null, + rangeMoveIndex: null, + rangeMoveRangedata: null, + rangeMoveDraging: function(event, luckysheet_cell_selected_move_index, luckysheet_select_save, obj, sheetBarHeight, statisticBarHeight) { + let _this = this; + + let mouse = mouseposition(event.pageX, event.pageY); + let scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(); + let scrollTop = $("#luckysheet-scrollbar-y").scrollTop(); + let x = mouse[0] + scrollLeft; + let y = mouse[1] + scrollTop; + + let winH = $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, + winW = $(window).width() + scrollLeft; + + let row_index_original = luckysheet_cell_selected_move_index[0], + col_index_original = luckysheet_cell_selected_move_index[1]; + let row_s = luckysheet_select_save["row"][0] - row_index_original + rowLocation(y)[2], + row_e = luckysheet_select_save["row"][1] - row_index_original + rowLocation(y)[2]; + let col_s = luckysheet_select_save["column"][0] - col_index_original + colLocation(x)[2], + col_e = luckysheet_select_save["column"][1] - col_index_original + colLocation(x)[2]; + + if (row_s < 0 || y < 0) { + row_s = 0; + row_e = luckysheet_select_save["row"][1] - luckysheet_select_save["row"][0]; + } + if (col_s < 0 || x < 0) { + col_s = 0; + col_e = luckysheet_select_save["column"][1] - luckysheet_select_save["column"][0]; + } + + let visibledatarow = Store.visibledatarow; + if (row_e >= visibledatarow[visibledatarow.length - 1] || y > winH) { + row_s = visibledatarow.length - 1 - luckysheet_select_save["row"][1] + luckysheet_select_save["row"][0]; + row_e = visibledatarow.length - 1; + } + let visibledatacolumn = Store.visibledatacolumn; + if (col_e >= visibledatacolumn[visibledatacolumn.length - 1] || x > winW) { + col_s = visibledatacolumn.length - 1 - luckysheet_select_save["column"][1] + luckysheet_select_save["column"][0]; + col_e = visibledatacolumn.length - 1; + } + + let col_pre = col_s - 1 == -1 ? 0 : visibledatacolumn[col_s - 1], + col = visibledatacolumn[col_e]; + let row_pre = row_s - 1 == -1 ? 0 : visibledatarow[row_s - 1], + row = visibledatarow[row_e]; + let rangeindex = _this.rangeMoveIndex; + let selected = { + "left": col_pre, + "width": col - col_pre - 2, + "top": row_pre, + "height": row - row_pre - 2, + "display": "block" + }; + let range = _this.getSelectedFromRange(selected); + let rangetxt = getRangetxt(Store.currentSheetIndex, range, _this.rangetosheet); + let $span = _this.rangeResizeTo.find("span[rangeindex='" + rangeindex + "']").html(rangetxt); + luckysheetRangeLast(_this.rangeResizeTo[0]); + _this.rangeMoveRangedata = range; + obj.css(selected); + }, + rangeMoveDragged: function(obj) { + let _this = this; + + _this.rangeMove = false; + $("#luckysheet-formula-functionrange-highlight-" + _this.rangeMoveIndex).data("range", _this.rangeMoveRangedata).find(".luckysheet-selection-copy-hc").css("opacity", 0.03); + }, + functionHTMLIndex: 0, + functionRangeIndex: null, + findrangeindex: function(v, vp) { + let _this = this; + + let re = //g; + let v_a = v.replace(re, ""), + vp_a = vp.replace(re, ""); + v_a = v_a.split(''); + vp_a = vp_a.split(''); + v_a.pop(); + vp_a.pop(); + + let pfri = _this.functionRangeIndex; + let i = 0; + let spanlen = vp_a.length > v_a.length ? v_a.length : vp_a.length; + + let vplen = vp_a.length, vlen = v_a.length; + //不增加元素输入 + if(vplen == vlen){ + let i = pfri[0]; + let p = vp_a[i], n = v_a[i]; + + if(p == null){ + if(vp_a.length <= i){ + pfri = [vp_a.length - 1, vp_a.length - 1]; + } + else if(v_a.length<=i){ + pfri = [v_a.length - 1, v_a.length - 1]; + } + + return pfri; + } + else if(p.length == n.length){ + if(vp_a[i + 1] != null && v_a[i + 1] != null && vp_a[i + 1].length < v_a[i + 1].length){ + pfri[0] = pfri[0] + 1; + pfri[1] = 1; + } + + return pfri; + } + else if(p.length > n.length){ + if(p != null && v_a[i + 1] != null && v_a[i + 1].substr(0,1) == '"' && (p.indexOf("{") > -1 || p.indexOf("}") > -1)){ + pfri[0] = pfri[0] + 1; + pfri[1] = 1; + } + + return pfri; + } + else if(p.length < n.length){ + if(pfri[1] > n.length){ + pfri[1] = n.length; + } + + return pfri; + } + } + //减少元素输入 + else if(vplen > vlen){ + let i = pfri[0]; + let p = vp_a[i], n = v_a[i]; + + if(n == null){ + if(v_a[i - 1].indexOf("{") > -1){ + pfri[0] = pfri[0] -1; + let start = v_a[i - 1].search("{"); + pfri[1] = pfri[1] + start; + } + else{ + pfri[0] = 0; + pfri[1] = 0; + } + } + else if(p.length == n.length){ + if(v_a[i + 1] != null && (v_a[i + 1].substr(0,1) == '"' || v_a[i + 1].substr(0,1) == '{' || v_a[i + 1].substr(0,1) == '}')){ + pfri[0] = pfri[0] + 1; + pfri[1] = 1; + } + else if(p != null && p.length > 2 && p.substr(0,1) == '"' && p.substr(p.length - 1, 1) == '"' ){ + //pfri[1] = n.length-1; + } + else if(v_a[i] != null && v_a[i] == '")'){ + pfri[1] = 1; + } + else if(v_a[i] != null && v_a[i] == '"}'){ + pfri[1] = 1; + } + else if(v_a[i] != null && v_a[i] == '{)'){ + pfri[1] = 1; + } + else{ + pfri[1] = n.length; + } + + return pfri; + } + else if(p.length > n.length){ + if(v_a[i + 1] != null && (v_a[i + 1].substr(0,1) == '"' || v_a[i + 1].substr(0,1) == '{' || v_a[i+1].substr(0,1) == '}')){ + pfri[0] = pfri[0] + 1; + pfri[1] = 1; + } + + return pfri; + } + else if(p.length < n.length){ + return pfri; + } + + return pfri; + } + //增加元素输入 + else if(vplen < vlen){ + let i = pfri[0]; + let p = vp_a[i], n = v_a[i]; + + if(p == null){ + pfri[0] = v_a.length - 1; + + if(n != null){ + pfri[1] = n.length; + } + else{ + pfri[1] = 1; + } + } + else if(p.length == n.length){ + if(vp_a[i + 1] != null && (vp_a[i + 1].substr(0, 1) == '"' || vp_a[i + 1].substr(0, 1) == '{' || vp_a[i + 1].substr(0, 1) == '}') ){ + pfri[1] = n.length; + } + else if(v_a[i + 1] != null && v_a[i + 1].substr(0, 1) == '"' && ( v_a[i + 1].substr(0, 1) == '{' || v_a[i + 1].substr(0, 1) == '}') ){ + pfri[0] = pfri[0] + 1; + pfri[1] = 1; + } + else if(n != null && n.substr(0, 1) == '"' && n.substr(n.length - 1, 1) == '"' && p.substr(0, 1) == '"' && p.substr(p.length - 1, 1) == ')'){ + pfri[1] = n.length; + } + else if(n != null && n.substr(0, 1) == '{' && n.substr(n.length - 1, 1) == '}' && p.substr(0, 1) == '{' && p.substr(p.length - 1, 1) == ')'){ + pfri[1] = n.length; + } + else{ + pfri[0] = pfri[0] + vlen - vplen; + if(v_a.length > vp_a.length){ + pfri[1] = v_a[i + 1].length; + } + else{ + pfri[1] = 1; + } + } + + return pfri; + } + else if(p.length > n.length){ + if(p != null && p.substr(0, 1) == '"'){ + pfri[1] = n.length; + } + else if(v_a[i + 1] != null && /{.*?}/.test(v_a[i + 1])){ + pfri[0] = pfri[0] + 1; + pfri[1] = v_a[i + 1].length; + } + else if(p != null && v_a[i + 1].substr(0, 1) == '"' && (p.indexOf("{") > -1 || p.indexOf("}") > -1)){ + pfri[0] = pfri[0] + 1; + pfri[1] = 1; + } + else if(p != null && (p.indexOf("{") > -1 || p.indexOf("}") > -1)){ + + } + else{ + pfri[0] = pfri[0] + vlen - vplen - 1; + pfri[1] = v_a[i - 1].length; + } + + return pfri; + } + else if(p.length < n.length){ + return pfri; + } + + return pfri; + } + + return null; + }, + setCaretPosition: function(textDom, children, pos) { + try{ + let el = textDom; + let range = document.createRange(); + let sel = window.getSelection(); + range.setStart(el.childNodes[children], pos); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + el.focus(); + } + catch(err) { + luckysheetRangeLast(this.rangeResizeTo[0]); + } + }, + functionRange: function(obj, v, vp) { + let _this = this; + + if (window.getSelection) { //ie11 10 9 ff safari + let currSelection = window.getSelection(); + let fri = _this.findrangeindex(v, vp); + + if (fri == null) { + currSelection.selectAllChildren(obj.get(0)); + currSelection.collapseToEnd(); + } + else { + _this.setCaretPosition(obj.find("span").get(fri[0]), 0, fri[1]); + } + } + else if (document.selection) { //ie10 9 8 7 6 5 + _this.functionRangeIndex.moveToElementText(obj); //range定位到obj + _this.functionRangeIndex.collapse(false); //光标移至最后 + _this.functionRangeIndex.select(); + } + }, + functionInputHanddler: function($to, $input, kcode) { + if(isEditMode()){//此模式下禁用公式栏 + return; + } + + let _this = this; + + let $functionbox = $to, + $editer = $input; + let value1 = $editer.html(), + value1txt = $editer.text(); + + setTimeout(function() { + let value = $editer.text(), + valuetxt = value; + + if (value.length > 0 && value.substr(0, 1) == "=" && (kcode != 229 || value.length == 1)) { + value = _this.functionHTMLGenerate(value); + value1 = _this.functionHTMLGenerate(value1txt); + + if (window.getSelection) { // all browsers, except IE before version 9 + let currSelection = window.getSelection(); + if($(currSelection.anchorNode).is("div")){ + let editorlen = $("#luckysheet-rich-text-editor span").length; + _this.functionRangeIndex = [editorlen-1, $("#luckysheet-rich-text-editor").find("span").eq(editorlen-1).text().length]; + } + else{ + _this.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; + } + } + else { // Internet Explorer before version 9 + let textRange = document.selection.createRange(); + _this.functionRangeIndex = textRange; + } + + $editer.html(value); + _this.functionRange($editer, value, value1); + _this.canceFunctionrangeSelected(); + + if(kcode != 46){//delete不执行此函数 + _this.createRangeHightlight(); + } + } + + _this.rangestart = false; + _this.rangedrag_column_start = false; + _this.rangedrag_row_start = false; + + $functionbox.html(value); + _this.rangeHightlightselected($editer, kcode); + }, 1); + }, + functionHTMLGenerate: function(txt) { + let _this = this; + + if (txt.length == 0 || txt.substr(0, 1) != "=") { + return txt; + } + + _this.functionHTMLIndex = 0; + + return '=' + _this.functionHTML(txt); + }, + functionHTML: function(txt) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = "", + ispassby = true; + let matchConfig = { + "bracket": 0, + "comma": 0, + "squote": 0, + "dquote": 0, + "braces": 0 + } + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0 && matchConfig.braces == 0) { + matchConfig.bracket += 1; + + if (str.length > 0) { + function_str += '' + str + '('; + } + else { + function_str += '('; + } + + str = ""; + } + else if (s == ")" && matchConfig.dquote == 0 && matchConfig.braces == 0) { + matchConfig.bracket -= 1; + function_str += _this.functionHTML(str) + ')'; + str = ""; + } + else if(s=="{" && matchConfig.dquote == 0) { + str += '{'; + matchConfig.braces += 1; + } + else if(s=="}" && matchConfig.dquote == 0) { + str += '}'; + matchConfig.braces -= 1; + } + else if (s == '"' && matchConfig.squote == 0) { + if (matchConfig.dquote > 0) { + if (str.length > 0) { + function_str += str + '"'; + } + else { + function_str += '"'; + } + + matchConfig.dquote -= 1; + str = ""; + } + else { + matchConfig.dquote += 1; + + if (str.length > 0) { + function_str += _this.functionHTML(str) + '"'; + } + else { + function_str += '"'; + } + + str = ""; + } + } + else if (s == ',' && matchConfig.dquote == 0 && matchConfig.braces == 0) { + //matchConfig.comma += 1; + function_str += _this.functionHTML(str) + ','; + str = ""; + } + else if (s == '&' && matchConfig.dquote == 0 && matchConfig.braces == 0) { + if (str.length > 0) { + function_str += _this.functionHTML(str) + '' + '&' + '';; + str = ""; + } + else { + function_str += '' + '&' + ''; + } + } + else if (s in _this.operatorjson && matchConfig.dquote == 0 && matchConfig.braces == 0) { + let s_next = ""; + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + let p = i-1, s_pre = null;; + if(p >= 0){ + do { + s_pre = funcstack[p--]; + } + while (p >= 0 && s_pre ==" ") + } + + if ((s + s_next) in _this.operatorjson) { + if (str.length > 0) { + function_str += _this.functionHTML(str) + '' + s + s_next + ''; + str = ""; + } + else { + function_str += '' + s + s_next + ''; + } + + i++; + } + else if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in _this.operatorjson ) ){ + str += s; + } + else { + if (str.length > 0) { + function_str += _this.functionHTML(str) + '' + s + ''; + str = ""; + } + else { + function_str += '' + s + ''; + } + } + } + else { + str += s; + } + + if (i == funcstack.length - 1) { + //function_str += str; + if (_this.iscelldata($.trim(str))) { + function_str += '' + str + ''; + _this.functionHTMLIndex++; + } + else if (matchConfig.dquote > 0) { + function_str += str + ''; + } + else if (str.indexOf("") == -1 && str.length > 0) { + let regx = /{.*?}/; + + if(regx.test($.trim(str))){ + let arraytxt = regx.exec(str)[0]; + let arraystart = str.search(regx); + let alltxt = ""; + + if(arraystart > 0){ + alltxt += '' + str.substr(0, arraystart) + ''; + } + + alltxt += '' + arraytxt + ''; + + if(arraystart + arraytxt.length < str.length){ + alltxt += '' + str.substr(arraystart + arraytxt.length, str.length) + ''; + } + + function_str += alltxt; + } + else{ + function_str += '' + str + ''; + } + } + } + + i++; + } + + return function_str; + }, + getfunctionParam: function(txt) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = ""; + let matchConfig = { + "bracket": 0, + "comma": 0, + "squote": 0, + "dquote": 0, + "compare": 0 + } + + //bracket 0为运算符括号、1为函数括号 + let fn = null, param = [], bracket = []; + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0) { + if (str.length > 0 && bracket.length==0) { + fn = str.toUpperCase(); + bracket.push(1); + str = ""; + } + else if(bracket.length==0) { + //function_str += "("; + bracket.push(0); + str = ""; + } + else{ + bracket.push(0); + str += s; + } + } + else if (s == ")" && matchConfig.dquote == 0) { + let bt = bracket.pop(); + + if(bracket.length == 0){ + param.push(str); + str = ""; + } + else{ + str += s; + } + } + else if (s == '"') { + str += '"'; + + if (matchConfig.dquote > 0) { + matchConfig.dquote -= 1; + str = ""; + } + else { + matchConfig.dquote += 1; + } + } + else if (s == ',' && matchConfig.dquote == 0) { + if(bracket.length <= 1){ + param.push(str); + str = ""; + } + else{ + str += ","; + } + } + else if (s in _this.operatorjson && matchConfig.dquote == 0) { + let s_next = ""; + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + let p = i-1, s_pre = null;; + if(p >= 0){ + do { + s_pre = funcstack[p--]; + } + while (p >= 0 && s_pre ==" ") + } + + if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in _this.operatorjson ) ){ + if (matchConfig.dquote == 0) { + str += $.trim(s); + } + else { + str += s; + } + } + else{ + function_str= ""; + str = ""; + } + } + else { + if (matchConfig.dquote == 0) { + str += $.trim(s); + } + else { + str += s; + } + } + + i++; + } + + return {"fn": fn, "param": param}; + }, + functionParser1: function(txt) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = "", + ispassby = true; + let matchConfig = { + "bracket": 0, + "comma": 0, + "squote": 0, + "dquote": 0, + "compare":0 + } + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0) { + matchConfig.bracket += 1; + + if (str.length > 0) { + function_str += "luckysheet_function." + str.toUpperCase() + ".f("; + } + else { + function_str += "("; + } + + str = ""; + } + else if (s == ")" && matchConfig.dquote == 0) { + matchConfig.bracket -= 1; + function_str += _this.functionParser(str); + + if(matchConfig.compare == 1){ + function_str += '))'; + matchConfig.compare = 0; + } + else{ + function_str += ')'; + } + + str = ""; + } + else if (s == '"' && matchConfig.squote == 0) { + if (matchConfig.dquote > 0) { + function_str += str + '"'; + matchConfig.dquote -= 1; + str = ""; + } + else { + matchConfig.dquote += 1; + str += '"'; + } + } + else if (s == ',' && matchConfig.dquote == 0) { + //matchConfig.comma += 1; + function_str += _this.functionParser(str); + + if(matchConfig.compare == 1){ + function_str += '),'; + matchConfig.compare = 0; + } + else{ + function_str += ','; + } + + str = ""; + } + else if (s in _this.operatorjson && matchConfig.dquote == 0) { + let s_next = ""; + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + if ((s + s_next) in _this.operatorjson) { + if (str.length > 0) { + matchConfig.compare = 1; + function_str += "luckysheet_compareWith(" + _this.functionParser(str) + ",'" + s + s_next + "', "; + str = ""; + } + else { + function_str += s + s_next; + } + + i++; + } + else { + if (str.length > 0) { + matchConfig.compare = 1; + function_str += "luckysheet_compareWith(" + _this.functionParser(str) + ",'" + s + "', "; + str = ""; + } + else { + function_str += s; + } + } + } + else { + str += s; + } + + if (i == funcstack.length - 1) { + if (_this.iscelldata($.trim(str))) { + function_str += "luckysheet_getcelldata('" + $.trim(str) + "')"; + } + else { + function_str += $.trim(str); + } + } + + i++; + } + + return function_str; + }, + calPostfixExpression: function(cal){ + if(cal.length == 0){ + return ""; + } + + let stack = []; + for(let i = cal.length - 1; i >= 0; i--){ + let c = cal[i]; + if(c in this.operatorjson){ + let s2 = stack.pop(); + let s1 = stack.pop(); + + let str = "luckysheet_compareWith(" + s1 + ",'" + c + "', " + s2 + ")"; + + stack.push(str); + } + else{ + stack.push(c); + } + } + + if(stack.length > 0){ + return stack[0]; + } + else{ + return ""; + } + }, + checkBracketNum: function(fp){ + let bra_l = fp.match(/\(/g), + bra_r = fp.match(/\)/g), + bra_tl_txt = fp.match(/(['"])(?:(?!\1).)*?\1/g), + bra_tr_txt = fp.match(/(['"])(?:(?!\1).)*?\1/g); + + let bra_l_len = 0, bra_r_len = 0; + if (bra_l != null) { + bra_l_len += bra_l.length; + } + if (bra_r != null) { + bra_r_len += bra_r.length; + } + + let bra_tl_len = 0, bra_tr_len = 0; + if(bra_tl_txt != null){ + for(let i = 0; i < bra_tl_txt.length; i++){ + let bra_tl = bra_tl_txt[i].match(/\(/g); + if (bra_tl != null) { + bra_tl_len += bra_tl.length; + } + } + } + + if(bra_tr_txt != null){ + for(let i = 0; i < bra_tr_txt.length; i++){ + let bra_tr = bra_tr_txt[i].match(/\)/g); + if (bra_tr != null) { + bra_tr_len += bra_tr.length; + } + } + } + + bra_l_len -= bra_tl_len; + bra_r_len -= bra_tr_len; + + if(bra_l_len != bra_r_len){ + return false; + } + else{ + return true; + } + }, + operatorPriority: { + "^": 0, + "%": 1, + "*": 1, + "/": 1, + "+": 2, + "-": 2 + }, + functionParser: function(txt) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = ""; + + let matchConfig = { + "bracket": 0, + "comma": 0, + "squote": 0, + "dquote": 0, + "compare": 0, + "braces": 0 + } + + //=(sum(b1:c10)+10)*5-100 + + //=MAX(B1:C10,10)*5-100 + + // =(sum(max(B1:C10,10)*5-100,((1+1)*2+5)/2,10)+count(B1:C10,10*5-100))*5-100 + + //=SUM(MAX(B1:C10,10)*5-100,((1+1)*2+5)/2,10)+COUNT(B1:C10,10*5-100) + + //=SUM(MAX(B1:C10,10)*5-100,((1+1)*2+5)/2,10) + + //=SUM(10,((1+1)*2+5)/2,10) + + //=SUM(MAX(B1:C10,10)*5-100) + + //bracket 0为运算符括号、1为函数括号 + let cal1 = [], cal2 = [], bracket = []; + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0 && matchConfig.braces == 0) { + if (str.length > 0 && bracket.length == 0) { + function_str += "luckysheet_function." + str.toUpperCase() + ".f("; + bracket.push(1); + str = ""; + } + else if(bracket.length == 0) { + function_str += "("; + bracket.push(0); + str = ""; + } + else{ + bracket.push(0); + str += s; + } + } + else if (s == ")" && matchConfig.dquote == 0 && matchConfig.braces == 0) { + let bt = bracket.pop(); + + if(bracket.length == 0){ + function_str += _this.functionParser(str) + ")"; + str = ""; + } + else{ + str += s; + } + } + else if(s == "{" && matchConfig.dquote == 0){ + str += '{'; + matchConfig.braces += 1; + } + else if(s == "}" && matchConfig.dquote == 0){ + str += '}'; + matchConfig.braces -= 1; + } + else if (s == '"') { + str += '"'; + + if (matchConfig.dquote > 0) { + matchConfig.dquote -= 1; + } + else { + matchConfig.dquote += 1; + } + } + else if (s == ',' && matchConfig.dquote == 0 && matchConfig.braces == 0) { + if(bracket.length <= 1){ + function_str += _this.functionParser(str) + ","; + str = ""; + } + else{ + str += ","; + } + } + else if (s in _this.operatorjson && matchConfig.dquote == 0 && matchConfig.braces == 0) { + let s_next = ""; + let op = _this.operatorPriority; + + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + if ((s + s_next) in _this.operatorjson) { + if(bracket.length == 0){ + if($.trim(str).length > 0){ + cal2.unshift(_this.functionParser($.trim(str))); + } + else if($.trim(function_str).length > 0){ + cal2.unshift($.trim(function_str)); + } + + if(cal1[0] in _this.operatorjson){ + let stackCeilPri = op[cal1[0]]; + + while(cal1.length > 0 && stackCeilPri != null){ + cal2.unshift(cal1.shift()); + stackCeilPri = op[cal1[0]]; + } + } + + cal1.unshift(s+s_next); + + function_str= ""; + str = ""; + } + else { + str += s + s_next; + } + + i++; + } + else { + if(bracket.length == 0){ + if($.trim(str).length > 0){ + cal2.unshift(_this.functionParser($.trim(str))); + } + else if($.trim(function_str).length > 0){ + cal2.unshift($.trim(function_str)); + } + + if(cal1[0] in _this.operatorjson){ + let stackCeilPri = op[cal1[0]]; + stackCeilPri = stackCeilPri == null ? 1000 : stackCeilPri; + + let sPri = op[s]; + sPri = sPri == null ? 1000 : sPri; + + while(cal1.length > 0 && sPri >= stackCeilPri){ + cal2.unshift(cal1.shift()); + + stackCeilPri = op[cal1[0]]; + stackCeilPri = stackCeilPri == null ? 1000 : stackCeilPri; + } + } + + cal1.unshift(s); + + function_str= ""; + str = ""; + } + else{ + str += s; + } + } + } + else { + if (matchConfig.dquote == 0) { + str += $.trim(s); + } + else { + str += s; + } + } + + if (i == funcstack.length - 1) { + let endstr = ""; + + if (_this.iscelldata($.trim(str))) { + endstr = "luckysheet_getcelldata('" + $.trim(str) + "')"; + } + else { + str = $.trim(str); + + let regx = /{.*?}/; + if(regx.test(str) && str.substr(0, 1) != '"' && str.substr(str.length - 1, 1) != '"'){ + let arraytxt = regx.exec(str)[0]; + let arraystart = str.search(regx); + let alltxt = ""; + + if(arraystart > 0){ + endstr += str.substr(0, arraystart); + } + + endstr += "luckysheet_getarraydata('" + arraytxt + "')"; + + if(arraystart + arraytxt.length < str.length){ + endstr += str.substr(arraystart + arraytxt.length, str.length); + } + } + else{ + endstr = str; + } + } + + if(endstr.length > 0){ + cal2.unshift(endstr); + } + + if(cal1.length > 0){ + if(function_str.length > 0){ + cal2.unshift(function_str); + function_str = ""; + } + + while(cal1.length > 0){ + cal2.unshift(cal1.shift()); + } + } + + if(cal2.length > 0){ + function_str = _this.calPostfixExpression(cal2); + } + else{ + function_str += endstr; + } + } + + i++; + } + + return function_str; + }, + addFunctionGroup: function(r, c, func, index) { + if (index == null) { + index = Store.currentSheetIndex; + } + + let luckysheetfile = getluckysheetfile(); + let file = luckysheetfile[getSheetIndex(index)]; + if (file.calcChain == null) { + file.calcChain = []; + } + + let cc = { + "r": r, + "c": c, + "index": index, + "func": func + }; + file.calcChain.push(cc); + + server.saveParam("fc", index, JSON.stringify(cc), { + "op": "add", + "pos": file.calcChain.length - 1 + }); + setluckysheetfile(luckysheetfile); + }, + getFunctionGroup: function(index) { + if (index == null) { + index = Store.currentSheetIndex; + } + + let luckysheetfile = getluckysheetfile(); + let file = luckysheetfile[getSheetIndex(index)]; + + if (file.calcChain == null) { + return []; + } + + return file.calcChain; + }, + updateFunctionGroup: function(r, c, func, index) { + if (index == null) { + index = Store.currentSheetIndex; + } + + let luckysheetfile = getluckysheetfile(); + let file = luckysheetfile[getSheetIndex(index)]; + + let calcChain = file.calcChain; + if (calcChain != null) { + for (let i = 0; i < calcChain.length; i++) { + let calc = calcChain[i]; + if (calc.r == r && calc.c == c && calc.index == index) { + calcChain[i].func = func; + server.saveParam("fc", index, JSON.stringify(calc), { + "op": "update", + "pos": i + }); + break; + } + } + } + + setluckysheetfile(luckysheetfile); + }, + insertUpdateFunctionGroup: function(r, c, func, index) { + if (index == null) { + index = Store.currentSheetIndex; + } + + if (func == null) { + this.delFunctionGroup(r, c, index); + return; + } + + let luckysheetfile = getluckysheetfile(); + let file = luckysheetfile[getSheetIndex(index)]; + + let calcChain = file.calcChain; + if (calcChain == null) { + calcChain = []; + } + + for (let i = 0; i < calcChain.length; i++) { + let calc = calcChain[i]; + if (calc.r == r && calc.c == c && calc.index == index) { + calc.func = func; + server.saveParam("fc", index, JSON.stringify(calc), { + "op": "update", + "pos": i + }); + return; + } + } + + let cc = { + "r": r, + "c": c, + "index": index, + "func": func + }; + calcChain.push(cc); + file.calcChain = calcChain; + + server.saveParam("fc", index, JSON.stringify(cc), { + "op": "add", + "pos": file.calcChain.length - 1 + }); + setluckysheetfile(luckysheetfile); + }, + isFunctionRangeSave: false, + isFunctionRange: function(txt, r, c) { + let _this = this; + + if (_this.operatorjson == null) { + let arr = _this.operator.split("|"), + op = {}; + + for (let i = 0; i < arr.length; i++) { + op[arr[i].toString()] = 1; + } + + _this.operatorjson = op; + } + + if (txt.substr(0, 1) == "=") { + txt = txt.substr(1); + } + + let funcstack = txt.split(""); + let i = 0, + str = "", + function_str = "", + ispassby = true; + + let matchConfig = { + "bracket": 0, + "comma": 0, + "squote": 0, + "dquote": 0 + } + + let luckysheetfile = getluckysheetfile(); + let dynamicArray_compute = luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["dynamicArray_compute"] == null ? {} : luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["dynamicArray_compute"]; + + while (i < funcstack.length) { + let s = funcstack[i]; + + if (s == "(" && matchConfig.dquote == 0) { + matchConfig.bracket += 1; + + if (str.length > 0) { + function_str += "luckysheet_function." + str.toUpperCase() + ".f("; + } + else { + function_str += "("; + } + + str = ""; + } + else if (s == ")" && matchConfig.dquote == 0) { + matchConfig.bracket -= 1; + function_str += _this.isFunctionRange(str, r, c) + ")"; + str = ""; + } + else if (s == ',' && matchConfig.dquote == 0) { + //matchConfig.comma += 1; + function_str += _this.isFunctionRange(str, r, c) + ','; + str = ""; + } + else if (s in _this.operatorjson && matchConfig.dquote == 0) { + let s_next = ""; + + if ((i + 1) < funcstack.length) { + s_next = funcstack[i + 1]; + } + + if ((s + s_next) in _this.operatorjson) { + if (str.length > 0) { + function_str += _this.isFunctionRange(str, r, c) + s + s_next; + str = ""; + } + else { + function_str += s + s_next; + } + + i++; + } + else { + if (str.length > 0) { + function_str += _this.isFunctionRange(str, r, c) + s; + str = ""; + } + else { + function_str += s; + } + } + } + else { + str += s; + } + + if (i == funcstack.length - 1) { + if (_this.iscelldata($.trim(str))) { + if (r != null && c != null) { + let range = _this.getcellrange($.trim(str)); + let row = range.row, + col = range.column; + + if((r + "_" + c) in dynamicArray_compute){ + let isd_range = false; + + for(let d_r = row[0]; d_r <= row[1]; d_r++){ + for(let d_c = col[0]; d_c <= col[1]; d_c++){ + if((d_r + "_" + d_c) in dynamicArray_compute && dynamicArray_compute[d_r + "_" + d_c].r == r && dynamicArray_compute[d_r + "_" + d_c].c == c){ + isd_range = true; + } + } + } + + if (isd_range) { + _this.isFunctionRangeSave = _this.isFunctionRangeSave || true; + } + else { + _this.isFunctionRangeSave = _this.isFunctionRangeSave || false; + } + } + else{ + if (r >= row[0] && r <= row[1] && c >= col[0] && c <= col[1]) { + _this.isFunctionRangeSave = _this.isFunctionRangeSave || true; + } + else { + _this.isFunctionRangeSave = _this.isFunctionRangeSave || false; + } + } + } + else { + let sheetlen = $.trim(str).split("!"); + + if (sheetlen.length > 1) { + _this.isFunctionRangeSave = _this.isFunctionRangeSave || true; + } + else { + _this.isFunctionRangeSave = _this.isFunctionRangeSave || false; + } + } + } + } + + i++; + } + + return function_str; + }, + execvertex: {}, + execFunctionGroupData: null, + execFunctionExist: null, + execFunctionGroup: function(origin_r, origin_c, value, index, data) { + let _this = this; + + if (data == null) { + data = Store.flowdata; + } + + _this.execFunctionGroupData = $.extend(true, [], data); + + if (value != null) { + //此处setcellvalue 中this.execFunctionGroupData会保存想要更新的值,本函数结尾不要设为null,以备后续函数使用 + setcellvalue(origin_r, origin_c, _this.execFunctionGroupData, value); + } + + if (index == null) { + index = Store.currentSheetIndex; + } + + //{ "r": r, "c": c, "index": index, "func": func} + let group = _this.getFunctionGroup(index), + vertex1 = {}, + stack = [], + count = 0; + + _this.execvertex = {}; + if (_this.execFunctionExist == null) { + let luckysheetfile = getluckysheetfile(); + + for (let i = 0; i < group.length; i++) { + let item = group[i]; + + let cell = luckysheetfile[getSheetIndex(item["index"])].data[item.r][item.c]; + + if(cell != null && cell.f != null && cell.f == item.func[2]){ + if(!(item instanceof Object)){ + item = eval('('+ item +')'); + } + + item.color = "w"; + item.parent = null; + item.chidren = {}; + item.times = 0; + + vertex1["r" + item.r.toString() + "c" + item.c.toString()] = item; + _this.isFunctionRangeSave = false; + + if (origin_r != null && origin_c != null) { + _this.isFunctionRange(item.func[2], origin_r, origin_c); + } + else { + _this.isFunctionRange(item.func[2]); + } + + if (_this.isFunctionRangeSave) { + stack.push(item); + _this.execvertex["r" + item.r.toString() + "c" + item.c.toString()] = item; + count++; + } + } + } + } + else { + for (let x = 0; x < _this.execFunctionExist.length; x++) { + let cell = _this.execFunctionExist[x]; + + if ("r" + cell.r.toString() + "c" + cell.c.toString() in vertex1) { + continue; + } + + for (let i = 0; i < group.length; i++) { + let item = group[i]; + + item.color = "w"; + item.parent = null; + item.chidren = {}; + item.times = 0; + + vertex1["r" + item.r.toString() + "c" + item.c.toString()] = item; + _this.isFunctionRangeSave = false; + _this.isFunctionRange(item.func[2], cell.r, cell.c); + + if (_this.isFunctionRangeSave) { + stack.push(item); + _this.execvertex["r" + item.r.toString() + "c" + item.c.toString()] = item; + count++; + } + } + } + } + + while (stack.length > 0) { + let u = stack.shift(); + + for (let name in vertex1) { + if (u.r == vertex1[name].r && u.c == vertex1[name].c) { + continue; + } + + _this.isFunctionRangeSave = false; + _this.isFunctionRange(vertex1[name].func[2], u.r, u.c); + + if (_this.isFunctionRangeSave) { + let v = vertex1[name]; + + if (!(name in _this.execvertex)) { + stack.push(v); + _this.execvertex[name] = v; + } + + count++; + _this.execvertex[name].chidren["r" + u.r.toString() + "c" + u.c.toString()] = 1; + } + } + } + + _this.groupValuesRefreshData = []; + let i = 0; + + while (i < count) { + for (let name in _this.execvertex) { + let u = _this.execvertex[name]; + + if (u.color == "w") { + _this.functionDFS(u); + } + else if (u.color == "b") { + i++; + } + } + } + + _this.execFunctionExist = null; + }, + //深度优先算法,处理多级调用函数 + functionDFS: function(u) { + let _this = this; + + u.color = "g"; + u.times += 1; + + for (let chd in u.chidren) { + let v = _this.execvertex[chd]; + if (v.color == "w") { + v.parent = "r" + u.r.toString() + "c" + u.c.toString(); + _this.functionDFS(v); + } + } + + u.color = "b"; + window.luckysheet_getcelldata_cache = null; + + let v = _this.execfunction(u.func[2], u.r, u.c); + + let value = _this.execFunctionGroupData[u.r][u.c]; + if(value == null){ + value = {}; + } + + value.v = v[1]; + value.f = v[2]; + + if(value.spl != null){ + window.luckysheetCurrentRow = u.r; + window.luckysheetCurrentColumn = u.c; + window.luckysheetCurrentFunction = _this.execFunctionGroupData[u.r][u.c].f; + + let fp = $.trim(_this.functionParser(_this.execFunctionGroupData[u.r][u.c].f)); + let sparklines = eval(fp); + value.spl = sparklines; + } + + _this.groupValuesRefreshData.push({ + "r": u.r, + "c": u.c, + "v": value, + "i": Store.currentSheetIndex + }); + + _this.execFunctionGroupData[u.r][u.c] = value; + }, + groupValuesRefreshData: [], + groupValuesRefresh: function() { + let _this = this; + + if(_this.groupValuesRefreshData.length > 0){ + for (let i = 0; i < _this.groupValuesRefreshData.length; i++) { + let item = _this.groupValuesRefreshData[i]; + + if(item.i != Store.currentSheetIndex){ + continue; + } + + setcellvalue(item.r, item.c, Store.flowdata, item.v); + server.saveParam("v", Store.currentSheetIndex, item.v, { + "r": item.r, + "c": item.c + }); + } + + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + } + }, + delFunctionGroup: function(r, c, index) { + if (index == null) { + index = Store.currentSheetIndex; + } + + let luckysheetfile = getluckysheetfile(); + let file = luckysheetfile[getSheetIndex(index)]; + + let calcChain = file.calcChain; + if (calcChain != null) { + for (let i = 0; i < calcChain.length; i++) { + let calc = calcChain[i]; + if (calc.r == r && calc.c == c && calc.index == index) { + calcChain.splice(i, 1); + server.saveParam("fc", index, null, { + "op": "del", + "pos": i + }); + break; + } + } + } + + setluckysheetfile(luckysheetfile); + }, + execfunction1: function(txt, r, c, isrefresh) { + let _this = this; + + let fp = $.trim(_this.functionParser(txt)); + let funcf = fp.match(/luckysheet_function/g), + funcg = fp.match(/luckysheet_getcelldata/g), + funcc = fp.match(/luckysheet_compareWith/g), + funclen = 0; + + if (isrefresh == null) { + isrefresh = false; + } + + if (funcf != null) { + funclen += funcf.length; + } + + if (funcg != null) { + funclen += funcg.length; + } + + if (funcc != null) { + funclen += funcc.length; + } + + let quota1 = fp.match(/\(/g), + quota2 = fp.match(/\)/g), + quotalen = 0; + + if (quota1 != null) { + quotalen += quota1.length; + } + + if (quota2 != null) { + quotalen += quota2.length; + } + + if ((fp.substr(0, 16) == "luckysheet_function." || fp.substr(0, 18) == "luckysheet_compareWith") && funclen != quotalen / 2) { + fp += ")"; + + if(fp.substr(0, 16) == "luckysheet_function."){ + txt += ")"; + } + + _this.functionHTMLIndex = 0; + $("#luckysheet-functionbox-cell").html('=' + _this.functionHTML(txt)); + } + + if (!_this.testFunction(txt, fp)) { + tooltip.info("提示", "公式存在错误"); + return [false, _this.error.n, txt]; + } + + let result = null; + window.luckysheetCurrentRow = r; + window.luckysheetCurrentColumn = c; + window.luckysheetCurrentFunction = txt; + + try { + result = eval(fp); + } + catch (e) { + let err = e; + //err错误提示处理 + console.log(e); + err = _this.errorInfo(err); + result = [_this.error.n, err]; + } + + if (result instanceof Array) { + result = result[0]; + //错误处理 + } + else if(result instanceof Object){ + result = result.data; + if (result instanceof Array) { + result = result[0]; + } + } + + window.luckysheetCurrentRow = null; + window.luckysheetCurrentColumn = null; + window.luckysheetCurrentFunction = null; + + if (fp.substr(0, 19) == "luckysheet_getcelldata(") { + if (result instanceof Array) { + result = result.join(","); + } + else if (result instanceof Object) { + result = result.v; + } + } + + if (r != null && c != null) { + if (isrefresh) { + _this.execFunctionGroup(r, c, result); + } + _this.insertUpdateFunctionGroup(r, c, [true, result, txt]); + } + + return [true, result, txt]; + }, + execfunction: function(txt, r, c, isrefresh, notInsertFunc) { + let _this = this; + + if(txt.indexOf(_this.error.r) > -1){ + return [false, _this.error.r, txt]; + } + + if (!_this.checkBracketNum(txt)) { + txt += ")"; + } + + let fp = $.trim(_this.functionParser(txt)); + + if ((fp.substr(0, 16) == "luckysheet_function." || fp.substr(0, 18) == "luckysheet_compareWith") ) { + _this.functionHTMLIndex = 0; + } + + if (!_this.testFunction(txt, fp) || fp == "") { + tooltip.info("提示", "公式存在错误"); + return [false, _this.error.n, txt]; + } + + let result = null; + window.luckysheetCurrentRow = r; + window.luckysheetCurrentColumn = c; + window.luckysheetCurrentFunction = txt; + + let sparklines = null; + + try { + if(fp.indexOf("luckysheet_getcelldata") > -1){ + let funcg = fp.split("luckysheet_getcelldata('"); + + for(let i = 1; i < funcg.length; i++){ + let funcgStr = funcg[i].split("')")[0]; + let funcgRange = _this.getcellrange(funcgStr); + + if(funcgRange.row[0] < 0 || funcgRange.column[0] < 0){ + return [true, _this.error.r, txt]; + } + + if(funcgRange.sheetIndex == Store.currentSheetIndex && r >= funcgRange.row[0] && r <= funcgRange.row[1] && c >= funcgRange.column[0] && c <= funcgRange.column[1]){ + if(isEditMode()){ + alert("公式不可引用其本身的单元格"); + } + else{ + tooltip.info("公式不可引用其本身的单元格,会导致计算结果不准确", ""); + + } + + return [false, 0, txt]; + } + } + } + + result = eval(fp); + + //加入sparklines的参数项目 + if(fp.indexOf("SPLINES") > -1){ + sparklines = result; + result = ""; + } + } + catch (e) { + let err = e; + //err错误提示处理 + console.log(e); + err = _this.errorInfo(err); + result = [_this.error.n, err]; + } + + //公式结果是对象,则表示只是选区。如果是单个单元格,则返回其值;如果是多个单元格,则返回 #VALUE!。 + if(getObjType(result) == "object" && result.startCell != null){ + if(getObjType(result.data) == "array"){ + result = _this.error.v; + } + else{ + if(result.data == null || isRealNull(result.data.v)){ + result = 0; + } + else{ + result = result.data.v; + } + } + } + + //公式结果是数组,分错误值 和 动态数组 两种情况 + if(getObjType(result) == "array"){ + let isErr = false; + + if(getObjType(result[0]) != "array" && result.length == 2){ + isErr = valueIsError(result[0]); + } + + if(!isErr){ + if(getObjType(result[0]) == "array" && result.length == 1 && result[0].length == 1){ + result = result[0][0]; + } + else{ + let luckysheetfile = getluckysheetfile(); + let file = luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + let dynamicArray = file["dynamicArray"] == null ? [] : file["dynamicArray"]; + dynamicArray.push({"r": r, "c": c, "f": txt, "data": result}); + + file["dynamicArray"] = dynamicArray; + setluckysheetfile(luckysheetfile); + + result = ""; + } + } + else{ + result = result[0]; + } + } + + window.luckysheetCurrentRow = null; + window.luckysheetCurrentColumn = null; + window.luckysheetCurrentFunction = null; + + if (r != null && c != null) { + if (isrefresh) { + _this.execFunctionGroup(r, c, result); + } + + if(!notInsertFunc){ + _this.insertUpdateFunctionGroup(r, c, [true, result, txt]); + } + } + + if(!!sparklines){ + return [true, result, txt, {type: "sparklines", data: sparklines}]; + } + + return [true, result, txt]; + }, + testFunction: function(txt, fp) { + if (txt.substr(0, 1) == "=") { + return true; + } + else { + return false; + } + }, + functionResizeData: {}, + functionResizeStatus: false, + functionResizeTimeout: null, + data_parm_index: 0 //选择公式后参数索引标记 +} + +export default luckysheetformula; \ No newline at end of file diff --git a/src/global/func_methods.js b/src/global/func_methods.js new file mode 100644 index 000000000..d1150003c --- /dev/null +++ b/src/global/func_methods.js @@ -0,0 +1,675 @@ +import { getObjType } from '../utils/util'; +import { isRealNum, isRealNull, valueIsError } from './validate'; +import { update } from './format'; +import formula from './formula'; + +const error = { + v: "#VALUE!", //错误的参数或运算符 + n: "#NAME?", //公式名称错误 + na: "#N/A", //函数或公式中没有可用数值 + r: "#REF!", //删除了由其他公式引用的单元格 + d: "#DIV/0!", //除数是0或空单元格 + nm: "#NUM!", //当公式或函数中某个数字有问题时 + nl: "#NULL!", //交叉运算符(空格)使用不正确 + sp: "#SPILL!" //数组范围有其它值 +} + +const func_methods = { + //单元格数据生成一维数组 + getCellDataArr: function(rangeObj, nullCellType, isNeglectNullCell){ + let dataArr = []; + + if(rangeObj.data == null){ + if(!isNeglectNullCell){ + if(nullCellType == "number"){ + dataArr.push(0); + } + else if(nullCellType == "text"){ + dataArr.push(""); + } + } + } + else{ + if(getObjType(rangeObj.data) == "array"){ + for(let i = 0; i < rangeObj.data.length; i++){ + for(let j = 0; j < rangeObj.data[i].length; j++){ + if(rangeObj.data[i][j] != null && !isRealNull(rangeObj.data[i][j].v)){ + dataArr.push(rangeObj.data[i][j].v); + } + else{ + if(!isNeglectNullCell){ + if(nullCellType == "number"){ + dataArr.push(0); + } + else if(nullCellType == "text"){ + dataArr.push(""); + } + } + } + } + } + } + else{ + if(isRealNull(rangeObj.data.v)){ + if(!isNeglectNullCell){ + if(nullCellType == "number"){ + dataArr.push(0); + } + else if(nullCellType == "text"){ + dataArr.push(""); + } + } + } + else{ + dataArr.push(rangeObj.data.v); + } + } + } + + return dataArr; + }, + //单元格数据生成二维数组 + getCellDataDyadicArr: function(rangeObj, nullCellType){ + let dataArr = []; + + if(rangeObj.data == null){ + let rowArr = []; + + if(nullCellType == "number"){ + rowArr.push(0); + } + else if(nullCellType == "text"){ + rowArr.push(""); + } + + dataArr.push(rowArr); + } + else{ + if(getObjType(rangeObj.data) == "array"){ + for(let i = 0; i < rangeObj.data.length; i++){ + let rowArr = []; + + for(let j = 0; j < rangeObj.data[i].length; j++){ + let value; + + if(rangeObj.data[i][j] != null && !isRealNull(rangeObj.data[i][j].v)){ + value = rangeObj.data[i][j].v; + } + else{ + if(nullCellType == "number"){ + value = 0; + } + else if(nullCellType == "text"){ + value = ""; + } + } + + rowArr.push(value); + } + + dataArr.push(rowArr); + } + } + else{ + let rowArr = []; + + let value = rangeObj.data.v; + + if(isRealNull(value)){ + if(nullCellType == "number"){ + value = 0; + } + else if(nullCellType == "text"){ + value = ""; + } + } + + rowArr.push(value); + + dataArr.push(rowArr); + } + } + + return dataArr; + }, + //数组数据生成一维数组 + getDataArr: function(arr, isNeglectNaN){ + let dataArr = []; + + if(isNeglectNaN == null){ + isNeglectNaN = false; + } + + if(getObjType(arr[0]) == "array"){ + for(let i = 0; i < arr.length; i++){ + for(let j = 0; j < arr[i].length; j++){ + if(isNeglectNaN && !isRealNum(arr[i][j])){ + continue; + } + + dataArr.push(arr[i][j]); + } + } + } + else{ + for(let i = 0; i < arr.length; i++){ + if(isNeglectNaN && !isRealNum(arr[i])){ + continue; + } + + dataArr.push(arr[i]); + } + } + + return dataArr; + }, + getDataDyadicArr: function(arr){ + let dataArr = []; + + if(getObjType(arr[0]) == "array"){ + for(let i = 0; i < arr.length; i++){ + let rowArr = []; + + for(let j = 0; j < arr[i].length; j++){ + rowArr.push(arr[i][j]); + } + + dataArr.push(rowArr); + } + } + else{ + let rowArr = []; + + for(let i = 0; i < arr.length; i++){ + rowArr.push(arr[i]); + } + + dataArr.push(rowArr); + } + + return dataArr; + }, + //是否是规则二维数组 + isDyadicArr: function(arr){ + let isDyadic = true; + + if(arr.length > 1){ + let collen = arr[0].length; + + for(let i = 1; i < arr.length; i++){ + if(arr[i].length != collen){ + isDyadic = false; + break; + } + } + } + + return isDyadic; + }, + //获取单个单元格数据,数组第一个值 + getFirstValue: function(data, nullCellType){ + let _this = this; + + if(nullCellType == null){ + nullCellType = "number"; + } + + let value; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!_this.isDyadicArr(data)){ + return error.v; + } + + value = data[0][0]; + } + else{ + value = data[0]; + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + if(data.data == null){ + if(nullCellType == "number"){ + value = 0; + } + else if(nullCellType == "text"){ + value = ""; + } + } + else{ + let cell_r = window.luckysheetCurrentRow; + let cell_c = window.luckysheetCurrentColumn; + + if(data.rowl == 1 && data.coll == 1){ + value = data.data; + + if(value == null || isRealNull(value.v)){ + if(nullCellType == "number"){ + value = 0; + } + else if(nullCellType == "text"){ + value = ""; + } + } + else{ + value = value.v; + } + } + else{ + if(data.data[0][0].mc != null && data.data[0][0].mc.rs == data.rowl && data.data[0][0].mc.cs == data.coll){ + value = data.data[0][0]; + + if(value == null || isRealNull(value.v)){ + if(nullCellType == "number"){ + value = 0; + } + else if(nullCellType == "text"){ + value = ""; + } + } + else{ + value = value.v; + } + } + else if(data.rowl == 1 || data.coll == 1){ + let cellrange = formula.getcellrange(data.startCell); + let str = cellrange.row[0], + edr = str + data.rowl - 1, + stc = cellrange.column[0], + edc = stc + data.coll - 1; + + if(data.rowl == 1){ + if(cell_c < stc || cell_c > edc){ + return error.v; + } + + value = data.data[0][cell_c - stc]; + } + else if(data.coll == 1){ + if(cell_r < str || cell_r > edr){ + return error.v; + } + + value = data.data[cell_r - str][0]; + } + + if(value == null || isRealNull(value.v) || value.mc != null){ + if(nullCellType == "number"){ + value = 0; + } + else if(nullCellType == "text"){ + value = ""; + } + } + else{ + value = value.v; + } + } + else{ + return error.v; + } + } + } + } + else{ + value = data; + } + + return value; + }, + //获取单元格的逻辑值 + getCellBoolen: function(data){ + let _this = this; + + let cumulative = _this.getFirstValue(data); + + if(valueIsError(cumulative)){ + return cumulative; + } + + if(getObjType(cumulative) == "boolean"){ + + } + else if(getObjType(cumulative) == "string" && (cumulative.toLowerCase() == "true" || cumulative.toLowerCase() == "false")){ + if(cumulative.toLowerCase() == "true"){ + cumulative = true; + } + else if(cumulative.toLowerCase() == "false"){ + cumulative = false; + } + } + else if(isRealNum(cumulative)){ + cumulative = parseFloat(cumulative); + + cumulative = cumulative == 0 ? false : true; + } + else{ + return error.v; + } + + return cumulative; + }, + //获取单元格的日期 + getCellDate: function(data){ + let _this = this; + + let date_text; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array"){ + if(!_this.isDyadicArr(data)){ + return error.v; + } + + date_text = data[0][0]; + } + else{ + date_text = data[0]; + } + } + else if(getObjType(data) == "object" && data.startCell != null){ + if(data.data == null || getObjType(data.data) == "array" || isRealNull(data.data.v)){ + return error.v; + } + + date_text = data.data.v; + + if(data.data.ct != null && data.data.ct.t == "d"){ + date_text = update("YYYY-MM-DD h:mm:ss", date_text); + } + } + else{ + date_text = data; + } + + return date_text; + }, + getCellrangeDate: function(data){ + let _this = this; + + let date = []; + + if(getObjType(data) == "array"){ + if(getObjType(data[0]) == "array" && !_this.isDyadicArr(data)){ + return error.v; + } + + date = date.concat(_this.getDataArr(data, false)); + } + else if(getObjType(data) == "object" && data.startCell != null){ + if(data.data == null){ + date.push(0); + } + else{ + if(getObjType(data.data) == "array"){ + for(let i = 0; i < data.data.length; i++){ + for(let j = 0; j < data.data[i].length; j++){ + if(data.data[i][j] != null && !isRealNull(data.data[i][j].v)){ + let value = data.data[i][j].v; + + if(data.data[i][j].ct != null && data.data[i][j].ct.t == "d"){ + value = update("YYYY-MM-DD h:mm:ss", value); + } + + date.push(value); + } + else{ + date.push(0); + } + } + } + } + else{ + let value = data.data.v; + + if(data.data.ct != null && data.data.ct.t == "d"){ + value = update("YYYY-MM-DD h:mm:ss", value); + } + + date.push(value); + } + } + } + else{ + date.push(data); + } + + return date; + }, + //获取正则字符串(处理 . * ? ~* ~?) + getRegExpStr: function(str){ + return str.replace("~*", "\\*").replace("~?", "\\?").replace(".", "\\.").replace("*", ".*").replace("?", "."); + }, + //阶乘 + factorial: function(num){ + if (num == 0 || num == 1) { + return 1; + } + else { + return (num * this.factorial(num - 1)); + } + }, + //双阶乘 + factorialDouble: function(num){ + if (num <= 0) { + return 1; + } + else { + return (num * this.factorialDouble(num - 2)); + } + }, + //总体方差 + variance: function(num_arr){ + let sum = 0, count = 0; + + for(let i = 0; i < num_arr.length; i++){ + let number = num_arr[i]; + + sum += number; + count++; + } + + let avg = sum / count; + + let sum_variance = 0; + + for(let j = 0; j < num_arr.length; j++){ + let number = num_arr[j]; + + sum_variance += (number - avg) * (number - avg); + } + + return sum_variance / count; + }, + //样本方差 + variance_s: function(num_arr){ + let sum = 0, count = 0; + + for(let i = 0; i < num_arr.length; i++){ + let number = num_arr[i]; + + sum += number; + count++; + } + + let avg = sum / count; + + let sum_variance = 0; + + for(let j = 0; j < num_arr.length; j++){ + let number = num_arr[j]; + + sum_variance += (number - avg) * (number - avg); + } + + return sum_variance / (count - 1); + }, + //总体标准偏差 + standardDeviation: function(num_arr){ + let sum = 0, count = 0; + + for(let i = 0; i < num_arr.length; i++){ + let number = num_arr[i]; + + sum += number; + count++; + } + + let avg = sum / count; + + let sum_variance = 0; + + for(let j = 0; j < num_arr.length; j++){ + let number = num_arr[j]; + + sum_variance += (number - avg) * (number - avg); + } + + return Math.sqrt(sum_variance / count); + }, + //样本标准偏差 + standardDeviation_s: function(num_arr){ + let sum = 0, count = 0; + + for(let i = 0; i < num_arr.length; i++){ + let number = num_arr[i]; + + sum += number; + count++; + } + + let avg = sum / count; + + let sum_variance = 0; + + for(let j = 0; j < num_arr.length; j++){ + let number = num_arr[j]; + + sum_variance += (number - avg) * (number - avg); + } + + return Math.sqrt(sum_variance / (count - 1)); + }, + //是否是闰年 + isLeapYear: function(year){ + return new Date(year, 1, 29).getMonth() === 1; + }, + //2月是否有29 + feb29Between: function(date1, date2){ + let _this = this; + + let year1 = moment(date1).year(); + let mar1year1 = moment().set({ 'year': year1, 'month': 2, 'date': 1 }); + + if (_this.isLeapYear(year1) && moment(date1) < moment(mar1year1) && moment(date2) >= moment(mar1year1)) { + return true; + } + + let year2 = moment(date2).year(); + let mar1year2 = moment().set({ 'year': year2, 'month': 2, 'date': 1 }); + + return (_this.isLeapYear(year2) && moment(date2) >= moment(mar1year2) && moment(date1) < moment(mar1year2)); + }, + //SQL 查询 + findResultIndex: function(database, criterias){ + let matches = {}; + + for (let i = 1; i < database[0].length; ++i) { + matches[i] = true; + } + + let maxCriteriaLength = criterias[0].length; + + for (i = 1; i < criterias.length; ++i) { + if (criterias[i].length > maxCriteriaLength) { + maxCriteriaLength = criterias[i].length; + } + } + + for (let k = 1; k < database.length; ++k) { + for (let l = 1; l < database[k].length; ++l) { + let currentCriteriaResult = false; + let hasMatchingCriteria = false; + + for (let j = 0; j < criterias.length; ++j) { + let criteria = criterias[j]; + + if (criteria.length < maxCriteriaLength) { + continue; + } + + let criteriaField = criteria[0]; + + if (database[k][0] !== criteriaField) { + continue; + } + + hasMatchingCriteria = true; + + for (let p = 1; p < criteria.length; ++p) { + currentCriteriaResult = currentCriteriaResult || eval(database[k][l] + criteria[p]); // jshint ignore:line + } + } + + if (hasMatchingCriteria) { + matches[l] = matches[l] && currentCriteriaResult; + } + } + } + + let result = []; + + for (let n = 0; n < database[0].length; ++n) { + if (matches[n]) { + result.push(n - 1); + } + } + + return result; + }, + findField: function(database, title){ + let index = null; + + for (let i = 0; i < database.length; i++) { + if (database[i][0] == title) { + index = i; + break; + } + } + + if (index == null) { + return error.v; + } + + return index; + }, + rest: function(array, idx){ + idx = idx || 1; + + if (!array || typeof array.slice !== 'function') { + return array; + } + + return array.slice(idx); + }, + compact: function(array){ + if (!array) { + return array; + } + + let result = []; + + for (let i = 0; i < array.length; ++i) { + if (!array[i]) { + continue; + } + + result.push(array[i]); + } + + return result; + } +} + +export default func_methods; \ No newline at end of file diff --git a/src/global/getRowlen.js b/src/global/getRowlen.js new file mode 100644 index 000000000..7c2597063 --- /dev/null +++ b/src/global/getRowlen.js @@ -0,0 +1,171 @@ +import { luckysheetfontformat } from '../utils/util'; +import menuButton from '../controllers/menuButton'; +import { getcellvalue } from './getdata'; +import { colLocationByIndex } from './location'; +import Store from '../store'; + +//计算范围行高 +function rowlenByRange(d, r1, r2, cfg) { + let cfg_clone = $.extend(true, {}, cfg); + if(cfg_clone["rowlen"] == null){ + cfg_clone["rowlen"] = {}; + } + + let ctcanvas = $("#luckysheetTableContent").get(0).getContext("2d"); + + for(let r = r1; r <= r2; r++){ + if (cfg_clone["rowhidden"] != null && cfg_clone["rowhidden"][r] != null) { + continue; + } + + let currentRowLen = Store.defaultrowlen; + if(cfg_clone["rowlen"][r] != null){ + currentRowLen = cfg_clone["rowlen"][r]; + } + + for(let c = 0; c < d[r].length; c++){ + if(d[r][c] != null && d[r][c]["v"] != null && d[r][c]["tb"] != null && d[r][c]["tb"] == "2"){ + //自动换行 + let fontset = luckysheetfontformat(d[r][c]); + ctcanvas.font = fontset; + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + + let cellText = getcellvalue(r, c, d).toString(); //单元格文本 + let textWidth = ctcanvas.measureText(cellText).width; //文本宽度 + let cellWidth = colLocationByIndex(c)[1] - colLocationByIndex(c)[0] - 8; //单元格宽度 + + let computeRowlen; //计算行高 + if(textWidth > cellWidth){ + let strArr = []; //文本截断数组 + + for(let strI = 1; strI <= cellText.length; strI++){ + let strV = cellText.substring(strArr.join("").length, strI); + let strtextMetrics = ctcanvas.measureText(strV).width; + + if(strtextMetrics > cellWidth){ + strArr.push(cellText.substring(strArr.join("").length, strI-1)); + strI = strI-2; + } + else if(strtextMetrics <= cellWidth && strI == cellText.length){ + strArr.push(strV); + } + } + + computeRowlen = oneLineTextHeight * strArr.length; + } + else{ + computeRowlen = oneLineTextHeight; + } + + //比较计算行高和当前行高取最大高度 + if(computeRowlen > currentRowLen){ + currentRowLen = computeRowlen; + } + } + else if(d[r][c] != null && d[r][c]["v"] != null && d[r][c]["tr"] != null){ + //文本旋转 + let fontset = luckysheetfontformat(d[r][c]); + ctcanvas.font = fontset; + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + + let cellText = getcellvalue(r,c,d).toString(); //单元格文本 + let textWidth = ctcanvas.measureText(cellText).width; //文本宽度 + + let computeRowlen; //计算行高 + if(d[r][c]["tr"] == "0"){ + //无旋转 + computeRowlen = oneLineTextHeight; + } + else if(d[r][c]["tr"] == "1" || d[r][c]["tr"] == "2"){ + //向下倾斜(45 旋转)----向上倾斜(-45 旋转) + computeRowlen = 0.707 * (textWidth + oneLineTextHeight) + 4; + } + else if(d[r][c]["tr"] == "3"){ + //竖排文字 + computeRowlen = cellText.length * oneLineTextHeight + 4; + } + else if(d[r][c]["tr"] == "4" || d[r][c]["tr"] == "5"){ + //向下90(90 旋转)----向上90(-90 旋转) + computeRowlen = textWidth + 4; + } + computeRowlen = Math.round(computeRowlen); + + //比较计算高度和当前高度取最大高度 + if(computeRowlen > currentRowLen){ + currentRowLen = computeRowlen; + } + } + else{ + let fontset = luckysheetfontformat(d[r][c]); + let oneLineTextHeight = menuButton.getTextSize("田", fontset)[1]; + + //比较计算高度和当前高度取最大高度 + if(oneLineTextHeight > currentRowLen){ + currentRowLen = oneLineTextHeight; + } + } + } + + if(currentRowLen != Store.defaultrowlen){ + cfg_clone["rowlen"][r] = currentRowLen; + } + } + + return cfg_clone; +} + +//计算表格行高数组 +function computeRowlenArr(rowHeight, cfg) { + let rowlenArr = []; + let rh_height = 0; + + for (let i = 0; i < rowHeight; i++) { + let rowlen = Store.defaultrowlen; + + if (cfg["rowlen"] != null && cfg["rowlen"][i] != null) { + rowlen = cfg["rowlen"][i]; + } + + if (cfg["rowhidden"] != null && cfg["rowhidden"][i] != null) { + rowlen = cfg["rowhidden"][i]; + rowlenArr.push(rh_height); + continue; + } + else { + rh_height += rowlen + 1; + } + + rowlenArr.push(rh_height);//行的临时长度分布 + } + + return rowlenArr; +} + +//获取换行单元格截断数组 +function getCellTextSplitArr(strValue, strArr, cellWidth, canvas){ + for(let strI = 1; strI <= strValue.length; strI++){ + let strV = strValue.substring(0, strI); + let strtextMetrics = canvas.measureText(strV).width; + + if(strtextMetrics > cellWidth){ + if(strI - 1 <= 0){ + return strArr; + } + else{ + strArr.push(strValue.substring(0, strI - 1)); + return getCellTextSplitArr(strValue.substring(strI - 1), strArr, cellWidth, canvas); + } + } + else if(strI == strValue.length){ + strArr.push(strV); + } + } + + return strArr; +} + +export { + rowlenByRange, + computeRowlenArr, + getCellTextSplitArr, +} \ No newline at end of file diff --git a/src/global/getdata.js b/src/global/getdata.js new file mode 100644 index 000000000..dfed0dea5 --- /dev/null +++ b/src/global/getdata.js @@ -0,0 +1,221 @@ +import { getObjType } from '../utils/util'; +import { getSheetIndex } from '../methods/get'; +import server from '../controllers/server'; +import formula from './formula'; +import editor from './editor'; +import { dynamicArrayCompute } from './dynamicArray'; +import Store from '../store'; + +//获取选区范围值 +export function getdatabyselection(range, sheetIndex) { + if(range == null){ + range = Store.luckysheet_select_save[0]; + } + + if (range["row"] == null || range["row"].length == 0) { + return []; + } + + //取数据 + let d, cfg; + if(sheetIndex != null && sheetIndex != Store.currentSheetIndex){ + d = Store.luckysheetfile[getSheetIndex(sheetIndex)]["data"]; + cfg = Store.luckysheetfile[getSheetIndex(sheetIndex)]["config"]; + } + else{ + d = editor.deepCopyFlowData(Store.flowdata); + cfg = Store.config; + } + + let data = []; + + for (let r = range["row"][0]; r <= range["row"][1]; r++) { + if(d[r] == null){ + continue; + } + + if (cfg["rowhidden"] != null && cfg["rowhidden"][r] != null) { + continue; + } + + let row = []; + + for (let c = range["column"][0]; c <= range["column"][1]; c++) { + row.push(d[r][c]); + } + + data.push(row); + } + + return data; +} + +export function getdatabyselectionD(d, range) { + if (range == null || range["row"] == null || range["row"].length == 0) { + return []; + } + + let dynamicArray_compute = dynamicArrayCompute(Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["dynamicArray"]); + let data = []; + + for (let r = range["row"][0]; r <= range["row"][1]; r++) { + if(d[r] == null){ + continue; + } + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + let row = []; + + for (let c = range["column"][0]; c <= range["column"][1]; c++) { + let value; + + if((r + "_" + c) in dynamicArray_compute){ + value = dynamicArray_compute[r + "_" + c]; + } + else{ + value = d[r][c]; + } + + row.push(value); + } + + data.push(row); + } + + return data; +} + +export function getdatabyselectionNoCopy(range) { + if (range == null || range["row"] == null || range["row"].length == 0) { + return []; + } + + let data = []; + + for (let r = range["row"][0]; r <= range["row"][1]; r++) { + let row = []; + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][r] != null) { + continue; + } + + for (let c = range["column"][0]; c <= range["column"][1]; c++) { + let value = ""; + + if (Store.flowdata[r] != null && Store.flowdata[r][c] != null) { + value = Store.flowdata[r][c]; + } + + row.push(value); + } + + data.push(row); + } + + return data; +} + +//得到单元格的值 +export function getcellvalue(r, c, data, type) { + if (type == null) { + type = "v"; + } + + if (data == null) { + data = Store.flowdata; + } + + let d_value; + + if (r != null && c != null) { + d_value = data[r][c]; + } + else if (r != null) { + d_value = data[r]; + } + else if (c != null) { + let newData = data[0].map(function(col, i) { + return data.map(function(row) { + return row[i]; + }) + }); + d_value = newData[c]; + } + else { + return data; + } + + let retv = d_value; + + if(getObjType(d_value) == "object"){ + retv = d_value[type]; + + if (type == "f" && retv != null) { + retv = formula.functionHTMLGenerate(retv); + } + else if(type == "f") { + retv = d_value["v"]; + } + else if(d_value && d_value.ct && d_value.ct.fa == 'yyyy-MM-dd') { + retv = d_value.m + } + } + + if(retv == undefined){ + retv = null; + } + + return retv; +} + +//数据增加行列 +export function datagridgrowth(data, addr, addc, iscallback) { + if (addr <= 0 && addc <= 0) { + return data; + } + + if (addr <= 0) { + addr = 0; + } + + if (addc <= 0) { + addc = 0; + } + + let dataClen = 0; + if (data.length == 0) { + data = []; + dataClen = 0; + } + else { + dataClen = data[0].length; + } + + let coladd = [];//需要额外增加的空列 + for (let c = 0; c < addc; c++) { + coladd.push(null); + } + + let rowadd = [];//完整的一个空行 + for (let r = 0; r < dataClen + addc; r++) { + rowadd.push(null); + } + + for (let r = 0; r < data.length; r++) { + data[r] = [].concat(data[r].concat(coladd)); + } + + for (let r = 0; r < addr; r++) { + data.push([].concat(rowadd)); + } + + if(!!iscallback){ + server.saveParam("all", Store.currentSheetIndex, data.length, { "k": "row" }); + server.saveParam("all", Store.currentSheetIndex, data[0].length, { "k": "column" }); + } + + return data; +} \ No newline at end of file diff --git a/src/global/json.js b/src/global/json.js new file mode 100644 index 000000000..9ea37a442 --- /dev/null +++ b/src/global/json.js @@ -0,0 +1,33 @@ +import { getObjType } from '../utils/util'; + +const json = { + parseJsonParm: function(obj){ + if(obj == null){ + return {}; + } + else if(getObjType(obj) == "string"){ + try { + let json = eval('('+ obj +')'); + return json; + } + catch(e) { + return {}; + } + } + else{ + return obj; + } + }, + hasKey: function(obj){ + let _this = this; + let json = _this.parseJsonParm(obj); + + for(let item in json){ + return true; + } + + return false; + } +} + +export default json; \ No newline at end of file diff --git a/src/global/loading.js b/src/global/loading.js new file mode 100644 index 000000000..8c5255c34 --- /dev/null +++ b/src/global/loading.js @@ -0,0 +1,7 @@ +export function showloading(txt) { + $("#luckysheet-cell-loading").find("span").text(txt).end().show(); +}; + +export function hideloading() { + $("#luckysheet-cell-loading").hide(); +}; \ No newline at end of file diff --git a/src/global/location.js b/src/global/location.js new file mode 100644 index 000000000..81dc56c2a --- /dev/null +++ b/src/global/location.js @@ -0,0 +1,73 @@ +import { luckysheet_searcharray } from '../controllers/sheetSearch'; +import Store from '../store'; + +function rowLocationByIndex(row_index) { + let row = 0, row_pre = 0; + row = Store.visibledatarow[row_index]; + + if (row_index == 0) { + row_pre = 0; + } + else { + row_pre = Store.visibledatarow[row_index - 1]; + } + + return [row_pre, row, row_index]; +} + +function rowLocation(y) { + let row_index = luckysheet_searcharray(Store.visibledatarow, y); + + if (row_index == -1 && y > 0) { + row_index = Store.visibledatarow.length - 1; + } + else if (row_index == -1 && y <= 0) { + row_index = 0; + } + + return rowLocationByIndex(row_index); +} + +function colLocationByIndex(col_index){ + let col = 0, col_pre = 0; + col = Store.visibledatacolumn[col_index]; + + if (col_index == 0) { + col_pre = 0; + } + else { + col_pre = Store.visibledatacolumn[col_index - 1]; + } + + return [col_pre, col, col_index]; +} + +function colLocation(x) { + let col_index = luckysheet_searcharray(Store.visibledatacolumn, x); + + if (col_index == -1 && x > 0) { + col_index = Store.visibledatacolumn.length - 1; + } + else if (col_index == -1 && x <= 0) { + col_index = 0; + } + + return colLocationByIndex(col_index); +} + +function mouseposition(x, y) { + let container_offset = $("#" + Store.container).offset(); + + let newX = x - container_offset.left - Store.rowHeaderWidth, + newY = y - container_offset.top - Store.infobarHeight - Store.toolbarHeight - Store.calculatebarHeight - Store.columeHeaderHeight; + + return [newX, newY]; +} + +export { + rowLocationByIndex, + rowLocation, + colLocationByIndex, + colLocation, + mouseposition, +} \ No newline at end of file diff --git a/src/global/method.js b/src/global/method.js new file mode 100644 index 000000000..7615aeba4 --- /dev/null +++ b/src/global/method.js @@ -0,0 +1,185 @@ +import server from '../controllers/server'; +import { luckysheetlodingHTML, luckyColor } from '../controllers/constant'; +import sheetmanage from '../controllers/sheetmanage'; +import luckysheetFreezen from '../controllers/freezen'; +import { getSheetIndex } from '../methods/get'; +import { luckysheetextendData } from './extend'; +import editor from './editor'; +import luckysheetcreatesheet from './createsheet'; +import Store from '../store'; + +const method = { + //翻页 + addDataAjax: function(param, index, url, func){ + let _this = this; + + if(index == null){ + index = Store.currentSheetIndex; + } + + if(url == null){ + url = server.loadSheetUrl; + } + + $("#luckysheet-grid-window-1").append(luckysheetlodingHTML); + param.currentPage++; + + let dataType = 'application/json;charset=UTF-8'; + let token = sessionStorage.getItem('x-auth-token'); + + $.ajax({ + method: 'POST', + url: url, + headers: { "x-auth-token": token }, + data: JSON.stringify(param), + contentType: dataType, + success: function(d) { + //d可能为json字符串 + if(typeof d == "string"){ + d = JSON.parse(d); + } + + let dataset = d.data; + + // rptapp + let newData = dataset.celldata; + luckysheetextendData(dataset["row"], newData); + + setTimeout(function(){ + $("#luckysheetloadingdata").fadeOut().remove(); + }, 500); + + if(func && typeof(func)=="function"){ + func(dataset); + } + } + }) + }, + //重载 + reload: function(param, index, url, func){ + let _this = this; + + if(index == null){ + index = Store.currentSheetIndex; + } + + if(url == null){ + url = server.loadSheetUrl; + } + + $("#luckysheet-grid-window-1").append(luckysheetlodingHTML); + + let arg = {"gridKey" : server.gridKey, "index": index}; + param = $.extend(true, param, arg); + let file = Store.luckysheetfile[getSheetIndex(index)]; + + $.post(url, param, function (d) { + let dataset = eval("(" + d + ")"); + file.celldata = dataset[index.toString()]; + let data = sheetmanage.buildGridData(file); + + setTimeout(function(){ + $("#luckysheetloadingdata").fadeOut().remove(); + }, 500); + + file["data"] = data; + Store.flowdata = data; + editor.webWorkerFlowDataCache(data);//worker存数据 + + luckysheetcreatesheet(data[0].length, data.length, data, null, false); + file["load"] = "1"; + + Store.luckysheet_select_save = []; + Store.luckysheet_selection_range = []; + + server.saveParam("shs", null, Store.currentSheetIndex); + + sheetmanage.changeSheet(index); + + if(func && typeof(func)=="function"){ + func(); + } + }); + }, + clearSheetByIndex: function(i){ + let index = getSheetIndex(i); + let sheetfile = Store.luckysheetfile[index]; + + if(!sheetfile.isPivotTable){ + sheetfile.data = []; + sheetfile.row = Store.defaultrowNum; + sheetfile.column = Store.defaultcolumnNum; + + sheetfile.chart = []; + sheetfile.config = null; + sheetfile.filter = null; + sheetfile.filter_select = null; + sheetfile.celldata = []; + sheetfile.pivotTable = {}; + sheetfile.calcChain = []; + sheetfile.status = 0; + sheetfile.load = 0; + + Store.flowdata = []; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + + $("#"+ Store.container +" .luckysheet-data-visualization-chart").remove(); + $("#"+ Store.container +" .luckysheet-datavisual-selection-set").remove(); + + $("#luckysheet-row-count-show, #luckysheet-formula-functionrange-select, #luckysheet-row-count-show, #luckysheet-column-count-show, #luckysheet-change-size-line, #luckysheet-cell-selected-focus, #luckysheet-selection-copy, #luckysheet-cell-selected-extend, #luckysheet-cell-selected-move, #luckysheet-cell-selected").hide(); + + delete sheetfile.load; + } + else { + delete Store.luckysheetfile[index]; + } + }, + clear: function(index){ + let _this = this; + + if(index == "all"){ + for(let i = 0; i < Store.luckysheetfile.length; i++){ + let sheetfile = Store.luckysheetfile[i]; + _this.clearSheetByIndex(sheetfile.index); + } + + } + else{ + if(index == null){ + index = Store.currentSheetIndex; + } + _this.clearSheetByIndex(index); + } + + sheetmanage.changeSheet(Store.luckysheetfile[0].index); + }, + destroy:function(){ + $("#" + Store.container).empty(); + $("body > .luckysheet-cols-menu").remove(); + + $("#luckysheet-modal-dialog-mask, #luckysheetTextSizeTest, #luckysheet-icon-morebtn-div").remove(); + $("#luckysheet-input-box").parent().remove(); + $("#luckysheet-formula-help-c").remove(); + + //参数重置 + Store.jfredo = []; + Store.jfundo = []; + + luckysheetFreezen.initialHorizontal = true; + luckysheetFreezen.initialVertical = true; + }, + editorChart:function(c){ + let chart_selection_color = luckyColor[0]; + let chart_id = "luckysheetEditMode-datav-chart"; + let chart_selection_id = chart_id + "_selection"; + c.chart_id = chart_id; + let chartTheme = c.chartTheme; + chartTheme = chartTheme == null ? "default0000" : chartTheme; + + luckysheet.insertChartTosheet(c.sheetIndex, c.dataSheetIndex, c.option, c.chartType, c.selfOption, c.defaultOption, c.row, c.column, chart_selection_color, chart_id, chart_selection_id, c.chartStyle, c.rangeConfigCheck, c.rangeRowCheck, c.rangeColCheck, c.chartMarkConfig, c.chartTitleConfig, c.winWidth, c.winHeight, c.scrollLeft, c.scrollTop, chartTheme, c.myWidth, c.myHeight, c.myLeft!=null?parseFloat(c.myLeft):null, c.myTop!=null?parseFloat(c.myTop):null, c.myindexrank, true); + + $("#"+chart_id).find(".luckysheet-modal-controll-update").click(); + } +} + +export default method; \ No newline at end of file diff --git a/src/global/refresh.js b/src/global/refresh.js new file mode 100644 index 000000000..7a281014e --- /dev/null +++ b/src/global/refresh.js @@ -0,0 +1,953 @@ +import rhchInit from './rhchInit'; +import formula from './formula'; +import editor from './editor'; +import { setcellvalue } from './setdata'; +import { computeRowlenArr } from './getRowlen'; +import { + luckysheetDrawgrid, + luckysheetDrawMain, + luckysheetDrawgridRowTitle, + luckysheetDrawgridColumnTitle +} from './draw'; +import luckysheetFreezen from '../controllers/freezen'; +import server from '../controllers/server'; +import sheetmanage from '../controllers/sheetmanage'; +import luckysheetPostil from '../controllers/postil'; +import { selectHightlightShow, selectionCopyShow } from '../controllers/select'; +import { createFilterOptions } from '../controllers/filter'; +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; + +function jfrefreshgrid(data, range, cfg, cdformat, RowlChange) { + //单元格数据更新联动 + formula.execFunctionExist = []; + for(let s = 0; s < range.length; s++){ + for(let r = range[s].row[0]; r <= range[s].row[1]; r++){ + for(let c = range[s].column[0]; c <= range[s].column[1]; c++){ + formula.execFunctionExist.push({ "r": r, "c": c, "i": Store.currentSheetIndex }); + } + } + } + formula.execFunctionExist.reverse(); + formula.execFunctionGroup(null, null, null, null, data); + formula.execFunctionGroupData = null; + + if (Store.clearjfundo) { + Store.jfundo = []; + + let curConfig; + if(cfg == null){ + curConfig = $.extend(true, {}, Store.config); + } + else{ + curConfig = $.extend(true, {}, cfg); + } + + let curCdformat; + if(cdformat == null){ + curCdformat = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]); + } + else{ + curCdformat = cdformat; + } + + Store.jfredo.push({ + "type": "datachange", + "data": Store.flowdata, + "curdata": data, + "sheetIndex": Store.currentSheetIndex, + "range": range, + "config": $.extend(true, {}, Store.config), + "curConfig": curConfig, + "cdformat": $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]), + "curCdformat": curCdformat, + "RowlChange": RowlChange + }); + } + + //Store.flowdata + Store.flowdata = data; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata; + + //config + if(cfg != null){ + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("all", Store.currentSheetIndex, cfg, { "k": "config" }); + + if(RowlChange != null){ + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); + } + } + + //条件格式 + if(cdformat != null){ + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] = cdformat; + + server.saveParam("all", Store.currentSheetIndex, cdformat, { "k": "luckysheet_conditionformat_save" }); + } + + //更新数据的范围 + for(let s = 0; s < range.length; s++){ + let r1 = range[s].row[0]; + let c1 = range[s].column[0]; + + if(Store.flowdata[r1][c1] != null && Store.flowdata[r1][c1].spl != null){ + window.luckysheetCurrentRow = r1; + window.luckysheetCurrentColumn = c1; + window.luckysheetCurrentFunction = Store.flowdata[r1][c1].f; + + let fp = $.trim(formula.functionParser(Store.flowdata[r1][c1].f)); + let sparklines = eval(fp); + Store.flowdata[r1][c1].spl = sparklines; + } + + if(server.allowUpdate){ //共享编辑模式 + server.historyParam(Store.flowdata, Store.currentSheetIndex, range[s]); + } + } + + //刷新表格 + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + + window.luckysheet_getcelldata_cache = null; +} + +function jfrefreshgridall(colwidth, rowheight, data, cfg, range, ctrlType, ctrlValue, cdformat, changeSize) { + let redo = {}; + + if (ctrlType == "cellRowChange") { + redo["type"] = "cellRowChange"; + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = $.extend(true, {}, cfg); + + redo["range"] = $.extend(true, [], Store.luckysheet_select_save); + redo["currange"] = range; + + redo["ctrlType"] = ctrlType; + redo["ctrlValue"] = ctrlValue; + + let setfield = cfg["rowlen"]; + + if(setfield == null){ + setfield = {}; + } + + server.saveParam("cg", Store.currentSheetIndex, setfield, { "k": "rowlen" }); + } + else if (ctrlType.indexOf("extend")>-1) { + redo["type"] = "extend"; + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = $.extend(true, {}, cfg); + + redo["range"] = $.extend(true, [], Store.luckysheet_select_save); + redo["currange"] = range; + + redo["ctrlType"] = ctrlType; + redo["ctrlValue"] = ctrlValue; + + server.saveParam("arc", Store.currentSheetIndex, {"index": ctrlValue.index, "len": ctrlValue.len, "direction": ctrlValue.direction, "mc": cfg.merge }, { "rc": ctrlValue.type }); + } + else if (ctrlType.indexOf("dele")>-1) { + redo["type"] = "dele"; + redo["config"] = $.extend(true, {}, Store.config); + redo["curconfig"] = $.extend(true, {}, cfg); + + redo["range"] = $.extend(true, [], Store.luckysheet_select_save); + redo["currange"] = range; + + redo["ctrlType"] = ctrlType; + redo["ctrlValue"] = ctrlValue; + + server.saveParam("drc", Store.currentSheetIndex, {"index": ctrlValue.index, "len":ctrlValue.len, "mc": cfg.merge, "borderInfo": cfg.borderInfo }, { "rc": ctrlValue.type}); + } + else { + //单元格数据更新联动 + formula.execFunctionExist = []; + for(let s = 0; s < range.length; s++){ + for(let r = range[s].row[0]; r <= range[s].row[1]; r++){ + for(let c = range[s].column[0]; c <= range[s].column[1]; c++){ + formula.execFunctionExist.push({ "r": r, "c": c, "i": Store.currentSheetIndex }); + } + } + } + formula.execFunctionExist.reverse(); + formula.execFunctionGroup(null, null, null, null, data); + formula.execFunctionGroupData = null; + + redo["type"] = "datachangeAll"; + + redo["range"] = $.extend(true, [], Store.luckysheet_select_save); + redo["currange"] = range; + + redo["ctrlType"] = ctrlType; + redo["ctrlValue"] = ctrlValue; + + for(let s = 0; s < range.length; s++){ + server.historyParam(data, Store.currentSheetIndex, range[s]); + } + } + + if (Store.clearjfundo) { + Store.jfundo = []; + + redo["data"] = Store.flowdata; + redo["curdata"] = data; + redo["sheetIndex"] = Store.currentSheetIndex; + redo["cdformat"] = $.extend(true, [], Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]); + redo["curCdformat"] = cdformat; + + Store.jfredo.push(redo); + } + + //Store.flowdata + Store.flowdata = data; + editor.webWorkerFlowDataCache(data);//worker存数据 + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata; + + //config + if (cfg != null) { + Store.config = cfg; + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; + + server.saveParam("all", Store.currentSheetIndex, cfg, { "k": "config" }); + } + + //条件格式 + if(cdformat != null){ + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] = cdformat; + + server.saveParam("all", Store.currentSheetIndex, cdformat, { "k": "luckysheet_conditionformat_save" }); + } + + //选区 + Store.luckysheet_select_save = $.extend(true, [], range); + if(Store.luckysheet_select_save.length > 0){ + //有选区时,刷新一下选区 + selectHightlightShow(); + } + + //行高、列宽 刷新 + jfrefreshgrid_rhcw(rowheight, colwidth); + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + + sheetmanage.storeSheetParamALL(); + + window.luckysheet_getcelldata_cache = null; +} + +function jfrefreshrange(data, range, cdformat) { + //单元格数据更新联动 + formula.execFunctionExist = []; + for(let s = 0; s < range.length; s++){ + for(let r = range[s].row[0]; r <= range[s].row[1]; r++){ + for(let c = range[s].column[0]; c <= range[s].column[1]; c++){ + formula.execFunctionExist.push({ "r": r, "c": c, "i": Store.currentSheetIndex }); + } + } + } + formula.execFunctionExist.reverse(); + formula.execFunctionGroup(null, null, null, null, data); + formula.execFunctionGroupData = null; + + if (Store.clearjfundo) { + Store.jfundo = []; + + Store.jfredo.push({ + "type": "rangechange", + "data": Store.flowdata, + "curdata": data, + "range": range, + "sheetIndex": Store.currentSheetIndex, + "cdformat": $.extend(true, [], luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"]), + "curCdformat": cdformat + }); + } + + //flowdata + Store.flowdata = data; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata; + + //条件格式 + if(cdformat != null){ + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]["luckysheet_conditionformat_save"] = cdformat; + } + + //刷新表格 + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + + //发送给后台 + for(let s = 0; s < range.length; s++){ + server.historyParam(Store.flowdata, Store.currentSheetIndex, range[s]); + } +} + +//删除、增加行列 刷新表格 +function jfrefreshgrid_adRC(data, cfg, ctrlType, ctrlValue, calc, filterObj, cf, af, freezen){ + let file = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)]; + + //merge改变对应的单元格值改变 + let mcData = []; + for(let m in cfg["merge"]){ + let mc = cfg["merge"][m]; + + for(let r = mc.r; r <= mc.r + mc.rs - 1; r++){ + for(let c = mc.c; c <= mc.c + mc.cs - 1; c++){ + if(data[r][c] == null){ + data[r][c] = {}; + } + + if(r == mc.r && c == mc.c){ + data[r][c].mc = mc; + } + else{ + data[r][c].mc = { "r": mc.r, "c": mc.c }; + } + + mcData.push({ "r": r, "c": c }); + } + } + } + + //公式链中公式范围改变对应单元格值的改变 + let funcData = []; + if(calc.length > 0){ + formula.execFunctionGroupData = data; + + for(let i = 0; i < calc.length; i++){ + let clc = calc[i]; + let clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = clc.func[2]; + let clc_result = formula.execfunction(clc_funcStr, clc_r, clc_c, null, true); + clc.func = clc_result; + + if(data[clc_r][clc_c].f == clc_funcStr){ + setcellvalue(clc_r, clc_c, data, clc_result[1]); + funcData.push({ "r": clc_r, "c": clc_c }); + } + } + } + + if(Store.clearjfundo){ + Store.jfundo = []; + + Store.jfredo.push({ + "type": ctrlType, + "sheetIndex": Store.currentSheetIndex, + "data": Store.flowdata, + "curData": data, + "config": $.extend(true, {}, Store.config), + "curConfig": cfg, + "ctrlValue": ctrlValue, + "mcData": mcData, + "calc": $.extend(true, [], file.calcChain), + "curCalc": calc, + "funcData": funcData, + "filterObj": { "filter_select": $.extend(true, {}, file.filter_select), "filter": $.extend(true, {}, file.filter) }, + "curFilterObj": filterObj, + "cf": $.extend(true, [], file.luckysheet_conditionformat_save), + "curCf": cf, + "af": $.extend(true, [], file.luckysheet_alternateformat_save), + "curAf": af, + "freezen": { "freezenhorizontaldata": luckysheetFreezen.freezenhorizontaldata, "freezenverticaldata": luckysheetFreezen.freezenverticaldata }, + "curFreezen": freezen + }); + } + + let index = ctrlValue.index, + len = ctrlValue.len, + rc = ctrlValue.rc; + + if(ctrlType == "addRC"){ + let direction = ctrlValue.direction, + restore = ctrlValue.restore; + + let addData = []; + if(restore){ + if(rc == "r"){ + let st_r; + if(direction == "lefttop"){ + st_r = index; + } + else if(direction == "rightbottom"){ + st_r = index + 1; + } + let ed_r = st_r + len - 1; + + for(let r = st_r; r <= ed_r; r++){ + let row = []; + for(let c = 0; c < data[0].length; c++){ + let cell = data[r][c]; + row.push(cell); + } + addData.push(row); + } + } + else if(rc == "c"){ + let st_c; + if(direction == "lefttop"){ + st_c = index; + } + else if(direction == "rightbottom"){ + st_c = index + 1; + } + let ed_c = st_c + len - 1; + + for(let r = 0; r < data.length; r++){ + let row = []; + for(let c = st_c; c <= ed_c; c++){ + let cell = data[r][c]; + row.push(cell); + } + addData.push(row); + } + } + } + + server.saveParam("arc", Store.currentSheetIndex, {"index": index, "len": len, "direction": direction, "data": addData }, { "rc": rc }); + } + else if(ctrlType == "delRC"){ + server.saveParam("drc", Store.currentSheetIndex, {"index": index, "len": len }, { "rc": rc }); + } + + //Store.flowdata + Store.flowdata = data; + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + file.data = data; + + //config + Store.config = cfg; + file.config = Store.config; + server.saveParam("all", Store.currentSheetIndex, cfg, { "k": "config" }); + + //mcData + for(let i = 0; i < mcData.length; i++){ + let mcData_r = mcData[i].r, + mcData_c = mcData[i].c; + + server.saveParam("v", Store.currentSheetIndex, Store.flowdata[mcData_r][mcData_c], { "r": mcData_r, "c": mcData_c }); + } + + //calc函数链 + file.calcChain = calc; + server.saveParam("all", Store.currentSheetIndex, calc, { "k": "calcChain" }); + for(let i = 0; i < funcData.length; i++){ + let funcData_r = funcData[i].r, + funcData_c = funcData[i].c; + + server.saveParam("v", Store.currentSheetIndex, Store.flowdata[funcData_r][funcData_c], { "r": funcData_r, "c": funcData_c }); + } + + //筛选配置 + if(filterObj != null){ + file.filter_select = filterObj.filter_select; + file.filter = filterObj.filter; + } + else{ + file.filter_select = null; + file.filter = null; + } + createFilterOptions(file.filter_select, file.filter); + server.saveParam("all", Store.currentSheetIndex, file.filter_select, { "k": "filter_select" }); + server.saveParam("all", Store.currentSheetIndex, file.filter, { "k": "filter" }); + + //条件格式配置 + file.luckysheet_conditionformat_save = cf; + server.saveParam("all", Store.currentSheetIndex, file.luckysheet_conditionformat_save, { "k": "luckysheet_conditionformat_save" }); + + //交替颜色配置 + file.luckysheet_alternateformat_save = af; + server.saveParam("all", Store.currentSheetIndex, file.luckysheet_alternateformat_save, { "k": "luckysheet_alternateformat_save" }); + + //冻结配置 + if(freezen != null){ + luckysheetFreezen.freezenhorizontaldata = freezen.freezenhorizontaldata; + luckysheetFreezen.freezenverticaldata = freezen.freezenverticaldata; + } + else{ + luckysheetFreezen.freezenhorizontaldata = null; + luckysheetFreezen.freezenverticaldata = null; + } + + //行高、列宽刷新 + jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); +} + +//复制剪切 刷新表格 +function jfrefreshgrid_pastcut(source, target, RowlChange){ + //单元格数据更新联动 + let execF_rc = {}; + formula.execFunctionExist = []; + + for(let r = source["range"].row[0]; r <= source["range"].row[1]; r++){ + for(let c = source["range"].column[0]; c <= source["range"].column[1]; c++){ + if((r + "_" + c + "_" + source["sheetIndex"]) in execF_rc){ + continue; + } + + execF_rc[r + "_" + c + "_" + source["sheetIndex"]] = 0; + formula.execFunctionExist.push({ "r": r, "c": c, "i": source["sheetIndex"] }); + } + } + + for(let r = target["range"].row[0]; r <= target["range"].row[1]; r++){ + for(let c = target["range"].column[0]; c <= target["range"].column[1]; c++){ + if((r + "_" + c + "_" + target["sheetIndex"]) in execF_rc){ + continue; + } + + execF_rc[r + "_" + c + "_" + target["sheetIndex"]] = 0; + formula.execFunctionExist.push({ "r": r, "c": c, "i": target["sheetIndex"] }); + } + } + + formula.execFunctionExist.reverse(); + formula.execFunctionGroup(null, null, null, null, target["curData"]); + formula.execFunctionGroupData = null; + + if(Store.clearjfundo){ + Store.jfundo = []; + + Store.jfredo.push({ + "type": "pasteCut", + "source": source, + "target": target, + "RowlChange": RowlChange + }) + } + + //config + let rowHeight; + if(Store.currentSheetIndex == source["sheetIndex"]){ + Store.config = source["curConfig"]; + rowHeight = source["curData"].length; + Store.luckysheetfile[getSheetIndex(target["sheetIndex"])]["config"] = target["curConfig"]; + } + else if(Store.currentSheetIndex == target["sheetIndex"]){ + Store.config = target["curConfig"]; + rowHeight = target["curData"].length; + Store.luckysheetfile[getSheetIndex(source["sheetIndex"])]["config"] = source["curConfig"]; + } + + if(RowlChange){ + Store.visibledatarow = []; + Store.rh_height = 0; + + for (let i = 0; i < rowHeight; i++) { + let rowlen = Store.defaultrowlen; + + if (Store.config["rowlen"] != null && Store.config["rowlen"][i] != null) { + rowlen = Store.config["rowlen"][i]; + } + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][i] != null) { + rowlen = Store.config["rowhidden"][i]; + Store.visibledatarow.push(Store.rh_height); + continue; + } + else { + Store.rh_height += rowlen + 1; + } + + Store.visibledatarow.push(Store.rh_height);//行的临时长度分布 + } + Store.rh_height += 110; + sheetmanage.showSheet(); + + if(Store.currentSheetIndex == source["sheetIndex"]){ + let rowlenArr = computeRowlenArr(target["curData"].length, target["curConfig"]); + Store.luckysheetfile[getSheetIndex(target["sheetIndex"])]["visibledatarow"] = rowlenArr; + } + else if(Store.currentSheetIndex == target["sheetIndex"]){ + let rowlenArr = computeRowlenArr(source["curData"].length, source["curConfig"]); + Store.luckysheetfile[getSheetIndex(source["sheetIndex"])]["visibledatarow"] = rowlenArr; + } + } + + //Store.flowdata + if(Store.currentSheetIndex == source["sheetIndex"]){ + Store.flowdata = source["curData"]; + Store.luckysheetfile[getSheetIndex(target["sheetIndex"])]["data"] = target["curData"]; + } + else if(Store.currentSheetIndex == target["sheetIndex"]){ + Store.flowdata = target["curData"]; + Store.luckysheetfile[getSheetIndex(source["sheetIndex"])]["data"] = source["curData"]; + } + editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据 + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata; + + //luckysheet_select_save + if(Store.currentSheetIndex == target["sheetIndex"]){ + Store.luckysheet_select_save = [{"row": target["range"].row, "column": target["range"].column}]; + } + else{ + Store.luckysheet_select_save = [{"row": source["range"].row, "column": source["range"].column}]; + } + if(Store.luckysheet_select_save.length > 0){ + //有选区时,刷新一下选区 + selectHightlightShow(); + } + + //条件格式 + Store.luckysheetfile[getSheetIndex(source["sheetIndex"])].luckysheet_conditionformat_save = source["curCdformat"]; + Store.luckysheetfile[getSheetIndex(target["sheetIndex"])].luckysheet_conditionformat_save = target["curCdformat"]; + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); + + sheetmanage.storeSheetParamALL(); + + //saveparam + //来源表 + server.saveParam("all", source["sheetIndex"], source["curConfig"], { "k": "config" }); + //目的表 + server.saveParam("all", target["sheetIndex"], target["curConfig"], { "k": "config" }); + + //来源表 + server.historyParam(source["curData"], source["sheetIndex"], {"row": source["range"]["row"], "column": source["range"]["column"]}); + //目的表 + server.historyParam(target["curData"], target["sheetIndex"], {"row": target["range"]["row"], "column": target["range"]["column"]}); +} + +//行高、列宽改变 刷新表格 +function jfrefreshgrid_rhcw(rowheight, colwidth){ + rhchInit(rowheight, colwidth); + + sheetmanage.storeSheetParam(); + + //行高列宽改变时 重新计算sparklines + let calcChain = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].calcChain; + + if(calcChain != null && calcChain.length > 0){ + if(Store.config["rowlen"] == null){ + Store.config["rowlen"] = {}; + } + + if(Store.config["columlen"] == null){ + Store.config["columlen"] = {}; + } + + for(let i = 0; i < calcChain.length; i++){ + let r = calcChain[i].r, c = calcChain[i].c, index = calcChain[i].index; + + if(index == Store.currentSheetIndex && Store.flowdata[r][c] != null && Store.flowdata[r][c].spl != null && ((r in Store.config["rowlen"]) || (c in Store.config["columlen"]))){ + window.luckysheetCurrentRow = r; + window.luckysheetCurrentColumn = c; + window.luckysheetCurrentFunction = Store.flowdata[r][c].f; + + let fp = $.trim(formula.functionParser(Store.flowdata[r][c].f)); + let sparklines = eval(fp); + Store.flowdata[r][c].spl = sparklines; + + server.saveParam("v", Store.currentSheetIndex, Store.flowdata[r][c], { "r": r, "c": c }); + } + } + + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata; + } + + //批注框同步 + luckysheetPostil.positionSync(); + + //选区同步 + selectHightlightShow(); + + //改变单元格行高,复制虚线框同步 + if($(".luckysheet-selection-copy").is(":visible")){ + selectionCopyShow(); + } + + //改变单元格行高,选区下拉icon隐藏 + if($("#luckysheet-dropCell-icon").is(":visible")){ + $("#luckysheet-dropCell-icon").remove(); + } + + //有冻结状态时,同步行高、列宽 + if(luckysheetFreezen.freezenhorizontaldata != null && luckysheetFreezen.freezenverticaldata != null){ + let row_st = luckysheetFreezen.freezenhorizontaldata[1] - 1; + let col_st = luckysheetFreezen.freezenverticaldata[1] - 1; + + let scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + let scrollLeft = luckysheetFreezen.freezenverticaldata[2]; + + let top = Store.visibledatarow[row_st] - 2 - scrollTop + Store.columeHeaderHeight; + let freezenhorizontaldata = [ + Store.visibledatarow[row_st], + row_st + 1, + scrollTop, + luckysheetFreezen.cutVolumn(Store.visibledatarow, row_st + 1), + top + ]; + let left = Store.visibledatacolumn[col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + let freezenverticaldata = [ + Store.visibledatacolumn[col_st], + col_st + 1, + scrollLeft, + luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_st + 1), + left + ]; + + luckysheetFreezen.saveFreezen(freezenhorizontaldata, top, freezenverticaldata, left); + luckysheetFreezen.createFreezenHorizontal(freezenhorizontaldata, top); + luckysheetFreezen.createFreezenVertical(freezenverticaldata, left); + luckysheetFreezen.createAssistCanvas(); + } + else if(luckysheetFreezen.freezenhorizontaldata != null){ + let row_st = luckysheetFreezen.freezenhorizontaldata[1] - 1; + let scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + + let top = Store.visibledatarow[row_st] - 2 - scrollTop + Store.columeHeaderHeight; + let freezenhorizontaldata = [ + Store.visibledatarow[row_st], + row_st + 1, + scrollTop, + luckysheetFreezen.cutVolumn(Store.visibledatarow, row_st + 1), + top + ]; + + luckysheetFreezen.saveFreezen(freezenhorizontaldata, top, null, null); + luckysheetFreezen.createFreezenHorizontal(freezenhorizontaldata, top); + luckysheetFreezen.createAssistCanvas(); + } + else if(luckysheetFreezen.freezenverticaldata != null){ + let col_st = luckysheetFreezen.freezenverticaldata[1] - 1; + let scrollLeft = luckysheetFreezen.freezenverticaldata[2]; + + let left = Store.visibledatacolumn[col_st] - 2 - scrollLeft + Store.rowHeaderWidth; + let freezenverticaldata = [ + Store.visibledatacolumn[col_st], + col_st + 1, + scrollLeft, + luckysheetFreezen.cutVolumn(Store.visibledatacolumn, col_st + 1), + left + ]; + + luckysheetFreezen.saveFreezen(null, null, freezenverticaldata, left); + luckysheetFreezen.createFreezenVertical(freezenverticaldata, left); + luckysheetFreezen.createAssistCanvas(); + } + else{ + //有筛选标志时,同步筛选按钮和筛选范围位置 + if($("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").length > 0){ + $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").each(function(i, e){ + let str = $(e).data("str"), cindex = $(e).data("cindex"); + + let left = Store.visibledatacolumn[cindex] - 20; + let top = str - 1 == -1 ? 0 : Store.visibledatarow[str - 1]; + + $(e).css({ "left": left, "top": top }); + }); + } + } + + if($("#luckysheet-filter-selected-sheet" + Store.currentSheetIndex).length > 0){ + let luckysheet_filter_save = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].filter_select; + + let r1 = luckysheet_filter_save.row[0], + r2 = luckysheet_filter_save.row[1]; + let c1 = luckysheet_filter_save.column[0], + c2 = luckysheet_filter_save.column[1]; + + let row = Store.visibledatarow[r2], + row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1]; + let col = Store.visibledatacolumn[c2], + col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1]; + + $("#luckysheet-filter-selected-sheet" + Store.currentSheetIndex).css({ + "left": col_pre, + "width": col - col_pre - 1, + "top": row_pre, + "height": row - row_pre - 1 + }); + } + + sheetmanage.showSheet(); + + setTimeout(function () { + luckysheetrefreshgrid(); + }, 1); +} + +//按照scrollHeight, scrollWidth刷新canvas展示数据 +function luckysheetrefreshgrid(scrollWidth, scrollHeight) { + formula.groupValuesRefresh(); + + if (scrollWidth == null) { + scrollWidth = $("#luckysheet-cell-main").scrollLeft(); + } + if (scrollHeight == null) { + scrollHeight = $("#luckysheet-cell-main").scrollTop(); + } + + if (luckysheetFreezen.freezenverticaldata != null || luckysheetFreezen.freezenhorizontaldata != null) { + let freezen_horizon_px, freezen_horizon_ed, freezen_horizon_scrollTop; + let freezen_vertical_px, freezen_vertical_ed, freezen_vertical_scrollTop; + let drawWidth = Store.luckysheetTableContentHW[0], drawHeight = Store.luckysheetTableContentHW[1]; + + if (luckysheetFreezen.freezenverticaldata != null && luckysheetFreezen.freezenhorizontaldata != null) { + freezen_horizon_px = luckysheetFreezen.freezenhorizontaldata[0]; + freezen_horizon_ed = luckysheetFreezen.freezenhorizontaldata[1]; + freezen_horizon_scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + + freezen_vertical_px = luckysheetFreezen.freezenverticaldata[0]; + freezen_vertical_ed = luckysheetFreezen.freezenverticaldata[1]; + freezen_vertical_scrollTop = luckysheetFreezen.freezenverticaldata[2]; + + //左上canvas freezen_3 + luckysheetDrawMain( + freezen_vertical_scrollTop, + freezen_horizon_scrollTop, + freezen_vertical_px, + freezen_horizon_px, + 1, + 1, + null, + null, + "freezen_3" + ); + + //上右canvas freezen_4 + luckysheetDrawMain( + scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, + freezen_horizon_scrollTop, + drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, + freezen_horizon_px, + 1, + 1, + null, + null, + "freezen_4" + ); + + //左下canvas freezen_7 + luckysheetDrawMain( + freezen_vertical_scrollTop, + scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, + freezen_vertical_px, + drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, + 1, + 1, + null, + null, + "freezen_7" + ); + + //右下canvas luckysheetTableContent + luckysheetDrawMain( + scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, + scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, + drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, + drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, + freezen_vertical_px - freezen_vertical_scrollTop + Store.rowHeaderWidth, + freezen_horizon_px - freezen_horizon_scrollTop + Store.columeHeaderHeight + ); + + //标题 + luckysheetDrawgridColumnTitle( + scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, + drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, + freezen_vertical_px - freezen_vertical_scrollTop + Store.rowHeaderWidth + ); + luckysheetDrawgridColumnTitle(freezen_vertical_scrollTop, freezen_vertical_px, Store.rowHeaderWidth); + + luckysheetDrawgridRowTitle( + scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, + drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, + freezen_horizon_px - freezen_horizon_scrollTop + Store.columeHeaderHeight + ); + luckysheetDrawgridRowTitle(freezen_horizon_scrollTop, freezen_horizon_px, Store.columeHeaderHeight); + } + else if (luckysheetFreezen.freezenhorizontaldata != null) { + freezen_horizon_px = luckysheetFreezen.freezenhorizontaldata[0]; + freezen_horizon_ed = luckysheetFreezen.freezenhorizontaldata[1]; + freezen_horizon_scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + + luckysheetDrawMain( + scrollWidth, + freezen_horizon_scrollTop, + drawWidth, + freezen_horizon_px, + 1, + 1, + null, + null, + "freezen_h" + ); + luckysheetDrawMain( + scrollWidth, + scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, + drawWidth, + drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, + null, + freezen_horizon_px - freezen_horizon_scrollTop + Store.columeHeaderHeight + ); + + luckysheetDrawgridColumnTitle(scrollWidth, drawWidth, null); + + luckysheetDrawgridRowTitle( + scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, + drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, + freezen_horizon_px - freezen_horizon_scrollTop + Store.columeHeaderHeight + ); + luckysheetDrawgridRowTitle(freezen_horizon_scrollTop, freezen_horizon_px, Store.columeHeaderHeight); + } + else if (luckysheetFreezen.freezenverticaldata != null) { + freezen_vertical_px = luckysheetFreezen.freezenverticaldata[0]; + freezen_vertical_ed = luckysheetFreezen.freezenverticaldata[1]; + freezen_vertical_scrollTop = luckysheetFreezen.freezenverticaldata[2]; + + luckysheetDrawMain( + freezen_vertical_scrollTop, + scrollHeight, + freezen_vertical_px, + drawHeight, + 1, + 1, + null, + null, + "freezen_v" + ); + luckysheetDrawMain( + scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, + scrollHeight, + drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, + drawHeight, + freezen_vertical_px - freezen_vertical_scrollTop + Store.rowHeaderWidth, + null + ); + + luckysheetDrawgridRowTitle(scrollHeight, drawHeight, null); + + luckysheetDrawgridColumnTitle( + scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, + drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, + freezen_vertical_px - freezen_vertical_scrollTop + Store.rowHeaderWidth + ); + luckysheetDrawgridColumnTitle(freezen_vertical_scrollTop, freezen_vertical_px, Store.rowHeaderWidth); + } + } + else { + luckysheetDrawgrid(scrollWidth, scrollHeight); + } +} + +export { + jfrefreshgrid, + jfrefreshgridall, + jfrefreshrange, + jfrefreshgrid_adRC, + jfrefreshgrid_pastcut, + jfrefreshgrid_rhcw, + luckysheetrefreshgrid, +} \ No newline at end of file diff --git a/src/global/rhchInit.js b/src/global/rhchInit.js new file mode 100644 index 000000000..d90562848 --- /dev/null +++ b/src/global/rhchInit.js @@ -0,0 +1,75 @@ +import Store from '../store'; + +export default function rhchInit(rowheight, colwidth) { + //行高 + if(rowheight != null){ + Store.visibledatarow = []; + Store.rh_height = 0; + + for (let i = 0; i < rowheight; i++) { + let rowlen = Store.defaultrowlen; + + if (Store.config["rowlen"] != null && Store.config["rowlen"][i] != null) { + rowlen = Store.config["rowlen"][i]; + } + + if (Store.config["rowhidden"] != null && Store.config["rowhidden"][i] != null) { + rowlen = Store.config["rowhidden"][i]; + Store.visibledatarow.push(Store.rh_height); + continue; + } + else { + Store.rh_height += rowlen + 1; + } + + Store.visibledatarow.push(Store.rh_height); //行的临时长度分布 + } + + Store.rh_height += 110; //最底部增加空白 + } + + //列宽 + if(colwidth != null){ + Store.visibledatacolumn = []; + Store.ch_width = 0; + + let maxColumlen = 120; + + for (let i = 0; i < colwidth; i++) { + let firstcolumlen = Store.defaultcollen; + + if (Store.config["columlen"] != null && Store.config["columlen"][i] != null) { + firstcolumlen = Store.config["columlen"][i]; + } + else { + if (Store.flowdata[0] != null && Store.flowdata[0][i] != null) { + if (firstcolumlen > 300) { + firstcolumlen = 300; + } + else if (firstcolumlen < Store.defaultcollen) { + firstcolumlen = Store.defaultcollen; + } + + if (firstcolumlen != Store.defaultcollen) { + if (Store.config["columlen"] == null) { + Store.config["columlen"] = {}; + } + + Store.config["columlen"][i] = firstcolumlen; + } + } + } + + Store.ch_width += firstcolumlen + 1; + + Store.visibledatacolumn.push(Store.ch_width);//列的临时长度分布 + + if(maxColumlen < firstcolumlen + 1){ + maxColumlen = firstcolumlen + 1; + } + } + + // Store.ch_width += 120; + Store.ch_width += maxColumlen; + } +} \ No newline at end of file diff --git a/src/global/scroll.js b/src/global/scroll.js new file mode 100644 index 000000000..1b582e8d6 --- /dev/null +++ b/src/global/scroll.js @@ -0,0 +1,86 @@ +import luckysheetFreezen from '../controllers/freezen'; +import { luckysheet_searcharray } from '../controllers/sheetSearch'; +import { luckysheetrefreshgrid } from '../global/refresh'; +import Store from '../store'; + +//全局滚动事件 +export default function luckysheetscrollevent(isadjust) { + let $t = $("#luckysheet-cell-main"); + let scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(), + scrollTop = $("#luckysheet-scrollbar-y").scrollTop(); + + // if (!!isadjust) { + // let scrollHeight = $t.get(0).scrollHeight; + // let windowHeight = $t.height(); + // let scrollWidth = $t.get(0).scrollWidth; + // let windowWidth = $t.width(); + + // let maxScrollLeft = scrollWidth - windowWidth; + // let maxScrollTop = scrollHeight - windowHeight; + + // let visibledatacolumn_c = Store.visibledatacolumn, visibledatarow_c = Store.visibledatarow; + + // if (luckysheetFreezen.freezenhorizontaldata != null) { + // visibledatarow_c = luckysheetFreezen.freezenhorizontaldata[3]; + // } + + // if (luckysheetFreezen.freezenverticaldata != null) { + // visibledatacolumn_c = luckysheetFreezen.freezenverticaldata[3]; + // } + + // let col_ed = luckysheet_searcharray(visibledatacolumn_c, scrollLeft); + // let row_ed = luckysheet_searcharray(visibledatarow_c, scrollTop); + + // let refreshLeft = scrollLeft , refreshTop = scrollTop; + + // if (col_ed <= 0) { + // scrollLeft = 0; + // } + // else { + // scrollLeft = visibledatacolumn_c[col_ed - 1]; + // } + + // if (row_ed <= 0) { + // scrollTop = 0; + // } + // else { + // scrollTop = visibledatarow_c[row_ed - 1]; + // } + // } + + if (luckysheetFreezen.freezenhorizontaldata != null) { + if (scrollTop < luckysheetFreezen.freezenhorizontaldata[2]) { + scrollTop = luckysheetFreezen.freezenhorizontaldata[2]; + $("#luckysheet-scrollbar-y").scrollTop(scrollTop); + return; + } + } + + if (luckysheetFreezen.freezenverticaldata != null) { + if (scrollLeft < luckysheetFreezen.freezenverticaldata[2]) { + scrollLeft = luckysheetFreezen.freezenverticaldata[2]; + $("#luckysheet-scrollbar-x").scrollLeft(scrollLeft); + return; + } + } + + $("#luckysheet-cols-h-c").scrollLeft(scrollLeft);//列标题 + $("#luckysheet-rows-h").scrollTop(scrollTop);//行标题 + + $t.scrollLeft(scrollLeft).scrollTop(scrollTop); + + $("#luckysheet-input-box-index").css({ + "left": $("#luckysheet-input-box").css("left"), + "top": (parseInt($("#luckysheet-input-box").css("top")) - 20) + "px", + "z-index": $("#luckysheet-input-box").css("z-index") + }).show(); + + luckysheetrefreshgrid(scrollLeft, scrollTop); + + $("#luckysheet-bottom-controll-row").css("left", scrollLeft + 10); + + //有选区且有冻结时,滚动适应 + if(luckysheetFreezen.freezenhorizontaldata != null || luckysheetFreezen.freezenverticaldata != null){ + luckysheetFreezen.scrollAdapt(); + } +} \ No newline at end of file diff --git a/src/global/setdata.js b/src/global/setdata.js new file mode 100644 index 000000000..315550ebe --- /dev/null +++ b/src/global/setdata.js @@ -0,0 +1,216 @@ +import { getObjType } from '../utils/util'; +import { isRealNull, isRealNum, valueIsError } from './validate'; +import { genarate, update } from './format'; +import server from '../controllers/server'; +import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting'; + +//设置单元格的值 +function setcellvalue(r, c, d, v) { + let cell = d[r][c]; + + let vupdate; + + if(getObjType(v) == "object"){ + cell = v; + + if(v.f != null){ + cell.f = v.f; + } + + if(v.spl != null){ + cell.spl = v.spl; + } + + if(getObjType(v.v) == "object"){ + vupdate = v.v.v; + } + else{ + vupdate = v.v; + } + } + else{ + vupdate = v; + } + + if(isRealNull(vupdate)){ + if(getObjType(cell) == "object"){ + delete cell.m; + delete cell.v; + } + else{ + cell = null; + } + + d[r][c] = cell; + + return; + } + + if(isRealNull(cell)){ + cell = {}; + } + + if(vupdate.toString().substr(0, 1) == "'"){ + cell.m = vupdate.toString().substr(1); + cell.ct = { "fa": "@", "t": "s" }; + cell.v = vupdate.toString().substr(1); + } + else if(vupdate.toString().toUpperCase() === "TRUE"){ + cell.m = "TRUE"; + cell.ct = { "fa": "General", "t": "b" }; + cell.v = true; + } + else if(vupdate.toString().toUpperCase() === "FALSE"){ + cell.m = "FALSE"; + cell.ct = { "fa": "General", "t": "b" }; + cell.v = false; + } + else if(valueIsError(vupdate)){ + cell.m = vupdate.toString(); + cell.ct = { "fa": "General", "t": "e" }; + cell.v = vupdate; + } + else{ + if(cell.f != null && isRealNum(vupdate) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(vupdate)){ + cell.v = parseFloat(vupdate); + cell.ct = { "fa": "General", "t": "n" }; + + if(cell.v == Infinity || cell.v == -Infinity){ + cell.m = cell.v.toString(); + } + else{ + if(cell.v.toString().indexOf("e") > -1){ + let len = cell.v.toString().split(".")[1].split("e")[0].length; + if(len > 5){ + len = 5; + } + + cell.m = cell.v.toExponential(len).toString(); + } + else{ + let mask = genarate(Math.round(cell.v * 1000000000) / 1000000000); + + cell.m = mask[0].toString(); + } + } + } + else if(cell.ct != null && cell.ct.fa == "@"){ + cell.m = vupdate.toString(); + cell.v = vupdate; + } + else if(cell.ct != null && cell.ct.fa != null && cell.ct.fa != "General"){ + if(isRealNum(vupdate)){ + vupdate = parseFloat(vupdate); + } + + let mask = update(cell.ct.fa, vupdate); + + if(mask === vupdate){ //若原来单元格格式 应用不了 要更新的值,则获取更新值的 格式 + mask = genarate(vupdate); + + cell.m = mask[0].toString(); + cell.ct = mask[1]; + cell.v = mask[2]; + } + else{ + cell.m = mask.toString(); + cell.v = vupdate; + } + } + else{ + if(isRealNum(vupdate) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(vupdate)){ + vupdate = parseFloat(vupdate); + + cell.v = parseFloat(vupdate); + cell.ct = { "fa": "General", "t": "n" }; + + if(cell.v == Infinity || cell.v == -Infinity){ + cell.m = cell.v.toString(); + } + else{ + let mask = genarate(cell.v); + + cell.m = mask[0].toString(); + } + } + else{ + let mask = genarate(vupdate); + + cell.m = mask[0].toString(); + cell.ct = mask[1]; + cell.v = mask[2]; + } + } + } + + if(!server.allowUpdate && !luckysheetConfigsetting.pointEdit){ + if(cell.ct != null && /^(w|W)((0?)|(0\.0+))$/.test(cell.ct.fa) == false && cell.ct.t == "n" && cell.v != null && parseInt(cell.v).toString().length > 4){ + let autoFormatw = luckysheetConfigsetting.autoFormatw.toString().toUpperCase(); + let accuracy = luckysheetConfigsetting.accuracy; + + let sfmt = setAccuracy(autoFormatw, accuracy); + + if(sfmt != "General") { + cell.ct.fa = sfmt; + cell.m = update(sfmt, cell.v); + } + } + } + + d[r][c] = cell; +} + +//new runze 根据亿万格式autoFormatw和精确度accuracy 转换成 w/w0/w0.00 or 0/0.0格式 +function setAccuracy(autoFormatw, accuracy) { + let acc = "0."; + let fmt; + + if(autoFormatw == "TRUE"){ + if(accuracy == undefined){ + return "w"; + } + else{ + let alength = parseInt(accuracy); + + if(alength == 0){ + return "w0"; + } + else{ + acc = "w0."; + + for(let i = 0; i < alength; i++){ + acc += "0"; + } + + fmt = acc; + } + } + } + else{ + if(accuracy == undefined){ + return "General"; + } + else{ + let alength = parseInt(accuracy); + + if(alength == 0){ + return "0"; + } + else{ + for(let i = 0; i < alength; i++){ + acc += "0"; + } + + fmt = acc; + } + + } + } + + return fmt.toString(); +} + +export { + setcellvalue, + setAccuracy, +} \ No newline at end of file diff --git a/src/global/sort.js b/src/global/sort.js new file mode 100644 index 000000000..03834689a --- /dev/null +++ b/src/global/sort.js @@ -0,0 +1,371 @@ +import { getObjType } from '../utils/util'; +import { isRealNull, isRealNum, isEditMode } from './validate'; +import { isdatetime, diff } from './datecontroll'; +import tooltip from './tooltip'; +import editor from './editor'; +import { rowlenByRange } from './getRowlen'; +import { jfrefreshgrid } from './refresh'; +import Store from '../store'; + +//数据排序方法 +function orderbydata(data, index, isAsc) { + if (isAsc == null) { + isAsc = true; + } + + let a = function (x, y) { + let x1 = x[index] , y1 = y[index]; + + if(getObjType(x[index]) == "object"){ + x1 = x[index].v; + } + + if(getObjType(y[index]) == "object"){ + y1 = y[index].v; + } + + if(isRealNull(x1)){ + return 1; + } + + if(isRealNull(y1)){ + return -1; + } + + if (isdatetime(x1) && isdatetime(y1)) { + return diff(x1, y1); + } + else if (isRealNum(x1) && isRealNum(y1)) { + return numeral(x1).value() - numeral(y1).value(); + } + else if (!isRealNum(x1) && !isRealNum(y1)) { + return x1.localeCompare(y1, "zh"); + } + else if (!isRealNum(x1)) { + return 1; + } + else if (!isRealNum(y1)) { + return -1; + } + } + + let d = function (x, y) { + let x1 = x[index] , y1 = y[index]; + + if(getObjType(x[index]) == "object"){ + x1 = x[index].v; + } + + if(getObjType(y[index]) == "object"){ + y1 = y[index].v; + } + + if(isRealNull(x1)){ + return 1; + } + + if(isRealNull(y1)){ + return -1; + } + + if (isdatetime(x1) && isdatetime(y1)) { + return diff(y1, x1); + } + else if (isRealNum(x1) && isRealNum(y1)) { + return numeral(y1).value() - numeral(x1).value(); + } + else if (!isRealNum(x1) && !isRealNum(y1)) { + return y1.localeCompare(x1, "zh"); + } + else if (!isRealNum(x1)) { + return -1; + } + else if (!isRealNum(y1)) { + return 1; + } + } + + if (isAsc) { + return data.sort(a); + } + else { + return data.sort(d); + } +} + +function orderbydata1D(data, isAsc) { + if (isAsc == null) { + isAsc = true; + } + + let a = function (x, y) { + let x1 = x, y1 = y; + + if(getObjType(x) == "object"){ + x1 = x.v; + } + + if(getObjType(y) == "object"){ + y1 = y.v; + } + + if(x1 == null){ + x1 = ""; + } + + if(y1 == null){ + y1 = ""; + } + + if (isdatetime(x1) && isdatetime(y1)) { + return diff(x1, y1); + } + else if (isRealNum(x1) && isRealNum(y1)) { + return numeral(x1).value() - numeral(y1).value(); + } + else if (!isRealNum(x1) && !isRealNum(y1)) { + return x1.localeCompare(y1, "zh"); + } + else if (!isRealNum(x1)) { + return 1; + } + else if (!isRealNum(y1)) { + return -1; + } + } + + let d = function (x, y) { + let x1 = x, y1 = y; + + if(getObjType(x) == "object"){ + x1 = x.v; + } + + if(getObjType(y) == "object"){ + y1 = y.v; + } + + if(x1 == null){ + x1 = ""; + } + + if(y1 == null){ + y1 = ""; + } + + if (isdatetime(x1) && isdatetime(y1)) { + return diff(y1, x1); + } + else if (isRealNum(x1) && isRealNum(y1)) { + return numeral(y1).value() - numeral(x1).value(); + } + else if (!isRealNum(x1) && !isRealNum(y1)) { + return y1.localeCompare(x1, "zh"); + } + else if (!isRealNum(x1)) { + return -1; + } + else if (!isRealNum(y1)) { + return 1; + } + } + + if (isAsc) { + return data.sort(a); + } + else { + return data.sort(d); + } +} + +//排序选区数据 +function sortSelection(isAsc) { + if(Store.luckysheet_select_save.length > 1){ + if(isEditMode()){ + alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); + } + else{ + tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); + } + + return; + } + + if(isAsc == null){ + isAsc = true; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + + let r1 = Store.luckysheet_select_save[0].row[0], + r2 = Store.luckysheet_select_save[0].row[1]; + let c1 = Store.luckysheet_select_save[0].column[0], + c2 = Store.luckysheet_select_save[0].column[1]; + + let str, edr; + + for(let r = r1; r <= r2; r++){ + if(d[r] != null && d[r][c1] != null){ + let cell = d[r][c1]; + + if(cell.mc != null || isRealNull(cell.v)){ + continue; + } + + if(str == null && /[\u4e00-\u9fa5]+/g.test(cell.v)){ + str = r + 1; + edr = r + 1; + continue; + } + + if(str == null){ + str = r; + } + + edr = r; + } + } + + if(str == null || str > r2){ + return; + } + + let hasMc = false; //排序选区是否有合并单元格 + let data = []; + + for(let r = str; r <= edr; r++){ + let data_row = []; + + for(let c = c1; c <= c2; c++){ + if(d[r][c] != null && d[r][c].mc != null){ + hasMc = true; + break; + } + + data_row.push(d[r][c]); + } + + data.push(data_row); + } + + if(hasMc){ + if(isEditMode()){ + alert("选区有合并单元格,无法执行此操作!"); + } + else{ + tooltip.info("选区有合并单元格,无法执行此操作!", ""); + } + + return; + } + + data = orderbydata(data, 0, isAsc); + + for(let r = str; r <= edr; r++){ + for(let c = c1; c <= c2; c++){ + d[r][c] = data[r - str][c - c1]; + } + } + + if(Store.config["rowlen"] != null){ + let cfg = $.extend(true, {}, Store.config); + cfg = rowlenByRange(d, str, edr, cfg); + + jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }], cfg, null, true); + } + else{ + jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }]); + } +} + +//排序一列数据 +function sortColumnSeletion(colIndex, isAsc) { + if(isAsc == null){ + isAsc = true; + } + + let d = editor.deepCopyFlowData(Store.flowdata); + + let r1 = 0, r2 = d.length - 1; + let c1 = 0, c2 = d[0].length - 1; + + let str, edr; + + for(let r = r1; r <= r2; r++){ + if(d[r][colIndex] != null && d[r][colIndex].mc != null){ + continue; + } + + if(d[r][colIndex] != null && !isRealNull(d[r][colIndex].v) && /[\u4e00-\u9fa5]+/g.test(d[r][colIndex].v) && str == null){ + str = r + 1; + edr = r + 1; + continue; + } + + if(str == null){ + str = r; + } + + if(d[r][colIndex] != null && !isRealNull(d[r][colIndex].v)){ + edr = r; + } + } + + if(str == null || str > r2){ + return; + } + + let hasMc = false; //排序选区是否有合并单元格 + let data = []; + + for(let r = str; r <= edr; r++){ + let data_row = []; + + for(let c = c1; c <= c2; c++){ + if(d[r][c] != null && d[r][c].mc != null){ + hasMc = true; + break; + } + + data_row.push(d[r][c]); + } + + data.push(data_row); + } + + if(hasMc){ + if(isEditMode()){ + alert("列排序会扩展至整个表格选区,选区有合并单元格,无法执行此操作,请选择功能栏排序功能!"); + } + else{ + tooltip.info("列排序会扩展至整个表格选区,选区有合并单元格,无法执行此操作,请选择功能栏排序功能!", ""); + } + + return; + } + + data = orderbydata(data, colIndex, isAsc); + + for(let r = str; r <= edr; r++){ + for(let c = c1; c <= c2; c++){ + d[r][c] = data[r - str][c - c1]; + } + } + + if(Store.config["rowlen"] != null){ + let cfg = $.extend(true, {}, Store.config); + cfg = rowlenByRange(d, str, edr, cfg); + + jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }], cfg, null, true); + } + else{ + jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }]); + } +} + +export { + orderbydata, + orderbydata1D, + sortSelection, + sortColumnSeletion, +} \ No newline at end of file diff --git a/src/global/tooltip.js b/src/global/tooltip.js new file mode 100644 index 000000000..ded7bd158 --- /dev/null +++ b/src/global/tooltip.js @@ -0,0 +1,304 @@ +import { modelHTML, luckysheetchartpointconfigHTML, luckysheetToolHTML } from '../controllers/constant'; +import browser from './browser'; +import { replaceHtml } from '../utils/util'; +import locale from '../locale/locale'; + +const tooltip = { + info: function (title, content) { + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-info").remove(); + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-info", + "addclass": "", + "title": title, + "content": content, + "botton": '', + "style": "z-index:100003" + })); + let $t = $("#luckysheet-info").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-info").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + }, + confirm: function (title, content, func1, func2, name1, name2) { + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-confirm").remove(); + + const _locale = locale(); + const locale_button = _locale.button; + + if(name1 == null){ + name1 = locale_button.confirm; + } + if(name2 == null){ + name2 = locale_button.cancel; + } + + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-confirm", + "addclass": "", + "style": "z-index:100003", + "title": title, + "content": content, + "botton": '' + })); + let $t = $("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-confirm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + $t.find(".luckysheet-model-conform-btn").click(function () { + if (typeof func1 == 'function') { + func1(); + } + $("#luckysheet-confirm").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + }); + $t.find(".luckysheet-model-cancel-btn").click(function () { + if (typeof func2 == 'function') { + func2(); + } + $("#luckysheet-confirm").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + }); + }, + screenshot: function (title, content, imgurl) { + + const _locale = locale(); + const locale_screenshot = _locale.screenshot; + $("#luckysheet-modal-dialog-mask").show(); + $("#luckysheet-confirm").remove(); + $("body").append(replaceHtml(modelHTML, { + "id": "luckysheet-confirm", + "addclass": "", + "style": "z-index:100003", + "title": title, + "content": content, + "botton": '  '+ locale_screenshot.downLoadBtn +'    ' + })); + let $t = $("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), + myh = $t.outerHeight(), + myw = $t.outerWidth(); + let winw = $(window).width(), winh = $(window).height(); + let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); + $("#luckysheet-confirm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); + $t.find(".luckysheet-model-conform-btn").click(function () { + if(browser.isIE() == "1"){ + alert(locale_screenshot.browserNotTip); + } + else{ + if (!!window.ActiveXObject || "ActiveXObject" in window){ + if ($("#IframeReportImg").length === 0){ + $('').appendTo("body"); + } + if ($('#IframeReportImg').attr("src") != imgurl) { + $('#IframeReportImg').attr("src",imgurl); + } else { + if ($('#IframeReportImg').src != "about:blank") { + window.frames["IframeReportImg"].document.execCommand("SaveAs"); + } + } + } + } + }); + $t.find(".luckysheet-model-cancel-btn").click(function () { + $("#luckysheet-confirm").hide(); + $("#luckysheet-modal-dialog-mask").hide(); + }); + + $('#luckysheet-confirm .luckysheet-model-copy-btn').click(function(){ + let dt = new clipboard.DT(); + dt.setData("text/html", ""); + if(browser.isIE() == "1"){ + alert(locale_screenshot.rightclickTip); + } + else{ + clipboard.write(dt); + alert(locale_screenshot.successTip); + } + }); + }, + chartPointConfig: function (id, savefunc1, closefunc2) { + $("body").append(replaceHtml(modelHTML, { + "id": id, + "addclass": "luckysheet-chart-point-config-c", + "title": "数据点批量设置", + "content": luckysheetchartpointconfigHTML, + "botton": '', + "style": "z-index:100003;height:80%;width:80%;top:10%;left:10%;" + })); + $("#luckysheet-modal-dialog-mask").show(); + let winw = $(window).width(), winh = $(window).height(); + $("#" + id).find(".luckysheet-chart-point-config").css("height", winh - 160); + $("#" + id).css({ + "height": winh - 90, + "width": winw - 100, + "left": 7, + "top": 14 + }).show().find(".luckysheet-model-save-btn").click(function () { + if (typeof savefunc1 == 'function') { + savefunc1(); + } + + $("#" + id).hide(); + $("#luckysheet-modal-dialog-mask").hide(); + }); + + $("#" + id).find(".luckysheet-model-save-btn").click(function () { + if (typeof closefunc2 == 'function') { + closefunc2(); + } + + $("#" + id).hide(); + $("#luckysheet-modal-dialog-mask").hide(); + }); + }, + sheetConfig: function () { + + }, + hoverTipshowState: false, + hoverTipshowTimeOut: null, + createHoverTip: function (obj, to) { + let _this = this; + + $(obj).on("mouseover", to, function (e) { + if (_this.hoverTipshowState) { + return; + } + + clearTimeout(_this.hoverTipshowTimeOut); + _this.hoverTipshowTimeOut = setTimeout(function(){ + let $t = $(e.currentTarget), + toffset = $t.offset(), + $toolup = $("#luckysheet-tooltip-up"); + + let tips = $t.data("tips"); + if (tips == null || tips.length == 0) { + tips = $t.prev().data("tips"); + + if (tips == null || tips.length == 0) { + return; + } + } + + if ($toolup.length == 0) { + $("body").append(luckysheetToolHTML); + $toolup = $("#luckysheet-tooltip-up"); + } + + $toolup.removeClass("jfk-tooltip-hide").find("div.jfk-tooltip-contentId").html(tips); + let toolwidth = $toolup.outerWidth(); + $toolup.find("div.jfk-tooltip-arrow").css("left", (toolwidth) / 2); + + let toolleft = toffset.left + ($t.outerWidth() - toolwidth) / 2; + if(toolleft < 2){ + toolleft = 2; + $toolup.find("div.jfk-tooltip-arrow").css("left", $t.outerWidth() / 2); + } + + $toolup.css({ "top": toffset.top + $t.outerHeight() + 1, "left": toolleft }); + }, 300); + + }).on("mouseout", to, function (e) { + _this.hoverTipshowState = false; + clearTimeout(_this.hoverTipshowTimeOut); + $("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide"); + }).on("click", to, function (e) { + _this.hoverTipshowState = true; + clearTimeout(_this.hoverTipshowTimeOut); + $("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide"); + }); + }, + popover: function(content, position, close, style, btntxt, exitsFuc){ + if(btntxt == null){ + btntxt = "关闭"; + } + + let htmldiv = '
格式刷开启
'+ btntxt +'
'; + $("#luckysheetpopover").remove(); + $("body").append(htmldiv); + $("#luckysheetpopover .luckysheetpopover-content").html(content); + + let w = $("#luckysheetpopover").outerWidth(), + h = $("#luckysheetpopover").outerHeight(); + let pcss = {}; + + if(position == 'topLeft'){ + pcss.top = "20px"; + pcss.left = "20px"; + } + else if(position == 'topCenter'){ + pcss.top = "20px"; + pcss.left = "50%"; + pcss["margin-left"] = -w/2; + } + else if(position == 'topRight'){ + pcss.top = "20px"; + pcss.right = "20px"; + } + else if(position == 'midLeft'){ + pcss.top = "50%"; + pcss["margin-top"] = -h/2; + pcss.left = "20px"; + } + else if(position == 'center'){ + pcss.top = "50%"; + pcss["margin-top"] = -h/2; + pcss.left = "50%"; + pcss["margin-left"] = -w/2; + } + else if(position == 'midRight'){ + pcss.top = "50%"; + pcss["margin-top"] = -h/2; + pcss.right = "20px"; + } + else if(position == 'bottomLeft'){ + pcss.bottom = "20px"; + pcss.left = "20px"; + } + else if(position == 'bottomCenter'){ + pcss.bottom = "20px"; + pcss.left = "50%"; + pcss["margin-left"] = -w/2; + } + else if(position == 'bottomRight'){ + pcss.bottom = "20px"; + pcss.right = "20px"; + } + else{ + pcss.top = "20px"; + pcss.left = "50%"; + pcss["margin-left"] = -w/2; + } + + if(style == "white"){ + pcss.background = "rgba(255, 255, 255, 0.65)"; + pcss.color = "#000"; + $("#luckysheetpopover .luckysheetpopover-btn").css({"border": "1px solid #000"}); + } + + setTimeout(function(){ + $("#luckysheetpopover .luckysheetpopover-content").css({"margin-left": -$("#luckysheetpopover .luckysheetpopover-btn").outerWidth()/2}); + }, 1); + $("#luckysheetpopover").css(pcss).fadeIn(); + $("#luckysheetpopover .luckysheetpopover-btn").click(function(){ + if(typeof(exitsFuc) == "function"){ + exitsFuc(); + } + }); + + if(close != null && typeof(close) == "number"){ + setTimeout(function(){ + $("#luckysheetpopover").fadeOut().remove(); + if(typeof(exitsFuc) == "function"){ + exitsFuc(); + } + }, close); + } + } +} + +export default tooltip; \ No newline at end of file diff --git a/src/global/validate.js b/src/global/validate.js new file mode 100644 index 000000000..92b3c6b32 --- /dev/null +++ b/src/global/validate.js @@ -0,0 +1,198 @@ +import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting'; +import Store from '../store'; + +const error = { + v: "#VALUE!", //错误的参数或运算符 + n: "#NAME?", //公式名称错误 + na: "#N/A", //函数或公式中没有可用数值 + r: "#REF!", //删除了由其他公式引用的单元格 + d: "#DIV/0!", //除数是0或空单元格 + nm: "#NUM!", //当公式或函数中某个数字有问题时 + nl: "#NULL!", //交叉运算符(空格)使用不正确 + sp: "#SPILL!" //数组范围有其它值 +} + +//是否是空值 +function isRealNull(val) { + if(val == null || val.toString().replace(/\s/g, "") == ""){ + return true; + } + else{ + return false; + } +} + +//是否是纯数字 +function isRealNum(val) { + if(val == null || val.toString().replace(/\s/g, "") === ""){ + return false; + } + + if(typeof val == "boolean"){ + return false; + } + + if(!isNaN(val)){ + return true; + } + else{ + return false; + } +} + +//是否是错误类型 +function valueIsError(value) { + let isError = false; + + for(let x in error){ + if(value == error[x]){ + isError = true; + break; + } + } + + return isError; +} + +//是否有中文 +function hasChinaword(s) { + let patrn = /[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi; + + if (!patrn.exec(s)) { + return false; + } + else { + return true; + } +} + +//是否为非编辑模式 +function isEditMode() { + if(luckysheetConfigsetting.editMode){ + return true; + } + else{ + return false; + } +} + +//范围是否只包含部分合并单元格 +function hasPartMC(cfg, r1, r2, c1, c2) { + let hasPartMC = false; + + for(let x in Store.config["merge"]){ + let mc = cfg["merge"][x]; + + if(r1 < mc.r){ + if(r2 >= mc.r && r2 < (mc.r + mc.rs - 1)){ + if(c1 >= mc.c && c1 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c2 >= mc.c && c2 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 < mc.c && c2 > (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + } + else if(r2 >= mc.r && r2 == (mc.r + mc.rs - 1)){ + if(c1 > mc.c && c1 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c2 > mc.c && c2 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 == mc.c && c2 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 > mc.c && c2 == (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + } + else if(r2 > (mc.r + mc.rs - 1)){ + if(c1 > mc.c && c1 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c2 >= mc.c && c2 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 == mc.c && c2 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 > mc.c && c2 == (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + } + } + else if(r1 == mc.r){ + if(r2 < (mc.r + mc.rs - 1)){ + if(c1 >= mc.c && c1 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c2 >= mc.c && c2 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 < mc.c && c2 > (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + } + else if(r2 >= (mc.r + mc.rs - 1)){ + if(c1 > mc.c && c1 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c2 >= mc.c && c2 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 == mc.c && c2 < (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 > mc.c && c2 == (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + } + } + else if(r1 <= (mc.r + mc.rs - 1)){ + if(c1 >= mc.c && c1 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c2 >= mc.c && c2 <= (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + else if(c1 < mc.c && c2 > (mc.c + mc.cs - 1)){ + hasPartMC = true; + break; + } + } + } + + return hasPartMC; +} + +export { + isRealNull, + isRealNum, + valueIsError, + hasChinaword, + isEditMode, + hasPartMC, +} \ No newline at end of file diff --git a/src/index.html b/src/index.html index bb2db7379..68365816c 100644 --- a/src/index.html +++ b/src/index.html @@ -8,63 +8,35 @@ Luckysheet - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
- diff --git a/src/index.js b/src/index.js new file mode 100644 index 000000000..4da8f11ed --- /dev/null +++ b/src/index.js @@ -0,0 +1,11 @@ +import './utils/math' +import { luckysheet } from './core' +import __firefox from './utils/polyfill' +// Prevent gulp warning: 'Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification' +// window.evall = window.eval; +// polyfill event in firefox +if(window.addEventListener && (navigator.userAgent.indexOf("Firefox") > 0)){ + __firefox(); +} + +export default luckysheet; \ No newline at end of file diff --git a/src/locale/en.js b/src/locale/en.js new file mode 100644 index 000000000..c4bbecb08 --- /dev/null +++ b/src/locale/en.js @@ -0,0 +1,660 @@ +export default { + toolbar: { + undo: 'Undo', + redo: 'Redo', + paintFormat: 'Paint format', + currencyFormat: 'Format as currency', + percentageFormat: 'Format as percent', + decreaseDecimal: 'Decrease decimal places', + increaseDecimal: 'Increase decimal places', + moreFormats:'More formats', + font: 'Font', + fontSize: 'Font size', + bold: 'Bold (Ctrl+B)', + italic : 'Italic (Ctrl+I)', + strikethrough: 'Strikethrough (Alt+Shift+5)', + textColor: 'Text color', + chooseColor: 'choose color', + resetColor: 'Reset', + customColor: 'CUSTOM', + alternatingColors: 'Alternating colors', + confirmColor: 'OK', + cancelColor: 'Cancel', + collapse: 'Collapse', + fillColor: 'Fill color', + border: 'Border', + borderStyle: 'Border style', + mergeCell: 'Merge cells', + chooseMergeType: 'Choose merge type', + horizontalAlign: 'Horizontal align', + verticalAlign: 'Vertical align', + alignment: 'Alignment', + textWrap: 'Text wrap', + textWrapMode: 'Text wrap mode', + textRotate: 'Text rotate', + textRotateMode: 'Text rotate mode', + freezeTopRow: 'Freeze top row', + sortAndFilter: 'Sort and filter', + findAndReplace: 'Find and replace', + sum: 'SUM', + autoSum: 'Auto SUM', + moreFunction: 'More function', + conditionalFormat: 'Conditional format', + postil: 'Comment', + pivotTable: 'PivotTable', + chart: 'Chart', + screenshot: 'Screenshot', + splitColumn: 'Split column', + + clearText:"Clear color", + noColorSelectedText:"No color is selected", + + toolMore:"More", + toolClose:"Close", + toolMoreTip:"More features", + }, + alternatingColors:{ + applyRange: 'Apply to range', + selectRange: 'Select a data range', + header: 'Header', + footer: 'Footer', + + errorInfo:"Cannot perform this operation on multiple selection areas, please select a single area and try again", + textTitle:"Format style", + custom:"CUSTOM", + close:"close", + selectionTextColor:"Click to select text color", + selectionCellColor:"Click to select cell color", + removeColor:"Remove alternating colors", + colorShow:"color", + }, + button: { + confirm: 'OK', + cancel: 'Cancel', + }, + tooltip:{ + paintFormatStart: 'Paint format start', + paintFormatEnd: 'ESC key to exit', + }, + format:{ + moreCurrency: 'More currency formats', + moreDateTime: 'More date and time formats', + moreNumber: 'More number formats', + + titleCurrency: 'Currency formats', + decimalPlaces: 'Decimal places', + titleDateTime: 'Date and time formats', + titleNumber: 'Number formats' + }, + info:{ + detailUpdate: 'New opened', + detailSave: 'Local cache restored', + row: 'row', + column: 'column' + }, + currencyDetail:{ + RMB:'RMB', + USdollar:'US dollar', + EUR:'EUR', + GBP:'GBP', + HK:'HK', + JPY:'JPY', + AlbanianLek:'Albanian Lek', + AlgerianDinar:'Algerian Dinar', + Afghani:'Afghani', + ArgentinePeso:'Argentine Peso', + UnitedArabEmiratesDirham:'United Arab Emirates Dirham', + ArubanFlorin:'Aruban Florin', + OmaniRial:'Omani Rial', + Azerbaijanimanat:'Azerbaijani manat', + EgyptianPound:'Egyptian Pound', + EthiopianBirr:'Ethiopian Birr', + AngolaKwanza:'Angola Kwanza', + AustralianDollar:'Australian Dollar', + Patacas:'Patacas', + BarbadosDollar:'Barbados Dollar', + PapuaNewGuineaKina:'Papua New Guinea Kina', + BahamianDollar:'Bahamian Dollar', + PakistanRupee:'Pakistan Rupee', + ParaguayanGuarani:'Paraguayan Guarani', + BahrainiDinar:'Bahraini Dinar', + PanamanianBalboa:'Panamanian Balboa', + Brazilianreal:'Brazilian real', + Belarusianruble:'Belarusian ruble', + BermudianDollar:'Bermudian Dollar', + BulgarianLev:'Bulgarian Lev', + IcelandKrona:'Iceland Krona', + BosniaHerzegovinaConvertibleMark:'Bosnia-Herzegovina Convertible Mark', + PolishZloty:'Polish Zloty', + Boliviano:'Boliviano', + BelizeDollar:'Belize Dollar', + BotswanaPula:'Botswana Pula', + NotDannuzhamu:'Not Dannuzhamu', + BurundiFranc:'Burundi Franc', + NorthKoreanWon:'North Korean Won', + DanishKrone:'Danish Krone', + EastCaribbeanDollar:'East Caribbean Dollar', + DominicaPeso:'Dominica Peso', + RussianRuble:'Russian Ruble', + EritreanNakfa:'Eritrean Nakfa', + CFAfranc:'CFA franc', + PhilippinePeso:'Philippine Peso', + FijiDollar:'Fiji Dollar', + CapeVerdeEscudo:'Cape Verde Escudo', + FalklandIslandsPound:'Falkland Islands Pound', + GambianDalasi:'Gambian Dalasi', + Congolesefranc:'Congolese franc', + ColombianPeso:'Colombian Peso', + CostaRicanColon:'Costa Rican Colon', + CubanPeso:'Cuban Peso', + Cubanconvertiblepeso:'Cuban convertible peso', + GuyanaDollar:'Guyana Dollar', + KazakhstanTenge:'Kazakhstan Tenge', + Haitiangourde:'Haitian gourde', + won:'won', + NetherlandsAntillesGuilder:'Netherlands Antilles Guilder', + Honduraslempiras:'Honduras lempiras', + DjiboutiFranc:'Djibouti Franc', + KyrgyzstanSom:'Kyrgyzstan Som', + GuineaFranc:'Guinea Franc', + CanadianDollar:'Canadian Dollar', + GhanaianCedi:'Ghanaian Cedi', + Cambodianriel:'Cambodian riel', + CzechKoruna:'Czech Koruna', + ZimbabweDollar:'Zimbabwe Dollar', + QatariRiyal:'Qatari Riyal', + CaymanIslandsDollar:'Cayman Islands Dollar', + Comorianfranc:'Comorian franc', + KuwaitiDinar:'Kuwaiti Dinar', + CroatianKuna:'Croatian Kuna', + KenyanShilling:'Kenyan Shilling', + LesothoLoti:'Lesotho Loti', + LaoKip:'Lao Kip', + LebanesePound:'Lebanese Pound', + Lithuanianlitas:'Lithuanian litas', + LibyanDinar:'Libyan Dinar', + LiberianDollar:'Liberian Dollar', + RwandaFranc:'Rwanda Franc', + RomanianLeu:'Romanian Leu', + MalagasyAriary:'Malagasy Ariary', + MaldivianRufiyaa:'Maldivian Rufiyaa', + MalawiKwacha:'Malawi Kwacha', + MalaysianRinggit:'Malaysian Ringgit', + MacedoniawearingDinar:'Macedonia wearing Dinar', + MauritiusRupee:'Mauritius Rupee', + MauritanianOuguiya:'Mauritanian Ouguiya', + MongolianTugrik:'Mongolian Tugrik', + BangladeshiTaka:'Bangladeshi Taka', + PeruvianNuevoSol:'Peruvian Nuevo Sol', + MyanmarKyat:'Myanmar Kyat', + MoldovanLeu:'Moldovan Leu', + MoroccanDirham:'Moroccan Dirham', + MozambiqueMetical:'Mozambique Metical', + MexicanPeso:'Mexican Peso', + NamibianDollar:'Namibian Dollar', + SouthAfricanRand:'South African Rand', + SouthSudanesePound:'South Sudanese Pound', + NicaraguaCordoba:'Nicaragua Cordoba', + NepaleseRupee:'Nepalese Rupee', + NigerianNaira:'Nigerian Naira', + NorwegianKrone:'Norwegian Krone', + GeorgianLari:'Georgian Lari', + RMBOffshore:'RMB (Offshore)', + SwedishKrona:'Swedish Krona', + SwissFranc:'Swiss Franc', + SerbianDinar:'Serbian Dinar', + SierraLeone:'Sierra Leone', + SeychellesRupee:'Seychelles Rupee', + SaudiRiyal:'Saudi Riyal', + SaoTomeDobra:'Sao Tome Dobra', + SaintHelenapound:'Saint Helena pound', + SriLankaRupee:'Sri Lanka Rupee', + SwazilandLilangeni:'Swaziland Lilangeni', + SudanesePound:'Sudanese Pound', + Surinamesedollar:'Surinamese dollar', + SolomonIslandsDollar:'Solomon Islands Dollar', + SomaliShilling:'Somali Shilling', + TajikistanSomoni:'Tajikistan Somoni', + PacificFranc:'Pacific Franc', + ThaiBaht:'Thai Baht', + TanzanianShilling:'Tanzanian Shilling', + TonganPaanga:"Tongan Pa'anga", + TrinidadandTobagoDollar:'Trinidad and Tobago Dollar', + TunisianDinar:'Tunisian Dinar', + TurkishLira:'Turkish Lira', + VanuatuVatu:'Vanuatu Vatu', + GuatemalanQuetzal:'Guatemalan Quetzal', + CommissionBolivar:'Commission Bolivar', + BruneiDollar:'Brunei Dollar', + UgandanShilling:'Ugandan Shilling', + UkrainianHryvnia:'Ukrainian Hryvnia', + UruguayanPeso:'Uruguayan Peso', + Uzbekistansom:'Uzbekistan som', + WesternSamoaTala:'Western Samoa Tala', + SingaporeDollar:'Singapore Dollar', + NT:'NT', + NewZealandDollar:'New Zealand Dollar', + HungarianForint:'Hungarian Forint', + SyrianPound:'Syrian Pound', + JamaicanDollar:'Jamaican Dollar', + ArmenianDram:'Armenian Dram', + YemeniRial:'Yemeni Rial', + IraqiDinar:'Iraqi Dinar', + IranianRial:'Iranian Rial', + NewIsraeliShekel:'New Israeli Shekel', + IndianRupee:'Indian Rupee', + IndonesianRupiah:'Indonesian Rupiah', + JordanianDinar:'Jordanian Dinar', + VND:'VND', + ZambianKwacha:'Zambian Kwacha', + GibraltarPound:'Gibraltar Pound', + ChileanPeso:'Chilean Peso', + CFAFrancBEAC:'CFA Franc BEAC' + }, + defaultFmt:[ + { "text": 'Automatic', "value": "General", "example": "" }, + { "text": 'Plain text', "value": "@", "example": "" }, + { "text": "", "value": "split", "example": "" }, + { "text": 'Number', "value": "##0.00", "example": "1000.12" }, + { "text": 'Percent', "value": "#0.00%", "example": "12.21%" }, + { "text": 'Scientific', "value": "0.00E+00", "example": "1.01E+5" }, + { "text": "", "value": "split", "example": "" }, + { "text": 'Accounting', "value": "¥(0.00)", "example": "¥(1200.09)" }, + { "text": 'Currency', "value": "¥0.00", "example": "¥1200.09" }, + { "text": "", "value": "split", "example": "" }, + { "text": 'Date', "value": "yyyy-MM-dd", "example": "2017-11-29" }, + { "text": 'Time', "value": "hh:mm AM/PM", "example": "3:00 PM" }, + { "text": 'Time 24H', "value": "hh:mm", "example": "15:00" }, + { "text": 'Date time', "value": "yyyy-MM-dd hh:mm AM/PM", "example": "2017-11-29 3:00 PM" }, + { "text": 'Date time 24 H', "value": "yyyy-MM-dd hh:mm", "example": "2017-11-29 15:00" }, + { "text": "", "value": "split", "example": "" }, + { "text": 'Custom formats', "value": "fmtOtherSelf", "example": "more" } + ], + dateFmtList:[ + { + "name": "1930-08-05", + "value": "yyyy-MM-dd" + }, + { + "name": "1930/8/5", + "value": "yyyy/MM/dd" + }, + { + "name": "08-05", + "value": "MM-dd" + }, + { + "name": "8-5", + "value": "M-d" + }, + { + "name": "13:30:30", + "value": "h:mm:ss" + }, + { + "name": "13:30", + "value": "h:mm" + }, + { + "name": "PM 01:30", + "value": 'AM/PM hh:mm' + }, + { + "name": "PM 1:30", + "value": 'AM/PM h:mm' + }, + { + "name": "PM 1:30:30", + "value": 'AM/PM h:mm:ss' + }, + { + "name": "08-05 PM 01:30", + "value": "MM-dd AM/PM hh:mm" + } + ], + fontFamily:{ + MicrosoftYaHei:"YaHei", + }, + fontarray: ["Times New Roman","Arial","Tahoma","Verdana"], + fontjson: {"arial":1,"times new roman":0,"tahoma":2,"verdana":3}, + border:{ + borderTop:'borderTop', + borderBottom:'borderBottom', + borderLeft:'borderLeft', + borderRight:'borderRight', + borderNone:'borderNone', + borderAll:'borderAll', + borderOutside:'borderOutside', + borderInside:'borderInside', + borderHorizontal:'borderHorizontal', + borderVertical:'borderVertical', + borderColor:'borderColor', + borderSize:'borderSize', + }, + merge:{ + mergeAll:"Merge all", + mergeV:"Vertically", + mergeH:"Horizentally", + mergeCancel:"Unmerge", + overlappingError:"Cannot merge overlapping areas", + partiallyError:"Cannot perform this operation on partially merged cells", + }, + align:{ + left:"left", + center:"center", + right:"right", + + top:"Top", + middle:"Middle", + bottom:"Bottom", + }, + textWrap:{ + "overflow":"Overflow", + "wrap":"Wrap", + "clip":"Clip", + }, + rotation:{ + "none":"None", + "angleup":"Tilt Up", + "angledown":"Tilt down", + "vertical":"Stack Vertically", + "rotationUp":"Rotate Up", + "rotationDown":"Rotate down" + }, + freezen:{ + default:"Freezen", + freezenRow:"First Row", + freezenColumn:"First column", + freezenRC:"Both", + freezenRowRange:"Freezen row range", + freezenColumnRange:"Freezen column range", + freezenRCRange:"Freezen both range", + freezenCancel:"Cancel", + + noSeletionError:"No Range to be selected", + }, + sort:{ + "asc":"Ascending ", + "desc":"Descending ", + "custom":"Custom sort", + + "hasTitle":"Data has header row", + "sortBy":"Sort by", + "addOthers":"Add another sort column", + "close":"close", + "confirm":"sort", + + "columnOperation":"Column", + "secondaryTitle":"then by", + + "sortRangeTitle":"Sort range from", + "sortRangeTitleTo":"to", + + + "noRangeError":"Cannot perform this operation on multiple selection areas, please select a single range and try again", + "mergeError":"There are merged cells in the selection, this operation cannot be performed!", + + }, + filter:{ + "filter":"create filter", + "clearFilter":"Cancel filter", + + sortByAsc:"Sort A-Z", + sortByDesc:"Sort Z-A", + filterByColor:"Filter by color", + filterByCondition:"Filter by condition", + filterByValues:"Filter by values", + + filiterInputNone:"None", + + filiterInputTip:"Enter filter value", + filiterRangeStartTip:"Value for formula", + filiterRangeEndTip:"Value for formula", + + filterValueByAllBtn:"Check all", + filterValueByClearBtn:"Clear", + filterValueByInverseBtn:"Inverse", + filterValueByTip:"filter By Values", + filterConform:"Confirm", + filterCancel:"Cancel", + clearFilter:"Clear filter", + + conditionNone:"None", + conditionCellIsNull:"Is empty", + conditionCellNotNull:"Is not empty", + conditionCellTextContain:"Text contains", + conditionCellTextNotContain:"Text does not contain", + conditionCellTextStart:"Text starts with", + conditionCellTextEnd:"Text ends with", + conditionCellTextEqual:"Text is exactly", + conditionCellDateEqual:"Date is", + conditionCellDateBefore:"Date is before", + conditionCellDateAfter:"Date is after", + conditionCellGreater:"Greater than", + conditionCellGreaterEqual:"Greater than or equal to", + conditionCellLess:"Less than", + conditionCellLessEqual:"Less than or equal to", + conditionCellEqual:"Is equal to", + conditionCellNotEqual:"Is not equal to", + conditionCellBetween:"Is between", + conditionCellNotBetween:"Is not between", + + }, + rightclick: { + copy: 'Copy', + copyAs: 'Copy as', + paste: 'Paste', + insert: 'Insert', + delete: 'Delete', + deleteSelected: 'Delete selected ', + hide: 'Hide', + hideSelected: 'Hide selected ', + showHide: 'Show hide', + to: 'Towards', + left: 'Left', + right: 'Right', + top: 'Top', + bottom: 'Bottom', + add: 'Add', + row: 'Row', + column: 'Column', + width: 'Width', + height: 'Height', + number: 'Number', + confirm: 'Confirm', + orderAZ: 'A-Z order', + orderZA: 'Z-A order', + clearContent: 'Clear content', + matrix: 'Matrix operation selection', + sortSelection: 'Sort selection', + filterSelection: 'Filter selection', + chartGeneration: 'Chart generation', + firstLineTitle: 'First line title', + untitled: 'Untitled', + array1: 'One-dimensional array', + array2: 'Two-dimensional array', + array3: 'Multidimensional Arrays', + diagonal: 'Diagonal', + antiDiagonal: 'Anti-diagonal', + diagonalOffset: 'Diagonal offset', + offset: 'Offset', + Boolean: '布尔值', + flip: 'Flip', + upAndDown: 'Up and down', + leftAndRight: 'Left and right', + clockwise: 'Clockwise', + counterclockwise: 'Counterclockwise', + transpose: 'Transpose', + matrixCalculation: 'Matrix calculation', + plus: 'Plus', + minus: 'Minus', + multiply: 'Multiply', + divided: 'Divided', + power: 'Power', + root: 'Root', + log: 'Log', + delete0: 'Delete 0 values at both ends', + removeDuplicate: 'Remove duplicate values', + byRow: 'By row', + byCol: 'By column', + generateNewMatrix: 'Generate new matrix', + + }, + comment:{ + "insert":"Insert", + "edit":"Edit", + "delete":"Delete", + "showOne":"Show/Hide", + "showAll":"Show/Hide All" + }, + screenshot:{ + screenshotTipNoSelection:"Please select the scope of the screenshot", + screenshotTipTitle:"Warning!", + screenshotTipHasMerge:"This operation cannot be performed on merged cells", + screenshotTipHasMulti:"This operation cannot be performed on multiple selection regions", + screenshotTipSuccess:"Successful", + screenshotImageName:"Screenshot", + + downLoadClose:"Close", + downLoadCopy:"Copy to clipboard", + downLoadBtn:"DownLoad", + browserNotTip:"not supported by IE browser!", + rightclickTip:"Please right click \"copy\" on the picture", + successTip:"Successfully (if pasting fails, please right-click on the image to \"copy image\")", + }, + splitText:{ + splitDelimiters:"Delimiters", + splitOther:"Other", + splitContinueSymbol:"Consecutive separators are treated as a single", + splitDataPreview:"Preview", + splitTextTitle:"Split text", + splitConfirmToExe:"There is already data here, do you want to replace it?", + }, + punctuation:{ + "tab":"Tab", + "semicolon":"semicolon", + "comma":"comma", + "space":"space", + + }, + + findAndReplace:{ + find:"Find", + replace:"Replace", + goto:"Goto", + location:"Location", + formula:"Formula", + date:"Date", + number:"Number", + string:"String", + error:"Error", + condition:"Condition", + rowSpan:"Row span", + columnSpan:"Column span", + locationExample:"Location", + lessTwoRowTip:"Please select at least two rows", + lessTwoColumnTip:"Please select at least two columns", + + findTextbox:"Find Content", + replaceTextbox:"Replace Content", + + regexTextbox:"Regular Expression", + wholeTextbox:"Whole word", + distinguishTextbox:"Case sensitive", + + allReplaceBtn:"Replace All", + replaceBtn:"Replace", + allFindBtn:"Find All", + findBtn:"Find next", + + noFindTip:"The content was not found", + + searchTargetSheet:"Sheet", + searchTargetCell:"Cell", + searchTargetValue:"Value", + + searchInputTip:"Please enter the search content", + + noReplceTip:"There is nothing to replace", + noMatchTip:"No match found", + + successTip:"${xlength} items found", + + }, + sheetconfig: { + delete: 'Delete', + copy: 'Copy', + rename: 'Rename', + changeColor: 'Change color', + hide: 'Hide', + unhide: 'Unhide', + moveLeft: 'Move left', + moveRight: 'Move right', + resetColor: 'Reset color', + cancelText: 'Cancel', + chooseText: 'Confirm color', + }, + conditionformat: { + rule: 'Rule', + newRule: 'New rule', + editRule: 'Edit rule', + deleteRule: 'Delete rule', + showRules: 'Show its formatting rules', + manageRules: 'Conditional Formatting Rule Manager', + format: 'Format', + applyRange: 'Apply range', + selectRange: 'Click to select application range', + ruleTypeItem1: 'Format all cells based on their respective values', + ruleTypeItem2: 'Only format cells that contain', + ruleTypeItem3: 'Format only the top or bottom numbers', + ruleTypeItem4: 'Format only values above or below the average', + ruleTypeItem5: 'Format only unique or repeated values', + textColor: 'Text color', + cellColor: 'Cell color', + confirm: 'Confirm', + cancel: 'Cancel', + close: 'Close', + sheet: 'Sheet', + currentSheet: 'CurrentSheet', + dataBar: 'dataBar', + dataBarColor: 'dataBar color', + colorGradation: 'colorGradation', + icons: 'icons', + cellValue: 'Cell value', + between: 'Between', + in: 'In', + between2: '', + contain: 'Contain', + duplicateValue: 'Duplicate value', + uniqueValue: 'Unique value', + top: 'Top', + last: 'Last', + oneself: '', + aboveAverage: 'Above average', + belowAverage: 'Below average', + chooseRuleType: 'Choose rule type', + editRuleDescription: 'Edit rule description', + newFormatRule: 'New format rule', + formatStyle: 'Format style', + fillType: 'Fill type', + color: 'Color', + twocolor: 'Two-color', + tricolor: 'Tricolor', + multicolor: 'Multi color', + grayColor: 'Gray color', + gradient: 'Gradient', + solid: 'Solid', + maxValue: 'Max value', + medianValue: 'Median value', + minValue: 'Min value', + threeWayArrow: 'Three-way arrow', + fourWayArrow: 'Four-way arrow', + fiveWayArrow: 'Five-way arrow', + threeTriangles: 'Three triangles', + threeColorTrafficLight: 'Three-color traffic light', + fourColorTrafficLight: 'Four-color traffic light', + rimless: 'Rimless', + bordered: 'Bordered', + }, + }; + \ No newline at end of file diff --git a/src/locale/locale.js b/src/locale/locale.js new file mode 100644 index 000000000..6fa489cc0 --- /dev/null +++ b/src/locale/locale.js @@ -0,0 +1,14 @@ +import en from './en' +import zh from './zh' +import Store from '../store'; + +const localeObj = { + 'en':en, + 'zh':zh +} + +function locale(){ + return localeObj[Store.lang]; +} + +export default locale; \ No newline at end of file diff --git a/src/locale/zh.js b/src/locale/zh.js new file mode 100644 index 000000000..da7ea44aa --- /dev/null +++ b/src/locale/zh.js @@ -0,0 +1,667 @@ +export default { + toolbar: { + undo: '撤销', + redo: '重做', + paintFormat: '格式刷', + currencyFormat: '货币格式', + percentageFormat: '百分比格式', + numberDecrease: '减少小数位数', + numberIncrease: '增加小数位数', + moreFormats: '更多格式', + font: '字体', + fontSize: '字号大小', + bold: '粗体 (Ctrl+B)', + italic: '斜体 (Ctrl+I)', + strikethrough: '删除线 (Alt+Shift+5)', + textColor: '文本颜色', + chooseColor: '颜色选择', + resetColor: '重置颜色', + customColor: '自定义', + alternatingColors: '交替颜色', + confirmColor: '确定颜色', + collapse: '收起', + fillColor: '单元格颜色', + border: '边框', + borderStyle: '边框类型', + mergeCell: '合并单元格', + chooseMergeType: '选择合并类型', + horizontalAlign: '水平对齐', + verticalAlign: '垂直对齐', + alignment: '对齐方式', + textWrap: '文本换行', + textWrapMode: '换行方式', + textRotate: '文本旋转', + textRotateMode: '旋转方式', + freezeTopRow: '冻结首行', + sortAndFilter: '排序和筛选', + findAndReplace: '查找替换', + sum: '求和', + autoSum: '自动求和', + moreFunction: '更多函数', + conditionalFormat: '条件格式', + postil: '批注', + pivotTable: '数据透视表', + chart: '图表', + screenshot: '截图', + splitColumn: '分列', + + clearText:"清除颜色选择", + noColorSelectedText:"没有颜色被选择", + + toolMore:"更多", + toolClose:"收起", + toolMoreTip:"更多功能", + + }, + alternatingColors:{ + applyRange: '应用范围', + selectRange: '选择应用范围', + header: '页眉', + footer: '页脚', + + errorInfo:"不能对多重选择区域执行此操作,请选择单个区域,然后再试", + textTitle:"格式样式", + custom:"自定义", + close:"关闭", + selectionTextColor:"点击选择文本颜色", + selectionCellColor:"点击选择单元格颜色", + removeColor:"移除交替颜色", + colorShow:"颜色", + }, + button: { + confirm: '确定', + cancel: '取消', + }, + tooltip: { + paintFormatStart: '格式刷开启', + paintFormatEnd: 'ESC键退出', + }, + format: { + moreCurrency: '更多货币格式', + moreDateTime: '更多日期与时间格式', + moreNumber: '更多数字格式', + + titleCurrency: '货币格式', + decimalPlaces: '小数位数', + titleDateTime: '日期与时间格式', + titleNumber: '数字格式' + }, + info: { + detailUpdate: '新打开', + detailSave: '已恢复本地缓存', + row: '行', + column: '列' + }, + currencyDetail:{ + RMB:'人民币', + USdollar:'美元', + EUR:'欧元', + GBP:'英镑', + HK:'港元', + JPY:'日元', + AlbanianLek:'阿尔巴尼亚列克', + AlgerianDinar:'阿尔及利亚第纳尔', + Afghani:'阿富汗尼', + ArgentinePeso:'阿根廷比索', + UnitedArabEmiratesDirham:'阿拉伯联合酋长国迪拉姆', + ArubanFlorin:'阿鲁巴弗罗林', + OmaniRial:'阿曼里亚尔', + Azerbaijanimanat:'阿塞拜疆马纳特', + EgyptianPound:'埃及镑', + EthiopianBirr:'埃塞俄比亚比尔', + AngolaKwanza:'安哥拉宽扎', + AustralianDollar:'澳大利亚元', + Patacas:'澳门元', + BarbadosDollar:'巴巴多斯元', + PapuaNewGuineaKina:'巴布亚新几内亚基那', + BahamianDollar:'巴哈马元', + PakistanRupee:'巴基斯坦卢比', + ParaguayanGuarani:'巴拉圭瓜拉尼', + BahrainiDinar:'巴林第纳尔', + PanamanianBalboa:'巴拿马巴波亚', + Brazilianreal:'巴西里亚伊', + Belarusianruble:'白俄罗斯卢布', + BermudianDollar:'百慕大元', + BulgarianLev:'保加利亚列弗', + IcelandKrona:'冰岛克朗', + BosniaHerzegovinaConvertibleMark:'波黑可兑换马克', + PolishZloty:'波兰兹罗提', + Boliviano:'玻利维亚诺', + BelizeDollar:'伯利兹元', + BotswanaPula:'博茨瓦纳普拉', + NotDannuzhamu:'不丹努扎姆', + BurundiFranc:'布隆迪法郎', + NorthKoreanWon:'朝鲜圆', + DanishKrone:'丹麦克朗', + EastCaribbeanDollar:'东加勒比元', + DominicaPeso:'多米尼加比索', + RussianRuble:'俄国卢布', + EritreanNakfa:'厄立特里亚纳克法', + CFAfranc:'非洲金融共同体法郎', + PhilippinePeso:'菲律宾比索', + FijiDollar:'斐济元', + CapeVerdeEscudo:'佛得角埃斯库多', + FalklandIslandsPound:'福克兰群岛镑', + GambianDalasi:'冈比亚达拉西', + Congolesefranc:'刚果法郎', + ColombianPeso:'哥伦比亚比索', + CostaRicanColon:'哥斯达黎加科朗', + CubanPeso:'古巴比索', + Cubanconvertiblepeso:'古巴可兑换比索', + GuyanaDollar:'圭亚那元', + KazakhstanTenge:'哈萨克斯坦坚戈', + Haitiangourde:'海地古德', + won:'韩元', + NetherlandsAntillesGuilder:'荷属安的列斯盾', + Honduraslempiras:'洪都拉斯拉伦皮拉', + DjiboutiFranc:'吉布提法郎', + KyrgyzstanSom:'吉尔吉斯斯坦索姆', + GuineaFranc:'几内亚法郎', + CanadianDollar:'加拿大元', + GhanaianCedi:'加纳塞地', + Cambodianriel:'柬埔寨瑞尔', + CzechKoruna:'捷克克朗', + ZimbabweDollar:'津巴布韦元', + QatariRiyal:'卡塔尔里亚尔', + CaymanIslandsDollar:'开曼群岛元', + Comorianfranc:'科摩罗法郎', + KuwaitiDinar:'科威特第纳尔', + CroatianKuna:'克罗地亚库纳', + KenyanShilling:'肯尼亚先令', + LesothoLoti:'莱索托洛蒂', + LaoKip:'老挝基普', + LebanesePound:'黎巴嫩镑', + Lithuanianlitas:'立陶宛立特', + LibyanDinar:'利比亚第纳尔', + LiberianDollar:'利比亚元', + RwandaFranc:'卢旺达法郎', + RomanianLeu:'罗马尼亚列伊', + MalagasyAriary:'马达加斯加阿里亚里', + MaldivianRufiyaa:'马尔代夫拉菲亚', + MalawiKwacha:'马拉维克瓦查', + MalaysianRinggit:'马来西亚林吉特', + MacedoniawearingDinar:'马其顿戴第纳尔', + MauritiusRupee:'毛里求斯卢比', + MauritanianOuguiya:'毛里塔尼亚乌吉亚', + MongolianTugrik:'蒙古图格里克', + BangladeshiTaka:'孟加拉塔卡', + PeruvianNuevoSol:'秘鲁新索尔', + MyanmarKyat:'缅甸开亚特', + MoldovanLeu:'摩尔多瓦列伊', + MoroccanDirham:'摩洛哥迪拉姆', + MozambiqueMetical:'莫桑比克梅蒂卡尔', + MexicanPeso:'墨西哥比索', + NamibianDollar:'纳米比亚元', + SouthAfricanRand:'南非兰特', + SouthSudanesePound:'南苏丹镑', + NicaraguaCordoba:'尼加拉瓜科多巴', + NepaleseRupee:'尼泊尔卢比', + NigerianNaira:'尼日利亚奈拉', + NorwegianKrone:'挪威克朗', + GeorgianLari:'乔治亚拉瑞', + RMBOffshore:'人民币(离岸)', + SwedishKrona:'瑞典克朗', + SwissFranc:'瑞士法郎', + SerbianDinar:'塞尔维亚第纳尔', + SierraLeone:'塞拉利昂利昂', + SeychellesRupee:'塞舌尔卢比', + SaudiRiyal:'沙特里亚尔', + SaoTomeDobra:'圣多美多布拉', + SaintHelenapound:'圣赫勒拿群岛磅', + SriLankaRupee:'斯里兰卡卢比', + SwazilandLilangeni:'斯威士兰里兰吉尼', + SudanesePound:'苏丹镑', + Surinamesedollar:'苏里南元', + SolomonIslandsDollar:'所罗门群岛元', + SomaliShilling:'索马里先令', + TajikistanSomoni:'塔吉克斯坦索莫尼', + PacificFranc:'太平洋法郎', + ThaiBaht:'泰国铢', + TanzanianShilling:'坦桑尼亚先令', + TonganPaanga:'汤加潘加', + TrinidadandTobagoDollar:'特立尼达和多巴哥元', + TunisianDinar:'突尼斯第纳尔', + TurkishLira:'土耳其里拉', + VanuatuVatu:'瓦努阿图瓦图', + GuatemalanQuetzal:'危地马拉格查尔', + CommissionBolivar:'委内瑞拉博利瓦', + BruneiDollar:'文莱元', + UgandanShilling:'乌干达先令', + UkrainianHryvnia:'乌克兰格里夫尼亚', + UruguayanPeso:'乌拉圭比索', + Uzbekistansom:'乌兹别克斯坦苏姆', + WesternSamoaTala:'西萨摩亚塔拉', + SingaporeDollar:'新加坡元', + NT:'新台币', + NewZealandDollar:'新西兰元', + HungarianForint:'匈牙利福林', + SyrianPound:'叙利亚镑', + JamaicanDollar:'牙买加元', + ArmenianDram:'亚美尼亚德拉姆', + YemeniRial:'也门里亚尔', + IraqiDinar:'伊拉克第纳尔', + IranianRial:'伊朗里亚尔', + NewIsraeliShekel:'以色列新谢克尔', + IndianRupee:'印度卢比', + IndonesianRupiah:'印度尼西亚卢比', + JordanianDinar:'约旦第纳尔', + VND:'越南盾', + ZambianKwacha:'赞比亚克瓦查', + GibraltarPound:'直布罗陀镑', + ChileanPeso:'智利比索', + CFAFrancBEAC:'中非金融合作法郎', + }, + defaultFmt:[ + { "text": '自动', "value": "General", "example": "" }, + { "text": '纯文本', "value": "@", "example": "" }, + { "text": "", "value": "split", "example": "" }, + { "text": '数字', "value": "##0.00", "example": "1000.12" }, + { "text": '百分比', "value": "#0.00%", "example": "12.21%" }, + { "text": '科学计数', "value": "0.00E+00", "example": "1.01E+5" }, + { "text": "", "value": "split", "example": "" }, + { "text": '会计', "value": "¥(0.00)", "example": "¥(1200.09)" }, + //{ "text": "财务", "value": "(#.####)", "example": "(1200.09)" }, + { "text": '万元', "value": "w", "example": "1亿2000万2500" }, + { "text": '货币', "value": "¥0.00", "example": "¥1200.09" }, + //{ "text": "货币整数", "value": "¥####", "example": "¥1200" }, + { "text": '万元2位小数', "value": "w0.00", "example": "2万2500.55" }, + { "text": "", "value": "split", "example": "" }, + { "text": '日期', "value": "yyyy-MM-dd", "example": "2017-11-29" }, + { "text": '时间', "value": "hh:mm AM/PM", "example": "3:00 PM" }, + { "text": '时间24H', "value": "hh:mm", "example": "15:00" }, + { "text": '日期时间', "value": "yyyy-MM-dd hh:mm AM/PM", "example": "2017-11-29 3:00 PM" }, + { "text": '日期时间24H', "value": "yyyy-MM-dd hh:mm", "example": "2017-11-29 15:00" }, + { "text": "", "value": "split", "example": "" }, + { "text": '自定义格式', "value": "fmtOtherSelf", "example": "more" } + ], + dateFmtList:[ + { + "name": "1930-08-05", + "value": "yyyy-MM-dd" + }, + { + "name": "1930/8/5", + "value": "yyyy/MM/dd" + }, + { + "name": "1930年8月5日", + "value": 'yyyy"年"M"月"d"日"' + }, + { + "name": "08-05", + "value": "MM-dd" + }, + { + "name": "8-5", + "value": "M-d" + }, + { + "name": "8月5日", + "value": 'M"月"d"日"' + }, + { + "name": "13:30:30", + "value": "h:mm:ss" + }, + { + "name": "13:30", + "value": "h:mm" + }, + { + "name": "下午01:30", + "value": 'AM/PM hh:mm' + }, + { + "name": "下午1:30", + "value": 'AM/PM h:mm' + }, + { + "name": "下午1:30:30", + "value": 'AM/PM h:mm:ss' + }, + { + "name": "08-05 下午01:30", + "value": "MM-dd AM/PM hh:mm" + }, + // { + // "name": "1930年8月5日星期二", + // "value": '' + // }, + // { + // "name": "1930年8月5日星期二 下午1:30:30", + // "value": '' + // }, + ], + fontFamily:{ + MicrosoftYaHei:"Microsoft YaHei", + }, + fontarray: ["微软雅黑","宋体","黑体","楷体","仿宋","新宋体","华文新魏","华文行楷","华文隶书","Arial","Times New Roman","Tahoma","Verdana"], + fontjson: {"微软雅黑":0,"microsoft yahei":0,"宋体":1,"simsun":1,"黑体":2,"simhei":2,"楷体":3,"kaiti":3,"仿宋":4,"fangsong":4,"新宋体":5,"nsimsun":5,"华文新魏":6,"stxinwei":6,"华文行楷":7,"stxingkai":7,"华文隶书":8,"stliti":8,"arial":9,"times new roman":10,"tahoma":11,"verdana":12}, + border:{ + borderTop:'上框线', + borderBottom:'下框线', + borderLeft:'左框线', + borderRight:'右框线', + borderNone:'无', + borderAll:'所有', + borderOutside:'外侧', + borderInside:'内侧', + borderHorizontal:'内侧横线', + borderVertical:'内侧竖线', + borderColor:'边框颜色', + borderSize:'边框粗细' + }, + merge:{ + mergeAll:"全部合并", + mergeV:"垂直合并", + mergeH:"水平合并", + mergeCancel:"取消合并", + overlappingError:"不能合并重叠区域", + partiallyError:"无法对部分合并单元格执行此操作", + }, + align:{ + left:"左对齐", + center:"中间对齐", + right:"右对齐", + + top:"顶部对齐", + middle:"居中对齐", + bottom:"底部对齐", + }, + textWrap:{ + "overflow":"溢出", + "wrap":"自动换行", + "clip":"截断", + }, + freezen:{ + default:"冻结首行", + freezenRow:"冻结首行", + freezenColumn:"冻结首列", + freezenRC:"冻结行列", + freezenRowRange:"冻结行到选区", + freezenColumnRange:"冻结列到选区", + freezenRCRange:"冻结行列到选区", + freezenCancel:"取消冻结", + + noSeletionError:"没有选区", + }, + sort:{ + "asc":"升序", + "desc":"降序", + "custom":"自定义排序", + + "hasTitle":"数据具有标题行", + "sortBy":"排序依据", + "addOthers":"添加其他排序列", + "close":"关闭", + "confirm":"排序", + + "columnOperation":"列", + "secondaryTitle":"次要排序", + + "sortRangeTitle":"排序范围从", + "sortRangeTitleTo":"到", + + + "noRangeError":"不能对多重选择区域执行此操作,请选择单个区域,然后再试", + "mergeError":"选区有合并单元格,无法执行此操作!", + + }, + filter:{ + "filter":"筛选", + "clearFilter":"清除筛选", + + sortByAsc:"以A-Z升序排列", + sortByDesc:"以Z-A降序排列", + filterByColor:"按颜色筛选", + filterByCondition:"按条件过滤", + filterByValues:"按值过滤", + + filiterInputNone:"无", + + filiterInputTip:"输入筛选值", + filiterRangeStartTip:"范围开始", + filiterRangeEndTip:"范围结束", + + filterValueByAllBtn:"全选", + filterValueByClearBtn:"清除", + filterValueByInverseBtn:"反选", + filterValueByTip:"按照值进行筛选", + filterConform:"确 认", + filterCancel:"取 消", + clearFilter:"清除筛选", + + conditionNone:"无", + conditionCellIsNull:"单元格为空", + conditionCellNotNull:"单元格有数据", + conditionCellTextContain:"文本包含", + conditionCellTextNotContain:"文本不包含", + conditionCellTextStart:"文本开头为", + conditionCellTextEnd:"文本结尾为", + conditionCellTextEqual:"文本等于", + conditionCellDateEqual:"日期等于", + conditionCellDateBefore:"日期早于", + conditionCellDateAfter:"日期晚于", + conditionCellGreater:"大于", + conditionCellGreaterEqual:"大于等于", + conditionCellLess:"小于", + conditionCellLessEqual:"小于等于", + conditionCellEqual:"等于", + conditionCellNotEqual:"不等于", + conditionCellBetween:"介于", + conditionCellNotBetween:"不在其中", + }, + rightclick: { + copy: '复制', + copyAs: '复制为', + paste: '粘贴', + insert: '插入', + delete: '删除', + deleteSelected: '删除选中', + hide: '隐藏', + hideSelected: '隐藏选中', + showHide: '显示隐藏', + to: '向', + left: '左', + right: '右', + top: '上', + bottom: '下', + add: '增加', + row: '行', + column: '列', + width: '宽', + height: '高', + number: '数字', + confirm: '确认', + orderAZ: 'A-Z顺序排列', + orderZA: 'Z-A降序排列', + clearContent: '清除内容', + matrix: '矩阵操作选区', + sortSelection: '排序选区', + filterSelection: '筛选选区', + chartGeneration: '图表生成', + firstLineTitle: '首行为标题', + untitled: '无标题', + array1: '一维数组', + array2: '二维数组', + array3: '多维数组', + diagonal: '对角线', + antiDiagonal: '反对角线', + diagonalOffset: '对角偏移', + offset: '偏移量', + boolean: '布尔值', + flip: '翻转', + upAndDown: '上下', + leftAndRight: '左右', + clockwise: '顺时针', + counterclockwise: '逆时针', + transpose: '转置', + matrixCalculation: '矩阵计算', + plus: '加', + minus: '减', + multiply: '乘', + divided: '除', + power: '次方', + root: '次方根', + log: 'log', + delete0: '删除两端0值', + removeDuplicate: '删除重复值', + byRow: '按行', + byCol: '按列', + generateNewMatrix: '生成新矩阵', + }, + comment:{ + "insert":"新建批注", + "edit":"编辑批注", + "delete":"删除", + "showOne":"显示/隐藏批注", + "showAll":"显示/隐藏所有批注" + }, + screenshot:{ + screenshotTipNoSelection:"请框选需要截图的范围", + screenshotTipTitle:"提示!", + screenshotTipHasMerge:"无法对合并单元格执行此操作", + screenshotTipHasMulti:"无法对多重选择区域执行此操作", + screenshotTipSuccess:"截取成功", + screenshotImageName:"截图", + + downLoadClose:"关闭", + downLoadCopy:"复制到剪切板", + downLoadBtn:"下载", + browserNotTip:"下载功能IE浏览器不支持!", + rightclickTip:"请在图片上右键点击'复制'", + successTip:"已成功复制(如果粘贴失败,请在图片上右键点击'复制图片')", + }, + splitText:{ + splitSymbol:"分割符号", + splitOther:"其它", + splitContinueSymbol:"连续分隔符号视为单个处理", + splitDataPreview:"数据预览", + splitTextTitle:"文本分列", + splitConfirmToExe:"此处已有数据,是否替换它?", + }, + punctuation:{ + "tab":"Tab 键", + "semicolon":"分号", + "comma":"逗号", + "space":"空格", + + }, + findAndReplace:{ + find:"查找", + replace:"替换", + goto:"转到", + location:"定位条件", + formula:"公式", + date:"日期", + number:"数字", + string:"字符", + error:"错误", + condition:"条件格式", + rowSpan:"间隔行", + columnSpan:"间隔列", + locationExample:"定位", + lessTwoRowTip:"请选择最少两行", + lessTwoColumnTip:"请选择最少两行", + + findTextbox:"查找内容", + replaceTextbox:"替换内容", + + regexTextbox:"正则表达式匹配", + wholeTextbox:"整词匹配", + distinguishTextbox:"区分大小写匹配", + + allReplaceBtn:"全部替换", + replaceBtn:"替换", + allFindBtn:"查找全部", + findBtn:"查找下一个", + + noFindTip:"没有查找到该内容", + + searchTargetSheet:"工作表", + searchTargetCell:"单元格", + searchTargetValue:"值", + + searchInputTip:"请输入查找内容", + + noReplceTip:"没有可替换的内容", + noMatchTip:"找不到匹配项", + + successTip:"已经帮您搜索并进行了${xlength}处替换", + }, + sheetconfig: { + delete: '删除', + copy: '复制', + rename: '重命名', + changeColor: '更改颜色', + hide: '隐藏', + unhide: '取消隐藏', + moveLeft: '向左移', + moveRight: '向右移', + resetColor: '重置颜色', + cancelText: '取消', + chooseText: '确定颜色', + }, + conditionformat: { + rule: '规则', + newRule: '新建规则', + editRule: '编辑规则', + deleteRule: '删除规则', + showRules: '显示其格式规则', + manageRules: '条件格式规则管理器', + format: '格式', + applyRange: '应用范围', + selectRange: '点击选择应用范围', + ruleTypeItem1: '基于各自值设置所有单元格的格式', + ruleTypeItem2: '只为包含以下内容的单元格设置格式', + ruleTypeItem3: '仅对排名靠前或靠后的数值设置格式', + ruleTypeItem4: '仅对高于或低于平均值的数值设置格式', + ruleTypeItem5: '仅对唯一值或重复值设置格式', + textColor: '文本颜色', + cellColor: '单元格颜色', + confirm: '确定', + cancel: '取消', + close: '关闭', + sheet: '表', + currentSheet: '当前工作表', + dataBar: '数据条', + dataBarColor: '数据条颜色', + colorGradation: '色阶', + icons: '图标集', + cellValue: '单元格值', + between: '介于', + in: '和', + between2: '之间', + contain: '包含', + duplicateValue: '重复值', + uniqueValue: '唯一值', + top: '前', + last: '后', + oneself: '个', + aboveAverage: '高于平均值', + belowAverage: '低于平均值', + chooseRuleType: '选择规则类型', + editRuleDescription: '编辑规则说明', + newFormatRule: '新建格式规则', + formatStyle: '格式样式', + fillType: '填充类型', + color: '颜色', + twocolor: '双色', + tricolor: '三色', + multicolor: '彩色', + grayColor: '灰色', + gradient: '渐变', + solid: '实心', + maxValue: '最大值', + medianValue: '中间值', + minValue: '最小值', + threeWayArrow: '三向箭头', + fourWayArrow: '四向箭头', + fiveWayArrow: '五向箭头', + threeTriangles: '3个三角形', + threeColorTrafficLight: '三色交通灯', + fourColorTrafficLight: '四色交通灯', + rimless: '无边框', + bordered: '有边框', + }, +}; diff --git a/src/luckysheet-chart.js b/src/luckysheet-chart.js deleted file mode 100644 index 25eaf3fdf..000000000 --- a/src/luckysheet-chart.js +++ /dev/null @@ -1,1102 +0,0 @@ -// 防止chart部分报错,从luckysheet-chartMix.js中迁移出luckysheet部分作为核心主体,关于设置界面的部分放到chartMix vue工程 -// chart用到的各个变量 -luckysheet.chartparam = { - luckysheet_chart_point_config: null, - luckysheetCurrentChartMove: false, - luckysheetCurrentChartMoveTimeout: null, - luckysheetCurrentChartResize: null, - luckysheet_chart_rangefocus_timeout: null, - luckysheet_chart_rangefocus: false, - luckysheet_chart_data_select_state: false, - luckysheetCurrentChartMoveObj: null, - luckysheetCurrentChartMoveXy: [], - luckysheetCurrentChartMoveWinH: null, - luckysheetCurrentChartMoveWinW: null, - luckysheetInsertChartTosheetChange: true, - jgridCurrentChartSelection: null, - luckysheetCurrentChartResizeObj: null, - luckysheetCurrentChartResizeXy: null, - luckysheetCurrentChartResizeWinH: null, - luckysheetCurrentChartResizeWinW: null, - luckysheet_chartIns_index: -1, - luckysheetCurrentChartActive: false, - - jgridCurrentChartData: null, - luckysheetcurrentChart: null, - - luckysheet_chart_redo_click: false, - jgridCurrentChartType: null, - luckysheetCurrentChartStyle: null, - luckysheetCurrentChartCurrentType: null, - - luckysheetPreviousChart: '' //最近最新的图表json -} - -// 初始化图表 -luckysheet.chartInitial = function () { - $('#luckysheetdatavisual').click(function () { - - // 未加入chartMix插件时返回 - if(!window.generateChart){ - luckysheet.tooltip.info('提示', "图表插件暂未加入"); - return; - } - //防止watch生效 - // generator.isFirstEditor = true; - generator.ini(chartMixConfig) - - setTimeout(function () { - generator.showChartSettingComponent('notRefresh') //此处不刷新,插入完图表再刷新 - }, 0) - if (store.state.chartSetting.isqk) { - setTimeout(function () { - luckysheet.luckysheetsizeauto() - }, 0) - } - - // var chartAllType = 'highcharts|line|default' - var chartAllType = 'echarts|line|default' - - //如果只选中一个单元格,则自动填充选取 - var luckysheet_select_save = luckysheet.getluckysheet_select_save() - if ( - luckysheet_select_save.length == 1 && - luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && - luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1] - ) { - luckysheet.luckysheetMoveHighlightRange2('right', 'rangeOfSelect') - - luckysheet.luckysheetMoveHighlightRange2('down', 'rangeOfSelect') - - luckysheet_select_save = luckysheet.getluckysheet_select_save() - } - //处理右边的空白单元格,自动略过并修改选区 ---------------start - var shiftpositon_row = -1 - - var row_ed = - luckysheet_select_save[0]['row'][1] - luckysheet_select_save[0]['row'][0] - for ( - var r = luckysheet_select_save[0]['row'][0]; - r <= luckysheet_select_save[0]['row'][1]; - r++ - ) { - for ( - var c = luckysheet_select_save[0]['column'][0]; - c <= luckysheet_select_save[0]['column'][1]; - c++ - ) { - var value = luckysheet.getcellvalue(r, c, luckysheet.flowdata) - //console.log("value,r,c",value,r,c); - if (value != null && value.toString().length > 0) { - shiftpositon_row = r - break - } - } - - if (shiftpositon_row !== -1) { - break - } - } - - if (shiftpositon_row == -1) { - shiftpositon_row = 0 - } - - luckysheet_select_save[0]['row'] = [shiftpositon_row, shiftpositon_row] - luckysheet.setluckysheet_select_save(luckysheet_select_save) - - luckysheet.luckysheet_shiftpositon = $.extend(true, {}, luckysheet_select_save[0]) - luckysheet.luckysheetMoveEndCell('down', 'range', false, row_ed) - luckysheet_select_save = luckysheet.getluckysheet_select_save() - - var shiftpositon_col = -1 - var column_ed = - luckysheet_select_save[0]['column'][1] - luckysheet_select_save[0]['column'][0] - for ( - var c = luckysheet_select_save[0]['column'][0]; - c <= luckysheet_select_save[0]['column'][1]; - c++ - ) { - for ( - var r = luckysheet_select_save[0]['row'][0]; - r <= luckysheet_select_save[0]['row'][1]; - r++ - ) { - var value = luckysheet.getcellvalue(r, c, luckysheet.flowdata) - if (value != null && value.toString().length > 0) { - shiftpositon_col = c - break - } - } - - if (shiftpositon_col !== -1) { - break - } - } - - if (shiftpositon_col == -1) { - shiftpositon_col = 0 - } - - luckysheet_select_save[0]['column'] = [shiftpositon_col, shiftpositon_col] - luckysheet.setluckysheet_select_save(luckysheet_select_save) - - luckysheet.luckysheet_shiftpositon = $.extend(true, {}, luckysheet_select_save[0]) - luckysheet.luckysheetMoveEndCell('right', 'range', false, column_ed) - luckysheet_select_save = luckysheet.getluckysheet_select_save() - - var dataSheetIndex = luckysheet.currentSheetIndex //当前sheet的原始索引 - var rangeArray = $.extend(true, [], luckysheet_select_save) - - //处理右边的空白单元格,自动略过并修改选区 ---------------end - - //根据选区来获取数据,########需要支持多选区取得的数据################## - var chartData = luckysheet.getdatabyselection( - luckysheet_select_save[0], - dataSheetIndex - ) - // 获取原始数据 - generator.chartData = chartData - var rangeTxt = luckysheet.sheetmanage.getRangetxt( - dataSheetIndex, - rangeArray[0], - dataSheetIndex - ) - - var chartTheme = 'default' - - var winw = $(window).width(), - winh = $(window).height() - var $cellmain = $('#luckysheet-cell-main') - var scrollLeft = $cellmain.scrollLeft(), - scrollTop = $cellmain.scrollTop() - var myw = winw * 0.3, - myh = winw * 0.3 * 0.618 - var myLeft = (winw - myw) / 3 + scrollLeft + Math.round(Math.random() * 10), - myTop = (winh - myh) / 4 + scrollTop + Math.round(Math.random() * 10) //先计算好位置 - - console.dir(JSON.stringify(chartData)) - console.dir(JSON.stringify(rangeArray)) - //luckysheet.insertChartTosheet放到insertNewChart中 - generator.insertNewChart( - chartAllType, - chartData, - dataSheetIndex, - rangeArray, - rangeTxt, - chartTheme, - luckysheet.currentSheetIndex, - myh, - myw, - myLeft, - myTop - ) - // setTimeout(function(){//暂时使用setTimeout解决watch第一次触发监听的问题 - // generator.isFirstEditor = false; - // },1000); - }) -} - -// 图表数据区域拖动修改 -luckysheet.chart_selection = { - create: function (chart_id) { - var chart_json = store.state.chartSetting.chartList[chart_id] - - if (chart_json.rangeArray.length > 1) { - return - } - - $('#luckysheet-chart-rangeShow').empty() - $('#luckysheet-cell-selected-boxs').hide() - $('#luckysheet-cell-selected-focus').hide() - $('#luckysheet-rows-h-selected').hide() - $('#luckysheet-cols-h-selected').hide() - $('#luckysheet-row-count-show').hide() - $('#luckysheet-column-count-show').hide() - - var st_r = chart_json.rangeArray[0].row[0] - var st_c = chart_json.rangeArray[0].column[0] - - var rangeSplitArray = chart_json.rangeSplitArray - - //首行是否标题 - var rangeRowCheck = chart_json.rangeRowCheck - - if (rangeRowCheck.exits) { - var chart_rowtitle_html = getRangeShowHtml( - 'rowtitle', - rangeSplitArray.rowtitle.row[0] + st_r, - rangeSplitArray.rowtitle.row[1] + st_r, - rangeSplitArray.rowtitle.column[0] + st_c, - rangeSplitArray.rowtitle.column[1] + st_c - ) - } else { - var chart_rowtitle_html = '' - } - - //首列是否标题 - var rangeColCheck = chart_json.rangeColCheck - - if (rangeColCheck.exits) { - var chart_coltitle_html = getRangeShowHtml( - 'coltitle', - rangeSplitArray.coltitle.row[0] + st_r, - rangeSplitArray.coltitle.row[1] + st_r, - rangeSplitArray.coltitle.column[0] + st_c, - rangeSplitArray.coltitle.column[1] + st_c - ) - } else { - var chart_coltitle_html = '' - } - - //内容块 - var chart_content_html = getRangeShowHtml( - 'content', - rangeSplitArray.content.row[0] + st_r, - rangeSplitArray.content.row[1] + st_r, - rangeSplitArray.content.column[0] + st_c, - rangeSplitArray.content.column[1] + st_c - ) - - $('#luckysheet-chart-rangeShow').append( - chart_rowtitle_html + chart_coltitle_html + chart_content_html - ) - - function getRangeShowHtml(type, r1, r2, c1, c2) { - var visibledatarow = luckysheet.getvisibledatarow() - var visibledatacolumn = luckysheet.getvisibledatacolumn() - - var row = visibledatarow[r2], - row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1] - var col = visibledatacolumn[c2], - col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1] - - if (type == 'rowtitle') { - var color = '#C65151' - } - - if (type == 'coltitle') { - var color = '#9667C0' - } - - if (type == 'content') { - var color = '#4970D1' - } - - var html = - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' - - return html - } - }, - rangeMove: false, - rangeMovexy: null, - rangeMoveIndex: null, - rangeMoveObj: null, - rangeMoveDraging: function (event, sheetBarHeight, statisticBarHeight) { - var chart_json = $.extend( - true, - {}, - store.state.chartSetting.chartList[store.state.chartSetting.chartCurrent] - ) - var st_r = chart_json.rangeArray[0].row[0] - var st_c = chart_json.rangeArray[0].column[0] - var rangeRowCheck = chart_json.rangeRowCheck - var rangeColCheck = chart_json.rangeColCheck - var rangeSplitArray = chart_json.rangeSplitArray - - var mouse = luckysheet.mouseposition(event.pageX, event.pageY) - var scrollLeft = $('#luckysheet-cell-main').scrollLeft() - var scrollTop = $('#luckysheet-cell-main').scrollTop() - - var x = mouse[0] + scrollLeft - var y = mouse[1] + scrollTop - - var winH = - $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, - winW = $(window).width() + scrollLeft - - var rowLocation = luckysheet.rowLocation(y), - row_index = rowLocation[2] - var colLocation = luckysheet.colLocation(x), - col_index = colLocation[2] - - var visibledatarow = luckysheet.getvisibledatarow() - var visibledatacolumn = luckysheet.getvisibledatacolumn() - - var $id = luckysheet.chart_selection.rangeMoveObj.attr('id') - - if ($id == 'luckysheet-chart-rangeShow-content') { - //行 - var row_s = - luckysheet.chart_selection.rangeMoveIndex[0] - - luckysheet.chart_selection.rangeMovexy[0] + - row_index - - if (rangeRowCheck.exits) { - if (row_s < st_r + rangeRowCheck.range[1] + 1 || y < 0) { - row_s = st_r + rangeRowCheck.range[1] + 1 - } - } else { - if (row_s < 0 || y < 0) { - row_s = 0 - } - } - - var row_e = - rangeSplitArray.content.row[1] - rangeSplitArray.content.row[0] + row_s - - if (row_e >= visibledatarow.length - 1 || y > winH) { - row_s = - visibledatarow.length - - 1 - - rangeSplitArray.content.row[1] + - rangeSplitArray.content.row[0] - row_e = visibledatarow.length - 1 - } - - //列 - var col_s = - luckysheet.chart_selection.rangeMoveIndex[1] - - luckysheet.chart_selection.rangeMovexy[1] + - col_index - if (rangeColCheck.exits) { - if (col_s < st_c + rangeColCheck.range[1] + 1 || x < 0) { - col_s = st_c + rangeColCheck.range[1] + 1 - } - } else { - if (col_s < 0 || x < 0) { - col_s = 0 - } - } - - var col_e = - rangeSplitArray.content.column[1] - - rangeSplitArray.content.column[0] + - col_s - - if (col_e >= visibledatacolumn.length - 1 || x > winW) { - col_s = - visibledatacolumn.length - - 1 - - rangeSplitArray.content.column[1] + - rangeSplitArray.content.column[0] - col_e = visibledatacolumn.length - 1 - } - - //更新 - if (rangeRowCheck.exits && rangeColCheck.exits) { - chart_json.rangeArray = [{ row: [st_r, row_e], column: [st_c, col_e] }] - chart_json.rangeSplitArray.range = { - row: [st_r, row_e], - column: [st_c, col_e] - } - - chart_json.rangeSplitArray.content = { - row: [row_s - st_r, row_e - st_r], - column: [col_s - st_c, col_e - st_c] - } - - chart_json.rangeSplitArray.rowtitle = { - row: chart_json.rangeSplitArray.rowtitle.row, - column: [col_s - st_c, col_e - st_c] - } - - chart_json.rangeSplitArray.coltitle = { - row: [row_s - st_r, row_e - st_r], - column: chart_json.rangeSplitArray.coltitle.column - } - } else if (rangeRowCheck.exits) { - chart_json.rangeArray = [{ row: [st_r, row_e], column: [col_s, col_e] }] - chart_json.rangeSplitArray.range = { - row: [st_r, row_e], - column: [col_s, col_e] - } - - chart_json.rangeSplitArray.content = { - row: [row_s - st_r, row_e - st_r], - column: chart_json.rangeSplitArray.content.column - } - } else if (rangeColCheck.exits) { - chart_json.rangeArray = [{ row: [row_s, row_e], column: [st_c, col_e] }] - chart_json.rangeSplitArray.range = { - row: [row_s, row_e], - column: [st_c, col_e] - } - - chart_json.rangeSplitArray.content = { - row: chart_json.rangeSplitArray.content.row, - column: [col_s - st_c, col_e - st_c] - } - } else { - chart_json.rangeArray = [ - { row: [row_s, row_e], column: [col_s, col_e] } - ] - chart_json.rangeSplitArray.range = { - row: [row_s, row_e], - column: [col_s, col_e] - } - } - } else if ($id == 'luckysheet-chart-rangeShow-rowtitle') { - //列 - var col_s = - luckysheet.chart_selection.rangeMoveIndex[1] - - luckysheet.chart_selection.rangeMovexy[1] + - col_index - - if (rangeColCheck.exits) { - if (col_s < st_c + rangeColCheck.range[1] + 1 || x < 0) { - col_s = st_c + rangeColCheck.range[1] + 1 - } - } else { - if (col_s < 0 || x < 0) { - col_s = 0 - } - } - - var col_e = - rangeSplitArray.rowtitle.column[1] - - rangeSplitArray.rowtitle.column[0] + - col_s - - if (col_e >= visibledatacolumn.length - 1 || x > winW) { - col_s = - visibledatacolumn.length - - 1 - - rangeSplitArray.rowtitle.column[1] + - rangeSplitArray.rowtitle.column[0] - col_e = visibledatacolumn.length - 1 - } - - //更新 - if (rangeColCheck.exits) { - chart_json.rangeArray = [ - { row: chart_json.rangeArray[0].row, column: [st_c, col_e] } - ] - chart_json.rangeSplitArray.range = { - row: chart_json.rangeArray[0].row, - column: [st_c, col_e] - } - - chart_json.rangeSplitArray.rowtitle = { - row: chart_json.rangeSplitArray.rowtitle.row, - column: [col_s - st_c, col_e - st_c] - } - chart_json.rangeSplitArray.content = { - row: chart_json.rangeSplitArray.content.row, - column: [col_s - st_c, col_e - st_c] - } - } else { - chart_json.rangeArray = [ - { row: chart_json.rangeArray[0].row, column: [col_s, col_e] } - ] - chart_json.rangeSplitArray.range = { - row: chart_json.rangeArray[0].row, - column: [col_s, col_e] - } - } - } else if ($id == 'luckysheet-chart-rangeShow-coltitle') { - //行 - var row_s = - luckysheet.chart_selection.rangeMoveIndex[0] - - luckysheet.chart_selection.rangeMovexy[0] + - row_index - if (rangeRowCheck.exits) { - if (row_s < st_r + rangeRowCheck.range[1] + 1 || y < 0) { - row_s = st_r + rangeRowCheck.range[1] + 1 - } - } else { - if (row_s < 0 || y < 0) { - row_s = 0 - } - } - - //更新 - var row_e = - rangeSplitArray.coltitle.row[1] - - rangeSplitArray.coltitle.row[0] + - row_s - - if (row_e >= visibledatarow.length - 1 || y > winH) { - row_s = - visibledatarow.length - - 1 - - rangeSplitArray.coltitle.row[1] + - rangeSplitArray.coltitle.row[0] - row_e = visibledatarow.length - 1 - } - - if (rangeRowCheck.exits) { - chart_json.rangeArray = [ - { row: [st_r, row_e], column: chart_json.rangeArray[0].column } - ] - chart_json.rangeSplitArray.range = { - row: [st_r, row_e], - column: chart_json.rangeArray[0].column - } - - chart_json.rangeSplitArray.coltitle = { - row: [row_s - st_r, row_e - st_r], - column: chart_json.rangeSplitArray.coltitle.column - } - chart_json.rangeSplitArray.content = { - row: [row_s - st_r, row_e - st_r], - column: chart_json.rangeSplitArray.content.column - } - } else { - chart_json.rangeArray = [ - { row: [row_s, row_e], column: chart_json.rangeArray[0].column } - ] - chart_json.rangeSplitArray.range = { - row: [row_s, row_e], - column: chart_json.rangeArray[0].column - } - } - } - - //部分更新 - store.commit({ - type: 'updateChartItem', - key: 'rangeArray', - value: chart_json.rangeArray, - chartId: chart_json.chart_id - }) - store.commit({ - type: 'updateChartItem', - key: 'rangeSplitArray', - value: chart_json.rangeSplitArray, - chartId: chart_json.chart_id - }) - luckysheet.chart_selection.create(store.state.chartSetting.chartCurrent) - }, - rangeMoveDragged: function () { - luckysheet.chart_selection.rangeMove = false - - var chart_json = $.extend( - true, - {}, - store.state.chartSetting.chartList[store.state.chartSetting.chartCurrent] - ) - - var updateJson = {} - updateJson.chart_id = store.state.chartSetting.chartCurrent - updateJson.rangeTxt = luckysheet.sheetmanage.getRangetxt( - luckysheet.currentSheetIndex, - chart_json.rangeArray[0], - luckysheet.currentSheetIndex - ) - updateJson.chartData = luckysheet.getdatabyselection( - chart_json.rangeArray[0], - luckysheet.currentSheetIndex - ) - - var $id = luckysheet.chart_selection.rangeMoveObj.attr('id') - if ( - $id == 'luckysheet-chart-rangeShow-content' && - !chart_json.rangeRowCheck.exits && - !chart_json.rangeColCheck.exits - ) { - //rangeMoveDraging中未更新chartData,在此使用新的chartData更新到updateJson - updateJson.rangeSplitArray = generator.getRangeSplitArray( - updateJson.chartData, - chart_json.rangeArray, - chart_json.rangeColCheck, - chart_json.rangeRowCheck - ) - } else { - updateJson.rangeSplitArray = chart_json.rangeSplitArray - } - - var chartAllTypeArray = chart_json.chartAllType.split('|') - var chartPro = chartAllTypeArray[0], - chartType = chartAllTypeArray[1], - chartStyle = chartAllTypeArray[2] - - updateJson.chartDataCache = generator.getChartDataCache( - updateJson.chartData, - updateJson.rangeSplitArray, - chartPro, - chartType, - chartStyle - ) - updateJson.chartDataSeriesOrder = generator.getChartDataSeriesOrder( - updateJson.chartDataCache.series[0].length - ) - // 是否是移动改变图形 - generator.drag = true - // 不增加点/线/区域 - generator.addPoint = false - generator.addLine = false - generator.addArea = false - if (chartType == 'funnel' || chartType == 'gauge') { - updateJson.defaultOption = generator.addDataToOption1( - chart_json.defaultOption, - updateJson.chartDataCache, - updateJson.chartDataSeriesOrder, - chartPro, - chartType, - chartStyle - ) - } else { - updateJson.defaultOption = generator.addDataToOption( - chart_json.defaultOption, - updateJson.chartDataCache, - updateJson.chartDataSeriesOrder, - chartPro, - chartType, - chartStyle - ) - } - - // console.dir(JSON.stringify(updateJson.defaultOption)) - generator.patchVueSet(updateJson) - generator.generateChart( - updateJson.defaultOption, - chart_json.chartTheme, - chart_json.chartAllType, - $('#' + updateJson.chart_id).get(0) - ) - }, - rangeResize: false, - rangeResizexy: null, - rangeResizeIndex: null, - rangeResizeObj: null, - rangeResizeDraging: function (event, sheetBarHeight, statisticBarHeight) { - var chart_json = $.extend( - true, - {}, - store.state.chartSetting.chartList[store.state.chartSetting.chartCurrent] - ) - var st_r = chart_json.rangeArray[0].row[0] - var st_c = chart_json.rangeArray[0].column[0] - var rangeRowCheck = chart_json.rangeRowCheck - var rangeColCheck = chart_json.rangeColCheck - var rangeSplitArray = chart_json.rangeSplitArray - - var mouse = luckysheet.mouseposition(event.pageX, event.pageY) - var scrollLeft = $('#luckysheet-cell-main').scrollLeft() - var scrollTop = $('#luckysheet-cell-main').scrollTop() - - var x = mouse[0] + scrollLeft - var y = mouse[1] + scrollTop - - var winH = - $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, - winW = $(window).width() + scrollLeft - - var rowLocation = luckysheet.rowLocation(y), - row_index = rowLocation[2] - var colLocation = luckysheet.colLocation(x), - col_index = colLocation[2] - - var visibledatarow = luckysheet.getvisibledatarow() - var visibledatacolumn = luckysheet.getvisibledatacolumn() - - var $id = luckysheet.chart_selection.rangeResizeObj.attr('id') - - if ($id == 'luckysheet-chart-rangeShow-content') { - var r1, r2, c1, c2 - - if (luckysheet.chart_selection.rangeResize == 'lt') { - r1 = luckysheet.chart_selection.rangeResizeIndex.row[0] - c1 = luckysheet.chart_selection.rangeResizeIndex.column[0] - - r2 = luckysheet.chart_selection.rangeResizeIndex.row[1] - c2 = luckysheet.chart_selection.rangeResizeIndex.column[1] - } else if (luckysheet.chart_selection.rangeResize == 'lb') { - r1 = luckysheet.chart_selection.rangeResizeIndex.row[1] - c1 = luckysheet.chart_selection.rangeResizeIndex.column[0] - - r2 = luckysheet.chart_selection.rangeResizeIndex.row[0] - c2 = luckysheet.chart_selection.rangeResizeIndex.column[1] - } else if (luckysheet.chart_selection.rangeResize == 'rt') { - r1 = luckysheet.chart_selection.rangeResizeIndex.row[0] - c1 = luckysheet.chart_selection.rangeResizeIndex.column[1] - - r2 = luckysheet.chart_selection.rangeResizeIndex.row[1] - c2 = luckysheet.chart_selection.rangeResizeIndex.column[0] - } else if (luckysheet.chart_selection.rangeResize == 'rb') { - r1 = luckysheet.chart_selection.rangeResizeIndex.row[1] - c1 = luckysheet.chart_selection.rangeResizeIndex.column[1] - - r2 = luckysheet.chart_selection.rangeResizeIndex.row[0] - c2 = luckysheet.chart_selection.rangeResizeIndex.column[0] - } - - //行 - if (rangeRowCheck.exits) { - var row_s = r1 - luckysheet.chart_selection.rangeResizexy[0] + row_index - - if (row_s < st_r + rangeRowCheck.range[1] + 1 || y < 0) { - row_s = st_r + rangeRowCheck.range[1] + 1 - } else if (row_s >= visibledatarow.length - 1 || y > winH) { - row_s = visibledatarow.length - 1 - } - } else { - var row_s = st_r - luckysheet.chart_selection.rangeResizexy[0] + row_index - - if (row_s < 0 || y < 0) { - row_s = 0 - } else if (row_s >= visibledatarow.length - 1 || y > winH) { - row_s = visibledatarow.length - 1 - } - } - - //列 - if (rangeColCheck.exits) { - var col_s = c1 - luckysheet.chart_selection.rangeResizexy[1] + col_index - - if (col_s < st_c + rangeColCheck.range[1] + 1 || x < 0) { - col_s = st_c + rangeColCheck.range[1] + 1 - } else if (col_s >= visibledatacolumn.length - 1 || x > winW) { - col_s = visibledatacolumn.length - 1 - } - } else { - var col_s = st_c - luckysheet.chart_selection.rangeResizexy[1] + col_index - - if (col_s < 0 || x < 0) { - col_s = 0 - } else if (col_s >= visibledatacolumn.length - 1 || x > winW) { - col_s = visibledatacolumn.length - 1 - } - } - - var obj_r1, obj_r2, obj_c1, obj_c2 - - if (row_s > r2) { - obj_r1 = r2 - obj_r2 = row_s - } else { - obj_r1 = row_s - obj_r2 = r2 - } - - if (col_s > c2) { - obj_c1 = c2 - obj_c2 = col_s - } else { - obj_c1 = col_s - obj_c2 = c2 - } - - if (!rangeRowCheck.exits && !rangeColCheck.exits) { - chart_json.rangeArray = [ - { row: [obj_r1, obj_r2], column: [obj_c1, obj_c2] } - ] - chart_json.rangeSplitArray.range = { - row: [obj_r1, obj_r2], - column: [obj_c1, obj_c2] - } - } else { - chart_json.rangeArray = [ - { row: [st_r, obj_r2], column: [st_c, obj_c2] } - ] - chart_json.rangeSplitArray.range = { - row: [st_r, obj_r2], - column: [st_c, obj_c2] - } - - chart_json.rangeSplitArray.content = { - row: [obj_r1 - st_r, obj_r2 - st_r], - column: [obj_c1 - st_c, obj_c2 - st_c] - } - - if (rangeRowCheck.exits) { - chart_json.rangeSplitArray.rowtitle = { - row: chart_json.rangeSplitArray.rowtitle.row, - column: [obj_c1 - st_c, obj_c2 - st_c] - } - } - - if (rangeColCheck.exits) { - chart_json.rangeSplitArray.coltitle = { - row: [obj_r1 - st_r, obj_r2 - st_r], - column: chart_json.rangeSplitArray.coltitle.column - } - } - } - } else if ($id == 'luckysheet-chart-rangeShow-rowtitle') { - var c1, c2 - - if ( - luckysheet.chart_selection.rangeResize == 'lt' || - luckysheet.chart_selection.rangeResize == 'lb' - ) { - c1 = luckysheet.chart_selection.rangeResizeIndex.column[0] - c2 = luckysheet.chart_selection.rangeResizeIndex.column[1] - } else if ( - luckysheet.chart_selection.rangeResize == 'rt' || - luckysheet.chart_selection.rangeResize == 'rb' - ) { - c1 = luckysheet.chart_selection.rangeResizeIndex.column[1] - c2 = luckysheet.chart_selection.rangeResizeIndex.column[0] - } - - //列 - if (rangeColCheck.exits) { - var col_s = c1 - luckysheet.chart_selection.rangeResizexy[1] + col_index - - if (col_s < st_c + rangeColCheck.range[1] + 1 || x < 0) { - col_s = st_c + rangeColCheck.range[1] + 1 - } else if (col_s >= visibledatacolumn.length - 1 || x > winW) { - col_s = visibledatacolumn.length - 1 - } - } else { - var col_s = st_c - luckysheet.chart_selection.rangeResizexy[1] + col_index - - if (col_s < 0 || x < 0) { - col_s = 0 - } else if (col_s >= visibledatacolumn.length - 1 || x > winW) { - col_s = visibledatacolumn.length - 1 - } - } - - var obj_c1, obj_c2 - - if (col_s > c2) { - obj_c1 = c2 - obj_c2 = col_s - } else { - obj_c1 = col_s - obj_c2 = c2 - } - - //更新 - if (!rangeColCheck.exits) { - chart_json.rangeArray = [ - { row: chart_json.rangeArray[0].row, column: [obj_c1, obj_c2] } - ] - chart_json.rangeSplitArray.range = { - row: chart_json.rangeArray[0].row, - column: [obj_c1, obj_c2] - } - } else { - chart_json.rangeArray = [ - { row: chart_json.rangeArray[0].row, column: [st_c, obj_c2] } - ] - chart_json.rangeSplitArray.range = { - row: chart_json.rangeArray[0].row, - column: [st_c, obj_c2] - } - - chart_json.rangeSplitArray.rowtitle = { - row: chart_json.rangeSplitArray.rowtitle.row, - column: [obj_c1 - st_c, obj_c2 - st_c] - } - chart_json.rangeSplitArray.content = { - row: chart_json.rangeSplitArray.content.row, - column: [obj_c1 - st_c, obj_c2 - st_c] - } - } - } else if ($id == 'luckysheet-chart-rangeShow-coltitle') { - var r1, r2 - - if ( - luckysheet.chart_selection.rangeResize == 'lt' || - luckysheet.chart_selection.rangeResize == 'rt' - ) { - r1 = luckysheet.chart_selection.rangeResizeIndex.row[0] - r2 = luckysheet.chart_selection.rangeResizeIndex.row[1] - } else if ( - luckysheet.chart_selection.rangeResize == 'lb' || - luckysheet.chart_selection.rangeResize == 'rb' - ) { - r1 = luckysheet.chart_selection.rangeResizeIndex.row[1] - r2 = luckysheet.chart_selection.rangeResizeIndex.row[0] - } - - //行 - if (rangeRowCheck.exits) { - var row_s = r1 - luckysheet.chart_selection.rangeResizexy[0] + row_index - - if (row_s < st_r + rangeRowCheck.range[1] + 1 || y < 0) { - row_s = st_r + rangeRowCheck.range[1] + 1 - } else if (row_s >= visibledatarow.length - 1 || y > winH) { - row_s = visibledatarow.length - 1 - } - } else { - var row_s = st_r - luckysheet.chart_selection.rangeResizexy[0] + row_index - - if (row_s < 0 || y < 0) { - row_s = 0 - } else if (row_s >= visibledatarow.length - 1 || y > winH) { - row_s = visibledatarow.length - 1 - } - } - - var obj_r1, obj_r2 - - if (row_s > r2) { - obj_r1 = r2 - obj_r2 = row_s - } else { - obj_r1 = row_s - obj_r2 = r2 - } - - //更新 - if (!rangeRowCheck.exits) { - chart_json.rangeArray = [ - { row: [obj_r1, obj_r2], column: chart_json.rangeArray[0].column } - ] - chart_json.rangeSplitArray.range = { - row: [obj_r1, obj_r2], - column: chart_json.rangeArray[0].column - } - } else { - chart_json.rangeArray = [ - { row: [st_r, obj_r2], column: chart_json.rangeArray[0].column } - ] - chart_json.rangeSplitArray.range = { - row: [st_r, obj_r2], - column: chart_json.rangeArray[0].column - } - - chart_json.rangeSplitArray.coltitle = { - row: [obj_r1 - st_r, obj_r2 - st_r], - column: chart_json.rangeSplitArray.coltitle.column - } - chart_json.rangeSplitArray.content = { - row: [obj_r1 - st_r, obj_r2 - st_r], - column: chart_json.rangeSplitArray.content.column - } - } - } - - //部分更新 - store.commit({ - type: 'updateChartItem', - key: 'rangeArray', - value: chart_json.rangeArray, - chartId: chart_json.chart_id - }) - store.commit({ - type: 'updateChartItem', - key: 'rangeSplitArray', - value: chart_json.rangeSplitArray, - chartId: chart_json.chart_id - }) - luckysheet.chart_selection.create(store.state.chartSetting.chartCurrent) - }, - rangeResizeDragged: function () { - luckysheet.chart_selection.rangeResize = null - - var chart_json = $.extend( - true, - {}, - store.state.chartSetting.chartList[store.state.chartSetting.chartCurrent] - ) - - var updateJson = {} - - updateJson.chart_id = store.state.chartSetting.chartCurrent - updateJson.rangeTxt = luckysheet.sheetmanage.getRangetxt( - luckysheet.currentSheetIndex, - chart_json.rangeArray[0], - luckysheet.currentSheetIndex - ) - updateJson.chartData = luckysheet.getdatabyselection( - chart_json.rangeArray[0], - luckysheet.currentSheetIndex - ) - - var $id = luckysheet.chart_selection.rangeResizeObj.attr('id') - if ( - $id == 'luckysheet-chart-rangeShow-content' && - !chart_json.rangeRowCheck.exits && - !chart_json.rangeColCheck.exits - ) { - //采用updateJson.chartData - updateJson.rangeSplitArray = generator.getRangeSplitArray( - updateJson.chartData, - chart_json.rangeArray, - chart_json.rangeColCheck, - chart_json.rangeRowCheck - ) - } else { - updateJson.rangeSplitArray = chart_json.rangeSplitArray - } - - var chartAllTypeArray = chart_json.chartAllType.split('|') - var chartPro = chartAllTypeArray[0], - chartType = chartAllTypeArray[1], - chartStyle = chartAllTypeArray[2] - - updateJson.chartDataCache = generator.getChartDataCache( - updateJson.chartData, - updateJson.rangeSplitArray, - chartPro, - chartType, - chartStyle - ) - updateJson.chartDataSeriesOrder = generator.getChartDataSeriesOrder( - updateJson.chartDataCache.series[0].length - ) - if (chartType == 'funnel' || chartType == 'gauge') { - updateJson.defaultOption = generator.addDataToOption1( - chart_json.defaultOption, - updateJson.chartDataCache, - updateJson.chartDataSeriesOrder, - chartPro, - chartType, - chartStyle - ) - } else { - updateJson.defaultOption = generator.addDataToOption( - chart_json.defaultOption, - updateJson.chartDataCache, - updateJson.chartDataSeriesOrder, - chartPro, - chartType, - chartStyle - ) - } - - generator.patchVueSet(updateJson) - - generator.generateChart( - updateJson.defaultOption, - chart_json.chartTheme, - chart_json.chartAllType, - $('#' + updateJson.chart_id).get(0) - ) - } -} \ No newline at end of file diff --git a/src/luckysheet-core.js b/src/luckysheet-core.js deleted file mode 100644 index 9abb0e6c6..000000000 --- a/src/luckysheet-core.js +++ /dev/null @@ -1,54560 +0,0 @@ -(function () { - //start兼容event 火狐 - function __firefox(){ - HTMLElement.prototype.__defineGetter__("runtimeStyle", __element_style); - window.constructor.prototype.__defineGetter__("event", __window_event); - Event.prototype.__defineGetter__("srcElement", __event_srcElement); - } - - function __element_style(){ - return this.style; - } - - function __window_event(){ - return __window_event_constructor(); - } - - function __event_srcElement(){ - return this.target; - } - - function __window_event_constructor(){ - if(document.all){ - return window.event; - } - - var _caller = __window_event_constructor.caller; - - while(_caller != null){ - var _argument = _caller.arguments[0]; - - if(_argument){ - var _temp = _argument.constructor; - - if(_temp.toString().indexOf("Event") != -1){ - return _argument; - } - } - - _caller = _caller.caller; - } - - return null; - } - - if(window.addEventListener && (isFirefox = navigator.userAgent.indexOf("Firefox") > 0)){ - __firefox(); - } - //end 兼容event 火狐 - - var luckysheet = {}; - - //通用方法 - //计算+-*/ 解决js精度问题 - luckysheet.floatTool = function() { - - /* - * 判断obj是否为一个整数 - */ - function isInteger(obj) { - return Math.floor(obj) === obj; - } - - /* - * 将一个浮点数转成整数,返回整数和倍数。如 3.14 >> 314,倍数是 100 - * @param floatNum {number} 小数 - * @return {object} - * {times:100, num: 314} - */ - function toInteger(floatNum) { - var ret = {times: 1, num: 0}; - - if (isInteger(floatNum)) { - ret.num = floatNum; - return ret; - } - - var strfi = floatNum + ''; - var dotPos = strfi.indexOf('.'); - var len = strfi.substr(dotPos + 1).length; - var times = Math.pow(10, len); - var intNum = parseInt(floatNum * times + 0.5, 10); - - ret.times = times; - ret.num = intNum; - - return ret; - } - - /* - * 核心方法,实现加减乘除运算,确保不丢失精度 - * 思路:把小数放大为整数(乘),进行算术运算,再缩小为小数(除) - * - * @param a {number} 运算数1 - * @param b {number} 运算数2 - * @param digits {number} 精度,保留的小数点数,比如 2, 即保留为两位小数 - * @param op {string} 运算类型,有加减乘除(add/subtract/multiply/divide) - * - */ - function operation(a, b, op) { - var o1 = toInteger(a); - var o2 = toInteger(b); - var n1 = o1.num; - var n2 = o2.num; - var t1 = o1.times; - var t2 = o2.times; - var max = t1 > t2 ? t1 : t2; - var result = null; - - switch (op) { - case 'add': - if (t1 === t2) { // 两个小数位数相同 - result = n1 + n2; - } - else if (t1 > t2) { // o1 小数位 大于 o2 - result = n1 + n2 * (t1 / t2); - } - else { // o1 小数位 小于 o2 - result = n1 * (t2 / t1) + n2; - } - - return result / max; - case 'subtract': - if (t1 === t2) { - result = n1 - n2; - } - else if (t1 > t2) { - result = n1 - n2 * (t1 / t2); - } - else { - result = n1 * (t2 / t1) - n2; - } - - return result / max; - case 'multiply': - result = (n1 * n2) / (t1 * t2); - - return result; - case 'divide': - return result = function() { - var r1 = n1 / n2; - var r2 = t2 / t1; - return operation(r1, r2, 'multiply'); - }(); - } - } - - // 加减乘除的四个接口 - function add(a, b) { - return operation(a, b, 'add'); - } - function subtract(a, b) { - return operation(a, b, 'subtract'); - } - function multiply(a, b) { - return operation(a, b, 'multiply'); - } - function divide(a, b) { - return operation(a, b, 'divide'); - } - - // exports - return { - add: add, - subtract: subtract, - multiply: multiply, - divide: divide - }; - }(); - - //判断一个字符串是否为标准JSON格式 - luckysheet.isJsonString = function(str){ - try{ - if(typeof JSON.parse(str) == "object"){ - return true; - } - } catch(e){} - return false; - } - - //判断一个变量是否为纯数字,null/""/undefined/"34rt"/"34e" 不为数字,34/"34"/"34e10"为数字 - luckysheet.isRealNum = function(val){ - if(val === "" || val ==null){ - return false; - } - if(!isNaN(val)){ - return true; - }else{ - return false; - } - } - - //data:[["1","dd","haha", {d:"xyz", color:"#ffffff", bg:"#000000",fa:"宋体|微软雅黑|...",size:"20px",weight:"normal|bold",style:"normal|italic",decoration:"underline|line-through|overline"},"哈啊哈哈"],[],[],[]] - var defaultSetting = { - container: "luckysheet", //容器的ID - column: 60, //空表格默认的列数量 - row: 84, //空表格默认的行数据量 - allowCopy: true, //是否允许拷贝 - showtoolbar: true, //是否第二列显示工具栏 - showinfobar: true, //是否显示顶部名称栏 - showsheetbar: true, //是否显示底部表格名称区域 - showstatisticBar: true, //是否显示底部计数栏 - pointEdit: false, //是否是编辑器插入表格模式 - pointEditUpdate: null, //编辑器表格更新函数 - pointEditZoom: 1, //编辑器表格编辑时缩放比例 - // menu: "undo|redo|freezenrow|freezencolumn|download|share|chart|pivot", - data: [{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }], //客户端sheet数据[shee1, sheet2, sheet3] - title: "Luckysheet Demo", //表格的名称 - userInfo: ' rabbit', //右上角的用户信息展示样式 - userMenuItem: [{url:"www.baidu.com", "icon":'', "name":"我的表格"}, {url:"www.baidu.com", "icon":'', "name":"退出登陆"}], //点击右上角的用户信息弹出的菜单 - myFolderUrl: "www.baidu.com", //左上角<返回按钮的链接 - config: {}, //表格行高、列宽、合并单元格、公式等设置 - fullscreenmode: true, //是否全屏模式,非全屏模式下,标记框不会强制选中。 - devicePixelRatio: window.devicePixelRatio, //设备比例,比例越大表格分标率越高 - allowEdit: true, //是否允许前台编辑 - loadUrl: "", // 配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段 - loadSheetUrl: "", //配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合 - gridKey: "", // 表格唯一标识符 - updateUrl: "", //表格数据的更新地址 - updateImageUrl: "", //缩略图的更新地址 - allowUpdate: false, //是否允许编辑后的后台更新 - functionButton: "", //右上角功能按钮,例如' ' - showConfigWindowResize: true, //图表和数据透视表的配置会在右侧弹出,设置弹出后表格是否会自动缩进 - enableAddRow: true,//允许增加行 - enableAddCol: true,//允许增加列 - enablePage: false,//允许加载下一页 - autoFormatw: false, //自动格式化超过4位数的数字为 亿万格式 例:true or "true" or "TRUE" - accuracy: undefined, //设置传输来的数值的精确位数,小数点后n位 传参数为数字或数字字符串,例: "0" 或 0 - pageInfo:{ - // "allFront": [], - // "isTpshow": "", - // "pageSize": 5000, - // "totalPage": 10, - // "currentPage": 0, - // "pageUrl": "", - // "id": '', - // "dfs": [], - // "filter": [], - // "sort": [], - // "startDate": '', - // "endDate": '', - // 'isNow': "", - // 'gdateNum': "" - - // rptapp - 'queryExps':'', - 'reportId':'', - 'fields':'', - 'mobile':'', - 'frezon':'', - 'currentPage':'', - "totalPage":10, - "pageUrl":"", - }, - editMode: false, //是否为编辑模式 - chartConfigChange: null,//图表插件中图表更新触发的自定义方法 - beforeCreateDom: null,//表格创建之前的方法 - fireMousedown: null //单元格数据下钻 - }; - - //dom变量 - var gridHTML = '
' + - '' + - '
' + - '' + - '
' + - '
' + - '' + - '
' + - '
' + - '' + - '
' + - '
新打开
' + - '
待更新
' + - '
${functionButton}
' + - '
' + - '
${menu}
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - '' + - '
' + - '
' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
${columnHeader}' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
${rowHeader}' + - '
' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
${flow}' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
', - columeHeader_word = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'], - columeHeader_word_index = { 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25 }, - flow = '
${flow}
', - colsmenuHTML = '', - rightclickHTML = '
复制
复制为
粘贴
增加
增加
删除选中
px
A-Z顺序排列
Z-A降序排列
清除内容
矩阵操作选区
排序选区
筛选选区
图表生成
Json
一维数组
二维数组
多维数组
×
对角线
反对角线
对角偏移
布尔值
翻转
翻转
转置
矩阵计算
删除两端0值
删除重复值
生成新矩阵
', - pivottableconfigHTML = '
排序
排序依据
显示总计
', - pivottablesumHTML = '
求和
数值计数
计数
去重计数
平均值
最大值
最小值
中位数
乘积
标准差
整体标准差
方差
整体方差
', - sheetHTML = '
${name} ${colorset}
', - columnHeaderHTML = '
${column}
', - sheetselectlistHTML = '
${item}
', - sheetselectlistitemHTML = '
${icon}${name}
', - inputHTML = '
', - modelHTML = '', - - maskHTML = '
', - filtermenuHTML = '
以A-Z升序排列
以Z-A降序排列
按颜色筛选
按条件过滤
按值过滤
全选 - 清除 - 反选
确 认
取 消
清除筛选
', - filtersubmenuHTML = '
单元格为空
单元格有数据
文本包含
文本不包含
文本开头为
文本结尾为
文本等于
日期等于
日期早于
日期晚于
大于
大于等于
小于
小于等于
等于
不等于
介于
不在其中
', - sheetconfigHTML = '
删除
复制
重命名
更改颜色
隐藏
取消隐藏
向左移
向右移
重置颜色
' - ; - - - var luckysheetPivotTableHTML = '
数据透视表
编辑范围
选择需要添加到数据透视表的字段 清除
筛选
数值
'; - - var luckysheetAlternateformatHtml = '
'+ - '
'+ - '交替颜色'+ - ''+ - ''+ - ''+ - '
'+ - '
'+ - '
应用范围
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - '
格式样式
'+ - '
'+ - '
自定义
'+ - '
'+ - '
'+ - '
'+ - '
页眉
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
颜色1
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
颜色2
'+ - '
'+ - '
'+ - '
'+ - ''+ - '
'+ - ''+ - '
'+ - '
'; - - var luckysheetchartpointconfigHTML = '
选择维度
排序
全选 - 清除 - 反选可以直接框选数据点
数据点设置
图形颜色
图形大小
图形形状
边框粗细
边框样式
边框颜色
文字标签
数值比例
小数位数
标签格式
数据名称
标签位置
'; - var luckysheetToolHTML = ''; - - var menuToolBar = '
¥
%
123
微软雅黑
冻结首行
求和
条件格式
批注
数据透视表
图表
截图
分列
'; - var luckysheetlodingHTML = '
渲染中...
'; - - // var menusetting = { - // menu_selectall: '
全选
', - // menu_copy: '
复制
', - // menu_undo: '
撤销
', - // menu_redo: '
恢复
', - // menu_paste: '
粘贴
', - // menu_download: '
下载
', - // menu_share: '
分享
', - // menu_chart: '
图表生成
', - // menu_pivot: '
数据透视表
', - // menu_freezenrow: '
冻结首行
', - // menu_freezencolumn: '
冻结首列
', - // }; - - - luckysheet.jfcolor = [ - "#c1232b", - "#27727b", - "#fcce10", - "#e87c25", - "#b5c334", - "#fe8463", - "#9bca63", - "#fad860", - "#f3a43b", - "#60c0dd", - "#d7504b", - "#c6e579", - "#f4e001", - "#f0805a", - "#26c0c0", - "#c12e34", - "#e6b600", - "#0098d9", - "#2b821d", - "#005eaa", - "#339ca8", - "#cda819", - "#32a487", - "#3fb1e3", - "#6be6c1", - "#626c91", - "#a0a7e6", - "#c4ebad", - "#96dee8" - ]; - - var keycode = { - - BACKSPACE: 8, - TAB: 9, - ENTER: 13, - SHIFT: 16, - CTRL: 17, - PAUSE: 19, - CAPSLOCK: 20, - ESC: 27, - - SPACE: 33, - PAGEUP: 33, - PAGEDOWN: 34, - END: 35, - HOME: 36, - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - INSERT: 45, - DELETE: 46, - - WIN: 91, - WIN_R: 92, - MENU: 93, - - F1: 112, - F2: 113, - F3: 114, - F4: 115, - F5: 116, - F6: 117, - F7: 118, - F8: 119, - F9: 120, - F10: 121, - F11: 122, - F12: 123, - NUMLOCK: 144, - SCROLLLOCK: 145 - }; - - //动态表格 - var visibledatarow = [], visibledatacolumn = [], rowsplit = [], rowsplitlen = 20000, colsplit = [], colsplitlen = 12000, ch_width = 0, rh_height = 0, iscopyself = true; - - //各个部分高度设定 - var toolbarHeight = 35, infobarHeight = 30, calculatebarHeight = 30, rowHeaderWidth = 46, columeHeaderHeight = 20, cellMainSrollBarSize = 12, sheetBarHeight = 27, statisticBarHeight = 23, copyType = "normal", copysetting = [], luckysheetTableContentHW = [0, 0]; - - var defaultcollen = 73, defaultrowlen = 19; - luckysheet.defaultcollen = defaultcollen; - luckysheet.defaultrowlen = defaultrowlen; - - var luckysheet_select_status = false, - luckysheet_select_save = [{ "row": [0, 0], "column": [0, 0] }], - luckysheet_selection_range = [], - luckysheet_copy_save = {}, - luckysheet_paste_iscut = false, luckysheet_filter_save = { "row": [], "column": [] }; - - //条件格式规则 - var luckysheet_conditionformat_save = []; - - var clearjfundo = true, sourcechange = true, config = {}, filterchage = true, luckysheetCellUpdate = [], luckysheetRightHeadClickIs = "column"; - - var luckysheet_sheet_move_status = false, luckysheet_sheet_move_data = [], luckysheet_scroll_status = false; - var luckysheetisrefreshdetail = true, luckysheetisrefreshtheme = true, luckysheetcurrentisPivotTable = false; - - var luckysheetautoadjust = null, luckysheetautoadjustmousedown = 2, luckysheetautoscrollp = [0, 0]; - - var devicePixelRatio = 1; - var luckysheetdefaultstyle = null; - var luckysheet_shiftkeydown = false; - - luckysheet.flowdata = null; - luckysheet.currentSheetIndex = 0; - luckysheet.luckysheet_shiftpositon = null; - - var jfcountfuncTimeout = null, jfautoscrollTimeout = null; - - luckysheet.jfredo = []; - luckysheet.jfundo = []; - - luckysheet.modelHTML = modelHTML; - - var luckysheet_CFiconsImg = new Image(); - luckysheet_CFiconsImg.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZoAAAGACAYAAACUS6SeAAAACXBIWXMAAC4jAAAuIwF4pT92AAAK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j3Hc5K0kEhCPhwYCjyIHyP0POGfixFGbvdS5vSG8qv/AFo6bXEc8DvF4aDedGbJzVWcsFvooGk0y+YSt9OjRSlNTuKDydFPnrFnzi1o/Q9+9fE034H7gWKwdL9oCPAycf/qXN7cYY1GJnEP9lSxziW1pNVb+bKDOiqExlaognUDLhIPfAzmWtGCdFhtGRzrNe6rTBZ39BwxqMcbEM52KouQnDPwCmIz1M6zLzVDx+sce6c5jj3QH+IF5L2oxjTKT5502tBasM+091dmBdK5a+UlqxOKHTkVRchiaQrtr6fcd50Iabl6rOlWn3zoVRclhaHoWeG+ftNdupJEP1ak6g6xTUZQchkZRlCzo+oyiqKFRFEVR1NAoiqIoamgURVEURQ2NoiiKooZGURRFUdTQKIqiKGpoFEVRlHZlaOoKvDc9mJsbaeRDdarOIOtUFCWHoXm0wHsfS3vtRhr5UJ2qM8g6FUXJQhlwFVALfAFrx3a2mgfw9rT3bgX6IefXWwl+mEDOUvieDa2qU3UGWaeiKDkMTR0SPt0JLcC3zJ9XqE7VGWSdiqLkMDQdgrdm7+c4jbPO9jZ9t/BDpznfR1EUxZKh6QLci/WpiTgyNXE5Ow/AKgfuAk6zODWRRA6WuhjrC7WqU3UGWaeiKDkMzQzgTJv3XYwcRXqT+f9U4CKbaXwFOafa6n2qU3UGWaeiKFkIA2cUeO/paa/dSCMfqlN1Blmnoig5DE2XAu/t3mZ6w2ka+VCdqjPIOhVFyWFoFEVRFEUNjaIoiqKGRlEURVHU0CiKoihqaBRFURQ1NIqiKIqihkZRFEVRQ6MoiqJ0BEOzscB716W9diONfKhO1RlknYqi5DA0/yrw3mfTXj/nQhr5UJ2qM8g6FUXJYWguNw9zq8V7WoC/Ajenvfdj4G/sjJabj1bzEE+xoVV1qs4g61QUJQv/PwAlukJhy2ScjQAAAABJRU5ErkJggg=="; - - luckysheet.getluckysheet_select_save = function () { - return luckysheet_select_save; - }; - - luckysheet.setluckysheet_select_save = function (v) { - luckysheet_select_save = v; - }; - - luckysheet.getluckysheet_scroll_status = function () { - return luckysheet_scroll_status; - }; - - luckysheet.setluckysheet_scroll_status = function (v) { - luckysheet_scroll_status = v; - }; - - var luckysheetConfigsetting = { - allowCopy: true, - showtoolbar: true, - showinfobar: true, - showsheetbar: true, - showstatisticBar: true, - pointEdit: false, - pointEditUpdate: null, - pointEditZoom: 1, - showConfigWindowResize: true, - enableAddRow: true, - enableAddCol: true, - enablePage: true, - pageInfo: null, - autoFormatw: false, - accuracy: undefined, - editMode: false, - chartConfigChange: null, - beforeCreateDom: null, - total: 0 - } - luckysheet.luckysheetConfigsetting = luckysheetConfigsetting; - - var luckysheetdefaultstyle = { - font: 'normal '+ Math.ceil(10 * window.devicePixelRatio) +'pt 微软雅黑, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', - fillStyle: "#000000", - textBaseline: "middle", - strokeStyle: "#dfdfdf", - rowFillStyle: "#5e5e5e", - textAlign: 'center' - } - luckysheet.luckysheetdefaultstyle = luckysheetdefaultstyle; - - //编辑器qksheet表格编辑所需一些方法 - luckysheet.setluckysheet_pointEditZoom = function(v){ - luckysheetConfigsetting.pointEditZoom = v; - } - - // 替换temp中的${xxx}为指定内容 ,temp:字符串,这里指html代码,dataarry:一个对象{"xxx":"替换的内容"} - // 例:luckysheet.replaceHtml("${image}",{"image":"abc","jskdjslf":"abc"}) ==> abc - luckysheet.replaceHtml = function (temp, dataarry) { - return temp.replace(/\$\{([\w]+)\}/g, function (s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { return s; } else { return s1; } }); - }; - - //是否为非编辑模式 - luckysheet.isEditMode = function(){ - if(luckysheet.luckysheetConfigsetting.editMode){ - return true; - } - else{ - return false; - } - } - - //太平秀编辑器 数据初始化(针对 合并单元格) - luckysheet.flowdataInit = function(flowdata){ - var data = []; - var cfg_merge = {}, mclist = {}; - - for(var r = 0; r < flowdata.length; r++){ - var dataRow = []; - - for(var c = 0; c < flowdata[r].length; c++){ - if(flowdata[r][c] != null && flowdata[r][c].mc != null){ - var cell = $.extend(true, {}, flowdata[r][c]); - - if(cell.mc.rs != null){ - mclist[cell.mc.r + "_" + cell.mc.c] = [r, c]; - - cell.mc.r = r; - cell.mc.c = c; - - cfg_merge[r + "_" + c] = cell.mc; - } - else{ - if((cell.mc.r + "_" + cell.mc.c) in mclist){ - var mcArr = mclist[cell.mc.r + "_" + cell.mc.c]; - - cell.mc.r = mcArr[0]; - cell.mc.c = mcArr[1]; - } - } - - dataRow.push(cell); - } - else{ - dataRow.push(flowdata[r][c]); - } - } - - data.push(dataRow); - } - - if(JSON.stringify(cfg_merge).length > 2){ - return { "data": data, "config": { "merge": cfg_merge } }; - } - else{ - return { "data": data }; - } - } - - //判断数据类型 - luckysheet.getObjType = function(obj){ - var toString = Object.prototype.toString; - - var map = { - '[object Boolean]': 'boolean', - '[object Number]': 'number', - '[object String]': 'string', - '[object Function]': 'function', - '[object Array]': 'array', - '[object Date]': 'date', - '[object RegExp]': 'regExp', - '[object Undefined]':'undefined', - '[object Null]': 'null', - '[object Object]': 'object' - } - - // if(obj instanceof Element){ - // return 'element'; - // } - - return map[toString.call(obj)]; - } - - luckysheet.func_methods = { - //单元格数据生成一维数组 - getCellDataArr: function(rangeObj, nullCellType, isNeglectNullCell){ - var dataArr = []; - - if(rangeObj.data == null){ - if(!isNeglectNullCell){ - if(nullCellType == "number"){ - dataArr.push(0); - } - else if(nullCellType == "text"){ - dataArr.push(""); - } - } - } - else{ - if(luckysheet.getObjType(rangeObj.data) == "array"){ - for(var i = 0; i < rangeObj.data.length; i++){ - for(var j = 0; j < rangeObj.data[i].length; j++){ - if(rangeObj.data[i][j] != null && !luckysheet.func_methods.isRealNull(rangeObj.data[i][j].v)){ - dataArr.push(rangeObj.data[i][j].v); - } - else{ - if(!isNeglectNullCell){ - if(nullCellType == "number"){ - dataArr.push(0); - } - else if(nullCellType == "text"){ - dataArr.push(""); - } - } - } - } - } - } - else{ - if(luckysheet.func_methods.isRealNull(rangeObj.data.v)){ - if(!isNeglectNullCell){ - if(nullCellType == "number"){ - dataArr.push(0); - } - else if(nullCellType == "text"){ - dataArr.push(""); - } - } - } - else{ - dataArr.push(rangeObj.data.v); - } - } - } - - return dataArr; - }, - //单元格数据生成二维数组 - getCellDataDyadicArr: function(rangeObj, nullCellType){ - var dataArr = []; - - if(rangeObj.data == null){ - var rowArr = []; - - if(nullCellType == "number"){ - rowArr.push(0); - } - else if(nullCellType == "text"){ - rowArr.push(""); - } - - dataArr.push(rowArr); - } - else{ - if(luckysheet.getObjType(rangeObj.data) == "array"){ - for(var i = 0; i < rangeObj.data.length; i++){ - var rowArr = []; - - for(var j = 0; j < rangeObj.data[i].length; j++){ - var value; - - if(rangeObj.data[i][j] != null && !luckysheet.func_methods.isRealNull(rangeObj.data[i][j].v)){ - value = rangeObj.data[i][j].v; - } - else{ - if(nullCellType == "number"){ - value = 0; - } - else if(nullCellType == "text"){ - value = ""; - } - } - - rowArr.push(value); - } - - dataArr.push(rowArr); - } - } - else{ - var rowArr = []; - - var value = rangeObj.data.v; - - if(luckysheet.func_methods.isRealNull(value)){ - if(nullCellType == "number"){ - value = 0; - } - else if(nullCellType == "text"){ - value = ""; - } - } - - rowArr.push(value); - - dataArr.push(rowArr); - } - } - - return dataArr; - }, - //数组数据生成一维数组 - getDataArr: function(arr, isNeglectNaN){ - var dataArr = []; - - if(isNeglectNaN == null){ - isNeglectNaN = false; - } - - if(luckysheet.getObjType(arr[0]) == "array"){ - for(var i = 0; i < arr.length; i++){ - for(var j = 0; j < arr[i].length; j++){ - if(isNeglectNaN && !luckysheet.func_methods.isRealNum(arr[i][j])){ - continue; - } - - dataArr.push(arr[i][j]); - } - } - } - else{ - for(var i = 0; i < arr.length; i++){ - if(isNeglectNaN && !luckysheet.func_methods.isRealNum(arr[i])){ - continue; - } - - dataArr.push(arr[i]); - } - } - - return dataArr; - }, - getDataDyadicArr: function(arr){ - var dataArr = []; - - if(luckysheet.getObjType(arr[0]) == "array"){ - for(var i = 0; i < arr.length; i++){ - var rowArr = []; - - for(var j = 0; j < arr[i].length; j++){ - rowArr.push(arr[i][j]); - } - - dataArr.push(rowArr); - } - } - else{ - var rowArr = []; - - for(var i = 0; i < arr.length; i++){ - rowArr.push(arr[i]); - } - - dataArr.push(rowArr); - } - - return dataArr; - }, - //是否是规则二维数组 - isDyadicArr: function(arr){ - var isDyadic = true; - - if(arr.length > 1){ - var collen = arr[0].length; - - for(var i = 1; i < arr.length; i++){ - if(arr[i].length != collen){ - isDyadic = false; - break; - } - } - } - - return isDyadic; - }, - //获取单个单元格数据,数组第一个值 - getFirstValue: function(data, nullCellType){ - if(nullCellType == null){ - nullCellType = "number"; - } - - var value; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - value = data[0][0]; - } - else{ - value = data[0]; - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - if(data.data == null){ - if(nullCellType == "number"){ - value = 0; - } - else if(nullCellType == "text"){ - value = ""; - } - } - else{ - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - - if(data.rowl == 1 && data.coll == 1){ - value = data.data; - - if(value == null || luckysheet.func_methods.isRealNull(value.v)){ - if(nullCellType == "number"){ - value = 0; - } - else if(nullCellType == "text"){ - value = ""; - } - } - else{ - value = value.v; - } - } - else{ - if(data.data[0][0].mc != null && data.data[0][0].mc.rs == data.rowl && data.data[0][0].mc.cs == data.coll){ - value = data.data[0][0]; - - if(value == null || luckysheet.func_methods.isRealNull(value.v)){ - if(nullCellType == "number"){ - value = 0; - } - else if(nullCellType == "text"){ - value = ""; - } - } - else{ - value = value.v; - } - } - else if(data.rowl == 1 || data.coll == 1){ - var cellrange = luckysheet.formula.getcellrange(data.startCell); - var str = cellrange.row[0], - edr = str + data.rowl - 1, - stc = cellrange.column[0], - edc = stc + data.coll - 1; - - if(data.rowl == 1){ - if(cell_c < stc || cell_c > edc){ - return luckysheet.formula.error.v; - } - - value = data.data[0][cell_c - stc]; - } - else if(data.coll == 1){ - if(cell_r < str || cell_r > edr){ - return luckysheet.formula.error.v; - } - - value = data.data[cell_r - str][0]; - } - - if(value == null || luckysheet.func_methods.isRealNull(value.v) || value.mc != null){ - if(nullCellType == "number"){ - value = 0; - } - else if(nullCellType == "text"){ - value = ""; - } - } - else{ - value = value.v; - } - } - else{ - return luckysheet.formula.error.v; - } - } - } - } - else{ - value = data; - } - - return value; - }, - //获取单元格的逻辑值 - getCellBoolen: function(data){ - var cumulative = luckysheet.func_methods.getFirstValue(data); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(luckysheet.getObjType(cumulative) == "boolean"){ - - } - else if(luckysheet.getObjType(cumulative) == "string" && (cumulative.toLowerCase() == "true" || cumulative.toLowerCase() == "false")){ - if(cumulative.toLowerCase() == "true"){ - cumulative = true; - } - else if(cumulative.toLowerCase() == "false"){ - cumulative = false; - } - } - else if(luckysheet.func_methods.isRealNum(cumulative)){ - cumulative = parseFloat(cumulative); - - cumulative = cumulative == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - - return cumulative; - }, - //获取单元格的日期 - getCellDate: function(data){ - var date_text; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - date_text = data[0][0]; - } - else{ - date_text = data[0]; - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - if(data.data == null || luckysheet.getObjType(data.data) == "array" || luckysheet.func_methods.isRealNull(data.data.v)){ - return luckysheet.formula.error.v; - } - - date_text = data.data.v; - - if(data.data.ct != null && data.data.ct.t == "d"){ - date_text = luckysheet.mask.update("YYYY-MM-DD h:mm:ss", date_text); - } - } - else{ - date_text = data; - } - - return date_text; - }, - getCellrangeDate: function(data){ - var date = []; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - date = date.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - if(data.data == null){ - date.push(0); - } - else{ - if(luckysheet.getObjType(data.data) == "array"){ - for(var i = 0; i < data.data.length; i++){ - for(var j = 0; j < data.data[i].length; j++){ - if(data.data[i][j] != null && !luckysheet.func_methods.isRealNull(data.data[i][j].v)){ - var value = data.data[i][j].v; - - if(data.data[i][j].ct != null && data.data[i][j].ct.t == "d"){ - value = luckysheet.mask.update("YYYY-MM-DD h:mm:ss", value); - } - - date.push(value); - } - else{ - date.push(0); - } - } - } - } - else{ - var value = data.data.v; - - if(data.data.ct != null && data.data.ct.t == "d"){ - value = luckysheet.mask.update("YYYY-MM-DD h:mm:ss", value); - } - - date.push(value); - } - } - } - else{ - date.push(data); - } - - return date; - }, - //是否是纯数字 - isRealNum: function(val){ - if(val == null || val.toString().replace(/\s/g, "") == ""){ - return false; - } - - if(typeof val == "boolean"){ - return false; - } - - if(!isNaN(val)){ - return true; - } - else{ - return false; - } - }, - //是否是空值 - isRealNull: function(val){ - if(val == null || val.toString().replace(/\s/g, "") == ""){ - return true; - } - else{ - return false; - } - }, - //是否是错误类型 - valueIsError: function(value){ - var isError = false; - - for(x in luckysheet.formula.error){ - if(value == luckysheet.formula.error[x]){ - isError = true; - break; - } - } - - return isError; - }, - //获取正则字符串(处理 . * ? ~* ~?) - getRegExpStr: function(str){ - return str.replace("~*", "\\*").replace("~?", "\\?").replace(".", "\\.").replace("*", ".*").replace("?", "."); - }, - //阶乘 - factorial: function(num){ - if (num == 0 || num == 1) { - return 1; - } - else { - return (num * luckysheet.func_methods.factorial(num - 1)); - } - }, - //双阶乘 - factorialDouble: function(num){ - if (num <= 0) { - return 1; - } - else { - return (num * luckysheet.func_methods.factorialDouble(num - 2)); - } - }, - //总体方差 - variance: function(num_arr){ - var sum = 0, count = 0; - - for(var i = 0; i < num_arr.length; i++){ - var number = num_arr[i]; - - sum += number; - count++; - } - - var avg = sum / count; - - var sum_variance = 0; - - for(var j = 0; j < num_arr.length; j++){ - var number = num_arr[j]; - - sum_variance += (number - avg) * (number - avg); - } - - return sum_variance / count; - }, - //样本方差 - variance_s: function(num_arr){ - var sum = 0, count = 0; - - for(var i = 0; i < num_arr.length; i++){ - var number = num_arr[i]; - - sum += number; - count++; - } - - var avg = sum / count; - - var sum_variance = 0; - - for(var j = 0; j < num_arr.length; j++){ - var number = num_arr[j]; - - sum_variance += (number - avg) * (number - avg); - } - - return sum_variance / (count - 1); - }, - //总体标准偏差 - standardDeviation: function(num_arr){ - var sum = 0, count = 0; - - for(var i = 0; i < num_arr.length; i++){ - var number = num_arr[i]; - - sum += number; - count++; - } - - var avg = sum / count; - - var sum_variance = 0; - - for(var j = 0; j < num_arr.length; j++){ - var number = num_arr[j]; - - sum_variance += (number - avg) * (number - avg); - } - - return Math.sqrt(sum_variance / count); - }, - //样本标准偏差 - standardDeviation_s: function(num_arr){ - var sum = 0, count = 0; - - for(var i = 0; i < num_arr.length; i++){ - var number = num_arr[i]; - - sum += number; - count++; - } - - var avg = sum / count; - - var sum_variance = 0; - - for(var j = 0; j < num_arr.length; j++){ - var number = num_arr[j]; - - sum_variance += (number - avg) * (number - avg); - } - - return Math.sqrt(sum_variance / (count - 1)); - }, - //是否是闰年 - isLeapYear: function(year){ - return new Date(year, 1, 29).getMonth() === 1; - }, - //2月是否有29 - feb29Between: function(date1, date2){ - var year1 = moment(date1).year(); - var mar1year1 = moment().set({ 'year': year1, 'month': 2, 'date': 1 }); - - if (luckysheet.func_methods.isLeapYear(year1) && moment(date1) < moment(mar1year1) && moment(date2) >= moment(mar1year1)) { - return true; - } - - var year2 = moment(date2).year(); - var mar1year2 = moment().set({ 'year': year2, 'month': 2, 'date': 1 }); - - return (luckysheet.func_methods.isLeapYear(year2) && moment(date2) >= moment(mar1year2) && moment(date1) < moment(mar1year2)); - }, - //SQL 查询 - findResultIndex: function(database, criterias){ - var matches = {}; - - for (var i = 1; i < database[0].length; ++i) { - matches[i] = true; - } - - var maxCriteriaLength = criterias[0].length; - - for (i = 1; i < criterias.length; ++i) { - if (criterias[i].length > maxCriteriaLength) { - maxCriteriaLength = criterias[i].length; - } - } - - for (var k = 1; k < database.length; ++k) { - for (var l = 1; l < database[k].length; ++l) { - var currentCriteriaResult = false; - var hasMatchingCriteria = false; - - for (var j = 0; j < criterias.length; ++j) { - var criteria = criterias[j]; - - if (criteria.length < maxCriteriaLength) { - continue; - } - - var criteriaField = criteria[0]; - - if (database[k][0] !== criteriaField) { - continue; - } - - hasMatchingCriteria = true; - - for (var p = 1; p < criteria.length; ++p) { - currentCriteriaResult = currentCriteriaResult || eval(database[k][l] + criteria[p]); // jshint ignore:line - } - } - - if (hasMatchingCriteria) { - matches[l] = matches[l] && currentCriteriaResult; - } - } - } - - var result = []; - - for (var n = 0; n < database[0].length; ++n) { - if (matches[n]) { - result.push(n - 1); - } - } - - return result; - }, - findField: function(database, title){ - var index = null; - - for (var i = 0; i < database.length; i++) { - if (database[i][0] == title) { - index = i; - break; - } - } - - if (index == null) { - return luckysheet.formula.error.v; - } - - return index; - }, - rest: function(array, idx){ - idx = idx || 1; - - if (!array || typeof array.slice !== 'function') { - return array; - } - - return array.slice(idx); - }, - compact: function(array){ - if (!array) { - return array; - } - - var result = []; - - for (var i = 0; i < array.length; ++i) { - if (!array[i]) { - continue; - } - - result.push(array[i]); - } - - return result; - } - } - - //颜色 16进制转rgb - luckysheet.hexToRgb = function (hex) { - var color = [], rgb = []; - hex = hex.replace(/#/, ""); - if (hex.length == 3) { // 处理 "#abc" 成 "#aabbcc" - var tmp = []; - for (var i = 0; i < 3; i++) { - tmp.push(hex.charAt(i) + hex.charAt(i)); - } - hex = tmp.join(""); - } - for (var i = 0; i < 3; i++) { - color[i] = "0x" + hex.substr(i + 2, 2); - rgb.push(parseInt(Number(color[i]))); - } - return 'rgb(' + rgb.join(",") + ')'; - }; - - //颜色 rgb转16进制 - luckysheet.rgbTohex = function(color) { - if(color.indexOf("rgba") > -1){ - var rgb = color.replace("rgba(", "").replace(")", "").split(','); - } - else{ - var rgb = color.replace("rgb(", "").replace(")", "").split(','); - } - - var r = parseInt(rgb[0]); - var g = parseInt(rgb[1]); - var b = parseInt(rgb[2]); - - var hex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); - return hex; - }; - - //列下标 字母转数字 - luckysheet.luckysheetABCatNum = function (abc) { - abc = abc.toUpperCase(); - var abc_len = abc.length; - if (abc_len == 0) { - return NaN; - } - - var abc_array = abc.split(""); - var wordlen = columeHeader_word.length; - var ret = 0; - for (var i = abc_len - 1; i >= 0; i--) { - if (i == abc_len - 1) { - ret += columeHeader_word_index[abc_array[i]]; - } - else { - ret += Math.pow(wordlen, abc_len - i - 1) * (columeHeader_word_index[abc_array[i]] + 1); - } - } - return ret; - }; - - //列下标 数字转字母 - luckysheet.luckysheetchatatABC = function (index) { - var wordlen = columeHeader_word.length; - if (index < wordlen) { - return columeHeader_word[index]; - } - else { - var last = 0, pre = 0, ret = ""; - var i = 1, n = 0; - while (index >= (wordlen / (wordlen - 1)) * (Math.pow(wordlen, i++) - 1)) { - n = i; - } - var index_ab = index - (wordlen / (wordlen - 1)) * (Math.pow(wordlen, n - 1) - 1);//970 - last = index_ab + 1; - - for (var x = n; x > 0; x--) { - var last1 = last, x1 = x;//-702=268, 3 - if (x == 1) { - last1 = last1 % wordlen; - if (last1 == 0) { - last1 = 26; - } - return ret + columeHeader_word[last1 - 1]; - } - last1 = Math.ceil(last1 / Math.pow(wordlen, x - 1)); - //last1 = last1 % wordlen; - ret += columeHeader_word[last1 - 1]; - if (x > 1) { - last = last - (last1 - 1) * wordlen; - } - } - } - }; - - //计算字符串字节长度 - luckysheet.getByteLen = function (val) { - if(val == null){return 0} - var len = 0; - for (var i = 0; i < val.length; i++) { - var a = val.charAt(i); - if (a.match(/[^\x00-\xff]/ig) != null) { - len += 2; - } - else { - len += 1; - } - } - return len; - }; - - luckysheet.ceateABC = function (index) { - var wordlen = columeHeader_word.length; - if (index < wordlen) { - return columeHeader_word; - } - else { - var relist = []; - var i = 2, n = 0; - while (index < (wordlen / (wordlen - 1)) * (Math.pow(wordlen, i) - 1)) { - n = i; - i++; - } - for (var x = 0; x < n; x++) { - - if (x == 0) { - relist = relist.concat(columeHeader_word); - } - else { - relist = relist.concat(luckysheet.createABCdim(x), index); - } - } - } - }; - - luckysheet.convertRowColumn = function (a) { - if (a.length == 0) { - return []; - } - var b = []; - for (var j = 0; j < a[0].length; j++) { - b[j] = []; - for (var i = 0; i < a.length; i++) { - b[j][i] = a[i][j]; - } - - } - return b; - }; - - luckysheet.createABCdim = function (x, count) { - var chwl = columeHeader_word.length; - if (x == 1) { - var ret = []; - var c = 0, con = true; - for (var i = 0; i < chwl; i++) { - var b = columeHeader_word[i]; - for (var n = 0; n < chwl; n++) { - var bq = b + columeHeader_word[n]; - ret.push(bq); - c++; - if (c > index) { - return ret; - } - } - } - } - else if (x == 2) { - var ret = []; - var c = 0, con = true; - for (var i = 0; i < chwl; i++) { - var bb = columeHeader_word[i]; - for (var w = 0; w < chwl; w++) { - var aa = columeHeader_word[w]; - for (var n = 0; n < chwl; n++) { - var bqa = bb + aa + columeHeader_word[n]; - ret.push(bqa); - c++; - if (c > index) { - return ret; - } - } - } - } - - } - }; - - luckysheet.jfshowloading = function (txt) { - $("#luckysheet-cell-loading").find("span").text(txt).end().show(); - }; - - luckysheet.jfhideloading = function () { - $("#luckysheet-cell-loading").hide(); - }; - - luckysheet.browser = { - mobilecheck: function() { - var a = !1; - return function(b) { - (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(b) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0, 4))) && (a = !0); - }(navigator.userAgent || navigator.vendor || window.opera), document.body && document.body.clientWidth && document.body.clientHeight && document.body.clientWidth < 350 && document.body.clientHeight < 500 && (a = !0), a; - }, - iphoneCheck: function() { - var a = !1; - return /iPhone/i.test(navigator.userAgent) && (a = !0), !0; - }, - isWeixin:function() { - var a = navigator.userAgent.toLowerCase(); - return "micromessenger" == a.match(/MicroMessenger/i) ? !0 : !1; - }, - isAndroid:function() { - var a = navigator.userAgent, - b = (navigator.appVersion, a.indexOf("Android") > -1 || a.indexOf("Linux") > -1); - return b; - }, - tabletCheck:function() { - var a = /ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase()); - return a; - }, - BrowserType: function() { - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 - var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; - var isEdge = userAgent.indexOf("Edge") > -1; //判断是否IE的Edge浏览器 - var isFF = userAgent.indexOf("Firefox") > -1; //判断是否Firefox浏览器 - var isSafari = userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1; //判断是否Safari浏览器 - var isChrome = userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1; //判断Chrome浏览器 - if (isIE) { - var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); - reIE.test(userAgent); - var fIEVersion = parseFloat(RegExp["$1"]); - if (fIEVersion == 7) { - return "IE7"; - } else if (fIEVersion == 8) { - return "IE8"; - } else if (fIEVersion == 9) { - return "IE9"; - } else if (fIEVersion == 10) { - return "IE10"; - // } else if (fIEVersion == 11) { - // return "IE11"; - } else { - return "0"; - } //IE版本过低 - } //isIE end - if (isFF) { - return "FF"; - } - if (isOpera) { - return "Opera"; - } - if (isSafari) { - return "Safari"; - } - if (isChrome) { - return "Chrome"; - } - if (isEdge) { - return "Edge"; - } - if (isIE11) { - return "IE11"; - } - }, //myBrowser() end - //判断是否是IE浏览器 - isIE: function() { - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 - var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; - if (isIE || isIE11) { - return "1"; - } else { - return "-1"; - } - }, - //判断是否是IE浏览器,包括Edge浏览器 - IEVersion: function() { - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器 - var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; - var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器 - if (isIE) { - var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); - reIE.test(userAgent); - var fIEVersion = parseFloat(RegExp["$1"]); - if (fIEVersion == 7) { - return "IE7"; - } else if (fIEVersion == 8) { - return "IE8"; - } else if (fIEVersion == 9) { - return "IE9"; - } else if (fIEVersion == 10) { - return "IE10"; - // } else if (fIEVersion == 11) { - // return "IE11"; - } else { - return "0"; - } //IE版本过低 - } else if (isEdge) { - return "Edge"; - } else if (isIE11) { - return "IE11"; - } else { - return "-1"; //非IE - } - }, - luckysheetrefreshfixednum:null, - luckysheetrefreshfixed:function(){ - var _this = this; - if(_this.luckysheetrefreshfixednum==null){ - if(_this.BrowserType()=="FF"){ - _this.luckysheetrefreshfixednum = 5; - } - else{ - _this.luckysheetrefreshfixednum = 0; - } - } - - return _this.luckysheetrefreshfixednum; - } - }; - - //设备是移动端 - var mobilecheck = luckysheet.browser.mobilecheck(); - if(mobilecheck){ - //去除滚动条 - cellMainSrollBarSize = 0; - - //滑动滚动表格 - var luckysheet_touchmove_status = false, - luckysheet_touchmove_startPos = {}, - luckysheet_touchhandle_status = false; - $(document).on("touchstart", "#luckysheet-grid-window-1", function(event){ - luckysheet_touchmove_status = true; - - var touch = event.originalEvent.targetTouches[0]; - luckysheet_touchmove_startPos = { - x: touch.pageX, - y: touch.pageY - } - }) - $(document).on("touchmove", "#luckysheet-grid-window-1", function(event){ - if(event.originalEvent.targetTouches.length > 1 || (event.scale && event.scale !== 1)){ - return; - } - - var touch = event.originalEvent.targetTouches[0]; - - if(luckysheet_touchmove_status){//滚动 - var slideX = touch.pageX - luckysheet_touchmove_startPos.x; - var slideY = touch.pageY - luckysheet_touchmove_startPos.y; - - luckysheet_touchmove_startPos = { - x: touch.pageX, - y: touch.pageY - } - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - - scrollLeft -= slideX; - scrollTop -= slideY; - - if(scrollLeft < 0){ - scrollLeft = 0; - } - - if(scrollTop < 0){ - scrollTop = 0; - } - - if(Math.abs(slideX) < Math.abs(slideY)){ - $("#luckysheet-scrollbar-y").scrollTop(scrollTop); - } - else{ - $("#luckysheet-scrollbar-x").scrollLeft(scrollLeft); - } - } - else if(luckysheet_touchhandle_status){//选区 - var mouse = luckysheet.mouseposition(touch.pageX, touch.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - last["top_move"] = top; - last["height_move"] = height; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - - luckysheet.selectHightlightShow(); - - luckysheet.freezen.scrollFreezen(); - } - - event.stopPropagation(); - }) - $(document).on("touchend", function(event){ - luckysheet_touchmove_status = false; - luckysheet_touchmove_startPos = {}; - - luckysheet_touchhandle_status = false; - }) - - //滑动选择选区 - $(document).on("touchstart", ".luckysheet-cs-touchhandle", function(event){ - luckysheet_touchhandle_status = true; - event.stopPropagation(); - }) - - //禁止微信下拉拖出微信背景 - document.addEventListener("touchmove", function(event){ - event.preventDefault(); - }, { - passive: false - }) - } - - luckysheet.controlHistory = { - redo: function (e) { - if (luckysheet.jfredo.length == 0) { - return; - } - - var ctr = luckysheet.jfredo.pop(); - luckysheet.jfundo.push(ctr); - clearjfundo = false; - - if (luckysheet.sheetmanage.hasSheet(ctr.sheetIndex) && luckysheet.currentSheetIndex != ctr.sheetIndex) { - luckysheet.sheetmanage.changeSheetExec(ctr.sheetIndex); - } - - if (ctr.type == "datachange") { - //如果有单元格为null,则对应公式应该删除 - for(var s = 0; s < ctr.range.length; s++){ - var st_r = ctr.range[s].row[0]; - var ed_r = ctr.range[s].row[1]; - var st_c = ctr.range[s].column[0]; - var ed_c = ctr.range[s].column[1]; - - for(var r = st_r;r < ed_r + 1; r++){ - for(var c = st_c; c < ed_c +1; c++){ - if(ctr.data[r][c] == null){ - luckysheet.formula.delFunctionGroup(r,c); - } - } - } - } - luckysheet.formula.execFunctionGroup(null, null, null, null, ctr.data);//取之前的数据 - - luckysheet.jfrefreshgrid(ctr.data, ctr.range, ctr.config, ctr.cdformat, ctr.RowlChange); - } - else if (ctr.type == "pasteCut") { - var s = { - "sheetIndex": ctr.source["sheetIndex"], - "data": ctr.source["curData"], - "curData": ctr.source["data"], - "config": ctr.source["curConfig"], - "curConfig": ctr.source["config"], - "cdformat": ctr.source["curCdformat"], - "curCdformat": ctr.source["cdformat"], - "range": ctr.source["range"] - } - var t = { - "sheetIndex": ctr.target["sheetIndex"], - "data": ctr.target["curData"], - "curData": ctr.target["data"], - "config": ctr.target["curConfig"], - "curConfig": ctr.target["config"], - "cdformat": ctr.target["curCdformat"], - "curCdformat": ctr.target["cdformat"], - "range": ctr.target["range"] - } - luckysheet.jfrefreshgrid_pastcut(s, t, ctr.RowlChange); - } - else if (ctr.type == "cellchange") { - luckysheet.formula.execFunctionGroup(ctr.uprow, ctr.upcolumn, ctr.value); - luckysheet.jfrefreshcell(ctr.value, ctr.uprow, ctr.upcolumn); - } - else if (ctr.type == "rangechange") { - //如果有单元格为null,则对应公式应该删除 - for(var s = 0; s < ctr.range.length; s++){ - var st_r = ctr.range[s].row[0]; - var ed_r = ctr.range[s].row[1]; - var st_c = ctr.range[s].column[0]; - var ed_c = ctr.range[s].column[1]; - - for(var r = st_r;r < ed_r + 1; r++){ - for(var c = st_c; c < ed_c +1; c++){ - if(ctr.data[r][c] == null){ - luckysheet.formula.delFunctionGroup(r,c); - } - } - } - } - luckysheet.formula.execFunctionGroup(null, null, null, null, ctr.data);//取之前的数据 - - luckysheet.jfrefreshrange(ctr.data, ctr.range, ctr.cdformat); - } - else if (ctr.type == "resize") { - config = ctr.config; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].config = config; - - if(ctr.ctrlType == "resizeR"){ - luckysheet.server.saveParam("cg", ctr.sheetIndex, ctr.config["rowlen"], { "k": "rowlen" }); - } - else if(ctr.ctrlType == "resizeC"){ - luckysheet.server.saveParam("cg", ctr.sheetIndex, ctr.config["columlen"], { "k": "columlen" }); - } - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - else if (ctr.type == "cellRowChange") { - luckysheet.jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, ctr.ctrlType, ctr.ctrlValue, ctr.cdformat); - } - else if (ctr.type == "extend") { - luckysheet.jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, "dele", ctr.ctrlValue); - } - else if (ctr.type == "dele") { - var ctrlValue1 = $.extend(true, {}, ctr.ctrlValue); - ctrlValue1.restore = true; - luckysheet.jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, "extend", ctrlValue1); - } - else if (ctr.type == "addRC") { //增加行列撤销操作 - var ctrlValue = $.extend(true, {}, ctr.ctrlValue); - if(ctrlValue.direction == "rightbottom"){ - ctrlValue.index = ctrlValue.index + 1; - } - - luckysheet.jfrefreshgrid_adRC(ctr.data, ctr.config, "delRC", ctrlValue, ctr.calc, ctr.filterObj, ctr.cf, ctr.af, ctr.freezen); - } - else if (ctr.type == "delRC") { //删除行列撤销操作 - var ctrlValue = $.extend(true, {}, ctr.ctrlValue); - ctrlValue.restore = true; - ctrlValue.direction = "lefttop"; - - luckysheet.jfrefreshgrid_adRC(ctr.data, ctr.config, "addRC", ctrlValue, ctr.calc, ctr.filterObj, ctr.cf, ctr.af, ctr.freezen); - } - else if (ctr.type == "datachangeAll") { - luckysheet.formula.execFunctionGroup(); - luckysheet.jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, null, ctr.range, "datachangeAll", ctr.ctrlValue); - } - else if (ctr.type == "datachangeAll_filter_clear") { - luckysheet.createFilterOptions(ctr.filter_save); - - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").each(function(i){ - var $top = $(this); - var item = ctr.optiongroups[i]; - luckysheet.labelFilterOptionState($top, item.optionstate, item.rowhidden, item.caljs, false, item.st_r, item.ed_r, item.cindex, item.st_c, item.ed_c); - }); - - luckysheet.server.saveParam("fsr", luckysheet.currentSheetIndex, { "filter": ctr.optiongroups, "filter_select": ctr.filter_save }); - - //config - config = ctr.config; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - if(config["rowhidden"] == null){ - config["rowhidden"] = {}; - } - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, config["rowhidden"], { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - // var $t = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(0); - // luckysheet.filterseletedbyindex($t.data("str"), $t.data("edr"), $t.data("stc"), $t.data("edc")); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - } - else if (ctr.type == "datachangeAll_filter") { - var $top = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(ctr["optionsindex"]); - var st_r = $top.data("str"), - ed_r = $top.data("edr"), - cindex = $top.data("cindex"), - st_c = $top.data("stc"), - ed_c = $top.data("edc"); - - luckysheet.labelFilterOptionState($top, luckysheet.json.hasKey(ctr.rowhidenPre), ctr.rowhidenPre, ctr.caljs, true, st_r, ed_r, cindex, st_c, ed_c); - - //config - config = ctr.config; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - if(config["rowhidden"] == null){ - config["rowhidden"] = {}; - } - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, config["rowhidden"], { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - } - else if (ctr.type == "filtershow") { - $('#luckysheet-filter-selected-sheet' + ctr.sheetIndex + ', #luckysheet-filter-options-sheet' + ctr.sheetIndex).remove(); - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", ctr.sheetIndex, null, { "k": "filter_select" }); - } - } - else if(ctr.type == "pivotTable_change"){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].pivotTable = ctr.pivotTable; - - luckysheet.pivotTable.getCellData(ctr.sheetIndex); - luckysheet.pivotTable.initialPivotManage(true); - - luckysheet.pivotTable.refreshPivotTable(); - } - else if (ctr.type == "addSheet") { - luckysheet.sheetmanage.deleteSheet(ctr.index); - luckysheet.sheetmanage.changeSheetExec(ctr.currentSheetIndex); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - } - else if (ctr.type == "copySheet") { - luckysheet.sheetmanage.deleteSheet(ctr.index); - luckysheet.sheetmanage.changeSheetExec(ctr.copyindex); - } - else if (ctr.type == "deleteSheet") { - var isDupName = false; - - for(var i = 0; i < luckysheetfile.length; i++){ - if(luckysheetfile[i].name == ctr.name){ - isDupName = true; - } - } - - if(!isDupName){ - luckysheet.sheetmanage.createSheetbydata(ctr, "isrenew"); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - } - } - else if (ctr.type == "sheetName") { - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].name = ctr.oldtxt; - $("#luckysheet-sheets-item" + ctr.sheetIndex).find(".luckysheet-sheets-item-name").html(ctr.oldtxt); - - luckysheet.server.saveParam("all", ctr.sheetIndex, ctr.oldtxt, { "k": "name" }); - } - else if (ctr.type == "sheetColor") { - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].color = ctr.oldcolor; - - var luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + ctr.sheetIndex); - luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); - - if(ctr.oldcolor != null){ - luckysheetcurrentSheetitem.append('
'); - } - - luckysheet.server.saveParam("all", ctr.sheetIndex, ctr.oldcolor, { "k": "color" }); - } - else if (ctr.type == "insertChart") { - //chartMix - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - !!window.store && store.commit("deleteChart",ctr.chart_json.chart_id);//同步store中数据 - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - } - else if (ctr.type == "moveChart") { - //回到上一次的状态 - $("#" + ctr.chart_id + "_c").css({ "top": ctr.y, "left": ctr.x }); - $("#luckysheet-scrollbar-y").scrollTop(ctr.scrollTop1); - $("#luckysheet-scrollbar-x").scrollLeft(ctr.scrollLeft1); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"left", - value:ctr.x, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"top", - value:ctr.y, - chartId:ctr.chart_id - }); - - luckysheet.server.saveParam("c", ctr.sheetIndex, { "left":ctr.x, "top":ctr.y, "scrollTop": ctr.scrollTop1, "scrollLeft": ctr.scrollLeft1 }, { "op":"xy", "cid": ctr.chart_id }); - // luckysheet.server.saveParam("c", ctr.sheetIndex, { "left":ctr.x, "top":ctr.y }, { "op":"xy", "cid": ctr.chart_id }); - } - else if (ctr.type == "resizeChart") {//chartMix,增加位置x,y - $("#" + ctr.chart_id + "_c").css({ "height": ctr.myHeight1, "width": ctr.myWidth1 ,"top": ctr.y, "left": ctr.x }); - $("#luckysheet-scrollbar-y").scrollTop(ctr.scrollTop1); - $("#luckysheet-scrollbar-x").scrollLeft(ctr.scrollLeft1); - !!window.store && store.commit({ - type:"updateChartItem", - key:"height", - value:ctr.myHeight1, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"width", - value:ctr.myWidth1, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"left", - value:ctr.x, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"top", - value:ctr.y, - chartId:ctr.chart_id - }); - //resize - !!window.generator && generator.resize(ctr.chart_id); - - luckysheet.server.saveParam("c", ctr.sheetIndex, { "width":ctr.myWidth1, "height":ctr.myHeight1,"top": ctr.y, "left": ctr.x, "scrollTop": ctr.scrollTop1, "scrollLeft": ctr.scrollLeft1 }, { "op":"wh", "cid": ctr.chart_id}); - } - else if (ctr.type == "updateChartRange") { - //console.log(ctr.p_chart_id); - luckysheet.chartparam.luckysheet_chart_redo_click = true; - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - luckysheet.updateChartTosheet("updateChartRange",ctr.p_sheetIndex, ctr.p_dataSheetIndex, ctr.p_option, ctr.p_chartType, ctr.p_selfOption, ctr.p_defaultOption, ctr["p_row"], ctr["p_column"], ctr.p_chart_selection_color, ctr.p_chart_id, ctr.p_chart_selection_id, ctr.p_chartStyle, ctr.p_rangeConfigCheck, ctr.p_rangeRowCheck, ctr.p_rangeColCheck, ctr.p_chartMarkConfig, ctr.p_chartTitleConfig, ctr.p_chartTheme); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - luckysheet.chartparam.luckysheet_chart_redo_click = false; - - luckysheet.chartrangechange(ctr["p_row"], ctr["p_column"], ctr.p_sheetIndex, ctr.p_dataSheetIndex, ctr.p_chart_selection_id,ctr.p_rangeConfigCheck, ctr.p_rangeRowCheck, ctr.p_rangeColCheck, ctr.p_chart_id ); - - if(!luckysheet.isEditMode()){ - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - } - } - else if (ctr.type == "updateChartType") { - //console.log(ctr.p_chart_id); - luckysheet.chartparam.luckysheet_chart_redo_click = true; - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - luckysheet.updateChartTosheet("updateChartType",ctr.p_sheetIndex, ctr.p_dataSheetIndex, ctr.p_option, ctr.p_chartType, ctr.p_selfOption, ctr.p_defaultOption, ctr["p_row"], ctr["p_column"], ctr.p_chart_selection_color, ctr.p_chart_id, ctr.p_chart_selection_id, ctr.p_chartStyle, ctr.p_rangeConfigCheck, ctr.p_rangeRowCheck, ctr.p_rangeColCheck, ctr.p_chartMarkConfig, ctr.p_chartTitleConfig, ctr.p_chartTheme); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - luckysheet.chartparam.luckysheet_chart_redo_click = false; - - - //luckysheet.chartrangechange(ctr["p_row"], ctr["p_column"], ctr.p_sheetIndex, ctr.p_dataSheetIndex, ctr.p_chart_selection_id,ctr.p_rangeConfigCheck, ctr.p_rangeRowCheck, ctr.p_rangeColCheck ); - - luckysheet.chartTypeChange(ctr.p_chartType,ctr.p_selfOption,ctr.p_defaultOption,ctr.p_chartStyle,ctr.p_chartMarkConfig,ctr.p_chartTitleConfig,ctr.p_chart_id); - - if(!luckysheet.isEditMode()){ - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - } - } - else if (ctr.type == "updateChartTheme") { - if(luckysheet.chartparam.luckysheetcurrentChart!=null){ - luckysheet.chartparam.luckysheetcurrentChart.dispose(); - } - - var chartTheme = "default0000"; - if(ctr.p_chartTheme != null && ctr.p_chartTheme.length > 0 && luckysheet.getObjType(ctr.p_chartTheme) != "object" && ctr.p_chartTheme != "default0000"){ - chartTheme = eval('('+ ctr.p_chartTheme +')'); - } - - luckysheet.chartparam.luckysheetcurrentChart = jgridChart = echarts.init($("#" + ctr.p_chart_id).find(".luckysheet-modal-dialog-content").get(0), chartTheme); - - luckysheet.chartparam.luckysheet_chart_default_config = eval('('+ ctr.p_defaultOption +')'); - luckysheet.chartparam.luckysheet_chart_self_config = eval('('+ ctr.p_selfOption +')'); - var $t = $("#"+ctr.p_chart_id); - luckysheet.chartparam.luckysheet_chart_redo_click = true; - $t.mousedown(); - luckysheet.chartparam.luckysheetCurrentChartMove = false; - $t.mouseup(); - luckysheet.chartparam.luckysheet_chart_redo_click = false; - - luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.chartparam.luckysheet_chart_default_config); - luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.luckysheetChartConfigHanddle(ctr.p_chartType, "theme", luckysheet.chartparam.luckysheet_chart_self_config)); - - // luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.chartparam.luckysheet_chart_default_config); - // luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.luckysheetChartConfigHanddle(jgridCurrentChartType.data("type"), "theme", luckysheet.chartparam.luckysheet_chart_self_config)); - - $t.attr("chartTheme", ctr.p_chartTheme); - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("c", ctr.p_sheetIndex, {"chartTheme": ctr.p_chartTheme}, { "op": "update", "cid": ctr.p_chart_id}); - } - - if(!luckysheet.isEditMode()){ - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - } - } - else if (ctr.type == "updateChart") { - //console.log(ctr.p_chart_id); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - luckysheet.updateChartTosheet(ctr.p_sheetIndex, ctr.p_dataSheetIndex, ctr.p_option, ctr.p_chartType, ctr.p_selfOption, ctr.p_defaultOption, ctr["p_row"], ctr["p_column"], ctr.p_chart_selection_color, ctr.p_chart_id, ctr.p_chart_selection_id, ctr.p_chartStyle, ctr.p_rangeConfigCheck, ctr.p_rangeRowCheck, ctr.p_rangeColCheck, ctr.p_chartMarkConfig, ctr.p_chartTitleConfig, ctr.p_chartTheme); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - - if(!luckysheet.isEditMode()){ - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - } - } - else if (ctr.type == "updateChartAll") { - //console.log(ctr.p_chart_id); - var chart_json = ctr.pre_Chart_json;//取上一次的数据 - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - !!window.generator && generator.patchVueSet(chart_json); - !!window.generator && generator.generateChart(chart_json.defaultOption, chart_json.chartTheme, chart_json.chartAllType, $("#" + chart_json.chart_id).get(0)); - // !!window.store && store.commit("showNeedRangeShow",chart_json.chart_id); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - } - else if (ctr.type == "deleteChart") { - //chartMix - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - !!window.store && store.commit("insertChart", ctr.chart_json); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - } - else if (ctr.type == "mergeChange") { - luckysheet.jfrefreshgrid(ctr.data, ctr.range, ctr.config); - } - else if (ctr.type == "updateCF"){ - var historyRules = ctr["data"]["historyRules"]; - - for(var i = 0; i < historyRules.length; i++){ - //条件规则 - var sheetIndex = historyRules[i]["sheetIndex"]; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = historyRules[i]["luckysheet_conditionformat_save"]; - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", sheetIndex, historyRules[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" }); - } - } - - //刷新一次表格 - luckysheet.conditionformat.ref(); - } - else if (ctr.type == "updateAF"){ - var historyRules = ctr["data"]["historyRules"]; - - var index = luckysheet.sheetmanage.getSheetIndex(ctr["sheetIndex"]); - - luckysheetfile[index]["luckysheet_alternateformat_save"] = $.extend(true, [], historyRules); - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - else if (ctr.type == "borderChange"){ - if(ctr.config["borderInfo"] == null){ - luckysheet.server.saveParam("cg", ctr.sheetIndex, [], { "k": "borderInfo" }); - } - else{ - luckysheet.server.saveParam("cg", ctr.sheetIndex, ctr.config["borderInfo"], { "k": "borderInfo" }); - } - - config = ctr.config; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].config = config; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - else if (ctr.type == "postil"){ - luckysheet.postil.ref(ctr.data, ctr.rc); - - for(var i = 0; i < ctr.rc.length; i++){ - var r = ctr.rc[i].split("_")[0]; - var c = ctr.rc[i].split("_")[1]; - - if(ctr.data[r][c] != null && ctr.data[r][c].ps != null){ - luckysheet.postil.buildPs(r, c, ctr.data[r][c].ps); - } - else{ - luckysheet.postil.buildPs(r, c, null); - } - } - } - - luckysheet.cleargridelement(e); - clearjfundo = true; - }, - undo: function () { - if (luckysheet.jfundo.length == 0) { - return; - } - - var ctr = luckysheet.jfundo.pop(); - luckysheet.jfredo.push(ctr); - clearjfundo = false; - - if (luckysheet.sheetmanage.hasSheet(ctr.sheetIndex) && luckysheet.currentSheetIndex != ctr.sheetIndex) { - luckysheet.sheetmanage.changeSheetExec(ctr.sheetIndex); - } - - if (ctr.type == "datachange") { - luckysheet.formula.execFunctionGroup(); - - luckysheet.jfrefreshgrid(ctr.curdata, ctr.range, ctr.curConfig, ctr.curCdformat, ctr.RowlChange); - } - else if (ctr.type == "pasteCut") { - luckysheet.jfrefreshgrid_pastcut(ctr.source, ctr.target, ctr.RowlChange); - } - else if (ctr.type == "cellchange") { - luckysheet.formula.execFunctionGroup(ctr.uprow, ctr.upcolumn, ctr.curvalue); - luckysheet.jfrefreshcell(ctr.curvalue, ctr.uprow, ctr.upcolumn); - } - else if (ctr.type == "rangechange") { - luckysheet.formula.execFunctionGroup(); - luckysheet.jfrefreshrange(ctr.curdata, ctr.range, ctr.curCdformat); - } - else if (ctr.type == "resize") { - config = ctr.curconfig; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].config = config; - - if(ctr.ctrlType == "resizeR"){ - luckysheet.server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowlen"], { "k": "rowlen" }); - } - else if(ctr.ctrlType == "resizeC"){ - luckysheet.server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["columlen"], { "k": "columlen" }); - } - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - else if (ctr.type == "cellRowChange") { - luckysheet.jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue, ctr.curCdformat); - } - else if (ctr.type == "extend") { - luckysheet.jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue); - } - else if (ctr.type == "dele") { - var ctrlValue1 = $.extend(true, {}, ctr.ctrlValue); - ctrlValue1.restore = true; - luckysheet.jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue); - } - else if (ctr.type == "addRC") { //增加行列重做操作 - luckysheet.jfrefreshgrid_adRC(ctr.curData, ctr.curConfig, "addRC", ctr.ctrlValue, ctr.curCalc, ctr.curFilterObj, ctr.curCf, ctr.curAf, ctr.curFreezen); - } - else if (ctr.type == "delRC") { //删除行列重做操作 - luckysheet.jfrefreshgrid_adRC(ctr.curData, ctr.curConfig, "delRC", ctr.ctrlValue, ctr.curCalc, ctr.curFilterObj, ctr.curCf, ctr.curAf, ctr.curFreezen); - } - else if (ctr.type == "datachangeAll") { - luckysheet.formula.execFunctionGroup(); - luckysheet.jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, null, ctr.currange, "datachangeAll", ctr.ctrlValue); - } - else if (ctr.type == "datachangeAll_filter_clear") { - luckysheet.server.saveParam("fsc", luckysheet.currentSheetIndex, null); - - //config - config = ctr.curconfig; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, {}, { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - - $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(); - $("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无"); - - $('#luckysheet-filter-selected-sheet' + luckysheet.currentSheetIndex + ', #luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).remove(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - } - else if (ctr.type == "datachangeAll_filter") { - var $top = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(ctr["optionsindex"]); - var st_r = $top.data("str"), - ed_r = $top.data("edr"), - cindex = $top.data("cindex"), - st_c = $top.data("stc"), - ed_c = $top.data("edc"); - - luckysheet.labelFilterOptionState($top, luckysheet.json.hasKey(ctr.rowhidden), ctr.rowhidden, ctr.caljs, true, st_r, ed_r, cindex, st_c, ed_c); - - //config - config = ctr.curconfig; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, config["rowhidden"], { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - } - else if (ctr.type == "filtershow") { - luckysheet_select_save = [ctr.filter_save]; - filterchage = false; - luckysheet.createFilter(); - filterchage = true; - luckysheet.server.saveParam("all", ctr.sheetIndex, ctr.filter_save, { "k": "filter_select" }); - } - else if (ctr.type == "pivotTable_change") { - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].pivotTable = ctr.pivotTablecur; - //console.log(ctr.pivotTablecur); - luckysheet.pivotTable.getCellData(ctr.sheetIndex); - luckysheet.pivotTable.initialPivotManage(true); - - luckysheet.pivotTable.refreshPivotTable(); - } - else if (ctr.type == "addSheet") { - luckysheet.sheetmanage.createSheetbydata(ctr.sheetconfig); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - } - else if (ctr.type == "copySheet") { - luckysheet.sheetmanage.copySheet(ctr.copyindex); - } - else if (ctr.type == "deleteSheet") { - luckysheet.sheetmanage.deleteSheet(ctr.index); - if (ctr.order == 0) { - luckysheet.sheetmanage.changeSheetExec(luckysheetfile[0].index); - } - else { - luckysheet.sheetmanage.changeSheetExec(luckysheetfile[ctr.order - 1].index); - } - - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - } - else if (ctr.type == "sheetName") { - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].name = ctr.txt; - $("#luckysheet-sheets-item" + ctr.sheetIndex).find(".luckysheet-sheets-item-name").html(ctr.txt); - - luckysheet.server.saveParam("all", ctr.sheetIndex, ctr.txt, { "k": "name" }); - } - else if (ctr.type == "sheetColor") { - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].color = ctr.color; - - var luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + ctr.sheetIndex); - luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); - - if(ctr.color != null){ - luckysheetcurrentSheetitem.append('
'); - } - - luckysheet.server.saveParam("all", ctr.sheetIndex, ctr.color, { "k": "color" }); - } - else if (ctr.type == "insertChart") { - //chartMix - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - !!window.store && store.commit("insertChart", ctr.chart_json); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - } - else if (ctr.type == "moveChart") { - $("#" + ctr.chart_id + "_c").css({ "top": ctr.myTop, "left": ctr.myLeft }); - $("#luckysheet-scrollbar-y").scrollTop(ctr.scrollTop); - $("#luckysheet-scrollbar-x").scrollLeft(ctr.scrollLeft); - !!window.store && store.commit({ - type:"updateChartItem", - key:"left", - value:ctr.myLeft, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"top", - value:ctr.myTop, - chartId:ctr.chart_id - }); - - luckysheet.server.saveParam("c", ctr.sheetIndex, { "left":ctr.myLeft, "left":ctr.myTop, "scrollTop": ctr.scrollTop, "scrollLeft": ctr.scrollLeft }, { "op":"xy", "cid": ctr.chart_id}); - // luckysheet.server.saveParam("c", ctr.sheetIndex, { "left":ctr.myLeft, "top":ctr.myTop }, { "op":"xy", "cid": ctr.chart_id}); - } - else if (ctr.type == "resizeChart") { - $("#" + ctr.chart_id + "_c").css({ "height": ctr.myHeight, "width": ctr.myWidth,"top": ctr.myTop, "left": ctr.myLeft }); - $("#luckysheet-scrollbar-y").scrollTop(ctr.scrollTop); - $("#luckysheet-scrollbar-x").scrollLeft(ctr.scrollLeft); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"height", - value:ctr.myHeight, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"width", - value:ctr.myWidth, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"left", - value:ctr.myLeft, - chartId:ctr.chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"top", - value:ctr.myTop, - chartId:ctr.chart_id - }); - - !!window.generator && generator.resize(ctr.chart_id); - luckysheet.server.saveParam("c", ctr.sheetIndex, { "width":ctr.myWidth, "height":ctr.myHeight,"top": ctr.myTop, "left": ctr.myLeft, "scrollTop": ctr.scrollTop, "scrollLeft": ctr.scrollLeft }, { "op":"wh", "cid": ctr.chart_id}); - } - else if (ctr.type == "updateChartRange") { - //console.log(ctr.p_chart_id); - luckysheet.chartparam.luckysheet_chart_redo_click = true; - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - luckysheet.updateChartTosheet("updateChartRange",ctr.sheetIndex, ctr.dataSheetIndex, ctr.option, ctr.chartType, ctr.selfOption, ctr.defaultOption, ctr["row"], ctr["column"], ctr.chart_selection_color, ctr.chart_id, ctr.chart_selection_id, ctr.chartStyle, ctr.rangeConfigCheck, ctr.rangeRowCheck, ctr.rangeColCheck, ctr.chartMarkConfig, ctr.chartTitleConfig, ctr.chartTheme); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - luckysheet.chartparam.luckysheet_chart_redo_click = false; - - luckysheet.chartrangechange(ctr["row"], ctr["column"], ctr.sheetIndex, ctr.dataSheetIndex, ctr.chart_selection_id,ctr.rangeConfigCheck, ctr.rangeRowCheck, ctr.rangeColCheck, ctr.chart_id); - - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - - } - else if (ctr.type == "updateChartType") { - //console.log(ctr.p_chart_id); - luckysheet.chartparam.luckysheet_chart_redo_click = true; - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - luckysheet.updateChartTosheet("updateChartType",ctr.sheetIndex, ctr.dataSheetIndex, ctr.option, ctr.chartType, ctr.selfOption, ctr.defaultOption, ctr["row"], ctr["column"], ctr.chart_selection_color, ctr.chart_id, ctr.chart_selection_id, ctr.chartStyle, ctr.rangeConfigCheck, ctr.rangeRowCheck, ctr.rangeColCheck, ctr.chartMarkConfig, ctr.chartTitleConfig, ctr.chartTheme); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - luckysheet.chartparam.luckysheet_chart_redo_click = false; - - //luckysheet.chartrangechange(ctr["p_row"], ctr["p_column"], ctr.p_sheetIndex, ctr.p_dataSheetIndex, ctr.p_chart_selection_id,ctr.p_rangeConfigCheck, ctr.p_rangeRowCheck, ctr.p_rangeColCheck ); - - luckysheet.chartTypeChange(ctr.chartType,ctr.selfOption,ctr.defaultOption,ctr.chartStyle,ctr.chartMarkConfig,ctr.chartTitleConfig,ctr.chart_id); - - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - - } - else if (ctr.type == "updateChartTheme") { - if(luckysheet.chartparam.luckysheetcurrentChart!=null){ - luckysheet.chartparam.luckysheetcurrentChart.dispose(); - } - - var chartTheme = "default0000"; - if(ctr.chartTheme != null && ctr.chartTheme.length > 0 && luckysheet.getObjType(ctr.chartTheme) != "object" && ctr.chartTheme != "default0000"){ - chartTheme = eval('(' + ctr.chartTheme + ')'); - } - - luckysheet.chartparam.luckysheetcurrentChart = jgridChart = echarts.init($("#" + ctr.chart_id).find(".luckysheet-modal-dialog-content").get(0), chartTheme); - - luckysheet.chartparam.luckysheet_chart_default_config = eval('('+ ctr.defaultOption +')'); - luckysheet.chartparam.luckysheet_chart_self_config = eval('('+ ctr.selfOption +')'); - var $t = $("#" + ctr.chart_id); - luckysheet.chartparam.luckysheet_chart_redo_click = true; - $t.mousedown(); - luckysheet.chartparam.luckysheetCurrentChartMove = false; - $t.mouseup(); - luckysheet.chartparam.luckysheet_chart_redo_click = false; - - luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.chartparam.luckysheet_chart_default_config); - luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.luckysheetChartConfigHanddle(ctr.chartType, "theme", luckysheet.chartparam.luckysheet_chart_self_config)); - - // luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.chartparam.luckysheet_chart_default_config); - // luckysheet.chartparam.luckysheetcurrentChart.setOption(luckysheet.luckysheetChartConfigHanddle(jgridCurrentChartType.data("type"), "theme", luckysheet.chartparam.luckysheet_chart_self_config)); - - $t.attr("chartTheme", ctr.chartTheme); - luckysheet.server.saveParam("c", ctr.sheetIndex, {"chartTheme": ctr.chartTheme}, { "op": "update", "cid": ctr.chart_id}); - - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - - } - else if (ctr.type == "updateChart") { - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - luckysheet.updateChartTosheet(ctr.sheetIndex, ctr.dataSheetIndex, ctr.option, ctr.chartType, ctr.selfOption, ctr.defaultOption, ctr["row"], ctr["column"], ctr.chart_selection_color, ctr.chart_id, ctr.chart_selection_id, ctr.chartStyle, ctr.rangeConfigCheck, ctr.rangeRowCheck, ctr.rangeColCheck, ctr.chartMarkConfig, ctr.chartTitleConfig, ctr.chartTheme); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - - // $("#luckysheet-data-visualization").hide(); - // luckysheet.luckysheetsizeauto(); - !!window.generator && generator.hideChartSettingComponent(); - } - else if (ctr.type == "updateChartAll") { - //console.log(ctr.p_chart_id); - var chart_json = ctr.chart_json;//取下一次的数据 - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - !!window.generator && generator.patchVueSet(chart_json); - !!window.generator && generator.generateChart(chart_json.defaultOption, chart_json.chartTheme, chart_json.chartAllType, $("#" + chart_json.chart_id).get(0)); - // !!window.store && store.commit("showNeedRangeShow",chart_json.chart_id); - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - } - else if (ctr.type == "deleteChart") { - //chartMix - luckysheet.chartparam.luckysheetInsertChartTosheetChange = false; - !!window.store && store.commit("deleteChart",ctr.chart_json.chart_id);//同步store中数据 - luckysheet.chartparam.luckysheetInsertChartTosheetChange = true; - } - else if (ctr.type == "mergeChange") { - luckysheet.jfrefreshgrid(ctr.curData, ctr.range, ctr.curConfig); - } - else if (ctr.type == "updateCF"){ - var currentRules = ctr["data"]["currentRules"]; - - for(var i = 0; i < currentRules.length; i++){ - //条件规则 - var sheetIndex = currentRules[i]["sheetIndex"]; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = currentRules[i]["luckysheet_conditionformat_save"]; - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", sheetIndex, currentRules[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" }); - } - } - - //刷新一次表格 - luckysheet.conditionformat.ref(); - } - else if (ctr.type == "updateAF"){ - var currentRules = ctr["data"]["currentRules"]; - - var index = luckysheet.sheetmanage.getSheetIndex(ctr["sheetIndex"]); - - luckysheetfile[index]["luckysheet_alternateformat_save"] = $.extend(true, [], currentRules); - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - else if (ctr.type == "borderChange"){ - luckysheet.server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["borderInfo"], { "k": "borderInfo" }); - - config = ctr.curconfig; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(ctr.sheetIndex)].config = config; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - else if (ctr.type == "postil"){ - luckysheet.postil.ref(ctr.curdata, ctr.rc); - - for(var i = 0; i < ctr.rc.length; i++){ - var r = ctr.rc[i].split("_")[0]; - var c = ctr.rc[i].split("_")[1]; - - if(ctr.curdata[r][c] != null && ctr.curdata[r][c].ps != null){ - luckysheet.postil.buildPs(r, c, ctr.curdata[r][c].ps); - } - else{ - luckysheet.postil.buildPs(r, c, null); - } - } - } - - clearjfundo = true; - } - }; - - luckysheet.editor = { - //worker+blob实现深拷贝替换extend - deepCopyFlowDataState:false, - deepCopyFlowDataCache:"", - deepCopyFlowDataWorker:null, - deepCopyFlowData:function(flowData){ - var _this = this; - if(_this.deepCopyFlowDataState){ - if(_this.deepCopyFlowDataWorker != null){ - _this.deepCopyFlowDataWorker.terminate(); - } - return _this.deepCopyFlowDataCache; - } - else{ - if(flowData == null){ - flowData = luckysheet.flowdata; - } - - return $.extend(true, [], flowData); - } - }, - webWorkerFlowDataCache:function(flowData){ - var _this = this; - - try{ - if(_this.deepCopyFlowDataWorker != null){//存新的webwork前先销毁以前的 - _this.deepCopyFlowDataWorker.terminate(); - } - - var funcTxt = 'data:text/javascript;chartset=US-ASCII,onmessage = function (e) { postMessage(e.data); };'; - _this.deepCopyFlowDataState = false; - //var worker_blob = new Blob([funcTxt]); - - //适配IE - if(luckysheet.browser.isIE() == 1){ - var response = "self.onmessage=function(e){postMessage(e.data);}"; - var worker = new Worker('./plugins/Worker-helper.js'); - worker.postMessage(response); - }else{ - var worker = new Worker(funcTxt); - } - - _this.deepCopyFlowDataWorker = worker; - worker.postMessage(flowData); - worker.onmessage = function(e) { - _this.deepCopyFlowDataCache = e.data; - _this.deepCopyFlowDataState = true; - }; - } - catch(e){ - _this.deepCopyFlowDataCache = $.extend(true,[],flowData); - } - }, - // webWorkerFlowDataCache:function(flowData){ - // var _this = this; - // _this.deepCopyFlowDataState = false; - // var funcTxt = 'data:text/javascript;chartset=US-ASCII,onmessage = function (e) { postMessage(e.data); };'; - // //var worker_blob = new Blob([funcTxt]); - // var worker = new Worker(funcTxt); - // _this.deepCopyFlowDataWorker = worker; - // worker.postMessage(flowData); - // worker.onmessage = function(e) { - // _this.deepCopyFlowDataCache = e.data; - // console.log("onmessage: e.data",e.data); - // _this.deepCopyFlowDataState = true; - // //_this.deepCopyFlowDataWorker = null; - // worker.terminate(); - // }; - - // }, - controlHandler: function (dataChe) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var curR = last["row"] == null ? 0 : last["row"][0]; - var curC = last["column"] == null ? 0 : last["column"][0]; - var rlen = dataChe.length, clen = dataChe[0].length; - - var addr = curR + rlen - d.length, addc = curC + clen - d[0].length; - if(addr > 0 || addc > 0){ - d = luckysheet.datagridgrowth([].concat(d), addr, addc, true); - } - - for (var r = 0; r < rlen; r++) { - var x = [].concat(d[r + curR]); - for (var c = 0; c < clen; c++) { - var value = ""; - if (dataChe[r] != null && dataChe[r][c] != null) { - value = dataChe[r][c]; - } - x[c + curC] = value; - } - d[r + curR] = x; - } - - if (addr > 0 || addc > 0) { - luckysheet.jfrefreshgridall(d[0].length, d.length, d, null, luckysheet_select_save, "datachangeAll"); - } - else { - luckysheet.jfrefreshrange(d, luckysheet_select_save); - } - }, - clearRangeByindex: function (st_r, ed_r, st_c, ed_c, sheetIndex) { - var index = luckysheet.sheetmanage.getSheetIndex(sheetIndex); - var d = $.extend(true, [], luckysheetfile[index]["data"]); - - for (var r = st_r; r <= ed_r; r++) { - var x = [].concat(d[r]); - for (var c = st_c; c <= ed_c; c++) { - luckysheet.formula.delFunctionGroup(r, c); - luckysheet.formula.execFunctionGroup(r, c, ""); - //var value = ""; - //if (dataChe[r] != null && dataChe[r][c] != null) { - // value = dataChe[r][c]; - //} - x[c] = null; - } - d[r] = x; - } - - //luckysheet.flowdata = flowdata_new = data; - - if(sheetIndex == luckysheet.currentSheetIndex){ - var rlen = ed_r - st_r + 1, clen = ed_c - st_c + 1; - if (rlen > 5000) { - luckysheet.jfrefreshgrid(d, st_r, ed_r, st_c, ed_c); - } - else { - luckysheet.jfrefreshrange(d, { "row": [st_r, ed_r], "column": [st_c, ed_c] }); - } - } - else{ - luckysheetfile[index]["data"] = d; - } - }, - controlHandlerD: function (dataChe) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - var rlen = dataChe.length, clen = dataChe[0].length; - - var addr = r1 + rlen - d.length, addc = c1 + clen - d[0].length; - if(addr >0 || addc > 0){ - d = luckysheet.datagridgrowth([].concat(d), addr, addc, true); - } - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - d[r][c] = null; - } - } - - for(var i = 0; i < rlen; i++){ - for(var j = 0; j < clen; j++){ - d[r1 + i][c1 + j] = dataChe[i][j]; - } - } - - var range = [ - { "row": [r1, r2], "column": [c1, c2] }, - { "row": [r1, r1 + rlen - 1], "column": [c1, c1 + clen - 1] } - ]; - - luckysheet.jfrefreshgrid(d, range); - } - }; - - luckysheet.selection = { - clearcopy: function (e) { - var clipboardData = window.clipboardData; //for IE - if (!clipboardData) { // for chrome - if (!!e) { - clipboardData = e.originalEvent.clipboardData; - } - } - var cpdata = " "; - copyType = "normal"; - copysetting = []; - - luckysheet_selection_range = []; - luckysheet.selectionCopyShow(); - luckysheet_copy_save = {}; - - if (!clipboardData) { - var textarea = $("#luckysheet-copy-content").css("visibility", "hidden"); - textarea.val(cpdata); - textarea.focus(); - textarea.select(); - // 等50毫秒,keyPress事件发生了再去处理数据 - setTimeout(function () { textarea.blur().css("visibility", "visible"); }, 10); - } - else { - //e.clipboardData.getData('text');//可以获取用户选中复制的数据 - clipboardData.setData('Text', cpdata); - return false;//否则设不生效 - } - }, - getHtmlBorderStyle:function(type, color){ - var style = ""; - var borderType = {"0":"none", "1":"Thin", "2":"Hair", "3":"Dotted", "4":"Dashed", "5":"DashDot", "6":"DashDotDot", "7":"Double", "8":"Medium", "9":"MediumDashed", "10":"MediumDashDot", "11":"MediumDashDotDot", "12":"SlantedDashDot", "13":"Thick"}; - type = borderType[type.toString()]; - - if(type.indexOf("Medium") > -1){ - style += "1pt "; - } - else if(type == "Thick"){ - style += "1.5pt "; - } - else { - style += "0.5pt "; - } - - if(type == "Hair"){ - style += "double "; - } - else if(type.indexOf("DashDotDot") > -1){ - style += "dotted "; - } - else if(type.indexOf("DashDot") > -1){ - style += "dashed "; - } - else if(type.indexOf("Dotted") > -1){ - style += "dotted "; - } - else if(type.indexOf("Dashed") > -1){ - style += "dashed "; - } - else{ - style += "solid "; - } - - return style + color + ";"; - }, - copy: function (e) {//copy事件 - var clipboardData = window.clipboardData; //for IE - if (!clipboardData) { // for chrome - clipboardData = e.originalEvent.clipboardData; - } - - luckysheet_selection_range = []; - //copy范围 - var minR = luckysheet_select_save[0].row[0], maxR = luckysheet_select_save[0].row[1]; - var minC = luckysheet_select_save[0].column[0], maxC = luckysheet_select_save[0].column[1]; - var copyRange = [], RowlChange = false, HasMC = false; - for(var s = 0; s < luckysheet_select_save.length; s++){ - if(luckysheet_select_save[s].row[0] < minR){ - minR = luckysheet_select_save[s].row[0]; - } - - if(luckysheet_select_save[s].row[1] > maxR){ - maxR = luckysheet_select_save[s].row[1]; - } - - if(luckysheet_select_save[s].column[0] < minC){ - minC = luckysheet_select_save[s].column[0]; - } - - if(luckysheet_select_save[s].column[1] > maxC){ - maxC = luckysheet_select_save[s].column[1]; - } - - for(var copyR = luckysheet_select_save[s].row[0]; copyR <= luckysheet_select_save[s].row[1]; copyR++){ - if (config["rowhidden"] != null && config["rowhidden"][copyR] != null) { - continue; - } - - if (config["rowlen"] != null && (copyR in config["rowlen"])){ - RowlChange = true; - } - - for(var copyC = luckysheet_select_save[s].column[0]; copyC <= luckysheet_select_save[s].column[1]; copyC++){ - var cell = luckysheet.flowdata[copyR][copyC]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell) && cell.mc.rs != null){ - HasMC = true; - } - } - } - - luckysheet_selection_range.push({ "row": luckysheet_select_save[s].row, "column": luckysheet_select_save[s].column }); - copyRange.push({ "row": luckysheet_select_save[s].row, "column": luckysheet_select_save[s].column }); - } - - luckysheet.selectionCopyShow(); - - //qksheet内copy保存 - luckysheet_copy_save = { - "dataSheetIndex": luckysheet.currentSheetIndex, - "copyRange": copyRange, - "RowlChange": RowlChange, - "HasMC": HasMC - }; - - //copy范围数据拼接成table 赋给剪贴板 - var _this = this; - - if(config["borderInfo"] && config["borderInfo"].length > 0){ //边框 - var borderInfoCompute = luckysheet.getBorderInfoCompute(); - } - - var cpdata = "", d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var r_first = !0, c_first = !0, colgroup = ""; - for (var r = minR; r <= maxR; r++) { - var row = []; - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - cpdata += ''; - - for (var c = minC; c <= maxC; c++) { - var column = ''; - - if (d[r] != null && d[r][c] != null) { - var style = "", span = ""; - - if(r == minR){ - if(config == null || config["columlen"] == null || config["columlen"][c.toString()] == null){ - colgroup += ''; - } - else { - colgroup += ''; - } - } - - if(c == minC){ - if(config == null || config["rowlen"] == null || config["rowlen"][r.toString()] == null){ - style += 'height:19px;'; - } - else { - style += 'height:'+ config["rowlen"][r.toString()] + 'px;'; - } - } - - var reg = /^(w|W)((0?)|(0\.0+))$/; - var c_value; - if(d[r][c].ct != null && d[r][c].ct.fa != null && d[r][c].ct.fa.match(reg)){ - c_value = luckysheet.getcellvalue(r, c, d); - } - else{ - c_value = luckysheet.getcellvalue(r, c, d, "m"); - } - - style += luckysheet.menuButton.getStyleByCell(d, r, c); - - if(luckysheet.getObjType(d[r][c]) == "object" && ("mc" in d[r][c])){ - if("rs" in d[r][c]["mc"]){ - span = 'rowspan="'+ d[r][c]["mc"].rs +'" colspan="'+ d[r][c]["mc"].cs +'"'; - - //边框 - if(borderInfoCompute && borderInfoCompute[r + "_" + c]){ - var bl_obj = { "color": {}, "style": {} }, - br_obj = { "color": {}, "style": {} }, - bt_obj = { "color": {}, "style": {} }, - bb_obj = { "color": {}, "style": {} }; - - for(var bd_r = r; bd_r < (r + d[r][c]["mc"].rs); bd_r++){ - for(var bd_c = c; bd_c < (c + d[r][c]["mc"].cs); bd_c++){ - if(bd_r == r && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].t){ - var linetype = borderInfoCompute[bd_r + "_" + bd_c].t.style; - var bcolor = borderInfoCompute[bd_r + "_" + bd_c].t.color; - - if(bt_obj["style"][linetype] == null){ - bt_obj["style"][linetype] = 1; - } - else{ - bt_obj["style"][linetype] = bt_obj["style"][linetype] + 1; - } - - if(bt_obj["color"][bcolor] == null){ - bt_obj["color"][bcolor] = 1; - } - else{ - bt_obj["color"][bcolor] = bt_obj["color"][bcolor] + 1; - } - } - - if(bd_r == (r + d[r][c]["mc"].rs - 1) && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].b){ - var linetype = borderInfoCompute[bd_r + "_" + bd_c].b.style; - var bcolor = borderInfoCompute[bd_r + "_" + bd_c].b.color; - - if(bb_obj["style"][linetype] == null){ - bb_obj["style"][linetype] = 1; - } - else{ - bb_obj["style"][linetype] = bb_obj["style"][linetype] + 1; - } - - if(bb_obj["color"][bcolor] == null){ - bb_obj["color"][bcolor] = 1; - } - else{ - bb_obj["color"][bcolor] = bb_obj["color"][bcolor] + 1; - } - } - - if(bd_c == c && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].l){ - var linetype = borderInfoCompute[r + "_" + c].l.style; - var bcolor = borderInfoCompute[bd_r + "_" + bd_c].l.color; - - if(bl_obj["style"][linetype] == null){ - bl_obj["style"][linetype] = 1; - } - else{ - bl_obj["style"][linetype] = bl_obj["style"][linetype] + 1; - } - - if(bl_obj["color"][bcolor] == null){ - bl_obj["color"][bcolor] = 1; - } - else{ - bl_obj["color"][bcolor] = bl_obj["color"][bcolor] + 1; - } - } - - if(bd_c == (c + d[r][c]["mc"].cs - 1) && borderInfoCompute[bd_r + "_" + bd_c] && borderInfoCompute[bd_r + "_" + bd_c].r){ - var linetype = borderInfoCompute[bd_r + "_" + bd_c].r.style; - var bcolor = borderInfoCompute[bd_r + "_" + bd_c].r.color; - - if(br_obj["style"][linetype] == null){ - br_obj["style"][linetype] = 1; - } - else{ - br_obj["style"][linetype] = br_obj["style"][linetype] + 1; - } - - if(br_obj["color"][bcolor] == null){ - br_obj["color"][bcolor] = 1; - } - else{ - br_obj["color"][bcolor] = br_obj["color"][bcolor] + 1; - } - } - } - } - - var rowlen = d[r][c]["mc"].rs, collen = d[r][c]["mc"].cs; - - if(JSON.stringify(bl_obj).length > 23){ - var bl_color = null, bl_style = null; - - for(x in bl_obj.color){ - if(bl_obj.color[x] >= (rowlen / 2)){ - bl_color = x; - } - } - - for(x in bl_obj.style){ - if(bl_obj.style[x] >= (rowlen / 2)){ - bl_style = x; - } - } - - if(bl_color != null && bl_style != null){ - style += "border-left:" + _this.getHtmlBorderStyle(bl_style, bl_color); - } - } - - if(JSON.stringify(br_obj).length > 23){ - var br_color = null, br_style = null; - - for(x in br_obj.color){ - if(br_obj.color[x] >= (rowlen / 2)){ - br_color = x; - } - } - - for(x in br_obj.style){ - if(br_obj.style[x] >= (rowlen / 2)){ - br_style = x; - } - } - - if(br_color != null && br_style != null){ - style += "border-right:" + _this.getHtmlBorderStyle(br_style, br_color); - } - } - - if(JSON.stringify(bt_obj).length > 23){ - var bt_color = null, bt_style = null; - - for(x in bt_obj.color){ - if(bt_obj.color[x] >= (collen / 2)){ - bt_color = x; - } - } - - for(x in bt_obj.style){ - if(bt_obj.style[x] >= (collen / 2)){ - bt_style = x; - } - } - - if(bt_color != null && bt_style != null){ - style += "border-top:" + _this.getHtmlBorderStyle(bt_style, bt_color); - } - } - - if(JSON.stringify(bb_obj).length > 23){ - var bb_color = null, bb_style = null; - - for(x in bb_obj.color){ - if(bb_obj.color[x] >= (collen / 2)){ - bb_color = x; - } - } - - for(x in bb_obj.style){ - if(bb_obj.style[x] >= (collen / 2)){ - bb_style = x; - } - } - - if(bb_color != null && bb_style != null){ - style += "border-bottom:" + _this.getHtmlBorderStyle(bb_style, bb_color); - } - } - } - } - else{ - continue; - } - } - else{ - //边框 - if(borderInfoCompute && borderInfoCompute[r + "_" + c]){ - //左边框 - if(borderInfoCompute[r + "_" + c].l){ - var linetype = borderInfoCompute[r + "_" + c].l.style; - var bcolor = borderInfoCompute[r + "_" + c].l.color; - style += "border-left:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - - //右边框 - if(borderInfoCompute[r + "_" + c].r){ - var linetype = borderInfoCompute[r + "_" + c].r.style; - var bcolor = borderInfoCompute[r + "_" + c].r.color; - style += "border-right:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - - //下边框 - if(borderInfoCompute[r + "_" + c].b){ - var linetype = borderInfoCompute[r + "_" + c].b.style; - var bcolor = borderInfoCompute[r + "_" + c].b.color; - style += "border-bottom:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - - //上边框 - if(borderInfoCompute[r + "_" + c].t){ - var linetype = borderInfoCompute[r + "_" + c].t.style; - var bcolor = borderInfoCompute[r + "_" + c].t.color; - style += "border-top:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - } - } - - column = luckysheet.replaceHtml(column, {"style":style, "span":span}); - - if(c_value == null){ - c_value = luckysheet.getcellvalue(r, c, d); - } - - if(c_value == null){ - c_value = ""; - } - column += c_value; - } - else { - var style = ""; - - //边框 - if(borderInfoCompute && borderInfoCompute[r + "_" + c]){ - //左边框 - if(borderInfoCompute[r + "_" + c].l){ - var linetype = borderInfoCompute[r + "_" + c].l.style; - var bcolor = borderInfoCompute[r + "_" + c].l.color; - style += "border-left:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - - //右边框 - if(borderInfoCompute[r + "_" + c].r){ - var linetype = borderInfoCompute[r + "_" + c].r.style; - var bcolor = borderInfoCompute[r + "_" + c].r.color; - style += "border-right:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - - //下边框 - if(borderInfoCompute[r + "_" + c].b){ - var linetype = borderInfoCompute[r + "_" + c].b.style; - var bcolor = borderInfoCompute[r + "_" + c].b.color; - style += "border-bottom:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - - //上边框 - if(borderInfoCompute[r + "_" + c].t){ - var linetype = borderInfoCompute[r + "_" + c].t.style; - var bcolor = borderInfoCompute[r + "_" + c].t.color; - style += "border-top:" + _this.getHtmlBorderStyle(linetype, bcolor); - } - } - - column += ""; - if(r == minR){ - if(config == null || config["columlen"] == null || config["columlen"][c.toString()] == null){ - colgroup += ''; - } - else { - colgroup += ''; - } - } - - if(c == minC){ - if(config == null || config["rowlen"] == null || config["rowlen"][r.toString()] == null){ - style += 'height:19px;'; - } - else { - style += 'height:'+ config["rowlen"][r.toString()] + 'px;'; - } - } - - column = luckysheet.replaceHtml(column, {"style":style, "span":""}); - } - - column += ''; - cpdata += column; - } - - cpdata += ""; - } - cpdata = '' + colgroup + cpdata + '
'; - - //console.log(luckysheet_selection_range, luckysheet_select_save); - /*if (cpdata.length == 0) { - return; - }*/ - - iscopyself = true; - copyType = "normal"; - copysetting = []; - // cpdata = cpdata.substring(0, cpdata.length); - // cpdata = cpdata.substring(0, cpdata.length - 1); - if (!clipboardData) { - var textarea = $("#luckysheet-copy-content"); - textarea.html(cpdata); - textarea.focus(); - textarea.select(); - document.execCommand("selectAll"); - document.execCommand("Copy"); - // 等50毫秒,keyPress事件发生了再去处理数据 - setTimeout(function () { - $("#luckysheet-copy-content").blur(); - }, 10); - } - else { - //e.clipboardData.getData('text');//可以获取用户选中复制的数据 - clipboardData.setData('Text', cpdata); - return false;//否则设不生效 - } - }, - copybyformat: function (e, txt) {//copy事件 - var clipboardData = window.clipboardData; //for IE - if (!clipboardData) { // for chrome - clipboardData = e.originalEvent.clipboardData; - } - - luckysheet_selection_range = [{ "row": luckysheet_select_save[0].row, "column": luckysheet_select_save[0].column }]; - luckysheet.selectionCopyShow(); - - var cpdata = txt; - - /*if (cpdata.length == 0) { - return; - }*/ - iscopyself = true; - copyType = "normal"; - copysetting = []; - if (!clipboardData) { - var textarea = $("#luckysheet-copy-content"); - textarea.text(cpdata); - textarea.focus(); - textarea.select(); - document.execCommand("selectAll"); - document.execCommand("Copy"); - // 等50毫秒,keyPress事件发生了再去处理数据 - setTimeout(function () { textarea.blur(); }, 10); - } - else { - //e.clipboardData.getData('text');//可以获取用户选中复制的数据 - clipboardData.setData('Text', cpdata); - return false;//否则设不生效 - } - }, - isPasteAction:false, - paste: function (e, triggerType) {//paste事件 - var textarea = $("#luckysheet-copy-content"); - var $t = this; - textarea.focus(); - textarea.select(); - // 等50毫秒,keyPress事件发生了再去处理数据 - setTimeout(function () { - var data = textarea.html(); - - if (data.indexOf("luckysheet_copy_action_table") >- 1 && luckysheet_copy_save["copyRange"] != null && luckysheet_copy_save["copyRange"].length > 0) { - if(luckysheet_paste_iscut){ - luckysheet_paste_iscut = false; - luckysheet.selection.pasteHandlerOfCutPaste(luckysheet_copy_save); - luckysheet.selection.clearcopy(e); - } - else{ - luckysheet.selection.pasteHandlerOfCopyPaste(luckysheet_copy_save); - } - // textarea.html(""); - // textarea.blur(); - } - else if (triggerType != "btn") { - $t.pasteHandler(data); - // textarea.html(""); - // textarea.blur(); - } - else { - if(luckysheet.isEditMode()){ - alert("在表格中进行复制粘贴: Ctrl + C 进行复制, Ctrl + V 进行粘贴, Ctrl + X 进行剪切"); - } - else{ - luckysheet.tooltip.info("在表格中进行复制粘贴", "Ctrl + C  进行复制
Ctrl + V  进行粘贴
Ctrl + X  进行剪切"); - } - } - }, 10); - }, - pasteHandler: function (data, borderInfo) { - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info('提示', "不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - } - - if (typeof (data) == "object") { - if (data.length == 0) { return; }; - - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - if(JSON.stringify(borderInfo).length > 2 && cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - var copyh = data.length, copyc = data[0].length; - - var minh = luckysheet_select_save[0].row[0], maxh = minh + copyh - 1; //应用范围首尾行 - var minc = luckysheet_select_save[0].column[0], maxc = minc + copyc - 1; //应用范围首尾列 - - //应用范围包含部分合并单元格,则return提示 - var hasPartMC = false; - if(cfg["merge"] != null){ - hasPartMC = luckysheet.hasPartMC(cfg, minh, maxh, minc, maxc); - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("不能对合并单元格做部分更改"); - } - else{ - luckysheet.tooltip.info('提示', "不能对合并单元格做部分更改"); - } - - return; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var rowMaxLength = d.length; - var cellMaxLength = d[0].length; - - //若应用范围超过最大行或最大列,增加行列 - var addr = maxh - rowMaxLength + 1, addc = maxc - cellMaxLength + 1; - if(addr > 0 || addc > 0){ - d = luckysheet.datagridgrowth([].concat(d), addr, addc, true); - } - - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - var RowlChange = false; - var offsetMC = {}; - for (var h = minh; h <= maxh; h++) { - var x = [].concat(d[h]); - - var currentRowLen = defaultrowlen; - if(cfg["rowlen"][h] != null){ - currentRowLen = cfg["rowlen"][h]; - } - - for (var c = minc; c <= maxc; c++) { - if(luckysheet.getObjType(x[c]) == "object" && ("mc" in x[c])){ - if("rs" in x[c].mc){ - delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; - } - - delete x[c].mc; - } - - var value = null; - if (data[h - minh] != null && data[h - minh][c - minc] != null) { - value = data[h - minh][c - minc]; - } - - x[c] = $.extend(true, {}, value); - - if(value != null && "mc" in x[c]){ - if(x[c]["mc"].rs != null){ - x[c]["mc"].r = h; - x[c]["mc"].c = c; - - cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; - - offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; - } - else{ - x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } - } - } - - if(borderInfo[(h - minh) + "_" + (c - minc)]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": borderInfo[(h - minh) + "_" + (c - minc)].l, - "r": borderInfo[(h - minh) + "_" + (c - minc)].r, - "t": borderInfo[(h - minh) + "_" + (c - minc)].t, - "b": borderInfo[(h - minh) + "_" + (c - minc)].b - } - } - - cfg["borderInfo"].push(bd_obj); - } - - var fontset = luckysheetfontformat(x[c]); - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - //比较计算高度和当前高度取最大高度 - if(oneLineTextHeight > currentRowLen){ - currentRowLen = oneLineTextHeight; - RowlChange = true; - } - } - d[h] = x; - - if(currentRowLen != defaultrowlen){ - cfg["rowlen"][h] = currentRowLen; - } - } - - luckysheet_select_save = [{ "row": [minh, maxh], "column": [minc, maxc] }]; - - if(addr > 0 || addc > 0 || RowlChange){ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, null, true); - } - else{ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg); - luckysheet.selectHightlightShow(); - } - } - else { - data = data.replace(/\r/g, ""); - var dataChe = []; - var che = data.split("\n"), colchelen = che[0].split("\t").length; - for (var i = 0; i < che.length; i++) { - if (che[i].split("\t").length < colchelen) { - continue; - } - dataChe.push(che[i].split("\t")); - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var curR = last["row"] == null ? 0 : last["row"][0]; - var curC = last["column"] == null ? 0 : last["column"][0]; - var rlen = dataChe.length, clen = dataChe[0].length; - - //应用范围包含部分合并单元格,则return提示 - var hasPartMC = false; - if(config["merge"] != null){ - hasPartMC = luckysheet.hasPartMC(config, curR, curR + rlen - 1, curC, curC + clen - 1); - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("不能对合并单元格做部分更改"); - } - else{ - luckysheet.tooltip.info('提示',"不能对合并单元格做部分更改"); - } - return; - } - - var addr = curR + rlen - d.length, addc = curC + clen - d[0].length; - if(addr > 0 || addc > 0){ - d = luckysheet.datagridgrowth([].concat(d), addr, addc, true); - } - - for (var r = 0; r < rlen; r++) { - var x = [].concat(d[r + curR]); - for (var c = 0; c < clen; c++) { - var cell = {}; - - var mask = luckysheet.mask.genarate(dataChe[r][c]); - cell.v = mask[2]; - cell.ct = mask[1]; - cell.m = mask[0]; - - x[c + curC] = cell; - } - d[r + curR] = x; - } - - last["row"] = [curR, curR + rlen - 1]; - last["column"] = [curC, curC + clen - 1]; - - if (addr > 0 || addc > 0) { - luckysheet.jfrefreshgrid(d, luckysheet_select_save, null, null, true); - } - else { - luckysheet.jfrefreshgrid(d, luckysheet_select_save); - luckysheet.selectHightlightShow(); - } - } - }, - pasteHandlerOfCutPaste: function(copyRange){ - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - //复制范围 - var copyHasMC = copyRange["HasMC"]; - var copyRowlChange = copyRange["RowlChange"]; - - var copySheetIndex = copyRange["dataSheetIndex"]; - var copyData = $.extend(true, [], luckysheet.getdatabyselection({"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, copySheetIndex)); - - var copyh = copyData.length, copyc = copyData[0].length; - - //应用范围 - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var minh = last["row_focus"], maxh = minh + copyh - 1; //应用范围首尾行 - var minc = last["column_focus"], maxc = minc + copyc - 1; //应用范围首尾列 - - //应用范围包含部分合并单元格,则提示 - var hasPartMC = false; - if(cfg["merge"] != null){ - hasPartMC = luckysheet.hasPartMC(cfg, minh, maxh, minc, maxc); - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("不能对合并单元格做部分更改"); - } - else{ - luckysheet.tooltip.info('提示',"不能对合并单元格做部分更改"); - } - return; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var rowMaxLength = d.length; - var cellMaxLength = d[0].length; - - var addr = copyh + minh - rowMaxLength, addc = copyc + minc - cellMaxLength; - if(addr > 0 || addc > 0){ - d = luckysheet.datagridgrowth([].concat(d), addr, addc, true); - } - - var borderInfoCompute = luckysheet.getBorderInfoCompute(copySheetIndex); - - //剪切粘贴在当前表操作,删除剪切范围内数据和合并单元格 - if(luckysheet.currentSheetIndex == copySheetIndex){ - for(var i = copyRange["copyRange"][0].row[0]; i <= copyRange["copyRange"][0].row[1]; i++){ - for(var j = copyRange["copyRange"][0].column[0]; j <= copyRange["copyRange"][0].column[1]; j++){ - var cell = d[i][j]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - if("rs" in cell["mc"]){ - delete cfg["merge"][cell["mc"].r + "_" + cell["mc"].c]; - } - delete cell["mc"]; - } - - d[i][j] = null; - } - } - - //边框 - if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ - var source_borderInfo = []; - - for(var i = 0; i < cfg["borderInfo"].length; i++){ - var bd_rangeType = cfg["borderInfo"][i].rangeType; - - if(bd_rangeType == "range"){ - var bd_range = cfg["borderInfo"][i].range; - var bd_emptyRange = []; - - for(var j = 0; j < bd_range.length; j++){ - bd_emptyRange = bd_emptyRange.concat(luckysheet.conditionformat.CFSplitRange(bd_range[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "restPart")); - } - - cfg["borderInfo"][i].range = bd_emptyRange; - - source_borderInfo.push(cfg["borderInfo"][i]); - } - else if(bd_rangeType == "cell"){ - var bd_r = cfg["borderInfo"][i].value.row_index; - var bd_c = cfg["borderInfo"][i].value.col_index; - - if(!(bd_r >= copyRange["copyRange"][0].row[0] && bd_r <= copyRange["copyRange"][0].row[1] && bd_c >= copyRange["copyRange"][0].column[0] && bd_c <= copyRange["copyRange"][0].column[1])){ - source_borderInfo.push(cfg["borderInfo"][i]); - } - } - } - - cfg["borderInfo"] = source_borderInfo; - } - } - - var offsetMC = {}; - for (var h = minh; h <= maxh; h++) { - var x = [].concat(d[h]); - - for (var c = minc; c <= maxc; c++) { - if(borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].l, - "r": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].r, - "t": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].t, - "b": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - minh) + "_" + (copyRange["copyRange"][0].column[0] + c - minc)].b - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[h + "_" + c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - - if(luckysheet.getObjType(x[c]) == "object" && ("mc" in x[c])){ - if("rs" in x[c].mc){ - delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; - } - delete x[c].mc; - } - - var value = null; - if (copyData[h - minh] != null && copyData[h - minh][c - minc] != null) { - value = copyData[h - minh][c - minc]; - } - - x[c] = $.extend(true, {}, value); - - if(value != null && copyHasMC && ("mc" in x[c])){ - if(x[c]["mc"].rs != null){ - x[c]["mc"].r = h; - x[c]["mc"].c = c; - - cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; - - offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; - } - else{ - x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } - } - } - } - d[h] = x; - } - - last["row"] = [minh, maxh]; - last["column"] = [minc, maxc]; - - //若有行高改变,重新计算行高改变 - if(copyRowlChange){ - if(luckysheet.currentSheetIndex != copySheetIndex){ - cfg = luckysheet.rowlenByRange(d, minh, maxh, cfg); - } - else{ - cfg = luckysheet.rowlenByRange(d, copyRange["copyRange"][0].row[0], copyRange["copyRange"][0].row[1], cfg); - cfg = luckysheet.rowlenByRange(d, minh, maxh, cfg); - } - } - - if(luckysheet.currentSheetIndex != copySheetIndex){ - //跨表操作 - var sourceData = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(copySheetIndex)]["data"]); - var sourceConfig = $.extend(true, {}, luckysheetfile[luckysheet.sheetmanage.getSheetIndex(copySheetIndex)]["config"]); - - var sourceCurData = $.extend(true, [], sourceData); - var sourceCurConfig = $.extend(true, {}, sourceConfig); - if(sourceCurConfig["merge"] == null){ - sourceCurConfig["merge"] = {}; - } - - var source_r1 = copyRange["copyRange"][0].row[0], source_r2 = copyRange["copyRange"][0].row[1]; - var source_c1 = copyRange["copyRange"][0].column[0], source_c2 = copyRange["copyRange"][0].column[1]; - - for(var source_r = source_r1; source_r <= source_r2; source_r++){ - for(var source_c = source_c1; source_c <= source_c2; source_c++){ - var cell = sourceCurData[source_r][source_c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - if("rs" in cell["mc"]){ - delete sourceCurConfig["merge"][cell["mc"].r + "_" + cell["mc"].c]; - } - delete cell["mc"]; - } - sourceCurData[source_r][source_c] = null; - } - } - - if(copyRowlChange){ - sourceCurConfig = luckysheet.rowlenByRange(sourceCurData, source_r1, source_r2, sourceCurConfig); - } - - //边框 - if(sourceCurConfig["borderInfo"] && sourceCurConfig["borderInfo"].length > 0){ - var source_borderInfo = []; - - for(var i = 0; i < sourceCurConfig["borderInfo"].length; i++){ - var bd_rangeType = sourceCurConfig["borderInfo"][i].rangeType; - - if(bd_rangeType == "range"){ - var bd_range = sourceCurConfig["borderInfo"][i].range; - var bd_emptyRange = []; - - for(var j = 0; j < bd_range.length; j++){ - bd_emptyRange = bd_emptyRange.concat(luckysheet.conditionformat.CFSplitRange(bd_range[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "restPart")); - } - - sourceCurConfig["borderInfo"][i].range = bd_emptyRange; - - source_borderInfo.push(sourceCurConfig["borderInfo"][i]); - } - else if(bd_rangeType == "cell"){ - var bd_r = sourceCurConfig["borderInfo"][i].value.row_index; - var bd_c = sourceCurConfig["borderInfo"][i].value.col_index; - - if(!(bd_r >= copyRange["copyRange"][0].row[0] && bd_r <= copyRange["copyRange"][0].row[1] && bd_c >= copyRange["copyRange"][0].column[0] && bd_c <= copyRange["copyRange"][0].column[1])){ - source_borderInfo.push(sourceCurConfig["borderInfo"][i]); - } - } - } - - sourceCurConfig["borderInfo"] = source_borderInfo; - } - - //条件格式 - var source_cdformat = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(copySheetIndex)]["luckysheet_conditionformat_save"]); - var source_curCdformat = $.extend(true, [], source_cdformat); - var ruleArr = []; - if(source_curCdformat != null && source_curCdformat.length > 0){ - for(var i = 0; i < source_curCdformat.length; i++){ - var source_curCdformat_cellrange = source_curCdformat[i].cellrange; - var emptyRange = []; - var emptyRange2 = []; - - for(var j = 0; j < source_curCdformat_cellrange.length; j++){ - var range = luckysheet.conditionformat.CFSplitRange(source_curCdformat_cellrange[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "restPart"); - emptyRange = emptyRange.concat(range); - - var range2 = luckysheet.conditionformat.CFSplitRange(source_curCdformat_cellrange[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "operatePart"); - if(range2.length > 0){ - emptyRange2 = emptyRange2.concat(range2); - } - } - - source_curCdformat[i].cellrange = emptyRange; - - if(emptyRange2.length > 0){ - var ruleObj = $.extend(true, {}, source_curCdformat[i]); - ruleObj.cellrange = emptyRange2; - ruleArr.push(ruleObj); - } - } - } - - var target_cdformat = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]); - var target_curCdformat = $.extend(true, [], target_cdformat); - if(ruleArr.length > 0){ - target_curCdformat = target_curCdformat.concat(ruleArr); - } - - var source = { - "sheetIndex": copySheetIndex, - "data": sourceData, - "curData": sourceCurData, - "config": sourceConfig, - "curConfig": sourceCurConfig, - "cdformat": source_cdformat, - "curCdformat": source_curCdformat, - "range": { - "row": copyRange["copyRange"][0].row, - "column": copyRange["copyRange"][0].column - } - } - var target = { - "sheetIndex": luckysheet.currentSheetIndex, - "data": luckysheet.flowdata, - "curData": d, - "config": $.extend(true, {}, config), - "curConfig": cfg, - "cdformat": target_cdformat, - "curCdformat": target_curCdformat, - "range": { - "row": [minh, maxh], - "column": [minc, maxc] - } - } - } - else{ - //条件格式 - var cdformat = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]); - var curCdformat = $.extend(true, [], cdformat); - if(curCdformat != null && curCdformat.length > 0){ - for(var i = 0; i < curCdformat.length; i++){ - var cellrange = curCdformat[i].cellrange; - var emptyRange = []; - - for(var j = 0; j < cellrange.length; j++){ - var range = luckysheet.conditionformat.CFSplitRange(cellrange[j], {"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, {"row": [minh, maxh], "column": [minc, maxc]}, "allPart"); - emptyRange = emptyRange.concat(range); - } - - curCdformat[i].cellrange = emptyRange; - } - } - - //当前表操作 - var source = { - "sheetIndex": luckysheet.currentSheetIndex, - "data": luckysheet.flowdata, - "curData": d, - "config": $.extend(true, {}, config), - "curConfig": cfg, - "cdformat": cdformat, - "curCdformat": curCdformat, - "range": { - "row": copyRange["copyRange"][0].row, - "column": copyRange["copyRange"][0].column - } - } - var target = { - "sheetIndex": luckysheet.currentSheetIndex, - "data": luckysheet.flowdata, - "curData": d, - "config": $.extend(true, {}, config), - "curConfig": cfg, - "cdformat": cdformat, - "curCdformat": curCdformat, - "range": { - "row": [minh, maxh], - "column": [minc, maxc] - } - } - } - - if(addr > 0 || addc > 0){ - luckysheet.jfrefreshgrid_pastcut(source, target, true); - } - else{ - luckysheet.jfrefreshgrid_pastcut(source, target, copyRowlChange); - } - }, - pasteHandlerOfCopyPaste: function(copyRange){ - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - //复制范围 - var copyHasMC = copyRange["HasMC"]; - var copyRowlChange = copyRange["RowlChange"]; - var copySheetIndex = copyRange["dataSheetIndex"]; - - var arr = [], isSameRow = false; - for(var i = 0; i < copyRange["copyRange"].length; i++){ - var arrData = luckysheet.getdatabyselection({"row": copyRange["copyRange"][i].row, "column": copyRange["copyRange"][i].column}, copySheetIndex); - if(copyRange["copyRange"].length > 1){ - if(copyRange["copyRange"][0].row[0] == copyRange["copyRange"][1].row[0] && copyRange["copyRange"][0].row[1] == copyRange["copyRange"][1].row[1]){ - arrData = arrData[0].map(function(col, a){ - return arrData.map(function(row){ - return row[a]; - }); - }); - - arr = arr.concat(arrData); - - isSameRow = true; - } - else if(copyRange["copyRange"][0].column[0] == copyRange["copyRange"][1].column[0] && copyRange["copyRange"][0].column[1] == copyRange["copyRange"][1].column[1]){ - arr = arr.concat(arrData); - } - } - else{ - arr = arrData; - } - } - - if(isSameRow){ - arr = arr[0].map(function(col, b){ - return arr.map(function(row){ - return row[b]; - }) - }) - } - - var copyData = $.extend(true, [], arr); - - //多重选择选择区域 单元格如果有函数 则只取值 不取函数 - if(copyRange["copyRange"].length > 1){ - for(var i = 0; i < copyData.length; i++){ - for(var j = 0; j < copyData[i].length; j++){ - if(copyData[i][j] != null && copyData[i][j].f != null){ - delete copyData[i][j].f; - delete copyData[i][j].spl; - } - } - } - } - - var copyh = copyData.length, copyc = copyData[0].length; - - //应用范围 - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var minh = last["row"][0], maxh = last["row"][1]; //应用范围首尾行 - var minc = last["column"][0], maxc = last["column"][1]; //应用范围首尾列 - - var mh = (maxh - minh + 1) % copyh; - var mc = (maxc - minc + 1) % copyc; - - if(mh != 0 || mc != 0){ //若应用范围不是copydata行列数的整数倍,则取copydata的行列数 - maxh = minh + copyh - 1; - maxc = minc + copyc - 1; - } - - //应用范围包含部分合并单元格,则提示 - var hasPartMC = false; - if(cfg["merge"] != null){ - hasPartMC = luckysheet.hasPartMC(cfg, minh, maxh, minc, maxc); - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("不能对合并单元格做部分更改"); - } - else{ - luckysheet.tooltip.info('提示',"不能对合并单元格做部分更改"); - } - return; - } - - var timesH = (maxh - minh + 1) / copyh; - var timesC = (maxc - minc + 1) / copyc; - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var rowMaxLength = d.length; - var cellMaxLength = d[0].length; - - //若应用范围超过最大行或最大列,增加行列 - var addr = copyh + minh - rowMaxLength, addc = copyc + minc - cellMaxLength; - if(addr > 0 || addc > 0){ - d = luckysheet.datagridgrowth([].concat(d), addr, addc, true); - } - - var borderInfoCompute = luckysheet.getBorderInfoCompute(copySheetIndex); - - var mth = 0, mtc = 0, maxcellCahe = 0, maxrowCache = 0; - for(var th = 1; th <= timesH; th++){ - for(var tc = 1; tc <= timesC; tc++){ - mth = minh + (th - 1) * copyh; - mtc = minc + (tc - 1) * copyc; - maxrowCache = minh + th * copyh; - maxcellCahe = minc + tc * copyc; - - //行列位移值 用于单元格有函数 - var offsetRow = mth - copyRange["copyRange"][0].row[0]; - var offsetCol = mtc - copyRange["copyRange"][0].column[0]; - - var offsetMC = {}; - for (var h = mth; h < maxrowCache; h++) { - var x = [].concat(d[h]); - - for (var c = mtc; c < maxcellCahe; c++) { - if(borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].l, - "r": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].r, - "t": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].t, - "b": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].b - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[h + "_" + c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - - if(luckysheet.getObjType(x[c]) == "object" && "mc" in x[c]){ - if("rs" in x[c].mc){ - delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; - } - delete x[c].mc; - } - - var value = null; - if (copyData[h - mth] != null && copyData[h - mth][c - mtc] != null) { - value = $.extend(true, {}, copyData[h - mth][c - mtc]); - } - - if(value != null && value.f != null){ - var func = value.f; - - if(offsetRow > 0){ - func = "=" + luckysheet.formula.functionCopy(func, "down", offsetRow); - } - - if(offsetRow < 0){ - func = "=" + luckysheet.formula.functionCopy(func, "up", Math.abs(offsetRow)); - } - - if(offsetCol > 0){ - func = "=" + luckysheet.formula.functionCopy(func, "right", offsetCol); - } - - if(offsetCol < 0){ - func = "=" + luckysheet.formula.functionCopy(func, "left", Math.abs(offsetCol)); - } - - var funcV = luckysheet.formula.execfunction(func, h, c, true); - - if(value.spl != null){ - value.f = funcV[2]; - value.v = funcV[1]; - value.spl = funcV[3].data; - } - else{ - value.f = funcV[2]; - value.v = funcV[1]; - - if(value.ct != null && value.ct["fa"] != null){ - value.m = luckysheet.mask.update(value.ct["fa"], funcV[1]); - } - } - } - - x[c] = $.extend(true, {}, value); - - if(value != null && copyHasMC && ("mc" in x[c])){ - if(x[c]["mc"].rs != null){ - x[c]["mc"].r = h; - x[c]["mc"].c = c; - - cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; - - offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; - } - else{ - x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } - } - } - } - - d[h] = x; - } - } - } - - //复制范围 是否有 条件格式 - if(copyRange["copyRange"].length == 1){ - var c_file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(copySheetIndex)]; - var a_file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - var c_r1 = copyRange["copyRange"][0].row[0], - c_r2 = copyRange["copyRange"][0].row[1], - c_c1 = copyRange["copyRange"][0].column[0], - c_c2 = copyRange["copyRange"][0].column[1]; - - var ruleArr_cf = $.extend(true, [], c_file["luckysheet_conditionformat_save"]); - var cdformat = $.extend(true, [], a_file["luckysheet_conditionformat_save"]); - - if(ruleArr_cf != null && ruleArr_cf.length > 0){ - for(var i = 0; i < ruleArr_cf.length; i++){ - var cf_range = ruleArr_cf[i].cellrange; - - var emptyRange = []; - - for(var th = 1; th <= timesH; th++){ - for(var tc = 1; tc <= timesC; tc++){ - mth = minh + (th - 1) * copyh; - mtc = minc + (tc - 1) * copyc; - maxrowCache = minh + th * copyh; - maxcellCahe = minc + tc * copyc; - - for(var j = 0; j < cf_range.length; j++){ - var range = luckysheet.conditionformat.CFSplitRange(cf_range[j], {"row": [c_r1, c_r2], "column": [c_c1, c_c2]}, {"row": [mth, maxrowCache - 1], "column": [mtc, maxcellCahe - 1]}, "operatePart"); - if(range.length > 0){ - emptyRange = emptyRange.concat(range); - } - } - } - } - - if(emptyRange.length > 0){ - ruleArr_cf[i].cellrange = emptyRange; - cdformat.push(ruleArr_cf[i]); - } - } - } - } - - last["row"] = [minh, maxh]; - last["column"] = [minc, maxc]; - - if(copyRowlChange || addr > 0 || addc > 0){ - cfg = luckysheet.rowlenByRange(d, minh, maxh, cfg); - - if(copyRange["copyRange"].length == 1 && ruleArr_cf != null && ruleArr_cf.length > 0){ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, cdformat, true); - } - else{ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, null, true); - } - } - else{ - if(copyRange["copyRange"].length == 1 && ruleArr_cf != null && ruleArr_cf.length > 0){ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, cdformat); - } - else{ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg); - } - - luckysheet.selectHightlightShow(); - } - }, - pasteHandlerOfPaintModel: function(copyRange){ - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - //复制范围 - var copyHasMC = copyRange["HasMC"]; - var copyRowlChange = copyRange["RowlChange"]; - - var copySheetIndex = copyRange["dataSheetIndex"]; - var copyData = $.extend(true, [], luckysheet.getdatabyselection({"row": copyRange["copyRange"][0].row, "column": copyRange["copyRange"][0].column}, copySheetIndex)); - - //应用范围 - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var minh = last["row"][0], maxh = last["row"][1]; //应用范围首尾行 - var minc = last["column"][0], maxc = last["column"][1]; //应用范围首尾列 - - var copyh = copyData.length, copyc = copyData[0].length; - - if(minh == maxh && minc == maxc){ - //应用范围是一个单元格,自动增加到复制范围大小 (若自动增加的范围包含部分合并单元格,则提示) - var hasPartMC = false; - if(cfg["merge"] != null){ - hasPartMC = luckysheet.hasPartMC(cfg, minh, minh + copyh - 1, minc, minc + copyc - 1); - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("不能对合并单元格做部分更改"); - } - else{ - luckysheet.tooltip.info('提示',"不能对合并单元格做部分更改"); - } - return; - } - - maxh = minh + copyh - 1; - maxc = minc + copyc - 1; - } - - var timesH = Math.ceil((maxh - minh + 1) / copyh); //复制行 组数 - var timesC = Math.ceil((maxc - minc + 1) / copyc); //复制列 组数 - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var cellMaxLength = d[0].length; - var rowMaxLength = d.length; - - var borderInfoCompute = luckysheet.getBorderInfoCompute(copySheetIndex); - - var mth = 0, mtc = 0, record, row1, cell1, column, maxcellCahe = 0, maxrowCache = 0, editorable, olddata; - for (var th = 1; th <= timesH; th++) { - for (var tc = 1; tc <= timesC; tc++) { - mth = minh + (th - 1) * copyh; - mtc = minc + (tc - 1) * copyc; - - maxrowCache = minh + th * copyh > rowMaxLength ? rowMaxLength : minh + th * copyh; - if(maxrowCache > (maxh + 1)){ - maxrowCache = maxh + 1; - } - - maxcellCahe = minc + tc * copyc > cellMaxLength ? cellMaxLength : minc + tc * copyc; - if(maxcellCahe > (maxc + 1)){ - maxcellCahe = maxc + 1; - } - - var offsetMC = {}; - for (var h = mth; h < maxrowCache; h++) { - var x = [].concat(d[h]); - - for (var c = mtc; c < maxcellCahe; c++) { - if(borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].l, - "r": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].r, - "t": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].t, - "b": borderInfoCompute[(copyRange["copyRange"][0].row[0] + h - mth) + "_" + (copyRange["copyRange"][0].column[0] + c - mtc)].b - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[h + "_" + c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": h, - "col_index": c, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - - if(luckysheet.getObjType(x[c]) == "object" && ("mc" in x[c])){ - if("rs" in x[c].mc){ - delete cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c]; - } - delete x[c].mc; - } - - var value = null; - if (copyData[h - mth] != null && copyData[h - mth][c - mtc] != null) { - value = copyData[h - mth][c - mtc]; - } - - if(value != null){ - delete value["v"]; - delete value["m"]; - delete value["f"]; - delete value["spl"]; - - if(luckysheet.getObjType(x[c]) == "object"){ - - } - else{ - x[c] = {"v": x[c] }; - } - - x[c] = $.extend(true, x[c], value); - - if(copyHasMC && ("mc" in x[c])){ - if(x[c]["mc"].rs != null){ - x[c]["mc"].r = h; - if(x[c]["mc"].rs + h >= maxrowCache){ - x[c]["mc"].rs = maxrowCache - h; - } - - x[c]["mc"].c = c; - if(x[c]["mc"].cs + c >= maxcellCahe){ - x[c]["mc"].cs = maxcellCahe - c; - } - - cfg["merge"][x[c]["mc"].r + "_" + x[c]["mc"].c] = x[c]["mc"]; - - offsetMC[value["mc"].r + "_" + value["mc"].c] = [x[c]["mc"].r, x[c]["mc"].c]; - } - else{ - x[c] = { "mc": { r: offsetMC[value["mc"].r + "_" + value["mc"].c][0], c: offsetMC[value["mc"].r + "_" + value["mc"].c][1] } } - } - } - - if(x[c].v != null){ - if(value["ct"] != null && value["ct"]["fa"] != null){ - var mask = luckysheet.mask.update(value["ct"]["fa"], x[c].v); - x[c].m = mask; - } - } - } - } - d[h] = x; - } - } - } - - //复制范围 是否有 条件格式 - var ruleArr = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(copySheetIndex)]["luckysheet_conditionformat_save"]); - var cdformat = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]); - - if(ruleArr != null && ruleArr.length > 0){ - for(var i = 0; i < ruleArr.length; i++){ - var cdformat_cellrange = ruleArr[i].cellrange; - - var emptyRange = []; - - for(var j = 0; j < cdformat_cellrange.length; j++){ - var range = luckysheet.conditionformat.CFSplitRange(cdformat_cellrange[j], {"row": copyRange["copyRange"][0]["row"], "column": copyRange["copyRange"][0]["column"]}, {"row": [minh, maxh], "column": [minc, maxc]}, "operatePart"); - if(range.length > 0){ - emptyRange = emptyRange.concat(range); - } - } - - if(emptyRange.length > 0){ - ruleArr[i].cellrange = [{"row": [minh, maxh], "column": [minc, maxc]}]; - cdformat.push(ruleArr[i]); - } - } - } - - last["row"] = [minh, maxh]; - last["column"] = [minc, maxc]; - - if(copyRowlChange){ - cfg = luckysheet.rowlenByRange(d, minh, maxh, cfg); - - if(ruleArr != null && ruleArr.length > 0){ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, cdformat, true); - } - else{ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, null, true); - } - } - else{ - if(ruleArr != null && ruleArr.length > 0){ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, cdformat); - } - else{ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg); - } - - luckysheet.selectHightlightShow(); - } - }, - matchcopy: function (data1, data2) { - var data1cache = [], data2cache = [], data1len, data2len; - if (typeof (data1) == "object") { - data1cache = data1; - } - else { - data1cache = data1.split("\n"); - for (var i = 0; i < data1cache.length; i++) { - data1cache[i] = data1cache[i].split("\t"); - } - } - data1len = data1cache.length; - - if (typeof (data2) == "object") { - data2cache = data2; - } - else { - data2cache = data2.split("\n"); - for (var i = 0; i < data2cache.length; i++) { - data2cache[i] = data2cache[i].split("\t"); - } - } - - data2len = data2cache.length; - - if (data1len != data2len) { - return false; - } - - - for (var r1 = 0; r1 < data1len; r1++) { - if (config["rowhidden"] != null && config["rowhidden"][r1] != null) { - continue; - } - for (var r2 = 0; r2 < data2len; r2++) { - if (data1cache[r1].length != data2cache[r2].length) { - return false; - } - } - } - - for (var r = 0; r < data1len; r++) { - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - for (var c = 0; c < data1cache[0].length; c++) { - if (luckysheet.getcellvalue(r, c, data1cache) != luckysheet.getcellvalue(r, c, data2cache)) { - return false; - } - } - } - - return true; - } - }; - - luckysheet.datecontroll = { - isdatetime: function (s) { - if (s == null || s.toString().length < 5) { - return false; - } - else if(checkDateTime(s)){ - return true; - } - else { - return false; - } - - function checkDateTime(str){ - var reg1 = /^(\d{4})-(\d{1,2})-(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/; - var reg2 = /^(\d{4})\/(\d{1,2})\/(\d{1,2})(\s(\d{1,2}):(\d{1,2})(:(\d{1,2}))?)?$/; - - if(!reg1.test(str) && !reg2.test(str)){ - return false; - } - - var year = RegExp.$1, - month = RegExp.$2, - day = RegExp.$3; - - if(year < 1900){ - return false; - } - - if(month > 12){ - return false; - } - - if(day > 31){ - return false; - } - - if(month == 2){ - if(new Date(year, 1, 29).getDate() == 29 && day > 29){ - return false; - } - else if(new Date(year, 1, 29).getDate() != 29 && day > 28){ - return false; - } - } - - return true; - } - }, - diff: function (now, then) { - return moment(now).diff(moment(then)); - } - }; - - luckysheet.isdatatype = function (s) { - var type = "string"; - if (luckysheet.datecontroll.isdatetime(s)) { - type = "date"; - } - else if (!isNaN(parseFloat(s)) && !luckysheet.hasChinaword(s)) { - type = "num"; - } - return type; - } - - luckysheet.isdatatypemulti = function (s) { - var type = {}; - if (luckysheet.datecontroll.isdatetime(s)) { - type["date"] = true; - } - - if (!isNaN(parseFloat(s)) && !luckysheet.hasChinaword(s)) { - type["num"] = true; - } - - return type; - } - - luckysheet.numfloatlen = function (n) { - if (n != null && !isNaN(parseFloat(n)) && !luckysheet.hasChinaword(n)) { - var value = numeral(n).value(); - var lens = value.toString().split("."); - if (lens.length == 1) { - lens = 0; - } - else { - lens = lens[1].length; - } - return lens; - } - else { - return null; - } - } - - luckysheet.range_config = function(rangeConfigCheck, rangeRowCheck, rangeColCheck){ - if(rangeConfigCheck){ - luckysheet.chartparam.jgridCurrentChartData = luckysheet.jgfridturntrans(luckysheet.chartparam.jgridCurrentChartData); - } - - if (rangeRowCheck) { - //luckysheet.chartparam.jgridCurrentChartData.shift(); - } - else { - var addrow = []; - //旧图表转置功能和设置列行配合 - var c_st,c_length; - if(rangeConfigCheck){ - c_st = luckysheet.chartparam.jgridCurrentChartSelection["row"][0]; - c_length = luckysheet.chartparam.jgridCurrentChartSelection["row"][1]; - }else{ - c_st = luckysheet.chartparam.jgridCurrentChartSelection["column"][0]; - c_length = luckysheet.chartparam.jgridCurrentChartSelection["column"][1] - } - - for (var i = c_st; i <= c_length; i++) { - if(rangeColCheck && i==c_st){//选中列为标签列时,先添加标题 - addrow.push(""); - }else{ - addrow.push(luckysheet.luckysheetchatatABC(i)); - } - - - } - luckysheet.chartparam.jgridCurrentChartData.unshift(addrow); - } - - if (rangeColCheck) { - // for (var i = 0; i < luckysheet.chartparam.jgridCurrentChartData.length; i++) { - // luckysheet.chartparam.jgridCurrentChartData[i].shift(); - // } - } - else { - //console.log(luckysheet.chartparam.jgridCurrentChartData, luckysheet.chartparam.jgridCurrentChartSelection); - var curlen = luckysheet.chartparam.jgridCurrentChartData.length; - //var $rowcheck = $("#luckysheet-datavisual-range-config-row"); - luckysheet.chartparam.jgridCurrentChartData[0].unshift(""); //无论rangeRowCheck为何值都添加 - for (var i = 1; i < curlen; i++) { - // if(rangeRowCheck && i==0 || ){ - // luckysheet.chartparam.jgridCurrentChartData[i].unshift(""); - // } - // else{ - var fix = 0; - if(rangeRowCheck){ - fix = 1; - } - luckysheet.chartparam.jgridCurrentChartData[i].unshift(luckysheet.luckysheetchatatABC(luckysheet.chartparam.jgridCurrentChartSelection["column"][0]) + (i + luckysheet.chartparam.jgridCurrentChartSelection["row"][0] + fix)); - // } - - } - //luckysheet.chartparam.jgridCurrentChartData.unshift(addrow); - } - } - - luckysheet.numFormat = function (num, type) { - if (num == null || isNaN(parseFloat(num)) || luckysheet.hasChinaword(num) || num == -Infinity || num == Infinity) { - return null; - } - - var floatlen = 6, ismustfloat = false; - if (type == null || type == "auto") { - if (num < 1) { - floatlen = 6; - } - else { - floatlen = 1; - } - } - else { - if (luckysheet.isdatatype(type) == "num") { - floatlen = parseInt(type); - ismustfloat = true; - } - else { - floatlen = 6; - } - } - - var format = "", value = null; - for (var i = 0; i < floatlen; i++) { - format += "0"; - } - - if (!ismustfloat) { - format = "[" + format + "]"; - } - - if(num >= 1e+21){ - value = parseFloat(numeral(num).value()); - } - else{ - value = parseFloat(numeral(num).format("0." + format)); - } - - return value; - } - - luckysheet.array = { - transpose: function (getdata) { - var arr = []; - //console.log(getdata); - if (getdata.length == 0) { - return []; - } - - if (getdata[0].length == 0) { - return []; - } - - for (var c = 0; c < getdata[0].length; c++) { - var a = []; - for (var r = 0; r < getdata.length; r++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = luckysheet.getcellvalue(r, c, getdata); - } - //console.log(value); - a.push(value); - } - arr.push(a); - } - - return arr; - }, - minusClear:function(p, m){ - if(m.row[0]>p.row[1] || m.row[1]p.column[1] || m.column[1]p.column[0] && m.column[1]p.row[0] && m.row[1]p.row[0] && m.row[0]p.column[0] && m.column[1]p.column[0] && m.column[0]  关闭  ', "style": "z-index:100003" })); - var $t = $("#luckysheet-info").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-info").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - confirm: function (title, content, func1, func2, name1, name2) { - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-confirm").remove(); - if(name1==null){ - name1 = "确定"; - } - if(name2==null){ - name2 = "取消"; - } - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-confirm", "addclass": "", "style": "z-index:100003", "title": title, "content": content, "botton": '' })); - var $t = $("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-confirm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - $t.find(".luckysheet-model-conform-btn").click(function () { - if (typeof func1 == 'function') { - func1(); - } - $("#luckysheet-confirm").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - }); - $t.find(".luckysheet-model-cancel-btn").click(function () { - if (typeof func2 == 'function') { - func2(); - } - $("#luckysheet-confirm").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - }); - }, - screenshot: function (title, content, imgurl) { - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-confirm").remove(); - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-confirm", "addclass": "", "style": "z-index:100003", "title": title, "content": content, "botton": '  下载    ' })); - var $t = $("#luckysheet-confirm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-confirm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - $t.find(".luckysheet-model-conform-btn").click(function () { - if(luckysheet.browser.isIE() == "1"){ - alert("下载功能IE浏览器不支持!"); - } - else{ - if (!!window.ActiveXObject || "ActiveXObject" in window){ - if ($("#IframeReportImg").length === 0){ - $('').appendTo("body"); - } - if ($('#IframeReportImg').attr("src") != imgurl) { - $('#IframeReportImg').attr("src",imgurl); - } else { - if ($('#IframeReportImg').src != "about:blank") { - window.frames["IframeReportImg"].document.execCommand("SaveAs"); - } - } - } - } - }); - $t.find(".luckysheet-model-cancel-btn").click(function () { - $("#luckysheet-confirm").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - }); - - $('#luckysheet-confirm .luckysheet-model-copy-btn').click(function(){ - var dt = new clipboard.DT(); - dt.setData("text/html", ""); - if(luckysheet.browser.isIE() == "1"){ - alert("请在图片上右键点击'复制'"); - } - else{ - clipboard.write(dt); - alert("已成功复制(如果粘贴失败,请在图片上右键点击'复制图片')"); - } - }); - }, - chartPointConfig: function (id, savefunc1, closefunc2) { - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": id, "addclass": "luckysheet-chart-point-config-c", "title": "数据点批量设置", "content": luckysheetchartpointconfigHTML, "botton": '', "style": "z-index:100003;height:80%;width:80%;top:10%;left:10%;" })); - $("#luckysheet-modal-dialog-mask").show(); - var winw = $(window).width(), winh = $(window).height(); - $("#" + id).find(".luckysheet-chart-point-config").css("height", winh - 160); - $("#" + id).css({ "height": winh - 90, width: winw - 100, "left": 7, "top": 14 }).show().find(".luckysheet-model-save-btn").click(function () { - if (typeof savefunc1 == 'function') { - savefunc1(); - } - - $("#" + id).hide(); - $("#luckysheet-modal-dialog-mask").hide(); - }); - - $("#" + id).find(".luckysheet-model-save-btn").click(function () { - if (typeof closefunc2 == 'function') { - closefunc2(); - } - - $("#" + id).hide(); - $("#luckysheet-modal-dialog-mask").hide(); - }); - - }, - sheetConfig: function () { - - }, - hoverTipshowState:false, - hoverTipshowTimeOut:null, - createHoverTip:function (obj, to) { - $(obj).on("mouseover", to, function (e) { - - if (luckysheet.tooltip.hoverTipshowState) { - return; - } - clearTimeout(luckysheet.tooltip.hoverTipshowTimeOut); - luckysheet.tooltip.hoverTipshowTimeOut = setTimeout(function(){ - - - var $t = $(e.currentTarget), toffset = $t.offset(), $toolup = $("#luckysheet-tooltip-up"); - var tips = $t.data("tips"); - if (tips == null || tips.length == 0) { - tips = $t.prev().data("tips"); - if (tips == null || tips.length == 0) { - return; - } - } - - if ($toolup.length == 0) { - $("body").append(luckysheetToolHTML); - $toolup = $("#luckysheet-tooltip-up"); - } - - $toolup.removeClass("jfk-tooltip-hide").find("div.jfk-tooltip-contentId").html(tips); - var toolwidth = $toolup.outerWidth(); - $toolup.find("div.jfk-tooltip-arrow").css("left", (toolwidth) / 2); - - var toolleft = toffset.left + ($t.outerWidth() - toolwidth) / 2; - if(toolleft<2){ - toolleft = 2; - $toolup.find("div.jfk-tooltip-arrow").css("left", $t.outerWidth()/2); - } - - $toolup.css({ "top": toffset.top + $t.outerHeight() + 1, "left": toolleft }); - }, 300); - - }).on("mouseout", to, function (e) { - luckysheet.tooltip.hoverTipshowState = false; - clearTimeout(luckysheet.tooltip.hoverTipshowTimeOut); - $("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide"); - }).on("click", to, function (e) { - luckysheet.tooltip.hoverTipshowState = true; - clearTimeout(luckysheet.tooltip.hoverTipshowTimeOut); - $("#luckysheet-tooltip-up").addClass("jfk-tooltip-hide"); - }); - }, - popover:function(content, position, close, style, btntxt,exitsFuc){ - if(btntxt==null){ - btntxt = "关闭"; - } - - var htmldiv = '
格式刷开启
'+ btntxt +'
'; - $("#luckysheetpopover").remove(); - $("body").append(htmldiv); - //var winW = $(window).width(),winH = $(window).height(); - $("#luckysheetpopover .luckysheetpopover-content").html(content); - var w = $("#luckysheetpopover").outerWidth(),h = $("#luckysheetpopover").outerHeight(); - var pcss = {}; - - if(position == 'topLeft'){ - pcss.top = "20px"; - pcss.left = "20px"; - } - else if(position == 'topCenter'){ - pcss.top = "20px"; - pcss.left = "50%"; - pcss["margin-left"] = -w/2; - } - else if(position == 'topRight'){ - pcss.top = "20px"; - pcss.right = "20px"; - } - else if(position == 'midLeft'){ - pcss.top = "50%"; - pcss["margin-top"] = -h/2; - pcss.left = "20px"; - } - else if(position == 'center'){ - pcss.top = "50%"; - pcss["margin-top"] = -h/2; - pcss.left = "50%"; - pcss["margin-left"] = -w/2; - } - else if(position == 'midRight'){ - pcss.top = "50%"; - pcss["margin-top"] = -h/2; - pcss.right = "20px"; - } - else if(position == 'bottomLeft'){ - pcss.bottom = "20px"; - pcss.left = "20px"; - } - else if(position == 'bottomCenter'){ - pcss.bottom = "20px"; - pcss.left = "50%"; - pcss["margin-left"] = -w/2; - } - else if(position == 'bottomRight'){ - pcss.bottom = "20px"; - pcss.right = "20px"; - } - else{ - pcss.top = "20px"; - pcss.left = "50%"; - pcss["margin-left"] = -w/2; - } - - if(style=="white"){ - pcss.background = "rgba(255,255,255,0.65)"; - pcss.color = "#000"; - $("#luckysheetpopover .luckysheetpopover-btn").css({"border":"1px solid #000"}); - } - - setTimeout(function(){ - $("#luckysheetpopover .luckysheetpopover-content").css({"margin-left": -$("#luckysheetpopover .luckysheetpopover-btn").outerWidth()/2}); - }, 1); - $("#luckysheetpopover").css(pcss).fadeIn(); - $("#luckysheetpopover .luckysheetpopover-btn").click(function(){ - if(typeof(exitsFuc) == "function"){ - exitsFuc(); - } - }); - - if(close!=null && typeof(close)=="number"){ - setTimeout(function(){ - $("#luckysheetpopover").fadeOut().remove(); - if(typeof(exitsFuc) == "function"){ - exitsFuc(); - } - }, close); - } - - } - - } - - luckysheet.mask = (function(){ - var SSF = ({}); - var make_ssf = function make_ssf(SSF) { - SSF.version = '0.10.2'; - - function _strrev(x) { - var o = "", - i = x.length - 1; - while (i >= 0) o += x.charAt(i--); - return o; - } - - function fill(c, l) { - var o = ""; - while (o.length < l) o += c; - return o; - } - - function pad0(v, d) { - var t = "" + v; - return t.length >= d ? t : fill('0', d - t.length) + t; - } - - function pad_(v, d) { - var t = "" + v; - return t.length >= d ? t : fill(' ', d - t.length) + t; - } - - function rpad_(v, d) { - var t = "" + v; - return t.length >= d ? t : t + fill(' ', d - t.length); - } - - function pad0r1(v, d) { - var t = "" + Math.round(v); - return t.length >= d ? t : fill('0', d - t.length) + t; - } - - function pad0r2(v, d) { - var t = "" + v; - return t.length >= d ? t : fill('0', d - t.length) + t; - } - var p2_32 = Math.pow(2, 32); - - function pad0r(v, d) { - if (v > p2_32 || v < -p2_32) return pad0r1(v, d); - var i = Math.round(v); - return pad0r2(i, d); - } - - function isgeneral(s, i) { - i = i || 0; - return s.length >= 7 + i && (s.charCodeAt(i) | 32) === 103 && (s.charCodeAt(i + 1) | 32) === 101 && (s.charCodeAt(i + 2) | 32) === 110 && (s.charCodeAt(i + 3) | 32) === 101 && (s.charCodeAt(i + 4) | 32) === 114 && (s.charCodeAt(i + 5) | 32) === 97 && (s.charCodeAt(i + 6) | 32) === 108; - } - var days = [ - ['Sun', 'Sunday'], - ['Mon', 'Monday'], - ['Tue', 'Tuesday'], - ['Wed', 'Wednesday'], - ['Thu', 'Thursday'], - ['Fri', 'Friday'], - ['Sat', 'Saturday'] - ]; - var months = [ - ['J', 'Jan', 'January'], - ['F', 'Feb', 'February'], - ['M', 'Mar', 'March'], - ['A', 'Apr', 'April'], - ['M', 'May', 'May'], - ['J', 'Jun', 'June'], - ['J', 'Jul', 'July'], - ['A', 'Aug', 'August'], - ['S', 'Sep', 'September'], - ['O', 'Oct', 'October'], - ['N', 'Nov', 'November'], - ['D', 'Dec', 'December'] - ]; - - function init_table(t) { - t[0] = 'General'; - t[1] = '0'; - t[2] = '0.00'; - t[3] = '#,##0'; - t[4] = '#,##0.00'; - t[9] = '0%'; - t[10] = '0.00%'; - t[11] = '0.00E+00'; - t[12] = '# ?/?'; - t[13] = '# ??/??'; - t[14] = 'm/d/yy'; - t[15] = 'd-mmm-yy'; - t[16] = 'd-mmm'; - t[17] = 'mmm-yy'; - t[18] = 'h:mm AM/PM'; - t[19] = 'h:mm:ss AM/PM'; - t[20] = 'h:mm'; - t[21] = 'h:mm:ss'; - t[22] = 'm/d/yy h:mm'; - t[37] = '#,##0 ;(#,##0)'; - t[38] = '#,##0 ;[Red](#,##0)'; - t[39] = '#,##0.00;(#,##0.00)'; - t[40] = '#,##0.00;[Red](#,##0.00)'; - t[45] = 'mm:ss'; - t[46] = '[h]:mm:ss'; - t[47] = 'mmss.0'; - t[48] = '##0.0E+0'; - t[49] = '@'; - t[56] = '"上午/下午 "hh"時"mm"分"ss"秒 "'; - t[65535] = 'General'; - } - var table_fmt = {}; - init_table(table_fmt); - - function frac(x, D, mixed) { - var sgn = x < 0 ? -1 : 1; - var B = x * sgn; - var P_2 = 0, - P_1 = 1, - P = 0; - var Q_2 = 1, - Q_1 = 0, - Q = 0; - var A = Math.floor(B); - while (Q_1 < D) { - A = Math.floor(B); - P = A * P_1 + P_2; - Q = A * Q_1 + Q_2; - if ((B - A) < 0.00000005) break; - B = 1 / (B - A); - P_2 = P_1; - P_1 = P; - Q_2 = Q_1; - Q_1 = Q; - } - if (Q > D) { - if (Q_1 > D) { - Q = Q_2; - P = P_2; - } else { - Q = Q_1; - P = P_1; - } - } - if (!mixed) return [0, sgn * P, Q]; - var q = Math.floor(sgn * P / Q); - return [q, sgn * P - q * Q, Q]; - } - - function parse_date_code(v, opts, b2) { - if (v > 2958465 || v < 0) return null; - var date = (v | 0), - time = Math.floor(86400 * (v - date)), - dow = 0; - var dout = []; - var out = { - D: date, - T: time, - u: 86400 * (v - date) - time, - y: 0, - m: 0, - d: 0, - H: 0, - M: 0, - S: 0, - q: 0 - }; - if (Math.abs(out.u) < 1e-6) out.u = 0; - if (opts && opts.date1904) date += 1462; - if (out.u > 0.9999) { - out.u = 0; - if (++time == 86400) { - out.T = time = 0; - ++date; - ++out.D; - } - } - if (date === 60) { - dout = b2 ? [1317, 10, 29] : [1900, 2, 29]; - dow = 3; - } else if (date === 0) { - dout = b2 ? [1317, 8, 29] : [1900, 1, 0]; - dow = 6; - } else { - if (date > 60) --date; - /* 1 = Jan 1 1900 in Gregorian */ - var d = new Date(1900, 0, 1); - d.setDate(d.getDate() + date - 1); - dout = [d.getFullYear(), d.getMonth() + 1, d.getDate()]; - dow = d.getDay(); - if (date < 60) dow = (dow + 6) % 7; - if (b2) dow = fix_hijri(d, dout); - } - out.y = dout[0]; - out.m = dout[1]; - out.d = dout[2]; - out.S = time % 60; - time = Math.floor(time / 60); - out.M = time % 60; - time = Math.floor(time / 60); - out.H = time; - out.q = dow; - return out; - } - SSF.parse_date_code = parse_date_code; - var basedate = new Date(1899, 11, 31, 0, 0, 0); - var dnthresh = basedate.getTime(); - var base1904 = new Date(1900, 2, 1, 0, 0, 0); - - function datenum_local(v, date1904) { - var epoch = v.getTime(); - if (date1904) epoch -= 1461 * 24 * 60 * 60 * 1000; - else if (v >= base1904) epoch += 24 * 60 * 60 * 1000; - return (epoch - (dnthresh + (v.getTimezoneOffset() - basedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000); - } - - function general_fmt_int(v) { - return v.toString(10); - } - SSF._general_int = general_fmt_int; - var general_fmt_num = (function make_general_fmt_num() { - var gnr1 = /\.(\d*[1-9])0+$/, - gnr2 = /\.0*$/, - gnr4 = /\.(\d*[1-9])0+/, - gnr5 = /\.0*[Ee]/, - gnr6 = /(E[+-])(\d)$/; - - function gfn2(v) { - var w = (v < 0 ? 12 : 11); - var o = gfn5(v.toFixed(12)); - if (o.length <= w) return o; - o = v.toPrecision(10); - if (o.length <= w) return o; - return v.toExponential(5); - } - - function gfn3(v) { - var o = v.toFixed(11).replace(gnr1, ".$1"); - if (o.length > (v < 0 ? 12 : 11)) o = v.toPrecision(6); - return o; - } - - function gfn4(o) { - for (var i = 0; i != o.length; ++i) - if ((o.charCodeAt(i) | 0x20) === 101) return o.replace(gnr4, ".$1").replace(gnr5, "E").replace("e", "E").replace(gnr6, "$10$2"); - return o; - } - - function gfn5(o) { - return o.indexOf(".") > -1 ? o.replace(gnr2, "").replace(gnr1, ".$1") : o; - } - return function general_fmt_num(v) { - var V = Math.floor(Math.log(Math.abs(v)) * Math.LOG10E), - o; - if (V >= -4 && V <= -1) o = v.toPrecision(10 + V); - else if (Math.abs(V) <= 9) o = gfn2(v); - else if (V === 10) o = v.toFixed(10).substr(0, 12); - else o = gfn3(v); - return gfn5(gfn4(o)); - }; - })(); - SSF._general_num = general_fmt_num; - - function general_fmt(v, opts) { - switch (typeof v) { - case 'string': - return v; - case 'boolean': - return v ? "TRUE" : "FALSE"; - case 'number': - return (v | 0) === v ? general_fmt_int(v) : general_fmt_num(v); - case 'undefined': - return ""; - case 'object': - if (v == null) return ""; - if (v instanceof Date) return format(14, datenum_local(v, opts && opts.date1904), opts); - } - throw new Error("unsupported value in General format: " + v); - } - SSF._general = general_fmt; - - function fix_hijri() { - return 0; - } - /*jshint -W086 */ - function write_date(type, fmt, val, ss0) { - var o = "", - ss = 0, - tt = 0, - y = val.y, - out, outl = 0; - switch (type) { - case 98: - /* 'b' buddhist year */ y = val.y + 543; - /* falls through */ - case 121: - /* 'y' year */ switch (fmt.length) { - case 1: - case 2: - out = y % 100; - outl = 2; - break; - default: - out = y % 10000; - outl = 4; - break; - } - break; - case 109: - /* 'm' month */ switch (fmt.length) { - case 1: - case 2: - out = val.m; - outl = fmt.length; - break; - case 3: - return months[val.m - 1][1]; - case 5: - return months[val.m - 1][0]; - default: - return months[val.m - 1][2]; - } - break; - case 100: - /* 'd' day */ switch (fmt.length) { - case 1: - case 2: - out = val.d; - outl = fmt.length; - break; - case 3: - return days[val.q][0]; - default: - return days[val.q][1]; - } - break; - case 104: - /* 'h' 12-hour */ switch (fmt.length) { - case 1: - case 2: - out = 1 + (val.H + 11) % 12; - outl = fmt.length; - break; - default: - throw 'bad hour format: ' + fmt; - } - break; - case 72: - /* 'H' 24-hour */ switch (fmt.length) { - case 1: - case 2: - out = val.H; - outl = fmt.length; - break; - default: - throw 'bad hour format: ' + fmt; - } - break; - case 77: - /* 'M' minutes */ switch (fmt.length) { - case 1: - case 2: - out = val.M; - outl = fmt.length; - break; - default: - throw 'bad minute format: ' + fmt; - } - break; - case 115: - /* 's' seconds */ if (fmt != 's' && fmt != 'ss' && fmt != '.0' && fmt != '.00' && fmt != '.000') throw 'bad second format: ' + fmt; - if (val.u === 0 && (fmt == "s" || fmt == "ss")) return pad0(val.S, fmt.length); - if (ss0 >= 2) tt = ss0 === 3 ? 1000 : 100; - else tt = ss0 === 1 ? 10 : 1; - ss = Math.round((tt) * (val.S + val.u)); - if (ss >= 60 * tt) ss = 0; - if (fmt === 's') return ss === 0 ? "0" : "" + ss / tt; - o = pad0(ss, 2 + ss0); - if (fmt === 'ss') return o.substr(0, 2); - return "." + o.substr(2, fmt.length - 1); - case 90: - /* 'Z' absolute time */ switch (fmt) { - case '[h]': - case '[hh]': - out = val.D * 24 + val.H; - break; - case '[m]': - case '[mm]': - out = (val.D * 24 + val.H) * 60 + val.M; - break; - case '[s]': - case '[ss]': - out = ((val.D * 24 + val.H) * 60 + val.M) * 60 + Math.round(val.S + val.u); - break; - default: - throw 'bad abstime format: ' + fmt; - } - outl = fmt.length === 3 ? 1 : 2; - break; - case 101: - /* 'e' era */ out = y; - outl = 1; - } - if (outl > 0) return pad0(out, outl); - else return ""; - } - /*jshint +W086 */ - function commaify(s) { - var w = 3; - if (s.length <= w) return s; - var j = (s.length % w), - o = s.substr(0, j); - for (; j != s.length; j += w) o += (o.length > 0 ? "," : "") + s.substr(j, w); - return o; - } - var write_num = (function make_write_num() { - var pct1 = /%/g; - - function write_num_pct(type, fmt, val) { - var sfmt = fmt.replace(pct1, ""), - mul = fmt.length - sfmt.length; - return write_num(type, sfmt, val * Math.pow(10, 2 * mul)) + fill("%", mul); - } - - function write_num_cm(type, fmt, val) { - var idx = fmt.length - 1; - while (fmt.charCodeAt(idx - 1) === 44) --idx; - return write_num(type, fmt.substr(0, idx), val / Math.pow(10, 3 * (fmt.length - idx))); - } - - function write_num_exp(fmt, val) { - var o; - var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1; - if (fmt.match(/^#+0.0E\+0$/)) { - if (val == 0) return "0.0E+0"; - else if (val < 0) return "-" + write_num_exp(fmt, -val); - var period = fmt.indexOf("."); - if (period === -1) period = fmt.indexOf('E'); - var ee = Math.floor(Math.log(val) * Math.LOG10E) % period; - if (ee < 0) ee += period; - o = (val / Math.pow(10, ee)).toPrecision(idx + 1 + (period + ee) % period); - if (o.indexOf("e") === -1) { - var fakee = Math.floor(Math.log(val) * Math.LOG10E); - if (o.indexOf(".") === -1) o = o.charAt(0) + "." + o.substr(1) + "E+" + (fakee - o.length + ee); - else o += "E+" + (fakee - ee); - while (o.substr(0, 2) === "0.") { - o = o.charAt(0) + o.substr(2, period) + "." + o.substr(2 + period); - o = o.replace(/^0+([1-9])/, "$1").replace(/^0+\./, "0."); - } - o = o.replace(/\+-/, "-"); - } - o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function($$, $1, $2, $3) { - return $1 + $2 + $3.substr(0, (period + ee) % period) + "." + $3.substr(ee) + "E"; - }); - } else o = val.toExponential(idx); - if (fmt.match(/E\+00$/) && o.match(/e[+-]\d$/)) o = o.substr(0, o.length - 1) + "0" + o.charAt(o.length - 1); - if (fmt.match(/E\-/) && o.match(/e\+/)) o = o.replace(/e\+/, "e"); - return o.replace("e", "E"); - } - var frac1 = /# (\?+)( ?)\/( ?)(\d+)/; - - function write_num_f1(r, aval, sign) { - var den = parseInt(r[4], 10), - rr = Math.round(aval * den), - base = Math.floor(rr / den); - var myn = (rr - base * den), - myd = den; - return sign + (base === 0 ? "" : "" + base) + " " + (myn === 0 ? fill(" ", r[1].length + 1 + r[4].length) : pad_(myn, r[1].length) + r[2] + "/" + r[3] + pad0(myd, r[4].length)); - } - - function write_num_f2(r, aval, sign) { - return sign + (aval === 0 ? "" : "" + aval) + fill(" ", r[1].length + 2 + r[4].length); - } - var dec1 = /^#*0*\.([0#]+)/; - var closeparen = /\).*[0#]/; - var phone = /\(###\) ###\\?-####/; - - function hashq(str) { - var o = "", - cc; - for (var i = 0; i != str.length; ++i) switch ((cc = str.charCodeAt(i))) { - case 35: - break; - case 63: - o += " "; - break; - case 48: - o += "0"; - break; - default: - o += String.fromCharCode(cc); - } - return o; - } - - function rnd(val, d) { - var dd = Math.pow(10, d); - return "" + (Math.round(val * dd) / dd); - } - - function dec(val, d) { - if (d < ('' + Math.round((val - Math.floor(val)) * Math.pow(10, d))).length) { - return 0; - } - return Math.round((val - Math.floor(val)) * Math.pow(10, d)); - } - - function carry(val, d) { - if (d < ('' + Math.round((val - Math.floor(val)) * Math.pow(10, d))).length) { - return 1; - } - return 0; - } - - function flr(val) { - if (val < 2147483647 && val > -2147483648) return "" + (val >= 0 ? (val | 0) : (val - 1 | 0)); - return "" + Math.floor(val); - } - - function write_num_flt(type, fmt, val) { - if (type.charCodeAt(0) === 40 && !fmt.match(closeparen)) { - var ffmt = fmt.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, ""); - if (val >= 0) return write_num_flt('n', ffmt, val); - return '(' + write_num_flt('n', ffmt, -val) + ')'; - } - if (fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val); - if (fmt.indexOf('%') !== -1) return write_num_pct(type, fmt, val); - if (fmt.indexOf('E') !== -1) return write_num_exp(fmt, val); - if (fmt.charCodeAt(0) === 36) return "$" + write_num_flt(type, fmt.substr(fmt.charAt(1) == ' ' ? 2 : 1), val); - var o; - var r, ri, ff, aval = Math.abs(val), - sign = val < 0 ? "-" : ""; - if (fmt.match(/^00+$/)) return sign + pad0r(aval, fmt.length); - if (fmt.match(/^[#?]+$/)) { - o = pad0r(val, 0); - if (o === "0") o = ""; - return o.length > fmt.length ? o : hashq(fmt.substr(0, fmt.length - o.length)) + o; - } - if ((r = fmt.match(frac1))) return write_num_f1(r, aval, sign); - if (fmt.match(/^#+0+$/)) return sign + pad0r(aval, fmt.length - fmt.indexOf("0")); - if ((r = fmt.match(dec1))) { - o = rnd(val, r[1].length).replace(/^([^\.]+)$/, "$1." + hashq(r[1])).replace(/\.$/, "." + hashq(r[1])).replace(/\.(\d*)$/, function($$, $1) { - return "." + $1 + fill("0", hashq(r[1]).length - $1.length); - }); - return fmt.indexOf("0.") !== -1 ? o : o.replace(/^0\./, "."); - } - fmt = fmt.replace(/^#+([0.])/, "$1"); - if ((r = fmt.match(/^(0*)\.(#*)$/))) { - return sign + rnd(aval, r[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, r[1].length ? "0." : "."); - } - if ((r = fmt.match(/^#{1,3},##0(\.?)$/))) return sign + commaify(pad0r(aval, 0)); - if ((r = fmt.match(/^#,##0\.([#0]*0)$/))) { - return val < 0 ? "-" + write_num_flt(type, fmt, -val) : commaify("" + (Math.floor(val) + carry(val, r[1].length))) + "." + pad0(dec(val, r[1].length), r[1].length); - } - if ((r = fmt.match(/^#,#*,#0/))) return write_num_flt(type, fmt.replace(/^#,#*,/, ""), val); - if ((r = fmt.match(/^([0#]+)(\\?-([0#]+))+$/))) { - o = _strrev(write_num_flt(type, fmt.replace(/[\\-]/g, ""), val)); - ri = 0; - return _strrev(_strrev(fmt.replace(/\\/g, "")).replace(/[0#]/g, function(x) { - return ri < o.length ? o.charAt(ri++) : x === '0' ? '0' : ""; - })); - } - if (fmt.match(phone)) { - o = write_num_flt(type, "##########", val); - return "(" + o.substr(0, 3) + ") " + o.substr(3, 3) + "-" + o.substr(6); - } - var oa = ""; - if ((r = fmt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))) { - ri = Math.min(r[4].length, 7); - ff = frac(aval, Math.pow(10, ri) - 1, false); - o = "" + sign; - oa = write_num("n", r[1], ff[1]); - if (oa.charAt(oa.length - 1) == " ") oa = oa.substr(0, oa.length - 1) + "0"; - o += oa + r[2] + "/" + r[3]; - oa = rpad_(ff[2], ri); - if (oa.length < r[4].length) oa = hashq(r[4].substr(r[4].length - oa.length)) + oa; - o += oa; - return o; - } - if ((r = fmt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))) { - ri = Math.min(Math.max(r[1].length, r[4].length), 7); - ff = frac(aval, Math.pow(10, ri) - 1, true); - return sign + (ff[0] || (ff[1] ? "" : "0")) + " " + (ff[1] ? pad_(ff[1], ri) + r[2] + "/" + r[3] + rpad_(ff[2], ri) : fill(" ", 2 * ri + 1 + r[2].length + r[3].length)); - } - if ((r = fmt.match(/^[#0?]+$/))) { - o = pad0r(val, 0); - if (fmt.length <= o.length) return o; - return hashq(fmt.substr(0, fmt.length - o.length)) + o; - } - if ((r = fmt.match(/^([#0?]+)\.([#0]+)$/))) { - o = "" + val.toFixed(Math.min(r[2].length, 10)).replace(/([^0])0+$/, "$1"); - ri = o.indexOf("."); - var lres = fmt.indexOf(".") - ri, - rres = fmt.length - o.length - lres; - return hashq(fmt.substr(0, lres) + o + fmt.substr(fmt.length - rres)); - } - if ((r = fmt.match(/^00,000\.([#0]*0)$/))) { - ri = dec(val, r[1].length); - return val < 0 ? "-" + write_num_flt(type, fmt, -val) : commaify(flr(val)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function($$) { - return "00," + ($$.length < 3 ? pad0(0, 3 - $$.length) : "") + $$; - }) + "." + pad0(ri, r[1].length); - } - switch (fmt) { - case "###,##0.00": - return write_num_flt(type, "#,##0.00", val); - case "###,###": - case "##,###": - case "#,###": - var x = commaify(pad0r(aval, 0)); - return x !== "0" ? sign + x : ""; - case "###,###.00": - return write_num_flt(type, "###,##0.00", val).replace(/^0\./, "."); - case "#,###.00": - return write_num_flt(type, "#,##0.00", val).replace(/^0\./, "."); - default: - } - throw new Error("unsupported format |" + fmt + "|"); - } - - function write_num_cm2(type, fmt, val) { - var idx = fmt.length - 1; - while (fmt.charCodeAt(idx - 1) === 44) --idx; - return write_num(type, fmt.substr(0, idx), val / Math.pow(10, 3 * (fmt.length - idx))); - } - - function write_num_pct2(type, fmt, val) { - var sfmt = fmt.replace(pct1, ""), - mul = fmt.length - sfmt.length; - return write_num(type, sfmt, val * Math.pow(10, 2 * mul)) + fill("%", mul); - } - - function write_num_exp2(fmt, val) { - var o; - var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1; - if (fmt.match(/^#+0.0E\+0$/)) { - if (val == 0) return "0.0E+0"; - else if (val < 0) return "-" + write_num_exp2(fmt, -val); - var period = fmt.indexOf("."); - if (period === -1) period = fmt.indexOf('E'); - var ee = Math.floor(Math.log(val) * Math.LOG10E) % period; - if (ee < 0) ee += period; - o = (val / Math.pow(10, ee)).toPrecision(idx + 1 + (period + ee) % period); - if (!o.match(/[Ee]/)) { - var fakee = Math.floor(Math.log(val) * Math.LOG10E); - if (o.indexOf(".") === -1) o = o.charAt(0) + "." + o.substr(1) + "E+" + (fakee - o.length + ee); - else o += "E+" + (fakee - ee); - o = o.replace(/\+-/, "-"); - } - o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function($$, $1, $2, $3) { - return $1 + $2 + $3.substr(0, (period + ee) % period) + "." + $3.substr(ee) + "E"; - }); - } else o = val.toExponential(idx); - if (fmt.match(/E\+00$/) && o.match(/e[+-]\d$/)) o = o.substr(0, o.length - 1) + "0" + o.charAt(o.length - 1); - if (fmt.match(/E\-/) && o.match(/e\+/)) o = o.replace(/e\+/, "e"); - return o.replace("e", "E"); - } - - function write_num_int(type, fmt, val) { - if (type.charCodeAt(0) === 40 && !fmt.match(closeparen)) { - var ffmt = fmt.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, ""); - if (val >= 0) return write_num_int('n', ffmt, val); - return '(' + write_num_int('n', ffmt, -val) + ')'; - } - if (fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val); - if (fmt.indexOf('%') !== -1) return write_num_pct2(type, fmt, val); - if (fmt.indexOf('E') !== -1) return write_num_exp2(fmt, val); - if (fmt.charCodeAt(0) === 36) return "$" + write_num_int(type, fmt.substr(fmt.charAt(1) == ' ' ? 2 : 1), val); - var o; - var r, ri, ff, aval = Math.abs(val), - sign = val < 0 ? "-" : ""; - if (fmt.match(/^00+$/)) return sign + pad0(aval, fmt.length); - if (fmt.match(/^[#?]+$/)) { - o = ("" + val); - if (val === 0) o = ""; - return o.length > fmt.length ? o : hashq(fmt.substr(0, fmt.length - o.length)) + o; - } - if ((r = fmt.match(frac1))) return write_num_f2(r, aval, sign); - if (fmt.match(/^#+0+$/)) return sign + pad0(aval, fmt.length - fmt.indexOf("0")); - if ((r = fmt.match(dec1))) { - o = ("" + val).replace(/^([^\.]+)$/, "$1." + hashq(r[1])).replace(/\.$/, "." + hashq(r[1])); - o = o.replace(/\.(\d*)$/, function($$, $1) { - return "." + $1 + fill("0", hashq(r[1]).length - $1.length); - }); - return fmt.indexOf("0.") !== -1 ? o : o.replace(/^0\./, "."); - } - fmt = fmt.replace(/^#+([0.])/, "$1"); - if ((r = fmt.match(/^(0*)\.(#*)$/))) { - return sign + ("" + aval).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, r[1].length ? "0." : "."); - } - if ((r = fmt.match(/^#{1,3},##0(\.?)$/))) return sign + commaify(("" + aval)); - if ((r = fmt.match(/^#,##0\.([#0]*0)$/))) { - return val < 0 ? "-" + write_num_int(type, fmt, -val) : commaify(("" + val)) + "." + fill('0', r[1].length); - } - if ((r = fmt.match(/^#,#*,#0/))) return write_num_int(type, fmt.replace(/^#,#*,/, ""), val); - if ((r = fmt.match(/^([0#]+)(\\?-([0#]+))+$/))) { - o = _strrev(write_num_int(type, fmt.replace(/[\\-]/g, ""), val)); - ri = 0; - return _strrev(_strrev(fmt.replace(/\\/g, "")).replace(/[0#]/g, function(x) { - return ri < o.length ? o.charAt(ri++) : x === '0' ? '0' : ""; - })); - } - if (fmt.match(phone)) { - o = write_num_int(type, "##########", val); - return "(" + o.substr(0, 3) + ") " + o.substr(3, 3) + "-" + o.substr(6); - } - var oa = ""; - if ((r = fmt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))) { - ri = Math.min(r[4].length, 7); - ff = frac(aval, Math.pow(10, ri) - 1, false); - o = "" + sign; - oa = write_num("n", r[1], ff[1]); - if (oa.charAt(oa.length - 1) == " ") oa = oa.substr(0, oa.length - 1) + "0"; - o += oa + r[2] + "/" + r[3]; - oa = rpad_(ff[2], ri); - if (oa.length < r[4].length) oa = hashq(r[4].substr(r[4].length - oa.length)) + oa; - o += oa; - return o; - } - if ((r = fmt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))) { - ri = Math.min(Math.max(r[1].length, r[4].length), 7); - ff = frac(aval, Math.pow(10, ri) - 1, true); - return sign + (ff[0] || (ff[1] ? "" : "0")) + " " + (ff[1] ? pad_(ff[1], ri) + r[2] + "/" + r[3] + rpad_(ff[2], ri) : fill(" ", 2 * ri + 1 + r[2].length + r[3].length)); - } - if ((r = fmt.match(/^[#0?]+$/))) { - o = "" + val; - if (fmt.length <= o.length) return o; - return hashq(fmt.substr(0, fmt.length - o.length)) + o; - } - if ((r = fmt.match(/^([#0]+)\.([#0]+)$/))) { - o = "" + val.toFixed(Math.min(r[2].length, 10)).replace(/([^0])0+$/, "$1"); - ri = o.indexOf("."); - var lres = fmt.indexOf(".") - ri, - rres = fmt.length - o.length - lres; - return hashq(fmt.substr(0, lres) + o + fmt.substr(fmt.length - rres)); - } - if ((r = fmt.match(/^00,000\.([#0]*0)$/))) { - return val < 0 ? "-" + write_num_int(type, fmt, -val) : commaify("" + val).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function($$) { - return "00," + ($$.length < 3 ? pad0(0, 3 - $$.length) : "") + $$; - }) + "." + pad0(0, r[1].length); - } - switch (fmt) { - case "###,###": - case "##,###": - case "#,###": - var x = commaify("" + aval); - return x !== "0" ? sign + x : ""; - default: - if (fmt.match(/\.[0#?]*$/)) return write_num_int(type, fmt.slice(0, fmt.lastIndexOf(".")), val) + hashq(fmt.slice(fmt.lastIndexOf("."))); - } - throw new Error("unsupported format |" + fmt + "|"); - } - return function write_num(type, fmt, val) { - return (val | 0) === val ? write_num_int(type, fmt, val) : write_num_flt(type, fmt, val); - }; - })(); - - function split_fmt(fmt) { - var out = []; - var in_str = false /*, cc*/ ; - for (var i = 0, j = 0; i < fmt.length; ++i) switch (( /*cc=*/ fmt.charCodeAt(i))) { - case 34: - /* '"' */ in_str = !in_str; - break; - case 95: - case 42: - case 92: - /* '_' '*' '\\' */ - ++i; - break; - case 59: - /* ';' */ out[out.length] = fmt.substr(j, i - j); - j = i + 1; - } - out[out.length] = fmt.substr(j); - if (in_str === true) throw new Error("Format |" + fmt + "| unterminated string "); - return out; - } - SSF._split = split_fmt; - var abstime = /\[[HhMmSs]*\]/; - - function fmt_is_date(fmt) { - var i = 0, - /*cc = 0,*/ c = "", - o = ""; - while (i < fmt.length) { - switch ((c = fmt.charAt(i))) { - case 'G': - if (isgeneral(fmt, i)) i += 6; - i++; - break; - case '"': - for (; - ( /*cc=*/ fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) ++i; - ++i; - break; - case '\\': - i += 2; - break; - case '_': - i += 2; - break; - case '@': - ++i; - break; - case 'B': - case 'b': - if (fmt.charAt(i + 1) === "1" || fmt.charAt(i + 1) === "2") return true; - /* falls through */ - case 'M': - case 'D': - case 'Y': - case 'H': - case 'S': - case 'E': - /* falls through */ - case 'm': - case 'd': - case 'y': - case 'h': - case 's': - case 'e': - case 'g': - return true; - case 'A': - case 'a': - if (fmt.substr(i, 3).toUpperCase() === "A/P") return true; - if (fmt.substr(i, 5).toUpperCase() === "AM/PM") return true; - ++i; - break; - case '[': - o = c; - while (fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i); - if (o.match(abstime)) return true; - break; - case '.': - /* falls through */ - case '0': - case '#': - while (i < fmt.length && ("0#?.,E+-%".indexOf(c = fmt.charAt(++i)) > -1 || (c == '\\' && fmt.charAt(i + 1) == "-" && "0#".indexOf(fmt.charAt(i + 2)) > -1))) { /* empty */ } - break; - case '?': - while (fmt.charAt(++i) === c) { /* empty */ } - break; - case '*': - ++i; - if (fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; - break; - case '(': - case ')': - ++i; - break; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - while (i < fmt.length && "0123456789".indexOf(fmt.charAt(++i)) > -1) { /* empty */ } - break; - case ' ': - ++i; - break; - default: - ++i; - break; - } - } - return false; - } - SSF.is_date = fmt_is_date; - - function eval_fmt(fmt, v, opts, flen) { - var out = [], - o = "", - i = 0, - c = "", - lst = 't', - dt, j, cc; - var hr = 'H'; - /* Tokenize */ - while (i < fmt.length) { - switch ((c = fmt.charAt(i))) { - case 'G': - /* General */ if (!isgeneral(fmt, i)) throw new Error('unrecognized character ' + c + ' in ' + fmt); - out[out.length] = { - t: 'G', - v: 'General' - }; - i += 7; - break; - case '"': - /* Literal text */ for (o = ""; - (cc = fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) o += String.fromCharCode(cc); - out[out.length] = { - t: 't', - v: o - }; - ++i; - break; - case '\\': - var w = fmt.charAt(++i), - t = (w === "(" || w === ")") ? w : 't'; - out[out.length] = { - t: t, - v: w - }; - ++i; - break; - case '_': - out[out.length] = { - t: 't', - v: " " - }; - i += 2; - break; - case '@': - /* Text Placeholder */ out[out.length] = { - t: 'T', - v: v - }; - ++i; - break; - case 'B': - case 'b': - if (fmt.charAt(i + 1) === "1" || fmt.charAt(i + 1) === "2") { - if (dt == null) { - dt = parse_date_code(v, opts, fmt.charAt(i + 1) === "2"); - if (dt == null) return ""; - } - out[out.length] = { - t: 'X', - v: fmt.substr(i, 2) - }; - lst = c; - i += 2; - break; - } - /* falls through */ - case 'M': - case 'D': - case 'Y': - case 'H': - case 'S': - case 'E': - c = c.toLowerCase(); - /* falls through */ - case 'm': - case 'd': - case 'y': - case 'h': - case 's': - case 'e': - case 'g': - if (v < 0) return ""; - if (dt == null) { - dt = parse_date_code(v, opts); - if (dt == null) return "######"; - } - o = c; - while (++i < fmt.length && fmt.charAt(i).toLowerCase() === c) o += c; - if (c === 'm' && lst.toLowerCase() === 'h') c = 'M'; - if (c === 'h') c = hr; - out[out.length] = { - t: c, - v: o - }; - lst = c; - break; - case 'A': - case 'a': - var q = { - t: c, - v: c - }; - if (dt == null) dt = parse_date_code(v, opts); - if (fmt.substr(i, 3).toUpperCase() === "A/P") { - if (dt != null) q.v = dt.H >= 12 ? "P" : "A"; - q.t = 'T'; - hr = 'h'; - i += 3; - } else if (fmt.substr(i, 5).toUpperCase() === "AM/PM") { - if (dt != null) q.v = dt.H >= 12 ? "PM" : "AM"; - q.t = 'T'; - i += 5; - hr = 'h'; - } else { - q.t = "t"; - ++i; - } - if (dt == null && q.t === 'T') return ""; - out[out.length] = q; - lst = c; - break; - case '[': - o = c; - while (fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i); - if (o.slice(-1) !== ']') throw 'unterminated "[" block: |' + o + '|'; - if (o.match(abstime)) { - if (dt == null) { - dt = parse_date_code(v, opts); - if (dt == null) return ""; - } - out[out.length] = { - t: 'Z', - v: o.toLowerCase() - }; - lst = o.charAt(1); - } else if (o.indexOf("$") > -1) { - o = (o.match(/\$([^-\[\]]*)/) || [])[1] || "$"; - if (!fmt_is_date(fmt)) out[out.length] = { - t: 't', - v: o - }; - } - break; - /* Numbers */ - case '.': - if (dt != null) { - o = c; - while (++i < fmt.length && (c = fmt.charAt(i)) === "0") o += c; - out[out.length] = { - t: 's', - v: o - }; - break; - } - /* falls through */ - case '0': - case '#': - o = c; - while ((++i < fmt.length && "0#?.,E+-%".indexOf(c = fmt.charAt(i)) > -1) || (c == '\\' && fmt.charAt(i + 1) == "-" && i < fmt.length - 2 && "0#".indexOf(fmt.charAt(i + 2)) > -1)) o += c; - out[out.length] = { - t: 'n', - v: o - }; - break; - case '?': - o = c; - while (fmt.charAt(++i) === c) o += c; - out[out.length] = { - t: c, - v: o - }; - lst = c; - break; - case '*': - ++i; - if (fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; - break; // ** - case '(': - case ')': - out[out.length] = { - t: (flen === 1 ? 't' : c), - v: c - }; - ++i; - break; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - o = c; - while (i < fmt.length && "0123456789".indexOf(fmt.charAt(++i)) > -1) o += fmt.charAt(i); - out[out.length] = { - t: 'D', - v: o - }; - break; - case ' ': - out[out.length] = { - t: c, - v: c - }; - ++i; - break; - default: - // if ("¤฿BsBr₵₡₫ƒFtRs.₭kr£₤Lm₥₦₱PQRSkRp৲৳R$S/.〒₮₩¥NT¥zł₴₪៛руб€$,$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt); - if ("¤฿BsBr₵₡₫ƒFtRs.₭kr£₤Lm₥₦₱PQRSkRp৲৳R$S/.〒₮₩¥NT¥zł₴₪៛руб€$,$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP$¥LekdinAf$dhAflRial?£BirrKzMOPPGKRsGsB/R$ррlevkrKMzBsPNuFBuKPkrRD$NfkCFA?CVEGMDFrCDHTGNAfLFdjKGSFGGHSRielKCFknKshLSLL£LtRFRONArRfMWKRMMURsMROS/KMDLMTnRC$kr€GELCHFSLLSCRDbSZLSDGSOSSomFCFPTShT$VUVQUGXгрнsomWSTNT$FtDramRpZMWFCFA".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt); - out[out.length] = { - t: 't', - v: c - }; - ++i; - break; - } - } - var bt = 0, - ss0 = 0, - ssm; - for (i = out.length - 1, lst = 't'; i >= 0; --i) { - switch (out[i].t) { - case 'h': - case 'H': - out[i].t = hr; - lst = 'h'; - if (bt < 1) bt = 1; - break; - case 's': - if ((ssm = out[i].v.match(/\.0+$/))) ss0 = Math.max(ss0, ssm[0].length - 1); - if (bt < 3) bt = 3; - /* falls through */ - case 'd': - case 'y': - case 'M': - case 'e': - lst = out[i].t; - break; - case 'm': - if (lst === 's') { - out[i].t = 'M'; - if (bt < 2) bt = 2; - } - break; - case 'X': - /*if(out[i].v === "B2");*/ break; - case 'Z': - if (bt < 1 && out[i].v.match(/[Hh]/)) bt = 1; - if (bt < 2 && out[i].v.match(/[Mm]/)) bt = 2; - if (bt < 3 && out[i].v.match(/[Ss]/)) bt = 3; - } - } - switch (bt) { - case 0: - break; - case 1: - if (dt.u >= 0.5) { - dt.u = 0; - ++dt.S; - } - if (dt.S >= 60) { - dt.S = 0; - ++dt.M; - } - if (dt.M >= 60) { - dt.M = 0; - ++dt.H; - } - break; - case 2: - if (dt.u >= 0.5) { - dt.u = 0; - ++dt.S; - } - if (dt.S >= 60) { - dt.S = 0; - ++dt.M; - } - break; - } - /* replace fields */ - var nstr = "", - jj; - for (i = 0; i < out.length; ++i) { - switch (out[i].t) { - case 't': - case 'T': - case ' ': - case 'D': - break; - case 'X': - out[i].v = ""; - out[i].t = ";"; - break; - case 'd': - case 'm': - case 'y': - case 'h': - case 'H': - case 'M': - case 's': - case 'e': - case 'b': - case 'Z': - out[i].v = write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0); - out[i].t = 't'; - break; - case 'n': - case '(': - case '?': - jj = i + 1; - while (out[jj] != null && ( - (c = out[jj].t) === "?" || c === "D" || ((c === " " || c === "t") && out[jj + 1] != null && (out[jj + 1].t === '?' || out[jj + 1].t === "t" && out[jj + 1].v === '/')) || (out[i].t === '(' && (c === ' ' || c === 'n' || c === ')')) || (c === 't' && (out[jj].v === '/' || out[jj].v === ' ' && out[jj + 1] != null && out[jj + 1].t == '?')))) { - out[i].v += out[jj].v; - out[jj] = { - v: "", - t: ";" - }; - ++jj; - } - nstr += out[i].v; - i = jj - 1; - break; - case 'G': - out[i].t = 't'; - out[i].v = general_fmt(v, opts); - break; - } - } - var vv = "", - myv, ostr; - if (nstr.length > 0) { - if (nstr.charCodeAt(0) == 40) /* '(' */ { - myv = (v < 0 && nstr.charCodeAt(0) === 45 ? -v : v); - ostr = write_num('(', nstr, myv); - } else { - myv = (v < 0 && flen > 1 ? -v : v); - ostr = write_num('n', nstr, myv); - if (myv < 0 && out[0] && out[0].t == 't') { - ostr = ostr.substr(1); - out[0].v = "-" + out[0].v; - } - } - jj = ostr.length - 1; - var decpt = out.length; - for (i = 0; i < out.length; ++i) - if (out[i] != null && out[i].t != 't' && out[i].v.indexOf(".") > -1) { - decpt = i; - break; - } - var lasti = out.length; - if (decpt === out.length && ostr.toUpperCase().indexOf("E") === -1) { - for (i = out.length - 1; i >= 0; --i) { - if (out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; - if (jj >= out[i].v.length - 1) { - jj -= out[i].v.length; - out[i].v = ostr.substr(jj + 1, out[i].v.length); - } else if (jj < 0) out[i].v = ""; - else { - out[i].v = ostr.substr(0, jj + 1); - jj = -1; - } - out[i].t = 't'; - lasti = i; - } - if (jj >= 0 && lasti < out.length) out[lasti].v = ostr.substr(0, jj + 1) + out[lasti].v; - } else if (decpt !== out.length && ostr.toUpperCase().indexOf("E") === -1) { - jj = ostr.indexOf(".") - 1; - for (i = decpt; i >= 0; --i) { - if (out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; - j = out[i].v.indexOf(".") > -1 && i === decpt ? out[i].v.indexOf(".") - 1 : out[i].v.length - 1; - vv = out[i].v.substr(j + 1); - for (; j >= 0; --j) { - if (jj >= 0 && (out[i].v.charAt(j) === "0" || out[i].v.charAt(j) === "#")) vv = ostr.charAt(jj--) + vv; - } - out[i].v = vv; - out[i].t = 't'; - lasti = i; - } - if (jj >= 0 && lasti < out.length) out[lasti].v = ostr.substr(0, jj + 1) + out[lasti].v; - jj = ostr.indexOf(".") + 1; - for (i = decpt; i < out.length; ++i) { - if (out[i] == null || ('n?('.indexOf(out[i].t) === -1 && i !== decpt)) continue; - j = out[i].v.indexOf(".") > -1 && i === decpt ? out[i].v.indexOf(".") + 1 : 0; - vv = out[i].v.substr(0, j); - for (; j < out[i].v.length; ++j) { - if (jj < ostr.length) vv += ostr.charAt(jj++); - } - out[i].v = vv; - out[i].t = 't'; - lasti = i; - } - } - } - for (i = 0; i < out.length; ++i) - if (out[i] != null && 'n(?'.indexOf(out[i].t) > -1) { - myv = (flen > 1 && v < 0 && i > 0 && out[i - 1].v === "-" ? -v : v); - out[i].v = write_num(out[i].t, out[i].v, myv); - out[i].t = 't'; - } - var retval = ""; - for (i = 0; i !== out.length; ++i) - if (out[i] != null) retval += out[i].v; - return retval; - } - SSF._eval = eval_fmt; - var cfregex = /\[[=<>]/; - var cfregex2 = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/; - - function chkcond(v, rr) { - if (rr == null) return false; - var thresh = parseFloat(rr[2]); - switch (rr[1]) { - case "=": - if (v == thresh) return true; - break; - case ">": - if (v > thresh) return true; - break; - case "<": - if (v < thresh) return true; - break; - case "<>": - if (v != thresh) return true; - break; - case ">=": - if (v >= thresh) return true; - break; - case "<=": - if (v <= thresh) return true; - break; - } - return false; - } - - function choose_fmt(f, v) { - var fmt = split_fmt(f); - var l = fmt.length, - lat = fmt[l - 1].indexOf("@"); - if (l < 4 && lat > -1) --l; - if (fmt.length > 4) throw new Error("cannot find right format for |" + fmt.join("|") + "|"); - if (typeof v !== "number") return [4, fmt.length === 4 || lat > -1 ? fmt[fmt.length - 1] : "@"]; - switch (fmt.length) { - case 1: - fmt = lat > -1 ? ["General", "General", "General", fmt[0]] : [fmt[0], fmt[0], fmt[0], "@"]; - break; - case 2: - fmt = lat > -1 ? [fmt[0], fmt[0], fmt[0], fmt[1]] : [fmt[0], fmt[1], fmt[0], "@"]; - break; - case 3: - fmt = lat > -1 ? [fmt[0], fmt[1], fmt[0], fmt[2]] : [fmt[0], fmt[1], fmt[2], "@"]; - break; - case 4: - break; - } - var ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2]; - if (fmt[0].indexOf("[") === -1 && fmt[1].indexOf("[") === -1) return [l, ff]; - if (fmt[0].match(cfregex) != null || fmt[1].match(cfregex) != null) { - var m1 = fmt[0].match(cfregex2); - var m2 = fmt[1].match(cfregex2); - return chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != null ? 2 : 1]]; - } - return [l, ff]; - } - - function format(fmt, v, o) { - if (o == null) o = {}; - var sfmt = ""; - switch (typeof fmt) { - case "string": - if (fmt == "m/d/yy" && o.dateNF) sfmt = o.dateNF; - else sfmt = fmt; - break; - case "number": - if (fmt == 14 && o.dateNF) sfmt = o.dateNF; - else sfmt = (o.table != null ? (o.table) : table_fmt)[fmt]; - break; - } - - //new runze 增加万 亿 格式 - //注:"w":2万2500 "w0":2万2500 "w0.0":2万2500.2 "w0.00":2万2500.23......自定义精确度 - var reg = /^(w|W)((0?)|(0\.0+))$/; - if(!!sfmt.match(reg)){ - if(isNaN(v)){ - return v; - } - - //var v =300101886.436; - var acc = sfmt.slice(1); //取得0/0.0/0.00 - var isNegative = false; - if(!isNaN(v) && Number(v) < 0){ - isNegative = true; - v = Math.abs(v); - } - var vInt = parseInt(v); - - var vlength = vInt.toString().length; - if( vlength> 4){ - if(vlength > 8){ - var y =parseInt (v / 100000000); //亿 - var w = parseInt(luckysheet.floatTool.subtract(v,y*100000000) / 10000); //万 - var q = luckysheet.floatTool.subtract(v,y*100000000 + w*10000); //千以后 - if(acc != ""){ - q = numeral(q).format(acc); //处理精确度 - } - v = y + "亿" + w + "万" + q; - }else{ - var w = parseInt(v / 10000); //万 - var q = luckysheet.floatTool.subtract(v,w*10000); //千以后 - if(acc != ""){ - q = numeral(q).format(acc); //处理精确度 - } - v = w + "万" + q; - } - - - if(v.indexOf("亿0万0") != -1){ - v = v.replace("0万0",""); - }else if(v.indexOf("亿0万") != -1){ - v = v.replace("0万",""); - }else if(v.indexOf("万0") != -1){ - v = v.replace("万0","万"); - } - - //舍弃正则后顾断言写法,旧浏览器不识别(360 V9) - if (v.indexOf("亿") != -1 && v.indexOf("万") == -1) { //1亿/1亿111 => 1亿/1亿0111 - var afterYi = v.substring(v.indexOf("亿") + 1); - if (afterYi.substring(0, 1) !== "." && afterYi != "") { - switch ((parseInt(afterYi) + "").length) { - case 1: - afterYi = "000" + afterYi; - break; - case 2: - afterYi = "00" + afterYi; - break; - case 3: - afterYi = "0" + afterYi; - break; - } - v = v.substring(0, v.indexOf("亿") + 1) + afterYi; - } - } else if (v.indexOf("亿") == -1 && v.indexOf("万") != -1) { //3万0011 - var afterWan = v.substring(v.indexOf("万") + 1); - if (afterWan.substring(0, 1) !== "." && afterWan != "") { - switch ((parseInt(afterWan) + "").length) { - case 1: - afterWan = "000" + afterWan; - break; - case 2: - afterWan = "00" + afterWan; - break; - case 3: - afterWan = "0" + afterWan; - break; - } - v = v.substring(0, v.indexOf("万") + 1) + afterWan; - } - } else if (v.indexOf("亿") != -1 && v.indexOf("万") != -1) { //1亿0053万0611 - var afterYi = v.substring(v.indexOf("亿") + 1,v.indexOf("万")), - afterWan = v.substring(v.indexOf("万") + 1); - - switch ((parseInt(afterYi) + "").length) { - case 1: - afterYi = "000" + afterYi; - break; - case 2: - afterYi = "00" + afterYi; - break; - case 3: - afterYi = "0" + afterYi; - break; - } - v = v.substring(0, v.indexOf("亿") + 1) + afterYi + v.substring(v.indexOf("万")) - - - if (afterWan.substring(0, 1) !== "." && afterWan != "") { - switch ((parseInt(afterWan) + "").length) { - case 1: - afterWan = "000" + afterWan; - break; - case 2: - afterWan = "00" + afterWan; - break; - case 3: - afterWan = "0" + afterWan; - break; - } - v = v.substring(0, v.indexOf("万") + 1) + afterWan - } - } - - }else{ - if(acc != ""){ - v = numeral(v).format(acc); //处理精确度 - } - } - if(isNegative){ - return '-' + v; - }else{ - return v; - } - - } - - if (isgeneral(sfmt, 0)) return general_fmt(v, o); - if (v instanceof Date) v = datenum_local(v, o.date1904); - var f = choose_fmt(sfmt, v); - if (isgeneral(f[1])) return general_fmt(v, o); - if (v === true) v = "TRUE"; - else if (v === false) v = "FALSE"; - else if (v === "" || v == null) return ""; - return eval_fmt(f[1], v, o, f[0]); - } - - function load_entry(fmt, idx) { - if (typeof idx != 'number') { - idx = +idx || -1; - for (var i = 0; i < 0x0188; ++i) { - if (table_fmt[i] == undefined) { - if (idx < 0) idx = i; - continue; - } - if (table_fmt[i] == fmt) { - idx = i; - break; - } - } - if (idx < 0) idx = 0x187; - } - table_fmt[idx] = fmt; - return idx; - } - SSF.load = load_entry; - SSF._table = table_fmt; - SSF.get_table = function get_table() { - return table_fmt; - }; - SSF.load_table = function load_table(tbl) { - for (var i = 0; i != 0x0188; ++i) - if (tbl[i] !== undefined) load_entry(tbl[i], i); - }; - SSF.init_table = init_table; - SSF.format = format; - }; - make_ssf(SSF); - - var XLMLFormatMap /*{[string]:string}*/ = ({ - "General Number": "General", - "General Date": SSF._table[22], - "Long Date": "dddd, mmmm dd, yyyy", - "Medium Date": SSF._table[15], - "Short Date": SSF._table[14], - "Long Time": SSF._table[19], - "Medium Time": SSF._table[18], - "Short Time": SSF._table[20], - "Currency": '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)', - "Fixed": SSF._table[2], - "Standard": SSF._table[4], - "Percent": SSF._table[10], - "Scientific": SSF._table[11], - "Yes/No": '"Yes";"Yes";"No";@', - "True/False": '"True";"True";"False";@', - "On/Off": '"Yes";"Yes";"No";@' - }); - - var unescapexml = (function() { - /* 22.4.2.4 bstr (Basic String) */ - var encregex = /&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/g, - coderegex = /_x([\da-fA-F]{4})_/g; - return function unescapexml(text) { - var s = text + '', - i = s.indexOf(" -1 ? 16 : 10)) || $$; - }).replace(coderegex, function(m, c) { - return String.fromCharCode(parseInt(c, 16)); - }); - var j = s.indexOf("]]>"); - return unescapexml(s.slice(0, i)) + s.slice(i + 9, j) + unescapexml(s.slice(j + 3)); - }; - })(); - - function xlml_format(format, value) { - var fmt = XLMLFormatMap[format] || unescapexml(format); - if (fmt === "General") return SSF._general(value); - return SSF.format(fmt, value); - } - - luckysheet.xlml_format = xlml_format; - luckysheet.SSF = SSF; - - var basedate = new Date(1899, 11, 31, 0, 0, 0); - var dnthresh = basedate.getTime(); - var base1904 = new Date(1900, 2, 1, 0, 0, 0); - - function datenum(v, date1904) { - var epoch = v.getTime(); - if (date1904) epoch -= 1462 * 24 * 60 * 60 * 1000; - return (epoch - dnthresh) / (24 * 60 * 60 * 1000); - } - - function datenum_local(v, date1904) { - var epoch = Date.UTC(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds()); - var dnthresh_utc = Date.UTC(1899, 11, 31, 0, 0, 0); - - if (date1904) epoch -= 1461 * 24 * 60 * 60 * 1000; - else if (v >= base1904) epoch += 24 * 60 * 60 * 1000; - return (epoch - dnthresh_utc) / (24 * 60 * 60 * 1000); - } - - function numdate(v) { - var out = new Date(); - out.setTime(v * 24 * 60 * 60 * 1000 + dnthresh); - return out; - } - /* ISO 8601 Duration */ - function parse_isodur(s) { - var sec = 0, - mt = 0, - time = false; - var m = s.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/); - if (!m) throw new Error("|" + s + "| is not an ISO8601 Duration"); - for (var i = 1; i != m.length; ++i) { - if (!m[i]) continue; - mt = 1; - if (i > 3) time = true; - switch (m[i].slice(m[i].length - 1)) { - case 'Y': - throw new Error("Unsupported ISO Duration Field: " + m[i].slice(m[i].length - 1)); - case 'D': - mt *= 24; - /* falls through */ - case 'H': - mt *= 60; - /* falls through */ - case 'M': - if (!time) throw new Error("Unsupported ISO Duration Field: M"); - else mt *= 60; - /* falls through */ - case 'S': - break; - } - sec += mt * parseInt(m[i], 10); - } - return sec; - } - var good_pd_date = new Date('2017-02-19T19:06:09.000Z'); - if (isNaN(good_pd_date.getFullYear())) good_pd_date = new Date('2/19/17'); - var good_pd = good_pd_date.getFullYear() == 2017; - /* parses a date as a local date */ - function parseDate(str, fixdate) { - var d = new Date(str); - //console.log(d); - if (good_pd) { - if (fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000); - else if (fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000); - return d; - } - if (str instanceof Date) return str; - if (good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) { - var s = d.getFullYear(); - if (str.indexOf("" + s) > -1) return d; - d.setFullYear(d.getFullYear() + 100); - return d; - } - var n = str.match(/\d+/g) || ["2017", "2", "19", "0", "0", "0"]; - var out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3] || 0), (+n[4] || 0), (+n[5] || 0)); - if (str.indexOf("Z") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000); - return out; - } - - luckysheet.parseDate = parseDate; - - /* TODO: stress test */ - function fuzzynum(s) { - var v = Number(s); - if(typeof s == "number"){ - return s; - } - if (!isNaN(v)) return v; - var wt = 1; - var ss = s.replace(/([\d]),([\d])/g, "$1$2").replace(/[$]/g, "").replace(/[%]/g, function() { - wt *= 100; - return ""; - }); - if (!isNaN(v = Number(ss))) return v / wt; - ss = ss.replace(/[(](.*)[)]/, function($$, $1) { - wt = -wt; - return $1; - }); - if (!isNaN(v = Number(ss))) return v / wt; - return v; - } - - luckysheet.fuzzynum = fuzzynum; - - function fuzzydate(s) { - var o = new Date(s), - n = new Date(NaN); - var y = o.getYear(), - m = o.getMonth(), - d = o.getDate(); - if (isNaN(d)) return n; - if (y < 0 || y > 8099) return n; - if ((m > 0 || d > 1) && y != 101) return o; - if (s.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) return o; - if (s.match(/[^-0-9:,\/\\]/)) return n; - return o; - } - - luckysheet.fuzzydate = fuzzydate; - - return { - //万 单位格式增加!!! - genarate: function(value){ - var ret = []; - var m = null, ct = {}, v = value; - - if(value == null){ - return null; - } - - if(value.toString().substr(0, 1) === "'"){ - m = value.toString().substr(1); - ct = { "fa": "@", "t": "s" }; - } - else if(value.toString().toUpperCase() === "TRUE"){ - m = "TRUE"; - ct = { "fa": "General", "t": "b" }; - v = true; - } - else if(value.toString().toUpperCase() === "FALSE"){ - m = "FALSE"; - ct = { "fa": "General", "t": "b" }; - v = false; - } - else if(luckysheet.func_methods.valueIsError(value)){ - m = value.toString(); - ct = { "fa": "General", "t": "e" }; - } - else if(/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(value)){ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - else if(luckysheet.func_methods.isRealNum(value) && Math.abs(parseFloat(value)) > 0 && (Math.abs(parseFloat(value)) >= 1e+11 || Math.abs(parseFloat(value)) < 1e-9)){ - v = numeral(value).value(); - - var str = v.toExponential(); - if(str.indexOf(".") > -1){ - var strlen = str.split(".")[1].split("e")[0].length; - if(strlen > 5){ - strlen = 5; - } - - ct = { "fa": "#0."+ new Array(strlen + 1).join("0") +"E+00", "t": "n" }; - } - else{ - ct = { "fa": "#0.E+00", "t": "n" }; - } - - m = SSF.format(ct.fa, v); - } - else if(value.toString().indexOf("%") > -1){ - var index = value.toString().indexOf("%"); - var value2 = value.toString().substr(0, index); - var value3 = value2.replace(/,/g, ""); - - if(index == value.toString().length - 1 && luckysheet.func_methods.isRealNum(value3)){ - if(value2.indexOf(".") > -1){ - if(value2.indexOf(".") == value2.lastIndexOf(".")){ - var value4 = value2.split(".")[0]; - var value5 = value2.split(".")[1]; - - var len = value5.length; - if(len > 9){ - len = 9; - } - - if(value4.indexOf(",") > -1){ - var isThousands = true; - var ThousandsArr = value4.split(","); - - for(var i = 1; i < ThousandsArr.length; i++){ - if(ThousandsArr[i].length < 3){ - isThousands = false; - break; - } - } - - if(isThousands){ - ct = { "fa": "#,##0." + new Array(len + 1).join("0") + "%", "t": "n" }; - v = numeral(value).value(); - m = SSF.format(ct.fa, v); - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - else{ - ct = { "fa": "0." + new Array(len + 1).join("0") + "%", "t": "n" }; - v = numeral(value).value(); - m = SSF.format(ct.fa, v); - } - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - else if(value2.indexOf(",") > -1){ - var isThousands = true; - var ThousandsArr = value2.split(","); - - for(var i = 1; i < ThousandsArr.length; i++){ - if(ThousandsArr[i].length < 3){ - isThousands = false; - break; - } - } - - if(isThousands){ - ct = { "fa": "#,##0%", "t": "n" }; - v = numeral(value).value(); - m = SSF.format(ct.fa, v); - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - else{ - ct = { "fa": "0%", "t": "n" }; - v = numeral(value).value(); - m = SSF.format(ct.fa, v); - } - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - else if(value.toString().indexOf(".") > -1){ - if(value.toString().indexOf(".") == value.toString().lastIndexOf(".")){ - var value1 = value.toString().split(".")[0]; - var value2 = value.toString().split(".")[1]; - - var len = value2.length; - if(len > 9){ - len = 9; - } - - if(value1.indexOf(",") > -1){ - var isThousands = true; - var ThousandsArr = value1.split(","); - - for(var i = 1; i < ThousandsArr.length; i++){ - if(!luckysheet.func_methods.isRealNum(ThousandsArr[i]) || ThousandsArr[i].length < 3){ - isThousands = false; - break; - } - } - - if(isThousands){ - ct = { "fa": "#,##0." + new Array(len + 1).join("0"), "t": "n" }; - v = numeral(value).value(); - m = SSF.format(ct.fa, v); - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - else{ - if(luckysheet.func_methods.isRealNum(value1) && luckysheet.func_methods.isRealNum(value2)){ - ct = { "fa": "0." + new Array(len + 1).join("0"), "t": "n" }; - v = numeral(value).value(); - m = SSF.format(ct.fa, v); - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - } - else{ - m = value.toString(); - ct = { "fa": "@", "t": "s" }; - } - } - else if(luckysheet.func_methods.isRealNum(value)){ - m = value.toString(); - ct = { "fa": "General", "t": "n" }; - v = parseFloat(value); - } - else if (luckysheet.datecontroll.isdatetime(value) && (value.toString().indexOf(".") > -1 || value.toString().indexOf(":") > -1 || value.toString().length < 16)){ - v = datenum_local(parseDate(value.toString().replace(/-/g, "/"))); - - if(v.toString().indexOf(".") > -1){ - if(value.toString().length > 18){ - ct.fa = "yyyy-MM-dd hh:mm:ss"; - } - else if(value.toString().length > 11){ - ct.fa = "yyyy-MM-dd hh:mm"; - } - else{ - ct.fa = "yyyy-MM-dd"; - } - } - else{ - ct.fa = "yyyy-MM-dd"; - } - - ct.t = "d"; - m = SSF.format(ct.fa, v); - } - else{ - m = value; - ct.fa = "General"; - ct.t = "g"; - } - - return [m, ct, v]; - }, - update:function(fmt, v){ - return SSF.format(fmt, v); - }, - is_date:function(fmt, v){ - return SSF.is_date(fmt, v); - }, - valueShowEs:function(r, c, d){ - var value = luckysheet.getcellvalue(r, c, d, "m"); - if(value == null){ - value = luckysheet.getcellvalue(r, c, d, "v"); - } - else{ - if (!isNaN(fuzzynum(value))){ - if(typeof(value) == "string" && value.indexOf("%") > -1){ - - } - else{ - value = luckysheet.getcellvalue(r, c, d, "v"); - } - } - // else if (!isNaN(parseDate(value).getDate())){ - else if (d[r][c].ct != null && d[r][c].ct.t == "d"){ - - } - else if (d[r][c].ct != null && d[r][c].ct.t == "b"){ - - } - else{ - value = luckysheet.getcellvalue(r, c, d, "v"); - } - } - return value; - } - } - - })(); - - - - luckysheet.pivotTable = { - pivotDatas: null, - pivotSheetIndex: 0, - pivotDataSheetIndex: 0, - // getpivotdata:function(getid){ - // for (var i = 0; i < this.pivotDatas;i++){ - // if (this.pivotDatas[i].id == getid) { - // return this.pivotDatas[i]; - // } - // } - // return null; - // }, - // setpivotdata:function(data){ - // pivotDatas.push(data); - // }, - celldata: null, - origindata: null, - getCellData: function (cursheetindex, datasheetindex, data_select_save) { - var sheetIndex; - if (cursheetindex != null) { - sheetIndex = cursheetindex; - } - else { - sheetIndex = luckysheet.currentSheetIndex; - } - - var realIndex = luckysheet.sheetmanage.getSheetIndex(sheetIndex); - - if (luckysheet.getObjType(luckysheetfile[realIndex].pivotTable) != "object"){ - luckysheetfile[realIndex].pivotTable = eval('('+ luckysheetfile[realIndex].pivotTable +')'); - } - - if (luckysheetfile[realIndex].pivotTable != null) { - this.column = luckysheetfile[realIndex].pivotTable.column; - this.row = luckysheetfile[realIndex].pivotTable.row; - this.values = luckysheetfile[realIndex].pivotTable.values; - this.filter = luckysheetfile[realIndex].pivotTable.filter; - this.showType = luckysheetfile[realIndex].pivotTable.showType; - - this.filterparm = luckysheetfile[realIndex].pivotTable.filterparm; - - if (luckysheetfile[realIndex].pivotTable.drawPivotTable != null) { - this.drawPivotTable = luckysheetfile[realIndex].pivotTable.drawPivotTable; - } - else { - this.drawPivotTable = true; - } - - if (luckysheetfile[realIndex].pivotTable.pivotTableBoundary != null) { - this.pivotTableBoundary = luckysheetfile[realIndex].pivotTable.pivotTableBoundary; - } - else { - this.pivotTableBoundary = [12, 6]; - } - - if (data_select_save != null) { - this.pivot_select_save = data_select_save; - } - else { - this.pivot_select_save = luckysheetfile[realIndex].pivotTable.pivot_select_save; - } - - if (datasheetindex != null) { - this.pivotDataSheetIndex = datasheetindex; - } - else { - this.pivotDataSheetIndex = luckysheetfile[realIndex].pivotTable.pivotDataSheetIndex; - } - } - else { - this.column = null; - this.row = null; - this.values = null; - this.filter = null; - this.showType = null; - - this.filterparm = null; - - this.drawPivotTable = true; - this.pivotTableBoundary = [12, 6]; - - if (data_select_save != null) { - this.pivot_select_save = data_select_save; - } - else { - this.pivot_select_save = luckysheet_select_save; - } - - if (datasheetindex != null) { - this.pivotDataSheetIndex = datasheetindex; - } - else { - this.pivotDataSheetIndex = sheetIndex; - } - } - - var pivotrealIndex = luckysheet.sheetmanage.getSheetIndex(this.pivotDataSheetIndex); - - var otherfile = luckysheetfile[pivotrealIndex]; - if(otherfile["data"] == null){ - otherfile["data"] = luckysheet.sheetmanage.buildGridData(otherfile); - } - this.origindata = luckysheet.getdatabyselectionD(otherfile.data, this.pivot_select_save); - - var rowhidden = {}; - if (this.filterparm != null) { - for (var f in this.filterparm) { - for (h in this.filterparm[f]) { - if (h.rowhidden != null) { - rowhidden = $.extend(true, rowhidden, h.rowhidden); - } - } - } - } - this.rowhidden = rowhidden; - //this.pivot_select_save = $.extend(true, {}, this.pivot_select_save); - - this.pivotSheetIndex = sheetIndex; - - var newdata = []; - for (var i = 0; i < this.origindata.length; i++) { - if (this.rowhidden != null && this.rowhidden[i] != null) { - continue; - } - newdata.push([].concat(this.origindata[i])); - } - this.celldata = newdata; - - this.pivot_data_type = {}; - for (var c = 0; c < this.celldata[1].length; c++) { - var type = luckysheet.isdatatype(this.celldata[1][c]); - this.pivot_data_type[c.toString()] = type; - } - }, - pivot_data_type: {}, - pivot_select_save: null, - column: null, - row: null, - values: null, - filter: null, - showType: null, - rowhidden: null, - selected: null, - caljs: null, - initial: true, - filterparm: null, - luckysheet_pivotTable_select_state: false, - jgridCurrentPivotInput: null, - movestate: false, - moveitemposition: [], - movesave: {}, - showvaluecolrow: function () { - if ($("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").length >= 2) { - $("#luckysheetpivottablevaluecolrowshow").show(); - - if (this.showType == "column") { - $("#luckysheetpivottablevaluecolrow").prop("checked", true); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"); - - $("#luckysheetpivottablevaluecolrow1").prop("checked", false); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active"); - } - else { - $("#luckysheetpivottablevaluecolrow1").prop("checked", true); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"); - - $("#luckysheetpivottablevaluecolrow").prop("checked", false); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active"); - } - } - else { - $("#luckysheetpivottablevaluecolrowshow").hide(); - } - }, - resetOrderby: function (obj) { - var orderby = $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").index(obj); - $("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - if ($(this).data("orderby") == orderby) { - $(this).data("orderby", "self"); - } - }); - }, - luckysheetsliderlistclearfilter: function ($filter) { - var $t = $filter.parent(); - var cindex = $t.data("index"); - - var rowhidden = {}, selected = {}, d = luckysheet.pivotTable.origindata, filterdata = {}; - - $t.data("rowhidden", "").find(".luckysheet-slider-list-item-filtered").hide(); - luckysheet.pivotTable.setDatatojsfile("selected", {}, cindex); - luckysheet.pivotTable.setDatatojsfile("rowhidden", null, cindex); - - var newdata = []; - for (var i = 0; i < d.length; i++) { - if (rowhidden[i] != null) { - continue; - } - newdata.push([].concat(d[i])); - } - - luckysheet.pivotTable.celldata = newdata; - - luckysheet.pivotTable.refreshPivotTable(); - $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); - }, - luckysheetsliderlistitemfilter: function ($filter) { - var $t = $filter.parent(), - toffset = $t.offset(), - $menu = $("#luckysheet-pivotTableFilter-menu"), - winH = $(window).height(), - winW = $(window).width(); - - var cindex = $t.data("index"); - - var rowhidden = $t.data("rowhidden"); - if(rowhidden == null || rowhidden == ""){ - rowhidden = {}; - } - else if(luckysheet.getObjType(rowhidden) == "string"){ - rowhidden = JSON.parse(rowhidden); - } - - $("body .luckysheet-cols-menu").hide(); - $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); - $("#luckysheet-pivotTableFilter-byvalue-input").val(""); - $("#luckysheet-pivotTableFilter-bycondition").next().hide(); - $("#luckysheet-pivotTableFilter-byvalue").next().show(); - - $menu.data("index", cindex); - - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(); - $("#luckysheet-pivotTableFilter-selected span").data("type", "0").data("type", null).text("无"); - - var byconditiontype = $t.data("byconditiontype"); - $("#luckysheet-pivotTableFilter-selected span").data("value", $t.data("byconditionvalue")).data("type", byconditiontype).text($t.data("byconditiontext")); - - if (byconditiontype == "2") { - var $input = $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show().find("input"); - $input.eq(0).val($t.data("byconditionvalue1")); - $input.eq(1).val($t.data("byconditionvalue2")); - } - else if (byconditiontype == "1") { - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show().find("input").val($t.data("byconditionvalue1")); - } - - $("#luckysheet-pivotTableFilter-byvalue-select").empty().html('
数据量大!请稍后
'); - - var rowhiddenother = {}; //其它筛选列的隐藏行 - $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").not($t.get(0)).each(function () { - var $t = $(this), rh = $t.data("rowhidden"); - - if (rh == null || rh == "") { - return true; - } - - if(luckysheet.getObjType(rh) == "string"){ - rh = JSON.parse(rh); - } - - for (var r in rh) { - rowhiddenother[r] = 0; - } - }); - - var data = luckysheet.pivotTable.origindata; - - setTimeout(function () { - //日期值 - var dvmap = {}; - var dvmap_uncheck = {}; - - //除日期以外的值 - var vmap = {}; - var vmap_uncheck = {}; - - for (var r = 1; r < data.length; r++) { - if(r in rowhiddenother){ - continue; - } - - if(data[r] == null){ - continue; - } - - var cell = data[r][cindex]; - - if(cell != null && cell.ct != null && cell.ct.t == "d"){ //单元格是日期 - var v = luckysheet.mask.update("YYYY-MM-DD", cell.v); - - var y = v.split("-")[0]; - var m = v.split("-")[1]; - var d = v.split("-")[2]; - - if(!(y in dvmap)){ - dvmap[y] = {}; - } - - if(!(m in dvmap[y])){ - dvmap[y][m] = {}; - } - - if(!(d in dvmap[y][m])){ - dvmap[y][m][d] = 0; - } - - dvmap[y][m][d]++; - - if(r in rowhidden){ - dvmap_uncheck[y] = 0; - dvmap_uncheck[m] = 0; - dvmap_uncheck[d] = 0; - } - } - else{ - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - var v = null; - var m = null; - } - else{ - var v = cell.v; - var m = cell.m; - } - - if(!(v in vmap)){ - vmap[v] = {}; - } - - if(!(m in vmap[v])){ - vmap[v][m] = 0; - } - - vmap[v][m]++; - - if(r in rowhidden){ - vmap_uncheck[v + "#$$$#" + m] = 0; - } - } - } - - //遍历数据加到页面 - var item = []; - - if(JSON.stringify(dvmap).length > 2){ - for(y in dvmap){ - var ysum = 0; - var monthHtml = ''; - - for(m in dvmap[y]){ - var msum = 0; - var dayHtml = ''; - - for(d in dvmap[y][m]){ - var dayL = dvmap[y][m][d]; - msum += dayL; - - //月 小于 10 - if(Number(m) < 10){ - var mT = "0" + Number(m); - } - else{ - var mT = m; - } - - //日 小于 10 - if(Number(d) < 10){ - var dT = "0" + Number(d); - } - else{ - var dT = d; - } - - //日是否选中状态 - if((y in dvmap_uncheck) && (m in dvmap_uncheck) && (d in dvmap_uncheck)){ - dayHtml += '
' + - '' + - '' + - '( ' + dayL + ' )' + - '
'; - } - else{ - dayHtml += '
' + - '' + - '' + - '( ' + dayL + ' )' + - '
'; - } - } - - ysum += msum; - - //月 小于 10 - if(Number(m) < 10){ - var mT2 = "0" + Number(m); - } - else{ - var mT2 = m; - } - - //月是否选中状态 - if((y in dvmap_uncheck) && (m in dvmap_uncheck)){ - monthHtml += '
' + - '
' + - '' + - '' + - '' + - '( ' + msum + ' )' + - '
' + - '
' + dayHtml + '
' + - '
'; - } - else{ - monthHtml += '
' + - '
' + - '' + - '' + - '' + - '( ' + msum + ' )' + - '
' + - '
' + dayHtml + '
' + - '
'; - } - } - - //年是否选中状态 - if(y in dvmap_uncheck){ - var yearHtml = '
' + - '
' + - '' + - '' + - '' + - '( ' + ysum + ' )' + - '
' + - '
' + monthHtml + '
' + - '
'; - } - else{ - var yearHtml = '
' + - '
' + - '' + - '' + - '' + - '( ' + ysum + ' )' + - '
' + - '
' + monthHtml + '
' + - '
'; - } - - item.unshift(yearHtml); - } - } - - if(JSON.stringify(vmap).length > 2){ - var vmapKeys = Object.keys(vmap); - vmapKeys = luckysheet.orderbydata1D(vmapKeys, true); - - for(var i = 0; i < vmapKeys.length; i++){ - var v = vmapKeys[i]; - - for(x in vmap[v]){ - if((v + "#$$$#" + x) == "null#$$$#null"){ - var text = "(空白)"; - } - else{ - var text = x; - } - - //是否选中状态 - if((v + "#$$$#" + x) in vmap_uncheck){ - var dataHtml = '
' + - '' + - '' + - '( ' + vmap[v][x] + ' )' + - '
'; - } - else{ - var dataHtml = '
' + - '' + - '' + - '( ' + vmap[v][x] + ' )' + - '
'; - } - - item.push(dataHtml); - } - } - } - - $("#luckysheet-pivotTableFilter-byvalue-select").html("
" + item.join("") + "
"); - }, 1); - - showrightclickmenu($menu, toffset.left - 250, toffset.top); - }, - getSumTypeName: function (type) { - var name = ""; - if (type == "SUM") { - name = "求和"; - } - else if (type == "COUNT") { - name = "数值计数"; - } - else if (type == "COUNTA") { - name = "计数"; - } - else if (type == "COUNTUNIQUE") { - name = "去重计数"; - } - else if (type == "AVERAGE") { - name = "平均值"; - } - else if (type == "MAX") { - name = "最大值"; - } - else if (type == "MIN") { - name = "最小值"; - } - else if (type == "MEDIAN") { - name = "中位数"; - } - else if (type == "PRODUCT") { - name = "乘积"; - } - else if (type == "STDEV") { - name = "标准差"; - } - else if (type == "STDEVP") { - name = "整体标准差"; - } - else if (type == "VAR") { - name = "方差"; - } - else if (type == "VARP") { - name = "整体方差"; - } - return name; - }, - setDatatojsfile: function (attr, value, cindex) { - var index = luckysheet.sheetmanage.getSheetIndex(this.pivotSheetIndex); - if (luckysheetfile[index]["pivotTable"] == null) { - luckysheetfile[index]["pivotTable"] = {}; - } - - if (cindex == null) { - luckysheetfile[index]["pivotTable"][attr] = value; - this[attr] = value; - } - else { - if (luckysheetfile[index]["pivotTable"]["filterparm"] == null) { - luckysheetfile[index]["pivotTable"]["filterparm"] = {}; - } - - if (luckysheetfile[index]["pivotTable"]["filterparm"][cindex.toString()] == null) { - luckysheetfile[index]["pivotTable"]["filterparm"][cindex.toString()] = {}; - } - luckysheetfile[index]["pivotTable"]["filterparm"][cindex.toString()][attr] = value; - - if (this["filterparm"] == null) { - this["filterparm"] = {}; - } - - if (this["filterparm"][cindex.toString()] == null) { - this["filterparm"][cindex.toString()] = {}; - } - - this["filterparm"][cindex.toString()][attr] = value; - } - }, - createPivotTable: function (e) { - var datasheetindex = luckysheet.currentSheetIndex; - - if(luckysheet.isEditMode()){ - alert("非编辑模式下禁止该操作!"); - return; - } - - if(luckysheet_select_save.length > 1){ - luckysheet.tooltip.info("提示", "不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - return - } - - if (luckysheet_select_save.length == 0 || luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] || luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1]) { - luckysheet.tooltip.info("提示", "请选择新建透视表的区域"); - return; - } - var select_save = $.extend(true, {}, luckysheet_select_save[0]); - luckysheet.sheetmanage.addNewSheet(e, true); - - this.getCellData(luckysheet.currentSheetIndex, datasheetindex, select_save); - - this.setDatatojsfile("pivot_select_save", select_save); - this.setDatatojsfile("pivotDataSheetIndex", datasheetindex); - - this.initialPivotManage(); - //this.drawPivotTable(); - }, - changePivotTable: function (index) { - var pivotDataSheetIndex = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)].pivotTable.pivotDataSheetIndex; - var real_pivotDataSheetIndex = luckysheet.sheetmanage.getSheetIndex(pivotDataSheetIndex); - - if(real_pivotDataSheetIndex == null){ - luckysheet.tooltip.info("此数据透视表的源数据已损坏!", ""); - return; - } - - this.getCellData(index); - this.initialPivotManage(true); - }, - refreshPivotTable: function () { - var redo = {}; - var pivotTable = this.getPivotTableData(); - redo["pivotTable"] = pivotTable; - redo["data"] = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - - this.storePivotTableParam(); - var ret = this.dataHandler(this.column, this.row, this.values, this.showType, this.celldata); - this.setDatatojsfile("pivotDatas", ret); - - var d = $.extend(true, [], luckysheet.sheetmanage.nulldata); - var data = d; - if (ret.length == 0) { - //this.drawPivotTable =true; - //this.pivotTableBoundary = [12, 6]; - this.setDatatojsfile("drawPivotTable", true); - this.setDatatojsfile("pivotTableBoundary", [12, 6]); - } - else { - //this.drawPivotTable = false; - //this.pivotTableBoundary = [ret.length, ret[0].length]; - this.setDatatojsfile("drawPivotTable", false); - this.setDatatojsfile("pivotTableBoundary", [ret.length, ret[0].length]); - - var rlen = ret.length, clen = ret[0].length; - - var addr = rlen - d.length, addc = clen - d[0].length; - - data = luckysheet.datagridgrowth(d, addr + 20, addc + 10, true); - - for (var r = 0; r < rlen; r++) { - var x = [].concat(data[r]); - for (var c = 0; c < clen; c++) { - var value = ""; - if (ret[r] != null && ret[r][c] != null) { - value = luckysheet.getcellvalue(r, c, ret); - } - x[c] = value; - } - data[r] = x; - } - } - - redo["type"] = "pivotTable_change"; - redo["curdata"] = $.extend(true, [], data); - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - var pivotTable = this.getPivotTableData(); - redo["pivotTablecur"] = pivotTable; - - if(clearjfundo){ - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - } - - //luckysheet.flowdata = flowdata_new = data; - luckysheet.cleargridelement(); - clearjfundo = false; - - if (addr > 0 || addc > 0) { - luckysheet.jfrefreshgridall(data[0].length, data.length, data, null, luckysheet_select_save, "datachangeAll"); - } - else { - luckysheet.jfrefreshgrid(data, luckysheet_select_save); - luckysheet.selectHightlightShow(); - } - - clearjfundo = true; - }, - drawPivotTable: true, - pivotTableBoundary: [12, 6], - pivotclick: function (row_index, col_index, index) { - if(index == null){ - index = luckysheet.currentSheetIndex; - } - - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - - if(!file.isPivotTable){ - return; - } - - var pivotDataSheetIndex = file.pivotTable.pivotDataSheetIndex; - var real_pivotDataSheetIndex = luckysheet.sheetmanage.getSheetIndex(pivotDataSheetIndex); - - if(real_pivotDataSheetIndex == null){ - return; - } - - if (this.isPivotRange(row_index, col_index)) { - $("#luckysheet-modal-dialog-slider-pivot").show(); - luckysheet.luckysheetsizeauto(); - $("#luckysheet-sta-content").css("padding-right", 260); - } - else { - $("#luckysheet-modal-dialog-slider-pivot").hide(); - luckysheet.luckysheetsizeauto(); - $("#luckysheet-sta-content").css("padding-right", 10); - } - }, - isPivotRange: function (row_index, col_index) { - if (!!luckysheetcurrentisPivotTable) { - if (row_index < this.pivotTableBoundary[0] && col_index < this.pivotTableBoundary[1]) { - return true; - } - else { - return false; - } - } - }, - storePivotTableParam: function () { - var columnarr = [], rowarr = [], filterarr = [], valuesarr = []; - $("#luckysheet-modal-dialog-config-filter .luckysheet-modal-dialog-slider-config-item").each(function () { - var item = {}; - item["index"] = $(this).data("index"); - item["name"] = $(this).data("name"); - item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); - // item["order"] = $(this).data("order"); - // item["orderby"] = $(this).data("orderby"); - // item["stastic"] = $(this).data("stastic"); - filterarr.push(item); - }); - - $("#luckysheet-modal-dialog-config-row .luckysheet-modal-dialog-slider-config-item").each(function () { - var item = {}; - item["index"] = $(this).data("index"); - item["name"] = $(this).data("name"); - item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); - item["order"] = $(this).data("order"); - item["orderby"] = $(this).data("orderby"); - item["stastic"] = $(this).data("stastic"); - rowarr.push(item); - }); - - $("#luckysheet-modal-dialog-config-column .luckysheet-modal-dialog-slider-config-item").each(function () { - var item = {}; - item["index"] = $(this).data("index"); - item["name"] = $(this).data("name"); - item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); - item["order"] = $(this).data("order"); - item["orderby"] = $(this).data("orderby"); - item["stastic"] = $(this).data("stastic"); - columnarr.push(item); - }); - - $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function () { - var item = {}; - item["index"] = $(this).data("index"); - item["name"] = $(this).data("name"); - item["fullname"] = $(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text(); - item["sumtype"] = $(this).data("sumtype"); - item["nameindex"] = $(this).data("nameindex"); - valuesarr.push(item); - }); - - this.setDatatojsfile("column", columnarr); - this.setDatatojsfile("row", rowarr); - this.setDatatojsfile("filter", filterarr); - this.setDatatojsfile("values", valuesarr); - var showtype = $("#luckysheetpivottablevaluecolrow:checked, #luckysheetpivottablevaluecolrow1:checked").val(); - this.setDatatojsfile("showType", showtype == "0" ? "row" : "column"); - - var pivotTable = this.getPivotTableData(); - delete pivotTable.pivotDatas; - luckysheet.server.saveParam("all", this.pivotSheetIndex, pivotTable, { "k": "pivotTable" }); - }, - getPivotTableData:function(dataindex){ - if(dataindex == null){ - dataindex = this.pivotSheetIndex; - } - - var index = luckysheet.sheetmanage.getSheetIndex(dataindex); - var pivotTable = luckysheetfile[index]["pivotTable"]; - - if(luckysheet.getObjType(pivotTable) == "object"){ - pivotTable = $.extend(true, {}, luckysheetfile[index]["pivotTable"]); - } - else{ - pivotTable = eval('('+ pivotTable +')'); - } - //var pivotTable = $.extend(true, {}, luckysheetfile[index]["pivotTable"]); - return pivotTable - }, - addValuesToTitle: function (titles, values) { - var rowLen = titles.length * values.length, colLen = titles[0].length + 1; - var retdata = []; - if (titles.length == 0 && values.length > 0) { - for (var v = 0; v < values.length; v++) { - retdata.push(values[v].fullname); - } - return retdata; - } - - if (values.length == 0 && titles.length > 0) { - return titles; - } - - for (var r = 0; r < rowLen; r++) { - retdata[r] = new Array(colLen); - for (var c = 0; c < colLen - 1; c++) { - retdata[r][c] = titles[Math.floor(r / values.length)][c]; - } - - retdata[r][colLen - 1] = values[r % values.length].fullname; - } - - return retdata; - }, - initialPivotManage: function (restore) { - //this.getCellData(); - if (this.initial) { - this.initial = false; - $("body").append(luckysheetPivotTableHTML); - $("#luckysheet-modal-dialog-slider-close").click(function () { - $("#luckysheet-modal-dialog-slider-pivot").hide(); - luckysheet.luckysheetsizeauto(); - }); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-data-pivotTable-selection", "addclass": "luckysheet-data-pivotTable-selection", "title": "选取数据范围", "content": '', "botton": '' })); - - $("body").append(luckysheet.replaceHtml(filtermenuHTML, { "menuid": "pivotTableFilter" })); - $("body").append(luckysheet.replaceHtml(filtersubmenuHTML, { "menuid": "pivotTableFilter" })); - $("body").append(pivottableconfigHTML); - $("body").append(pivottablesumHTML); - - $("#luckysheet-pivotTableFilter-orderby-asc").remove(); - $("#luckysheet-pivotTableFilter-orderby-desc").next().remove(); - $("#luckysheet-pivotTableFilter-orderby-desc").remove(); - $("#luckysheet-pivotTableFilter-orderby-color").next().remove(); - $("#luckysheet-pivotTableFilter-orderby-color").remove(); - - $("#luckysheetpivottablevaluecolrow, #luckysheetpivottablevaluecolrow1").checkboxradio({ - icon: false - }).change(function () { - luckysheet.pivotTable.refreshPivotTable(); - }); - - var hidefilersubmenu = null; - $("#luckysheet-pivotTableFilter-menu").mouseover(function () { - clearTimeout(hidefilersubmenu); - hidefilersubmenu = setTimeout(function () { - $("#luckysheet-pivotTableFilter-submenu").hide(); - }, 500); - }); - - //点击复选框 - $(document).off("click.ptFilterCheckbox1").on("click.ptFilterCheckbox1", "#luckysheet-pivotTableFilter-byvalue-select .textBox",function(){ - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).find("input[type='checkbox']").prop("checked", true); - } - }) - $(document).off("click.ptFilterCheckbox2").on("click.ptFilterCheckbox2", "#luckysheet-pivotTableFilter-byvalue-select .year",function(){ - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).parents(".yearBox").find(".month").attr("data-check", "false"); - $(this).parents(".yearBox").find(".day").attr("data-check", "false"); - $(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).parents(".yearBox").find(".month").attr("data-check", "true"); - $(this).parents(".yearBox").find(".day").attr("data-check", "true"); - $(this).parents(".yearBox").find("input[type='checkbox']").prop("checked", true); - } - }) - $(document).off("click.ptFilterCheckbox3").on("click.ptFilterCheckbox3", "#luckysheet-pivotTableFilter-byvalue-select .month",function(){ - //月份 对应的 天 - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).parents(".monthBox").find(".day").attr("data-check", "false"); - $(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).parents(".monthBox").find(".day").attr("data-check", "true"); - $(this).parents(".monthBox").find("input[type='checkbox']").prop("checked", true); - } - //月份 对应的 年份 - var yearDayAllCheck = true; - var $yearDay = $(this).parents(".yearBox").find(".day"); - $yearDay.each(function(i,e){ - if($(e).attr("data-check") == "true"){ - - } - else{ - yearDayAllCheck = false; - } - }); - if(yearDayAllCheck){ - $(this).parents(".yearBox").find(".year").attr("data-check", "true"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); - } - else{ - $(this).parents(".yearBox").find(".year").attr("data-check", "false"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); - } - }) - $(document).off("click.ptFilterCheckbox4").on("click.ptFilterCheckbox4", "#luckysheet-pivotTableFilter-byvalue-select .day",function(){ - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).find("input[type='checkbox']").prop("checked", true); - } - //天 对应的 月份 - var monthDayAllCheck = true; - var $monthDay = $(this).parents(".monthBox").find(".day"); - $monthDay.each(function(i,e){ - if($(e).attr("data-check") == "true"){ - - } - else{ - monthDayAllCheck = false; - } - }); - if(monthDayAllCheck){ - $(this).parents(".monthBox").find(".month").attr("data-check", "true"); - $(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked", true); - } - else{ - $(this).parents(".monthBox").find(".month").attr("data-check", "false"); - $(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"); - } - //天 对应的 年份 - var yearDayAllCheck = true; - var $yearDay = $(this).parents(".yearBox").find(".day"); - $yearDay.each(function(i,e){ - if($(e).attr("data-check") == "true"){ - - } - else{ - yearDayAllCheck = false; - } - }); - if(yearDayAllCheck){ - $(this).parents(".yearBox").find(".year").attr("data-check", "true"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); - } - else{ - $(this).parents(".yearBox").find(".year").attr("data-check", "false"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); - } - }) - - //日期 三级下拉显示 - $(document).off("click.ptFilterYearDropdown").on("click.ptFilterYearDropdown", "#luckysheet-pivotTableFilter-byvalue-select .yearBox .fa-caret-right",function(){ - var $p = $(this).parents(".luckysheet-mousedown-cancel"); - if($p.hasClass("year")){ - $(this).parents(".yearBox").find(".monthList").slideToggle(); - } - if($p.hasClass("month")){ - $(this).parents(".monthBox").find(".dayList").slideToggle(); - } - }); - - //全选 - $("#luckysheet-pivotTableFilter-byvalue-btn-all").click(function () { - $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").prop("checked", true); - $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); - }); - - //反选 - $("#luckysheet-pivotTableFilter-byvalue-btn-contra").click(function () { - var $input = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']"); - $input.each(function(i, e){ - if($(e).is(":checked")){ - $(e).removeAttr("checked"); - $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); - } - else{ - $(e).prop("checked", true); - $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); - } - }); - //天 对应的 月份 - var $month = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox .monthBox"); - $month.each(function(index, event){ - var monthDayAllCheck = true; - var $monthDay = $(event).find(".day input[type='checkbox']"); - $monthDay.each(function(i,e){ - if($(e).is(":checked")){ - - } - else{ - monthDayAllCheck = false; - } - }); - if(monthDayAllCheck){ - $(event).find(".month input[type='checkbox']").prop("checked", true); - $(event).attr("data-check", "true"); - } - else{ - $(event).find(".month input[type='checkbox']").removeAttr("checked"); - $(event).attr("data-check", "false"); - } - }); - //天 对应的 年份 - var $year = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox .yearBox"); - $year.each(function(index, event){ - var yearDayAllCheck = true; - var $yearDay = $(event).find(".day input[type='checkbox']"); - $yearDay.each(function(i,e){ - if($(e).is(":checked")){ - - } - else{ - yearDayAllCheck = false; - } - }); - if(yearDayAllCheck){ - $(event).find(".year input[type='checkbox']").prop("checked", true); - $(event).attr("data-check", "true"); - } - else{ - $(event).find(".year input[type='checkbox']").removeAttr("checked"); - $(event).attr("data-check", "false"); - } - }); - }); - - //清除 - $("#luckysheet-pivotTableFilter-byvalue-btn-clear").click(function () { - $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"); - $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); - }); - - //按照值进行筛选 - $("#luckysheet-pivotTableFilter-byvalue-input").on('input propertychange', function () { - var v = $(this).val().toString(); - $("#luckysheet-pivotTableFilter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(); - if(v != ""){ - var $check = $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']"); - $check.each(function(i, e){ - var $p = $(e).parents(".luckysheet-mousedown-cancel"); - if($p.hasClass("day")){ //日期 - var day = $(e).siblings("label").text().toString(); - var month = $(e).parents(".monthBox").find(".month label").text().toString(); - var year = $(e).parents(".yearBox").find(".year label").text().toString(); - var itemV = year + "-" + month + "-" + day; - - if(itemV.indexOf(v) == -1){ - $(e).parents(".day").hide(); - //天 对应的 月份 - var $monthDay = $(e).parents(".dayList").find(".day:visible"); - if($monthDay.length == 0){ - $(e).parents(".monthBox").find(".month").hide(); - } - //天 对应的 年份 - var $yearDay = $(e).parents(".monthList").find(".day:visible"); - if($yearDay.length == 0){ - $(e).parents(".yearBox").find(".year").hide(); - } - } - } - if($p.hasClass("textBox")){ //其它 - var itemV = $(e).siblings("label").text().toString(); - - if(itemV.indexOf(v) == -1){ - $(e).parents(".textBox").hide(); - } - } - }); - } - }); - - $("#luckysheet-pivotTableFilter-bycondition, #luckysheet-pivotTableFilter-byvalue").click(function () { - var $t = $(this); - $t.next().slideToggle(200); - setTimeout(function () { - if ($t.attr("id") == "luckysheet-pivotTableFilter-bycondition" && $("#luckysheet-pivotTableFilter-bycondition").next().is(":visible")) { - if ($("#luckysheet-pivotTableFilter-selected span").text() != "无") { - $("#luckysheet-pivotTableFilter-byvalue").next().slideUp(200); - } - } - - if ($t.is($("#luckysheet-pivotTableFilter-bycondition"))) { - if ($("#luckysheet-pivotTableFilter-bycondition").next().is(":hidden") && $("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden")) { - $("#luckysheet-pivotTableFilter-byvalue").next().slideDown(200); - } - } - }, 300); - - }); - - //取消按钮 - $("#luckysheet-pivotTableFilter-cancel").click(function () { - $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); - }); - - $("#luckysheet-pivotTableFilter-selected").click(function () { - var $t = $(this), toffset = $t.offset(), $menu = $("#luckysheet-pivotTableFilter-submenu"); - $menu.hide(); - var winH = $(window).height(), winW = $(window).width(); - var menuW = $menu.width(), menuH = $menu.height(); - var top = toffset.top, left = toffset.left, mheight = winH - toffset.top - 20; - if (toffset.left + menuW > winW) { - left = toffset.left - menuW; - } - - if (toffset.top > winH / 2) { - top = winH - toffset.top; - if (top < 0) { - top = 0; - } - - mheight = toffset.top - 20; - } - - $menu.css({ "top": top, "left": left, "height": mheight }).show(); - clearTimeout(hidefilersubmenu); - }); - - //按条件过滤 - $("#luckysheet-pivotTableFilter-submenu").mouseover(function () { - clearTimeout(hidefilersubmenu); - }).find(".luckysheet-cols-menuitem").click(function (e) { - $("#luckysheet-pivotTableFilter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value", $(this).data("value")); - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide(); - if ($(this).data("type") == "2") { - $("#luckysheet-pivotTableFilter-selected span").data("type", "2"); - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2").show(); - } - else if ($(this).data("type") == "0") { - $("#luckysheet-pivotTableFilter-selected span").data("type", "0"); - } - else { - $("#luckysheet-pivotTableFilter-selected span").data("type", "1"); - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).show(); - //若是日期 改变input type类型为date - if($(this).attr("data-value") == "dateequal" || $(this).attr("data-value") == "datelessthan" || $(this).attr("data-value") == "datemorethan"){ - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type", "date"); - } - else{ - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input input").prop("type", "text"); - } - } - $("#luckysheet-pivotTableFilter-byvalue").next().slideUp(); - $("#luckysheet-pivotTableFilter-submenu").hide(); - }); - - $("#luckysheet-modal-dialog-pivotTable-list").on("click", " .luckysheet-slider-list-item-filter", function (e) { - //var $t = $(this).parent(),$filter = $(this), toffset = $t.offset(), $menu = $("#luckysheet-pivotTableFilter-menu"), winH = $(window).height(), winW = $(window).width(); - luckysheet.pivotTable.luckysheetsliderlistitemfilter($(this)); - e.stopPropagation(); - return false; - }); - //.on("mousedown dblclick mouseup", function (e) { e.stopPropagation(); return false; }); - - $("#luckysheet-modal-dialog-pivotTable-list").on("click", " .luckysheet-slider-list-item-filtered", function (e) { - luckysheet.pivotTable.luckysheetsliderlistclearfilter($(this).next()); - e.stopPropagation(); - return false; - }); - - - $("#luckysheet-dialog-pivotTable-range-seleted").click(function () { - $("#luckysheet-modal-dialog-slider-pivot").hide(); - luckysheet.luckysheetsizeauto(); - var $t = $("#luckysheet-data-pivotTable-selection"), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - - $("#luckysheet-data-pivotTable-selection").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 4 }).show(); - - luckysheet.pivotTable.jgridCurrentPivotInput = $("#luckysheet-dialog-pivotTable-range").html(); - $("#luckysheet-pivotTable-range-selection-input").val(luckysheet.pivotTable.jgridCurrentPivotInput); - luckysheet.pivotTable.luckysheet_pivotTable_select_state = true; - //luckysheet.pivotTable.pivotSheetIndex = luckysheet.currentSheetIndex; - }); - - //清除筛选按钮 - $("#luckysheet-pivotTableFilter-initial").click(function () { - $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-slider-list-item-filtered").hide(); - $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").data("rowhidden", ""); - $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); - $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").hide().find("input").val(); - $("#luckysheet-pivotTableFilter-selected span").data("type", "0").data("type", null).text("无"); - - luckysheet.pivotTable.setDatatojsfile("filterparm", null); - luckysheet.pivotTable.celldata = luckysheet.pivotTable.origindata; - - luckysheet.pivotTable.refreshPivotTable(); - }); - - $("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").on("click", ".luckysheet-modal-dialog-slider-config-item-icon", function (e) { - var $t = $(e.target), $item = $t.closest(".luckysheet-modal-dialog-slider-config-item"), cindex = $item.data("index"), toffset = $item.offset(); - var order = $item.data("order"), orderby = $item.data("orderby"), stastic = $item.data("stastic"); - if (order == null) { - order = "default"; - } - - var option = ''; - - $("#luckysheet-modal-dialog-config-value .luckysheet-modal-dialog-slider-config-item").each(function (i) { - option += ''; - }); - $("#luckysheet-pivotTable-config-option-orderby").empty().html(option); - if (orderby == null) { - orderby = "self"; - } - - if (stastic == null) { - stastic = "1"; - } - - $("#luckysheet-pivotTable-config-option-order").val(order).data("index", cindex); - $("#luckysheet-pivotTable-config-option-orderby").val(orderby).data("index", cindex); - $("#luckysheet-pivotTable-config-option-stastic").val(stastic).data("index", cindex); - - mouseclickposition($("#luckysheet-pivotTable-config-option"), toffset.left + $item.outerWidth(), toffset.top - 13, "rightbottom"); - e.stopPropagation(); - return false; - }); - - $("#luckysheet-pivotTable-config-option-order,#luckysheet-pivotTable-config-option-orderby,#luckysheet-pivotTable-config-option-stastic").change(function () { - var $t = $(this), cindex = $t.data("index"); - $("#luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - if ($(this).data("index") == cindex) { - $(this).data($t.attr("id").replace("luckysheet-pivotTable-config-option-", ""), $t.val()); - } - }); - luckysheet.pivotTable.refreshPivotTable(); - }); - - $("#luckysheet-modal-dialog-config-value").on("click", ".luckysheet-modal-dialog-slider-config-item-icon", function (e) { - var $t = $(e.target), $item = $t.closest(".luckysheet-modal-dialog-slider-config-item"), cindex = $item.data("index"), toffset = $item.offset(), sumtype = $item.data("sumtype"); - var type = luckysheet.pivotTable.pivot_data_type[cindex.toString()]; - if (sumtype == null) { - if (type == "num") { - sumtype = "SUM"; - } - else { - sumtype = "COUNTA"; - } - } - - var $menu = $("#luckysheet-pivotTable-config-option-sumtype"); - $menu.find(".luckysheet-submenu-arrow").hide(); - $menu.find(".luckysheet-cols-menuitem[sumtype='" + sumtype + "'] .luckysheet-submenu-arrow").css("display", "inline"); - $menu.data("item", $item); - - mouseclickposition($menu, toffset.left + $item.outerWidth(), toffset.top - 13, "rightbottom"); - e.stopPropagation(); - return false; - }); - - $("#luckysheet-pivotTable-config-option-sumtype .luckysheet-cols-menuitem").click(function () { - var $item = $("#luckysheet-pivotTable-config-option-sumtype").data("item"); - var sumtype = $(this).attr("sumtype"); - $item.data("sumtype", $(this).attr("sumtype")); - var name = luckysheet.pivotTable.getSumTypeName(sumtype) + ":" + $item.data("name"); - $item.attr("title", name).find(".luckysheet-modal-dialog-slider-config-item-txt").html(name); - $("#luckysheet-pivotTable-config-option-sumtype").hide(); - luckysheet.pivotTable.refreshPivotTable(); - }); - - $("#luckysheet-modal-dialog-config-filter").on("click", ".luckysheet-modal-dialog-slider-config-item-icon", function (e) { - var $t = $(e.target), cindex = $t.closest(".luckysheet-modal-dialog-slider-config-item").data("index"); - //console.log($("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(cindex).find(".luckysheet-slider-list-item-filter")); - luckysheet.pivotTable.luckysheetsliderlistitemfilter($("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(cindex).find(".luckysheet-slider-list-item-filter")); - e.stopPropagation(); - return false; - }); - - //确认按钮 - $("#luckysheet-pivotTableFilter-confirm").click(function () { - var $menu = $("#luckysheet-pivotTableFilter-menu"); - var cindex = $menu.data("index"); - - var rowhiddenother = {}; //其它筛选列的隐藏行 - $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").each(function () { - var $t = $(this), rh = $t.data("rowhidden"); - - if($t.data("index") != cindex){ - if (rh == null || rh == "") { - return true; - } - - if(luckysheet.getObjType(rh) == "string"){ - rh = JSON.parse(rh); - } - - for (var r in rh) { - rowhiddenother[r] = 0; - } - } - }); - - var d = luckysheet.pivotTable.origindata; - - var filterdata = {}; - var rowhidden = {}; - var caljs = {}; - - if ($("#luckysheet-pivotTableFilter-bycondition").next().is(":visible") && $("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden") && $("#luckysheet-pivotTableFilter-selected span").data("value") != "null") { - var $t = $("#luckysheet-pivotTableFilter-selected span"); - var type = $t.data("type"), value = $t.data("value"); - - caljs["value"] = value; - caljs["text"] = $t.text(); - - if (type == "0") { - caljs["type"] = "0"; - } - else if (type == "2") { - var $input = $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input2 input"); - caljs["type"] = "2"; - caljs["value1"] = $input.eq(0).val(); - caljs["value2"] = $input.eq(1).val(); - } - else { - caljs["type"] = "1"; - caljs["value1"] = $("#luckysheet-pivotTableFilter-menu .luckysheet-pivotTableFilter-selected-input").eq(0).find("input").val(); - } - - for (var r = 1; r < d.length; r++) { - if(r in rowhiddenother){ - continue; - } - - if(d[r] == null){ - continue; - } - - var cell = d[r][cindex]; - - if (value == "cellnull") { //单元格为空 - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - } - else if (value == "cellnonull") { //单元格有数据 - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - } - else if (value == "textinclude") { //文本包含 - var value1 = caljs["value1"]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(cell.m.indexOf(value1) == -1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textnotinclude") { //文本不包含 - var value1 = caljs["value1"]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - - } - else{ - if(cell.m.indexOf(value1) > -1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textstart") { //文本开头为 - var value1 = caljs["value1"], valuelen = value1.length; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(cell.m.substr(0, valuelen) != value1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textend") { //文本结尾为 - var value1 = caljs["value1"], valuelen = value1.length; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(valuelen > cell.m.length || cell.m.substr(cell.m.length - valuelen, valuelen) != value1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textequal") { //文本等于 - var value1 = caljs["value1"]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(cell.m != value1){ - rowhidden[r] = 0; - } - } - } - else if (value == "dateequal") { //日期等于 - var value1 = luckysheet.mask.genarate(caljs["value1"])[2]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "d"){ - if(parseInt(cell.v) != value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "datelessthan") { //日期早于 - var value1 = luckysheet.mask.genarate(caljs["value1"])[2]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "d"){ - if(parseInt(cell.v) >= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "datemorethan") { //日期晚于 - var value1 = luckysheet.mask.genarate(caljs["value1"])[2]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "d"){ - if(parseInt(cell.v) <= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "morethan") { //大于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v <= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "moreequalthan") { //大于等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v < value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "lessthan") { //小于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v >= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "lessequalthan") { //小于等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v > value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "equal") { //等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v != value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "noequal") { //不等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v == value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "include") { //介于 - var value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); - - if(value1 < value2){ - var min = value1; - var max = value2; - } - else{ - var max = value1; - var min = value2; - } - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v < min || cell.v > max){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "noinclude") { //不在其中 - var value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); - - if(value1 < value2){ - var min = value1; - var max = value2; - } - else{ - var max = value1; - var min = value2; - } - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v >= min && cell.v <= max){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - } - } - else { - $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']").each(function(i, e){ - if($(e).is(":visible") && $(e).is(":checked")){ - return true; - } - - if($(e).closest(".day").length > 0){ - var day = $(e).siblings("label").text(); - if(Number(day) < 10){ - day = "0" + day; - } - - var month = $(e).closest(".monthBox").find(".month label").text().replace("月", ""); - if(Number(month) < 10){ - month = "0" + month; - } - - var year = $(e).closest(".yearBox").find(".year label").text().replace("年", ""); - - var itemV = "日期格式#$$$#" + year + "-" + month + "-" + day; - - filterdata[itemV] = "1"; - } - - if($(e).closest(".textBox").length > 0){ - var itemV = $(e).closest(".textBox").data("filter"); - - filterdata[itemV] = "1"; - } - }) - - for (var r = 1; r < d.length; r++) { - if(r in rowhiddenother){ - continue; - } - - if(d[r] == null){ - continue; - } - - var cell = d[r][cindex]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - var value = "null#$$$#null"; - } - else if(cell.ct != null && cell.ct.t == "d"){ - var fmt = luckysheet.mask.update("YYYY-MM-DD", cell.v); - var value = "日期格式#$$$#" + fmt; - } - else{ - var value = cell.v + "#$$$#" + cell.m; - } - - if(value in filterdata){ - rowhidden[r] = 0; - } - } - } - - var $top = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(cindex); - if ($("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length < $("#luckysheet-pivotTableFilter-byvalue-select .ListBox input[type='checkbox']:visible").length || $("#luckysheet-pivotTableFilter-byvalue-input").val().length > 0 || ($("#luckysheet-pivotTableFilter-bycondition").next().is(":visible") && $("#luckysheet-pivotTableFilter-byvalue").next().is(":hidden") && $("#luckysheet-pivotTableFilter-selected span").data("value") != "null")) { - $top.data("rowhidden", JSON.stringify(rowhidden)).find(".luckysheet-slider-list-item-filtered").show(); - luckysheet.pivotTable.setDatatojsfile("rowhidden", rowhidden, cindex); - - if (caljs != null) { - $top.data("byconditionvalue", caljs["value"]).data("byconditiontype", caljs["type"]).data("byconditiontext", caljs["text"]); - - if (caljs["value1"] != null) { - $top.data("byconditionvalue1", caljs["value1"]); - } - - if (caljs["value2"] != null) { - $top.data("byconditionvalue2", caljs["value2"]); - } - - luckysheet.pivotTable.setDatatojsfile("caljs", caljs, cindex); - } - } - else { - $top.data("rowhidden", "").find(".luckysheet-slider-list-item-filtered").hide(); - luckysheet.pivotTable.setDatatojsfile("rowhidden", null, cindex); - } - - var newdata = []; - for (var i = 0; i < d.length; i++) { - if(i in rowhidden || i in rowhiddenother){ - continue; - } - - newdata.push([].concat(d[i])); - } - - luckysheet.pivotTable.celldata = newdata; - luckysheet.pivotTable.refreshPivotTable(); - $("#luckysheet-pivotTableFilter-menu, #luckysheet-pivotTableFilter-submenu").hide(); - - luckysheet.cleargridelement(); - }); - - $("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn, #luckysheet-data-pivotTable-selection .luckysheet-modal-dialog-title-close").click(function () { - $("#luckysheet-modal-dialog-slider-pivot").show(); - luckysheet.luckysheetsizeauto(); - $("#luckysheet-cell-main .luckysheet-pivotTable-selection-set div").show(); - - $("#luckysheet-data-pivotTable-selection").hide(); - - luckysheet.sheetmanage.changeSheetExec(luckysheet.pivotTable.pivotSheetIndex); - - luckysheet.pivotTable.luckysheet_pivotTable_select_state = false; - - luckysheet.cleargridelement(); - }); - - $("#luckysheet-pivotTable-selection-confirm").click(function () { - var $input = $("#luckysheet-pivotTable-range-selection-input"), val = $input.val(); - - if ($.trim(val).length == 0 || $.trim(val).toUpperCase() == luckysheet.pivotTable.jgridCurrentPivotInput.toUpperCase()) { - $input.val(luckysheet.pivotTable.jgridCurrentPivotInput); - $("#luckysheet-data-pivotTable-selection .luckysheet-model-close-btn").click(); - return; - } - else { - var val1 = val.split("!"); - var sheettxt = "", rangetxt = "", sheetIndex = -1; - - if (val1.length > 1) { - sheettxt = val1[0]; - rangetxt = val1[1]; - for (var i in luckysheetfile) { - if (sheettxt == luckysheetfile[i].name) { - sheetIndex = luckysheetfile[i].index; - break; - } - } - - if (sheetIndex == -1) { - sheetIndex = 0; - } - } - else { - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - sheettxt = luckysheetfile[index].name; - sheetIndex = luckysheetfile[index].index; - rangetxt = val1[0]; - } - - if(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)].isPivotTable){ - if(luckysheet.isEditMode()){ - alert("不可选择数据透视表为源数据!"); - } - else{ - luckysheet.tooltip.info("选择失败", "不可选择数据透视表为源数据!"); - } - $input.val(luckysheet.pivotTable.jgridCurrentPivotInput); - return; - } - - if (rangetxt.indexOf(":") == -1) { - if(luckysheet.isEditMode()){ - alert("选择失败, 输入范围错误!"); - } - else{ - luckysheet.tooltip.info("选择失败", "输入范围错误!"); - } - $input.val(luckysheet.pivotTable.jgridCurrentPivotInput); - return; - } - - rangetxt = rangetxt.split(":"); - var row = [], col = []; - - row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; - row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; - - if (row[0] > row[1]) { - if(luckysheet.isEditMode()){ - alert("选择失败, 输入范围错误!"); - } - else{ - luckysheet.tooltip.info("选择失败", "输入范围错误!"); - } - $input.val(luckysheet.pivotTable.jgridCurrentPivotInput); - return; - } - - col[0] = luckysheet.luckysheetABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); - col[1] = luckysheet.luckysheetABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); - - if (col[0] > col[1]) { - if(luckysheet.isEditMode()){ - alert("选择失败, 输入范围错误!"); - } - else{ - luckysheet.tooltip.info("选择失败", "输入范围错误!"); - } - $input.val(luckysheet.pivotTable.jgridCurrentPivotInput); - return; - } - luckysheet.sheetmanage.changeSheetExec(luckysheet.pivotTable.pivotSheetIndex); - - luckysheet.pivotTable.setDatatojsfile("pivot_select_save", { "row": row, "column": col }); - luckysheet.pivotTable.setDatatojsfile("pivotDataSheetIndex", sheetIndex); - - luckysheet.pivotTable.getCellData(luckysheet.pivotTable.pivotSheetIndex, sheetIndex, { "row": row, "column": col }); - - luckysheet.pivotTable.initialPivotManage(); - - $("#luckysheet-dialog-pivotTable-range").html(val); - - $("#luckysheet-modal-dialog-slider-pivot").show(); - - $("#luckysheet-data-pivotTable-selection").hide(); - - luckysheet.pivotTable.luckysheet_pivotTable_select_state = false; - - luckysheet.pivotTable.refreshPivotTable(); - - luckysheet.luckysheetsizeauto(); - - luckysheet.cleargridelement(); - } - }); - - $("#luckysheet-modal-dialog-slider-pivot").on("mousedown", ".luckysheet-slider-list-item-name, .luckysheet-modal-dialog-slider-config-item-txt", function (e) { - //console.log("1111111111111111111111111111"); - var $cur = $(e.target); - luckysheet.pivotTable.movestate = true; - luckysheet.pivotTable.movesave.obj = $cur.parent(); - luckysheet.pivotTable.movesave.name = $cur.data("name"); - luckysheet.pivotTable.movesave.containerid = $cur.parent().parent().attr("id"); - luckysheet.pivotTable.movesave.index = $cur.data("index"); - if ($("#luckysheet-modal-dialog-slider-pivot-move").length == 0) { - $("body").append('
' + luckysheet.pivotTable.movesave.name + '
'); - } - luckysheet.pivotTable.movesave.width = $("#luckysheet-modal-dialog-slider-pivot-move").outerWidth(); - luckysheet.pivotTable.movesave.height = $("#luckysheet-modal-dialog-slider-pivot-move").outerHeight(); - - $("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor", "default"); - }); - - - $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").mousemove(function (e) { - if (!!luckysheet.pivotTable && luckysheet.pivotTable.movestate) { - if (luckysheet.pivotTable.moveitemposition.length == 0) { - luckysheet.pivotTable.moveitemposition = [0]; - $(this).find(".luckysheet-modal-dialog-slider-config-item").each(function (i) { - var $t = $(this), h = $t.outerHeight(); - luckysheet.pivotTable.moveitemposition.push(luckysheet.pivotTable.moveitemposition[i] + h + 2); - }); - //luckysheet.pivotTable.moveitemposition.push($(this).outerHeight()); - $(this).append('
'); - //console.log(luckysheet.pivotTable.moveitemposition); - } - - $("#luckysheet-modal-dialog-slider-pivot-move").css({ "background": "#FD8585", "color": "#fff", "border": "1px solid #FD7070" }); - var x = event.pageX, y = event.pageY, $container = $(this); - var curtop = y - $container.offset().top + $container.scrollTop(); - var position = luckysheet.pivotTable.moveitemposition; - var row_index = luckysheet_searcharray(position, curtop); - - if (row_index == -1) { - $("#luckysheet-modal-dialog-config-order-help").css({ "top": position[position.length - 1] }); - } - else if ((curtop - position[row_index - 1]) > (position[row_index] - position[row_index - 1]) / 2) { - $("#luckysheet-modal-dialog-config-order-help").css({ "top": position[row_index] }); - } - else { - $("#luckysheet-modal-dialog-config-order-help").css({ "top": position[row_index - 1] }); - } - } - }).mouseleave(function () { - if (!!luckysheet.pivotTable && luckysheet.pivotTable.movestate) { - $("#luckysheet-modal-dialog-slider-pivot-move").css({ "background": "#fff", "color": "#000", "border": "1px dotted #000" }); - luckysheet.pivotTable.moveitemposition = []; - console.log("leave"); - $("#luckysheet-modal-dialog-config-order-help").remove(); - } - }).mouseup(function (e) { - if (!!luckysheet.pivotTable && luckysheet.pivotTable.movestate) { - var $t = $(this); - var itemHTML; - if (luckysheet.pivotTable.movesave.containerid == $t.attr("id")) { - itemHTML = luckysheet.pivotTable.movesave.obj.clone(); - } - else { - var name = luckysheet.pivotTable.movesave.name, sumtype = "", nameindex = ""; - if ($t.attr("id") == "luckysheet-modal-dialog-config-value") { - var type = luckysheet.pivotTable.pivot_data_type[luckysheet.pivotTable.movesave.index.toString()]; - if (type == "num") { - name = "求和:" + name; - sumtype = "data-sumtype='SUM'"; - nameindex = "data-nameindex='0'"; - } - else { - name = "计数:" + name; - sumtype = "data-sumtype='COUNTA'"; - nameindex = "data-nameindex='0'"; - } - - $("#luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - if ($(this).find(".luckysheet-modal-dialog-slider-config-item-txt").text() == name) { - var ni = parseFloat($(this).data("nameindex")) + 1; - console.log($(this).data("nameindex")); - name = name + ni.toString(); - $(this).data("nameindex", ni); - return false; - } - }); - } - itemHTML = '
' + name + '
'; - } - var x = event.pageX, y = event.pageY, $container = $(this); - var curtop = y - $container.offset().top + $container.scrollTop(); - var position = luckysheet.pivotTable.moveitemposition; - var row_index = luckysheet_searcharray(position, curtop); - //console.log(position, curtop, row_index); - - if ((luckysheet.pivotTable.movesave.containerid == "luckysheet-modal-dialog-pivotTable-list") || (luckysheet.pivotTable.movesave.containerid == "luckysheet-modal-dialog-config-value" && luckysheet.pivotTable.movesave.containerid != $t.attr("id"))) { - $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - if ($(this).data("index") == luckysheet.pivotTable.movesave.index) { - $(this).remove(); - } - }); - } - - if (row_index == -1) { - //$("#luckysheet-modal-dialog-config-order-help").css({ "top": position[position.length - 1] }); - if ($t.find(".luckysheet-modal-dialog-slider-config-item").length == 0) { - $t.append(itemHTML); - } - else { - $t.find(".luckysheet-modal-dialog-slider-config-item").last().after(itemHTML); - } - - } - else if ((curtop - position[row_index - 1]) > (position[row_index] - position[row_index - 1]) / 2) { - //$("#luckysheet-modal-dialog-config-order-help").css({ "top": position[row_index] }); - $t.find(".luckysheet-modal-dialog-slider-config-item").eq(row_index - 1).after(itemHTML); - } - else { - //$("#luckysheet-modal-dialog-config-order-help").css({ "top": position[row_index - 1] }); - $t.find(".luckysheet-modal-dialog-slider-config-item").eq(row_index - 1).before(itemHTML); - } - - - if (luckysheet.pivotTable.movesave.containerid == "luckysheet-modal-dialog-pivotTable-list") { - - } - else if (luckysheet.pivotTable.movesave.containerid == "luckysheet-modal-dialog-config-value" && luckysheet.pivotTable.movesave.containerid != $t.attr("id")) { - - } - else { - luckysheet.pivotTable.movesave.obj.remove(); - } - - - $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { - var $seleted = $(this).find(".luckysheet-slider-list-item-selected"); - if ($(this).data("index") == luckysheet.pivotTable.movesave.index && $seleted.find("i").length == 0) { - $seleted.append(''); - } - }); - - luckysheet.pivotTable.refreshPivotTable(); - - $("#luckysheet-modal-dialog-slider-pivot-move").remove(); - luckysheet.pivotTable.movestate = false; - $("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor", "default"); - luckysheet.pivotTable.moveitemposition = []; - $("#luckysheet-modal-dialog-config-order-help").remove(); - luckysheet.pivotTable.showvaluecolrow(); - e.stopPropagation(); - } - }); - - - $("#luckysheet-modal-dialog-pivotTable-list").on("click", ".luckysheet-slider-list-item-selected", function () { - var $t = $(this), $item = $t.parent(), index = $item.data("index"), name = $item.data("name"); - if ($t.find("i").length == 0) { - $t.append(''); - - var type = luckysheet.pivotTable.pivot_data_type[index.toString()], itemHTML; - if (type == "num") { - itemHTML = '
求和:' + name + '
'; - $("#luckysheet-modal-dialog-config-value").append(itemHTML); - } - else { - itemHTML = '
' + name + '
'; - var $column = $("#luckysheet-modal-dialog-config-column"), $row = $("#luckysheet-modal-dialog-config-row"); - var columnitem = $column.find(".luckysheet-modal-dialog-slider-config-item"), rowitem = $row.find(".luckysheet-modal-dialog-slider-config-item"); - if (columnitem.length < 2) { - $column.append(itemHTML); - } - else if (rowitem.length < 2) { - $row.append(itemHTML); - } - else { - $column.append(itemHTML); - } - } - } - else { - $t.find("i").remove(); - $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - if ($(this).data("index") == index) { - if ($(this).parent().attr("id") == "luckysheet-modal-dialog-config-value") { - luckysheet.pivotTable.resetOrderby($(this)); - } - $(this).remove(); - } - }); - } - - luckysheet.pivotTable.refreshPivotTable(); - luckysheet.pivotTable.showvaluecolrow(); - }); - - $("#luckysheet-dialog-pivotTable-clearitem").click(function () { - $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - $(this).remove(); - }); - - $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { - $(this).find(".luckysheet-slider-list-item-selected").find("i").remove(); - }); - luckysheet.pivotTable.refreshPivotTable(); - luckysheet.pivotTable.showvaluecolrow(); - }); - - } - - if (restore == null) { - restore = false; - } - - if (this.celldata.length <= 1 && this.celldata[0].length <= 1) { - if(luckysheet.isEditMode()){ - alert("请扩大选择的数据范围!"); - } - else{ - luckysheet.tooltip.info("提示", "请扩大选择的数据范围!"); - } - } - - var selecteditem = "", selecteditemIndex = 1, selecteditemtest = {}, selecteditemNullIndex = 1; - for (var i = 0; i < this.celldata[0].length; i++) { - if(!!this.celldata[0][i] && !!this.celldata[0][i]["m"]){ - // var name = this.celldata[0][i]["m"].toString(); - var name = this.celldata[0][i]["m"]; - } - else{ - // var name = luckysheet.getcellvalue(0, i, this.celldata).toString(); - var name = luckysheet.getcellvalue(0, i, this.celldata); - } - - if(name != null){ - name = name.toString(); - } - - if (name == null || $.trim(name.toString()).length == 0) { - name = "列 " + selecteditemNullIndex; - } - selecteditemNullIndex++ - - if (name in selecteditemtest) { - name = name + selecteditemIndex++; - if (name in selecteditemtest) { - name = name + selecteditemIndex++; - if (name in selecteditemtest) { - name = name + selecteditemIndex++; - } - } - } - selecteditemtest[name] = 1; - - var dataother = "", style = ""; - //console.log(restore); - if (restore && this.filterparm != null) { - if (this.filterparm[i.toString()] != null) { - var itemset = this.filterparm[i.toString()]; - if (itemset.rowhidden != null) { - dataother += "data-rowhidden='" + JSON.stringify(itemset.rowhidden) + "'"; - } - - if (itemset.selected != null) { - dataother += "data-selected='" + JSON.stringify(itemset.selected) + "'"; - } - - if (itemset.caljs != null) { - var caljsset = itemset.caljs; - if (caljsset.value != null) { - dataother += "data-byconditionvalue='" + caljsset.value + "'"; - } - - if (caljsset.type != null) { - dataother += "data-byconditiontype='" + caljsset.type + "'"; - } - - if (caljsset.text != null) { - dataother += "data-byconditiontext='" + caljsset.text + "'"; - } - - if (caljsset.value1 != null) { - dataother += "data-byconditionvalue1='" + caljsset.value1 + "'"; - } - - if (caljsset.value2 != null) { - dataother += "data-byconditionvalue2='" + caljsset.value2 + "'"; - } - - } - } - } - - if (dataother.length > 0) { - style = "display:block;"; - } - - selecteditem += '
' + name + '
'; - } - $("#luckysheet-modal-dialog-pivotTable-list").html(selecteditem); - - $("#luckysheetpivottablevaluecolrowshow").hide(); - $("#luckysheetpivottablevaluecolrow").prop("checked", true); - $("#luckysheetpivottablevaluecolrow1").prop("checked", false); - - $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").empty(); - if (restore) { - if (this.filter != null && this.filter.length > 0) { - for (var i = 0; i < this.filter.length; i++) { - var item = this.filter[i]; - - var itemHTML = '
' + item.name + '
'; - - $("#luckysheet-modal-dialog-config-filter").append(itemHTML); - - var $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); - if ($seleted.find("i").length == 0) { - $seleted.append(''); - } - } - } - - if (this.row != null && this.row.length > 0) { - for (var i = 0; i < this.row.length; i++) { - var item = this.row[i]; - var otherset = ""; - - if (item.order != null) { - otherset += "data-order = '" + item.order + "'"; - } - - if (item.orderby != null) { - otherset += "data-orderby = '" + item.orderby + "'"; - } - - if (item.order != null) { - otherset += "data-stastic = '" + item.stastic + "'"; - } - - var itemHTML = '
' + item.name + '
'; - - $("#luckysheet-modal-dialog-config-row").append(itemHTML); - - var $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); - if ($seleted.find("i").length == 0) { - $seleted.append(''); - } - } - } - - if (this.column != null && this.column.length > 0) { - for (var i = 0; i < this.column.length; i++) { - var item = this.column[i]; - var otherset = ""; - - if (item.order != null) { - otherset += "data-order = '" + item.order + "'"; - } - - if (item.orderby != null) { - otherset += "data-orderby = '" + item.orderby + "'"; - } - - if (item.order != null) { - otherset += "data-stastic = '" + item.stastic + "'"; - } - - var itemHTML = '
' + item.name + '
'; - - $("#luckysheet-modal-dialog-config-column").append(itemHTML); - - var $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); - if ($seleted.find("i").length == 0) { - $seleted.append(''); - } - } - } - - if (this.values != null && this.values.length > 0) { - for (var i = 0; i < this.values.length; i++) { - var item = this.values[i]; - var otherset = ""; - - if (item.sumtype != null) { - otherset += "data-sumtype = '" + item.sumtype + "'"; - } - - if (item.nameindex != null) { - otherset += "data-nameindex = '" + item.nameindex + "'"; - } - - var itemHTML = '
' + luckysheet.pivotTable.getSumTypeName(item.sumtype) + ":" + item.name + '
'; - - $("#luckysheet-modal-dialog-config-value").append(itemHTML); - - var $seleted = $("#luckysheet-modal-dialog-pivotTable-list .luckysheet-modal-dialog-slider-list-item").eq(item.index).find(".luckysheet-slider-list-item-selected"); - if ($seleted.find("i").length == 0) { - $seleted.append(''); - } - } - - if (this.values.length >= 2) { - $("#luckysheetpivottablevaluecolrowshow").show(); - if (this.showType == "column") { - $("#luckysheetpivottablevaluecolrow").prop("checked", true); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").addClass("ui-state-active"); - - $("#luckysheetpivottablevaluecolrow1").prop("checked", false); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").removeClass("ui-state-active"); - } - else { - $("#luckysheetpivottablevaluecolrow1").prop("checked", true); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow1']").addClass("ui-state-active"); - - $("#luckysheetpivottablevaluecolrow").prop("checked", false); - $("#luckysheetpivottablevaluecolrowshow label[for='luckysheetpivottablevaluecolrow']").removeClass("ui-state-active"); - } - } - } - } - - $("#luckysheet-dialog-pivotTable-range").html(luckysheet.sheetmanage.getRangetxt(this.pivotDataSheetIndex, this.pivot_select_save)); - $("#luckysheet-modal-dialog-slider-pivot").show(); - luckysheet.luckysheetsizeauto(); - }, - //generatePivotTable:function(column1, row1, values1, filter1, showType1){ - - // this.column = column1; - // this.row = row1; - // this.values = values1; - // this.filter = filter1; - // this.showType = showType1; - // this.dataHandler(column1, row1, values1, filter1, showType1, this.celldata); - //}, - getComposeArray: function (data) { - if (data.length == 0) { - return []; - } - - var ret = []; - for (var i = 0; i < data.length; i++) { - //var c_value = data[i]; - var name = ""; - for (var x = 0; x <= i; x++) { - if(!!data[x] && !!data[x]["m"]){ - name += data[x]["m"]; - } - else{ - name += luckysheet.getcellvalue(x, null, data); - } - } - - ret.push(name); - } - return ret; - }, - getnameArray: function (data, field) { - if (data.length == 0) { - return []; - } - - if (field.length == 0) { - return []; - } - - var ret = []; - for (var i = 0; i < field.length; i++) { - if(!!data[field[i].index] && !!data[field[i].index]["m"]){ - var c_value = data[field[i].index]["m"]; - } - else{ - var c_value = luckysheet.getcellvalue(field[i].index, null, data); - } - - ret.push(c_value); - } - return ret; - }, - getTitleFromGroup: function (group, config, dataposition) { - var children = group.children; - - var orderbygroup = this.orderbygroup(group, config, dataposition); - - //console.log(orderbygroup); - return this.generategrouparraymain(orderbygroup, config); - }, - orderbygroup: function (group, config, dataposition) { - var stackset = []; - if (group.length == 0) { - return []; - } - stackset = group; - var d = null, alllength = stackset.length, alllengthInital = stackset.length, a = 0; - while (alllength != 0) { - //console.log(alllength, a); - d = stackset[a++]; - - alllength--; - if (d.children != null && d.children.length > 0) { - //console.log(JSON.stringify(d.children)); - d.children = this.orderbygroupchildren(d.children, config[d.index].orderby, config[d.index].order, dataposition); - //console.log(JSON.stringify(d.children)); - for (var i = 0; i < d.children.length; i++) { - stackset.push(d.children[i]); - alllength++; - } - } - //console.log(stackset, stackset.length, stackset.length == 0); - } - - return group.splice(0, alllengthInital); - }, - orderbygroupchildren: function (childrens, orderby, order, dataposition) { - if (childrens.length == 0) { - return []; - } - - var isAsc = false; - if (order == null || order == "asc") { - isAsc = true; - } - - var a = function (x, y) { - var f = null, s = null; - if (orderby == "self" || orderby == null) { - if(x.name==null){ - f = "(空白)"; - } - else{ - f = x.name.toString(); - } - - if(y.name==null){ - s = "(空白)"; - } - else{ - s = y.name.toString(); - } - - if (luckysheet.datecontroll.isdatetime(f) && luckysheet.datecontroll.isdatetime(s)) { - return luckysheet.datecontroll.diff(f, s); - } - //return f.localeCompare(s); - } - else { - f = parseFloat(dataposition[x.orderby].result); - s = parseFloat(dataposition[y.orderby].result); - } - - if (!isNaN(f) && !isNaN(s)) { - return numeral(f).value() - numeral(s).value(); - } - else if(isNaN(f) && isNaN(s)){ - return f.localeCompare(s); - } - else if (isNaN(f)) { - return 1; - } - else if (isNaN(s)) { - return -1; - } - } - - var d = function (x, y) { - var f = null, s = null; - if (orderby == "self" || orderby == null) { - if(x.name==null){ - f = "(空白)"; - } - else{ - f = x.name.toString(); - } - - if(y.name==null){ - s = "(空白)"; - } - else{ - s = y.name.toString(); - } - - if (luckysheet.datecontroll.isdatetime(f) && luckysheet.datecontroll.isdatetime(s)) { - return luckysheet.datecontroll.diff(f, s); - } - //return s.localeCompare(f); - } - else { - f = parseFloat(dataposition[x.orderby].result); - s = parseFloat(dataposition[y.orderby].result); - } - - if (!isNaN(f) && !isNaN(s)) { - return numeral(s).value() - numeral(f).value(); - } - else if(isNaN(f) && isNaN(s)){ - return s.localeCompare(f); - } - else if (isNaN(f)) { - return -1; - } - else if (isNaN(s)) { - return 1; - } - } - - if (isAsc) { - return childrens.sort(a); - } - else { - return childrens.sort(d); - } - }, - generategroupaddstatic: function (arr, name) { - var stasticarr = []; - for (var a = 0; a < arr[0].length; a++) { - if (a == 0) { - if (name == "总计") { - stasticarr.push(name); - } - else { - stasticarr.push({ "name": name, "issum": true }); - } - - } - else { - stasticarr.push(""); - } - } - return stasticarr; - }, - generategrouparraymain: function (group, config) { - //生成数组 - var ret = []; - for (var i = 0; i < group.length; i++) { - var name = group[i].name; - var arr = this.generategrouparray(group[i].children, config, 1); - if (config[0].stastic == "1" || config[0].stastic == null) { - arr.push(this.generategroupaddstatic(arr, name)); - } - - ret = ret.concat(arr); - } - return ret; - }, - generategrouparray: function (group, config, level) { - var ret = []; - for (var i = 0; i < group.length; i++) { - var name = group[i].name; - var arr; - if (group[i].children == 0 || group[i].children.length == 0) { - arr = [name]; - - ret.push(arr); - } - else { - arr = this.generategrouparray(group[i].children, config, level + 1); - for (var a = 0; a < arr.length; a++) { - arr[a].unshift(name); - } - if (config[level].stastic == "1" || config[level].stastic == null) { - arr.push(this.generategroupaddstatic(arr, name)); - } - ret = ret.concat(arr); - } - - } - //console.log(JSON.stringify(ret)); - return ret; - }, - addStatisticsData: function (dataposition, valueobj, indicator, d_value) { - if (dataposition[indicator] == null) { - dataposition[indicator] = { "data": [], "count": 0, "max": -Infinity, "min": Infinity, "counta": 0, "countunique": 0, "countuniquedata": {}, "sum": 0, digitaldata: [], "sumtype": valueobj.sumtype, "index": valueobj.index, "name": valueobj.fullname, "acc": 0 }; - } - - if (luckysheet.isdatatypemulti(d_value)["num"] === true) { - var num = luckysheet.numFormat(d_value); - dataposition[indicator]["digitaldata"].push(num); - dataposition[indicator]["count"] += 1; - dataposition[indicator]["sum"] += num; - - if (num > dataposition[indicator]["max"]) { - dataposition[indicator]["max"] = num; - } - - if (num < dataposition[indicator]["min"]) { - dataposition[indicator]["min"] = num; - } - - var newAcc = luckysheet.numfloatlen(num); - - if(newAcc > dataposition[indicator]["acc"]){ - dataposition[indicator]["acc"] = newAcc; - } - } - - if (d_value != "") { - dataposition[indicator]["data"].push(d_value); - dataposition[indicator]["counta"] += 1; - if (!(d_value in dataposition[indicator]["countuniquedata"])) { - dataposition[indicator]["countuniquedata"][d_value] = 1; - dataposition[indicator]["countunique"] += 1; - } - } - }, - dataHandler: function (column, row, values, showType, celldata) { - //column:[{"index":1, name:"列1", "order":"asc", "orderby":"self/0/1/2", "stastic":"0/1"}] - //row:[{"index":1, name:"列3", "order":"asc", "orderby":"self/0/1/2", "stastic":"0/1"}] - //values:[{"index":1, "sumtype":"SUM/COUNT/COUNTA/COUNTUNIQUE/AVERAGE/MAX/MIN/MEDIAN/PRODUCT/STDEV/STDEVP/VAR/VARP", "name":"求和:fyc"}] - - if (showType == null) { - showType = "column"; - } - - if ((column.length == 0 && row.length == 0 && values.length == 0) || celldata.length == 0) { - this.pivotDatas = []; - return []; - } - - //生成透视表值及定位 - var dataposition = {}, - data = celldata, - datarowtitle = [], - datarowtitlegroup = [], - datarowposition = {}, - datarowposition_i = 0, - datacoltitle = [], - datacoltitlegroup = [], - datacolposition = {}, - datacolposition_i = 0; - - for (var i = 1; i < data.length; i++) { - var d = data[i]; - var groupbyrowtxt = "", - groupbycoltxt = "", - rowtxt = "", - rowtitle = [], - rowtitlename = [], - coltxt = "", - coltitle = [], - coltitlename = []; - - //for (var r = 0; r < row.length; r++) { - // var c_value = d[row[r].index]; - // groupbyrowtxt += "|row" + c_value.toString(); - // rowtxt += c_value.toString(); - // rowtitle.push(c_value); - // } - - - // if (rowtxt!="" && datarowposition[rowtxt] == null) { - // datarowposition[rowtxt] = datarowposition_i++; - // datarowtitle.push(rowtitle); - // } - - // for (var c = 0; c < column.length; c++) { - // var c_value = d[column[c].index]; - // groupbycoltxt += "|col" + c_value.toString(); - // coltxt += c_value.toString(); - // coltitle.push(c_value); - // } - - // if (coltxt != "" && datacolposition[coltxt] == null) { - // datacolposition[coltxt] = datacolposition_i++; - // datacoltitle.push(coltitle); - // } - - //["四川", "成都", "邛崃"] 转换为 ["四川", "四川成都", "四川成都邛崃"] - rowtitlename = this.getnameArray(d, row); - coltitlename = this.getnameArray(d, column); - - rowtitle = this.getComposeArray(rowtitlename); - coltitle = this.getComposeArray(coltitlename); - - if (rowtitle.length > 0) { - rowtitle.unshift("总计"); - } - - if (coltitle.length > 0) { - coltitle.unshift("总计"); - } - - var curentLevelobj = datarowposition, curentLevelarr = datarowtitlegroup; - for (var r = 0; r < rowtitle.length; r++) { - var item = rowtitle[r], name = r == 0 ? "总计" : rowtitlename[r - 1];//修改 - if (curentLevelobj[r.toString()] != null && curentLevelobj[r.toString()][item] != null) {//修改 - curentLevelarr = curentLevelarr[curentLevelobj[r.toString()][item]].children; - } - else { - var orderby = r == 0 ? "self" : ((row[r - 1].orderby == "self" || row[r - 1].orderby == null) ? item : (showType == "column" ? item + values[parseInt(row[r - 1].orderby)].fullname : item + "合计")); - if(name == null){ - name = "(空白)"; - } - curentLevelarr.push({ "name": name, "fullname": item, "index": r, "orderby": orderby, "children": [] }); - - if (curentLevelobj[r.toString()] == null) { - curentLevelobj[r.toString()] = {}; - } - - if (curentLevelobj[r.toString()][item] == null) { - curentLevelobj[r.toString()][item] = curentLevelarr.length - 1; - } - curentLevelarr = curentLevelarr[curentLevelarr.length - 1].children; - } - } - - var curentLevelobj = datacolposition, curentLevelarr = datacoltitlegroup; - for (var r = 0; r < coltitle.length; r++) { - var item = coltitle[r], name = r == 0 ? "总计" : coltitlename[r - 1]; - if (curentLevelobj[r.toString()] != null && curentLevelobj[r.toString()][item] != null) { - curentLevelarr = curentLevelarr[curentLevelobj[r.toString()][item]].children; - } - else { - var orderby = r == 0 ? "self" : ((column[r - 1].orderby == "self" || column[r - 1].orderby == null) ? item : (showType == "column" ? "合计" + item : values[parseInt(column[r - 1].orderby)].fullname + item)); - if(name==null){ - name = "(空白)"; - } - curentLevelarr.push({ "name": name, "fullname": item, "index": r, "orderby": orderby, "children": [] }); - - if (curentLevelobj[r.toString()] == null) { - curentLevelobj[r.toString()] = {}; - } - - if (curentLevelobj[r.toString()][item] == null) { - curentLevelobj[r.toString()][item] = curentLevelarr.length - 1; - } - curentLevelarr = curentLevelarr[curentLevelarr.length - 1].children; - } - } - - var v_str = ""; - for (var v = 0; v < values.length; v++) { - var d_value = luckysheet.getcellvalue(values[v].index, null, d); - // var indicator = ""; - // if (showType=="column"){ - // indicator = groupbyrowtxt + groupbycoltxt; - // if (indicator != "") { - // indicator = indicator.substr(1) + "|col" + values[v].fullname; - // } - // else { - // indicator = "col" + values[v].fullname; - // } - //} - //else{ - // if (groupbyrowtxt != "") { - // indicator = groupbyrowtxt.substr(1) + "|row" + values[v].fullname + groupbycoltxt; - // } - // else { - // indicator = "row" + values[v].fullname + groupbycoltxt; - // } - //} - - var coltitle_c = [].concat(coltitle), rowtitle_c = [].concat(rowtitle); - if (showType == "column") { - if (coltitle_c.length > 0) { - coltitle_c.push("") - coltitle_c = coltitle_c.join(values[v].fullname + "|||").split("|||").slice(0, coltitle_c.length - 1); - } - else { - coltitle_c.push(values[v].fullname); - } - - } - else { - if (rowtitle_c.length > 0) { - //rowtitle_c.push(rowtitle_c[rowtitle_c.length-1] + values[v].fullname); - //rowtitle_c = (values[v].fullname + rowtitle_c.join("|||" + values[v].fullname)).split("|||"); - rowtitle_c.push("") - rowtitle_c = rowtitle_c.join(values[v].fullname + "|||").split("|||").slice(0, rowtitle_c.length - 1); - } - else { - rowtitle_c.push(values[v].fullname); - } - } - - if (coltitle_c.length == 0) { - coltitle_c.push(""); - } - - if (rowtitle_c.length == 0) { - rowtitle_c.push(""); - } - - for (var r = 0; r < rowtitle_c.length; r++) { - for (var c = 0; c < coltitle_c.length; c++) { - indicator = rowtitle_c[r] + coltitle_c[c]; - this.addStatisticsData(dataposition, values[v], indicator, d_value); - } - } - - - //if (dataposition[indicator] == null) { - // dataposition[indicator] = { "data": [], "count": 0, "max": -Infinity, "min": Infinity, "counta": 0, "countunique": 0, "countuniquedata": {}, "sum": 0, digitaldata:[], "sumtype": values[v].sumtype, "index": values[v].index, "name": values[v].fullname }; - //} - - - - //if (luckysheet.isdatatypemulti(d_value)["num"] === true ) { - // var num = luckysheet.numFormat(d_value); - // dataposition[indicator]["digitaldata"].push(num); - // dataposition[indicator]["count"] += 1; - // dataposition[indicator]["sum"] += num; - - // if (num > dataposition[indicator]["max"]) { - // dataposition[indicator]["max"] = num; - // } - - // if (num < dataposition[indicator]["min"]) { - // dataposition[indicator]["min"] = num; - // } - //} - - //if (d_value != "") { - // dataposition[indicator]["data"].push(d_value); - // dataposition[indicator]["counta"] += 1; - // if (!(d_value in dataposition[indicator]["countuniquedata"])){ - // dataposition[indicator]["countuniquedata"]["d_value"] = 1; - // dataposition[indicator]["countunique"] += 1; - // } - //} - - } - } - - //计算值列 - //SUM/COUNT/COUNTA/COUNTUNIQUE/AVERAGE/MAX/MIN/MEDIAN/PRODUCT/STDEV/STDEVP/VAR/VARP - for (indicator in dataposition) { - var json = dataposition[indicator]; - if (json.sumtype == "SUM") { - json.result = json.sum; - } - else if (json.sumtype == "COUNT") { - json.result = json.count; - } - else if (json.sumtype == "COUNTA") { - json.result = json.counta; - } - else if (json.sumtype == "COUNTUNIQUE") { - json.result = json.countunique; - } - else if (json.sumtype == "AVERAGE") { - json.result = luckysheet.numFormat(json.sum / json.count); - } - else if (json.sumtype == "MAX") { - json.result = json.max; - } - else if (json.sumtype == "MIN") { - json.result = json.min; - } - else if (json.sumtype == "MEDIAN") { - var numArr = json.digitaldata.sort(function(a, b){ return a - b }); - var numLen = numArr.length; - var numindex = parseInt(numLen / 2); - - if(numLen % 2 == 0){ - json.result = (numArr[numindex - 1] + numArr[numindex]) / 2; - } - else{ - json.result = numArr[numindex]; - } - } - else if (json.sumtype == "PRODUCT") { - json.result = eval(json.digitaldata.join("*")); - } - else if (json.sumtype == "STDEV") { - var mean = json.sum / json.count; - json.result = luckysheet.analysis.STDEV(mean, json.digitaldata); - } - else if (json.sumtype == "STDEVP") { - var mean = json.sum / json.count; - json.result = luckysheet.analysis.STDEVP(mean, json.digitaldata); - } - else if (json.sumtype == "VAR") { - var mean = json.sum / json.count; - json.result = luckysheet.analysis.VAR(mean, json.digitaldata); - } - else if (json.sumtype == "VARP") { - var mean = json.sum / json.count; - json.result = luckysheet.analysis.VARP(mean, json.digitaldata); - } - - var newAcc = luckysheet.numfloatlen(json.result); - if(newAcc > json.acc){ - json.acc = newAcc; - } - - json.result = luckysheet.numFormat(json.result, json.acc); - } - - datarowtitle = this.getTitleFromGroup(datarowtitlegroup, row, dataposition); - datacoltitle = this.getTitleFromGroup(datacoltitlegroup, column, dataposition); - - //加入值到列/行形成新的表头 - if (showType == "column") { - if (datacoltitle.length > 0 && datacoltitle[0].length > 0) { - datacoltitle = this.addValuesToTitle(datacoltitle, values); - } - else { - for (var v = 0; v < values.length; v++) { - datacoltitle.push([values[v].fullname]); - } - } - } - else { - if (datarowtitle.length > 0 && datarowtitle[0].length > 0) { - datarowtitle = this.addValuesToTitle(datarowtitle, values); - } - else { - for (var v = 0; v < values.length; v++) { - datarowtitle.push([values[v].fullname]); - } - } - } - - var datacoltitle_index = datacoltitle; - datacoltitle = luckysheet.array.transpose(datacoltitle); - - var valuenslen = values.length == 0 ? 0 : 1; - var rowLen = (datacoltitle.length == 0 ? valuenslen : datacoltitle.length) + (datarowtitle.length == 0 ? valuenslen : datarowtitle.length), colLen = (datacoltitle.length == 0 ? valuenslen : datacoltitle[0].length) + (datarowtitle.length == 0 ? valuenslen : datarowtitle[0].length); - - var rowOver = datacoltitle.length, colOver = datarowtitle.length == 0 ? 0 : datarowtitle[0].length; - - var retdata = []; - for (var r = 0; r < rowLen; r++) { - retdata[r] = new Array(colLen); - for (var c = 0; c < colLen; c++) { - var drt = datarowtitle[r - rowOver]; - if (r < rowOver && c < colOver) { - //空白列头 - retdata[r][c] = ""; - } - else if (r < rowOver && c >= colOver) { - //列标题 - if (datacoltitle[r] != null) { - if (luckysheet.getObjType(datacoltitle[r][c - colOver]) == "object") { - retdata[r][c] = datacoltitle[r][c - colOver].name + "总计"; - } - else { - retdata[r][c] = datacoltitle[r][c - colOver]; - } - - } - else { - retdata[r][c] = ""; - } - } - else if (r >= rowOver && c < colOver) { - //行标题 - if (drt != null) { - //retdata[r][c] = datarowtitle[r - rowOver][c]; - if (luckysheet.getObjType(drt[c]) == "object") { - retdata[r][c] = drt[c].name + "总计"; - } - else { - retdata[r][c] = drt[c]; - } - } - else { - retdata[r][c] = ""; - } - } - else { - //单元格内容 - var prefix = ""; - if (drt != null) { - if (!(drt instanceof Array) || drt.length == 1) { - if (drt instanceof Array) { - prefix = drt[0]; - } - else { - prefix = drt; - } - } - else { - for (var x = 0; x < drt.length; x++) { - if (luckysheet.getObjType(drt[x]) == "object") { - prefix += drt[x].name; - } - else { - prefix += drt[x]; - } - } - } - } - - var suffix = ""; - var dct = datacoltitle_index[c - colOver]; - if (dct != null) { - if (!(dct instanceof Array) || dct.length == 1) { - if (dct instanceof Array) { - suffix = dct[0]; - } - else { - suffix = dct; - } - } - else { - for (var x = 0; x < dct.length; x++) { - if (luckysheet.getObjType(dct[x]) == "object") { - suffix += dct[x].name; - } - else { - suffix += dct[x]; - } - } - //suffix = dct.join(""); - } - } - - var indicator = prefix; - - if (prefix != "" && suffix != "") { - indicator = prefix + suffix; - } - else if (prefix == "") { - indicator = suffix; - } - - if (dataposition[indicator] == null) { - retdata[r][c] = ""; - } - else { - retdata[r][c] = dataposition[indicator].result; - } - } - } - } - - if (values.length == 1 && column.length > 0) { - retdata[0][0] = values[0].fullname; - retdata.splice(column.length, 1); - } - this.pivotDatas = retdata; - return retdata; - }, - drillDown: function(row_index, col_index){ - var cell = this.pivotDatas[row_index][col_index]; - - var d = $.extend(true, [], luckysheet.sheetmanage.nulldata); - - var selecteditemNullIndex = 1; - for(var i = 0; i < this.celldata[0].length; i++){ - if(!!this.celldata[0][i] && !!this.celldata[0][i]["m"]){ - var name = this.celldata[0][i]["m"]; - } - else{ - var name = luckysheet.getcellvalue(0, i, this.celldata); - } - - if(name != null){ - name = name.toString(); - } - - if (name == null || $.trim(name.toString()).length == 0) { - name = "列 " + selecteditemNullIndex; - } - selecteditemNullIndex++ - - d[0][i] = name; - } - - // if(cell == null || cell == ""){ - // luckysheet_select_save = [{ "row": [0, 1], "column": [0, this.celldata[0].length - 1] }]; - // } - // else{ - var obj = {}; - - //行 - if(this.row != null && this.row.length > 0){ - for(var a = 0; a < this.row.length; a++){ - obj[this.row[a]["index"]] = this.pivotDatas[row_index][a]; - } - } - - //列 - if(this.column != null && this.column.length > 0){ - for(var b = 0; b < this.column.length; b++){ - obj[this.column[b]["index"]] = this.pivotDatas[b][col_index]; - } - } - - var rowArr = []; - for(var j = 1; j < this.celldata.length; j++){ - var isEqual = true - - for(x in obj){ - if(!!this.celldata[j][x] && !!this.celldata[j][x]["m"]){ - var value = this.celldata[j][x]["m"]; - } - else{ - var value = luckysheet.getcellvalue(j, x, this.celldata); - } - - if(value != null){ - value = value.toString(); - } - else{ - value = "(空白)"; - } - - if(value != obj[x]){ - isEqual = false; - break; - } - } - - if(isEqual){ - rowArr.push(j); - } - } - - for(var r = 0; r < rowArr.length; r++){ - for(var c = 0; c < this.celldata[0].length; c++){ - if(!!this.celldata[rowArr[r]][c] && !!this.celldata[rowArr[r]][c]["m"]){ - var value = this.celldata[rowArr[r]][c]["m"]; - } - else{ - var value = luckysheet.getcellvalue(rowArr[r], c, this.celldata); - } - - if(value != null){ - value = value.toString(); - } - else{ - value = ""; - } - - d[r + 1][c] = value; - } - } - - luckysheet_select_save = [{ "row": [0, rowArr.length], "column": [0, this.celldata[0].length - 1] }]; - // } - - clearjfundo = false; - luckysheet.jfrefreshgrid(d, luckysheet_select_save); - luckysheet.selectHightlightShow(); - clearjfundo = true; - } - } - - luckysheet.freezen = { - freezenHorizontalHTML: '
 
', - freezenVerticalHTML: '
 
', - initialHorizontal: true, - initialVertical: true, - horizontalmovestate: false, - horizontalmoveposition: null, - verticalmovestate: false, - verticalmoveposition: null, - windowHeight: null, - windowWidth: null, - freezenhorizontaldata: null, - freezenverticaldata: null, - cutVolumn: function (arr, cutindex) { - if(cutindex <= 0){ - return arr; - } - - var pre = arr.slice(0, cutindex); - var premax = pre[pre.length - 1]; - var ret = arr.slice(cutindex); - - for (var i = 0; i < ret.length; i++) { - ret[i] -= premax; - } - return ret; - }, - cancelFreezenVertical: function (sheetIndex) { - $("#luckysheet-freezen-btn-vertical").html(' 冻结首列'); - luckysheet.freezen.freezenverticaldata = null; - var isvertical = $("#luckysheet-freezebar-vertical").is(":visible"); - $("#luckysheet-freezebar-vertical").hide(); - - if (sheetIndex == null) { - sheetIndex = luckysheet.currentSheetIndex; - } - var currentSheet = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]; - if (currentSheet.freezen != null) { - currentSheet.freezen.vertical = null; - } - - if(currentSheet.freezen != null && isvertical){ - luckysheet.server.saveParam("all", sheetIndex, currentSheet.freezen, { "k": "freezen" }); - } - }, - createFreezenVertical: function (freezenverticaldata, left) { - if (this.initialVertical) { - this.initialVertical = false; - $("#luckysheet-grid-window-1").append(this.freezenVerticalHTML); - - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").hover(function () { - $(this).parent().addClass("luckysheet-freezebar-hover"); - }, function () { - $(this).parent().removeClass("luckysheet-freezebar-hover"); - }); - - - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").mousedown(function () { - luckysheet.freezen.verticalmovestate = true; - luckysheet.freezen.verticalmoveposition = $(this).position().left; - - luckysheet.freezen.windowWidth = $("#luckysheet-grid-window-1").width(); - - $(this).parent().addClass("luckysheet-freezebar-active"); - - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css("cursor", "-webkit-grabbing"); - }); - - var gridheight = $("#luckysheet-grid-window-1").height(); - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({ "height": gridheight - 10, "width": "4px", "cursor": "-webkit-grab", "top": "0px" }).end().find(".luckysheet-freezebar-vertical-drop").css({ "height": gridheight - 10, "width": "4px", "top": "0px", "cursor": "-webkit-grab" }); - } - - if (freezenverticaldata == null) { - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var dataset_col_st = luckysheet_searcharray(visibledatacolumn, scrollLeft); - if (dataset_col_st == -1) { - dataset_col_st = 0; - } - - left = visibledatacolumn[dataset_col_st] - 2 - scrollLeft + rowHeaderWidth; - freezenverticaldata = [visibledatacolumn[dataset_col_st], dataset_col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, dataset_col_st + 1), left]; - luckysheet.freezen.saveFreezen(null, null, freezenverticaldata, left); - } - - luckysheet.freezen.freezenverticaldata = freezenverticaldata; - - $("#luckysheet-freezen-btn-horizontal").html(' 取消冻结'); - - $("#luckysheet-freezebar-vertical").show().find(".luckysheet-freezebar-vertical-handle").css({ "left": left }).end().find(".luckysheet-freezebar-vertical-drop").css({ "left": left }); - }, - saveFreezen: function (freezenhorizontaldata, top, freezenverticaldata, left) { - var currentSheet = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - if (currentSheet.freezen == null) { - currentSheet.freezen = {}; - } - - if (freezenhorizontaldata != null) { - if (currentSheet.freezen.horizontal == null) { - currentSheet.freezen.horizontal = {}; - } - - currentSheet.freezen.horizontal.freezenhorizontaldata = freezenhorizontaldata; - currentSheet.freezen.horizontal.top = top; - } - - if (freezenverticaldata != null) { - if (currentSheet.freezen.vertical == null) { - currentSheet.freezen.vertical = {}; - } - - currentSheet.freezen.vertical.freezenverticaldata = freezenverticaldata; - currentSheet.freezen.vertical.left = left; - } - - if(currentSheet.freezen != null){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, currentSheet.freezen, { "k": "freezen" }); - } - }, - initialFreezen: function (sheetIndex) { - var currentSheet = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]; - if (currentSheet.freezen != null && currentSheet.freezen.horizontal != null && currentSheet.freezen.horizontal.freezenhorizontaldata != null) { - this.createFreezenHorizontal(currentSheet.freezen.horizontal.freezenhorizontaldata, currentSheet.freezen.horizontal.top); - - } - else { - this.cancelFreezenHorizontal(sheetIndex); - } - - if (currentSheet.freezen != null && currentSheet.freezen.vertical != null && currentSheet.freezen.vertical.freezenverticaldata != null) { - this.createFreezenVertical(currentSheet.freezen.vertical.freezenverticaldata, currentSheet.freezen.vertical.left); - } - else { - this.cancelFreezenVertical(sheetIndex); - } - - - this.createAssistCanvas(); - }, - changeFreezenIndex: function (originindex, type) { - if (type == "v" && this.freezenverticaldata != null) { - var freezen_colindex = this.freezenverticaldata[1]; - var offset = luckysheet_searcharray(visibledatacolumn, $("#luckysheet-cell-main").scrollLeft()); - - if (originindex - offset < freezen_colindex) { - originindex = originindex - offset; - } - - } - else if (type == "h" && this.freezenhorizontaldata != null) { - var freezen_rowindex = this.freezenhorizontaldata[1]; - var offset = luckysheet_searcharray(visibledatarow, $("#luckysheet-cell-main").scrollTop()); - if (originindex - offset < freezen_rowindex) { - originindex = originindex - offset; - } - - } - return originindex; - }, - scrollFreezen: function () { - var row_focus = luckysheet_select_save[0]["row_focus"]; - if(row_focus == luckysheet_select_save[0]["row"][0]){ - var row = luckysheet_select_save[0]["row"][1]; - } - else if(row_focus == luckysheet_select_save[0]["row"][1]){ - var row = luckysheet_select_save[0]["row"][0]; - } - - var column_focus = luckysheet_select_save[0]["column_focus"]; - if(column_focus == luckysheet_select_save[0]["column"][0]){ - var column = luckysheet_select_save[0]["column"][1]; - } - else if(column_focus == luckysheet_select_save[0]["column"][1]){ - var column = luckysheet_select_save[0]["column"][0]; - } - - if (this.freezenverticaldata != null) { - var freezen_colindex = this.freezenverticaldata[1]; - var offset = luckysheet_searcharray(this.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft()); - - freezen_colindex += offset; - - if (column <= freezen_colindex) { - setTimeout(function () { $("#luckysheet-scrollbar-x").scrollLeft(0); }, 10); - } - } - - if (this.freezenhorizontaldata != null) { - var freezen_rowindex = this.freezenhorizontaldata[1]; - var offset = luckysheet_searcharray(this.freezenhorizontaldata[3], $("#luckysheet-cell-main").scrollTop()); - - freezen_rowindex += offset; - - if (row <= freezen_rowindex) { - setTimeout(function () { $("#luckysheet-scrollbar-y").scrollTop(0); }, 10); - } - } - }, - cancelFreezenHorizontal: function (sheetIndex) { - $("#luckysheet-freezen-btn-horizontal").html(' 冻结首行'); - luckysheet.freezen.freezenhorizontaldata = null; - var ishorizontal = $("#luckysheet-freezebar-horizontal").is(":visible"); - $("#luckysheet-freezebar-horizontal").hide(); - - if (sheetIndex == null) { - sheetIndex = luckysheet.currentSheetIndex; - } - - var currentSheet = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]; - if (currentSheet.freezen != null) { - currentSheet.freezen.horizontal = null; - } - - if(currentSheet.freezen != null && ishorizontal){ - luckysheet.server.saveParam("all", sheetIndex, currentSheet.freezen, { "k": "freezen" }); - } - }, - createFreezenHorizontal: function (freezenhorizontaldata, top) { - if (this.initialHorizontal) { - this.initialHorizontal = false; - $("#luckysheet-grid-window-1").append(this.freezenHorizontalHTML); - - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").hover(function () { - $(this).parent().addClass("luckysheet-freezebar-hover"); - }, function () { - $(this).parent().removeClass("luckysheet-freezebar-hover"); - }); - - - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").mousedown(function () { - luckysheet.freezen.horizontalmovestate = true; - luckysheet.freezen.horizontalmoveposition = $(this).position().top; - - luckysheet.freezen.windowHeight = $("#luckysheet-grid-window-1").height(); - - $(this).parent().addClass("luckysheet-freezebar-active"); - - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css("cursor", "-webkit-grabbing"); - }); - - var gridwidth = $("#luckysheet-grid-window-1").width(); - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({ "width": gridwidth - 10, "height": "4px", "cursor": "-webkit-grab", "left": "0px" }).end().find(".luckysheet-freezebar-horizontal-drop").css({ "width": gridwidth - 10, "height": "4px", "left": "0px", "cursor": "-webkit-grab" }); - } - - if (freezenhorizontaldata == null) { - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var dataset_row_st = luckysheet_searcharray(visibledatarow, scrollTop); - if (dataset_row_st == -1) { - dataset_row_st = 0; - } - - top = visibledatarow[dataset_row_st] - 2 - scrollTop + columeHeaderHeight; - freezenhorizontaldata = [visibledatarow[dataset_row_st], dataset_row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, dataset_row_st + 1), top]; - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, null, null); - } - - luckysheet.freezen.freezenhorizontaldata = freezenhorizontaldata; - - $("#luckysheet-freezen-btn-horizontal").html(' 取消冻结'); - - $("#luckysheet-freezebar-horizontal").show().find(".luckysheet-freezebar-horizontal-handle").css({ "top": top }).end().find(".luckysheet-freezebar-horizontal-drop").css({ "top": top }); - }, - createAssistCanvas: function(){ - var _this = this; - _this.removeAssistCanvas(); - if (_this.freezenverticaldata != null || _this.freezenhorizontaldata != null) { - - var freezen_horizon_px, freezen_horizon_ed, freezen_horizon_scrollTop; - var freezen_vertical_px, freezen_vertical_ed, freezen_vertical_scrollTop; - var drawWidth = luckysheetTableContentHW[0], drawHeight = luckysheetTableContentHW[1]; - //双向freezen开始 - if (_this.freezenverticaldata != null && _this.freezenhorizontaldata != null) { - freezen_horizon_px = _this.freezenhorizontaldata[0]; - freezen_horizon_ed = _this.freezenhorizontaldata[1]; - freezen_horizon_scrollTop = _this.freezenhorizontaldata[2]; - - freezen_vertical_px = _this.freezenverticaldata[0]; - freezen_vertical_ed = _this.freezenverticaldata[1]; - freezen_vertical_scrollTop = _this.freezenverticaldata[2]; - - //3 - // _this.createCanvas("freezen_3",freezen_vertical_px - freezen_vertical_scrollTop, freezen_horizon_px-freezen_horizon_scrollTop+1, rowHeaderWidth, columeHeaderHeight); - _this.createCanvas("freezen_3", freezen_vertical_px - freezen_vertical_scrollTop, freezen_horizon_px - freezen_horizon_scrollTop + 1, rowHeaderWidth - 1, columeHeaderHeight - 1); - //4 - // _this.createCanvas("freezen_4",drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, freezen_horizon_px-freezen_horizon_scrollTop+1, freezen_vertical_px - freezen_vertical_scrollTop + rowHeaderWidth,columeHeaderHeight); - _this.createCanvas("freezen_4", drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, freezen_horizon_px - freezen_horizon_scrollTop + 1, freezen_vertical_px - freezen_vertical_scrollTop + rowHeaderWidth - 1, columeHeaderHeight - 1); - //7 - // _this.createCanvas("freezen_7",freezen_vertical_px - freezen_vertical_scrollTop, drawHeight - freezen_horizon_px + freezen_horizon_scrollTop-columeHeaderHeight, rowHeaderWidth, freezen_horizon_px - freezen_horizon_scrollTop + columeHeaderHeight); - _this.createCanvas("freezen_7", freezen_vertical_px - freezen_vertical_scrollTop, drawHeight - freezen_horizon_px + freezen_horizon_scrollTop - columeHeaderHeight, rowHeaderWidth - 1, freezen_horizon_px - freezen_horizon_scrollTop + columeHeaderHeight - 1); - } - //水平freezen开始 - else if (_this.freezenhorizontaldata != null) { - freezen_horizon_px = _this.freezenhorizontaldata[0]; - freezen_horizon_ed = _this.freezenhorizontaldata[1]; - freezen_horizon_scrollTop = _this.freezenhorizontaldata[2]; - - // _this.createCanvas("freezen_h", drawWidth, freezen_horizon_px - freezen_horizon_scrollTop + 1, rowHeaderWidth, columeHeaderHeight); - _this.createCanvas("freezen_h", drawWidth, freezen_horizon_px - freezen_horizon_scrollTop + 1, rowHeaderWidth - 1, columeHeaderHeight - 1); - - } - //水平freezon结束 - - //垂直freezen开始 - else if (_this.freezenverticaldata != null) { - freezen_vertical_px = _this.freezenverticaldata[0]; - freezen_vertical_ed = _this.freezenverticaldata[1]; - freezen_vertical_scrollTop = _this.freezenverticaldata[2]; - - // _this.createCanvas("freezen_v", freezen_vertical_px - freezen_vertical_scrollTop, drawHeight, rowHeaderWidth, columeHeaderHeight); - _this.createCanvas("freezen_v", freezen_vertical_px - freezen_vertical_scrollTop, drawHeight, rowHeaderWidth - 1, columeHeaderHeight - 1); - } - //垂直freezen结束 - - // $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").css("z-index", 10001); - - // setTimeout(function(){ - // luckysheet.luckysheetsizeauto(); - // },0); - - luckysheet.freezen.scrollAdapt(); - } - }, - createCanvas: function(id, width, height, left, top){ - var c = $("").appendTo("#luckysheet-grid-window-1").attr({"id":id, "width":Math.ceil(width*devicePixelRatio), "height":Math.ceil(height*devicePixelRatio)}).css({"user-select":"none","postion":"absolute","left":left, "top":top,"width":width, "height":height, "z-index":10, "pointer-events":"none"}); - }, - removeAssistCanvas: function(){ - $("#luckysheet-grid-window-1 > canvas").not($("#luckysheetTableContent")).remove(); - $("#luckysheet-cell-selected").css("z-index", 15); - }, - scrollAdapt: function(){ - //有冻结时 选区框 滚动适应 - if(luckysheet_select_save != null && luckysheet_select_save.length > 0){ - luckysheet.freezen.scrollAdaptOfselect(); - } - - //有冻结时 图表框 滚动适应 - if($("#luckysheet-cell-main .luckysheet-data-visualization-chart").length > 0){ - luckysheet.freezen.scrollAdaptOfchart(); - } - - //有冻结时 批注框 滚动适应 - if($("#luckysheet-postil-showBoxs .luckysheet-postil-show").length > 0){ - luckysheet.freezen.scrollAdaptOfpostil(); - } - - //有冻结时 下拉选区图标 滚动适应 - if($("#luckysheet-dropCell-icon").length > 0){ - luckysheet.freezen.scrollAdaptOfdpicon(); - } - - //有冻结时 筛选下拉按钮 滚动适应 - if($("#luckysheet-filter-options-sheet"+ luckysheet.currentSheetIndex +" .luckysheet-filter-options").length > 0){ - luckysheet.freezen.scrollAdaptOffilteroptions(); - } - }, - scrollAdaptOfselect: function(){ - if($("#luckysheet-row-count-show").is(":visible")){ - $("#luckysheet-row-count-show").hide(); - } - - if($("#luckysheet-column-count-show").is(":visible")){ - $("#luckysheet-column-count-show").hide(); - } - - $("#luckysheet-rows-h-selected").empty(); - $("#luckysheet-cols-h-selected").empty(); - - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - - if (luckysheet.freezen.freezenhorizontaldata != null && luckysheet.freezen.freezenverticaldata != null) { - var freezenTop = luckysheet.freezen.freezenhorizontaldata[0]; - var freezen_rowindex = luckysheet.freezen.freezenhorizontaldata[1]; - var offTop = scrollTop - luckysheet.freezen.freezenhorizontaldata[2]; - - var freezenLeft = luckysheet.freezen.freezenverticaldata[0]; - var freezen_colindex = luckysheet.freezen.freezenverticaldata[1]; - var offLeft = scrollLeft - luckysheet.freezen.freezenverticaldata[2]; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var obj = $.extend(true, {}, luckysheet_select_save[s]); - - var r1 = obj.row[0], - r2 = obj.row[1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - - var top_move = row_pre; - var height_move = row - row_pre - 1; - - var rangeshow = true; - - if(r1 >= freezen_rowindex){//原选区在冻结区外 - if(top_move + height_move < freezenTop + offTop){ - rangeshow = false; - } - else if(top_move < freezenTop + offTop){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": freezenTop + offTop, - "height": height_move - (freezenTop + offTop - top_move) - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": top_move, - "height": height_move - }); - } - } - else if(r2 >= freezen_rowindex){//原选区有一部分在冻结区内 - if(top_move + height_move < freezenTop + offTop){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": top_move + offTop, - "height": freezenTop - top_move - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": top_move + offTop, - "height": height_move - offTop - }); - } - } - else{//原选区在冻结区内 - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("top", top_move + offTop); - } - - var c1 = obj.column[0], - c2 = obj.column[1]; - - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var left_move = col_pre; - var width_move = col - col_pre - 1; - - if(c1 >= freezen_colindex){//原选区在冻结区外 - if(left_move + width_move < freezenLeft + offLeft){ - rangeshow = false; - } - else if(left_move < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": freezenLeft + offLeft, - "width": width_move - (freezenLeft + offLeft - left_move) - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": left_move, - "width": width_move - }); - } - } - else if(c2 >= freezen_colindex){//原选区有一部分在冻结区内 - if(left_move + width_move < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": left_move + offLeft, - "width": freezenLeft - left_move - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": left_move + offLeft, - "width": width_move - offLeft - }); - } - } - else{//原选区在冻结区内 - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("left", left_move + offLeft); - } - - if(!rangeshow){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide(); - } - - if(s == luckysheet_select_save.length - 1){ - var rf = obj.row_focus == null ? r1 : obj.row_focus; - var cf = obj.column_focus == null ? c1 : obj.column_focus; - - var row_f = visibledatarow[rf], row_pre_f = rf - 1 == -1 ? 0 : visibledatarow[rf - 1]; - var col_f = visibledatacolumn[cf], col_pre_f = cf - 1 == -1 ? 0 : visibledatacolumn[cf - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, rf, cf); - if(!!margeset){ - row_f = margeset.row[1]; - row_pre_f = margeset.row[0]; - - col_f = margeset.column[1]; - col_pre_f = margeset.column[0]; - } - - var top = row_pre_f; - var height = row_f - row_pre_f - 1; - - var left = col_pre_f; - var width = col_f - col_pre_f - 1; - - var focuscell = true; - - if(top >= freezenTop){ - if(top + height < freezenTop + offTop){ - focuscell = false; - } - else if(top < freezenTop + offTop){ - $("#luckysheet-cell-selected-focus").show().css({ - "top": freezenTop + offTop, - "height": height - (freezenTop + offTop - top) - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "top": top, - "height": height - }); - } - } - else if(top + height >= freezenTop){ - if(top + height < freezenTop + offTop){ - $("#luckysheet-cell-selected-focus").show().css({ - "top": top + offTop, - "height": freezenTop - top - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "top": top + offTop, - "height": height - offTop - }) - } - } - else{ - $("#luckysheet-cell-selected-focus").show().css("top", top + offTop); - } - - if(left >= freezenLeft){ - if(left + width < freezenLeft + offLeft){ - focuscell = false; - } - else if(left < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-focus").show().css({ - "left": freezenLeft + offLeft, - "width": width - (freezenLeft + offLeft - left) - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "left": left, - "width": width - }); - } - } - else if(left + width >= freezenLeft){ - if(left + width < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-focus").show().css({ - "left": left + offLeft, - "width": freezenLeft - left - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "left": left + offLeft, - "width": width - offLeft - }) - } - } - else{ - $("#luckysheet-cell-selected-focus").show().css("left", left + offLeft); - } - - if(!focuscell){ - $("#luckysheet-cell-selected-focus").hide(); - } - } - } - } - else if (luckysheet.freezen.freezenhorizontaldata != null) { - var freezenTop = luckysheet.freezen.freezenhorizontaldata[0]; - var freezen_rowindex = luckysheet.freezen.freezenhorizontaldata[1]; - var offTop = scrollTop - luckysheet.freezen.freezenhorizontaldata[2]; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var obj = $.extend(true, {}, luckysheet_select_save[s]); - - var r1 = obj.row[0], - r2 = obj.row[1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - - var top_move = row_pre; - var height_move = row - row_pre - 1; - - if(r1 >= freezen_rowindex){//原选区在冻结区外 - if(top_move + height_move < freezenTop + offTop){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide(); - } - else if(top_move < freezenTop + offTop){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": freezenTop + offTop, - "height": height_move - (freezenTop + offTop - top_move) - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": top_move, - "height": height_move - }); - } - } - else if(r2 >= freezen_rowindex){//原选区有一部分在冻结区内 - if(top_move + height_move < freezenTop + offTop){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": top_move + offTop, - "height": freezenTop - top_move - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "top": top_move + offTop, - "height": height_move - offTop - }); - } - } - else{//原选区在冻结区内 - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("top", top_move + offTop); - } - - if(s == luckysheet_select_save.length - 1){ - var rf = obj.row_focus == null ? r1 : obj.row_focus; - var cf = obj.column_focus == null ? obj.column[0] : obj.column_focus; - - var row_f = visibledatarow[rf], row_pre_f = rf - 1 == -1 ? 0 : visibledatarow[rf - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, rf, cf); - if(!!margeset){ - row_f = margeset.row[1]; - row_pre_f = margeset.row[0]; - } - - var top = row_pre_f; - var height = row_f - row_pre_f - 1; - - if(top >= freezenTop){ - if(top + height < freezenTop + offTop){ - $("#luckysheet-cell-selected-focus").hide(); - } - else if(top < freezenTop + offTop){ - $("#luckysheet-cell-selected-focus").show().css({ - "top": freezenTop + offTop, - "height": height - (freezenTop + offTop - top) - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "top": top, - "height": height - }); - } - } - else if(top + height >= freezenTop){ - if(top + height < freezenTop + offTop){ - $("#luckysheet-cell-selected-focus").show().css({ - "top": top + offTop, - "height": freezenTop - top - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "top": top + offTop, - "height": height - offTop - }) - } - } - else{ - $("#luckysheet-cell-selected-focus").show().css("top", top + offTop); - } - } - } - } - else if(luckysheet.freezen.freezenverticaldata != null){ - var freezenLeft = luckysheet.freezen.freezenverticaldata[0]; - var freezen_colindex = luckysheet.freezen.freezenverticaldata[1]; - var offLeft = scrollLeft - luckysheet.freezen.freezenverticaldata[2]; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var obj = $.extend(true, {}, luckysheet_select_save[s]); - - var c1 = obj.column[0], - c2 = obj.column[1]; - - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var left_move = col_pre; - var width_move = col - col_pre - 1; - - if(c1 >= freezen_colindex){//原选区在冻结区外 - if(left_move + width_move < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).hide(); - } - else if(left_move < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": freezenLeft + offLeft, - "width": width_move - (freezenLeft + offLeft - left_move) - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": left_move, - "width": width_move - }); - } - } - else if(c2 >= freezen_colindex){//原选区有一部分在冻结区内 - if(left_move + width_move < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": left_move + offLeft, - "width": freezenLeft - left_move - }); - } - else{ - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css({ - "left": left_move + offLeft, - "width": width_move - offLeft - }); - } - } - else{//原选区在冻结区内 - $("#luckysheet-cell-selected-boxs").find(".luckysheet-cell-selected").eq(s).show().css("left", left_move + offLeft); - } - - if(s == luckysheet_select_save.length - 1){ - var rf = obj.row_focus == null ? obj.row[0] : obj.row_focus; - var cf = obj.column_focus == null ? c1 : obj.column_focus; - - var col_f = visibledatacolumn[cf], col_pre_f = cf - 1 == -1 ? 0 : visibledatacolumn[cf - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, rf, cf); - if(!!margeset){ - col_f = margeset.column[1]; - col_pre_f = margeset.column[0]; - } - - var left = col_pre_f; - var width = col_f - col_pre_f - 1; - - if(left >= freezenLeft){ - if(left + width < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-focus").hide(); - } - else if(left < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-focus").show().css({ - "left": freezenLeft + offLeft, - "width": width - (freezenLeft + offLeft - left) - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "left": left, - "width": width - }); - } - } - else if(left + width >= freezenLeft){ - if(left + width < freezenLeft + offLeft){ - $("#luckysheet-cell-selected-focus").show().css({ - "left": left + offLeft, - "width": freezenLeft - left - }) - } - else{ - $("#luckysheet-cell-selected-focus").show().css({ - "left": left + offLeft, - "width": width - offLeft - }) - } - } - else{ - $("#luckysheet-cell-selected-focus").show().css("left", left + offLeft); - } - } - } - } - else{ - luckysheet.selectHightlightShow(); - } - }, - scrollAdaptOfchart: function(){ - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - - if(luckysheet.freezen.freezenhorizontaldata != null && luckysheet.freezen.freezenverticaldata != null){ - var freezenTop = luckysheet.freezen.freezenhorizontaldata[0] - luckysheet.freezen.freezenhorizontaldata[2]; - var freezenLeft = luckysheet.freezen.freezenverticaldata[0] - luckysheet.freezen.freezenverticaldata[2]; - - $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ - var x = $(e).position(); - var width = $(e).width(); - var height = $(e).height(); - - var $canvas_width = $(e).find("canvas").width(); - var $canvas_height = $(e).find("canvas").height(); - - var height_diff = $canvas_height - height; - var width_diff = $canvas_width - width; - - if((x.top - height_diff) < freezenTop){ - var size = freezenTop - (x.top - height_diff); - - if(size > ($canvas_height + 40 + 2)){ - $(e).css("visibility", "hidden"); - } - else{ - $(e).css({ - "top": freezenTop + scrollTop, - "height": $canvas_height - size, - "visibility": "visible" - }); - $(e).find("canvas").css("top", - size); - } - } - else{ - $(e).css({ - "top": x.top - height_diff + scrollTop, - "height": $canvas_height, - "visibility": "visible" - }); - $(e).find("canvas").css("top", 0); - } - - if((x.left - width_diff) < freezenLeft){ - var size = freezenLeft - (x.left - width_diff); - - if(size > ($canvas_width + 20 + 2)){ - $(e).css("visibility", "hidden"); - } - else{ - $(e).css({ - "left": freezenLeft + scrollLeft, - "width": $canvas_width - size, - "visibility": "visible" - }); - $(e).find("canvas").css("left", - size); - } - } - else{ - $(e).css({ - "left": x.left - width_diff + scrollLeft, - "width": $canvas_width, - "visibility": "visible" - }); - $(e).find("canvas").css("left", 0); - } - }) - } - else if(luckysheet.freezen.freezenhorizontaldata != null){ - var freezenTop = luckysheet.freezen.freezenhorizontaldata[0] - luckysheet.freezen.freezenhorizontaldata[2]; - - $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ - var x = $(e).position(); - var height = $(e).height(); - - var $canvas_height = $(e).find("canvas").height(); - - var height_diff = $canvas_height - height; - - if((x.top - height_diff) < freezenTop){ - var size = freezenTop - (x.top - height_diff); - - if(size > ($canvas_height + 40 + 2)){ - $(e).css("visibility", "hidden"); - } - else{ - $(e).css({ - "top": freezenTop + scrollTop, - "height": $canvas_height - size, - "visibility": "visible" - }); - $(e).find("canvas").css("top", - size); - } - } - else{ - $(e).css({ - "top": x.top - height_diff + scrollTop, - "height": $canvas_height, - "visibility": "visible" - }); - $(e).find("canvas").css("top", 0); - } - }) - } - else if(luckysheet.freezen.freezenverticaldata != null){ - var freezenLeft = luckysheet.freezen.freezenverticaldata[0] - luckysheet.freezen.freezenverticaldata[2]; - - $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ - var x = $(e).position(); - var width = $(e).width(); - - var $canvas_width = $(e).find("canvas").width(); - - var width_diff = $canvas_width - width; - - if((x.left - width_diff) < freezenLeft){ - var size = freezenLeft - (x.left - width_diff); - - if(size > ($canvas_width + 20 + 2)){ - $(e).css("visibility", "hidden"); - } - else{ - $(e).css({ - "left": freezenLeft + scrollLeft, - "width": $canvas_width - size, - "visibility": "visible" - }); - $(e).find("canvas").css("left", - size); - } - } - else{ - $(e).css({ - "left": x.left - width_diff + scrollLeft, - "width": $canvas_width, - "visibility": "visible" - }); - $(e).find("canvas").css("left", 0); - } - }) - } - else{ - $("#luckysheet-cell-main .luckysheet-data-visualization-chart").each(function(i, e){ - var x = $(e).position(); - var width = $(e).width(); - var height = $(e).height(); - - var $canvas_width = $(e).find("canvas").width(); - var $canvas_height = $(e).find("canvas").height(); - - var height_diff = $canvas_height - height; - var width_diff = $canvas_width - width; - - $(e).css({ - "top": x.top - height_diff + scrollTop, - "height": $canvas_height, - "left": x.left - width_diff + scrollLeft, - "width": $canvas_width, - "visibility": "visible" - }); - - $(e).find("canvas").css({ - "top": 0, - "left": 0 - }); - }) - } - }, - scrollAdaptOfpostil: function(){ - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - - if(luckysheet.freezen.freezenhorizontaldata != null && luckysheet.freezen.freezenverticaldata != null){ - var freezenTop = luckysheet.freezen.freezenhorizontaldata[0]; - var freezenLeft = luckysheet.freezen.freezenverticaldata[0]; - - var offTop = scrollTop - luckysheet.freezen.freezenhorizontaldata[2]; - var offLeft = scrollLeft - luckysheet.freezen.freezenverticaldata[2]; - - $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ - var id = $(e).attr("id"); - - var r = id.split("luckysheet-postil-show_")[1].split("_")[0]; - var c = id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var postil = luckysheet.flowdata[r][c].ps; - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r, c); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var postil_left = postil["left"] == null ? toX + 18 : postil["left"]; - var postil_top = postil["top"] == null ? toY - 18 : postil["top"]; - var postil_width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var postil_height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - - if(postil_top < 0){ - postil_top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(postil_left, postil_top, toX, toY); - var show = true; - var show2 = true; - - if(postil_top + postil_height < freezenTop){ - $(e).show().find(".luckysheet-postil-show-main").css("top", postil_top + offTop); - $(e).show().find(".arrowCanvas").css("top", size[1] + offTop); - } - else{ - if(postil_top < freezenTop + offTop){ - if(postil_top + postil_height <= freezenTop + offTop){ - show = false; - } - else{ - $(e).show().find(".luckysheet-postil-show-main").css({ "top": freezenTop + offTop, "height": postil_height - (freezenTop + offTop - postil_top) }); - $(e).show().find(".formulaInputFocus").css("margin-top", -(freezenTop + offTop - postil_top)); - $(e).show().find(".arrowCanvas").hide(); - - show2 = false; - } - } - else{ - $(e).show().find(".luckysheet-postil-show-main").css({ - "top": postil_top, - "height": postil_height - }); - $(e).show().find(".formulaInputFocus").css("margin-top", 0); - $(e).show().find(".arrowCanvas").css("top", size[1]); - // luckysheet.postil.buildPs(r, c, postil); - } - } - - if(postil_left + postil_width < freezenLeft){ - $(e).show().find(".luckysheet-postil-show-main").css("left", postil_left + offLeft); - $(e).show().find(".arrowCanvas").css("left", size[0] + offLeft); - } - else{ - if(postil_left < freezenLeft + offLeft){ - if(postil_left + postil_width <= freezenLeft + offLeft){ - show = false; - } - else{ - $(e).show().find(".luckysheet-postil-show-main").css({ "left": freezenLeft + offLeft, "width": postil_width - (freezenLeft + offLeft - postil_left) }); - $(e).show().find(".formulaInputFocus").css("margin-left", -(freezenLeft + offLeft - postil_left)); - $(e).show().find(".arrowCanvas").hide(); - - show2 = false; - } - } - else{ - $(e).show().find(".luckysheet-postil-show-main").css({ - "left": postil_left, - "width": postil_width - }); - $(e).show().find(".formulaInputFocus").css("margin-left", 0); - $(e).show().find(".arrowCanvas").css("left", size[0]); - // luckysheet.postil.buildPs(r, c, postil); - } - } - - if(!show){ - $(e).hide(); - } - - if(show && show2){ - $(e).show().find(".arrowCanvas").show(); - } - }) - } - else if(luckysheet.freezen.freezenhorizontaldata != null){ - var freezenTop = luckysheet.freezen.freezenhorizontaldata[0]; - var offTop = scrollTop - luckysheet.freezen.freezenhorizontaldata[2]; - - $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ - var id = $(e).attr("id"); - - var r = id.split("luckysheet-postil-show_")[1].split("_")[0]; - var c = id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var postil = luckysheet.flowdata[r][c].ps; - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r, c); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var postil_left = postil["left"] == null ? toX + 18 : postil["left"]; - var postil_top = postil["top"] == null ? toY - 18 : postil["top"]; - var postil_width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var postil_height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - - if(postil_top < 0){ - postil_top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(postil_left, postil_top, toX, toY); - - if(postil_top + postil_height < freezenTop){ - $(e).show().find(".luckysheet-postil-show-main").css("top", postil_top + offTop); - $(e).show().find(".arrowCanvas").css("top", size[1] + offTop); - } - else{ - if(postil_top < freezenTop + offTop){ - if(postil_top + postil_height <= freezenTop + offTop){ - $(e).hide(); - } - else{ - $(e).show().find(".luckysheet-postil-show-main").css({ "top": freezenTop + offTop, "height": postil_height - (freezenTop + offTop - postil_top) }); - $(e).show().find(".formulaInputFocus").css("margin-top", -(freezenTop + offTop - postil_top)); - $(e).show().find(".arrowCanvas").hide(); - } - } - else{ - luckysheet.postil.buildPs(r, c, postil); - } - } - }) - } - else if(luckysheet.freezen.freezenverticaldata != null){ - var freezenLeft = luckysheet.freezen.freezenverticaldata[0]; - var offLeft = scrollLeft - luckysheet.freezen.freezenverticaldata[2]; - - $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ - var id = $(e).attr("id"); - - var r = id.split("luckysheet-postil-show_")[1].split("_")[0]; - var c = id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var postil = luckysheet.flowdata[r][c].ps; - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r, c); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var postil_left = postil["left"] == null ? toX + 18 : postil["left"]; - var postil_top = postil["top"] == null ? toY - 18 : postil["top"]; - var postil_width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var postil_height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - - if(postil_top < 0){ - postil_top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(postil_left, postil_top, toX, toY); - - if(postil_left + postil_width < freezenLeft){ - $(e).show().find(".luckysheet-postil-show-main").css("left", postil_left + offLeft); - $(e).show().find(".arrowCanvas").css("left", size[0] + offLeft); - } - else{ - if(postil_left < freezenLeft + offLeft){ - if(postil_left + postil_width <= freezenLeft + offLeft){ - $(e).hide(); - } - else{ - $(e).show().find(".luckysheet-postil-show-main").css({ "left": freezenLeft + offLeft, "width": postil_width - (freezenLeft + offLeft - postil_left) }); - $(e).show().find(".formulaInputFocus").css("margin-left", -(freezenLeft + offLeft - postil_left)); - $(e).show().find(".arrowCanvas").hide(); - } - } - else{ - luckysheet.postil.buildPs(r, c, postil); - } - } - }) - } - else{ - $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ - var id = $(e).attr("id"); - - var r = id.split("luckysheet-postil-show_")[1].split("_")[0]; - var c = id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var postil = luckysheet.flowdata[r][c].ps; - - luckysheet.postil.buildPs(r, c, postil); - }) - } - }, - scrollAdaptOfdpicon: function(){ - var copy_r = luckysheet.dropCell.copyRange["row"][1], - copy_c = luckysheet.dropCell.copyRange["column"][1]; - - var apply_r = luckysheet.dropCell.applyRange["row"][1], - apply_c = luckysheet.dropCell.applyRange["column"][1]; - - if(apply_r >= copy_r && apply_c >= copy_c){ - var row_index = apply_r; - var col_index = apply_c; - } - else{ - var row_index = copy_r; - var col_index = copy_c; - } - - if(luckysheet.freezen.freezenhorizontaldata != null && luckysheet.freezen.freezenverticaldata != null){ - var freezen_rowindex = luckysheet.freezen.freezenhorizontaldata[1]; - var offsetRow = luckysheet_searcharray(luckysheet.freezen.freezenhorizontaldata[3], $("#luckysheet-cell-main").scrollTop() - luckysheet.freezen.freezenhorizontaldata[2]); - var freezen_colindex = luckysheet.freezen.freezenverticaldata[1]; - var offsetColumn = luckysheet_searcharray(luckysheet.freezen.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - luckysheet.freezen.freezenverticaldata[2]); - - if(row_index >= freezen_rowindex && col_index >= freezen_colindex){ - if(row_index < (freezen_rowindex + offsetRow - 1) || col_index < (freezen_colindex + offsetColumn - 1)){ - $("#luckysheet-dropCell-icon").hide(); - } - else{ - $("#luckysheet-dropCell-icon").show(); - } - } - else if(row_index >= freezen_rowindex){ - if(row_index < (freezen_rowindex + offsetRow - 1)){ - $("#luckysheet-dropCell-icon").hide(); - } - else{ - var col = luckysheet.colLocationByIndex(col_index + offsetColumn)[1]; - - $("#luckysheet-dropCell-icon").show().css("left", col); - } - } - else if(col_index >= freezen_colindex){ - if(col_index < (freezen_colindex + offsetColumn - 1)){ - $("#luckysheet-dropCell-icon").hide(); - } - else{ - var row = luckysheet.rowLocationByIndex(row_index + offsetRow)[1]; - - $("#luckysheet-dropCell-icon").show().css("top", row); - } - } - else{ - var row = luckysheet.rowLocationByIndex(row_index + offsetRow)[1], - col = luckysheet.colLocationByIndex(col_index + offsetColumn)[1]; - - $("#luckysheet-dropCell-icon").show().css({ "left": col, "top": row }); - } - } - else if(luckysheet.freezen.freezenhorizontaldata != null){ - var freezen_rowindex = luckysheet.freezen.freezenhorizontaldata[1]; - var offsetRow = luckysheet_searcharray(luckysheet.freezen.freezenhorizontaldata[3], $("#luckysheet-cell-main").scrollTop() - luckysheet.freezen.freezenhorizontaldata[2]); - - if(row_index >= freezen_rowindex){ - if(row_index < (freezen_rowindex + offsetRow - 1)){ - $("#luckysheet-dropCell-icon").hide(); - } - else{ - $("#luckysheet-dropCell-icon").show(); - } - } - else{ - var row = luckysheet.rowLocationByIndex(row_index + offsetRow)[1]; - - $("#luckysheet-dropCell-icon").show().css("top", row); - } - } - else if(luckysheet.freezen.freezenverticaldata != null){ - var freezen_colindex = luckysheet.freezen.freezenverticaldata[1]; - var offsetColumn = luckysheet_searcharray(luckysheet.freezen.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - luckysheet.freezen.freezenverticaldata[2]); - - if(col_index >= freezen_colindex){ - if(col_index < (freezen_colindex + offsetColumn - 1)){ - $("#luckysheet-dropCell-icon").hide(); - } - else{ - $("#luckysheet-dropCell-icon").show(); - } - } - else{ - var col = luckysheet.colLocationByIndex(col_index + offsetColumn)[1]; - - $("#luckysheet-dropCell-icon").show().css("left", col); - } - } - else{ - var row = luckysheet.rowLocationByIndex(row_index)[1], - col = luckysheet.colLocationByIndex(col_index)[1]; - - $("#luckysheet-dropCell-icon").show().css({ "left": col, "top": row }); - } - }, - scrollAdaptOffilteroptions: function(){ - if(luckysheet.freezen.freezenhorizontaldata != null && luckysheet.freezen.freezenverticaldata != null){ - var freezen_rowindex = luckysheet.freezen.freezenhorizontaldata[1]; - var freezen_top = luckysheet.freezen.freezenhorizontaldata[0] + $("#luckysheet-cell-main").scrollTop(); - - var freezen_colindex = luckysheet.freezen.freezenverticaldata[1]; - var offsetColumn = luckysheet_searcharray(luckysheet.freezen.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - luckysheet.freezen.freezenverticaldata[2]); - - $("#luckysheet-filter-options-sheet"+ luckysheet.currentSheetIndex +" .luckysheet-filter-options").each(function(i, e){ - var row_index = $(e).data("str"); - var top = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - - var col_index = $(e).data("cindex"); - - if(row_index >= freezen_rowindex && col_index >= freezen_colindex){ - if(top < freezen_top || col_index < (freezen_colindex + offsetColumn)){ - $(e).hide(); - } - else{ - $(e).show(); - } - } - else if(row_index >= freezen_rowindex){ - if(top < freezen_top){ - $(e).hide(); - } - else{ - var left = visibledatacolumn[col_index + offsetColumn] - 20; - - $(e).show().css("left", left); - } - } - else if(col_index >= freezen_colindex){ - if(col_index < (freezen_colindex + offsetColumn)){ - $(e).hide(); - } - else{ - $(e).show().css("top", top + $("#luckysheet-cell-main").scrollTop()); - } - } - else{ - var left = visibledatacolumn[col_index + offsetColumn] - 20; - - $(e).show().css({ "left": left, "top": top + $("#luckysheet-cell-main").scrollTop() }); - } - }); - } - else if(luckysheet.freezen.freezenhorizontaldata != null){ - var freezen_rowindex = luckysheet.freezen.freezenhorizontaldata[1]; - var freezen_top = luckysheet.freezen.freezenhorizontaldata[0] + $("#luckysheet-cell-main").scrollTop(); - - $("#luckysheet-filter-options-sheet"+ luckysheet.currentSheetIndex +" .luckysheet-filter-options").each(function(i, e){ - var row_index = $(e).data("str"); - var top = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - - if(row_index >= freezen_rowindex){ - if(top < freezen_top){ - $(e).hide(); - } - else{ - $(e).show(); - } - } - else{ - $(e).show().css("top", top + $("#luckysheet-cell-main").scrollTop()); - } - }); - } - else if(luckysheet.freezen.freezenverticaldata != null){ - var freezen_colindex = luckysheet.freezen.freezenverticaldata[1]; - var offsetColumn = luckysheet_searcharray(luckysheet.freezen.freezenverticaldata[3], $("#luckysheet-cell-main").scrollLeft() - luckysheet.freezen.freezenverticaldata[2]); - - $("#luckysheet-filter-options-sheet"+ luckysheet.currentSheetIndex +" .luckysheet-filter-options").each(function(i, e){ - var col_index = $(e).data("cindex"); - - if(col_index >= freezen_colindex){ - if(col_index < (freezen_colindex + offsetColumn)){ - $(e).hide(); - } - else{ - $(e).show(); - } - } - else{ - var left = visibledatacolumn[col_index + offsetColumn] - 20; - - $(e).show().css("left", left); - } - }); - } - else{ - $("#luckysheet-filter-options-sheet"+ luckysheet.currentSheetIndex).empty(); - luckysheet.createFilterOptions(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].filter_select); - } - } - } - - //条件格式 - luckysheet.conditionformat = { - fileClone: [], - editorRule: null, //{"sheetIndex": sheetIndex,"itemIndex": itemIndex,"data": luckysheetfile[sheetIndex].luckysheet_conditionformat_save[itemIndex]} - ruleTypeHtml: '
基于各自值设置所有单元格的格式
只为包含以下内容的单元格设置格式
仅对排名靠前或靠后的数值设置格式
仅对高于或低于平均值的数值设置格式
仅对唯一值或重复值设置格式
', - textCellColorHtml: '
', - selectRange: [], - selectStatus: false, - dataBarList: [ - { "format": ["#638ec6", "#ffffff"] }, //蓝-白渐变 数据条 - { "format": ["#63c384", "#ffffff"] }, //绿-白渐变 数据条 - { "format": ["#ff555a", "#ffffff"] }, //红-白渐变 数据条 - { "format": ["#ffb628", "#ffffff"] }, //橙-白渐变 数据条 - { "format": ["#008aef", "#ffffff"] }, //浅蓝-白渐变 数据条 - { "format": ["#d6007b", "#ffffff"] }, //紫-白渐变 数据条 - - { "format": ["#638ec6"] }, //蓝色 数据条 - { "format": ["#63c384"] }, //绿色 数据条 - { "format": ["#ff555a"] }, //红色 数据条 - { "format": ["#ffb628"] }, //橙色 数据条 - { "format": ["#008aef"] }, //浅蓝色 数据条 - { "format": ["#d6007b"] } //紫色 数据条 - ], - colorGradationList: [ - { "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)", "rgb(248, 105, 107)"] }, //绿-黄-红色阶 - { "format": ["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] }, //红-黄-绿色阶 - - { "format": ["rgb(99, 190, 123)", "rgb(252, 252, 255)", "rgb(248, 105, 107)"] }, //绿-白-红色阶 - { "format": ["rgb(248, 105, 107)", "rgb(252, 252, 255)", "rgb(99, 190, 123)"] }, //红-白-绿色阶 - - { "format": ["rgb(90, 138, 198)", "rgb(252, 252, 255)", "rgb(248, 105, 107)"] }, //蓝-白-红色阶 - { "format": ["rgb(248, 105, 107)", "rgb(252, 252, 255)", "rgb(90, 138, 198)"] }, //红-白-蓝色阶 - - { "format": ["rgb(252, 252, 255)", "rgb(248, 105, 107)"] }, //白-红色阶 - { "format": ["rgb(248, 105, 107)", "rgb(252, 252, 255)"] }, //红-白色阶 - - { "format": ["rgb(99, 190, 123)", "rgb(252, 252, 255)"] }, //绿-白色阶 - { "format": ["rgb(252, 252, 255)", "rgb(99, 190, 123)"] }, //白-绿色阶 - - { "format": ["rgb(99, 190, 123)", "rgb(255, 235, 132)"] }, //绿-黄色阶 - { "format": ["rgb(255, 235, 132)", "rgb(99, 190, 123)"] } //黄-绿色阶 - ], - init: function(){ - // 管理规则 - $(document).off("change.CFchooseSheet").on("change.CFchooseSheet", "#luckysheet-administerRule-dialog .chooseSheet", function(){ - var index = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); - luckysheet.conditionformat.getConditionRuleList(index); - }); - $(document).off("click.CFadministerRuleItem").on("click.CFadministerRuleItem", "#luckysheet-administerRule-dialog .ruleList .listBox .item", function(){ - $(this).addClass("on").siblings().removeClass("on"); - }); - - $(document).off("click.CFadministerRuleConfirm").on("click.CFadministerRuleConfirm", "#luckysheet-administerRule-dialog-confirm", function(){ - //保存之前的规则 - var fileH = $.extend(true, [], luckysheet.getluckysheetfile()); - var historyRules = luckysheet.conditionformat.getHistoryRules(fileH); - - //保存当前的规则 - var fileClone = $.extend(true, [], luckysheet.conditionformat.fileClone); - for(var c = 0; c < fileClone.length; c++){ - var sheetIndex = fileClone[c]["index"]; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = fileClone[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"]; - } - - var fileC = $.extend(true, [], luckysheet.getluckysheetfile()); - var currentRules = luckysheet.conditionformat.getCurrentRules(fileC); - - //刷新一次表格 - luckysheet.conditionformat.ref(historyRules, currentRules); - - //隐藏一些dom - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-administerRule-dialog").hide(); - - //发送给后台 - if(luckysheet.server.allowUpdate){ - var files = $.extend(true, [], luckysheet.getluckysheetfile()); - for(var i = 0; i < files.length; i++){ - luckysheet.server.saveParam("all", files[i]["index"], files[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" }); - } - } - }); - - $(document).off("click.CFadministerRuleClose").on("click.CFadministerRuleClose", "#luckysheet-administerRule-dialog-close", function(){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-administerRule-dialog").hide(); - luckysheet.conditionformat.fileClone = []; - }); - $(document).off("click.CFadministerRuleFa").on("click.CFadministerRuleFa", "#luckysheet-administerRule-dialog .item .fa-table", function(){ - $(this).parents("#luckysheet-administerRule-dialog").hide(); - - var sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet select option:selected").val(); - if(sheetIndex != luckysheet.currentSheetIndex){ - luckysheet.sheetmanage.changeSheetExec(sheetIndex); - } - - var txt = $(this).siblings("input").val().trim(); - var dataItem = $(this).parents(".item").attr("data-item"); - - luckysheet.conditionformat.multiRangeDialog(dataItem, txt); - - luckysheet.conditionformat.selectRange = []; - - var range = luckysheet.conditionformat.getRangeByTxt(txt); - if(range.length > 0){ - for(var s = 0; s < range.length; s++){ - var r1 = range[s].row[0], r2 = range[s].row[1]; - var c1 = range[s].column[0], c2 = range[s].column[1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.conditionformat.selectRange.push({ - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }); - } - } - - luckysheet.selectionCopyShow(luckysheet.conditionformat.selectRange); - }); - $(document).off("click.CFmultiRangeConfirm").on("click.CFmultiRangeConfirm", "#luckysheet-multiRange-dialog-confirm", function(){ - $(this).parents("#luckysheet-multiRange-dialog").hide(); - - var dataItem = $(this).attr("data-item"); - var v = $(this).parents("#luckysheet-multiRange-dialog").find("input").val(); - $("#luckysheet-administerRule-dialog .item[data-item="+dataItem+"] input").val(v); - - var sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); - luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"][dataItem].cellrange = luckysheet.conditionformat.getRangeByTxt(v); - - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-administerRule-dialog").show(); - - var range = []; - luckysheet.selectionCopyShow(range); - }); - $(document).off("click.CFmultiRangeClose").on("click.CFmultiRangeClose", "#luckysheet-multiRange-dialog-close", function(){ - $(this).parents("#luckysheet-multiRange-dialog").hide(); - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-administerRule-dialog").show(); - - $("#luckysheet-formula-functionrange-select").hide(); - $("#luckysheet-row-count-show").hide(); - $("#luckysheet-column-count-show").hide(); - - var range = []; - luckysheet.selectionCopyShow(range); - }); - - // 新建规则 - $(document).off("click.CFnewConditionRule").on("click.CFnewConditionRule", "#newConditionRule", function(){ - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择应用范围"); - } - else{ - luckysheet.tooltip.info("请选择应用范围", ""); - } - return; - } - - luckysheet.conditionformat.newConditionRuleDialog(1); - }); - $(document).off("click.CFnewConditionRuleConfirm").on("click.CFnewConditionRuleConfirm", "#luckysheet-newConditionRule-dialog-confirm", function(){ - var index = $("#luckysheet-newConditionRule-dialog .ruleTypeItem.on").index(); - var type1 = $("#luckysheet-newConditionRule-dialog #type1 option:selected").val(); - var type2 = $("#luckysheet-newConditionRule-dialog ." + type1 + "Box #type2 option:selected").val(); - - var format; - if(index == 0){ - if(type1 == "dataBar"){ //数据条 - var color = $(this).parents("#luckysheet-newConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString(); - - if(type2 == "gradient"){ //渐变填充 - format = [color, "#ffffff"]; - } - else if(type2 == "solid"){ //实心填充 - format = [color]; - } - - var rule = { - "type": "dataBar", - "cellrange": $.extend(true, [], luckysheet_select_save), - "format": format - }; - } - else if(type1 == "colorGradation"){ //色阶 - var maxcolor = $(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); - var midcolor = $(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); - var mincolor = $(this).parents("#luckysheet-newConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); - - if(type2 == "threeColor"){ //三色 - format = [maxcolor, midcolor, mincolor]; - } - else if(type2 == "twoColor"){ //双色 - format = [maxcolor, mincolor]; - } - - var rule = { - "type": "colorGradation", - "cellrange": $.extend(true, [], luckysheet_select_save), - "format": format - }; - } - else if(type1 == "icons"){ //图标集 - var len = $(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-len"); - var leftMin = $(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"); - var top = $(this).parents("#luckysheet-newConditionRule-dialog").find(".iconsBox .model").attr("data-top"); - - format = { - "len": len, - "leftMin": leftMin, - "top": top - }; - - var rule = { - "type": "icons", - "cellrange": $.extend(true, [], luckysheet_select_save), - "format": format - }; - } - } - else{ - var conditionName = "", conditionRange = [], conditionValue = []; - - if(index == 1){ - if(type1 == "number"){ //单元格值 - conditionName = type2; - - if(type2 == "betweenness"){ - var v1 = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); - var v2 = $("#luckysheet-newConditionRule-dialog #conditionVal2 input").val().trim(); - - //条件值是否是选区 - var rangeArr1 = luckysheet.conditionformat.getRangeByTxt(v1); - if(rangeArr1.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr1.length == 1){ - var r1 = rangeArr1[0].row[0], r2 = rangeArr1[0].row[1]; - var c1 = rangeArr1[0].column[0], c2 = rangeArr1[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v1 = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr1[0].row, "column": rangeArr1[0].column }); - conditionValue.push(v1); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr1.length == 0){ - if(isNaN(v1) || v1 == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v1); - } - } - - var rangeArr2 = luckysheet.conditionformat.getRangeByTxt(v2); - if(rangeArr2.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr2.length == 1){ - var r1 = rangeArr2[0].row[0], r2 = rangeArr2[0].row[1]; - var c1 = rangeArr2[0].column[0], c2 = rangeArr2[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v2 = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr2[0].row, "column": rangeArr2[0].column }); - conditionValue.push(v2); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr2.length == 0){ - if(isNaN(v2) || v2 == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v2); - } - } - } - else{ - //条件值 - var v = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); - - //条件值是否是选区 - var rangeArr = luckysheet.conditionformat.getRangeByTxt(v); - if(rangeArr.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr.length == 1){ - var r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; - var c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); - conditionValue.push(v); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr.length == 0){ - if(isNaN(v) || v == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v); - } - } - } - } - else if(type1 == "text"){ //特定文本 - conditionName = "textContains"; - - //条件值 - var v = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); - - //条件值是否是选区 - var rangeArr = luckysheet.conditionformat.getRangeByTxt(v); - if(rangeArr.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr.length == 1){ - var r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; - var c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); - conditionValue.push(v); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr.length == 0){ - if(isNaN(v) || v == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v); - } - } - } - else if(type1 == "date"){ //发生日期 - conditionName = "occurrenceDate"; - - //条件值 - var v = $("#luckysheet-newConditionRule-dialog #daterange-btn").val(); - - if(v == "" || v == null){ - luckysheet.conditionformat.infoDialog("请选择日期", ""); - return; - } - - conditionValue.push(v); - } - } - else if(index == 2){ //排名靠前靠后 - //条件名称 - if(type1 == "top"){ - if($("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")){ - var conditionName = "top10%"; - } - else{ - var conditionName = "top10"; - } - } - else if(type1 == "last"){ - if($("#luckysheet-newConditionRule-dialog #isPercent").is(":selected")){ - var conditionName = "last10%"; - } - else{ - var conditionName = "last10"; - } - } - - //条件值 - var v = $("#luckysheet-newConditionRule-dialog #conditionVal input").val().trim(); - - if(parseInt(v) != v || parseInt(v) < 1 || parseInt(v) > 1000){ - luckysheet.conditionformat.infoDialog("请输入一个介于 1 和 1000 之间的整数", ""); - return; - } - - conditionValue.push(v); - } - else if(index == 3){ //平均值 - if(type1 == "AboveAverage"){ - conditionName = "AboveAverage"; - conditionValue.push("AboveAverage"); - } - else if(type1 == "SubAverage"){ - conditionName = "SubAverage"; - conditionValue.push("SubAverage"); - } - } - else if(index == 4){ //重复值 - conditionName = "duplicateValue"; - conditionValue.push(type1); - } - - //格式颜色 - if($("#luckysheet-newConditionRule-dialog #checkTextColor").is(":checked")){ - var textcolor = $("#luckysheet-newConditionRule-dialog #textcolorshow").spectrum("get").toHexString(); - } - else{ - var textcolor = null; - } - - if($("#luckysheet-newConditionRule-dialog #checkCellColor").is(":checked")){ - var cellcolor = $("#luckysheet-newConditionRule-dialog #cellcolorshow").spectrum("get").toHexString(); - } - else{ - var cellcolor = null; - } - - format = { - "textColor": textcolor, - "cellColor": cellcolor - }; - - var rule = { - "type": "default", - "cellrange": $.extend(true, [], luckysheet_select_save), - "format": format, - "conditionName": conditionName, - "conditionRange": conditionRange, - "conditionValue": conditionValue - }; - } - - $("#luckysheet-newConditionRule-dialog").hide(); - - //新建规则的入口 - var source = $(this).attr("data-source"); - - if(source == 0){ - $("#luckysheet-modal-dialog-mask").hide(); - - //保存之前的规则 - var fileH = $.extend(true, [], luckysheet.getluckysheetfile()); - var historyRules = luckysheet.conditionformat.getHistoryRules(fileH); - - //保存当前的规则 - var ruleArr = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] == undefined ? [] : luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]; - ruleArr.push(rule); - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] = ruleArr; - - var fileC = $.extend(true, [], luckysheet.getluckysheetfile()); - var currentRules = luckysheet.conditionformat.getCurrentRules(fileC); - - //刷新一次表格 - luckysheet.conditionformat.ref(historyRules, currentRules); - - //发送给后台 - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, ruleArr, { "k": "luckysheet_conditionformat_save" }); - } - } - else if(source == 1){ - //临时存储新规则 - var ruleArr = !!luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] ? luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] : []; - ruleArr.push(rule); - luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] = ruleArr; - - //新建规则隐藏,管理规则显示 - luckysheet.conditionformat.administerRuleDialog(); - } - }); - $(document).off("click.CFnewConditionRuleClose").on("click.CFnewConditionRuleClose", "#luckysheet-newConditionRule-dialog-close", function(){ - //新建规则的入口 - var source = $(this).attr("data-source"); - if(source == 0){ - $("#luckysheet-modal-dialog-mask").hide(); - } - if(source == 1){ - $("#luckysheet-administerRule-dialog").show(); - } - - //新建规则隐藏 - $("#luckysheet-newConditionRule-dialog").hide(); - - //隐藏虚线框 - $("#luckysheet-formula-functionrange-select").hide(); - $("#luckysheet-row-count-show").hide(); - $("#luckysheet-column-count-show").hide(); - }); - - // 编辑规则 - $(document).off("click.CFeditorConditionRule").on("click.CFeditorConditionRule", "#editorConditionRule", function(){ - var sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); - var itemIndex = $("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item"); - var rule = { - "sheetIndex": sheetIndex, - "itemIndex": itemIndex, - "data": luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"][itemIndex] - }; - luckysheet.conditionformat.editorRule = rule; - luckysheet.conditionformat.editorConditionRuleDialog(); - }); - $(document).off("click.CFeditorConditionRuleConfirm").on("click.CFeditorConditionRuleConfirm", "#luckysheet-editorConditionRule-dialog-confirm",function(){ - var index = $("#luckysheet-editorConditionRule-dialog .ruleTypeItem.on").index(); - var type1 = $("#luckysheet-editorConditionRule-dialog #type1 option:selected").val(); - var type2 = $("#luckysheet-editorConditionRule-dialog ." + type1 + "Box #type2 option:selected").val(); - - var cellrange = luckysheet.conditionformat.editorRule["data"].cellrange; - - var format; - if(index == 0){ - if(type1 == "dataBar"){ //数据条 - var color = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".dataBarBox .luckysheet-conditionformat-config-color").spectrum("get").toHexString(); - - if(type2 == "gradient"){ //渐变填充 - format = [color, "#ffffff"]; - } - else if(type2 == "solid"){ //实心填充 - format = [color]; - } - - var rule = { - "type": "dataBar", - "cellrange": cellrange, - "format": format - }; - } - else if(type1 == "colorGradation"){ //色阶 - var maxcolor = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); - var midcolor = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); - var mincolor = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("get").toRgbString(); - - if(type2 == "threeColor"){ //三色 - format = [maxcolor, midcolor, mincolor]; - } - else if(type2 == "twoColor"){ //双色 - format = [maxcolor, mincolor]; - } - - var rule = { - "type": "colorGradation", - "cellrange": cellrange, - "format": format - }; - } - else if(type1 == "icons"){ //图标集 - var len = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-len"); - var leftMin = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-leftmin"); - var top = $(this).parents("#luckysheet-editorConditionRule-dialog").find(".iconsBox .model").attr("data-top"); - - format = { - "len": len, - "leftMin": leftMin, - "top": top - }; - - var rule = { - "type": "icons", - "cellrange": cellrange, - "format": format - }; - } - } - else{ - var conditionName = "", conditionRange = [], conditionValue = []; - - if(index == 1){ - if(type1 == "number"){ //单元格值 - conditionName = type2; - - if(type2 == "betweenness"){ - var v1 = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); - var v2 = $("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val().trim(); - - //条件值是否是选区 - var rangeArr1 = luckysheet.conditionformat.getRangeByTxt(v1); - if(rangeArr1.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr1.length == 1){ - var r1 = rangeArr1[0].row[0], r2 = rangeArr1[0].row[1]; - var c1 = rangeArr1[0].column[0], c2 = rangeArr1[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v1 = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr1[0].row, "column": rangeArr1[0].column }); - conditionValue.push(v1); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr1.length == 0){ - if(isNaN(v1) || v1 == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v1); - } - } - - var rangeArr2 = luckysheet.conditionformat.getRangeByTxt(v2); - if(rangeArr2.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr2.length == 1){ - var r1 = rangeArr2[0].row[0], r2 = rangeArr2[0].row[1]; - var c1 = rangeArr2[0].column[0], c2 = rangeArr2[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v2 = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr2[0].row, "column": rangeArr2[0].column }); - conditionValue.push(v2); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr2.length == 0){ - if(isNaN(v2) || v2 == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v2); - } - } - } - else{ - //条件值 - var v = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); - - //条件值是否是选区 - var rangeArr = luckysheet.conditionformat.getRangeByTxt(v); - if(rangeArr.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr.length == 1){ - var r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; - var c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); - conditionValue.push(v); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr.length == 0){ - if(isNaN(v) || v == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v); - } - } - } - } - else if(type1 == "text"){ //特定文本 - conditionName = "textContains"; - - //条件值 - var v = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); - - //条件值是否是选区 - var rangeArr = luckysheet.conditionformat.getRangeByTxt(v); - if(rangeArr.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr.length == 1){ - var r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; - var c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); - conditionValue.push(v); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr.length == 0){ - if(isNaN(v) || v == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v); - } - } - } - else if(type1 == "date"){ //发生日期 - conditionName = "occurrenceDate"; - - //条件值 - var v = $("#luckysheet-editorConditionRule-dialog #daterange-btn").val(); - - if(v == "" || v == null){ - luckysheet.conditionformat.infoDialog("请选择日期", ""); - return; - } - - conditionValue.push(v); - } - } - else if(index == 2){ //排名靠前靠后 - //条件名称 - if(type1 == "top"){ - if($("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")){ - var conditionName = "top10%"; - } - else{ - var conditionName = "top10"; - } - } - else if(type1 == "last"){ - if($("#luckysheet-editorConditionRule-dialog #isPercent").is(":selected")){ - var conditionName = "last10%"; - } - else{ - var conditionName = "last10"; - } - } - - //条件值 - var v = $("#luckysheet-editorConditionRule-dialog #conditionVal input").val().trim(); - - if(parseInt(v) != v || parseInt(v) < 1 || parseInt(v) > 1000){ - luckysheet.conditionformat.infoDialog("请输入一个介于 1 和 1000 之间的整数", ""); - return; - } - - conditionValue.push(v); - } - else if(index == 3){ //平均值 - if(type1 == "AboveAverage"){ - conditionName = "AboveAverage"; - conditionValue.push("AboveAverage"); - } - else if(type1 == "SubAverage"){ - conditionName = "SubAverage"; - conditionValue.push("SubAverage"); - } - } - else if(index == 4){ //重复值 - conditionName = "duplicateValue"; - conditionValue.push(type1); - } - - //格式颜色 - if($("#luckysheet-editorConditionRule-dialog #checkTextColor").is(":checked")){ - var textcolor = $("#luckysheet-editorConditionRule-dialog #textcolorshow").spectrum("get").toHexString(); - } - else{ - var textcolor = null; - } - - if($("#luckysheet-editorConditionRule-dialog #checkCellColor").is(":checked")){ - var cellcolor = $("#luckysheet-editorConditionRule-dialog #cellcolorshow").spectrum("get").toHexString(); - } - else{ - var cellcolor = null; - } - - format = { - "textColor": textcolor, - "cellColor": cellcolor - }; - - var rule = { - "type": "default", - "cellrange": cellrange, - "format": format, - "conditionName": conditionName, - "conditionRange": conditionRange, - "conditionValue": conditionValue - }; - } - - //修改编辑的规则 - var sheetIndex = luckysheet.conditionformat.editorRule["sheetIndex"]; - var itemIndex = luckysheet.conditionformat.editorRule["itemIndex"]; - luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"][itemIndex] = rule; - - //编辑规则隐藏,管理规则显示 - $("#luckysheet-editorConditionRule-dialog").hide(); - luckysheet.conditionformat.administerRuleDialog(); - }); - $(document).off("click.CFeditorConditionRuleClose").on("click.CFeditorConditionRuleClose", "#luckysheet-editorConditionRule-dialog-close",function(){ - //编辑规则隐藏,管理规则显示 - $("#luckysheet-editorConditionRule-dialog").hide(); - $("#luckysheet-administerRule-dialog").show(); - //隐藏虚线框 - $("#luckysheet-formula-functionrange-select").hide(); - $("#luckysheet-row-count-show").hide(); - $("#luckysheet-column-count-show").hide(); - }); - - // 新建规则、编辑规则 类型切换 - $(document).off("click.CFnewEditorRuleItem").on("click.CFnewEditorRuleItem", ".luckysheet-newEditorRule-dialog .ruleTypeItem", function(){ - $(this).addClass("on").siblings().removeClass("on"); - - var index = $(this).index(); - $(this).parents(".luckysheet-newEditorRule-dialog").find(".ruleExplainBox").html(luckysheet.conditionformat.getRuleExplain(index)); - - luckysheet.conditionformat.colorSelectInit(); - }); - $(document).off("change.CFnewEditorRuleType1").on("change.CFnewEditorRuleType1", ".luckysheet-newEditorRule-dialog #type1", function(){ - var optionVal = $(this).find("option:selected").val(); - - if(optionVal == "dataBar" || optionVal == "colorGradation" || optionVal == "icons" || optionVal == "number" || optionVal == "text" || optionVal == "date"){ - $(this).parents(".luckysheet-newEditorRule-dialog").find("." + optionVal + "Box").show().siblings().hide(); - } - - if(optionVal == "date"){ - luckysheet.conditionformat.daterangeInit($(this).parents(".luckysheet-newEditorRule-dialog").attr("id")); - } - }); - $(document).off("change.CFnewEditorRuleType2").on("change.CFnewEditorRuleType2", ".luckysheet-newEditorRule-dialog #type2", function(){ - var type1 = $(this).parents(".luckysheet-newEditorRule-dialog").find("#type1 option:selected").val(); - - if(type1 == "colorGradation"){ - var type2 = $(this).find("option:selected").val(); - - if(type2 == "threeColor"){ - $(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").show(); - } - else{ - $(this).parents(".luckysheet-newEditorRule-dialog").find(".midVal").hide(); - } - } - else if(type1 == "number"){ - var type2 = $(this).find("option:selected").val(); - - if(type2 == "betweenness"){ - $(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").show(); - $(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").show(); - } - else{ - $(this).parents(".luckysheet-newEditorRule-dialog").find(".txt").hide(); - $(this).parents(".luckysheet-newEditorRule-dialog").find("#conditionVal2").hide(); - } - } - }); - $(document).off("click.CFiconsShowbox").on("click.CFiconsShowbox", ".luckysheet-newEditorRule-dialog .iconsBox .showbox", function(){ - $(this).parents(".iconsBox").find("ul").toggle(); - }); - $(document).off("click.CFiconsLi").on("click.CFiconsLi", ".luckysheet-newEditorRule-dialog .iconsBox li", function(){ - var len = $(this).find("div").attr("data-len"); - var leftmin = $(this).find("div").attr("data-leftmin"); - var top = $(this).find("div").attr("data-top"); - var title = $(this).find("div").attr("title"); - var position = $(this).find("div").css("background-position"); - - $(this).parents(".iconsBox").find(".showbox .model").css("background-position", position); - $(this).parents(".iconsBox").find(".showbox .model").attr("data-len", len); - $(this).parents(".iconsBox").find(".showbox .model").attr("data-leftmin", leftmin); - $(this).parents(".iconsBox").find(".showbox .model").attr("data-top", top); - $(this).parents(".iconsBox").find(".showbox .model").attr("title", title); - - $(this).parents("ul").hide(); - }); - - // 删除规则 - $(document).off("click.CFdeleteConditionRule").on("click.CFdeleteConditionRule", "#deleteConditionRule", function(){ - var sheetIndex = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); - var itemIndex = $("#luckysheet-administerRule-dialog .ruleList .listBox .item.on").attr("data-item"); - luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"].splice(itemIndex, 1); - luckysheet.conditionformat.administerRuleDialog(); - }); - - // 规则子菜单弹出层 点击确定修改样式 - $(document).off("click.CFdefault").on("click.CFdefault", "#luckysheet-conditionformat-dialog-confirm", function(){ - //条件名称 - var conditionName = $("#luckysheet-conditionformat-dialog .box").attr("data-itemvalue"); - - //条件单元格 - var conditionRange = []; - - //条件值 - var conditionValue = []; - if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "equal" || conditionName == "textContains"){ - var v = $("#luckysheet-conditionformat-dialog #conditionVal").val().trim(); - - //条件值是否是选区 - var rangeArr = luckysheet.conditionformat.getRangeByTxt(v); - if(rangeArr.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr.length == 1){ - var r1 = rangeArr[0].row[0], r2 = rangeArr[0].row[1]; - var c1 = rangeArr[0].column[0], c2 = rangeArr[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr[0].row, "column": rangeArr[0].column }); - conditionValue.push(v); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr.length == 0){ - if(isNaN(v) || v == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v); - } - } - } - else if(conditionName == "betweenness"){//介于 - var v1 = $("#luckysheet-conditionformat-dialog #conditionVal").val().trim(); - var v2 = $("#luckysheet-conditionformat-dialog #conditionVal2").val().trim(); - - //条件值是否是选区 - var rangeArr1 = luckysheet.conditionformat.getRangeByTxt(v1); - if(rangeArr1.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr1.length == 1){ - var r1 = rangeArr1[0].row[0], r2 = rangeArr1[0].row[1]; - var c1 = rangeArr1[0].column[0], c2 = rangeArr1[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v1 = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr1[0].row, "column": rangeArr1[0].column }); - conditionValue.push(v1); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr1.length == 0){ - if(isNaN(v1) || v1 == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v1); - } - } - - var rangeArr2 = luckysheet.conditionformat.getRangeByTxt(v2); - if(rangeArr2.length > 1){ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - else if(rangeArr2.length == 1){ - var r1 = rangeArr2[0].row[0], r2 = rangeArr2[0].row[1]; - var c1 = rangeArr2[0].column[0], c2 = rangeArr2[0].column[1]; - - if(r1 == r2 && c1 == c2){ - v2 = luckysheet.getcellvalue(r1, c1, luckysheet.flowdata); - - conditionRange.push({ "row": rangeArr2[0].row, "column": rangeArr2[0].column }); - conditionValue.push(v2); - } - else{ - luckysheet.conditionformat.infoDialog("只能对单个单元格进行引用", ""); - return; - } - } - else if(rangeArr2.length == 0){ - if(isNaN(v2) || v2 == ""){ - luckysheet.conditionformat.infoDialog("条件值只能是数字或者单个单元格", ""); - return; - } - else{ - conditionValue.push(v2); - } - } - } - else if(conditionName == "occurrenceDate"){//日期 - var v = $("#luckysheet-conditionformat-dialog #daterange-btn").val(); - - if(v == "" || v == null){ - luckysheet.conditionformat.infoDialog("请选择日期", ""); - return; - } - - conditionValue.push(v); - } - else if(conditionName == "duplicateValue"){//重复值 - conditionValue.push($("#luckysheet-conditionformat-dialog #conditionVal option:selected").val()); - } - else if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%"){ - var v = $("#luckysheet-conditionformat-dialog #conditionVal").val().trim(); - - if(parseInt(v) != v || parseInt(v) < 1 || parseInt(v) > 1000){ - luckysheet.conditionformat.infoDialog("请输入一个介于 1 和 1000 之间的整数", ""); - return; - } - - conditionValue.push(v); - } - else if(conditionName == "AboveAverage"){ //高于平均值 - conditionValue.push("AboveAverage"); - } - else if(conditionName == "SubAverage"){ //低于平均值 - conditionValue.push("SubAverage"); - } - - //格式颜色 - if($("#checkTextColor").is(":checked")){ - var textcolor = $("#textcolorshow").spectrum("get").toHexString(); - } - else{ - var textcolor = null; - } - - if($("#checkCellColor").is(":checked")){ - var cellcolor = $("#cellcolorshow").spectrum("get").toHexString(); - } - else{ - var cellcolor = null; - } - - //保存之前的规则 - var fileH = $.extend(true, [], luckysheet.getluckysheetfile()); - var historyRules = luckysheet.conditionformat.getHistoryRules(fileH); - - //保存当前的规则 - var rule = { - "type": "default", - "cellrange": $.extend(true, [], luckysheet_select_save), - "format": { - "textColor": textcolor, - "cellColor": cellcolor - }, - "conditionName": conditionName, - "conditionRange": conditionRange, - "conditionValue": conditionValue - }; - var ruleArr = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] == undefined ? [] : luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]; - ruleArr.push(rule); - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] = ruleArr; - - var fileC = $.extend(true, [], luckysheet.getluckysheetfile()); - var currentRules = luckysheet.conditionformat.getCurrentRules(fileC); - - //刷新一次表格 - luckysheet.conditionformat.ref(historyRules, currentRules); - - //隐藏一些dom - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-conditionformat-dialog").hide(); - - //发送给后台 - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, ruleArr, { "k": "luckysheet_conditionformat_save" }); - } - }); - - // 图标集弹出层 选择 - $(document).off("click.CFicons").on("click.CFicons", "#luckysheet-CFicons-dialog .item", function(){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-CFicons-dialog").hide(); - - if(luckysheet_select_save.length > 0){ - var cellrange = $.extend(true, [], luckysheet_select_save); - var format = { - "len": $(this).attr("data-len"), - "leftMin": $(this).attr("data-leftMin"), - "top": $(this).attr("data-top") - } - - luckysheet.conditionformat.updateItem("icons", cellrange, format); - } - }); - - // 选择单元格 - $(document).on("click", ".range .fa-table", function(){ - var id = $(this).parents(".luckysheet-modal-dialog").attr("id"); - $("#" + id).hide(); - //入口 - if(id == "luckysheet-conditionformat-dialog"){ - if($(this).siblings("input").attr("id") == "conditionVal"){ - var source = "0_1"; - } - else{ - var source = "0_2"; - } - } - else if(id == "luckysheet-newConditionRule-dialog"){ - if($(this).parents(".range").attr("id") == "conditionVal"){ - var source = "1_1"; - } - else{ - var source = "1_2"; - } - } - else if(id == "luckysheet-editorConditionRule-dialog"){ - if($(this).parents(".range").attr("id") == "conditionVal"){ - var source = "2_1"; - } - else{ - var source = "2_2"; - } - } - //input值 - var v = $(this).siblings("input").val(); - - luckysheet.conditionformat.singleRangeDialog(source, v); - luckysheet.selectionCopyShow(luckysheet.conditionformat.getRangeByTxt(v)); - }); - $(document).on("click", "#luckysheet-singleRange-dialog-confirm", function(){ - $("#luckysheet-modal-dialog-mask").show(); - $(this).parents("#luckysheet-singleRange-dialog").hide(); - - var source = $(this).attr("data-source"); - var v = $(this).parents("#luckysheet-singleRange-dialog").find("input").val(); - - if(source == "0_1"){ - $("#luckysheet-conditionformat-dialog").show(); - $("#luckysheet-conditionformat-dialog #conditionVal").val(v); - } - else if(source == "0_2"){ - $("#luckysheet-conditionformat-dialog").show(); - $("#luckysheet-conditionformat-dialog #conditionVal2").val(v); - } - else if(source == "1_1"){ - $("#luckysheet-newConditionRule-dialog").show(); - $("#luckysheet-newConditionRule-dialog #conditionVal input").val(v); - } - else if(source == "1_2"){ - $("#luckysheet-newConditionRule-dialog").show(); - $("#luckysheet-newConditionRule-dialog #conditionVal2 input").val(v); - } - else if(source == "2_1"){ - $("#luckysheet-editorConditionRule-dialog").show(); - $("#luckysheet-editorConditionRule-dialog #conditionVal input").val(v); - } - else if(source == "2_2"){ - $("#luckysheet-editorConditionRule-dialog").show(); - $("#luckysheet-editorConditionRule-dialog #conditionVal2 input").val(v); - } - - var range = []; - luckysheet.selectionCopyShow(range); - }); - $(document).on("click", "#luckysheet-singleRange-dialog-close", function(){ - $("#luckysheet-modal-dialog-mask").show(); - $(this).parents("#luckysheet-singleRange-dialog").hide(); - - var source = $(this).attr("data-source"); - if(source == "0_1" || source == "0_2"){ - $("#luckysheet-conditionformat-dialog").show(); - } - else if(source == "1_1" || source == "1_2"){ - $("#luckysheet-newConditionRule-dialog").show(); - } - else if(source == "2_1" || source == "2_2"){ - $("#luckysheet-editorConditionRule-dialog").show(); - } - - var range = []; - luckysheet.selectionCopyShow(range); - }); - - // 弹出层右上角关闭按钮 - $(document).on("click", ".luckysheet-modal-dialog-title-close", function(){ - var id = $(this).parents(".luckysheet-modal-dialog").attr("id"); - - //新建规则弹出层 - if(id == "luckysheet-newConditionRule-dialog"){ - var source=$("#" + id).find("#luckysheet-newConditionRule-dialog-close").attr("data-source"); - //新建规则入口 - if(source == 1){ - $("#luckysheet-administerRule-dialog").show(); - } - } - - //编辑规则弹出层 - if(id == "luckysheet-editorConditionRule-dialog"){ - $("#luckysheet-administerRule-dialog").show(); - } - - //选择单元格弹出层 - if(id == "luckysheet-singleRange-dialog"){ - $("#luckysheet-modal-dialog-mask").show(); - - var source = $(this).parents("#luckysheet-singleRange-dialog").find("#luckysheet-singleRange-dialog-confirm").attr("data-source"); - if(source == "0_1" || source == "0_2"){ - $("#luckysheet-conditionformat-dialog").show(); - } - else if(source == "1_1" || source == "1_2"){ - $("#luckysheet-newConditionRule-dialog").show(); - } - else if(source == "2_1" || source == "2_2"){ - $("#luckysheet-editorConditionRule-dialog").show(); - } - - var range = []; - luckysheet.selectionCopyShow(range); - } - - //选择应用范围弹出层 - if(id == "luckysheet-multiRange-dialog"){ - $("#luckysheet-modal-dialog-mask").show(); - - $("#luckysheet-administerRule-dialog").show(); - - var range = []; - luckysheet.selectionCopyShow(range); - } - - //提示框 - if(id == "luckysheet-conditionformat-info-dialog"){ - $("#luckysheet-modal-dialog-mask").show(); - } - }); - - //提示框 - $(document).on("click", "#luckysheet-conditionformat-info-dialog-close", function(){ - $(this).parents("#luckysheet-conditionformat-info-dialog").hide(); - }); - }, - singleRangeDialog: function(source, value){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-singleRange-dialog").remove(); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-singleRange-dialog", "addclass": "luckysheet-singleRange-dialog", "title": "选择单元格", "content": '', "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-singleRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - multiRangeDialog: function(dataItem, value){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-multiRange-dialog").remove(); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-multiRange-dialog", "addclass": "luckysheet-multiRange-dialog", "title": "选择应用范围", "content": '', "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-multiRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - luckysheet.selectionCopyShow(luckysheet.conditionformat.getRangeByTxt(value)); - }, - getTxtByRange: function(range){ - if(range.length > 0){ - var txt = []; - - for(var s = 0; s < range.length; s++){ - var r1 = range[s].row[0], r2 = range[s].row[1]; - var c1 = range[s].column[0], c2 = range[s].column[1]; - - txt.push(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": [r1, r2], "column": [c1, c2] }, luckysheet.currentSheetIndex)); - } - - return txt.join(","); - } - }, - getRangeByTxt: function(txt){ - var range = []; - - if(txt.indexOf(",") != -1){ - var arr = txt.split(","); - for(var i = 0; i < arr.length; i++){ - if(luckysheet.formula.iscelldata(arr[i])){ - range.push(luckysheet.formula.getcellrange(arr[i])); - } - else{ - range = []; - break; - } - } - } - else{ - if(luckysheet.formula.iscelldata(txt)){ - range.push(luckysheet.formula.getcellrange(txt)); - } - } - - return range; - }, - colorSelectInit: function(){ - $(".luckysheet-conditionformat-config-color").spectrum({ - showPalette: true, - showPaletteOnly:true, - preferredFormat: "hex", - clickoutFiresChange: false, - showInitial: true, - showInput: true, - // flat: true, - hideAfterPaletteSelect: true, - showSelectionPalette: true, - // showButtons: false,//隐藏选择取消按钮 - maxPaletteSize: 8, - maxSelectionSize: 8, - // color: currenColor, - cancelText: "取消", - chooseText: "确定颜色", - togglePaletteMoreText: "自定义", - togglePaletteLessText: "收起", - togglePaletteOnly: true, - clearText: "清除颜色选择", - noColorSelectedText: "没有颜色被选择", - localStorageKey: "spectrum.textcolor" + luckysheet.server.gridKey, - palette: [["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"], - ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"], - ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"], - ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"], - ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"], - ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"], - ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"], - ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]], - change: function(color){ - if (color != null) { - color = color.toHexString(); - } - } - }); - }, - conditionformatDialog: function(title, content){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-conditionformat-dialog").remove(); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-conditionformat-dialog", "addclass": "luckysheet-conditionformat-dialog", "title": title, "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-conditionformat-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-conditionformat-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - luckysheet.conditionformat.init(); - luckysheet.conditionformat.colorSelectInit(); - if(title == "条件格式——发生日期"){ - luckysheet.conditionformat.daterangeInit("luckysheet-conditionformat-dialog"); - } - }, - CFiconsDialog: function(){  - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-CFicons-dialog").remove(); - - var content = '
'+ - '
请点击选择一组图标:
'+ - '
方向
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
形状
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
标记
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
等级
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-CFicons-dialog", "addclass": "luckysheet-CFicons-dialog", "title": "图标集", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-CFicons-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-CFicons-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - administerRuleDialog: function(){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-administerRule-dialog").remove(); - - //工作表 - var opHtml = ''; - for(var j = 0; j < luckysheetfile.length; j++){ - if(luckysheetfile[j].status == "1"){ - opHtml += ''; - } - else{ - opHtml += ''; - } - } - - var content = '
' + - '' + - '' + - '
' + - '
' + - '
' + - '' + - '' + - '' + - '
' + - '
' + - '
' + - '规则' + - '格式' + - '应用范围' + - '
' + - '
' + - '
' + - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-administerRule-dialog", "addclass": "luckysheet-administerRule-dialog", "title": "条件格式规则管理器", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-administerRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-administerRule-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - //当前工作表的规则列表 - var index = $("#luckysheet-administerRule-dialog .chooseSheet option:selected").val(); - luckysheet.conditionformat.getConditionRuleList(index); - }, - getConditionRuleList: function(index){ - $("#luckysheet-administerRule-dialog .ruleList .listBox").empty(); - - var ruleArr = luckysheet.conditionformat.fileClone[luckysheet.sheetmanage.getSheetIndex(index)].luckysheet_conditionformat_save; //条件格式规则集合 - if(ruleArr != null && ruleArr.length > 0){ - var textColorHtml = ''; //文本颜色dom - var cellColorHtml = ''; //单元格颜色dom - - for(var i = 0; i < ruleArr.length; i++){ - var type = ruleArr[i]["type"]; //规则类型 - var format = ruleArr[i]["format"]; //规则样式 - var cellrange = ruleArr[i]["cellrange"]; //规则应用范围 - - var ruleName; //规则名称 - var formatHtml = ''; //样式dom - if(type == "dataBar"){ - ruleName = "数据条"; - - formatHtml = ''; - } - else if(type == "colorGradation"){ - ruleName = "色阶"; - - formatHtml = ''; - } - else if(type == "icons"){ - ruleName = "图标集"; - - formatHtml = ''; - } - else{ - ruleName = luckysheet.conditionformat.getConditionRuleName(ruleArr[i].conditionName, ruleArr[i].conditionRange, ruleArr[i].conditionValue); - - if(format["textColor"] != null){ - formatHtml += ''; - } - - if(format["cellColor"] != null){ - formatHtml += ''; - } - } - - //应用范围dom - var rangeTxtArr = []; - for(var s = 0; s < cellrange.length; s++){ - var r1 = cellrange[s].row[0], r2 = cellrange[s].row[1]; - var c1 = cellrange[s].column[0], c2 = cellrange[s].column[1]; - - rangeTxtArr.push(luckysheet.luckysheetchatatABC(c1) + (r1 + 1) + ":" + luckysheet.luckysheetchatatABC(c2) + (r2 + 1)); - } - - //条件格式规则列表dom - var itemHtml = '
' + - '
' + ruleName + '
' + - '
' + formatHtml + '
' + - '
' + - '' + - '' + - '
' + - '
'; - - $("#luckysheet-administerRule-dialog .ruleList .listBox").prepend(itemHtml); - } - - $("#luckysheet-administerRule-dialog .ruleList .listBox .item canvas").each(function(i){ - var x = $(this).closest(".item").attr("data-item"); - - var type = ruleArr[x]["type"]; - var format = ruleArr[x]["format"]; - - var can = $(this).get(0).getContext("2d"); - if(type == "dataBar"){ - if(format.length == 2){ - var my_gradient = can.createLinearGradient(0, 0, 46, 0); - my_gradient.addColorStop(0, format[0]); - my_gradient.addColorStop(1, format[1]); - can.fillStyle = my_gradient; - can.fillRect(0, 0, 46, 18); - - can.beginPath(); - can.moveTo(0, 0); - can.lineTo(0, 18); - can.lineTo(46, 18); - can.lineTo(46, 0); - can.lineTo(0, 0); - can.lineWidth = devicePixelRatio; - can.strokeStyle = format[0]; - can.stroke(); - can.closePath(); - } - else if(format.length == 1){ - can.fillStyle = format[0]; - can.fillRect(0, 0, 46, 18); - - can.beginPath(); - can.moveTo(0, 0); - can.lineTo(0, 18); - can.lineTo(46, 18); - can.lineTo(46, 0); - can.lineTo(0, 0); - can.lineWidth = devicePixelRatio; - can.strokeStyle = format[0]; - can.stroke(); - can.closePath(); - } - } - else if(type == "colorGradation"){ - var my_gradient = can.createLinearGradient(0, 0, 46, 0); - - if(format.length == 3){ - my_gradient.addColorStop(0, format[0]); - my_gradient.addColorStop(0.5, format[1]); - my_gradient.addColorStop(1, format[2]); - } - else if(format.length == 2){ - my_gradient.addColorStop(0, format[0]); - my_gradient.addColorStop(1, format[1]); - } - - can.fillStyle = my_gradient; - can.fillRect(0, 0, 46, 18); - } - else if(type == "icons"){ - var len = format["len"]; - var l = format["leftMin"]; - var t = format["top"]; - - var w1 = 32 * len + 10 * (len - 1); - var h1 = 32; - var w2 = 46; - var h2 = 46 * 32 / w1; - - if(l == "0"){ - can.drawImage(luckysheet_CFiconsImg, 0, t * 32, w1, h1, 0, (18 - h2) / 2, w2, h2); - } - else if(l == "5"){ - can.drawImage(luckysheet_CFiconsImg, 210, t * 32, w1, h1, 0, (18 - h2) / 2, w2, h2); - } - } - }) - - $("#luckysheet-administerRule-dialog .ruleList .listBox .item").eq(0).addClass("on"); - } - }, - getConditionRuleName: function(conditionName,conditionRange,conditionValue){ - //v 有条件单元格取条件单元格,若无取条件值 - if(conditionRange[0]!=null){ - var v=luckysheet.luckysheetchatatABC(conditionRange[0]["column"][0])+(conditionRange[0]["row"][0]+1); - } - else{ - var v=conditionValue[0]; - } - //返回条件格式规则名称 - if(conditionName=="greaterThan"){ - return "单元格值 > "+v; - } - else if(conditionName=="lessThan"){ - return "单元格值 < "+v; - } - else if(conditionName=="betweenness"){ - if(conditionRange[1]!=null){ - var v2=luckysheet.luckysheetchatatABC(conditionRange[1]["column"][0])+(conditionRange[1]["row"][0]+1); - } - else{ - var v2=conditionValue[1]; - } - return "单元格值介于 "+v+" 和 "+v2+" 之间"; - } - else if(conditionName=="equal"){ - return "单元格值 = "+v; - } - else if(conditionName=="textContains"){ - return "单元格值包含 ="+v; - } - else if(conditionName=="occurrenceDate"){ - return conditionValue; - } - else if(conditionName=="duplicateValue"){ - if(conditionValue=="0"){ - return "重复值"; - } - if(conditionValue=="1"){ - return "唯一值"; - } - } - else if(conditionName=="top10"){ - return "前 "+v+" 个"; - } - else if(conditionName=="top10%"){ - return "前 "+v+"% 个"; - } - else if(conditionName=="last10"){ - return "后 "+v+" 个"; - } - else if(conditionName=="last10%"){ - return "后 "+v+"% 个"; - } - else if(conditionName=="AboveAverage"){ - return "高于平均值"; - } - else if(conditionName=="SubAverage"){ - return "低于平均值"; - } - }, - newConditionRuleDialog: function(source){ - //规则说明 - var ruleExplainHtml = luckysheet.conditionformat.getRuleExplain(0); - - //弹出层 - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-administerRule-dialog").hide(); - $("#luckysheet-newConditionRule-dialog").remove(); - - var content = '
' + - '
选择规则类型:
' + - luckysheet.conditionformat.ruleTypeHtml + - '
编辑规则说明:
' + - '
' + - ruleExplainHtml + - '
' + - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-newConditionRule-dialog", "addclass": "luckysheet-newEditorRule-dialog", "title": "新建格式规则", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-newConditionRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-newConditionRule-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - //index的规则类型focus - $("#luckysheet-newConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq(0)").addClass("on").siblings().removeClass("on"); - - luckysheet.conditionformat.colorSelectInit(); - }, - editorConditionRuleDialog: function(){ - var rule = luckysheet.conditionformat.editorRule.data; - var ruleType = rule["type"], ruleFormat = rule["format"]; - - var index, type1; - if(ruleType == "dataBar" || ruleType == "colorGradation" || ruleType == "icons"){ - index = 0; - type1 = ruleType; - } - else{ - var conditionName = rule["conditionName"]; - - if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "betweenness" || conditionName == "equal" || conditionName == "textContains" || conditionName == "occurrenceDate"){ - index = 1; - - if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "betweenness" || conditionName == "equal"){ - type1 = "number"; - } - else if(conditionName == "textContains"){ - type1 = "text"; - } - else if(conditionName == "occurrenceDate"){ - type1 = "date"; - } - } - else if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%"){ - index = 2; - - if(conditionName == "top10" || conditionName == "top10%"){ - type1 = "top"; - } - else if(conditionName == "last10" || conditionName == "last10%"){ - type1 = "last"; - } - } - else if(conditionName == "AboveAverage" || conditionName == "SubAverage"){ - index = 3; - type1 = conditionName; - } - else if(conditionName == "duplicateValue"){ - index = 4; - type1 = rule["conditionValue"]; - } - } - - //规则说明 - var ruleExplainHtml = luckysheet.conditionformat.getRuleExplain(index); - - //弹出层 - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-administerRule-dialog").hide(); - $("#luckysheet-editorConditionRule-dialog").remove(); - - var content = '
' + - '
选择规则类型:
' + - luckysheet.conditionformat.ruleTypeHtml + - '
编辑规则说明:
' + - '
' + - ruleExplainHtml + - '
' + - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-editorConditionRule-dialog", "addclass": "luckysheet-newEditorRule-dialog", "title": "编辑格式规则", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-editorConditionRule-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-editorConditionRule-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - luckysheet.conditionformat.colorSelectInit(); - - //规则类型focus - $("#luckysheet-editorConditionRule-dialog .ruleTypeBox .ruleTypeItem:eq(" + index + ")").addClass("on").siblings().removeClass("on"); - - //type1 - $("#luckysheet-editorConditionRule-dialog #type1").val(type1); - if(type1 == "dataBar" || type1 == "colorGradation" || type1 == "icons" || type1 == "number" || type1 == "text" || type1 == "date"){ - $("#luckysheet-editorConditionRule-dialog ." + type1 + "Box").show(); - $("#luckysheet-editorConditionRule-dialog ." + type1 + "Box").siblings().hide(); - } - if(type1 == "date"){ - luckysheet.conditionformat.daterangeInit("luckysheet-editorConditionRule-dialog"); - } - - //type2 format value - if(ruleType == "dataBar" || ruleType == "colorGradation" || ruleType == "icons"){ - if(type1 == "dataBar"){ - if(ruleFormat.length == 2){ - $("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("gradient"); - } - else if(ruleFormat.length == 1){ - $("#luckysheet-editorConditionRule-dialog .dataBarBox #type2").val("solid"); - } - - $("#luckysheet-editorConditionRule-dialog .dataBarBox .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[0]); - } - else if(type1 == "colorGradation"){ - if(ruleFormat.length == 3){ - $("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("threeColor"); - - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").show(); - - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[0]); - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[1]); - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[2]); - } - else if(ruleFormat.length == 2){ - $("#luckysheet-editorConditionRule-dialog .colorGradationBox #type2").val("twoColor"); - - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .midVal").hide(); - - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .maxVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[0]); - $("#luckysheet-editorConditionRule-dialog .colorGradationBox .minVal .luckysheet-conditionformat-config-color").spectrum("set", ruleFormat[1]); - } - } - else if(type1 == "icons"){ - var len = ruleFormat["len"]; - var l = ruleFormat["leftMin"]; - var t = ruleFormat["top"]; - - $("#luckysheet-editorConditionRule-dialog .iconsBox li").each(function(i, e){ - if($(e).find("div").attr("data-len") == len && $(e).find("div").attr("data-leftmin") == l && $(e).find("div").attr("data-top") == t){ - $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").css("background-position", $(e).find("div").css("background-position")); - $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-len", $(e).find("div").attr("data-len")); - $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-leftmin", $(e).find("div").attr("data-leftmin")); - $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("data-top", $(e).find("div").attr("data-leftmin")); - $("#luckysheet-editorConditionRule-dialog .iconsBox .showbox .model").attr("title", $(e).find("div").attr("title")); - - return true; - } - }); - } - } - else{ - if(type1 == "number"){ - $("#luckysheet-editorConditionRule-dialog .numberBox #type2").val(conditionName); - - if(rule.conditionRange[0] != null){ - var val1 = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": rule.conditionRange[0]["row"], "column": rule.conditionRange[0]["column"] }, luckysheet.currentSheetIndex); - } - else{ - var val1 = rule.conditionValue[0]; - } - - $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal input").val(val1); - - if(conditionName == "betweenness"){ - $("#luckysheet-editorConditionRule-dialog .numberBox .txt").show(); - $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").show(); - - if(rule.conditionRange[1] != null){ - var val2 = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": rule.conditionRange[1]["row"], "column": rule.conditionRange[1]["column"] }, luckysheet.currentSheetIndex); - } - else{ - var val2 = rule.conditionValue[1]; - } - - $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2 input").val(val2); - } - else{ - $("#luckysheet-editorConditionRule-dialog .numberBox .txt").hide(); - $("#luckysheet-editorConditionRule-dialog .numberBox #conditionVal2").hide(); - } - } - else if(type1 == "text"){ - if(rule.conditionRange[0] != null){ - var val1 = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": rule.conditionRange[0]["row"], "column": rule.conditionRange[0]["column"] }, luckysheet.currentSheetIndex); - } - else{ - var val1 = rule.conditionValue[0]; - } - - $("#luckysheet-editorConditionRule-dialog .textBox #conditionVal input").val(val1); - } - else if(type1 == "date"){ - luckysheet.conditionformat.daterangeInit("luckysheet-editorConditionRule-dialog"); - - var val1 = rule.conditionValue[0]; - $("#luckysheet-editorConditionRule-dialog .dateBox #daterange-btn").val(val1); - } - else if(type1 == "top" || type1 == "last"){ - var val1 = rule.conditionValue[0]; - - if(conditionName == "top10%" || conditionName == "last10%"){ - $("#luckysheet-editorConditionRule-dialog #isPercent").attr("checked","checked"); - } - } - } - }, - infoDialog: function(title, content){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-conditionformat-info-dialog").remove(); - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-conditionformat-info-dialog", "addclass": "", "title": title, "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-conditionformat-info-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-conditionformat-info-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - getRuleExplain: function(index){ - var textCellColorHtml = luckysheet.conditionformat.textCellColorHtml; - - switch(index){ - case 0: //基于各自值设置所有单元格的格式 - var ruleExplainHtml = '
基于各自值设置所有单元格的格式:
' + - '
' + - '' + - '' + - '
' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '
'; - break; - case 1: //只为包含以下内容的单元格设置格式 - var ruleExplainHtml = '
只为满足以下条件的单元格:
' + - '
' + - ''+ - '
' + - '
' + - '' + - '
' + - '' + - '
' + - '' + - '' + - '
' + - '' + - '' + - '
' + - '
' + - '
设置格式:
' + textCellColorHtml; - break; - case 2: //仅对排名靠前或靠后的数值设置格式 - var ruleExplainHtml = '
为以下排名内的值:
'+ - '
'+ - ''+ - '
'+ - ''+ - '
'+ - ''+ - ''+ - '
'+ - '
设置格式:
' + textCellColorHtml; - break; - case 3: //仅对高于或低于平均值的数值设置格式 - var ruleExplainHtml = '
为满足以下条件的值:
'+ - '
'+ - ''+ - '选定范围的平均值'+ - '
'+ - '
设置格式:
' + textCellColorHtml; - break; - case 4: //仅对唯一值或重复值设置格式 - var ruleExplainHtml = '
全部:
'+ - '
'+ - ''+ - '选定范围中的数值'+ - '
'+ - '
设置格式:
' + textCellColorHtml; - break; - } - - return ruleExplainHtml; - }, - daterangeInit: function(id){ - //日期选择插件 - $('.ranges_1 ul').remove(); - $('#' + id).find("#daterange-btn").daterangepicker({ - ranges: - { - // '全部': [moment(), moment().subtract(-1, 'days')], - '昨天': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - '今天': [moment(), moment()], - // '明天': [moment().subtract(-1, 'days'), moment().subtract(-1, 'days')], - '上周': [moment(moment().subtract(1, 'week')).subtract(new Date().getDay() - 1, 'days'), moment().subtract(new Date().getDay(), 'days')], - '本周': [moment().subtract(new Date().getDay() - 1, 'days'), moment().add(7 - new Date().getDay(), 'days')], - '上月': [moment(moment().format('YYYY-MM')).subtract(1, 'month'), moment(moment().format('YYYY-MM')).subtract(1, 'day')], - '本月': [moment().format('YYYY-MM'), moment(moment(moment().format('YYYY-MM')).add(1, 'month')).subtract(1, 'day')], - '去年': [moment(moment(moment().format('YYYY'))).subtract(1, 'years').format('YYYY'), moment(moment().format('YYYY')).subtract(1, 'day')], - '本年': [moment().format('YYYY'), moment(moment(moment().add(1, 'years')).format('YYYY')).subtract(1, 'day')], - '最近7天': [moment().subtract(6, 'days'), moment()], - '最近30天': [moment().subtract(29, 'days'), moment()] - // '未来七天': [moment(),moment().subtract(-6, 'days')], - // '未来30天': [moment(),moment().subtract(-29, 'days')], - // '未来60天': [moment(),moment().subtract(-59, 'days'), ] - }, - startDate: moment(), - endDate: moment() - }, - function(start, end,label) { - //label:通过它来知道用户选择的是什么,传给后台进行相应的展示 - if(label == '全部'){ - $('#daterange-btn').val(''); - } - else if(label == '昨天' || label == '今天'){ - $('#daterange-btn').val(start.format('YYYY/MM/DD')); - } - else if(label == '上周' || label == '本周' || label == '上月' || label == '本月' || label == '去年' || label == '本年' || label == '最近7天' || label == '最近30天'){ - $('#daterange-btn').val(start.format('YYYY/MM/DD')+'-'+end.format('YYYY/MM/DD')); - } - } - ); - }, - CFSplitRange: function(range1, range2, range3, type){ - var range = []; - - var offset_r = range3["row"][0] - range2["row"][0]; - var offset_c = range3["column"][0] - range2["column"][0]; - - var r1 = range1["row"][0], r2 = range1["row"][1]; - var c1 = range1["column"][0], c2 = range1["column"][1]; - - if(r1 >= range2["row"][0] && r2 <= range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 全部 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = []; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - } - else if(r1 >= range2["row"][0] && r1 <= range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 行贯穿 条件格式应用范围 上部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - } - else if(r2 >= range2["row"][0] && r2 <= range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 行贯穿 条件格式应用范围 下部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - } - else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c1 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 行贯穿 条件格式应用范围 中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, c2 + offset_c] } - ]; - } - } - else if(c1 >= range2["column"][0] && c1 <= range2["column"][1] && r1 >= range2["row"][0] && r2 <= range2["row"][1]){ - //选区 列贯穿 条件格式应用范围 左部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] }, - { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(c2 >= range2["column"][0] && c2 <= range2["column"][1] && r1 >= range2["row"][0] && r2 <= range2["row"][1]){ - //选区 列贯穿 条件格式应用范围 右部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] }, - { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - } - else if(c1 < range2["column"][0] && c2 > range2["column"][1] && r1 >= range2["row"][0] && r2 <= range2["row"][1]){ - //选区 列贯穿 条件格式应用范围 中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] }, - { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] }, - { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, r2], "column": [c1, range2["column"][0] - 1] }, - { "row": [r1, r2], "column": [range2["column"][1] + 1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(r1 >= range2["row"][0] && r1 <= range2["row"][1] && c1 >= range2["column"][0] && c1 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 左上角部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(r1 >= range2["row"][0] && r1 <= range2["row"][1] && c2 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 右上角部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - } - else if(r2 >= range2["row"][0] && r2 <= range2["row"][1] && c1 >= range2["column"][0] && c1 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 左下角部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(r2 >= range2["row"][0] && r2 <= range2["row"][1] && c2 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 右下角部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - } - else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c1 >= range2["column"][0] && c1 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 左中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [c1 + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c2 >= range2["column"][0] && c2 <= range2["column"][1]){ - //选区 包含 条件格式应用范围 右中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, c2 + offset_c] } - ]; - } - } - else if(c1 < range2["column"][0] && c2 > range2["column"][1] && r1 >= range2["row"][0] && r1 <= range2["row"][1]){ - //选区 包含 条件格式应用范围 上中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [r1, range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [r1 + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(c1 < range2["column"][0] && c2 > range2["column"][1] && r2 >= range2["row"][0] && r2 <= range2["row"][1]){ - //选区 包含 条件格式应用范围 下中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], r2], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][0], r2], "column": [range2["column"][1] + 1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, r2 + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else if(r1 < range2["row"][0] && r2 > range2["row"][1] && c1 < range2["column"][0] && c2 > range2["column"][1]){ - //选区 包含 条件格式应用范围 正中间部分 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] }, - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, range2["row"][0] - 1], "column": [c1, c2] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [c1, range2["column"][0] - 1] }, - { "row": [range2["row"][0], range2["row"][1]], "column": [range2["column"][1] + 1, c2] }, - { "row": [range2["row"][1] + 1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = [ - { "row": [range2["row"][0] + offset_r, range2["row"][1] + offset_r], "column": [range2["column"][0] + offset_c, range2["column"][1] + offset_c] } - ]; - } - } - else{ - //选区 在 条件格式应用范围 之外 - - if(type == "allPart"){ //所有部分 - range = [ - { "row": [r1, r2], "column": [c1, c2] } - ]; - } - else if(type == "restPart"){ //剩余部分 - range = [ - { "row": [r1, r2], "column": [c1, c2] } - ]; - } - else if(type == "operatePart"){ //操作部分 - range = []; - } - } - - return range; - }, - getcolorGradation: function(color1, color2, value1, value2, value){ - var rgb1 = color1.split(','); - var r1 = parseInt(rgb1[0].split('(')[1]); - var g1 = parseInt(rgb1[1]); - var b1 = parseInt(rgb1[2].split(')')[0]); - - var rgb2 = color2.split(','); - var r2 = parseInt(rgb2[0].split('(')[1]); - var g2 = parseInt(rgb2[1]); - var b2 = parseInt(rgb2[2].split(')')[0]); - - var r = Math.round(r1 - (r1 - r2) / (value1 - value2) * (value1 - value)); - var g = Math.round(g1 - (g1 - g2) / (value1 - value2) * (value1 - value)); - var b = Math.round(b1 - (b1 - b2) / (value1 - value2) * (value1 - value)); - - return "rgb("+ r +", "+ g +", "+ b +")"; - }, - getCFPartRange: function(sheetIndex, range1, range2){ - var ruleArr = []; - - var cf = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)].luckysheet_conditionformat_save; - if(cf != null && cf.length > 0){ - label: for(var i = 0; i < cf.length; i++){ - var cellrange = cf[i].cellrange; - - for(var j = 0; j < cellrange.length; j++){ - var r1 = cellrange[j].row[0], r2 = cellrange[j].row[1]; - var c1 = cellrange[j].column[0], c2 = cellrange[j].column[1]; - - for(var s = 0; s < range.length; s++){ - if((range[s].row[0] >= r1 && range[s].row[0] <= r2) || (range[s].row[1] >= r1 && range[s].row[1] <= r2) || (range[s].column[0] >= c1 && range[s].column[0] <= c2) || (range[s].column[1] >= c1 && range[s].column[1] <= c2)){ - ruleArr.push(cf[i]); - - continue label; - } - } - } - } - } - - return ruleArr; - }, - checksCF: function(r, c, computeMap){ - if(computeMap != null && (r + "_" + c) in computeMap){ - return computeMap[r + "_" + c]; - } - else{ - return null; - } - }, - getComputeMap: function(){ - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - - var ruleArr = luckysheetfile[index]["luckysheet_conditionformat_save"]; - var data = luckysheetfile[index]["data"]; - - if(data == null){ - return null; - } - - var computeMap = luckysheet.conditionformat.compute(ruleArr, data); - - return computeMap; - }, - compute: function(ruleArr, d){ - if(ruleArr == null){ - ruleArr = []; - } - - //条件计算存储 - var computeMap = {}; - - if(ruleArr.length > 0){ - for(var i = 0; i < ruleArr.length; i++){ - var type = ruleArr[i]["type"]; - var cellrange = ruleArr[i]["cellrange"]; - var format = ruleArr[i]["format"]; - - if(type == "dataBar"){ //数据条 - var max = null, min = null; - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(max == null || parseInt(cell.v) > max){ - max = parseInt(cell.v); - } - - if(min == null || parseInt(cell.v) < min){ - min = parseInt(cell.v); - } - } - } - } - } - - if(max != null && min != null){ - if(min < 0){ //选区范围内有负数 - var plusLen = Math.round(max / (max - min) * 10) / 10; //正数所占比 - var minusLen = Math.round(Math.abs(min) / (max - min) * 10) / 10; //负数所占比 - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(parseInt(cell.v) < 0){ //负数 - var valueLen = Math.round(Math.abs(parseInt(cell.v)) / Math.abs(min) * 100) / 100; - - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["dataBar"] = { "valueType": "minus", "minusLen": minusLen, "valueLen": valueLen, "format": format }; - } - else{ - computeMap[r + "_" + c] = { "dataBar": { "valueType": "minus", "minusLen": minusLen, "valueLen": valueLen, "format": format } }; - } - } - - if(parseInt(cell.v) > 0){ //正数 - var valueLen = Math.round(parseInt(cell.v) / max * 100) / 100; - - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["dataBar"] = { "valueType": "plus", "plusLen": plusLen, "minusLen": minusLen, "valueLen": valueLen, "format": format }; - } - else{ - computeMap[r + "_" + c] = { "dataBar": { "valueType": "plus", "plusLen": plusLen, "minusLen": minusLen, "valueLen": valueLen, "format": format } }; - } - } - } - } - } - } - } - else{ - var plusLen = 1; - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(max == 0){ - var valueLen = 1; - } - else{ - var valueLen = Math.round(parseInt(cell.v) / max * 100) / 100; - } - - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["dataBar"] = { "valueType": "plus", "plusLen": plusLen, "valueLen": valueLen, "format": format }; - } - else{ - computeMap[r + "_" + c] = { "dataBar": { "valueType": "plus", "plusLen": plusLen, "valueLen": valueLen, "format": format } }; - } - } - } - } - } - } - } - } - else if(type == "colorGradation"){ //色阶 - var max = null, min = null, sum = 0, count = 0; - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - count++; - sum += parseInt(cell.v); - - if(max == null || parseInt(cell.v) > max){ - max = parseInt(cell.v); - } - - if(min == null || parseInt(cell.v) < min){ - min = parseInt(cell.v); - } - } - } - } - } - - if(max != null && min != null){ - if(format.length == 3){ //三色色阶 - var avg = Math.floor(sum / count); - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(parseInt(cell.v) == min){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = format[2]; - } - else{ - computeMap[r + "_" + c] = { "cellColor": format[2] }; - } - } - else if(parseInt(cell.v) > min && parseInt(cell.v) < avg){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = luckysheet.conditionformat.getcolorGradation(format[2], format[1], min, avg, parseInt(cell.v)); - } - else{ - computeMap[r + "_" + c] = { "cellColor": luckysheet.conditionformat.getcolorGradation(format[2], format[1], min, avg, parseInt(cell.v)) }; - } - } - else if(parseInt(cell.v) == avg){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = format[1]; - } - else{ - computeMap[r + "_" + c] = { "cellColor": format[1] }; - } - } - else if(parseInt(cell.v) > avg && parseInt(cell.v) < max){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = luckysheet.conditionformat.getcolorGradation(format[1], format[0], avg, max, parseInt(cell.v)); - } - else{ - computeMap[r + "_" + c] = { "cellColor": luckysheet.conditionformat.getcolorGradation(format[1], format[0], avg, max, parseInt(cell.v)) }; - } - } - else if(parseInt(cell.v) == max){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = format[0]; - } - else{ - computeMap[r + "_" + c] = { "cellColor": format[0] }; - } - } - } - } - } - } - } - else if(format.length == 2){ //两色色阶 - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(parseInt(cell.v) == min){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = format[1]; - } - else{ - computeMap[r + "_" + c] = { "cellColor": format[1] }; - } - } - else if(parseInt(cell.v) > min && parseInt(cell.v) < max){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = luckysheet.conditionformat.getcolorGradation(format[1], format[0], min, max, parseInt(cell.v)); - } - else{ - computeMap[r + "_" + c] = { "cellColor": luckysheet.conditionformat.getcolorGradation(format[1], format[0], min, max, parseInt(cell.v)) }; - } - } - else if(parseInt(cell.v) == max){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["cellColor"] = format[0]; - } - else{ - computeMap[r + "_" + c] = { "cellColor": format[0] }; - } - } - } - } - } - } - } - } - } - else if(type == "icons"){ //图标集 - var len = parseInt(format["len"]); - var leftMin = parseInt(format["leftMin"]); - var top = parseInt(format["top"]); - - var max = null, min = null; - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(max == null || parseInt(cell.v) > max){ - max = parseInt(cell.v); - } - - if(min == null || parseInt(cell.v) < min){ - min = parseInt(cell.v); - } - } - } - } - } - - if(max != null && min != null){ - var a = Math.floor((max - min + 1) / len); - var b = (max - min + 1) % len; - - if(len == 3){ //一组图标有三个 - if(b == 2){ - var v1 = [min, min + a]; - var v2 = [min + a + 1, min + a * 2]; - var v3 = [min + a * 2 + 1, max]; - } - else{ - var v1 = [min, min + a - 1]; - var v2 = [min + a, min + a * 2 - 1]; - var v3 = [min + a * 2, max]; - } - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(parseInt(cell.v) >= v1[0] && parseInt(cell.v) <= v1[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 2, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 2, "top": top} }; - } - } - else if(parseInt(cell.v) >= v2[0] && parseInt(cell.v) <= v2[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 1, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 1, "top": top} }; - } - } - else if(parseInt(cell.v) >= v3[0] && parseInt(cell.v) <= v3[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin, "top": top} }; - } - } - } - } - } - } - } - else if(len == 4){ //一组图标有四个 - if(b == 2){ - var v1 = [min, min + a]; - var v2 = [min + a + 1, min + a * 2]; - var v3 = [min + a * 2 + 1, min + a * 3]; - var v4 = [min + a * 3 + 1, max]; - } - else if(b == 3){ - var v1 = [min, min + a]; - var v2 = [min + a + 1, min + a * 2]; - var v3 = [min + a * 2 + 1, min + a * 3 + 1]; - var v4 = [min + a * 3 + 2, max]; - } - else{ - var v1 = [min, min + a - 1]; - var v2 = [min + a, min + a * 2 - 1]; - var v3 = [min + a * 2, min + a * 3 - 1]; - var v4 = [min + a * 3, max]; - } - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(parseInt(cell.v) >= v1[0] && parseInt(cell.v) <= v1[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 3, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 3, "top": top} }; - } - } - else if(parseInt(cell.v) >= v2[0] && parseInt(cell.v) <= v2[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 2, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 2, "top": top} }; - } - } - else if(parseInt(cell.v) >= v3[0] && parseInt(cell.v) <= v3[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 1, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 1, "top": top} }; - } - } - else if(parseInt(cell.v) >= v4[0] && parseInt(cell.v) <= v4[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin, "top": top} }; - } - } - } - } - } - } - } - else if(len == 5){ //一组图标有五个 - if(b == 2){ - var v1 = [min, min + a]; - var v2 = [min + a + 1, min + a * 2]; - var v3 = [min + a * 2 + 1, min + a * 3]; - var v4 = [min + a * 3 + 1, min + a * 4]; - var v5 = [min + a * 4 + 1, max]; - } - else if(b == 3){ - var v1 = [min, min + a]; - var v2 = [min + a + 1, min + a * 2]; - var v3 = [min + a * 2 + 1, min + a * 3 + 1]; - var v4 = [min + a * 3 + 2, min + a * 4 + 1]; - var v5 = [min + a * 4 + 2, max]; - } - else if(b == 4){ - var v1 = [min, min + a]; - var v2 = [min + a + 1, min + a * 2 + 1]; - var v3 = [min + a * 2 + 2, min + a * 3 + 1]; - var v4 = [min + a * 3 + 2, min + a * 4 + 2]; - var v5 = [min + a * 4 + 3, max]; - } - else{ - var v1 = [min, min + a - 1]; - var v2 = [min + a, min + a * 2 - 1]; - var v3 = [min + a * 2, min + a * 3 - 1]; - var v4 = [min + a * 3, min + a * 4 - 1]; - var v5 = [min + a * 4, max]; - } - - for(var s = 0; s < cellrange.length; s++){ - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["ct"] != null && cell["ct"].t == "n" && cell.v != null){ - if(parseInt(cell.v) >= v1[0] && parseInt(cell.v) <= v1[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 4, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 4, "top": top} }; - } - } - else if(parseInt(cell.v) >= v2[0] && parseInt(cell.v) <= v2[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 3, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 3, "top": top} }; - } - } - else if(parseInt(cell.v) >= v3[0] && parseInt(cell.v) <= v3[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 2, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 2, "top": top} }; - } - } - else if(parseInt(cell.v) >= v4[0] && parseInt(cell.v) <= v4[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin + 1, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin + 1, "top": top} }; - } - } - else if(parseInt(cell.v) >= v5[0] && parseInt(cell.v) <= v5[1]){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["icons"] = {"left": leftMin, "top": top}; - } - else{ - computeMap[r + "_" + c] = { "icons": {"left": leftMin, "top": top} }; - } - } - } - } - } - } - } - } - } - else{ - //获取变量值 - var conditionName = ruleArr[i].conditionName, //条件名称 - conditionValue0 = ruleArr[i].conditionValue[0], //条件值1 - conditionValue1 = ruleArr[i].conditionValue[1], //条件值2 - textColor = format.textColor, //条件格式文本颜色 fc - cellColor = format.cellColor; //条件格式单元格颜色 bg - - for(var s = 0; s < cellrange.length; s++){ - //条件类型判断 - if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "equal" || conditionName == "textContains"){ - //循环应用范围计算 - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - //单元格值 - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) != "object" || luckysheet.func_methods.isRealNull(cell.v)){ - continue; - } - - //符合条件 - if(conditionName == "greaterThan" && cell.v > conditionValue0){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - else if(conditionName == "lessThan" && cell.v < conditionValue0){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - else if(conditionName == "equal" && cell.v == conditionValue0){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - else if(conditionName == "textContains" && cell.v.toString().indexOf(conditionValue0) != -1){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - else if(conditionName == "betweenness"){ - //比较条件值1和条件值2的大小 - if(conditionValue0 > conditionValue1){ - var vBig = conditionValue0, - vSmall = conditionValue1; - } - else{ - var vBig = conditionValue1, - vSmall = conditionValue0; - } - //循环应用范围计算 - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - //单元格值 - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) != "object" || luckysheet.func_methods.isRealNull(cell.v)){ - continue; - } - - //符合条件 - if(cell.v >= vSmall && cell.v <= vBig){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - else if(conditionName == "occurrenceDate"){ - //获取日期所对应的数值 - if(conditionValue0.toString().indexOf("-") == -1){ - var dBig = luckysheet.mask.genarate(conditionValue0)[2], - dSmall = luckysheet.mask.genarate(conditionValue0)[2]; - } - else{ - var dBig = luckysheet.mask.genarate(conditionValue0.toString().split("-")[1])[2], - dSmall = luckysheet.mask.genarate(conditionValue0.toString().split("-")[0])[2]; - } - //循环应用范围计算 - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - //单元格值类型为日期类型 - if(d[r][c].ct != null && d[r][c].ct.t == "d"){ - //单元格值 - var cellVal = luckysheet.getcellvalue(r, c, d); - //符合条件 - if(cellVal >= dSmall && cellVal <= dBig){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - } - else if(conditionName == "duplicateValue"){ - //应用范围单元格值处理 - var dmap = {}; - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - var item = luckysheet.getcellvalue(r, c, d); - if(!(item in dmap)){ - dmap[item] = []; - } - dmap[item].push({"r": r, "c": c}); - } - } - //循环应用范围计算 - if(conditionValue0 == "0"){//重复值 - for(x in dmap){ - if(x != "null" && x != "undefined" && dmap[x].length > 1){ - for(var j = 0; j < dmap[x].length; j++){ - if((dmap[x][j].r + "_" + dmap[x][j].c) in computeMap){ - computeMap[dmap[x][j].r + "_" + dmap[x][j].c]["textColor"] = textColor; - computeMap[dmap[x][j].r + "_" + dmap[x][j].c]["cellColor"] = cellColor; - } - else{ - computeMap[dmap[x][j].r + "_" + dmap[x][j].c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - if(conditionValue0 == "1"){//唯一值 - for(x in dmap){ - if(x != "null" && x != "undefined" && dmap[x].length == 1){ - if((dmap[x][0].r + "_" + dmap[x][0].c) in computeMap){ - computeMap[dmap[x][0].r + "_" + dmap[x][0].c]["textColor"] = textColor; - computeMap[dmap[x][0].r + "_" + dmap[x][0].c]["cellColor"] = cellColor; - } - else{ - computeMap[dmap[x][0].r + "_" + dmap[x][0].c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - else if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%" || conditionName == "AboveAverage" || conditionName == "SubAverage"){ - //应用范围单元格值(数值型) - var dArr=[]; - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - //单元格值类型为数字类型 - if(d[r][c].ct != null && d[r][c].ct.t == "n"){ - dArr.push(luckysheet.getcellvalue(r, c, d)); - } - } - } - //数组处理 - if(conditionName == "top10" || conditionName == "top10%" || conditionName == "last10" || conditionName == "last10%"){ - //从大到小排序 - for(var j = 0; j < dArr.length; j++){ - for(var k = 0; k < dArr.length - 1 - j; k++){ - if(dArr[k] averageNum){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - else if(conditionName == "SubAverage"){ //低于平均值 - for(var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r++){ - for(var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c++){ - if(d[r] == null || d[r][c] == null){ - continue; - } - - //单元格值 - var cellVal = luckysheet.getcellvalue(r, c, d); - //符合条件 - if(cellVal < averageNum){ - if((r + "_" + c) in computeMap){ - computeMap[r + "_" + c]["textColor"] = textColor; - computeMap[r + "_" + c]["cellColor"] = cellColor; - } - else{ - computeMap[r + "_" + c] = { "textColor": textColor, "cellColor": cellColor }; - } - } - } - } - } - } - } - } - } - } - } - - return computeMap; - }, - updateItem: function(type, cellrange, format){ - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - var files = luckysheet.getluckysheetfile(); - - //保存之前的规则 - var fileH = $.extend(true, [], files); - var historyRules = luckysheet.conditionformat.getHistoryRules(fileH); - - //保存当前的规则 - if(type == "delSheet"){ - var ruleArr = []; - } - else{ - var rule = { - "type": type, - "cellrange": cellrange, - "format": format - }; - var ruleArr = files[index]["luckysheet_conditionformat_save"] == null ? [] : files[index]["luckysheet_conditionformat_save"]; - ruleArr.push(rule); - } - - files[index]["luckysheet_conditionformat_save"] = ruleArr; - - var fileC = $.extend(true, [], files); - var currentRules = luckysheet.conditionformat.getCurrentRules(fileC); - - //刷新一次表格 - luckysheet.conditionformat.ref(historyRules, currentRules); - - //发送给后台 - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, ruleArr, { "k": "luckysheet_conditionformat_save" }); - } - }, - getHistoryRules: function(fileH){ - var historyRules = []; - - for(var h = 0; h < fileH.length; h++){ - historyRules.push({"sheetIndex": fileH[h]["index"], "luckysheet_conditionformat_save": fileH[h]["luckysheet_conditionformat_save"]}); - } - - return historyRules; - }, - getCurrentRules: function(fileC){ - var currentRules = []; - - for(var c = 0; c < fileC.length; c++){ - currentRules.push({"sheetIndex": fileC[c]["index"], "luckysheet_conditionformat_save": fileC[c]["luckysheet_conditionformat_save"]}); - } - - return currentRules; - }, - ref: function(historyRules, currentRules){ - if (clearjfundo) { - luckysheet.jfundo = []; - - var redo = {}; - redo["type"] = "updateCF"; - redo["data"] = {"historyRules": historyRules, "currentRules": currentRules}; - luckysheet.jfredo.push(redo); - } - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - } - - //交替颜色 - luckysheet.alternateformat = { - rangefocus: false, - modelfocusIndex: null, - FixedModelColor: [ - { - "head": { "fc": "#000", "bc": "#bfbdbe" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f8f3f7" }, - "foot": { "fc": "#000", "bc": "#dde2de" } - }, - { - "head": { "fc": "#000", "bc": "#4bd4e7" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#eaf7ff" }, - "foot": { "fc": "#000", "bc": "#aae9f8" } - }, - { - "head": { "fc": "#000", "bc": "#5ed593" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#e5fbee" }, - "foot": { "fc": "#000", "bc": "#a5efcc" } - }, - { - "head": { "fc": "#000", "bc": "#f6cb4b" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#fff9e7" }, - "foot": { "fc": "#000", "bc": "#ffebac" } - }, - { - "head": { "fc": "#000", "bc": "#f96420" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#ffe5d9" }, - "foot": { "fc": "#000", "bc": "#ffcfba" } - }, - { - "head": { "fc": "#000", "bc": "#5599fc" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#ecf2fe" }, - "foot": { "fc": "#000", "bc": "#afcbfa" } - }, - { - "head": { "fc": "#000", "bc": "#22a69b" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#dff2f8" }, - "foot": { "fc": "#000", "bc": "#8dd4d0" } - }, - { - "head": { "fc": "#000", "bc": "#7a939a" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f0eff7" }, - "foot": { "fc": "#000", "bc": "#bdcad0" } - }, - { - "head": { "fc": "#000", "bc": "#d7a270" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#fdf3f1" }, - "foot": { "fc": "#000", "bc": "#ead2b6" } - }, - { - "head": { "fc": "#000", "bc": "#89c54b" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f1f7e9" }, - "foot": { "fc": "#000", "bc": "#c5e3a7" } - }, - { - "head": { "fc": "#000", "bc": "#8f88f0" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f0e5ff" }, - "foot": { "fc": "#000", "bc": "#c6c4f6" } - }, - { - "head": { "fc": "#000", "bc": "#fd1664" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#feddee" }, - "foot": { "fc": "#000", "bc": "#f98ab5" } - }, - { - "head": { "fc": "#000", "bc": "#da96d3" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#fce8fb" }, - "foot": { "fc": "#000", "bc": "#f2caee" } - }, - { - "head": { "fc": "#000", "bc": "#b49191" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f5ebe8" }, - "foot": { "fc": "#000", "bc": "#d8c3c3" } - }, - { - "head": { "fc": "#000", "bc": "#91b493" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f0fbf0" }, - "foot": { "fc": "#000", "bc": "#b4cfb6" } - }, - { - "head": { "fc": "#000", "bc": "#b4a891" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f8f6f1" }, - "foot": { "fc": "#000", "bc": "#d3cab8" } - }, - { - "head": { "fc": "#000", "bc": "#91abb4" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#eff7fa" }, - "foot": { "fc": "#000", "bc": "#b7cbd3" } - }, - { - "head": { "fc": "#000", "bc": "#b7ba82" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#fafbeb" }, - "foot": { "fc": "#000", "bc": "#dadcb4" } - }, - { - "head": { "fc": "#000", "bc": "#df3e3e" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#fde9e9" }, - "foot": { "fc": "#000", "bc": "#f89292" } - }, - { - "head": { "fc": "#000", "bc": "#f2711c" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#fef0d7" }, - "foot": { "fc": "#000", "bc": "#fbb335" } - }, - { - "head": { "fc": "#000", "bc": "#b5cc18" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f9fbd4" }, - "foot": { "fc": "#000", "bc": "#e2ed2a" } - }, - { - "head": { "fc": "#000", "bc": "#00b5ad" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#ccfaf9" }, - "foot": { "fc": "#000", "bc": "#00e4df" } - }, - { - "head": { "fc": "#000", "bc": "#2185d0" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#d8f3fc" }, - "foot": { "fc": "#000", "bc": "#3cc4f0" } - }, - { - "head": { "fc": "#000", "bc": "#a5673f" }, - "one": { "fc": "#000", "bc": "#ffffff" }, - "two": { "fc": "#000", "bc": "#f6ede5" }, - "foot": { "fc": "#000", "bc": "#d3a47c" } - } - ], - getModelBox: function(hasRowHeader, hasRowFooter){ - $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").empty(); - $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").empty(); - - //格式样式 模板 - var modelListHtml = ''; - - for(var i = 0; i < luckysheet.alternateformat.FixedModelColor.length; i++){ - var obj = luckysheet.alternateformat.FixedModelColor[i]; - - var color1, color2, color3, color4; - - if(hasRowHeader && hasRowFooter){ - color1 = obj["head"]; - color2 = obj["one"]; - color3 = obj["two"]; - color4 = obj["foot"]; - } - else if(hasRowHeader){ - color1 = obj["head"]; - color2 = obj["one"]; - color3 = obj["two"]; - color4 = obj["one"]; - } - else if(hasRowFooter){ - color1 = obj["one"]; - color2 = obj["two"]; - color3 = obj["one"]; - color4 = obj["foot"]; - } - else{ - color1 = obj["one"]; - color2 = obj["two"]; - color3 = obj["one"]; - color4 = obj["two"]; - } - - modelListHtml += '
'+ - '
'+ - ''+ - ''+ - ''+ - ''+ - '
'+ - '
'; - } - - $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelList").append(modelListHtml); - - //自定义 模板 - var modelCustom = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_alternateformat_save_modelCustom"]; - if(modelCustom != null && modelCustom.length > 0){ - var modelCustomHtml = ''; - - for(var i = 0; i < modelCustom.length; i++){ - var obj = modelCustom[i]; - - var color1, color2, color3, color4; - - if(hasRowHeader && hasRowFooter){ - color1 = obj["head"]; - color2 = obj["one"]; - color3 = obj["two"]; - color4 = obj["foot"]; - } - else if(hasRowHeader){ - color1 = obj["head"]; - color2 = obj["one"]; - color3 = obj["two"]; - color4 = obj["one"]; - } - else if(hasRowFooter){ - color1 = obj["one"]; - color2 = obj["two"]; - color3 = obj["one"]; - color4 = obj["foot"]; - } - else{ - color1 = obj["one"]; - color2 = obj["two"]; - color3 = obj["one"]; - color4 = obj["two"]; - } - - modelCustomHtml += '
'+ - '
'+ - ''+ - ''+ - ''+ - ''+ - '
'+ - '
'; - } - - $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-modelCustom").append(modelCustomHtml); - } - }, - init: function(){ - $("#luckysheet-modal-dialog-slider-alternateformat").remove(); - $("body").append(luckysheetAlternateformatHtml); - luckysheet.luckysheetsizeauto(); - - //关闭 - $("#luckysheet-modal-dialog-slider-alternateformat .luckysheet-model-close-btn").click(function () { - $("#luckysheet-modal-dialog-slider-alternateformat").hide(); - luckysheet.luckysheetsizeauto(); - }); - - //应用范围 - $(document).off("focus.AFrangeInput").on("focus.AFrangeInput", "#luckysheet-alternateformat-range input", function(){ - luckysheet.alternateformat.rangefocus = true; - }); - $(document).off("blur.AFrangeInput").on("blur.AFrangeInput", "#luckysheet-alternateformat-range input", function(){ - luckysheet.alternateformat.rangefocus = false; - }); - - $(document).off("keydown.AFrangeInput").on("keydown.AFrangeInput", "#luckysheet-alternateformat-range input", function(e){ - var rangeValue = $(this).val().trim(); - if(e.keyCode == 13){ - luckysheet.alternateformat.update(); - } - }); - $(document).off("click.AFrangeIcon").on("click.AFrangeIcon", "#luckysheet-alternateformat-range .fa-table", function(){ - $("#luckysheet-modal-dialog-slider-alternateformat").hide(); - luckysheet.luckysheetsizeauto(); - - var rangeValue = $(this).parents("#luckysheet-alternateformat-range").find("input").val().trim(); - luckysheet.alternateformat.rangeDialog(rangeValue); - }); - $(document).off("click.AFrDCf").on("click.AFrDCf", "#luckysheet-alternateformat-rangeDialog-confirm", function(){ - var rangeValue = $(this).parents("#luckysheet-alternateformat-rangeDialog").find("input").val().trim(); - $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val(rangeValue); - - $(this).parents("#luckysheet-alternateformat-rangeDialog").hide(); - $("#luckysheet-modal-dialog-slider-alternateformat").show(); - luckysheet.luckysheetsizeauto(); - - luckysheet.alternateformat.update(); - }); - $(document).off("click.AFrDCl").on("click.AFrDCl", "#luckysheet-alternateformat-rangeDialog-close", function(){ - $(this).parents("#luckysheet-alternateformat-rangeDialog").hide(); - $("#luckysheet-modal-dialog-slider-alternateformat").show(); - luckysheet.luckysheetsizeauto(); - }); - $(document).off("click.AFrDTitle").on("click.AFrDTitle", "#luckysheet-alternateformat-rangeDialog .luckysheet-modal-dialog-title-close", function(){ - $(this).parents("#luckysheet-alternateformat-rangeDialog").hide(); - $("#luckysheet-modal-dialog-slider-alternateformat").show(); - luckysheet.luckysheetsizeauto(); - }); - - //页眉、页脚选中 - $(document).off("change.AFrowHeader").on("change.AFrowHeader", "#luckysheet-alternateformat-rowHeader", function(){ - if($(this).is(":checked")){ - var hasRowHeader = true; - } - else{ - var hasRowHeader = false; - } - - if($("#luckysheet-alternateformat-rowFooter").is(":checked")){ - var hasRowFooter = true; - } - else{ - var hasRowFooter = false; - } - - luckysheet.alternateformat.checkboxChange(hasRowHeader, hasRowFooter); - luckysheet.alternateformat.modelboxOn(); - luckysheet.alternateformat.update(); - }); - $(document).off("change.AFrowFooter").on("change.AFrowFooter", "#luckysheet-alternateformat-rowFooter", function(){ - if($("#luckysheet-alternateformat-rowHeader").is(":checked")){ - var hasRowHeader = true; - } - else{ - var hasRowHeader = false; - } - - if($(this).is(":checked")){ - var hasRowFooter = true; - } - else{ - var hasRowFooter = false; - } - - luckysheet.alternateformat.checkboxChange(hasRowHeader, hasRowFooter); - luckysheet.alternateformat.modelboxOn(); - luckysheet.alternateformat.update(); - }); - - //点击样式模板 - $(document).off("click.AFmodelbox").on("click.AFmodelbox", "#luckysheet-modal-dialog-slider-alternateformat .modelbox", function(){ - var index = $(this).index(); - var $id = $(this).parents(".cf").attr("id"); - - if($id == "luckysheet-alternateformat-modelList"){ - luckysheet.alternateformat.modelfocusIndex = index; - } - else if($id == "luckysheet-alternateformat-modelCustom"){ - var len = luckysheet.alternateformat.FixedModelColor.length; - luckysheet.alternateformat.modelfocusIndex = index + len; - } - - luckysheet.alternateformat.modelboxOn(); - luckysheet.alternateformat.update(); - }); - - //点击选择文本/单元格颜色 - $(document).off("click.AFselectColor").on("click.AFselectColor", "#luckysheet-modal-dialog-slider-alternateformat .luckysheet-color-menu-button-indicator", function(){ - var $parent = $(this).closest(".toningbox"); - - if($(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-text-color")){ - var colorType = "fc"; - var currenColor = $parent.find(".toningShow").data("fc"); - } - else if($(this).find(".luckysheet-icon-img").hasClass("luckysheet-icon-cell-color")){ - var colorType = "bc"; - var currenColor = $parent.find(".toningShow").data("bc"); - } - - //source - if($parent.hasClass("header")){ - var source = "0"; - } - else if($parent.hasClass("ctOne")){ - var source = "1"; - } - else if($parent.hasClass("ctTwo")){ - var source = "2"; - } - else if($parent.hasClass("footer")){ - var source = "3"; - } - - luckysheet.alternateformat.colorSelectDialog(currenColor, colorType, source); - }); - - //选择颜色 确定 添加自定义模板 - $(document).off("click.AFselectColorConfirm").on("click.AFselectColorConfirm", "#luckysheet-alternateformat-colorSelect-dialog-confirm", function(){ - var $parent = $(this).parents("#luckysheet-alternateformat-colorSelect-dialog"); - - $("#luckysheet-modal-dialog-mask").hide(); - $parent.hide(); - - //获取currenColor colorType source - var currenColor = $parent.find(".currenColor span").attr("title"); - - if($parent.find(".luckysheet-modal-dialog-title-text").text() == "选择文本颜色"){ - var colorType = "fc"; - } - else if($parent.find(".luckysheet-modal-dialog-title-text").text() == "选择单元格颜色"){ - var colorType = "bc"; - } - - var source = $parent.find(".currenColor").attr("data-source"); - - //赋给颜色 - if(source == "0"){ - if(colorType == "fc"){ - $("#luckysheet-alternateformat-modelToning .header .toningShow").css("color", currenColor); - $("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc", currenColor); - $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - if(colorType == "bc"){ - $("#luckysheet-alternateformat-modelToning .header .toningShow").css("background-color", currenColor); - $("#luckysheet-alternateformat-modelToning .header .toningShow").data("bc", currenColor); - $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - } - else if(source == "1"){ - if(colorType == "fc"){ - $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("color", currenColor); - $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc", currenColor); - $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - if(colorType == "bc"){ - $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css("background-color", currenColor); - $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("bc", currenColor); - $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - } - else if(source == "2"){ - if(colorType == "fc"){ - $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("color", currenColor); - $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc", currenColor); - $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - if(colorType == "bc"){ - $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css("background-color", currenColor); - $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("bc", currenColor); - $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - } - else if(source == "3"){ - if(colorType == "fc"){ - $("#luckysheet-alternateformat-modelToning .footer .toningShow").css("color", currenColor); - $("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc", currenColor); - $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - if(colorType == "bc"){ - $("#luckysheet-alternateformat-modelToning .footer .toningShow").css("background-color", currenColor); - $("#luckysheet-alternateformat-modelToning .footer .toningShow").data("bc", currenColor); - $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", currenColor); - } - } - - //若模板聚焦在固有模板,则新加模板;若模板聚焦在自定义模板,则修改该模板 - if($("#luckysheet-alternateformat-rowHeader").is(":checked")){ - var hasRowHeader = true; - } - else{ - var hasRowHeader = false; - } - - if($("#luckysheet-alternateformat-rowFooter").is(":checked")){ - var hasRowFooter = true; - } - else{ - var hasRowFooter = false; - } - - var index = luckysheet.alternateformat.modelfocusIndex; - var len = luckysheet.alternateformat.FixedModelColor.length; - - if(index < len){ - var format = $.extend(true, {}, luckysheet.alternateformat.getFormatByIndex()); - } - else{ - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - var modelCustom = file["luckysheet_alternateformat_save_modelCustom"]; - - var format = $.extend(true, {}, modelCustom[index - len]); - } - - if(source == "0"){ - if(colorType == "fc"){ - format["head"]["fc"] = currenColor; - } - else if(colorType == "bc"){ - format["head"]["bc"] = currenColor; - } - } - else if(source == "1"){ - if(colorType == "fc"){ - format["one"]["fc"] = currenColor; - } - else if(colorType == "bc"){ - format["one"]["bc"] = currenColor; - } - } - else if(source == "2"){ - if(colorType == "fc"){ - format["two"]["fc"] = currenColor; - } - else if(colorType == "bc"){ - format["two"]["bc"] = currenColor; - } - } - else if(source == "3"){ - if(colorType == "fc"){ - format["foot"]["fc"] = currenColor; - } - if(colorType == "bc"){ - format["foot"]["bc"] = currenColor; - } - } - - if(luckysheet.alternateformat.modelfocusIndex < len){ - luckysheet.alternateformat.addCustomModel(format); - luckysheet.alternateformat.modelfocusIndex = luckysheet.alternateformat.getIndexByFormat(format); - } - else{ - file["luckysheet_alternateformat_save_modelCustom"][index - len] = format; - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file["luckysheet_alternateformat_save_modelCustom"], { "k": "luckysheet_alternateformat_save_modelCustom" }); - } - } - - luckysheet.alternateformat.getModelBox(hasRowHeader, hasRowFooter); - luckysheet.alternateformat.modelboxOn(); - luckysheet.alternateformat.update(); - }); - - //点击 移除交替颜色 按钮 - $(document).off("click.AFremove").on("click.AFremove", "#luckysheet-alternateformat-remove", function(){ - var dataIndex = $(this).data("index"); - - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - var ruleArr = file["luckysheet_alternateformat_save"]; - - //保存之前的规则 - var historyRules = $.extend(true, [], ruleArr); - - //保存当前的规则 - if(ruleArr.length > 1){ - ruleArr.splice(dataIndex, 1); - } - else{ - ruleArr = []; - } - - var currentRules = $.extend(true, [], ruleArr); - - //刷新一次表格 - luckysheet.alternateformat.ref(historyRules, currentRules); - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, ruleArr, { "k": "luckysheet_alternateformat_save" }); - } - - //隐藏一些dom - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-modal-dialog-slider-alternateformat").hide(); - - luckysheet.luckysheetsizeauto(); - }); - }, - perfect: function(){ - var range = $.extend(true, {}, luckysheet_select_save[0]); - var existsIndex = luckysheet.alternateformat.rangeIsExists(range)[1]; - - var obj = $.extend(true, {}, luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_alternateformat_save"][existsIndex]); - - //应用范围 - var cellrange = obj["cellrange"]; - $("#luckysheet-alternateformat-range input").val(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": cellrange["row"], "column": cellrange["column"] }, luckysheet.currentSheetIndex)); - - luckysheet_select_save = [{ "row": cellrange["row"], "column": cellrange["column"] }]; - luckysheet.selectHightlightShow(); - - //页眉、页脚 - var hasRowHeader = obj["hasRowHeader"]; - var hasRowFooter = obj["hasRowFooter"]; - - //模板聚焦 - var format = obj["format"]; - luckysheet.alternateformat.modelfocusIndex = luckysheet.alternateformat.getIndexByFormat(format); - - if(luckysheet.alternateformat.modelfocusIndex == null){ - luckysheet.alternateformat.addCustomModel(format); - luckysheet.alternateformat.modelfocusIndex = luckysheet.alternateformat.getIndexByFormat(format); - } - - luckysheet.alternateformat.checkboxChange(hasRowHeader, hasRowFooter); - luckysheet.alternateformat.modelboxOn(); - - //标识 交替颜色的index - $("#luckysheet-alternateformat-remove").data("index", existsIndex); - }, - checkboxChange: function(hasRowHeader, hasRowFooter){ - if(hasRowHeader){ - $("#luckysheet-alternateformat-rowHeader").prop("checked", true); - $("#luckysheet-alternateformat-modelToning .header").show(); - } - else{ - $("#luckysheet-alternateformat-rowHeader").removeAttr("checked"); - $("#luckysheet-alternateformat-modelToning .header").hide(); - } - - if(hasRowFooter){ - $("#luckysheet-alternateformat-rowFooter").prop("checked", true); - $("#luckysheet-alternateformat-modelToning .footer").show(); - } - else{ - $("#luckysheet-alternateformat-rowFooter").removeAttr("checked"); - $("#luckysheet-alternateformat-modelToning .footer").hide(); - } - - luckysheet.alternateformat.getModelBox(hasRowHeader, hasRowFooter); - }, - modelboxOn: function(){ - //模板 foucs - $("#luckysheet-modal-dialog-slider-alternateformat .modelbox").removeClass("on"); - - var index = luckysheet.alternateformat.modelfocusIndex; - var len = luckysheet.alternateformat.FixedModelColor.length; - - if(index < len){ - $("#luckysheet-alternateformat-modelList .modelbox").eq(index).addClass("on"); - } - else{ - $("#luckysheet-alternateformat-modelCustom .modelbox").eq(index - len).addClass("on"); - } - - //编辑 对应颜色改变 - luckysheet.alternateformat.modelToningColor(); - }, - modelToningColor: function(){ - var format = luckysheet.alternateformat.getFormatByIndex(); - - //页眉 - $("#luckysheet-alternateformat-modelToning .header .toningShow").css({"color": format["head"].fc, "background-color": format["head"].bc}); - $("#luckysheet-alternateformat-modelToning .header .toningShow").data("fc", format["head"].fc).data("bc", format["head"].bc); - $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["head"].fc); - $("#luckysheet-alternateformat-modelToning .header .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["head"].bc); - - //颜色1 - $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").css({"color": format["one"].fc, "background-color": format["one"].bc}); - $("#luckysheet-alternateformat-modelToning .ctOne .toningShow").data("fc", format["one"].fc).data("bc", format["one"].bc); - $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["one"].fc); - $("#luckysheet-alternateformat-modelToning .ctOne .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["one"].bc); - - //颜色2 - $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").css({"color": format["two"].fc, "background-color": format["two"].bc}); - $("#luckysheet-alternateformat-modelToning .ctTwo .toningShow").data("fc", format["two"].fc).data("bc", format["two"].bc); - $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["two"].fc); - $("#luckysheet-alternateformat-modelToning .ctTwo .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["two"].bc); - - //页脚 - $("#luckysheet-alternateformat-modelToning .footer .toningShow").css({"color": format["foot"].fc, "background-color": format["foot"].bc}); - $("#luckysheet-alternateformat-modelToning .footer .toningShow").data("fc", format["foot"].fc).data("bc", format["foot"].bc); - $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-text-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["foot"].fc); - $("#luckysheet-alternateformat-modelToning .footer .luckysheet-icon-cell-color").parents(".luckysheet-color-menu-button-indicator").css("border-bottom-color", format["foot"].bc); - }, - addCustomModel: function(format){ - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - if(file["luckysheet_alternateformat_save_modelCustom"] == null){ - file["luckysheet_alternateformat_save_modelCustom"] = []; - } - - file["luckysheet_alternateformat_save_modelCustom"].push(format); - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file["luckysheet_alternateformat_save_modelCustom"], { "k": "luckysheet_alternateformat_save_modelCustom" }); - } - }, - colorSelectDialog: function(currenColor, colorType, source){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-alternateformat-colorSelect-dialog").remove(); - - if(colorType == "fc"){ - var title = "选择文本颜色"; - } - else if(colorType == "bc"){ - var title = "选择单元格颜色"; - } - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-alternateformat-colorSelect-dialog", "addclass": "luckysheet-alternateformat-colorSelect-dialog", "title": title, "content": "
当前颜色:
", "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-alternateformat-colorSelect-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-alternateformat-colorSelect-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - //初始化选择颜色插件 - $("#luckysheet-alternateformat-colorSelect-dialog").find(".colorshowbox").spectrum({ - showPalette: true, - showPaletteOnly: true, - preferredFormat: "hex", - clickoutFiresChange: false, - showInitial: true, - showInput: true, - flat: true, - hideAfterPaletteSelect: true, - showSelectionPalette: true, - showButtons: false,//隐藏选择取消按钮 - maxPaletteSize: 8, - maxSelectionSize: 8, - color: currenColor, - cancelText: "取消", - chooseText: "确定颜色", - togglePaletteMoreText: "自定义", - togglePaletteLessText: "收起", - togglePaletteOnly: true, - clearText: "清除颜色选择", - noColorSelectedText: "没有颜色被选择", - localStorageKey: "spectrum.textcolor" + luckysheet.server.gridKey, - palette: [ - ["#000", "#444", "#666", "#999", "#ccc", "#eee", "#f3f3f3", "#fff"], - ["#f00", "#f90", "#ff0", "#0f0", "#0ff", "#00f", "#90f", "#f0f"], - ["#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d0e0e3", "#cfe2f3", "#d9d2e9", "#ead1dc"], - ["#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#9fc5e8", "#b4a7d6", "#d5a6bd"], - ["#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6fa8dc", "#8e7cc3", "#c27ba0"], - ["#c00", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3d85c6", "#674ea7", "#a64d79"], - ["#900", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#0b5394", "#351c75", "#741b47"], - ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] - ], - move: function(color){ - if (color != null) { - color = color.toHexString(); - } - else { - color = "#000"; - } - - $("#luckysheet-alternateformat-colorSelect-dialog .currenColor span").css("background-color", color).attr("title", color); - } - }); - }, - rangeDialog: function(value){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-alternateformat-rangeDialog").remove(); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-alternateformat-rangeDialog", "addclass": "luckysheet-alternateformat-rangeDialog", "title": "选择应用范围", "content": '', "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-alternateformat-rangeDialog").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-alternateformat-rangeDialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - rangeIsExists: function(range, index){ - var isExists = false; - var existsIndex = null; - - //获取已有交替颜色所有应用范围 - var AFarr = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_alternateformat_save"]); - - if(index != undefined && index != null){ - if(AFarr.length > 1){ - AFarr.splice(index, 1); - } - else{ - AFarr = []; - } - } - - if(AFarr.length > 0){ - var arr = []; - for(var i = 0; i < AFarr.length; i++){ - var obj = { - "index": i, - "map": luckysheet.alternateformat.getRangeMap(AFarr[i]["cellrange"]["row"], AFarr[i]["cellrange"]["column"]) - } - - arr.push(obj); - } - - //获取当前选区 - var rangeMap = luckysheet.alternateformat.getRangeMap(range["row"], range["column"]); - - //遍历 - for(x in rangeMap){ - if(isExists){ - break; - } - - for(var j = 0; j < arr.length; j++){ - if(x in arr[j]["map"]){ - isExists = true; - existsIndex = arr[j]["index"]; - break; - } - } - } - } - - return [isExists, existsIndex]; - }, - getRangeMap: function(row, column){ - var map = {}; - var st_r = row[0], ed_r = row[1], st_c = column[0], ed_c = column[1]; - - for(var r = st_r; r <= ed_r; r++){ - for(var c = st_c; c <= ed_c; c++){ - map[r + "_" + c] = 0; - } - } - - return map; - }, - getIndexByFormat: function(format){ - var index = null; - - //格式样式 模板 - var modelList = luckysheet.alternateformat.FixedModelColor; - for(var i = 0; i < modelList.length; i++){ - var obj = modelList[i]; - - if(format["head"].fc == obj["head"].fc && format["head"].bc == obj["head"].bc){ - if(format["one"].fc == obj["one"].fc && format["one"].bc == obj["one"].bc){ - if(format["two"].fc == obj["two"].fc && format["two"].bc == obj["two"].bc){ - if(format["foot"].fc == obj["foot"].fc && format["foot"].bc == obj["foot"].bc){ - index = i; - break; - } - } - } - } - } - - //自定义 模板 - var modelCustom = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_alternateformat_save_modelCustom"]; - if(modelCustom != null && modelCustom.length > 0){ - for(var j = 0; j < modelCustom.length; j++){ - var obj = modelCustom[j]; - - if(format["head"].fc == obj["head"].fc && format["head"].bc == obj["head"].bc){ - if(format["one"].fc == obj["one"].fc && format["one"].bc == obj["one"].bc){ - if(format["two"].fc == obj["two"].fc && format["two"].bc == obj["two"].bc){ - if(format["foot"].fc == obj["foot"].fc && format["foot"].bc == obj["foot"].bc){ - index = modelList.length + j; - break; - } - } - } - } - } - } - - return index; - }, - getFormatByIndex: function(){ - var index = luckysheet.alternateformat.modelfocusIndex; - var len = luckysheet.alternateformat.FixedModelColor.length; - - var format = {}; - - if(index < len){ - format = luckysheet.alternateformat.FixedModelColor[index]; - } - else{ - format = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_alternateformat_save_modelCustom"][index - len]; - } - - return format; - }, - new: function(cellrange){ - var format = luckysheet.alternateformat.getFormatByIndex(); - - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - var ruleArr = file["luckysheet_alternateformat_save"]; - - if(ruleArr == null){ - ruleArr = []; - } - - //保存之前的规则 - var historyRules = $.extend(true, [], ruleArr); - - //保存当前的规则 - var obj = { - "cellrange": { - "row": cellrange["row"], - "column": cellrange["column"] - }, - "format": format, - "hasRowHeader": true, - "hasRowFooter": false - } - - ruleArr.push(obj); - - var currentRules = $.extend(true, [], ruleArr); - - //刷新一次表格 - luckysheet.alternateformat.ref(historyRules, currentRules); - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, ruleArr, { "k": "luckysheet_alternateformat_save" }); - } - }, - update: function(){ - //获取标识 - var dataIndex = $("#luckysheet-alternateformat-remove").data("index"); - - //应用范围 - var rangeValue = $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val().trim(); - if(luckysheet.formula.iscelldata(rangeValue)){ - var cellrange = luckysheet.formula.getcellrange(rangeValue); - var isExists = luckysheet.alternateformat.rangeIsExists(cellrange, dataIndex)[0]; - - if(isExists){ - if(luckysheet.isEditMode()){ - alert("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!"); - } - else{ - luckysheet.tooltip.info("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!", ""); - } - - return; - } - } - else{ - if(luckysheet.isEditMode()){ - alert("您选择的应用范围不是选区!"); - } - else{ - luckysheet.tooltip.info("您选择的应用范围不是选区!", ""); - } - - return; - } - - //页眉、页脚 - if($("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowHeader").is(":checked")){ - var hasRowHeader = true; - } - else{ - var hasRowHeader = false; - } - - if($("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-rowFooter").is(":checked")){ - var hasRowFooter = true; - } - else{ - var hasRowFooter = false; - } - - //获取选中样式模板的颜色 - var format = luckysheet.alternateformat.getFormatByIndex(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - var ruleArr = file["luckysheet_alternateformat_save"]; - if(ruleArr == null){ - ruleArr = []; - } - - //保存之前的规则 - var historyRules = $.extend(true, [], ruleArr); - - //保存当前的规则 - var obj = { - "cellrange": { - "row": cellrange["row"], - "column": cellrange["column"] - }, - "format": format, - "hasRowHeader": hasRowHeader, - "hasRowFooter": hasRowFooter - } - - ruleArr[dataIndex] = obj; - - var currentRules = $.extend(true, [], ruleArr); - - //刷新一次表格 - luckysheet.alternateformat.ref(historyRules, currentRules); - - if(luckysheet.server.allowUpdate){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, ruleArr, { "k": "luckysheet_alternateformat_save" }); - } - }, - checksAF: function(r, c, computeMap){ - if((r + "_" + c) in computeMap){ - //返回值(fc bc) - return computeMap[r + "_" + c]; - } - else{ - return null; - } - }, - getComputeMap: function(){ - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - var ruleArr = file["luckysheet_alternateformat_save"]; - - var computeMap = luckysheet.alternateformat.compute(ruleArr); - - return computeMap; - }, - compute: function(obj){ - //计算存储 - var computeMap = {}; - - if(obj != null && obj.length > 0){ - for(var i = 0; i < obj.length; i++){ - var cellrange = obj[i]["cellrange"]; - var format = obj[i]["format"]; - var hasRowHeader = obj[i]["hasRowHeader"]; - var hasRowFooter = obj[i]["hasRowFooter"]; - var st_r = cellrange["row"][0], - ed_r = cellrange["row"][1], - st_c = cellrange["column"][0], - ed_c = cellrange["column"][1]; - - if(hasRowHeader && hasRowFooter){ - //页眉所在行 - for(var c = st_c; c <= ed_c; c++){ - computeMap[st_r + "_" + c] = [format["head"].fc, format["head"].bc]; - } - - //中间行 - if(ed_r - st_r > 1){ - for(var r = st_r + 1; r < ed_r; r++){ - if((r - st_r) % 2 != 0){ - var fc = format["one"].fc; - var bc = format["one"].bc; - } - else{ - var fc = format["two"].fc; - var bc = format["two"].bc; - } - - for(var c = st_c; c <= ed_c; c++){ - computeMap[r + "_" + c] = [fc, bc]; - } - } - } - - //页脚所在行 - if(ed_r > st_r){ - for(var c = st_c; c <= ed_c; c++){ - computeMap[ed_r + "_" + c] = [format["foot"].fc, format["foot"].bc]; - } - } - } - else if(hasRowHeader){ - //页眉所在行 - for(var c = st_c; c <= ed_c; c++){ - computeMap[st_r + "_" + c] = [format["head"].fc, format["head"].bc]; - } - - //中间行 - if(ed_r > st_r){ - for(var r = st_r + 1; r <= ed_r; r++){ - if((r - st_r) % 2 != 0){ - var fc = format["one"].fc; - var bc = format["one"].bc; - } - else{ - var fc = format["two"].fc; - var bc = format["two"].bc; - } - - for(var c = st_c; c <= ed_c; c++){ - computeMap[r + "_" + c] = [fc, bc]; - } - } - } - } - else if(hasRowFooter){ - //中间行 - if(ed_r > st_r){ - for(var r = st_r; r < ed_r; r++){ - if((r - st_r) % 2 == 0){ - var fc = format["one"].fc; - var bc = format["one"].bc; - } - else{ - var fc = format["two"].fc; - var bc = format["two"].bc; - } - - for(var c = st_c; c <= ed_c; c++){ - computeMap[r + "_" + c] = [fc, bc]; - } - } - } - - //页脚所在行 - for(var c = st_c; c <= ed_c; c++){ - computeMap[ed_r + "_" + c] = [format["foot"].fc, format["foot"].bc]; - } - } - else{ - //中间行 - for(var r = st_r; r <= ed_r; r++){ - if((r - st_r) % 2 == 0){ - var fc = format["one"].fc; - var bc = format["one"].bc; - } - else{ - var fc = format["two"].fc; - var bc = format["two"].bc; - } - - for(var c = st_c; c <= ed_c; c++){ - computeMap[r + "_" + c] = [fc, bc]; - } - } - } - } - } - - return computeMap; - }, - ref: function(historyRules, currentRules){ - if (clearjfundo) { - luckysheet.jfundo = []; - - var redo = {}; - redo["type"] = "updateAF"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - redo["data"] = {"historyRules": historyRules, "currentRules": currentRules}; - luckysheet.jfredo.push(redo); - } - - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - luckysheetfile[index]["luckysheet_alternateformat_save"] = currentRules; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - - //if公式生成器 - luckysheet.ifFormulaGenerator = { - singleRangeFocus: false, - init: function(){ - //点击选择单元格 - $(document).off("focus.IFcompareValue").on("focus.IFcompareValue","#luckysheet-ifFormulaGenerator-dialog #compareValue",function(){ - $("#luckysheet-modal-dialog-mask").hide(); - luckysheet.ifFormulaGenerator.singleRangeFocus = true; - }); - $(document).off("click.IFsingRange").on("click.IFsingRange","#luckysheet-ifFormulaGenerator-dialog .singRange",function(){ - var value = $("#luckysheet-ifFormulaGenerator-dialog #compareValue").val().trim(); - if(luckysheet.formula.iscelldata(value)){ - luckysheet.ifFormulaGenerator.singleRangeDialog(value); - } - else{ - luckysheet.ifFormulaGenerator.singleRangeDialog(); - } - }); - $(document).off("click.IFsingRangeConfirm").on("click.IFsingRangeConfirm","#luckysheet-ifFormulaGenerator-singleRange-confirm",function(){ - $("#luckysheet-formula-functionrange-select").hide(); - - $("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(); - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-ifFormulaGenerator-dialog").show(); - - var value = $(this).parents("#luckysheet-ifFormulaGenerator-singleRange-dialog").find("input").val().trim(); - $("#luckysheet-ifFormulaGenerator-dialog #compareValue").val(value); - - luckysheet.ifFormulaGenerator.singleRangeFocus = false; - }); - $(document).off("click.IFsingRangeCancel").on("click.IFsingRangeCancel","#luckysheet-ifFormulaGenerator-singleRange-cancel",function(){ - $("#luckysheet-formula-functionrange-select").hide(); - - $("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide(); - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-ifFormulaGenerator-dialog").show(); - - luckysheet.ifFormulaGenerator.singleRangeFocus = false; - }); - $(document).off("click.IFsingRangeClose").on("click.IFsingRangeClose","#luckysheet-ifFormulaGenerator-singleRange-dialog .luckysheet-modal-dialog-title-close",function(){ - $("#luckysheet-formula-functionrange-select").hide(); - - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-ifFormulaGenerator-dialog").show(); - - luckysheet.ifFormulaGenerator.singleRangeFocus = false; - }); - //点击选择范围 - $(document).off("click.IFmultiRange").on("click.IFmultiRange","#luckysheet-ifFormulaGenerator-dialog .multiRange",function(){ - luckysheet.ifFormulaGenerator.multiRangeDialog(); - - luckysheet.ifFormulaGenerator.singleRangeFocus = false; - }); - $(document).off("click.IFmultiRangeConfirm").on("click.IFmultiRangeConfirm","#luckysheet-ifFormulaGenerator-multiRange-confirm",function(){ - $("#luckysheet-formula-functionrange-select").hide(); - $("#luckysheet-row-count-show").hide(); - $("#luckysheet-column-count-show").hide(); - - $("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide(); - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-ifFormulaGenerator-dialog").show(); - - var value = $(this).parents("#luckysheet-ifFormulaGenerator-multiRange-dialog").find("input").val().trim(); - var cellrange = luckysheet.formula.getcellrange(value); - var str_r = cellrange["row"][0], end_r = cellrange["row"][1], str_c = cellrange["column"][0], end_c = cellrange["column"][1]; - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var arr = []; - //获取范围内所有数值 - for(var r = str_r; r <= end_r; r++){ - for(var c = str_c; c <= end_c; c++){ - if(d[r] != null && d[r][c] != null && d[r][c]["ct"] != null && d[r][c]["ct"]["t"] == "n"){ - arr.push(d[r][c]["v"]); - } - } - } - //从大到小排序 - for(var j = 0; j < arr.length; j++){ - for(var k = 0; k < arr.length - 1 - j; k++){ - if(arr[k]'+ - ''+ - ''+compareValue+''+ - ''+ - ''+ - '标签:'+ - ''+ - ''+ - ''; - $("#luckysheet-ifFormulaGenerator-dialog .ifList").append(itemHtml); - } - else{ - var smallRange = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#smallRange").val().trim(); - var largeRange = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#largeRange").val().trim(); - var DivisionMethodVal = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethodVal").val().trim(); - if(smallRange == "" || largeRange == ""){ - luckysheet.ifFormulaGenerator.info("范围不能为空!"); - return; - } - else if(DivisionMethodVal == ""){ - luckysheet.ifFormulaGenerator.info("划分值不能为空!"); - return; - } - luckysheet.ifFormulaGenerator.getIfList(compareValue, smallRange, largeRange, method, DivisionMethodVal); - } - }); - //点击 删除条件 - $(document).on("click","#luckysheet-ifFormulaGenerator-dialog .item .fa-remove",function(){ - $(this).parents(".item").remove(); - }); - //点击 确认 按钮 - $(document).off("click.IFconfirmBtn").on("click.IFconfirmBtn","#luckysheet-ifFormulaGenerator-dialog-confirm",function(){ - var $item = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find(".ifList .item"); - var str = ''; - $($item.toArray().reverse()).each(function(i,e){ - var smallNum = $(e).find(".smallNum").val().trim(); - var largeNum = $(e).find(".largeNum").val().trim(); - var operator = $(e).find(".operator option:selected").val(); - var operator2 = $(e).find(".operator2 option:selected").val(); - var compareValue = $(e).find(".compareValue").text(); - var markText = $(e).find(".markText").val().trim(); - if(markText == ""){ - markText = "标签" + (i + 1); - } - if(smallNum == "" && largeNum == ""){ - return true; - } - - if(operator == "0"){ - var s = compareValue + ">=" + smallNum; - } - else{ - var s = compareValue + ">" + smallNum; - } - - if(operator2 == "0"){ - var l = compareValue + "<=" + largeNum; - } - else{ - var l = compareValue + "<" + largeNum; - } - - if(i == 0 && largeNum == ""){ - var a = s; - } - else if(i == ($item.length - 1) && smallNum == ""){ - var a = l; - } - else{ - var a = "and("+s+","+l+")"; - } - - if(i == 0){ - str = 'if('+a+',"'+markText+'")'; - } - else{ - str = 'if('+a+',"'+markText+'",'+str+')'; - } - }) - // - if(str.length == 0){ - luckysheet.ifFormulaGenerator.info("没有生成可用的条件!"); - return; - } - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-ifFormulaGenerator-dialog").hide(); - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata); - - $("#luckysheet-rich-text-editor").html("=" + str); - $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - - $("#luckysheet-wa-functionbox-confirm").click(); - // var fp = $.trim(luckysheet.formula.functionParser(str)); - // var result = eval(fp); - }); - //info - $(document).on("click","#luckysheet-ifFormulaGenerator-info .luckysheet-model-close-btn",function(){ - $("#luckysheet-modal-dialog-mask").show(); - }); - $(document).on("click","#luckysheet-ifFormulaGenerator-info .luckysheet-modal-dialog-title-close",function(){ - $("#luckysheet-modal-dialog-mask").show(); - }); - }, - ifFormulaDialog: function(fp){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-ifFormulaGenerator-dialog").remove(); - - var compareValue = ""; - var ifListHtml = ''; - if(!!fp){ - var arr = fp.split("if("); - for(var i = 1; i < arr.length; i++){ - var txt = arr[i].replace("and(","").replace(/\)/g,"").replace(/\"/g,""); - var arr2 = txt.split(","); - arr2 = luckysheet.ifFormulaGenerator.clearArr(arr2); - - compareValue = luckysheet.ifFormulaGenerator.splitTxt(arr2[0])[0]; - if(arr2.length == 3){ - var smallNum = luckysheet.ifFormulaGenerator.splitTxt(arr2[0])[1]; - var largeNum = luckysheet.ifFormulaGenerator.splitTxt(arr2[1])[2]; - var markText = arr2[2]; - } - else{ - var smallNum = luckysheet.ifFormulaGenerator.splitTxt(arr2[0])[1]; - var largeNum = luckysheet.ifFormulaGenerator.splitTxt(arr2[0])[2]; - var markText = arr2[1]; - } - - var itemHtml = '
'+ - ''+ - ''+ - ''+compareValue+''+ - ''+ - ''+ - '标签:'+ - ''+ - ''+ - '
'; - ifListHtml += itemHtml; - } - } - var content = '
'+ - '
'+ - ''+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - ''+ - ''+ - '
'+ - ' 范围评估 '+ - ''+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - ''+ - '
生成
'+ - '
'+ - '
'+ - '
'+ifListHtml+'
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-ifFormulaGenerator-dialog", "addclass": "luckysheet-ifFormulaGenerator-dialog", "title": "if公式生成器", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-ifFormulaGenerator-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 590).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-ifFormulaGenerator-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - clearArr: function(arr){ - for(var i = 0; i < arr.length; i++){ - if(arr[i] == "" || arr[i] == null || arr[i] == undefined){ - arr.splice(i, 1); - } - } - - return arr; - }, - splitTxt: function(txt){ - var compareValue, smallNum, largeNum; - - if(txt.indexOf(">=") != -1){ - compareValue = txt.split(">=")[0]; - smallNum = txt.split(">=")[1]; - - return [compareValue, smallNum, largeNum]; - } - else if(txt.indexOf(">") != -1){ - compareValue = txt.split(">")[0]; - smallNum = txt.split(">")[1]; - - return [compareValue, smallNum, largeNum]; - } - else if(txt.indexOf("<=") != -1){ - compareValue = txt.split("<=")[0]; - largeNum = txt.split("<=")[1]; - - return [compareValue, smallNum, largeNum]; - } - else if(txt.indexOf("<") != -1){ - compareValue = txt.split("<")[0]; - largeNum = txt.split("<")[1]; - - return [compareValue, smallNum, largeNum]; - } - }, - singleRangeDialog: function(value){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-ifFormulaGenerator-dialog").hide(); - $("#luckysheet-ifFormulaGenerator-singleRange-dialog").remove(); - if(value != undefined && value != null){ - var val = value; - } - else{ - var val = ""; - } - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-ifFormulaGenerator-singleRange-dialog", "addclass": "luckysheet-ifFormulaGenerator-singleRange-dialog", "title": "选择单元格", "content": '', "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-ifFormulaGenerator-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-ifFormulaGenerator-singleRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - multiRangeDialog: function(){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-ifFormulaGenerator-dialog").hide(); - $("#luckysheet-ifFormulaGenerator-multiRange-dialog").remove(); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-ifFormulaGenerator-multiRange-dialog", "addclass": "luckysheet-ifFormulaGenerator-multiRange-dialog", "title": "选择范围", "content": '', "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-ifFormulaGenerator-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-ifFormulaGenerator-multiRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - getIfList: function(compareValue, smallRange, largeRange, method, methodVal){ - $("#luckysheet-ifFormulaGenerator-dialog .ifList").empty(); - - var smallRange = parseInt(smallRange); - var largeRange = parseInt(largeRange); - var methodVal = parseInt(methodVal); - - var arr = []; - if(method == "0"){ - var len = Math.ceil((largeRange - smallRange) / methodVal); - for(var i = 0; i <= len; i++){ - var num = smallRange + methodVal * i; - if(i == 0 || num >= largeRange){ - arr.push(""); - } - else{ - arr.push(num); - } - } - - } - else if(method == "1"){ - var addnum = Math.ceil((largeRange - smallRange) / methodVal); - for(var i = 0; i <= methodVal; i++){ - var num = smallRange + addnum * i; - if(i == 0 || num >= largeRange){ - arr.push(""); - } - else{ - arr.push(num); - } - } - } - for(var j = 0; j < arr.length - 1; j++){ - if(j == 0){ - var markText = "小于" + arr[j + 1]; - } - else if(j == arr.length - 2){ - var markText = "大于等于" + arr[j]; - } - else{ - var markText = arr[j] + "到" + arr[j + 1]; - } - var itemHtml = '
'+ - ''+ - ''+ - ''+compareValue+''+ - ''+ - ''+ - '标签:'+ - ''+ - ''+ - '
'; - $("#luckysheet-ifFormulaGenerator-dialog .ifList").append(itemHtml); - } - }, - info: function(title){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-ifFormulaGenerator-info").remove(); - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-ifFormulaGenerator-info", "addclass": "", "title": title, "content": "", "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-ifFormulaGenerator-info").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-ifFormulaGenerator-info").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - } - } - - //插入函数 - luckysheet.insertFormula = { - init: function(){ - $(document).off("keyup.fxSFLI").on("keyup.fxSFLI", "#searchFormulaListInput", function(){ - $("#formulaTypeList").empty(); - var txt = $(this).val().toUpperCase(); - - if(txt == ""){ - //若没有查找内容则根据类别筛选 - luckysheet.insertFormula.formulaListByType($("#formulaTypeSelect option:selected").val()); - } - else{ - for(var i = 0; i < luckysheet.functionlist.length; i++){ - if(/^[a-zA-Z]+$/.test(txt)){ - if(luckysheet.functionlist[i].n.indexOf(txt) != "-1"){ - $('
'+ luckysheet.functionlist[i].n +''+ luckysheet.functionlist[i].a +'
').appendTo($("#formulaTypeList")); - } - } - else if(luckysheet.functionlist[i].a.indexOf(txt) != "-1"){ - $('
'+ luckysheet.functionlist[i].n +''+ luckysheet.functionlist[i].a +'
').appendTo($("#formulaTypeList")); - } - } - } - - $("#formulaTypeList .listBox:first-child").addClass("on"); //默认公式列表第一个为选中状态 - }); - - $(document).off("change.fxFormulaTS").on("change.fxFormulaTS", "#formulaTypeSelect", function(){ - var type = $("#formulaTypeSelect option:selected").val(); - luckysheet.insertFormula.formulaListByType(type); - }); - - $(document).off("click.fxListbox").on("click.fxListbox", "#formulaTypeList .listBox", function(){ - $(this).addClass("on").siblings().removeClass("on"); - }); - - //选择公式后弹出参数栏弹框 - $(document).off("click.fxFormulaCf").on("click.fxFormulaCf", "#luckysheet-search-formula-confirm", function(){ - var formula = $("#luckysheet-search-formula .listBox.on").attr("name"); - var formulaTxt = '='+ formula.toUpperCase() +'()'; - $("#luckysheet-rich-text-editor").html(formulaTxt); - $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - - luckysheet.insertFormula.formulaParmDialog(formula); - }); - - //公式参数框 - $(document).off("focus.fxParamInput").on("focus.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){ - var parmIndex = $(this).parents(".parmBox").index(); - luckysheet.formula.data_parm_index = parmIndex; - - var formulatxt = $(this).parents("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(); - - var parmLen = window.luckysheet_function[formulatxt].p.length; - if(parmIndex >= parmLen){ - var parmDetail = window.luckysheet_function[formulatxt].p[parmLen - 1].detail; - var parmRepeat = window.luckysheet_function[formulatxt].p[parmLen - 1].repeat; - } - else{ - var parmDetail = window.luckysheet_function[formulatxt].p[parmIndex].detail; - var parmRepeat = window.luckysheet_function[formulatxt].p[parmIndex].repeat; - } - - //参数选区显示,参数值显示 - luckysheet.insertFormula.parmTxtShow($(this).val()); - - //计算结果 - luckysheet.insertFormula.functionStrCompute(); - - //参数名称和释义切换 - $("#luckysheet-search-formula-parm .parmDetailsBox").empty(); - - var parmName = $(this).parents(".parmBox").find(".name").text(); - $(''+ parmName +':'+ parmDetail +'').appendTo($("#luckysheet-search-formula-parm .parmDetailsBox")); - - //公式参数可自增(参数自增最多5个) - if(parmRepeat == "y"){ - var parmCount = $("#luckysheet-search-formula-parm .parmBox").length; - - if(parmCount < 5 && parmIndex == (parmCount - 1)){ - $('
值'+ (parmCount + 1) +'
=
').appendTo($("#luckysheet-search-formula-parm .parmListBox")); - } - } - }); - - $(document).off("blur.fxParamInput").on("blur.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){ - var txt = $(this).val(); - - if(luckysheet.formula.getfunctionParam(txt).fn == null && !luckysheet.formula.iscelldata(txt)){ - if(!luckysheet.func_methods.isRealNum(txt) && txt != "" && txt.length <= 2 && txt.indexOf('"') != 0 && txt.lastIndexOf('"') != 0){ - txt = '"' + txt + '"'; - $(this).val(txt); - - luckysheet.insertFormula.parmTxtShow(txt); - luckysheet.insertFormula.functionStrCompute(); - } - } - }); - - $(document).off("keyup.fxParamInput").on("keyup.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){ - //参数选区显示,参数值显示 - luckysheet.insertFormula.parmTxtShow($(this).val()); - - //计算结果 - luckysheet.insertFormula.functionStrCompute(); - }); - - //点击图标选取数据范围 - $(document).off("click.fxParamI").on("click.fxParamI", "#luckysheet-search-formula-parm .parmBox i", function(){ - luckysheet.formula.data_parm_index = $(this).parents(".parmBox").index(); - - //选取范围弹出框 - $("#luckysheet-search-formula-parm").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - - $("#luckysheet-search-formula-parm-select").remove(); - - if($(this).parents(".parmBox").find(".txt input").val() == ""){ - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-search-formula-parm-select", "addclass": "luckysheet-search-formula-parm-select", "title": "选取数据范围", "content": "", "botton": '', "style": "z-index:100003" })); - } - else{ - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-search-formula-parm-select", "addclass": "luckysheet-search-formula-parm-select", "title": "选取数据范围", "content": "", "botton": '', "style": "z-index:100003" })); - } - - var $t = $("#luckysheet-search-formula-parm-select").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-search-formula-parm-select").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - //参数选区虚线框 - luckysheet.insertFormula.parmTxtShow($(this).parents(".parmBox").find(".txt input").val()); - }); - - //点击确定 - $(document).off("click.fxParamCf").on("click.fxParamCf", "#luckysheet-search-formula-parm-confirm", function(){ - $("#luckysheet-wa-functionbox-confirm").click(); - }); - - //选取范围后传回参数栏弹框 - $(document).off("click.fxParamSelectCf").on("click.fxParamSelectCf", "#luckysheet-search-formula-parm-select-confirm", function(){ - var parmIndex = $("#luckysheet-search-formula-parm-select-input").attr("data_parm_index"); - - $("#luckysheet-search-formula-parm-select").hide(); - $("#luckysheet-search-formula-parm").show(); - $("#luckysheet-search-formula-parm .parmBox").eq(parmIndex).find(".txt input").focus(); - }); - }, - formulaListDialog: function(){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-search-formula").remove(); - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-search-formula", "addclass": "luckysheet-search-formula", "title": "", "content": "
", "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-search-formula").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-search-formula").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3, "user-select": "none" }).show(); - - luckysheet.insertFormula.formulaListByType("0"); //默认公式列表为类型0 - $("#searchFormulaListInput").focus(); - }, - formulaListByType: function(type){ - $("#formulaTypeList").empty(); - - for(var i = 0; i < luckysheet.functionlist.length; i++){ - if((type == "-1" && luckysheet.functionlist[i].t > 14) || luckysheet.functionlist[i].t == type){ - $('
'+ luckysheet.functionlist[i].n +''+ luckysheet.functionlist[i].a +'
').appendTo($("#formulaTypeList")); - } - } - - $("#formulaTypeList .listBox:first-child").addClass("on"); //默认公式列表第一个为选中状态 - }, - formulaParmDialog: function(formula, parm){ //参数弹出框 - var parm_title = '', - parm_content = '', - parm_list_content = ''; - - for(var i = 0; i < luckysheet.functionlist.length; i++){ - if(luckysheet.functionlist[i].n == formula.toUpperCase()){ - parm_title = luckysheet.functionlist[i].n; - - for(var j = 0; j < luckysheet.functionlist[i].p.length; j++){ - if(parm == null){ - //无参数 - parm_list_content += '
'+ - '
'+ luckysheet.functionlist[i].p[j].name +'
'+ - '
'+ - '' + - ''+ - '
'+ - '
=
'+ - '
'; - } - else{ - //有参数 - if(parm[j] == null){ - parm[j] = ""; - } - - parm_list_content += '
'+ - '
'+ luckysheet.functionlist[i].p[j].name +'
'+ - '
'+ - ''+ - ''+ - '
'+ - '
=
'+ - '
'; - } - } - - parm_content = '
'+ - '
'+ parm_list_content +'
'+ - '
'+ luckysheet.functionlist[i].d +'
'+ - '
'+ - '
计算结果 =
'+ - '
'; - } - } - - $("#luckysheet-search-formula").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - - $("#luckysheet-search-formula-parm").remove(); - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-search-formula-parm", "addclass": "luckysheet-search-formula-parm", "title": parm_title, "content": parm_content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-search-formula-parm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - //参数栏第一个参数聚焦,显示选取虚线框 - $("#luckysheet-search-formula-parm .parmBox:eq(0) input").focus(); - - //遍历参数,有参数显示值,无显示空 - $("#luckysheet-search-formula-parm .parmBox").each(function(index,e){ - var parmtxt = $(e).find(".txt input").val(); - - if(luckysheet.formula.getfunctionParam(parmtxt).fn == null){ //参数不是公式 - if(luckysheet.formula.iscelldata(parmtxt)){ //参数是选区 - var txtdata = window.luckysheet_getcelldata(parmtxt).data; - - if(luckysheet.getObjType(txtdata) == "array"){ //参数为多个单元格选区 - var txtArr = []; - - for(var i = 0; i < txtdata.length; i++){ - for(var j = 0; j < txtdata[i].length; j++){ - var cell = txtdata[i][j]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - txtArr.push(null); - } - else{ - txtArr.push(cell.v); - } - } - } - - $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ txtArr.join(",") +"}"); - } - else{ //参数为单个单元格选区 - $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ txtdata.v +"}"); - } - } - else{ //参数不是选区 - $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ parmtxt +"}"); - } - } - else{ //参数是公式 - $("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ eval($.trim(luckysheet.formula.functionParser("=" + parmtxt))) +"}"); - } - }) - - $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); - luckysheet.formula.data_parm_index = 0; - luckysheet.formula.rangestart = true; - }, - parmTxtShow: function(parmtxt){ - if(luckysheet.formula.getfunctionParam(parmtxt).fn == null){ //参数不是公式 - if(luckysheet.formula.iscelldata(parmtxt)){ //参数是选区 - var cellrange = luckysheet.formula.getcellrange(parmtxt); - var r1 = cellrange.row[0], r2 = cellrange.row[1], c1 = cellrange.column[0], c2 = cellrange.column[1]; - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); - $("#luckysheet-formula-help-c").hide(); - luckysheet.luckysheet_count_show(col_pre, row_pre, col - col_pre - 1, row - row_pre - 1, cellrange.row, cellrange.column); - - var txtdata = window.luckysheet_getcelldata(parmtxt).data; - if(luckysheet.getObjType(txtdata) == "array"){ //参数为多个单元格选区 - var txtArr = []; - - for(var i = 0; i < txtdata.length; i++){ - for(var j = 0; j < txtdata[i].length; j++){ - var cell = txtdata[i][j]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - txtArr.push(null); - } - else{ - txtArr.push(cell.v); - } - } - } - - $("#luckysheet-search-formula-parm .parmBox").eq(luckysheet.formula.data_parm_index).find(".val").text(" = {"+ txtArr.join(",") +"}"); - } - else{ //参数为单个单元格选区 - $("#luckysheet-search-formula-parm .parmBox").eq(luckysheet.formula.data_parm_index).find(".val").text(" = {"+ txtdata.v +"}"); - } - } - else{ //参数不是选区 - $("#luckysheet-search-formula-parm .parmBox").eq(luckysheet.formula.data_parm_index).find(".val").text(" = {"+ parmtxt +"}"); - - $("#luckysheet-formula-functionrange-select").hide(); - } - } - else{ - //参数是公式 - var txt; - for(var k = 0; k < luckysheet.formula.getfunctionParam(parmtxt).param.length; k++){ - if(luckysheet.formula.iscelldata(luckysheet.formula.getfunctionParam(parmtxt).param[k])){ - txt = luckysheet.formula.getfunctionParam(parmtxt).param[k]; - break; - } - } - - var cellrange = luckysheet.formula.getcellrange(txt); - var r1 = cellrange.row[0], r2 = cellrange.row[1], c1 = cellrange.column[0], c2 = cellrange.column[1]; - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); - // $("#luckysheet-cols-h-selected").css({ "left": col_pre, "width": col - col_pre - 1, "display": "block", "background-color": "rgba(76, 76, 76, 0.1)" }); - // $("#luckysheet-rows-h-selected").css({ "top": row_pre, "height": row - row_pre - 1, "display": "block", "background-color": "rgba(76, 76, 76, 0.1)" }); - $("#luckysheet-formula-help-c").hide(); - luckysheet.luckysheet_count_show(col_pre, row_pre, col - col_pre - 1, row - row_pre - 1, cellrange.row, cellrange.column); - - $("#luckysheet-search-formula-parm .parmBox").eq(luckysheet.formula.data_parm_index).find(".val").text(" = {"+ eval($.trim(luckysheet.formula.functionParser("=" + parmtxt))) +"}"); - } - }, - functionStrCompute: function(){ - var isVal = true; //参数不为空 - var parmValArr = []; //参数值集合 - var lvi = -1; //最后一个有值的参数索引 - - var formulatxt = $("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text(); - - $("#luckysheet-search-formula-parm .parmBox").each(function(i, e){ - var parmtxt = $(e).find(".txt input").val(); - var parmRequire = window.luckysheet_function[formulatxt].p[i].require; - - if(parmtxt == "" && parmRequire == "m"){ - isVal = false; - } - - if(parmtxt != ""){ - lvi = i; - } - }); - - //单元格显示 - if(lvi == -1){ - var functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "()"; - } - else if(lvi == 0){ - var functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + $("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val() + ")"; - } - else{ - for(var j = 0; j <= lvi; j++){ - parmValArr.push($("#luckysheet-search-formula-parm .parmBox").eq(j).find(".txt input").val()); - } - - var functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + parmValArr.join(",") + ")"; - } - - var function_str = luckysheet.formula.functionHTMLGenerate(functionHtmlTxt); - $("#luckysheet-rich-text-editor").html(function_str); - $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - - if(isVal){ //公式计算 - var fp = $.trim(luckysheet.formula.functionParser($("#luckysheet-rich-text-editor").text())); - - var result = null; - - try { - result = eval(fp); - } - catch (e) { - result = luckysheet.formula.error.n; - } - - $("#luckysheet-search-formula-parm .result span").text(result); - } - } - } - - //选区下拉 - luckysheet.dropCell = { - iconHtml: '
'+ - '
'+ - '
', - typeListHtml: '
'+ - '
'+ - '
'+ - '复制单元格'+ - '
'+ - '
'+ - '
'+ - '
'+ - '填充序列'+ - '
'+ - '
'+ - '
'+ - '
'+ - '仅填充格式'+ - '
'+ - '
'+ - '
'+ - '
'+ - '不带格式填充'+ - '
'+ - '
'+ - '
'+ - '
'+ - '以天数填充'+ - '
'+ - '
'+ - '
'+ - '
'+ - '以工作日填充'+ - '
'+ - '
'+ - '
'+ - '
'+ - '以月填充'+ - '
'+ - '
'+ - '
'+ - '
'+ - '以年填充'+ - '
'+ - '
'+ - '
'+ - '
'+ - '以中文小写数字填充'+ - '
'+ - '
'+ - '
', - copyRange: {}, //复制范围 - applyRange: {}, //应用范围 - applyType: null, //0复制单元格,1填充序列,2仅填充格式,3不带格式填充,4以天数填充,5以工作日填充,6以月填充,7以年填充,8以中文小写数字序列填充 - direction: null, //down-往下拖拽,right-往右拖拽,up-往上拖拽,left-往左拖拽 - chnNumChar: {"零": 0, "一": 1, "二": 2, "三": 3, "四": 4, "五": 5, "六": 6, "七": 7, "八": 8, "九": 9}, - chnNameValue: {"十": {value: 10, secUnit: false}, "百": {value: 100, secUnit: false}, "千": {value: 1000, secUnit: false}, "万": {value: 10000, secUnit: true}, "亿": {value: 100000000, secUnit: true}}, - ChineseToNumber: function(chnStr){ - var rtn = 0; - var section = 0; - var number = 0; - var secUnit = false; - var str = chnStr.split(""); - - for(var i = 0; i < str.length; i++){ - var num = luckysheet.dropCell.chnNumChar[str[i]]; - if(typeof num != "undefined"){ - number = num; - if(i == str.length - 1){ - section += number; - } - } - else{ - var unit = luckysheet.dropCell.chnNameValue[str[i]].value; - secUnit = luckysheet.dropCell.chnNameValue[str[i]].secUnit; - if(secUnit){ - section = (section + number) * unit; - rtn += section; - section = 0; - } - else{ - section += (number * unit); - } - number = 0; - } - } - - return rtn + section; - }, - chnNumChar2: ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], - chnUnitSection: ["", "万", "亿", "万亿", "亿亿"], - chnUnitChar: ["", "十", "百", "千"], - SectionToChinese: function(section){ - var strIns = '', chnStr = ''; - var unitPos = 0; - var zero = true; - - while(section > 0){ - var v = section % 10; - if(v == 0){ - if(!zero){ - zero = true; - chnStr = luckysheet.dropCell.chnNumChar2[v] + chnStr; - } - } - else{ - zero = false; - strIns = luckysheet.dropCell.chnNumChar2[v]; - strIns += luckysheet.dropCell.chnUnitChar[unitPos]; - chnStr = strIns + chnStr; - } - unitPos++; - section = Math.floor(section / 10); - } - - return chnStr; - }, - NumberToChinese: function(num){ - var unitPos = 0; - var strIns = '', chnStr = ''; - var needZero = false; - - if(num == 0){ - return luckysheet.dropCell.chnNumChar2[0]; - } - while(num > 0){ - var section = num % 10000; - if(needZero){ - chnStr = luckysheet.dropCell.chnNumChar2[0] + chnStr; - } - strIns = luckysheet.dropCell.SectionToChinese(section); - strIns += (section != 0) ? luckysheet.dropCell.chnUnitSection[unitPos] : luckysheet.dropCell.chnUnitSection[0]; - chnStr = strIns + chnStr; - needZero = (section < 1000) && (section > 0); - num = Math.floor(num / 10000); - unitPos++; - } - - return chnStr; - }, - isChnNumber: function(txt){ - var isChnNumber = true; - - if(txt.length == 1){ - if(txt == "日" || (txt in luckysheet.dropCell.chnNumChar)){ - isChnNumber = true; - } - else{ - isChnNumber = false; - } - } - else{ - var str = txt.split(""); - for(var i = 0; i < str.length; i++){ - if(!((str[i] in luckysheet.dropCell.chnNumChar) || (str[i] in luckysheet.dropCell.chnNameValue))){ - isChnNumber = false; - break; - } - } - } - - return isChnNumber; - }, - isExtendNumber: function(txt){ - var reg = /[0-9]/; - if(reg.test(txt.substr(txt.length - 1, 1))){ - var isExtendNumber = true; - } - else{ - var isExtendNumber = false; - } - - if(isExtendNumber){ - var str = txt.split(""); - str.reverse(); - - var len = 0; - for(var i = 0; i < str.length; i++){ - if(!reg.test(str[i])){ - len = i; - break; - } - } - - return [isExtendNumber, txt.substr(0, txt.length - len), txt.substr(txt.length - len, len)]; - } - else{ - return [isExtendNumber]; - } - }, - isChnWeek1: function(txt){ - if(txt.length == 1){ - if(txt == "日" || luckysheet.dropCell.ChineseToNumber(txt) < 7){ - var isChnWeek1 = true; - } - else{ - var isChnWeek1 = false; - } - } - else{ - var isChnWeek1 = false; - } - - return isChnWeek1; - }, - isChnWeek2: function(txt){ - if(txt.length == 2){ - if(txt == "周一" || txt == "周二" || txt == "周三" || txt == "周四" || txt == "周五" || txt == "周六" || txt == "周日"){ - var isChnWeek2 = true; - } - else{ - var isChnWeek2 = false; - } - } - else{ - var isChnWeek2 = false; - } - - return isChnWeek2; - }, - isChnWeek3: function(txt){ - if(txt.length == 3){ - if(txt == "星期一" || txt == "星期二" || txt == "星期三" || txt == "星期四" || txt == "星期五" || txt == "星期六" || txt == "星期日"){ - var isChnWeek3 = true; - } - else{ - var isChnWeek3 = false; - } - } - else{ - var isChnWeek3 = false; - } - - return isChnWeek3; - }, - createIcon: function(){ - var copy_r = luckysheet.dropCell.copyRange["row"][1], copy_c = luckysheet.dropCell.copyRange["column"][1]; - var apply_r = luckysheet.dropCell.applyRange["row"][1], apply_c = luckysheet.dropCell.applyRange["column"][1]; - if(apply_r >= copy_r && apply_c >= copy_c){ - var row_index = apply_r; - var col_index = apply_c; - } - else{ - var row_index = copy_r; - var col_index = copy_c; - } - var row = luckysheet.rowLocationByIndex(row_index)[1], row_pre = luckysheet.rowLocationByIndex(row_index)[0]; - var col = luckysheet.colLocationByIndex(col_index)[1], col_pre = luckysheet.colLocationByIndex(col_index)[0]; - - $("#luckysheet-dropCell-icon").remove(); - $("#luckysheet-cell-main").append(luckysheet.dropCell.iconHtml); - // $("body").append(luckysheet.dropCell.iconHtml); - - $("#luckysheet-dropCell-icon").css({"left": col, "top": row}); - - //点击icon - $("#luckysheet-dropCell-icon").mouseover(function(){ - $(this).css("background-color", "#ffe8e8"); - }).mouseleave(function(){ - $(this).css("background-color", "#f1f1f1"); - }).mousedown(function(event){ - $("#luckysheet-dropCell-typeList").remove(); - $("body").append(luckysheet.dropCell.typeListHtml); - - var typeItemHide = luckysheet.dropCell.typeItemHide(); - if(!typeItemHide[0] && !typeItemHide[1] && !typeItemHide[2] && !typeItemHide[3] && !typeItemHide[4] && !typeItemHide[5] && !typeItemHide[6]){ - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=1]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide(); - } - - if(!typeItemHide[2]){ - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=4]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=5]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=6]").hide(); - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=7]").hide(); - } - - if(!typeItemHide[3]){ - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type=8]").hide(); - } - - - var left = $(this).offset().left; - var top = $(this).offset().top + 25; - var winH = $(window).height(), winW = $(window).width(); - var menuW = $("#luckysheet-dropCell-typeList").width(), menuH = $("#luckysheet-dropCell-typeList").height(); - if (left + menuW > winW) { - left = left - menuW; - } - - if (top + menuH > winH) { - top = top - menuH - 38; - } - - if (top < 0) { - top = 0; - } - - $("#luckysheet-dropCell-typeList").css({"left": left, "top": top}).show(); - $("#luckysheet-dropCell-icon").mouseleave(function(){ $(this).css("backgroundColor", "#ffe8e8") }); - - - var type = luckysheet.dropCell.applyType; - $("#luckysheet-dropCell-typeList .luckysheet-cols-menuitem[data-type="+type+"]").find("span").append(''); - event.stopPropagation(); - }); - //点击数据填充类型 - $(document).off("click.dCtypeList").on("click.dCtypeList","#luckysheet-dropCell-typeList .luckysheet-cols-menuitem",function(){ - $("#luckysheet-dropCell-typeList .fa-check").remove(); - $(this).find("span").append(''); - - var type = $(this).attr("data-type"); - luckysheet.dropCell.applyType = type; - - luckysheet.dropCell.update(); - $("#luckysheet-dropCell-typeList").hide(); - $("#luckysheet-dropCell-icon").css("backgroundColor", "#f1f1f1"); - $("#luckysheet-dropCell-icon").mouseleave(function(){ $(this).css("backgroundColor", "#f1f1f1") }); - - luckysheet.jfcountfunc(); - }); - }, - typeItemHide: function(){ - var copyRange = luckysheet.dropCell.copyRange; - var str_r = copyRange["row"][0], end_r = copyRange["row"][1]; - var str_c = copyRange["column"][0], end_c = copyRange["column"][1]; - - var hasNumber = false, hasExtendNumber = false, hasDate = false, hasChn = false, hasChnWeek1 = false, hasChnWeek2 = false, hasChnWeek3 = false; - for(var r = str_r; r <= end_r; r++){ - for(var c = str_c; c <= end_c; c++){ - if(!!luckysheet.flowdata[r][c]){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && cell["v"] != null && cell["f"] == null){ - if(cell["ct"] != null && cell["ct"].t == "n"){ - hasNumber = true; - } - else if(cell["ct"] != null && cell["ct"].t == "d"){ - hasDate = true; - } - else if(luckysheet.dropCell.isExtendNumber(cell["m"])[0]){ - hasExtendNumber = true; - } - else if(luckysheet.dropCell.isChnNumber(cell["m"]) && cell["m"] != "日"){ - hasChn = true; - } - else if(cell["m"] == "日"){ - hasChnWeek1 = true; - } - else if(luckysheet.dropCell.isChnWeek2(cell["m"])){ - hasChnWeek2 = true; - } - else if(luckysheet.dropCell.isChnWeek3(cell["m"])){ - hasChnWeek3 = true; - } - } - } - } - } - - return [hasNumber, hasExtendNumber, hasDate, hasChn, hasChnWeek1, hasChnWeek2, hasChnWeek3]; - }, - update: function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - var cfg = $.extend(true, {}, config); - var borderInfoCompute = luckysheet.getBorderInfoCompute(); - - var direction = luckysheet.dropCell.direction; - var type = luckysheet.dropCell.applyType; - - //复制范围 - var copyRange = luckysheet.dropCell.copyRange; - var copy_str_r = copyRange["row"][0], copy_end_r = copyRange["row"][1]; - var copy_str_c = copyRange["column"][0], copy_end_c = copyRange["column"][1]; - var copyData = luckysheet.dropCell.getCopyData(d, copy_str_r, copy_end_r, copy_str_c, copy_end_c, direction); - if(direction == "down" || direction == "up"){ - var csLen = copy_end_r - copy_str_r + 1; - } - else if(direction == "right" || direction == "left"){ - var csLen = copy_end_c - copy_str_c + 1; - } - - //应用范围 - var applyRange = luckysheet.dropCell.applyRange; - var apply_str_r = applyRange["row"][0], apply_end_r = applyRange["row"][1]; - var apply_str_c = applyRange["column"][0], apply_end_c = applyRange["column"][1]; - - if(direction == "down" || direction == "up"){ - var asLen = apply_end_r - apply_str_r + 1; - - for(var i = apply_str_c; i <= apply_end_c; i++){ - var copyD = copyData[i - apply_str_c]; - - var applyData = luckysheet.dropCell.getApplyData(copyD, csLen, asLen); - - if(direction == "down"){ - for(var j = apply_str_r; j <= apply_end_r; j++){ - var cell = applyData[j - apply_str_r]; - - if(cell.f != null){ - var f = "=" + luckysheet.formula.functionCopy(cell.f, "down", j - apply_str_r + 1); - var v = luckysheet.formula.execfunction(f, j, i, true); - - cell.f = v[2]; - cell.v = v[1]; - - if(cell.spl != null){ - cell.spl = v[3].data; - } - else{ - if(luckysheet.func_methods.isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ - if(cell.v == Infinity || cell.v == -Infinity){ - cell.m = cell.v.toString(); - } - else{ - if(cell.v.toString().indexOf("e") > -1){ - var len = cell.v.toString().split(".")[1].split("e")[0].length; - if(len > 5){ - len = 5; - } - - cell.m = cell.v.toExponential(len).toString(); - } - else{ - var mask = luckysheet.mask.genarate(Math.round(cell.v * 1000000000) / 1000000000); - cell.m = mask[0].toString(); - } - } - - cell.ct = { "fa": "General", "t": "n" }; - } - else{ - var mask = luckysheet.mask.genarate(cell.v); - cell.m = mask[0].toString(); - cell.ct = mask[1]; - } - } - } - - d[j][i] = cell; - - //边框 - var bd_r = copy_str_r + (j - apply_str_r) % csLen; - var bd_c = i; - - if(borderInfoCompute[bd_r + "_" + bd_c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": j, - "col_index": i, - "l": borderInfoCompute[bd_r + "_" + bd_c].l, - "r": borderInfoCompute[bd_r + "_" + bd_c].r, - "t": borderInfoCompute[bd_r + "_" + bd_c].t, - "b": borderInfoCompute[bd_r + "_" + bd_c].b - } - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[j + "_" + i]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": j, - "col_index": i, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - cfg["borderInfo"].push(bd_obj); - } - } - } - if(direction == "up"){ - for(var j = apply_end_r; j >= apply_str_r; j--){ - var cell = applyData[apply_end_r - j]; - - if(cell.f != null){ - var f = "=" + luckysheet.formula.functionCopy(cell.f, "up", apply_end_r - j + 1); - var v = luckysheet.formula.execfunction(f, j, i, true); - - cell.f = v[2]; - cell.v = v[1]; - - if(cell.spl != null){ - cell.spl = v[3].data; - } - else{ - if(luckysheet.func_methods.isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ - if(cell.v == Infinity || cell.v == -Infinity){ - cell.m = cell.v.toString(); - } - else{ - if(cell.v.toString().indexOf("e") > -1){ - var len = cell.v.toString().split(".")[1].split("e")[0].length; - if(len > 5){ - len = 5; - } - - cell.m = cell.v.toExponential(len).toString(); - } - else{ - var mask = luckysheet.mask.genarate(Math.round(cell.v * 1000000000) / 1000000000); - cell.m = mask[0].toString(); - } - } - - cell.ct = { "fa": "General", "t": "n" }; - } - else{ - var mask = luckysheet.mask.genarate(cell.v); - cell.m = mask[0].toString(); - cell.ct = mask[1]; - } - } - } - - d[j][i] = cell; - - //边框 - var bd_r = copy_end_r - (apply_end_r - j) % csLen; - var bd_c = i; - - if(borderInfoCompute[bd_r + "_" + bd_c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": j, - "col_index": i, - "l": borderInfoCompute[bd_r + "_" + bd_c].l, - "r": borderInfoCompute[bd_r + "_" + bd_c].r, - "t": borderInfoCompute[bd_r + "_" + bd_c].t, - "b": borderInfoCompute[bd_r + "_" + bd_c].b - } - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[j + "_" + i]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": j, - "col_index": i, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - cfg["borderInfo"].push(bd_obj); - } - } - } - } - } - else if(direction == "right" || direction == "left"){ - var asLen = apply_end_c - apply_str_c + 1; - - for(var i = apply_str_r; i <= apply_end_r; i++){ - var copyD = copyData[i - apply_str_r]; - - var applyData = luckysheet.dropCell.getApplyData(copyD, csLen, asLen); - - if(direction == "right"){ - for(var j = apply_str_c; j <= apply_end_c; j++){ - var cell = applyData[j - apply_str_c]; - - if(cell.f != null){ - var f = "=" + luckysheet.formula.functionCopy(cell.f, "right", j - apply_str_c + 1); - var v = luckysheet.formula.execfunction(f, i, j, true); - - cell.f = v[2]; - cell.v = v[1]; - - if(cell.spl != null){ - cell.spl = v[3].data; - } - else{ - if(luckysheet.func_methods.isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ - if(cell.v == Infinity || cell.v == -Infinity){ - cell.m = cell.v.toString(); - } - else{ - if(cell.v.toString().indexOf("e") > -1){ - var len = cell.v.toString().split(".")[1].split("e")[0].length; - if(len > 5){ - len = 5; - } - - cell.m = cell.v.toExponential(len).toString(); - } - else{ - var mask = luckysheet.mask.genarate(Math.round(cell.v * 1000000000) / 1000000000); - cell.m = mask[0].toString(); - } - } - - cell.ct = { "fa": "General", "t": "n" }; - } - else{ - var mask = luckysheet.mask.genarate(cell.v); - cell.m = mask[0].toString(); - cell.ct = mask[1]; - } - } - } - - d[i][j] = cell; - - //边框 - var bd_r = i; - var bd_c = copy_str_c + (j - apply_str_c) % csLen; - - if(borderInfoCompute[bd_r + "_" + bd_c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": i, - "col_index": j, - "l": borderInfoCompute[bd_r + "_" + bd_c].l, - "r": borderInfoCompute[bd_r + "_" + bd_c].r, - "t": borderInfoCompute[bd_r + "_" + bd_c].t, - "b": borderInfoCompute[bd_r + "_" + bd_c].b - } - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[i + "_" + j]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": i, - "col_index": j, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - cfg["borderInfo"].push(bd_obj); - } - } - } - if(direction == "left"){ - for(var j = apply_end_c; j >= apply_str_c; j--){ - var cell = applyData[apply_end_c - j]; - - if(cell.f != null){ - var f = "=" + luckysheet.formula.functionCopy(cell.f, "left", apply_end_c - j + 1); - var v = luckysheet.formula.execfunction(f, i, j, true); - - cell.f = v[2]; - cell.v = v[1]; - - if(cell.spl != null){ - cell.spl = v[3].data; - } - else{ - if(luckysheet.func_methods.isRealNum(cell.v) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(cell.v)){ - if(cell.v == Infinity || cell.v == -Infinity){ - cell.m = cell.v.toString(); - } - else{ - if(cell.v.toString().indexOf("e") > -1){ - var len = cell.v.toString().split(".")[1].split("e")[0].length; - if(len > 5){ - len = 5; - } - - cell.m = cell.v.toExponential(len).toString(); - } - else{ - var mask = luckysheet.mask.genarate(Math.round(cell.v * 1000000000) / 1000000000); - cell.m = mask[0].toString(); - } - } - - cell.ct = { "fa": "General", "t": "n" }; - } - else{ - var mask = luckysheet.mask.genarate(cell.v); - cell.m = mask[0].toString(); - cell.ct = mask[1]; - } - } - } - - d[i][j] = cell; - - //边框 - var bd_r = i; - var bd_c = copy_end_c - (apply_end_c - j) % csLen; - - if(borderInfoCompute[bd_r + "_" + bd_c]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": i, - "col_index": j, - "l": borderInfoCompute[bd_r + "_" + bd_c].l, - "r": borderInfoCompute[bd_r + "_" + bd_c].r, - "t": borderInfoCompute[bd_r + "_" + bd_c].t, - "b": borderInfoCompute[bd_r + "_" + bd_c].b - } - } - - cfg["borderInfo"].push(bd_obj); - } - else if(borderInfoCompute[i + "_" + j]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": i, - "col_index": j, - "l": null, - "r": null, - "t": null, - "b": null - } - } - - cfg["borderInfo"].push(bd_obj); - } - } - } - } - } - - //条件格式 - var cdformat = $.extend(true, [], file["luckysheet_conditionformat_save"]); - if(cdformat != null && cdformat.length > 0){ - for(var i = 0; i < cdformat.length; i++){ - var cdformat_cellrange = cdformat[i].cellrange; - - var emptyRange = []; - - for(var j = 0; j < cdformat_cellrange.length; j++){ - var range = luckysheet.conditionformat.CFSplitRange(cdformat_cellrange[j], {"row": copyRange["row"], "column": copyRange["column"]}, {"row": applyRange["row"], "column": applyRange["column"]}, "operatePart"); - if(range.length > 0){ - emptyRange = emptyRange.concat(range); - } - } - - if(emptyRange.length > 0){ - cdformat[i].cellrange.push(applyRange); - } - } - } - - //刷新一次表格 - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, cdformat); - - luckysheet.selectHightlightShow(); - }, - getCopyData: function(d, r1, r2, c1, c2, direction){ - var copyData = []; - - if(direction == "down" || direction == "up"){ - var a1 = c1, a2 = c2, b1 = r1, b2 = r2; - } - else if(direction == "right" || direction == "left"){ - var a1 = r1, a2 = r2, b1 = c1, b2 = c2; - } - - for(var a = a1; a <= a2; a++){ - var obj = {}; - - var arrData = []; - var arrIndex = []; - var text = ""; - var extendNumberStr = null; - var isSameStr = true; - - for(var b = b1; b <= b2; b++){ - //单元格 - if(direction == "down" || direction == "up"){ - var data = d[b][a]; - } - else if(direction == "right" || direction == "left"){ - var data = d[a][b]; - } - //单元格值类型 - if(!!data && !!data["v"] && data["f"] == null){ - if(!!data["ct"] && data["ct"]["t"] == "n"){ - var str = "number"; - extendNumberStr = null; - } - else if(!!data["ct"] && data["ct"]["t"] == "d"){ - var str = "date"; - extendNumberStr = null; - } - else if(luckysheet.dropCell.isExtendNumber(data["m"])[0]){ - var str = "extendNumber"; - - if(extendNumberStr == null){ - isSameStr = true; - extendNumberStr = luckysheet.dropCell.isExtendNumber(data["m"])[1]; - } - else{ - if(luckysheet.dropCell.isExtendNumber(data["m"])[1] != extendNumberStr){ - isSameStr = false; - extendNumberStr = luckysheet.dropCell.isExtendNumber(data["m"])[1]; - } - else{ - isSameStr = true; - } - } - } - else if(luckysheet.dropCell.isChnNumber(data["m"])){ - var str = "chnNumber"; - extendNumberStr = null; - } - else if(luckysheet.dropCell.isChnWeek2(data["m"])){ - var str = "chnWeek2"; - extendNumberStr = null; - } - else if(luckysheet.dropCell.isChnWeek3(data["m"])){ - var str = "chnWeek3"; - extendNumberStr = null; - } - else{ - var str = "other"; - extendNumberStr = null; - } - } - else{ - var str = "other"; - extendNumberStr = null; - } - // - if(str == "extendNumber"){ - if(b == b1){ - if(b1 == b2){ - text = str; - arrData.push(data); - arrIndex.push(b - b1 + 1); - - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - text = str; - arrData.push(data); - arrIndex.push(b - b1 + 1); - } - } - else if(b == b2){ - if(text == str && isSameStr){ - arrData.push(data); - arrIndex.push(b - b1 + 1); - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - } - else{ - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - - text = str; - arrData = []; - arrData.push(data); - arrIndex = []; - arrIndex.push(b - b1 + 1); - - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - } - } - else{ - if(text == str && isSameStr){ - arrData.push(data); - arrIndex.push(b - b1 + 1); - } - else{ - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - text = str; - arrData = []; - arrData.push(data); - arrIndex = []; - arrIndex.push(b - b1 + 1); - } - } - } - else{ - if(b == b1){ - if(b1 == b2){ - text = str; - arrData.push(data); - arrIndex.push(b - b1 + 1); - - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - text = str; - arrData.push(data); - arrIndex.push(b - b1 + 1); - } - } - else if(b == b2){ - if(text == str){ - arrData.push(data); - arrIndex.push(b - b1 + 1); - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - } - else{ - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - - text = str; - arrData = []; - arrData.push(data); - arrIndex = []; - arrIndex.push(b - b1 + 1); - - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - } - } - else{ - if(text == str){ - arrData.push(data); - arrIndex.push(b - b1 + 1); - } - else{ - if(text in obj){ - obj[text].push({"data": arrData, "index": arrIndex}); - } - else{ - obj[text] = []; - obj[text].push({"data": arrData, "index": arrIndex}); - } - text = str; - arrData = []; - arrData.push(data); - arrIndex = []; - arrIndex.push(b - b1 + 1); - } - } - } - } - - copyData.push(obj); - } - - return copyData; - }, - getApplyData: function(copyD, csLen, asLen){ - var applyData = []; - - var direction = luckysheet.dropCell.direction; - var type = luckysheet.dropCell.applyType; - - var num = Math.floor(asLen / csLen); - var rsd = asLen % csLen; - - //纯数字类型 - var copyD_number = copyD["number"]; - var applyD_number = []; - if(!!copyD_number){ - for(var i = 0; i < copyD_number.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_number[i]["index"], rsd); - var len = copyD_number[i]["index"].length * num + s; - if(type == "1" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_number[i]["data"], len, direction, type, "number"); - } - else if(type == "2"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_number[i]["data"], len, direction, type); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_number[i]["data"], len, direction, "0"); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_number[i]["index"]); - applyD_number.push({"data": arrData, "index": arrIndex}); - } - } - //扩展数字型(即一串字符最后面的是数字) - var copyD_extendNumber = copyD["extendNumber"]; - var applyD_extendNumber = []; - if(!!copyD_extendNumber){ - for(var i = 0; i < copyD_extendNumber.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_extendNumber[i]["index"], rsd); - var len = copyD_extendNumber[i]["index"].length * num + s; - if(type == "1" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_extendNumber[i]["data"], len, direction, type, "extendNumber"); - } - else if(type == "2"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_extendNumber[i]["data"], len, direction, type); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_extendNumber[i]["data"], len, direction, "0"); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_extendNumber[i]["index"]); - applyD_extendNumber.push({"data": arrData, "index": arrIndex}); - } - } - //日期类型 - var copyD_date = copyD["date"]; - var applyD_date = []; - if(!!copyD_date){ - for(var i = 0; i < copyD_date.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_date[i]["index"], rsd); - var len = copyD_date[i]["index"].length * num + s; - if(type == "1" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_date[i]["data"], len, direction, type, "date"); - } - else if(type == "8"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_date[i]["data"], len, direction, "0"); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_date[i]["data"], len, direction, type); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_date[i]["index"]); - applyD_date.push({"data": arrData, "index": arrIndex}); - } - } - //中文小写数字 或 一~日 - var copyD_chnNumber = copyD["chnNumber"]; - var applyD_chnNumber = []; - if(!!copyD_chnNumber){ - for(var i = 0; i < copyD_chnNumber.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_chnNumber[i]["index"], rsd); - var len = copyD_chnNumber[i]["index"].length * num + s; - if(type == "1" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnNumber[i]["data"], len, direction, type, "chnNumber"); - } - else if(type == "2" || type == "8"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnNumber[i]["data"], len, direction, type); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnNumber[i]["data"], len, direction, "0"); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_chnNumber[i]["index"]); - applyD_chnNumber.push({"data": arrData, "index": arrIndex}); - } - } - //周一~周日 - var copyD_chnWeek2 = copyD["chnWeek2"]; - var applyD_chnWeek2 = []; - if(!!copyD_chnWeek2){ - for(var i = 0; i < copyD_chnWeek2.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_chnWeek2[i]["index"], rsd); - var len = copyD_chnWeek2[i]["index"].length * num + s; - if(type == "1" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnWeek2[i]["data"], len, direction, type, "chnWeek2"); - } - else if(type == "2"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnWeek2[i]["data"], len, direction, type); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnWeek2[i]["data"], len, direction, "0"); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_chnWeek2[i]["index"]); - applyD_chnWeek2.push({"data": arrData, "index": arrIndex}); - } - } - //星期一~星期日 - var copyD_chnWeek3 = copyD["chnWeek3"]; - var applyD_chnWeek3 = []; - if(!!copyD_chnWeek3){ - for(var i = 0; i < copyD_chnWeek3.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_chnWeek3[i]["index"], rsd); - var len = copyD_chnWeek3[i]["index"].length * num + s; - if(type == "1" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnWeek3[i]["data"], len, direction, type, "chnWeek3"); - } - else if(type == "2"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnWeek3[i]["data"], len, direction, type); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_chnWeek3[i]["data"], len, direction, "0"); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_chnWeek3[i]["index"]); - applyD_chnWeek3.push({"data": arrData, "index": arrIndex}); - } - } - //其它 - var copyD_other = copyD["other"]; - var applyD_other = []; - if(!!copyD_other){ - for(var i = 0; i < copyD_other.length; i++){ - var s = luckysheet.dropCell.getLenS(copyD_other[i]["index"], rsd); - var len = copyD_other[i]["index"].length * num + s; - if(type == "2" || type == "3"){ - var arrData = luckysheet.dropCell.getDataByType(copyD_other[i]["data"], len, direction, type); - } - else{ - var arrData = luckysheet.dropCell.getDataByType(copyD_other[i]["data"], len, direction, "0"); - } - var arrIndex = luckysheet.dropCell.getDataIndex(csLen, asLen, copyD_other[i]["index"]); - applyD_other.push({"data": arrData, "index": arrIndex}); - } - } - // - for(var x = 1; x <= asLen; x++){ - if(applyD_number.length > 0){ - for(var y = 0; y < applyD_number.length; y++){ - if(x in applyD_number[y]["index"]){ - applyData.push(applyD_number[y]["data"][applyD_number[y]["index"][x]]); - } - } - } - if(applyD_extendNumber.length > 0){ - for(var y = 0; y < applyD_extendNumber.length; y++){ - if(x in applyD_extendNumber[y]["index"]){ - applyData.push(applyD_extendNumber[y]["data"][applyD_extendNumber[y]["index"][x]]); - } - } - } - if(applyD_date.length > 0){ - for(var y = 0; y < applyD_date.length; y++){ - if(x in applyD_date[y]["index"]){ - applyData.push(applyD_date[y]["data"][applyD_date[y]["index"][x]]); - } - } - } - if(applyD_chnNumber.length > 0){ - for(var y = 0; y < applyD_chnNumber.length; y++){ - if(x in applyD_chnNumber[y]["index"]){ - applyData.push(applyD_chnNumber[y]["data"][applyD_chnNumber[y]["index"][x]]); - } - } - } - if(applyD_chnWeek2.length > 0){ - for(var y = 0; y < applyD_chnWeek2.length; y++){ - if(x in applyD_chnWeek2[y]["index"]){ - applyData.push(applyD_chnWeek2[y]["data"][applyD_chnWeek2[y]["index"][x]]); - } - } - } - if(applyD_chnWeek3.length > 0){ - for(var y = 0; y < applyD_chnWeek3.length; y++){ - if(x in applyD_chnWeek3[y]["index"]){ - applyData.push(applyD_chnWeek3[y]["data"][applyD_chnWeek3[y]["index"][x]]); - } - } - } - if(applyD_other.length > 0){ - for(var y = 0; y < applyD_other.length; y++){ - if(x in applyD_other[y]["index"]){ - applyData.push(applyD_other[y]["data"][applyD_other[y]["index"][x]]); - } - } - } - } - - return applyData; - }, - getLenS: function(indexArr, rsd){ - var s = 0; - for(var j = 0; j < indexArr.length; j++){ - if(indexArr[j] <= rsd){ - s++; - } - else{ - break; - } - } - return s; - }, - getDataIndex: function(csLen, asLen, indexArr){ - var obj = {}; - - var num = Math.floor(asLen / csLen); - var rsd = asLen % csLen; - - var sum = 0; - if(num > 0){ - for(var i = 1; i <= num; i++){ - for(var j = 0; j < indexArr.length; j++){ - obj[indexArr[j] + (i - 1) * csLen] = sum; - sum++; - } - } - for(var a = 0; a < indexArr.length; a++){ - if(indexArr[a] <= rsd){ - obj[indexArr[a] + csLen * num] = sum; - sum++; - } - else{ - break; - } - } - } - else{ - for(var a = 0; a < indexArr.length; a++){ - if(indexArr[a] <= rsd){ - obj[indexArr[a]] = sum; - sum++; - } - else{ - break; - } - } - } - - return obj; - }, - getDataByType: function(data, len, direction, type ,dataType){ - var applyData = []; - - if(type == "0"){ //复制单元格 - if(direction == "up" || direction == "left"){ - data.reverse(); - } - applyData = luckysheet.dropCell.FillCopy(data, len); - } - else if(type == "1"){ //填充序列 - if(dataType == "number"){ - //数据类型是 数字 - applyData = luckysheet.dropCell.FillSeries(data, len, direction); - } - else if(dataType == "extendNumber"){ - //扩展数字(一串字符最后面的是数字) - if(data.length == 1){ - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillExtendNumber(data, len, step); - } - else{ - var dataNumArr = []; - for(var i = 0; i < data.length; i++){ - var txt = data[i]["m"]; - dataNumArr.push(Number(luckysheet.dropCell.isExtendNumber(txt)[2])); - } - - if(direction == "up" || direction == "left"){ - data.reverse(); - dataNumArr.reverse(); - } - - if(luckysheet.dropCell.isEqualDiff(dataNumArr)){ - //等差数列,以等差为step - var step = dataNumArr[1] - dataNumArr[0]; - applyData = luckysheet.dropCell.FillExtendNumber(data, len, step); - } - else{ - //不是等差数列,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(dataType == "date"){ - //数据类型是 日期 - if(data.length == 1){ - //以一天为step - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillDays(data, len, step); - } - else{ - if(direction == "up" || direction == "left"){ - data.reverse(); - } - - var judgeDate = luckysheet.dropCell.judgeDate(data); - if(judgeDate[0] && judgeDate[3]){ - //日一样,月差为等差数列,以月差为step - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - applyData = luckysheet.dropCell.FillMonths(data, len, step); - } - else if(!judgeDate[0] && judgeDate[2]){ - //日不一样,日差为等差数列,以日差为step - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); - applyData = luckysheet.dropCell.FillDays(data, len, step); - } - else{ - //其它,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(dataType == "chnNumber"){ - //数据类型是 中文小写数字 - if(data.length == 1){ - if(data[0]["m"] == "日" || luckysheet.dropCell.ChineseToNumber(data[0]["m"]) < 7){ - //数字小于7,以周一~周日序列填充 - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillChnWeek(data, len, step); - } - else{ - //数字大于7,以中文小写数字序列填充 - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillChnNumber(data, len, step); - } - } - else{ - var hasweek = false; - for(var i = 0; i < data.length; i++){ - if(data[i]["m"] == "日"){ - hasweek = true; - break; - } - } - - var dataNumArr = []; - var weekIndex = 0; - for(var i = 0; i < data.length; i++){ - if(data[i]["m"] == "日"){ - if(i == 0){ - dataNumArr.push(0); - } - else{ - weekIndex++; - dataNumArr.push(weekIndex * 7); - } - } - else if(hasweek && luckysheet.dropCell.ChineseToNumber(data[i]["m"]) > 0 && luckysheet.dropCell.ChineseToNumber(data[i]["m"]) < 7){ - dataNumArr.push(luckysheet.dropCell.ChineseToNumber(data[i]["m"]) + weekIndex * 7); - } - else{ - dataNumArr.push(luckysheet.dropCell.ChineseToNumber(data[i]["m"])); - } - } - - if(direction == "up" || direction == "left"){ - data.reverse(); - dataNumArr.reverse(); - } - - if(luckysheet.dropCell.isEqualDiff(dataNumArr)){ - if(hasweek || (dataNumArr[dataNumArr.length - 1] < 6 && dataNumArr[0] > 0) || (dataNumArr[0] < 6 && dataNumArr[dataNumArr.length - 1] > 0)){ - //以周一~周日序列填充 - var step = dataNumArr[1] - dataNumArr[0]; - applyData = luckysheet.dropCell.FillChnWeek(data, len, step); - } - else{ - //以中文小写数字序列填充 - var step = dataNumArr[1] - dataNumArr[0]; - applyData = luckysheet.dropCell.FillChnNumber(data, len, step); - } - } - else{ - //不是等差数列,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(dataType == "chnWeek2"){ - //周一~周日 - if(data.length == 1){ - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillChnWeek2(data, len, step); - } - else{ - var dataNumArr = []; - var weekIndex = 0; - - for(var i = 0; i < data.length; i++){ - var lastTxt = data[i]["m"].substr(data[i]["m"].length - 1, 1); - if(data[i]["m"] == "周日"){ - if(i == 0){ - dataNumArr.push(0); - } - else{ - weekIndex++; - dataNumArr.push(weekIndex * 7); - } - } - else{ - dataNumArr.push(luckysheet.dropCell.ChineseToNumber(lastTxt) + weekIndex * 7); - } - } - - if(direction == "up" || direction == "left"){ - data.reverse(); - dataNumArr.reverse(); - } - - if(luckysheet.dropCell.isEqualDiff(dataNumArr)){ - //等差数列,以等差为step - var step = dataNumArr[1] - dataNumArr[0]; - applyData = luckysheet.dropCell.FillChnWeek2(data, len, step); - } - else{ - //不是等差数列,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(dataType == "chnWeek3"){ - //星期一~星期日 - if(data.length == 1){ - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillChnWeek3(data, len, step); - } - else{ - var dataNumArr = []; - var weekIndex = 0; - - for(var i = 0; i < data.length; i++){ - var lastTxt = data[i]["m"].substr(data[i]["m"].length - 1, 1); - if(data[i]["m"] == "星期日"){ - if(i == 0){ - dataNumArr.push(0); - } - else{ - weekIndex++; - dataNumArr.push(weekIndex * 7); - } - } - else{ - dataNumArr.push(luckysheet.dropCell.ChineseToNumber(lastTxt) + weekIndex * 7); - } - } - - if(direction == "up" || direction == "left"){ - data.reverse(); - dataNumArr.reverse(); - } - - if(luckysheet.dropCell.isEqualDiff(dataNumArr)){ - //等差数列,以等差为step - var step = dataNumArr[1] - dataNumArr[0]; - applyData = luckysheet.dropCell.FillChnWeek3(data, len, step); - } - else{ - //不是等差数列,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else{ - //数据类型是 其它 - if(direction == "up" || direction == "left"){ - data.reverse(); - } - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - else if(type == "2"){ //仅填充格式 - if(direction == "up" || direction == "left"){ - data.reverse(); - } - applyData = luckysheet.dropCell.FillOnlyFormat(data, len); - } - else if(type == "3"){ //不带格式填充 - var dataArr = luckysheet.dropCell.getDataByType(data, len, direction, "1" ,dataType); - applyData = luckysheet.dropCell.FillWithoutFormat(dataArr); - } - else if(type == "4"){ //以天数填充 - if(data.length == 1){ - //以一天为step - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillDays(data, len, step); - } - else if(data.length == 2){ - //以日差为step - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); - applyData = luckysheet.dropCell.FillDays(data, len, step); - } - else{ - if(direction == "up" || direction == "left"){ - data.reverse(); - } - - var judgeDate = luckysheet.dropCell.judgeDate(data); - if(judgeDate[0] && judgeDate[3]){ - //日一样,且月差为等差数列,以月差为step - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - applyData = luckysheet.dropCell.FillMonths(data, len, step); - } - else if(!judgeDate[0] && judgeDate[2]){ - //日不一样,且日差为等差数列,以日差为step - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); - applyData = luckysheet.dropCell.FillDays(data, len, step); - } - else{ - //日差不是等差数列,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(type == "5"){ //以工作日填充 - if(data.length == 1){ - //以一天为step(若那天为休息日,则跳过) - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - - var newLen = Math.round(len * 1.5); - for(var i = 1; i <= newLen; i++){ - var d = $.extend(true, {}, data[0]); - - var day = moment(d["m"]).add(i, "days").day(); - if(day == 0 || day == 6){ - continue; - } - - var date = moment(d["m"]).add(step * i, "days").format("YYYY-MM-DD"); - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - - if(applyData.length == len){ - break; - } - } - } - else if(data.length == 2){ - if(moment(data[1]["m"]).date() == moment(data[0]["m"]).date() && moment(data[1]["m"]).diff(moment(data[0]["m"]), "months") != 0){ - //日一样,且月差大于一月,以月差为step(若那天为休息日,则向前取最近的工作日) - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var day = moment(data[data.length - 1]).add(step * i, "months").day(); - if(day == 0){ - var date = moment(data[data.length - 1]).add(step * i, "months").subtract(2, "days").format("YYYY-MM-DD"); - } - else if(day == 6){ - var date = moment(data[data.length - 1]).add(step * i, "months").subtract(1, "days").format("YYYY-MM-DD"); - } - else{ - var date = moment(data[data.length - 1]).add(step * i, "months").format("YYYY-MM-DD"); - } - - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - else{ - //日不一样 - if(Math.abs(moment(data[1]["m"]).diff(moment(data[0]["m"]))) > 7){ - //若日差大于7天,以一月为step(若那天是休息日,则向前取最近的工作日) - if(direction == "down" || direction == "right"){ - var step_month = 1; - } - else if(direction == "up" || direction == "left"){ - var step_month = -1; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); - } - - var day = moment(d["m"]).add(step, "days").day(); - if(day == 0){ - var date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); - } - else if(day == 6){ - var date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); - } - else{ - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - } - - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - else{ - //若日差小于等于7天,以7天为step(若那天是休息日,则向前取最近的工作日) - if(direction == "down" || direction == "right"){ - var step_day = 7; - } - else if(direction == "up" || direction == "left"){ - var step_day = -7; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_day * num, "days").diff(moment(d["m"]), "days"); - } - - var day = moment(d["m"]).add(step, "days").day(); - if(day == 0){ - var date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); - } - else if(day == 6){ - var date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); - } - else{ - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - } - - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - } - } - else{ - var judgeDate = luckysheet.dropCell.judgeDate(data); - if(judgeDate[0] && judgeDate[3]){ - //日一样,且月差为等差数列,以月差为step(若那天为休息日,则向前取最近的工作日) - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var day = moment(data[data.length - 1]["m"]).add(step * i, "months").day(); - if(day == 0){ - var date = moment(data[data.length - 1]["m"]).add(step * i, "months").subtract(2, "days").format("YYYY-MM-DD"); - } - else if(day == 6){ - var date = moment(data[data.length - 1]["m"]).add(step * i, "months").subtract(1, "days").format("YYYY-MM-DD"); - } - else{ - var date = moment(data[data.length - 1]["m"]).add(step * i, "months").format("YYYY-MM-DD"); - } - - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - else if(!judgeDate[0] && judgeDate[2]){ - //日不一样,且日差为等差数列 - if(Math.abs(moment(data[1]["m"]).diff(moment(data[0]["m"]))) > 7){ - //若日差大于7天,以一月为step(若那天是休息日,则向前取最近的工作日) - if(direction == "down" || direction == "right"){ - var step_month = 1; - } - else if(direction == "up" || direction == "left"){ - var step_month = -1; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); - } - - var day = moment(d["m"]).add(step, "days").day(); - if(day == 0){ - var date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); - } - else if(day == 6){ - var date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); - } - else{ - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - } - - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - else{ - //若日差小于等于7天,以7天为step(若那天是休息日,则向前取最近的工作日) - if(direction == "down" || direction == "right"){ - var step_day = 7; - } - else if(direction == "up" || direction == "left"){ - var step_day = -7; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_day * num, "days").diff(moment(d["m"]), "days"); - } - - var day = moment(d["m"]).add(step, "days").day(); - if(day == 0){ - var date = moment(d["m"]).add(step, "days").subtract(2, "days").format("YYYY-MM-DD"); - } - else if(day == 6){ - var date = moment(d["m"]).add(step, "days").subtract(1, "days").format("YYYY-MM-DD"); - } - else{ - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - } - - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - } - else{ - //日差不是等差数列,复制数据 - if(direction == "up" || direction == "left"){ - data.reverse(); - } - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(type == "6"){ //以月填充 - if(data.length == 1){ - //以一月为step - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillMonths(data, len, step); - } - else if(data.length == 2){ - if(moment(data[1]["m"]).date() == moment(data[0]["m"]).date() && moment(data[1]["m"]).diff(moment(data[0]["m"]), "months") != 0){ - //日一样,且月差大于一月,以月差为step - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - applyData = luckysheet.dropCell.FillMonths(data, len, step); - } - else{ - //以一月为step - if(direction == "down" || direction == "right"){ - var step_month = 1; - } - else if(direction == "up" || direction == "left"){ - var step_month = -1; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); - } - - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - } - else{ - var judgeDate = luckysheet.dropCell.judgeDate(data); - if(judgeDate[0] && judgeDate[3]){ - //日一样,且月差为等差数列,以月差为step - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - applyData = luckysheet.dropCell.FillMonths(data, len, step); - } - else if(!judgeDate[0] && judgeDate[2]){ - //日不一样,且日差为等差数列,以一月为step - if(direction == "down" || direction == "right"){ - var step_month = 1; - } - else if(direction == "up" || direction == "left"){ - var step_month = -1; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_month * num, "months").diff(moment(d["m"]), "days"); - } - - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - else{ - //日差不是等差数列,复制数据 - if(direction == "up" || direction == "left"){ - data.reverse(); - } - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(type == "7"){ //以年填充 - if(data.length == 1){ - //以一年为step - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillYears(data, len, step); - } - else if(data.length == 2){ - if(moment(data[1]["m"]).date() == moment(data[0]["m"]).date() && moment(data[1]["m"]).month() == moment(data[0]["m"]).month() && moment(data[1]["m"]).diff(moment(data[0]["m"]), "years") != 0){ - //日月一样,且年差大于一年,以年差为step - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "years"); - applyData = luckysheet.dropCell.FillYears(data, len, step); - } - else{ - //以一年为step - if(direction == "down" || direction == "right"){ - var step_year = 1; - } - else if(direction == "up" || direction == "left"){ - var step_year = -1; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_year * num, "years").diff(moment(d["m"]), "days"); - } - - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - } - else{ - var judgeDate = luckysheet.dropCell.judgeDate(data); - if(judgeDate[0] && judgeDate[1] && judgeDate[4]){ - //日月一样,且年差为等差数列,以年差为step - if(direction == "up" || direction == "left"){ - data.reverse(); - } - var step = moment(data[1]["m"]).diff(moment(data[0]["m"]), "years"); - applyData = luckysheet.dropCell.FillYears(data, len, step); - } - else if((judgeDate[0] && judgeDate[3]) || judgeDate[2]){ - //日一样且月差为等差数列,或天差为等差数列,以一年为step - if(direction == "down" || direction == "right"){ - var step_year = 1; - } - else if(direction == "up" || direction == "left"){ - var step_year = -1; - data.reverse(); - } - - var step; //以数组第一个为对比 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = Math.ceil(i / data.length); - if(index == 0){ - step = moment(d["m"]).add(step_year * num, "years").diff(moment(d["m"]), "days"); - } - - var date = moment(d["m"]).add(step, "days").format("YYYY-MM-DD"); - d["m"] = date; - d["v"] = luckysheet.mask.genarate(date)[2]; - applyData.push(d); - } - } - else{ - //日差不是等差数列,复制数据 - if(direction == "up" || direction == "left"){ - data.reverse(); - } - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - else if(type == "8"){ //以中文小写数字序列填充 - if(data.length == 1){ - if(direction == "down" || direction == "right"){ - var step = 1; - } - else if(direction == "up" || direction == "left"){ - var step = -1; - } - applyData = luckysheet.dropCell.FillChnNumber(data, len, step); - } - else{ - var dataNumArr = []; - for(var i = 0; i < data.length; i++){ - dataNumArr.push(luckysheet.dropCell.ChineseToNumber(data[i]["m"])); - } - - if(direction == "up" || direction == "left"){ - data.reverse(); - dataNumArr.reverse(); - } - - if(luckysheet.dropCell.isEqualDiff(dataNumArr)){ - var step = dataNumArr[1] - dataNumArr[0]; - applyData = luckysheet.dropCell.FillChnNumber(data, len, step); - } - else{ - //不是等差数列,复制数据 - applyData = luckysheet.dropCell.FillCopy(data, len); - } - } - } - - return applyData; - }, - FillCopy: function(data, len){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - applyData.push(d); - } - - return applyData; - }, - FillSeries: function(data, len, direction){ - var applyData = []; - - var dataNumArr = []; - for(var j = 0; j < data.length; j++){ - dataNumArr.push(Number(data[j]["v"])); - } - - if(data.length > 2 && luckysheet.dropCell.isEqualRatio(dataNumArr)){ - //等比数列 - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - if(direction == "down" || direction == "right"){ - var num = Number(data[data.length -1]["v"]) * Math.pow(Number(data[1]["v"]) / Number(data[0]["v"]), i); - } - else if(direction == "up" || direction == "left"){ - var num = Number(data[0]["v"]) / Math.pow(Number(data[1]["v"]) / Number(data[0]["v"]), i); - } - - d["v"] = num; - d["m"] = luckysheet.mask.update(d["ct"]["fa"], num); - applyData.push(d); - } - } - else{ - //线性数列 - var xArr = luckysheet.dropCell.getXArr(data.length); - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - if(direction == "down" || direction == "right"){ - var y = luckysheet.dropCell.forecast(data.length + i, dataNumArr, xArr); - } - else if(direction == "up" || direction == "left"){ - var y = luckysheet.dropCell.forecast(1 - i, dataNumArr, xArr); - } - - d["v"] = y; - d["m"] = luckysheet.mask.update(d["ct"]["fa"], y); - applyData.push(d); - } - } - - return applyData; - }, - FillExtendNumber: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var last = data[data.length - 1]["m"]; - var lastTxt = luckysheet.dropCell.isExtendNumber(last)[1]; - var lastNum = luckysheet.dropCell.isExtendNumber(last)[2]; - - var num = Math.abs(Number(lastNum) + step * i); - d["v"] = lastTxt + num.toString(); - d["m"] = lastTxt + num.toString(); - - applyData.push(d); - } - - return applyData; - }, - FillOnlyFormat: function(data, len){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - delete d["f"]; - delete d["m"]; - delete d["v"]; - - applyData.push(d); - } - - return applyData; - }, - FillWithoutFormat: function(dataArr){ - var applyData = []; - - for(var i = 0; i < dataArr.length; i++){ - var d = $.extend(true, {}, dataArr[i]); - - if(d["f"] == null){ - var obj = {"m": d["v"].toString(), "v": d["v"]}; - } - else{ - var obj = {"f": d["f"], "m": d["v"].toString(), "v": d["v"]}; - } - - applyData.push(obj); - } - - return applyData; - }, - FillDays: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var date = luckysheet.mask.update("yyyy-MM-dd", d["v"]); - date = moment(date).add(step * i, "days").format("YYYY-MM-DD"); - - d["v"] = luckysheet.mask.genarate(date)[2]; - d["m"] = luckysheet.mask.update(d["ct"]["fa"], d["v"]); - - applyData.push(d); - } - - return applyData; - }, - FillMonths: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var date = luckysheet.mask.update("yyyy-MM-dd", d["v"]); - date = moment(date).add(step * i, "months").format("YYYY-MM-DD"); - - d["v"] = luckysheet.mask.genarate(date)[2]; - d["m"] = luckysheet.mask.update(d["ct"]["fa"], d["v"]); - - applyData.push(d); - } - - return applyData; - }, - FillYears: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var date = luckysheet.mask.update("yyyy-MM-dd", d["v"]); - date = moment(date).add(step * i, "years").format("YYYY-MM-DD"); - - d["v"] = luckysheet.mask.genarate(date)[2]; - d["m"] = luckysheet.mask.update(d["ct"]["fa"], d["v"]); - - applyData.push(d); - } - - return applyData; - }, - FillChnWeek: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - if(data[data.length - 1]["m"] == "日"){ - var num = 7 + step * i; - } - else{ - var num = luckysheet.dropCell.ChineseToNumber(data[data.length - 1]["m"]) + step * i; - } - - if(num < 0){ - num = Math.ceil(Math.abs(num) / 7) * 7 + num; - } - - var rsd = num % 7; - if(rsd == 0){ - d["m"] = "日"; - d["v"] = "日"; - } - else if(rsd == 1){ - d["m"] = "一"; - d["v"] = "一"; - } - else if(rsd == 2){ - d["m"] = "二"; - d["v"] = "二"; - } - else if(rsd == 3){ - d["m"] = "三"; - d["v"] = "三"; - } - else if(rsd == 4){ - d["m"] = "四"; - d["v"] = "四"; - } - else if(rsd == 5){ - d["m"] = "五"; - d["v"] = "五"; - } - else if(rsd == 6){ - d["m"] = "六"; - d["v"] = "六"; - } - - applyData.push(d); - } - - return applyData; - }, - FillChnWeek2: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - if(data[data.length - 1]["m"] == "周日"){ - var num = 7 + step * i; - } - else{ - var last = data[data.length - 1]["m"]; - var txt = last.substr(last.length - 1, 1); - var num = luckysheet.dropCell.ChineseToNumber(txt) + step * i; - } - - if(num < 0){ - num = Math.ceil(Math.abs(num) / 7) * 7 + num; - } - - var rsd = num % 7; - if(rsd == 0){ - d["m"] = "周日"; - d["v"] = "周日"; - } - else if(rsd == 1){ - d["m"] = "周一"; - d["v"] = "周一"; - } - else if(rsd == 2){ - d["m"] = "周二"; - d["v"] = "周二"; - } - else if(rsd == 3){ - d["m"] = "周三"; - d["v"] = "周三"; - } - else if(rsd == 4){ - d["m"] = "周四"; - d["v"] = "周四"; - } - else if(rsd == 5){ - d["m"] = "周五"; - d["v"] = "周五"; - } - else if(rsd == 6){ - d["m"] = "周六"; - d["v"] = "周六"; - } - - applyData.push(d); - } - - return applyData; - }, - FillChnWeek3: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - if(data[data.length - 1]["m"] == "星期日"){ - var num = 7 + step * i; - } - else{ - var last = data[data.length - 1]["m"]; - var txt = last.substr(last.length - 1, 1); - var num = luckysheet.dropCell.ChineseToNumber(txt) + step * i; - } - - if(num < 0){ - num = Math.ceil(Math.abs(num) / 7) * 7 + num; - } - - var rsd = num % 7; - if(rsd == 0){ - d["m"] = "星期日"; - d["v"] = "星期日"; - } - else if(rsd == 1){ - d["m"] = "星期一"; - d["v"] = "星期一"; - } - else if(rsd == 2){ - d["m"] = "星期二"; - d["v"] = "星期二"; - } - else if(rsd == 3){ - d["m"] = "星期三"; - d["v"] = "星期三"; - } - else if(rsd == 4){ - d["m"] = "星期四"; - d["v"] = "星期四"; - } - else if(rsd == 5){ - d["m"] = "星期五"; - d["v"] = "星期五"; - } - else if(rsd == 6){ - d["m"] = "星期六"; - d["v"] = "星期六"; - } - - applyData.push(d); - } - - return applyData; - }, - FillChnNumber: function(data, len, step){ - var applyData = []; - - for(var i = 1; i <= len; i++){ - var index = (i - 1) % data.length; - var d = $.extend(true, {}, data[index]); - - var num = luckysheet.dropCell.ChineseToNumber(data[data.length - 1]["m"]) + step * i; - if(num <= 0){ - var txt = "零"; - } - else{ - var txt = luckysheet.dropCell.NumberToChinese(num); - } - - d["v"] = txt; - d["m"] = txt.toString(); - applyData.push(d); - } - - return applyData; - }, - isEqualDiff: function(arr){ - var diff = true; - var step = arr[1] - arr[0]; - for(var i = 1; i < arr.length; i++){ - if(arr[i] - arr[i - 1] != step){ - diff = false; - break; - } - } - return diff; - }, - isEqualRatio: function(arr){ - var ratio = true; - var step = arr[1] / arr[0]; - for(var i = 1; i < arr.length; i++){ - if(arr[i] / arr[i - 1] != step){ - ratio = false; - break; - } - } - return ratio; - }, - getXArr: function(len){ - var xArr = []; - for(var i = 1; i <= len; i++){ - xArr.push(i); - } - return xArr; - }, - forecast: function(x, yArr, xArr){ - function getAverage(arr){ - var sum = 0; - for(var i = 0; i < arr.length; i++){ - sum += arr[i]; - } - return sum / arr.length; - } - var ax = getAverage(xArr); //x数组 平均值 - var ay = getAverage(yArr); //y数组 平均值 - - var sum_d = 0, sum_n = 0; - for(var j = 0; j < xArr.length; j++){ - //分母和 - sum_d += (xArr[j] - ax)*(yArr[j] - ay); - //分子和 - sum_n += (xArr[j] - ax)*(xArr[j] - ax); - } - - if(sum_n == 0){ - var b = 1; - } - else{ - var b = sum_d / sum_n; - } - var a = ay - b * ax; - - return Math.round((a + b * x) * 100000) / 100000; - }, - judgeDate: function(data){ - var isSameDay = true, isSameMonth = true, isEqualDiffDays = true, isEqualDiffMonths = true, isEqualDiffYears = true; - var sameDay = moment(data[0]["m"]).date(), sameMonth = moment(data[0]["m"]).month(); - var equalDiffDays = moment(data[1]["m"]).diff(moment(data[0]["m"]), "days"); - var equalDiffMonths = moment(data[1]["m"]).diff(moment(data[0]["m"]), "months"); - var equalDiffYears = moment(data[1]["m"]).diff(moment(data[0]["m"]), "years"); - - for(var i = 1; i < data.length; i++){ - //日是否一样 - if(moment(data[i]["m"]).date() != sameDay){ - isSameDay = false; - } - //月是否一样 - if(moment(data[i]["m"]).month() != sameMonth){ - isSameMonth = false; - } - //日差是否是 等差数列 - if(moment(data[i]["m"]).diff(moment(data[i - 1]["m"]), "days") != equalDiffDays){ - isEqualDiffDays = false; - } - //月差是否是 等差数列 - if(moment(data[i]["m"]).diff(moment(data[i - 1]["m"]), "months") != equalDiffMonths){ - isEqualDiffMonths = false; - } - //年差是否是 等差数列 - if(moment(data[i]["m"]).diff(moment(data[i - 1]["m"]), "years") != equalDiffYears){ - isEqualDiffYears = false; - } - } - if(equalDiffDays == 0){ - isEqualDiffDays = false; - } - if(equalDiffMonths == 0){ - isEqualDiffMonths = false; - } - if(equalDiffYears == 0){ - isEqualDiffYears = false; - } - - return [isSameDay, isSameMonth, isEqualDiffDays, isEqualDiffMonths, isEqualDiffYears]; - } - } - - //定位 - luckysheet.locationCell = { - createDialog: function(){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-locationCell-dialog").remove(); - - var content = '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-locationCell-dialog", "addclass": "luckysheet-locationCell-dialog", "title": "定位条件", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-locationCell-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-locationCell-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - }, - init: function(){ - $(document).on("click", "#luckysheet-locationCell-dialog .listItem input:radio", function(e){ - $("#luckysheet-locationCell-dialog .listItem input:checkbox").prop("disabled", true); - $("#luckysheet-locationCell-dialog .listItem .subbox label").css("color", "#666"); - - $(this).siblings(".subbox").find("input:checkbox").removeAttr("disabled"); - $(this).siblings(".subbox").find("label").css("color", "#000"); - }); - - $(document).off("click.locationCellConfirm").on("click.locationCellConfirm", "#luckysheet-locationCell-dialog #luckysheet-locationCell-dialog-confirm", function(){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-locationCell-dialog").hide(); - - var $radio = $("#luckysheet-locationCell-dialog .listItem input:radio:checked"); - var id = $radio.attr("id"); - if(id == "locationConstant" || id == "locationFormula"){ - var $checkbox = $radio.siblings(".subbox").find("input:checkbox:checked"); - if($checkbox.length == 0){ - return; - } - else if($checkbox.length == 5){ - var value = "all"; - } - else{ - var arr = []; - for(var i = 0; i < $checkbox.length; i++){ - if($($checkbox[i]).hasClass("date")){ - arr.push("d"); - } - else if($($checkbox[i]).hasClass("number")){ - arr.push("n"); - } - else if($($checkbox[i]).hasClass("string")){ - arr.push("s,g"); - } - else if($($checkbox[i]).hasClass("boolean")){ - arr.push("b"); - } - else if($($checkbox[i]).hasClass("error")){ - arr.push("e"); - } - } - var value = arr.join(","); - } - - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - //单个单元格 - var range = [{"row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1]}]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - luckysheet.locationCell.apply(range, id, value); - } - else if(id == "locationStepRow"){ - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1])){ - if(luckysheet.isEditMode()){ - alert("请选择最少两行"); - } - else{ - luckysheet.tooltip.info("提示", "请选择最少两行"); - } - return; - } - - var range = $.extend(true, [], luckysheet_select_save); - - luckysheet.locationCell.apply(range, "locationStepRow"); - } - else if(id == "locationStepColumn"){ - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - if(luckysheet.isEditMode()){ - alert("请选择最少两列"); - } - else{ - luckysheet.tooltip.info("提示", "请选择最少两列"); - } - return; - } - - var range = $.extend(true, [], luckysheet_select_save); - - luckysheet.locationCell.apply(range, "locationStepColumn"); - } - else{ - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - //单个单元格 - var range = [{"row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1]}]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - luckysheet.locationCell.apply(range, id); - } - }); - }, - apply: function(range, type, value){ - var rangeArr = []; - - if(type == "locationFormula" || type == "locationConstant" || type == "locationNull" || type == "locationCF"){ - if(type == "locationFormula"){ //公式 - if(value == "all"){ - var str = "luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].v != null && luckysheet.flowdata[r][c].f != null"; - } - else{ - var str = "luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].v != null && luckysheet.flowdata[r][c].f != null && luckysheet.flowdata[r][c].ct != null && value.indexOf(luckysheet.flowdata[r][c].ct.t) != -1"; - } - } - else if(type == "locationConstant"){ //常量 - if(value == "all"){ - var str = "luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].v != null && luckysheet.flowdata[r][c].f == null && luckysheet.flowdata[r][c].ct != null"; - } - else{ - var str = "luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].v != null && luckysheet.flowdata[r][c].f == null && luckysheet.flowdata[r][c].ct != null && value.indexOf(luckysheet.flowdata[r][c].ct.t) != -1"; - } - } - else if(type == "locationNull"){ //空值 - var str = "luckysheet.flowdata[r] != null && (luckysheet.flowdata[r][c] == null || luckysheet.flowdata[r][c].v == null || luckysheet.flowdata[r][c].v == '') "; - } - else if(type == "locationCF"){ //条件格式 - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - var ruleArr = luckysheetfile[index]["luckysheet_conditionformat_save"]; - var data = luckysheetfile[index]["data"]; - - var computeMap = luckysheet.conditionformat.compute(ruleArr, data); - - if(JSON.stringify(computeMap) == "{}"){ - if(luckysheet.isEditMode()){ - alert("未找到单元格"); - } - else{ - luckysheet.tooltip.info("提示", "未找到单元格"); - } - - return; - } - - var str = "(r + '_' + c) in computeMap"; - } - - for(var s = 0; s < range.length; s++){ - var st_r = range[s].row[0], ed_r = range[s].row[1]; - var st_c = range[s].column[0], ed_c = range[s].column[1]; - - if(st_r == ed_r){ - var stack_stc = null, stack_edc = null; - - var r = st_r; - for(var c = st_c; c <= ed_c; c++){ - if(c == st_c){ - if(eval(str)){ - stack_stc = c; - } - else{ - stack_stc = null; - } - } - else if(c == ed_c){ - if(eval(str)){ - if(stack_stc == null){ - rangeArr.push({"row": [st_r, ed_r], "column": [ed_c, ed_c]}); - } - else{ - rangeArr.push({"row": [st_r, ed_r], "column": [stack_stc, ed_c]}); - } - } - else{ - if(stack_edc == null && stack_stc != null){ - rangeArr.push({"row": [st_r, ed_r], "column": [stack_stc, stack_stc]}); - } - else if(stack_edc != null){ - rangeArr.push({"row": [st_r, ed_r], "column": [stack_stc, stack_edc]}); - } - } - } - else{ - if(eval(str)){ - if(stack_stc == null){ - stack_stc = c; - } - else{ - stack_edc = c; - } - } - else{ - if(stack_edc == null && stack_stc != null){ - rangeArr.push({"row": [st_r, ed_r], "column": [stack_stc, stack_stc]}); - stack_stc = null; - } - else if(stack_edc != null){ - rangeArr.push({"row": [st_r, ed_r], "column": [stack_stc, stack_edc]}); - stack_stc = null; - stack_edc = null; - } - } - } - } - } - else{ - var stack = {}; - - for(var r = st_r; r <= ed_r; r++){ - stack[r] = []; - var stack_stc = null, stack_edc = null; - - for(var c = st_c; c <= ed_c; c++){ - if(c == ed_c){ - if(eval(str)){ - if(stack_stc == null){ - stack[r].push({"status": false, "range": [ed_c, ed_c]}); - } - else{ - stack[r].push({"status": false, "range": [stack_stc, ed_c]}); - } - } - else{ - if(stack_edc == null && stack_stc != null){ - stack[r].push({"status": false, "range": [stack_stc, stack_stc]}); - } - else if(stack_edc != null){ - stack[r].push({"status": false, "range": [stack_stc, stack_edc]}); - } - } - } - else if(c == st_c){ - if(eval(str)){ - stack_stc = c; - } - else{ - stack_stc = null; - } - } - else{ - if(eval(str)){ - if(stack_stc == null){ - stack_stc = c; - } - else{ - stack_edc = c; - } - } - else{ - if(stack_edc == null && stack_stc != null){ - stack[r].push({"status": false, "range": [stack_stc, stack_stc]}); - stack_stc = null; - } - else if(stack_edc != null){ - stack[r].push({"status": false, "range": [stack_stc, stack_edc]}); - stack_stc = null; - stack_edc = null; - } - } - } - } - } - - for(var i = st_r; i <= ed_r; i++){ - if(i == ed_r){ - if(stack[i].length > 0){ - for(var j = 0; j < stack[i].length; j++){ - if(!stack[i][j].status){ - rangeArr.push({"row": [ed_r, ed_r], "column": stack[i][j].range}); - } - } - } - } - else{ - if(stack[i].length > 0){ - for(var j = 0; j < stack[i].length; j++){ - if(!stack[i][j].status){ - var b = 0; - - for(var a = 1; a < (ed_r - i); a++){ - if(stack[i + a][j] != null && stack[i + a][j].range[0] == stack[i][j].range[0] && stack[i + a][j].range[1] == stack[i][j].range[1]){ - b = a; - stack[i + a][j].status = true; - } - else{ - break; - } - } - - rangeArr.push({"row": [i, i + b], "column": stack[i][j].range}); - } - } - } - } - } - } - } - } - else if(type == "locationStepRow"){ //间隔行 - for(var s = 0; s < range.length; s++){ - if(range[s].row[0] == range[s].row[1]){ - continue; - } - - var st_r = range[s].row[0], ed_r = range[s].row[1]; - var st_c = range[s].column[0], ed_c = range[s].column[1]; - - for(var r = st_r; r <= ed_r; r++){ - if((r - st_r) % 2 == 0){ - rangeArr.push({"row": [r, r], "column": [st_c, ed_c]}); - } - } - } - } - else if(type == "locationStepColumn"){ //间隔列 - for(var s = 0; s < range.length; s++){ - if(range[s].column[0] == range[s].column[1]){ - continue; - } - - var st_r = range[s].row[0], ed_r = range[s].row[1]; - var st_c = range[s].column[0], ed_c = range[s].column[1]; - - for(var c = st_c; c <= ed_c; c++){ - if((c - st_c) % 2 == 0){ - rangeArr.push({"row": [st_r, ed_r], "column": [c, c]}); - } - } - } - } - - if(rangeArr.length == 0){ - if(luckysheet.isEditMode()){ - alert("未找到单元格"); - } - else{ - luckysheet.tooltip.info("提示", "未找到单元格"); - } - } - else{ - luckysheet_select_save = rangeArr; - luckysheet.selectHightlightShow(); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var row = visibledatarow[luckysheet_select_save[0]["row"][1]], row_pre = luckysheet_select_save[0]["row"][0] - 1 == -1 ? 0 : visibledatarow[luckysheet_select_save[0]["row"][0] - 1]; - var col = visibledatacolumn[luckysheet_select_save[0]["column"][1]], col_pre = luckysheet_select_save[0]["column"][0] - 1 == -1 ? 0 : visibledatacolumn[luckysheet_select_save[0]["column"][0] - 1]; - - if (col - scrollLeft - winW + 20 > 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); - } - else if (col_pre - scrollLeft - 20 < 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); - } - - if (row - scrollTop - winH + 20 > 0) { - $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); - } - else if (row_pre - scrollTop - 20 < 0) { - $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); - } - } - } - } - - //更多格式 - luckysheet.moreFormat = { - moneyFmtList: [ - { - "name": "人民币", - "pos": "before", - "value": "¥" - }, { - "name": "美元", - "pos": "before", - "value": "$" - }, { - "name": "欧元", - "pos": "before", - "value": "€" - }, { - "name": "英镑", - "pos": "before", - "value": "£" - }, { - "name": "港元", - "pos": "before", - "value": "$" - }, { - "name": "日元", - "pos": "before", - "value": "¥" - }, { - "name": "阿尔巴尼亚列克", - "pos": "before", - "value": "Lek" - }, { - "name": "阿尔及利亚第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "阿富汗尼", - "pos": "after", - "value": "Af" - }, { - "name": "阿根廷比索", - "pos": "before", - "value": "$" - }, { - "name": "阿拉伯联合酋长国迪拉姆", - "pos": "before", - "value": "dh" - }, { - "name": "阿鲁巴弗罗林", - "pos": "before", - "value": "Afl" - }, { - "name": "阿曼里亚尔", - "pos": "before", - "value": "Rial" - }, { - "name": "阿塞拜疆马纳特", - "pos": "before", - "value": "?" - }, { - "name": "埃及镑", - "pos": "before", - "value": "£" - }, { - "name": "埃塞俄比亚比尔", - "pos": "before", - "value": "Birr" - }, { - "name": "安哥拉宽扎", - "pos": "before", - "value": "Kz" - }, { - "name": "澳大利亚元", - "pos": "before", - "value": "$" - }, { - "name": "澳门元", - "pos": "before", - "value": "MOP" - }, { - "name": "巴巴多斯元", - "pos": "before", - "value": "$" - }, { - "name": "巴布亚新几内亚基那", - "pos": "before", - "value": "PGK" - }, { - "name": "巴哈马元", - "pos": "before", - "value": "$" - }, { - "name": "巴基斯坦卢比", - "pos": "before", - "value": "Rs" - }, { - "name": "巴拉圭瓜拉尼", - "pos": "after", - "value": "Gs" - }, { - "name": "巴林第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "巴拿马巴波亚", - "pos": "before", - "value": "B/" - }, { - "name": "巴西里亚伊", - "pos": "before", - "value": "R$" - }, { - "name": "白俄罗斯卢布", - "pos": "after", - "value": "р" - }, { - "name": "百慕大元", - "pos": "before", - "value": "$" - }, { - "name": "保加利亚列弗", - "pos": "before", - "value": "lev" - }, { - "name": "冰岛克朗", - "pos": "before", - "value": "kr" - }, { - "name": "波黑可兑换马克", - "pos": "before", - "value": "KM" - }, { - "name": "波兰兹罗提", - "pos": "after", - "value": "z?" - }, { - "name": "玻利维亚诺", - "pos": "before", - "value": "Bs" - }, { - "name": "伯利兹元", - "pos": "before", - "value": "$" - }, { - "name": "博茨瓦纳普拉", - "pos": "before", - "value": "P" - }, { - "name": "不丹努扎姆", - "pos": "before", - "value": "Nu" - }, { - "name": "布隆迪法郎", - "pos": "before", - "value": "FBu" - }, { - "name": "朝鲜圆", - "pos": "before", - "value": "?KP" - }, { - "name": "丹麦克朗", - "pos": "after", - "value": "kr" - }, { - "name": "东加勒比元", - "pos": "before", - "value": "$" - }, { - "name": "多米尼加比索", - "pos": "before", - "value": "RD$" - }, { - "name": "俄国卢布", - "pos": "after", - "value": "?" - }, { - "name": "厄立特里亚纳克法", - "pos": "before", - "value": "Nfk" - }, { - "name": "非洲金融共同体法郎", - "pos": "before", - "value": "CFA" - }, { - "name": "菲律宾比索", - "pos": "before", - "value": "?" - }, { - "name": "斐济元", - "pos": "before", - "value": "$" - }, { - "name": "佛得角埃斯库多", - "pos": "before", - "value": "CVE" - }, { - "name": "福克兰群岛镑", - "pos": "before", - "value": "£" - }, { - "name": "冈比亚达拉西", - "pos": "before", - "value": "GMD" - }, { - "name": "刚果法郎", - "pos": "before", - "value": "FrCD" - }, { - "name": "哥伦比亚比索", - "pos": "before", - "value": "$" - }, { - "name": "哥斯达黎加科朗", - "pos": "before", - "value": "?" - }, { - "name": "古巴比索", - "pos": "before", - "value": "$" - }, { - "name": "古巴可兑换比索", - "pos": "before", - "value": "$" - }, { - "name": "圭亚那元", - "pos": "before", - "value": "$" - }, { - "name": "哈萨克斯坦坚戈", - "pos": "before", - "value": "?" - }, { - "name": "海地古德", - "pos": "before", - "value": "HTG" - }, { - "name": "韩元", - "pos": "before", - "value": "?" - }, { - "name": "荷属安的列斯盾", - "pos": "before", - "value": "NAf." - }, { - "name": "洪都拉斯拉伦皮拉", - "pos": "before", - "value": "L" - }, { - "name": "吉布提法郎", - "pos": "before", - "value": "Fdj" - }, { - "name": "吉尔吉斯斯坦索姆", - "pos": "before", - "value": "KGS" - }, { - "name": "几内亚法郎", - "pos": "before", - "value": "FG" - }, { - "name": "加拿大元", - "pos": "before", - "value": "$" - }, { - "name": "加纳塞地", - "pos": "before", - "value": "GHS" - }, { - "name": "柬埔寨瑞尔", - "pos": "before", - "value": "Riel" - }, { - "name": "捷克克朗", - "pos": "after", - "value": "K?" - }, { - "name": "津巴布韦元", - "pos": "before", - "value": "$" - }, { - "name": "卡塔尔里亚尔", - "pos": "before", - "value": "Rial" - }, { - "name": "开曼群岛元", - "pos": "before", - "value": "$" - }, { - "name": "科摩罗法郎", - "pos": "before", - "value": "CF" - }, { - "name": "科威特第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "克罗地亚库纳", - "pos": "before", - "value": "kn" - }, { - "name": "肯尼亚先令", - "pos": "before", - "value": "Ksh" - }, { - "name": "莱索托洛蒂", - "pos": "before", - "value": "LSL" - }, { - "name": "老挝基普", - "pos": "before", - "value": "?" - }, { - "name": "黎巴嫩镑", - "pos": "before", - "value": "L£" - }, { - "name": "立陶宛立特", - "pos": "before", - "value": "Lt" - }, { - "name": "利比亚第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "利比亚元", - "pos": "before", - "value": "$" - }, { - "name": "卢旺达法郎", - "pos": "before", - "value": "RF" - }, { - "name": "罗马尼亚列伊", - "pos": "before", - "value": "RON" - }, { - "name": "马达加斯加阿里亚里", - "pos": "before", - "value": "Ar" - }, { - "name": "马尔代夫拉菲亚", - "pos": "before", - "value": "Rf" - }, { - "name": "马拉维克瓦查", - "pos": "before", - "value": "MWK" - }, { - "name": "马来西亚林吉特", - "pos": "before", - "value": "RM" - }, { - "name": "马其顿戴第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "毛里求斯卢比", - "pos": "before", - "value": "MURs" - }, { - "name": "毛里塔尼亚乌吉亚", - "pos": "before", - "value": "MRO" - }, { - "name": "蒙古图格里克", - "pos": "before", - "value": "?" - }, { - "name": "孟加拉塔卡", - "pos": "before", - "value": "?" - }, { - "name": "秘鲁新索尔", - "pos": "before", - "value": "S/" - }, { - "name": "缅甸开亚特", - "pos": "before", - "value": "K" - }, { - "name": "摩尔多瓦列伊", - "pos": "before", - "value": "MDL" - }, { - "name": "摩洛哥迪拉姆", - "pos": "before", - "value": "dh" - }, { - "name": "莫桑比克梅蒂卡尔", - "pos": "before", - "value": "MTn" - }, { - "name": "墨西哥比索", - "pos": "before", - "value": "$" - }, { - "name": "纳米比亚元", - "pos": "before", - "value": "$" - }, { - "name": "南非兰特", - "pos": "before", - "value": "R" - }, { - "name": "南苏丹镑", - "pos": "before", - "value": "£" - }, { - "name": "尼加拉瓜科多巴", - "pos": "before", - "value": "C$" - }, { - "name": "尼泊尔卢比", - "pos": "before", - "value": "Rs" - }, { - "name": "尼日利亚奈拉", - "pos": "before", - "value": "?" - }, { - "name": "挪威克朗", - "pos": "after", - "value": "kr" - }, { - "name": "乔治亚拉瑞", - "pos": "before", - "value": "GEL" - }, { - "name": "人民币(离岸)", - "pos": "before", - "value": "¥" - }, { - "name": "瑞典克朗", - "pos": "after", - "value": "kr" - }, { - "name": "瑞士法郎", - "pos": "before", - "value": "CHF" - }, { - "name": "塞尔维亚第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "塞拉利昂利昂", - "pos": "before", - "value": "SLL" - }, { - "name": "塞舌尔卢比", - "pos": "before", - "value": "SCR" - }, { - "name": "沙特里亚尔", - "pos": "before", - "value": "Rial" - }, { - "name": "圣多美多布拉", - "pos": "before", - "value": "Db" - }, { - "name": "圣赫勒拿群岛磅", - "pos": "before", - "value": "£" - }, { - "name": "斯里兰卡卢比", - "pos": "before", - "value": "Rs" - }, { - "name": "斯威士兰里兰吉尼", - "pos": "before", - "value": "SZL" - }, { - "name": "苏丹镑", - "pos": "before", - "value": "SDG" - }, { - "name": "苏里南元", - "pos": "before", - "value": "$" - }, { - "name": "所罗门群岛元", - "pos": "before", - "value": "$" - }, { - "name": "索马里先令", - "pos": "before", - "value": "SOS" - }, { - "name": "塔吉克斯坦索莫尼", - "pos": "before", - "value": "Som" - }, { - "name": "太平洋法郎", - "pos": "after", - "value": "FCFP" - }, { - "name": "泰国铢", - "pos": "before", - "value": "?" - }, { - "name": "坦桑尼亚先令", - "pos": "before", - "value": "TSh" - }, { - "name": "汤加潘加", - "pos": "before", - "value": "T$" - }, { - "name": "特立尼达和多巴哥元", - "pos": "before", - "value": "$" - }, { - "name": "突尼斯第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "土耳其里拉", - "pos": "before", - "value": "?" - }, { - "name": "瓦努阿图瓦图", - "pos": "before", - "value": "VUV" - }, { - "name": "危地马拉格查尔", - "pos": "before", - "value": "Q" - }, { - "name": "委内瑞拉博利瓦", - "pos": "before", - "value": "Bs" - }, { - "name": "文莱元", - "pos": "before", - "value": "$" - }, { - "name": "乌干达先令", - "pos": "before", - "value": "UGX" - }, { - "name": "乌克兰格里夫尼亚", - "pos": "before", - "value": "грн." - }, { - "name": "乌拉圭比索", - "pos": "before", - "value": "$" - }, { - "name": "乌兹别克斯坦苏姆", - "pos": "before", - "value": "so?m" - }, { - "name": "西萨摩亚塔拉", - "pos": "before", - "value": "WST" - }, { - "name": "新加坡元", - "pos": "before", - "value": "$" - }, { - "name": "新台币", - "pos": "before", - "value": "NT$" - }, { - "name": "新西兰元", - "pos": "before", - "value": "$" - }, { - "name": "匈牙利福林", - "pos": "before", - "value": "Ft" - }, { - "name": "叙利亚镑", - "pos": "before", - "value": "£" - }, { - "name": "牙买加元", - "pos": "before", - "value": "$" - }, { - "name": "亚美尼亚德拉姆", - "pos": "before", - "value": "Dram" - }, { - "name": "也门里亚尔", - "pos": "before", - "value": "Rial" - }, { - "name": "伊拉克第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "伊朗里亚尔", - "pos": "before", - "value": "Rial" - }, { - "name": "以色列新谢克尔", - "pos": "before", - "value": "?" - }, { - "name": "印度卢比", - "pos": "before", - "value": "?" - }, { - "name": "印度尼西亚卢比", - "pos": "before", - "value": "Rp" - }, { - "name": "约旦第纳尔", - "pos": "before", - "value": "din" - }, { - "name": "越南盾", - "pos": "after", - "value": "?" - }, { - "name": "赞比亚克瓦查", - "pos": "before", - "value": "ZMW" - }, { - "name": "直布罗陀镑", - "pos": "before", - "value": "£" - }, { - "name": "智利比索", - "pos": "before", - "value": "$" - }, { - "name": "中非金融合作法郎", - "pos": "before", - "value": "FCFA" - } - ], - dateFmtList: [ - { - "name": "1930-08-05", - "value": "yyyy-MM-dd" - }, - { - "name": "1930/8/5", - "value": "yyyy/MM/dd" - }, - { - "name": "1930年8月5日", - "value": 'yyyy"年"M"月"d"日"' - }, - { - "name": "08-05", - "value": "MM-dd" - }, - { - "name": "8-5", - "value": "M-d" - }, - { - "name": "8月5日", - "value": 'M"月"d"日"' - }, - { - "name": "13:30:30", - "value": "h:mm:ss" - }, - { - "name": "13:30", - "value": "h:mm" - }, - { - "name": "下午01:30", - "value": 'AM/PM hh:mm' - }, - { - "name": "下午1:30", - "value": 'AM/PM h:mm' - }, - { - "name": "下午1:30:30", - "value": 'AM/PM h:mm:ss' - }, - { - "name": "08-05 下午01:30", - "value": "MM-dd AM/PM hh:mm" - }, - // { - // "name": "1930年8月5日星期二", - // "value": '' - // }, - // { - // "name": "1930年8月5日星期二 下午1:30:30", - // "value": '' - // }, - ], - numFmtList: [ - { - "name": "1235", - "value": "0" - }, - { - "name": "1234.56", - "value": "0.00" - }, - { - "name": "1,235", - "value": "#,##0" - }, - { - "name": "1,234.56", - "value": "#,##0.00" - }, - { - "name": "1,235", - "value": "#,##0_);(#,##0)" - }, - { - "name": "1,235", - "value": "#,##0_);[Red](#,##0)" - }, - { - "name": "1,234.56", - "value": "#,##0.00_);(#,##0.00)" - }, - { - "name": "1,234.56", - "value": "#,##0.00_);[Red](#,##0.00)" - }, - { - "name": "$1,235", - "value": "$#,##0_);($#,##0)" - }, - { - "name": "$1,235", - "value": "$#,##0_);[Red]($#,##0)" - }, - { - "name": "$1,234.56", - "value": "$#,##0.00_);($#,##0.00)" - }, - { - "name": "$1,234.56", - "value": "$#,##0.00_);[Red]($#,##0.00)" - }, - { - "name": "1234.56", - "value": "@" - }, - { - "name": "123456%", - "value": "0%" - }, - { - "name": "123456.00%", - "value": "0.00%" - }, - { - "name": "1.23E+03", - "value": "0.00E+00" - }, - { - "name": "1.2E+3", - "value": "##0.0E+0" - }, - { - "name": "1234 5/9", - "value": "# ?/?" - }, - { - "name": "1234 14/25", - "value": "# ??/??" - }, - { - "name": "$ 1,235", - "value": '_($* #,##0_);_(...($* "-"_);_(@_)' - }, - { - "name": "1,235", - "value": '_(* #,##0_);_(*..._(* "-"_);_(@_)' - }, - { - "name": "$ 1,234.56", - // "value": '_($* #,##0.00_)...* "-"??_);_(@_)' - "value": '_($* #,##0.00_);_(...($* "-"_);_(@_)' - }, - { - "name": "1,234.56", - "value": '_(* #,##0.00_);...* "-"??_);_(@_)' - }, - ], - createDialog: function(type){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-moreFormat-dialog").remove(); - - var title = "", content = ''; - if(type == "morecurrency"){ //货币 - title = "货币格式"; - - var listHtml = ''; - for(var i = 0; i < luckysheet.moreFormat.moneyFmtList.length; i++){ - var name = luckysheet.moreFormat.moneyFmtList[i]["name"]; - var pos = luckysheet.moreFormat.moneyFmtList[i]["pos"]; - var value = luckysheet.moreFormat.moneyFmtList[i]["value"]; - - listHtml += '
'+ - '
'+ name +'
'+ - '
'+ value +'
'+ - ''+ - '
'; - } - - content = '
'+ - '
'+ - ''+ - ''+ - '
'+ - '
'+ listHtml +'
'+ - '
'; - } - else if(type == "moredatetime"){ //日期时间 - title = "日期与时间格式"; - - var listHtml = ''; - for(var i = 0; i < luckysheet.moreFormat.dateFmtList.length; i++){ - var name = luckysheet.moreFormat.dateFmtList[i]["name"]; - var value = luckysheet.moreFormat.dateFmtList[i]["value"]; - - listHtml += '
'+ - '
'+ name +'
'+ - '
'+ value +'
'+ - '
'; - } - - content = '
'+ - '
'+ listHtml +'
'+ - '
'; - } - else if(type == "moredigit"){ //数字 - title = "数字格式"; - - var listHtml = ''; - for(var i = 0; i < luckysheet.moreFormat.numFmtList.length; i++){ - var name = luckysheet.moreFormat.numFmtList[i]["name"]; - var value = luckysheet.moreFormat.numFmtList[i]["value"]; - - listHtml += '
'+ - '
'+ name +'
'+ - '
'+ value +'
'+ - '
'; - } - - content = '
'+ - '
'+ listHtml +'
'+ - '
'; - } - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-moreFormat-dialog", "addclass": "luckysheet-moreFormat-dialog", "title": title, "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-moreFormat-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-moreFormat-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - $("#luckysheet-moreFormat-dialog .listbox .listItem").eq(0).addClass("on"); - }, - init: function(){ - //选择格式 - $(document).on("click", "#luckysheet-moreFormat-dialog .listbox .listItem", function(){ - $(this).addClass("on").siblings().removeClass("on"); - }); - - //确定 - $(document).off("click.moreFormatConfirm").on("click.moreFormatConfirm", "#luckysheet-moreFormat-dialog #luckysheet-moreFormat-dialog-confirm", function(){ - $("#luckysheet-moreFormat-dialog").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var value = $("#luckysheet-moreFormat-dialog .listbox .listItem.on .value").text(); - var id = $(this).parents("#luckysheet-moreFormat-dialog").find(".box").attr("id"); - - if(id == "morecurrency"){ //货币 - if(value.indexOf("?") != -1){ - return; - } - - var decimal = parseInt($("#luckysheet-moreFormat-dialog .decimal input").val().trim()); - - if(decimal.toString() == "NaN" || decimal < 0 || decimal > 9){ - if(luckysheet.isEditMode()){ - alert("小数位数必须在0-9之间!"); - } - else{ - luckysheet.tooltip.info("小数位数必须在0-9之间!", ""); - } - - return; - } - - var str = ""; - if(decimal > 0){ - for(var i = 1; i <= decimal; i++){ - str += "0"; - } - str = "0." + str; - } - else{ - str = "#"; - } - - var pos = $("#luckysheet-moreFormat-dialog .listbox .listItem.on input:hidden").val(); - - if(pos == "before"){ - str = '"'+value+'" ' + str; - } - else if(pos == "after"){ - str = str + ' "'+value+'"'; - } - - luckysheet.menuButton.updateFormat(d, "ct", str); - } - else if(id == "moredatetime"){ //日期时间 - luckysheet.menuButton.updateFormat(d, "ct", value); - } - else if(id == "moredigit"){ //数字 - luckysheet.menuButton.updateFormat(d, "ct", value); - } - }) - } - } - - //查找替换 - luckysheet.searchReplace = { - createDialog: function(source){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-search-replace").remove(); - - var content = '
' + - '查找' + - '替换' + - '
' + - '
' + - '
' + - '
查找内容:
' + - '
替换内容:
' + - '
' + - '
' + - '' + - '正则表达式匹配' + - '
' + - '
' + - '' + - '整词匹配' + - '
' + - '
' + - '' + - '区分大小写匹配' + - '
' + - '
' + - '
' + - '
' + - '' + - '' + - '' + - '' + - '
' + - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-search-replace", "addclass": "luckysheet-search-replace", "title": "", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-search-replace").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-search-replace").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - if(source == "0"){ - $("#luckysheet-search-replace #searchTab").addClass("on").siblings().removeClass("on"); - $("#luckysheet-search-replace #replaceInput").hide(); - $("#luckysheet-search-replace #replaceAllBtn").hide(); - $("#luckysheet-search-replace #replaceBtn").hide(); - } - else if(source == "1"){ - $("#luckysheet-search-replace #replaceTab").addClass("on").siblings().removeClass("on"); - $("#luckysheet-search-replace #replaceInput").show(); - $("#luckysheet-search-replace #replaceAllBtn").show(); - $("#luckysheet-search-replace #replaceBtn").show(); - } - }, - init: function(){ - //查找替换 切换 - $(document).off("click.SRtabBoxspan").on("click.SRtabBoxspan", "#luckysheet-search-replace .tabBox span", function(){ - $(this).addClass("on").siblings().removeClass("on"); - - var $id = $(this).attr("id"); - if($id == "searchTab"){ - $("#luckysheet-search-replace #replaceInput").hide(); - $("#luckysheet-search-replace #replaceAllBtn").hide(); - $("#luckysheet-search-replace #replaceBtn").hide(); - - $("#luckysheet-search-replace #searchInput input").focus(); - } - else if($id == "replaceTab"){ - $("#luckysheet-search-replace #replaceInput").show(); - $("#luckysheet-search-replace #replaceAllBtn").show(); - $("#luckysheet-search-replace #replaceBtn").show(); - - $("#luckysheet-search-replace #replaceInput input").focus(); - } - }); - - //查找下一个 - $(document).off("keyup.SRsearchInput").on("keyup.SRsearchInput", "#luckysheet-search-replace #searchInput input", function(event){ - var kcode = event.keyCode; - if(kcode == keycode.ENTER){ - luckysheet.searchReplace.searchNext(); - } - }); - $(document).off("click.SRsearchNextBtn").on("click.SRsearchNextBtn", "#luckysheet-search-replace #searchNextBtn", function(){ - luckysheet.searchReplace.searchNext(); - }); - - //查找全部 - $(document).off("click.SRsearchAllBtn").on("click.SRsearchAllBtn", "#luckysheet-search-replace #searchAllBtn", function(){ - luckysheet.searchReplace.searchAll(); - }); - $(document).off("click.SRsearchAllboxItem").on("click.SRsearchAllboxItem", "#luckysheet-search-replace #searchAllbox .boxItem", function(){ - $(this).addClass("on").siblings().removeClass("on"); - - var r = $(this).attr("data-row"); - var c = $(this).attr("data-col"); - var sheetIndex = $(this).attr("data-sheetIndex"); - - if(sheetIndex != luckysheet.currentSheetIndex){ - luckysheet.sheetmanage.changeSheetExec(sheetIndex); - } - - luckysheet_select_save = [ - { "row": [r, r], "column": [c, c] } - ]; - - luckysheet.selectHightlightShow(); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - if (col - scrollLeft - winW + 20 > 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); - } - else if (col_pre - scrollLeft - 20 < 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); - } - - if (row - scrollTop - winH + 20 > 0) { - $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); - } - else if (row_pre - scrollTop - 20 < 0) { - $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); - } - }); - - //替换 - $(document).off("click.SRreplaceBtn").on("click.SRreplaceBtn", "#luckysheet-search-replace #replaceBtn", function(){ - luckysheet.searchReplace.replace(); - }); - - //全部替换 - $(document).off("click.SRreplaceAllBtn").on("click.SRreplaceAllBtn", "#luckysheet-search-replace #replaceAllBtn", function(){ - luckysheet.searchReplace.replaceAll(); - }); - }, - searchNext: function(){ - var searchText = $("#luckysheet-search-replace #searchInput input").val(); - - if(searchText == "" || searchText == null){ - return; - } - - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - var range = [{ "row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1] }]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - var searchIndexArr = luckysheet.searchReplace.getSearchIndexArr(searchText, range); - - if(searchIndexArr.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有查找到该内容"); - } - else{ - luckysheet.tooltip.info("没有查找到该内容", ""); - } - - return; - } - - var count = 0; - - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - if(luckysheet_select_save.length == 0){ - count = 0; - } - else{ - for(var i = 0; i < searchIndexArr.length; i++){ - if(searchIndexArr[i].r == luckysheet_select_save[0].row[0] && searchIndexArr[i].c == luckysheet_select_save[0].column[0]){ - if(i == searchIndexArr.length - 1){ - count = 0; - } - else{ - count = i + 1; - } - - break; - } - } - } - - luckysheet_select_save = [ - { "row": [searchIndexArr[count].r, searchIndexArr[count].r], "column": [searchIndexArr[count].c, searchIndexArr[count].c] } - ]; - - - } - else{ - var rf = range[range.length - 1].row_focus; - var cf = range[range.length - 1].column_focus; - - for(var i = 0; i < searchIndexArr.length; i++){ - if(searchIndexArr[i].r == rf && searchIndexArr[i].c == cf){ - if(i == searchIndexArr.length - 1){ - count = 0; - } - else{ - count = i + 1; - } - - break; - } - } - - for(var s = 0; s < range.length; s++){ - var r1 = range[s].row[0], r2 = range[s].row[1]; - var c1 = range[s].column[0], c2 = range[s].column[1]; - - if(searchIndexArr[count].r >= r1 && searchIndexArr[count].r <= r2 && searchIndexArr[count].c >= c1 && searchIndexArr[count].c <= c2){ - var obj = range[s]; - obj["row_focus"] = searchIndexArr[count].r; - obj["column_focus"] = searchIndexArr[count].c; - range.splice(s, 1); - range.push(obj); - - break; - } - } - - luckysheet_select_save = range; - } - - luckysheet.selectHightlightShow(); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var row = visibledatarow[searchIndexArr[count].r], row_pre = searchIndexArr[count].r - 1 == -1 ? 0 : visibledatarow[searchIndexArr[count].r - 1]; - var col = visibledatacolumn[searchIndexArr[count].c], col_pre = searchIndexArr[count].c - 1 == -1 ? 0 : visibledatacolumn[searchIndexArr[count].c - 1]; - - if (col - scrollLeft - winW + 20 > 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); - } - else if (col_pre - scrollLeft - 20 < 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); - } - - if (row - scrollTop - winH + 20 > 0) { - $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); - } - else if (row_pre - scrollTop - 20 < 0) { - $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); - } - - if($("#searchAllbox").is(":visible")){ - $("#luckysheet-search-replace #searchAllbox .boxItem").removeClass("on"); - } - }, - searchAll: function(){ - $("#luckysheet-search-replace #searchAllbox").remove(); - - var searchText = $("#luckysheet-search-replace #searchInput input").val(); - - if(searchText == "" || searchText == null){ - return; - } - - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - var range = [{ "row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1] }]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - var searchIndexArr = luckysheet.searchReplace.getSearchIndexArr(searchText, range); - - if(searchIndexArr.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有查找到该内容"); - } - else{ - luckysheet.tooltip.info("没有查找到该内容", ""); - } - - return; - } - - var searchAllHtml = ''; - - for(var i = 0; i < searchIndexArr.length; i++){ - var valueShowEs = luckysheet.mask.valueShowEs(searchIndexArr[i].r, searchIndexArr[i].c, luckysheet.flowdata).toString(); - - if(valueShowEs.indexOf(" -1 && valueShowEs.indexOf(">") > -1){ - searchAllHtml += '
' + - '' + luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + '' + - '' + luckysheet.luckysheetchatatABC(searchIndexArr[i].c) + (searchIndexArr[i].r + 1) + '' + - '' + valueShowEs + '' + - '
'; - } - else{ - searchAllHtml += '
' + - '' + luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + '' + - '' + luckysheet.luckysheetchatatABC(searchIndexArr[i].c) + (searchIndexArr[i].r + 1) + '' + - '' + valueShowEs + '' + - '
'; - } - } - - $('
工作表单元格
' + searchAllHtml + '
').appendTo($("#luckysheet-search-replace")); - - $("#luckysheet-search-replace #searchAllbox .boxItem").eq(0).addClass("on").siblings().removeClass("on"); - - luckysheet_select_save = [ - { "row": [searchIndexArr[0].r, searchIndexArr[0].r], "column": [searchIndexArr[0].c, searchIndexArr[0].c] } - ]; - - luckysheet.selectHightlightShow(); - }, - getSearchIndexArr: function(searchText, range){ - var arr = []; - var obj = {}; - - //正则表达式匹配 - var regCheck = false; - if($("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")){ - regCheck = true; - } - - //整词匹配 - var wordCheck = false; - if($("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")){ - wordCheck = true; - } - - //区分大小写匹配 - var caseCheck = false; - if($("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")){ - caseCheck = true; - } - - for(var s = 0; s < range.length; s++){ - var r1 = range[s].row[0], r2 = range[s].row[1]; - var c1 = range[s].column[0], c2 = range[s].column[1]; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(cell != null){ - var value = luckysheet.mask.valueShowEs(r, c, luckysheet.flowdata); - - if(value == 0){ - value = value.toString(); - } - - if(value != null && value != ""){ - value = value.toString(); - - if(wordCheck){ //整词 - if(caseCheck){ - if(searchText == value){ - if(!((r + "_" + c) in obj)){ - obj[r + "_" + c] = 0; - arr.push({"r": r, "c": c}); - } - } - } - else{ - var txt = searchText.toLowerCase(); - if(txt == value.toLowerCase()){ - if(!((r + "_" + c) in obj)){ - obj[r + "_" + c] = 0; - arr.push({"r": r, "c": c}); - } - } - } - } - else if(regCheck){ //正则表达式 - if(caseCheck){ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "g"); - } - else{ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "ig"); - } - - if(reg.test(value)){ - if(!((r + "_" + c) in obj)){ - obj[r + "_" + c] = 0; - arr.push({"r": r, "c": c}); - } - } - } - else if(caseCheck){ //区分大小写 - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "g"); - - if(reg.test(value)){ - if(!((r + "_" + c) in obj)){ - obj[r + "_" + c] = 0; - arr.push({"r": r, "c": c}); - } - } - } - else{ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "ig"); - - if(reg.test(value)){ - if(!((r + "_" + c) in obj)){ - obj[r + "_" + c] = 0; - arr.push({"r": r, "c": c}); - } - } - } - } - } - } - } - } - - return arr; - }, - replace: function(){ - var searchText = $("#luckysheet-search-replace #searchInput input").val(); - - if(searchText == "" || searchText == null){ - if(luckysheet.isEditMode()){ - alert("请输入查找内容"); - } - else{ - luckysheet.tooltip.info("请输入查找内容", ""); - } - - return; - } - - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - var range = [{ "row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1] }]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - var searchIndexArr = luckysheet.searchReplace.getSearchIndexArr(searchText, range); - - if(searchIndexArr.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有可替换的内容"); - } - else{ - luckysheet.tooltip.info("没有可替换的内容", ""); - } - - return; - } - - var count = null; - - var rf = luckysheet_select_save[luckysheet_select_save.length - 1].row_focus; - var cf = luckysheet_select_save[luckysheet_select_save.length - 1].column_focus; - - for(var i = 0; i < searchIndexArr.length; i++){ - if(searchIndexArr[i].r == rf && searchIndexArr[i].c == cf){ - count = i; - break; - } - } - - if(count == null){ - if(searchIndexArr.length == 0){ - if(luckysheet.isEditMode()){ - alert("找不到匹配项"); - } - else{ - luckysheet.tooltip.info("找不到匹配项", ""); - } - - return; - } - else{ - count = 0; - } - } - - //正则表达式匹配 - var regCheck = false; - if($("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")){ - regCheck = true; - } - - //整词匹配 - var wordCheck = false; - if($("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")){ - wordCheck = true; - } - - //区分大小写匹配 - var caseCheck = false; - if($("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")){ - caseCheck = true; - } - - var replaceText = $("#luckysheet-search-replace #replaceInput input").val(); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - if(wordCheck){ - var r = searchIndexArr[count].r; - var c = searchIndexArr[count].c; - - var v = replaceText; - - luckysheet.setcellvalue(r, c, d, v); - } - else{ - if(caseCheck){ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "g"); - } - else{ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "ig"); - } - - var r = searchIndexArr[count].r; - var c = searchIndexArr[count].c; - - var v = luckysheet.mask.valueShowEs(r, c, d).toString().replace(reg, replaceText); - - luckysheet.setcellvalue(r, c, d, v); - } - - luckysheet_select_save = [{ "row": [r, r], "column": [c, c] }]; - - if($("#luckysheet-search-replace #searchAllbox").is(":visible")){ - $("#luckysheet-search-replace #searchAllbox").hide(); - } - - luckysheet.jfrefreshgrid(d, luckysheet_select_save); - luckysheet.selectHightlightShow(); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - if (col - scrollLeft - winW + 20 > 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); - } - else if (col_pre - scrollLeft - 20 < 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); - } - - if (row - scrollTop - winH + 20 > 0) { - $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); - } - else if (row_pre - scrollTop - 20 < 0) { - $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); - } - }, - replaceAll: function(){ - var searchText = $("#luckysheet-search-replace #searchInput input").val(); - - if(searchText == "" || searchText == null){ - if(luckysheet.isEditMode()){ - alert("请输入查找内容"); - } - else{ - luckysheet.tooltip.info("请输入查找内容", ""); - } - - return; - } - - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - var range = [{ "row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1] }]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - var searchIndexArr = luckysheet.searchReplace.getSearchIndexArr(searchText, range); - - if(searchIndexArr.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有可替换的内容"); - } - else{ - luckysheet.tooltip.info("没有可替换的内容", ""); - } - - return; - } - - //正则表达式匹配 - var regCheck = false; - if($("#luckysheet-search-replace #regCheck input[type='checkbox']").is(":checked")){ - regCheck = true; - } - - //整词匹配 - var wordCheck = false; - if($("#luckysheet-search-replace #wordCheck input[type='checkbox']").is(":checked")){ - wordCheck = true; - } - - //区分大小写匹配 - var caseCheck = false; - if($("#luckysheet-search-replace #caseCheck input[type='checkbox']").is(":checked")){ - caseCheck = true; - } - - var replaceText = $("#luckysheet-search-replace #replaceInput input").val(); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var range = []; - - if(wordCheck){ - for(var i = 0; i < searchIndexArr.length; i++){ - var r = searchIndexArr[i].r; - var c = searchIndexArr[i].c; - - var v = replaceText; - - luckysheet.setcellvalue(r, c, d, v); - - range.push({ "row": [r, r], "column": [c, c] }); - } - } - else{ - if(caseCheck){ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "g"); - } - else{ - var reg = new RegExp(luckysheet.func_methods.getRegExpStr(searchText), "ig"); - } - - for(var i = 0; i < searchIndexArr.length; i++){ - var r = searchIndexArr[i].r; - var c = searchIndexArr[i].c; - - var v = luckysheet.mask.valueShowEs(r, c, d).toString().replace(reg, replaceText); - - luckysheet.setcellvalue(r, c, d, v); - - range.push({ "row": [r, r], "column": [c, c] }); - } - } - - if($("#luckysheet-search-replace #searchAllbox").is(":visible")){ - $("#luckysheet-search-replace #searchAllbox").hide(); - } - - luckysheet.jfrefreshgrid(d, range); - - luckysheet_select_save = $.extend(true, [], range); - luckysheet.selectHightlightShow(); - - if(luckysheet.isEditMode()){ - alert("已经帮您搜索并进行了" + searchIndexArr.length + "处替换"); - } - else{ - luckysheet.tooltip.info("已经帮您搜索并进行了" + searchIndexArr.length + "处替换", ""); - } - } - } - - //分列 - luckysheet.splitColumn = { - createDialog: function(){ - $("#luckysheet-modal-dialog-mask").show(); - $("#luckysheet-splitColumn-dialog").remove(); - - var content = '
' + - '
分割符号
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '' + - '' + - '' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
数据预览
' + - '
' + - - '
' + - '
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-splitColumn-dialog", "addclass": "luckysheet-splitColumn-dialog", "title": "文本分列", "content": content, "botton": '', "style": "z-index:100003" })); - var $t = $("#luckysheet-splitColumn-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - $("#luckysheet-splitColumn-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show(); - - var dataArr = luckysheet.splitColumn.getDataArr(); - luckysheet.splitColumn.dataPreview(dataArr); - }, - init: function(){ - //数据预览 - $(document).off("change.SPCinpcheckbox").on("change.SPCcheckbox", "#luckysheet-splitColumn-dialog .box input[type='checkbox']", function(){ - var regStr = luckysheet.splitColumn.getRegStr(); - var dataArr = luckysheet.splitColumn.getDataArr(regStr); - luckysheet.splitColumn.dataPreview(dataArr); - }); - $(document).off("keyup.SPCinptext").on("keyup.SPCinptext", "#luckysheet-splitColumn-dialog .box input[type='text']", function(){ - if($(this).siblings("input[type='checkbox']").is(":checked")){ - var regStr = luckysheet.splitColumn.getRegStr(); - var dataArr = luckysheet.splitColumn.getDataArr(regStr); - luckysheet.splitColumn.dataPreview(dataArr); - } - }) - - //确定按钮 - $(document).off("click.SPCconfirm").on("click.SPCconfirm", "#luckysheet-splitColumn-dialog #luckysheet-splitColumn-dialog-confirm", function(){ - $("#luckysheet-modal-dialog-mask").hide(); - $("#luckysheet-splitColumn-dialog").hide(); - - var regStr = luckysheet.splitColumn.getRegStr(); - var dataArr = luckysheet.splitColumn.getDataArr(regStr); - - var r = luckysheet_select_save[0].row[0]; - var c = luckysheet_select_save[0].column[0]; - - if(dataArr[0].length == 1){ - return; - } - - var dataCover = false; - for(var i = 0; i < dataArr.length; i++){ - for(var j = 1; j < dataArr[0].length; j++){ - var cell = luckysheet.flowdata[r + i][c + j]; - - if(cell != null && cell.v != null){ - dataCover = true; - break; - } - } - } - - if(dataCover){ - var func1 = function(){ - luckysheet.splitColumn.update(r, c, dataArr); - } - luckysheet.tooltip.confirm("提示", "此处已有数据,是否替换它?", func1); - } - else{ - luckysheet.splitColumn.update(r, c, dataArr); - } - }); - }, - update: function(r, c, dataArr){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - for(var i = 0; i < dataArr.length; i++){ - for(var j = 0; j < dataArr[0].length; j++){ - var v = dataArr[i][j]; - luckysheet.setcellvalue(r + i, c + j, d, v); - } - } - - var st_r = luckysheet_select_save[0].row[0], - st_c = luckysheet_select_save[0].column[0]; - - var range = [{ "row": [st_r, st_r + dataArr.length - 1], "column": [st_c, st_c + dataArr[0].length - 1] }] - - luckysheet.jfrefreshgrid(d, range); - luckysheet.selectHightlightShow(); - }, - dataPreview: function(dataArr){ - $("#luckysheet-splitColumn-dialog #splitColumnData").empty(); - - var trHtml = ''; - for(var i = 0; i < dataArr.length; i++){ - var tdHtml = ''; - for(var j = 0; j < dataArr[0].length; j++){ - tdHtml += '' + dataArr[i][j] + ''; - } - - trHtml += '' + tdHtml + ''; - } - - var tableHtml = '' + trHtml + '
'; - - $("#luckysheet-splitColumn-dialog #splitColumnData").append(tableHtml); - }, - getRegStr: function(){ - var regStr = '', mark = 0; - - $("#luckysheet-splitColumn-dialog .box input[type='checkbox']:checked").each(function(i, e){ - var $id = $(e).attr("id"); - - if($id == "splitColumn_type_01"){ //Tab键 - regStr += "\\t"; - mark++; - } - else if($id == "splitColumn_type_02"){ //分号 - if(mark > 0){ - regStr += "|"; - } - - regStr += ";"; - mark++; - } - else if($id == "splitColumn_type_03"){ //逗号 - if(mark > 0){ - regStr += "|"; - } - - regStr += ","; - mark++; - } - else if($id == "splitColumn_type_04"){ //空格 - if(mark > 0){ - regStr += "|"; - } - - regStr += "\\s"; - mark++; - } - else if($id == "splitColumn_type_05"){ //其它 - var txt = $(e).siblings("input[type='text']").val().trim(); - - if(txt != ""){ - if(mark > 0){ - regStr += "|"; - } - - regStr += txt; - } - } - else if($id == "splitColumn_type_06"){ //连续分隔符号视为单个处理 - regStr = "[" + regStr + "]+"; - } - }) - - return regStr; - }, - getDataArr: function(regStr){ - var arr = []; - - var r1 = luckysheet_select_save[0].row[0]; - var r2 = luckysheet_select_save[0].row[1]; - var c = luckysheet_select_save[0].column[0]; - - if(regStr != null && regStr != ""){ - var reg = new RegExp(regStr, "g"); - - var dataArr = []; - for(var r = r1; r <= r2; r++){ - var rowArr = []; - - var cell = luckysheet.flowdata[r][c]; - - if(cell != null && cell["m"] != null){ - var value = cell["m"]; - } - else{ - var value = luckysheet.getcellvalue(r, c, luckysheet.flowdata); - } - - rowArr = value.toString().split(reg); - - dataArr.push(rowArr); - } - - var rlen = dataArr.length; - var clen = 0; - - for(var i = 0; i < rlen; i++){ - if(dataArr[i].length > clen){ - clen = dataArr[i].length; - } - } - - arr = luckysheet.splitColumn.getNullData(rlen, clen); - - for(var i = 0; i < arr.length; i++){ - for(var j = 0; j < arr[0].length; j++){ - if(dataArr[i][j] != null){ - arr[i][j] = dataArr[i][j]; - } - } - } - } - else{ - for(var r = r1; r <= r2; r++){ - var rowArr = []; - - var cell = luckysheet.flowdata[r][c]; - - if(cell != null && cell["m"] != null){ - var value = cell["m"]; - } - else{ - var value = luckysheet.getcellvalue(r, c, luckysheet.flowdata); - } - - rowArr.push(value); - - arr.push(rowArr); - } - } - - return arr; - }, - getNullData: function(rlen, clen){ - var arr = []; - - for(var r = 0; r < rlen; r++){ - var rowArr = []; - - for(var c = 0; c < clen; c++){ - rowArr.push(""); - } - - arr.push(rowArr); - } - - return arr; - } - } - - //批注 - luckysheet.postil = { - defaultWidth: 144, - defaultHeight: 84, - currentObj: null, - currentWinW: null, - currentWinH: null, - resize: null, - resizeXY: null, - move: false, - moveXY: null, - init: function(){ - //点击批注框 聚焦 - $("#luckysheet-postil-showBoxs").off("mousedown.showPs").on("mousedown.showPs", ".luckysheet-postil-show", function(event){ - luckysheet.postil.currentObj = $(this).find(".luckysheet-postil-show-main"); - - if($(this).hasClass("luckysheet-postil-show-active")){ - event.stopPropagation(); - return; - } - - luckysheet.postil.removeActivePs(); - - $(this).addClass("luckysheet-postil-show-active"); - $(this).find(".luckysheet-postil-dialog-resize").show(); - $(this).find(".arrowCanvas").css("z-index", 200); - $(this).find(".luckysheet-postil-show-main").css("z-index", 200); - - event.stopPropagation(); - }); - $("#luckysheet-postil-showBoxs").off("mouseup.showPs").on("mouseup.showPs", ".luckysheet-postil-show", function(event){ - if(event.which == "3"){ - event.stopPropagation(); - } - }); - - //批注框 改变大小 - $("#luckysheet-postil-showBoxs").off("mousedown.resize").on("mousedown.resize", ".luckysheet-postil-show .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item", function(event){ - luckysheet.postil.currentObj = $(this).closest(".luckysheet-postil-show-main"); - luckysheet.postil.currentWinW = $("#luckysheet-cell-main")[0].scrollWidth; - luckysheet.postil.currentWinH = $("#luckysheet-cell-main")[0].scrollHeight; - - luckysheet.postil.resize = $(this).data("type"); - - var scrollTop = $("#luckysheet-cell-main").scrollTop(), scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var position = luckysheet.postil.currentObj.position(); - var width = luckysheet.postil.currentObj.width(); - var height = luckysheet.postil.currentObj.height(); - - luckysheet.postil.resizeXY = [x, y, width, height, position.left + scrollLeft, position.top + scrollTop, scrollLeft, scrollTop]; - - luckysheet.setluckysheet_scroll_status(true); - - if($(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){ - event.stopPropagation(); - return; - } - - luckysheet.postil.removeActivePs(); - - $(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"); - $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(); - $(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index", 200); - $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index", 200); - - event.stopPropagation(); - }); - - //批注框 移动 - $("#luckysheet-postil-showBoxs").off("mousedown.move").on("mousedown.move", ".luckysheet-postil-show .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item", function(event){ - luckysheet.postil.currentObj = $(this).closest(".luckysheet-postil-show-main"); - luckysheet.postil.currentWinW = $("#luckysheet-cell-main")[0].scrollWidth; - luckysheet.postil.currentWinH = $("#luckysheet-cell-main")[0].scrollHeight; - - luckysheet.postil.move = true; - - var scrollTop = $("#luckysheet-cell-main").scrollTop(), scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - - var offset = luckysheet.postil.currentObj.offset(); - var position = luckysheet.postil.currentObj.position(); - - luckysheet.postil.moveXY = [event.pageX - offset.left, event.pageY - offset.top, position.left, position.top, scrollLeft, scrollTop]; - - luckysheet.setluckysheet_scroll_status(true); - - if($(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){ - event.stopPropagation(); - return; - } - - luckysheet.postil.removeActivePs(); - - $(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active"); - $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show(); - $(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index", 200); - $(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index", 200); - - event.stopPropagation(); - }); - }, - overshow: function(event){ - $("#luckysheet-postil-overshow").remove(); - - if($(event.target).closest("#luckysheet-cell-main").length == 0){ - return; - } - - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - if(luckysheet.freezen.freezenverticaldata != null && mouse[0] < (luckysheet.freezen.freezenverticaldata[0] - luckysheet.freezen.freezenverticaldata[2])){ - return; - } - - if(luckysheet.freezen.freezenhorizontaldata != null && mouse[1] < (luckysheet.freezen.freezenhorizontaldata[0] - luckysheet.freezen.freezenhorizontaldata[2])){ - return; - } - - var rowLocation = luckysheet.rowLocation(y), row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col_index = colLocation[2]; - - if(luckysheet.flowdata[row_index] == null || luckysheet.flowdata[row_index][col_index] == null || luckysheet.flowdata[row_index][col_index].ps == null){ - return; - } - - var postil = luckysheet.flowdata[row_index][col_index].ps; - - if(postil["isshow"] || $("#luckysheet-postil-show_"+ row_index +"_"+ col_index).length > 0){ - return; - } - - var value = postil["value"] == null ? "" : postil["value"]; - - var toX = visibledatacolumn[col_index]; - var toY = row_index == 0 ? 0 : visibledatarow[row_index - 1]; - - var fromX = toX + 18; - var fromY = toY - 18; - - if(fromY < 0){ - fromY = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(fromX, fromY, toX, toY); - - var html = '
' + - '' + - '
'+ value +'
' + - '
'; - - $(html).appendTo($("#luckysheet-cell-main")); - - var ctx = $("#luckysheet-postil-overshow .arrowCanvas").get(0).getContext("2d"); - - luckysheet.postil.drawArrow(ctx, size[4], size[5], size[6], size[7]); - }, - getArrowCanvasSize: function(fromX, fromY, toX, toY){ - var left = toX - 5; - - if(fromX < toX){ - left = fromX - 5; - } - - var top = toY - 5; - - if(fromY < toY){ - top = fromY - 5; - } - - var width = Math.abs(fromX - toX) + 10; - var height = Math.abs(fromY - toY) + 10; - - var x1 = width - 5; - var x2 = 5; - - if(fromX < toX){ - x1 = 5; - x2 = width - 5; - } - - var y1 = height - 5; - var y2 = 5; - - if(fromY < toY){ - y1 = 5; - y2 = height - 5; - } - - return [left, top, width, height, x1, y1, x2, y2]; - }, - drawArrow: function(ctx, fromX, fromY, toX, toY, theta, headlen, width, color){ - theta = luckysheet.getObjType(theta) == "undefined" ? 30 : theta; - headlen = luckysheet.getObjType(headlen) == "undefined" ? 6 : headlen; - width = luckysheet.getObjType(width) == "undefined" ? 1 : width; - color = luckysheet.getObjType(color) == "undefined" ? "#000" : color; - - // 计算各角度和对应的P2,P3坐标 - var angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI, - angle1 = (angle + theta) * Math.PI / 180, - angle2 = (angle - theta) * Math.PI / 180, - topX = headlen * Math.cos(angle1), - topY = headlen * Math.sin(angle1), - botX = headlen * Math.cos(angle2), - botY = headlen * Math.sin(angle2); - - ctx.save(); - ctx.beginPath(); - - var arrowX = fromX - topX, - arrowY = fromY - topY; - - ctx.moveTo(arrowX, arrowY); - ctx.moveTo(fromX, fromY); - ctx.lineTo(toX, toY); - - ctx.lineWidth = width; - ctx.strokeStyle = color; - ctx.stroke(); - - arrowX = toX + topX; - arrowY = toY + topY; - ctx.moveTo(arrowX, arrowY); - ctx.lineTo(toX, toY); - arrowX = toX + botX; - arrowY = toY + botY; - ctx.lineTo(arrowX, arrowY); - - ctx.fillStyle = color; - ctx.fill(); - ctx.restore(); - }, - buildAllPs: function(data){ - $("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty(); - - for(var r = 0; r < data.length; r++){ - for(var c = 0; c < data[0].length; c++){ - if(data[r][c] != null && data[r][c].ps != null){ - var postil = data[r][c].ps; - - luckysheet.postil.buildPs(r, c, postil); - } - } - } - - luckysheet.postil.init(); - }, - buildPs: function(r, c, postil){ - if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){ - $("#luckysheet-postil-show_"+ r +"_"+ c).remove(); - } - - if(postil == null){ - return; - } - - var isshow = postil["isshow"] == null ? false : postil["isshow"]; - - if(isshow){ - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r, c); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var left = postil["left"] == null ? toX + 18 : postil["left"]; - var top = postil["top"] == null ? toY - 18 : postil["top"]; - var width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - var value = postil["value"] == null ? "" : postil["value"]; - - if(top < 0){ - top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(left, top, toX, toY); - - var html = '
' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - value + - '
' + - '
' + - '
' + - '
'; - - $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); - - var ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); - - luckysheet.postil.drawArrow(ctx, size[4], size[5], size[6], size[7]); - } - }, - newPs: function(r, c){ - var toX = visibledatacolumn[c]; - var toY = r == 0 ? 0 : visibledatarow[r - 1]; - - var fromX = toX + 18; - var fromY = toY - 18; - - if(fromY < 0){ - fromY = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(fromX, fromY, toX, toY); - - var html = '
' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
'; - - $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); - - var ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); - - luckysheet.postil.drawArrow(ctx, size[4], size[5], size[6], size[7]); - - $("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").focus(); - - luckysheet.postil.init(); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var rc = []; - - if(d[r][c] == null){ - d[r][c] = {}; - } - - d[r][c].ps = { "left": null, "top": null, "width": null, "height": null, "value": "", "isshow": false }; - rc.push(r + "_" + c); - - luckysheet.postil.ref(d, rc); - }, - editPs: function(r, c){ - if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){ - $("#luckysheet-postil-show_"+ r +"_"+ c).show(); - $("#luckysheet-postil-show_"+ r +"_"+ c).addClass("luckysheet-postil-show-active"); - $("#luckysheet-postil-show_"+ r +"_"+ c).find(".luckysheet-postil-dialog-resize").show(); - } - else{ - var postil = luckysheet.flowdata[r][c].ps; - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r, c); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var left = postil["left"] == null ? toX + 18 : postil["left"]; - var top = postil["top"] == null ? toY - 18 : postil["top"]; - var width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - var value = postil["value"] == null ? "" : postil["value"]; - - if(top < 0){ - top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(left, top, toX, toY); - - var html = '
' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - value + - '
' + - '
' + - '
' + - '
'; - - $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); - - var ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); - - luckysheet.postil.drawArrow(ctx, size[4], size[5], size[6], size[7]); - } - - $("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").focus(); - luckysheet.luckysheetRangeLast($("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").get(0)); - - luckysheet.postil.init(); - }, - delPs: function(r, c){ - if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){ - $("#luckysheet-postil-show_"+ r +"_"+ c).remove(); - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var rc = []; - - delete d[r][c].ps; - rc.push(r + "_" + c); - - luckysheet.postil.ref(d, rc); - }, - showHidePs: function(r, c){ - var postil = luckysheet.flowdata[r][c].ps; - var isshow = postil["isshow"]; - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var rc = []; - - if(isshow){ - d[r][c].ps.isshow = false; - - $("#luckysheet-postil-show_"+ r +"_"+ c).remove(); - } - else{ - d[r][c].ps.isshow = true; - - var row = visibledatarow[r], row_pre = r - 1 == -1 ? 0 : visibledatarow[r - 1]; - var col = visibledatacolumn[c], col_pre = c - 1 == -1 ? 0 : visibledatacolumn[c - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r, c); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var left = postil["left"] == null ? toX + 18 : postil["left"]; - var top = postil["top"] == null ? toY - 18 : postil["top"]; - var width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - var value = postil["value"] == null ? "" : postil["value"]; - - if(top < 0){ - top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(left, top, toX, toY); - - var html = '
' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - value + - '
' + - '
' + - '
' + - '
'; - - $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); - - var ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d"); - - luckysheet.postil.drawArrow(ctx, size[4], size[5], size[6], size[7]); - - luckysheet.postil.init(); - } - - rc.push(r + "_" + c); - - luckysheet.postil.ref(d, rc); - }, - showHideAllPs: function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var isAllShow = true; - var allPs = []; - - for(var r = 0; r < d.length; r++){ - for(var c = 0; c < d[0].length; c++){ - if(d[r] != null && d[r][c] != null && d[r][c].ps != null){ - allPs.push(r + "_" + c); - - if(!d[r][c].ps.isshow){ - isAllShow = false; - } - } - } - } - - if(allPs.length > 0){ - var rc = []; - - if(isAllShow){ //全部显示,操作为隐藏所有批注 - $("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty(); - - for(var i = 0; i < allPs.length; i++){ - var rowIndex = allPs[i].split("_")[0]; - var colIndex = allPs[i].split("_")[1]; - - var postil = d[rowIndex][colIndex].ps; - - if(postil["isshow"]){ - d[rowIndex][colIndex].ps.isshow = false; - rc.push(allPs[i]); - } - } - } - else{ //部分显示或全部隐藏,操作位显示所有批注 - for(var i = 0; i < allPs.length; i++){ - var rowIndex = allPs[i].split("_")[0]; - var colIndex = allPs[i].split("_")[1]; - - var postil = d[rowIndex][colIndex].ps; - - if(!postil["isshow"]){ - var row = visibledatarow[rowIndex], row_pre = rowIndex - 1 == -1 ? 0 : visibledatarow[rowIndex - 1]; - var col = visibledatacolumn[colIndex], col_pre = colIndex - 1 == -1 ? 0 : visibledatacolumn[colIndex - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, rowIndex, colIndex); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - var toX = col; - var toY = row_pre; - - var left = postil["left"] == null ? toX + 18 : postil["left"]; - var top = postil["top"] == null ? toY - 18 : postil["top"]; - var width = postil["width"] == null ? luckysheet.postil.defaultWidth : postil["width"]; - var height = postil["height"] == null ? luckysheet.postil.defaultHeight : postil["height"]; - var value = postil["value"] == null ? "" : postil["value"]; - - if(top < 0){ - top = 2; - } - - var size = luckysheet.postil.getArrowCanvasSize(left, top, toX, toY); - - var html = '
' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - value + - '
' + - '
' + - '
' + - '
'; - - $(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs")); - - var ctx = $("#luckysheet-postil-show_"+ rowIndex +"_"+ colIndex +" .arrowCanvas").get(0).getContext("2d"); - - luckysheet.postil.drawArrow(ctx, size[4], size[5], size[6], size[7]); - - d[rowIndex][colIndex].ps.isshow = true; - rc.push(allPs[i]); - } - } - } - } - - luckysheet.postil.ref(d, rc); - - luckysheet.postil.init(); - }, - removeActivePs: function(){ - if($("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").length > 0){ - var id = $("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").attr("id"); - - $("#" + id).removeClass("luckysheet-postil-show-active"); - $("#" + id).find(".luckysheet-postil-dialog-resize").hide(); - $("#" + id).find(".arrowCanvas").css("z-index", 100); - $("#" + id).find(".luckysheet-postil-show-main").css("z-index", 100); - - var r = id.split("luckysheet-postil-show_")[1].split("_")[0]; - var c = id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var value = $("#" + id).find(".formulaInputFocus").text(); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var rc = []; - - d[r][c].ps.value = value; - rc.push(r + "_" + c); - - luckysheet.postil.ref(d, rc); - - if(!d[r][c].ps.isshow){ - $("#" + id).remove(); - } - } - }, - ref: function(data, rc){ - if (clearjfundo) { - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": "postil", - "data": luckysheet.flowdata, - "curdata": data, - "sheetIndex": luckysheet.currentSheetIndex, - "rc": rc - }); - } - - //luckysheet.flowdata - luckysheet.flowdata = data; - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = luckysheet.flowdata; - luckysheet.formula.execFunctionGroupData = luckysheet.flowdata; - - //共享编辑模式 - if(luckysheet.server.allowUpdate){ - for(var i = 0; i < rc.length; i++){ - var r = rc[i].split("_")[0]; - var c = rc[i].split("_")[1]; - - luckysheet.server.saveParam("v", luckysheet.currentSheetIndex, luckysheet.flowdata[r][c], { "r": r, "c": c }); - } - } - - //刷新表格 - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - }, - positionSync: function(){ - $("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){ - var id = $(e).attr("id"); - - var r = id.split("luckysheet-postil-show_")[1].split("_")[0]; - var c = id.split("luckysheet-postil-show_")[1].split("_")[1]; - - luckysheet.postil.buildPs(r, c, luckysheet.flowdata[r][c].ps); - }); - } - } - - luckysheet.hasChinaword = function (s) { - var patrn = /[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi; - if (!patrn.exec(s)) { - return false; - } - else { - return true; - } - } - - luckysheet.getdatabyselectionD = function (d, range) { - if (range == null || range["row"] == null || range["row"].length == 0) { - return []; - } - - var dynamicArray_compute = luckysheet.dynamicArray_compute(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["dynamicArray"]); - var data = []; - - for (var r = range["row"][0]; r <= range["row"][1]; r++) { - if(d[r] == null){ - continue; - } - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - var row = []; - - for (var c = range["column"][0]; c <= range["column"][1]; c++) { - var value; - - if((r + "_" + c) in dynamicArray_compute){ - value = dynamicArray_compute[r + "_" + c]; - } - else{ - value = d[r][c]; - } - - row.push(value); - } - - data.push(row); - } - - return data; - } - - luckysheet.getdatabyselection = function (range, sheetIndex) { - if(range == null){ - range = luckysheet_select_save[0]; - } - - if (range["row"] == null || range["row"].length == 0) { - return []; - } - - //取数据 - if(sheetIndex != null && sheetIndex != luckysheet.currentSheetIndex){ - var d = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["data"]; - var cfg = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)]["config"]; - } - else{ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var cfg = config; - } - - var data = []; - - for (var r = range["row"][0]; r <= range["row"][1]; r++) { - if(d[r] == null){ - continue; - } - - if (cfg["rowhidden"] != null && cfg["rowhidden"][r] != null) { - continue; - } - - var row = []; - - for (var c = range["column"][0]; c <= range["column"][1]; c++) { - row.push(d[r][c]); - } - - data.push(row); - } - - return data; - } - - //计算范围行高 - luckysheet.rowlenByRange = function(d, r1, r2, cfg){ - var cfg_clone = $.extend(true, {}, cfg); - if(cfg_clone["rowlen"] == null){ - cfg_clone["rowlen"] = {}; - } - - var ctcanvas = $("#luckysheetTableContent").get(0).getContext("2d"); - for(var r = r1; r <= r2; r++){ - if (cfg_clone["rowhidden"] != null && cfg_clone["rowhidden"][r] != null) { - continue; - } - - var currentRowLen = defaultrowlen; - if(cfg_clone["rowlen"][r] != null){ - currentRowLen = cfg_clone["rowlen"][r]; - } - - for(var c = 0; c < d[r].length; c++){ - if(d[r][c] != null && d[r][c]["v"] != null && d[r][c]["tb"] != null && d[r][c]["tb"] == "2"){ - //自动换行 - var fontset = luckysheetfontformat(d[r][c]); - ctcanvas.font = fontset; - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - - var cellText = luckysheet.getcellvalue(r,c,d).toString(); //单元格文本 - var textWidth = ctcanvas.measureText(cellText).width; //文本宽度 - var cellWidth = luckysheet.colLocationByIndex(c)[1] - luckysheet.colLocationByIndex(c)[0] - 8; //单元格宽度 - - var computeRowlen; //计算行高 - if(textWidth > cellWidth){ - var strArr = []; //文本截断数组 - for(var strI = 1; strI <= cellText.length; strI++){ - var strV = cellText.substring(strArr.join("").length, strI); - var strtextMetrics = ctcanvas.measureText(strV).width; - if(strtextMetrics > cellWidth){ - strArr.push(cellText.substring(strArr.join("").length, strI-1)); - strI = strI-2; - } - else if(strtextMetrics <= cellWidth && strI == cellText.length){ - strArr.push(strV); - } - } - computeRowlen = oneLineTextHeight * strArr.length; - } - else{ - computeRowlen = oneLineTextHeight; - } - //比较计算行高和当前行高取最大高度 - if(computeRowlen > currentRowLen){ - currentRowLen = computeRowlen; - } - } - else if(d[r][c] != null && d[r][c]["v"] != null && d[r][c]["tr"] != null){ - //文本旋转 - var fontset = luckysheetfontformat(d[r][c]); - ctcanvas.font = fontset; - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - - var cellText = luckysheet.getcellvalue(r,c,d).toString(); //单元格文本 - var textWidth = ctcanvas.measureText(cellText).width; //文本宽度 - - var computeRowlen; //计算行高 - if(d[r][c]["tr"] == "0"){ - //无旋转 - computeRowlen = oneLineTextHeight; - } - else if(d[r][c]["tr"] == "1" || d[r][c]["tr"] == "2"){ - //向下倾斜(45 旋转)----向上倾斜(-45 旋转) - computeRowlen = 0.707 * (textWidth + oneLineTextHeight) + 4; - } - else if(d[r][c]["tr"] == "3"){ - //竖排文字 - computeRowlen = cellText.length * oneLineTextHeight + 4; - } - else if(d[r][c]["tr"] == "4" || d[r][c]["tr"] == "5"){ - //向下90(90 旋转)----向上90(-90 旋转) - computeRowlen = textWidth + 4; - } - computeRowlen = Math.round(computeRowlen); - //比较计算高度和当前高度取最大高度 - if(computeRowlen > currentRowLen){ - currentRowLen = computeRowlen; - } - } - else{ - var fontset = luckysheetfontformat(d[r][c]); - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - //比较计算高度和当前高度取最大高度 - if(oneLineTextHeight > currentRowLen){ - currentRowLen = oneLineTextHeight; - } - } - } - - if(currentRowLen != defaultrowlen){ - cfg_clone["rowlen"][r] = currentRowLen; - } - } - - return cfg_clone; - } - - //计算表格行高数组 - luckysheet.computeRowlenArr = function(rowHeight, cfg){ - var rowlenArr = []; - var rh_height = 0; - - for (var i = 0; i < rowHeight; i++) { - var rowlen = defaultrowlen; - if (cfg["rowlen"] != null && cfg["rowlen"][i] != null) { - rowlen = cfg["rowlen"][i]; - } - if (cfg["rowhidden"] != null && cfg["rowhidden"][i] != null) { - rowlen = cfg["rowhidden"][i]; - rowlenArr.push(rh_height); - continue; - } - else { - rh_height += rowlen + 1; - } - rowlenArr.push(rh_height);//行的临时长度分布 - } - - return rowlenArr; - } - - luckysheet.getdatabyselectionNoCopy = function (range) { - if (range == null || range["row"] == null || range["row"].length == 0) { - return []; - } - - var data = []; - - for (var r = range["row"][0]; r <= range["row"][1]; r++) { - var row = []; - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - for (var c = range["column"][0]; c <= range["column"][1]; c++) { - var value = ""; - - if (luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null) { - value = luckysheet.flowdata[r][c]; - } - - row.push(value); - } - - data.push(row); - } - - return data; - } - - luckysheet.datagridgrowth = function (data, addr, addc, iscallback) { - if (addr <= 0 && addc <= 0) { - return data; - } - - if (addr <= 0) { - addr = 0; - } - - if (addc <= 0) { - addc = 0; - } - - var dataClen = 0; - if (data.length == 0) { - data = []; - dataClen = 0; - } - else { - dataClen = data[0].length; - } - - var coladd = [];//需要额外增加的空列 - for (var c = 0; c < addc; c++) { - coladd.push(null); - } - - var rowadd = [];//完整的一个空行 - for (var r = 0; r < dataClen + addc; r++) { - rowadd.push(null); - } - - for (var r = 0; r < data.length; r++) { - data[r] = [].concat(data[r].concat(coladd)); - } - - for (var r = 0; r < addr; r++) { - data.push([].concat(rowadd)); - } - - if(!!iscallback){ - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, data.length, { "k": "row" }); - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, data[0].length, { "k": "column" }); - } - - return data; - } - - luckysheet.cleargridelement = function (event) { - $("#luckysheet-cols-h-hover").hide(); - $("#luckysheet-rightclick-menu").hide(); - - $("#luckysheet-cell-selected-boxs .luckysheet-cell-selected").hide(); - $("#luckysheet-cols-h-selected .luckysheet-cols-h-selected").hide(); - $("#luckysheet-rows-h-selected .luckysheet-rows-h-selected").hide(); - - $("#luckysheet-cell-selected-focus").hide(); - $("#luckysheet-rows-h-hover").hide(); - $("#luckysheet-selection-copy .luckysheet-selection-copy").hide(); - $("#luckysheet-cols-menu-btn").hide(); - $("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(); - if (!event) { - luckysheet.selection.clearcopy(event); - } - //else{ - // luckysheet.selection.clearcopy(); - //} - - //选区下拉icon隐藏 - if($("#luckysheet-dropCell-icon").is(":visible")){ - if(event){ - $("#luckysheet-dropCell-icon").remove(); - } - } - //格式刷 - if(luckysheet.menuButton.luckysheetPaintModelOn && !event){ - luckysheet.menuButton.cancelPaintModel(); - } - } - - luckysheet.orderbydata = function (data, index, isAsc) { - if (isAsc == null) { - isAsc = true; - } - - var a = function (x, y) { - var x1 = x[index] , y1 = y[index]; - - if(luckysheet.getObjType(x[index]) == "object"){ - x1 = x[index].v; - } - - if(luckysheet.getObjType(y[index]) == "object"){ - y1 = y[index].v; - } - - if(luckysheet.func_methods.isRealNull(x1)){ - return 1; - } - - if(luckysheet.func_methods.isRealNull(y1)){ - return -1; - } - - // if(x1 == null){ - // x1 = ""; - // } - - // if(y1 == null){ - // y1 = ""; - // } - - if (luckysheet.datecontroll.isdatetime(x1) && luckysheet.datecontroll.isdatetime(y1)) { - return luckysheet.datecontroll.diff(x1, y1); - } - else if (luckysheet.func_methods.isRealNum(x1) && luckysheet.func_methods.isRealNum(y1)) { - return numeral(x1).value() - numeral(y1).value(); - } - else if (!luckysheet.func_methods.isRealNum(x1) && !luckysheet.func_methods.isRealNum(y1)) { - return x1.localeCompare(y1, "zh"); - } - else if (!luckysheet.func_methods.isRealNum(x1)) { - return 1; - } - else if (!luckysheet.func_methods.isRealNum(y1)) { - return -1; - } - } - - var d = function (x, y) { - var x1 = x[index] , y1 = y[index]; - - if(luckysheet.getObjType(x[index]) == "object"){ - x1 = x[index].v; - } - - if(luckysheet.getObjType(y[index]) == "object"){ - y1 = y[index].v; - } - - if(luckysheet.func_methods.isRealNull(x1)){ - return 1; - } - - if(luckysheet.func_methods.isRealNull(y1)){ - return -1; - } - - // if(x1 == null){ - // x1 = ""; - // } - - // if(y1 == null){ - // y1 = ""; - // } - - if (luckysheet.datecontroll.isdatetime(x1) && luckysheet.datecontroll.isdatetime(y1)) { - return luckysheet.datecontroll.diff(y1, x1); - } - else if (luckysheet.func_methods.isRealNum(x1) && luckysheet.func_methods.isRealNum(y1)) { - return numeral(y1).value() - numeral(x1).value(); - } - else if (!luckysheet.func_methods.isRealNum(x1) && !luckysheet.func_methods.isRealNum(y1)) { - return y1.localeCompare(x1, "zh"); - } - else if (!luckysheet.func_methods.isRealNum(x1)) { - return -1; - } - else if (!luckysheet.func_methods.isRealNum(y1)) { - return 1; - } - } - - if (isAsc) { - return data.sort(a); - } - else { - return data.sort(d); - } - } - - luckysheet.orderbydata1D = function (data, isAsc) { - if (isAsc == null) { - isAsc = true; - } - - var a = function (x, y) { - var x1 = x, y1 = y; - - if(luckysheet.getObjType(x) == "object"){ - x1 = x.v; - } - - if(luckysheet.getObjType(y) == "object"){ - y1 = y.v; - } - - if(x1 == null){ - x1 = ""; - } - - if(y1 == null){ - y1 = ""; - } - - if (luckysheet.datecontroll.isdatetime(x1) && luckysheet.datecontroll.isdatetime(y1)) { - return luckysheet.datecontroll.diff(x1, y1); - } - else if (luckysheet.func_methods.isRealNum(x1) && luckysheet.func_methods.isRealNum(y1)) { - return numeral(x1).value() - numeral(y1).value(); - } - else if (!luckysheet.func_methods.isRealNum(x1) && !luckysheet.func_methods.isRealNum(y1)) { - return x1.localeCompare(y1, "zh"); - } - else if (!luckysheet.func_methods.isRealNum(x1)) { - return 1; - } - else if (!luckysheet.func_methods.isRealNum(y1)) { - return -1; - } - } - - var d = function (x, y) { - var x1 = x, y1 = y; - - if(luckysheet.getObjType(x) == "object"){ - x1 = x.v; - } - - if(luckysheet.getObjType(y) == "object"){ - y1 = y.v; - } - - if(x1 == null){ - x1 = ""; - } - - if(y1 == null){ - y1 = ""; - } - - if (luckysheet.datecontroll.isdatetime(x1) && luckysheet.datecontroll.isdatetime(y1)) { - return luckysheet.datecontroll.diff(y1, x1); - } - else if (luckysheet.func_methods.isRealNum(x1) && luckysheet.func_methods.isRealNum(y1)) { - return numeral(y1).value() - numeral(x1).value(); - } - else if (!luckysheet.func_methods.isRealNum(x1) && !luckysheet.func_methods.isRealNum(y1)) { - return y1.localeCompare(x1, "zh"); - } - else if (!luckysheet.func_methods.isRealNum(x1)) { - return -1; - } - else if (!luckysheet.func_methods.isRealNum(y1)) { - return 1; - } - } - - if (isAsc) { - return data.sort(a); - } - else { - return data.sort(d); - } - } - - //排序选区数据 - luckysheet.sortSelection = function(isAsc){ - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - - return; - } - - if(isAsc == null){ - isAsc = true; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var r1 = luckysheet_select_save[0].row[0], r2 = luckysheet_select_save[0].row[1]; - var c1 = luckysheet_select_save[0].column[0], c2 = luckysheet_select_save[0].column[1]; - - var str, edr; - - for(var r = r1; r <= r2; r++){ - if(d[r] != null && d[r][c1] != null){ - var cell = d[r][c1]; - - if(cell.mc != null || luckysheet.func_methods.isRealNull(cell.v)){ - continue; - } - - if(str == null && /[\u4e00-\u9fa5]+/g.test(cell.v)){ - str = r + 1; - edr = r + 1; - continue; - } - - if(str == null){ - str = r; - } - - edr = r; - } - } - - if(str == null || str > r2){ - return; - } - - var hasMc = false; //排序选区是否有合并单元格 - var data = []; - - for(var r = str; r <= edr; r++){ - var data_row = []; - - for(var c = c1; c <= c2; c++){ - if(d[r][c] != null && d[r][c].mc != null){ - hasMc = true; - break; - } - - data_row.push(d[r][c]); - } - - data.push(data_row); - } - - if(hasMc){ - if(luckysheet.isEditMode()){ - alert("选区有合并单元格,无法执行此操作!"); - } - else{ - luckysheet.tooltip.info("选区有合并单元格,无法执行此操作!", ""); - } - - return; - } - - data = luckysheet.orderbydata(data, 0, isAsc); - - for(var r = str; r <= edr; r++){ - for(var c = c1; c <= c2; c++){ - d[r][c] = data[r - str][c - c1]; - } - } - - if(config["rowlen"] != null){ - var cfg = $.extend(true, {}, config); - cfg = luckysheet.rowlenByRange(d, str, edr, cfg); - - luckysheet.jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }], cfg, null, true); - } - else{ - luckysheet.jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }]); - } - } - - //排序一列数据 - luckysheet.sortColumnSeletion = function(colIndex, isAsc){ - if(isAsc == null){ - isAsc = true; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var r1 = 0, r2 = d.length - 1; - var c1 = 0, c2 = d[0].length - 1; - - var str, edr; - - for(var r = r1; r <= r2; r++){ - if(d[r][colIndex] != null && d[r][colIndex].mc != null){ - continue; - } - - if(d[r][colIndex] != null && !luckysheet.func_methods.isRealNull(d[r][colIndex].v) && /[\u4e00-\u9fa5]+/g.test(d[r][colIndex].v) && str == null){ - str = r + 1; - edr = r + 1; - continue; - } - - if(str == null){ - str = r; - } - - if(d[r][colIndex] != null && !luckysheet.func_methods.isRealNull(d[r][colIndex].v)){ - edr = r; - } - } - - if(str == null || str > r2){ - return; - } - - var hasMc = false; //排序选区是否有合并单元格 - var data = []; - - for(var r = str; r <= edr; r++){ - var data_row = []; - - for(var c = c1; c <= c2; c++){ - if(d[r][c] != null && d[r][c].mc != null){ - hasMc = true; - break; - } - - data_row.push(d[r][c]); - } - - data.push(data_row); - } - - if(hasMc){ - if(luckysheet.isEditMode()){ - alert("列排序会扩展至整个表格选区,选区有合并单元格,无法执行此操作,请选择功能栏排序功能!"); - } - else{ - luckysheet.tooltip.info("列排序会扩展至整个表格选区,选区有合并单元格,无法执行此操作,请选择功能栏排序功能!", ""); - } - - return; - } - - data = luckysheet.orderbydata(data, colIndex, isAsc); - - for(var r = str; r <= edr; r++){ - for(var c = c1; c <= c2; c++){ - d[r][c] = data[r - str][c - c1]; - } - } - - if(config["rowlen"] != null){ - var cfg = $.extend(true, {}, config); - cfg = luckysheet.rowlenByRange(d, str, edr, cfg); - - luckysheet.jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }], cfg, null, true); - } - else{ - luckysheet.jfrefreshgrid(d, [{ "row": [str, edr], "column": [c1, c2] }]); - } - } - - /* - data: [{"name":"Sheet1",color:"","status":"1","order":"0","data":[], "theme":{}},{"name":"Sheet2",color:"","status":"0","order":"1","data":[]},{"name":"Sheet3",color:"","status":"0","order":"2","data":[]}], - */ - var luckysheetfile = null, container = null, defaultcolumnNum = 60, defaultrowNum = 84, fullscreenmode = true; - - luckysheet.getluckysheetfile = function(){ - return luckysheetfile; - } - - luckysheet.setluckysheetfile = function (d) { - luckysheetfile = d; - } - - luckysheet.getconfig = function () { - return config; - }; - - luckysheet.setconfig = function (v) { - config = v; - - if(luckysheetfile != null){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = v; - } - }; - - luckysheet.getvisibledatarow = function(){ - return visibledatarow; - }; - - luckysheet.setvisibledatarow = function (v) { - visibledatarow = v; - - if(luckysheetfile != null){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].visibledatarow = v; - } - }; - - luckysheet.getvisibledatacolumn = function () { - return visibledatacolumn; - }; - - luckysheet.setvisibledatacolumn = function (v) { - visibledatacolumn = v; - - if(luckysheetfile != null){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].visibledatacolumn = v; - } - }; - - luckysheet.sheetmanage = { - generateRandomSheetIndex: function(prefix){ - if(prefix == null){ - prefix = "Sheet"; - } - - var userAgent = window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g, "").split(""); - - var mid = ""; - - for(var i = 0; i < 12; i++){ - mid += userAgent[Math.round(Math.random() * (userAgent.length - 1))]; - } - - var time = new Date().getTime(); - - return prefix + "_" + mid + "_" + time; - }, - generateRandomSheetName: function(file, isPivotTable){ - var sheetname = ""; - - var index = file.length; - - for(var i = 0; i < file.length; i++){ - if(file[i].name.indexOf("Sheet") > -1 || file[i].name.indexOf("数据透视表") > -1){ - var suffix = parseFloat(file[i].name.replace("Sheet", "").replace("数据透视表", "")); - - if(suffix != "NaN" && Math.ceil(suffix) > index){ - index = Math.ceil(suffix); - } - } - } - - if(isPivotTable){ - return "数据透视表" + (index + 1); - } - else{ - return "Sheet" + (index + 1); - } - }, - generateCopySheetName: function(file, name){ - var copySheetName = ""; - - if(name.toString().indexOf("(副本") > -1){ - var copy_i = name.toString().indexOf("(副本"); - - var name2 = name.toString().substring(0, copy_i) + "(副本"; - - var index = null; - - for(var i = 0; i < file.length; i++){ - var fileName = file[i].name.toString(); - - var st_i = fileName.indexOf(name2); - - if(st_i > -1){ - var ed_i = fileName.indexOf(")", st_i + name2.length); - - var num = fileName.substring(st_i + name2.length, ed_i); - - if(luckysheet.func_methods.isRealNum(num)){ - if(index == null || parseInt(num) > index){ - index = parseInt(num); - } - } - } - } - - if(index == null){ - copySheetName = name2 + "2)"; - } - else{ - index++; - - copySheetName = name2 + index + ")"; - } - } - else{ - var index = null; - var hascopy = false; - - var name2 = name + "(副本"; - - for(var i = 0; i < file.length; i++){ - var fileName = file[i].name.toString(); - - var st_i = fileName.indexOf(name2); - - if(st_i > -1){ - hascopy = true; - - var ed_i = fileName.indexOf(")", st_i + name2.length); - - var num = fileName.substring(st_i + name2.length, ed_i); - - if(luckysheet.func_methods.isRealNum(num)){ - if(index == null || parseInt(num) > index){ - index = parseInt(num); - } - } - } - } - - if(hascopy){ - if(index == null){ - copySheetName = name + "(副本2)"; - } - else{ - index++; - - copySheetName = name + "(副本" + index + ")"; - } - } - else{ - copySheetName = name + "(副本)"; - } - } - - return copySheetName; - }, - getSheetByIndex:function(index){ - try { - if(index == null){ - index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - } - var i = this.getSheetIndex(index); - return luckysheetfile[i]; - } - catch(err) { - console.log(err); - } - }, - getCurSheetnoset: function () { - var curindex = 0; - for (var i = 0; i < luckysheetfile.length; i++) { - if (luckysheetfile[i].status == 1) { - curindex = luckysheetfile[i].index; - break; - } - } - return curindex; - }, - getCurSheet: function () { - luckysheet.currentSheetIndex = luckysheetfile[0].index; - - for (var i = 0; i < luckysheetfile.length; i++) { - if (luckysheetfile[i].status == 1) { - luckysheet.currentSheetIndex = luckysheetfile[i].index; - break; - } - } - - return luckysheet.currentSheetIndex; - }, - addNewSheet: function (e, isPivotTable) { - if(luckysheet.isEditMode()){ - // alert("非编辑模式下不允许该操作!"); - return; - } - - var order = luckysheetfile.length; - var index = luckysheet.sheetmanage.generateRandomSheetIndex(); - - var sheetname = luckysheet.sheetmanage.generateRandomSheetName(luckysheet.getluckysheetfile(), isPivotTable); - - $("#luckysheet-sheet-container-c").append(luckysheet.replaceHtml(sheetHTML, { "index": index, "active": "", "name": sheetname, "style": "","colorset":"" })); - - var sheetconfig = { - "name": sheetname, - "color": "", - "status": "0", - "order": order, - "index": index, - "celldata": [], - "row": defaultrowNum, - "column": defaultcolumnNum, - "config": {}, - "pivotTable": null, - "isPivotTable": !!isPivotTable - }; - luckysheetfile.push(sheetconfig); - - $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); - $("#luckysheet-sheets-item" + index).addClass("luckysheet-sheets-item-active"); - $("#luckysheet-cell-main").append('
'); - luckysheet.cleargridelement(e); - - luckysheet.server.saveParam("sha", null, $.extend(true,{},sheetconfig)); - - if (clearjfundo) { - var redo = {}; - redo["type"] = "addSheet"; - luckysheet.jfundo = []; - redo["sheetconfig"] = $.extend(true, {}, sheetconfig); - redo["index"] = index; - redo["currentSheetIndex"] = luckysheet.currentSheetIndex; - luckysheet.jfredo.push(redo); - } - - this.changeSheetExec(index, isPivotTable, true); - }, - setSheetHide: function (index) { - luckysheetfile[this.getSheetIndex(index)].hide = 1; - var luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + index); - luckysheetcurrentSheetitem.hide(); - $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); - var indicator = luckysheetcurrentSheetitem.nextAll(":visible"); - if (luckysheetcurrentSheetitem.nextAll(":visible").length > 0) { - indicator = indicator.eq(0).data("index"); - } - else { - indicator = luckysheetcurrentSheetitem.prevAll(":visible").eq(0).data("index"); - } - $("#luckysheet-sheets-item" + indicator).addClass("luckysheet-sheets-item-active"); - this.changeSheetExec(indicator); - - //luckysheet.server.saveParam("sh", index, {"cur": indicator, "hide": 1}); - luckysheet.server.saveParam("sh", luckysheetcurrentSheetitem.data("index"), 1, { "op": "hide", "cur": indicator }); - }, - setSheetShow: function (index) { - luckysheetfile[this.getSheetIndex(index)].hide = 0; - this.changeSheetExec(index); - - luckysheet.server.saveParam("sh", index, 0, {"op": "show", "cur": null}); - }, - sheetMaxIndex: 0, - ordersheet: function (property) { - return function (a, b) { - var value1 = a[property]; - var value2 = b[property]; - return value1 - value2; - } - }, - getCurrentOrder:function(){ - var orders = {}; - $("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function (a) { - var index = $(this).data("index"); - for (var i = 0; i < luckysheetfile.length; i++) { - if (luckysheetfile[i].index == index) { - orders[index.toString()] = a; - break; - } - } - }); - return orders; - }, - reOrderAllSheet: function () { - var orders = {}; - $("#luckysheet-sheet-area div.luckysheet-sheets-item").each(function (a) { - var index = $(this).data("index"); - for (var i = 0; i < luckysheetfile.length; i++) { - if (luckysheetfile[i].index == index) { - luckysheetfile[i].order = a; - orders[index.toString()] = a; - break; - } - } - }); - - luckysheet.server.saveParam("shr", null, orders); - }, - createSheet: function () { //修复拖动sheet更新后台后,重新打开显示错误 - var btn = []; - luckysheetfile.sort(this.ordersheet('order')); - for (var i = 0; i < luckysheetfile.length; i++) { - var display = ""; - var sheetIndex = luckysheetfile[i].index; - - var colorset = ''; - if(luckysheetfile[i].color != null){ - colorset = '
'; - } - - if (luckysheet.currentSheetIndex == sheetIndex) { //使用luckysheetfile中的index比较,而不是order - btn.push(luckysheet.replaceHtml(sheetHTML, { "index": sheetIndex, "active": "luckysheet-sheets-item-active", "name": luckysheetfile[i].name, "style": "","colorset":colorset })); - } - else { - if (luckysheetfile[i].hide == 1) { - btn.push(luckysheet.replaceHtml(sheetHTML, { "index": sheetIndex, "active": "", "name": luckysheetfile[i].name, "style": "display:none;","colorset":colorset })); - } - else { - btn.push(luckysheet.replaceHtml(sheetHTML, { "index": sheetIndex, "active": "", "name": luckysheetfile[i].name, "style": "","colorset":colorset })); - } - display = "style='display:none;'"; - } - //luckysheetfile[i].index = i; //index即为默认 - // if(sheetIndex > this.sheetMaxIndex){ - // this.sheetMaxIndex = sheetIndex; - // } - - $("#luckysheet-cell-main").append('
'); - } - - $("#luckysheet-sheet-container-c").append(btn.join("")); - - this.locationSheet(); - }, - locationSheet:function(){ - var $c = $("#luckysheet-sheet-container-c"), winW = $("#"+container).width(); - var $cursheet = $("#luckysheet-sheet-container-c > div.luckysheet-sheets-item-active").eq(0); - - var scrollLeftpx = 0; - var c_width = 0; - $("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){ - if($(this).hasClass("luckysheet-sheets-item-active")){ - scrollLeftpx = c_width; - } - c_width += $(this).outerWidth(); - }); - - setTimeout(function(){ - $c.scrollLeft(scrollLeftpx - 10); - - if (c_width >= winW * 0.7) { - $("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display", "inline-block"); - $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); - } - }, 1) - }, - copySheet: function (copyindex, e) { - if(luckysheet.isEditMode()){ - // alert("非编辑模式下不允许该操作!"); - return; - } - - var order = luckysheetfile.length; - var index = luckysheet.sheetmanage.generateRandomSheetIndex(); - - var copyarrindex = this.getSheetIndex(copyindex); - var copyjson = $.extend(true, {}, luckysheetfile[copyarrindex]); - copyjson.order = order; - copyjson.index = index; - copyjson.name = this.generateCopySheetName(luckysheetfile, copyjson.name); - - var colorset = ''; - if(copyjson.color != null){ - colorset = '
'; - } - - var copyobject = $("#luckysheet-sheets-item" + copyindex); - $("#luckysheet-sheet-container-c").append(luckysheet.replaceHtml(sheetHTML, { "index": copyjson.index, "active": "", "name": copyjson.name, "order": copyjson.order, "style": "", "colorset": colorset })); - $("#luckysheet-sheets-item" + copyjson.index).insertAfter(copyobject); - // luckysheetfile.push(copyjson); - luckysheetfile.splice(copyindex + 1, 0, copyjson); - - $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); - $("#luckysheet-sheets-item" + index).addClass("luckysheet-sheets-item-active"); - $("#luckysheet-cell-main").append('
'); - luckysheet.cleargridelement(e); - - // luckysheet.server.saveParam("shc", index, {"copyindex":copyindex}); - luckysheet.server.saveParam("shc", index, { "copyindex": copyindex, "name": copyjson.name }); - - this.changeSheetExec(index); - this.reOrderAllSheet(); - - - if (clearjfundo) { - luckysheet.jfredo.push({ "type": "copySheet", "copyindex": copyindex, "index": copyjson.index, "sheetIndex": copyjson.index }); - } - else if (luckysheet.jfredo.length > 0) { - var jfredostr = luckysheet.jfredo[luckysheet.jfredo.length - 1]; - if (jfredostr.type == "copySheet") { - jfredostr.index = copyjson.index; - jfredostr.sheetIndex = copyjson.index; - } - } - }, - hasSheet: function (index) { - if (index == null) { - return false; - } - - index = this.getSheetIndex(index); - if (index == null) { - return false; - } - else { - return true; - } - }, - createSheetbydata: function (data, isrenew) { - var colorset = ''; - if(data.color != null){ - colorset = '
'; - } - - $("#luckysheet-sheet-container-c").append(luckysheet.replaceHtml(sheetHTML, { "index": data.index, "active": "", "name": data.name, "order": data.order, "style": "", "colorset": colorset })); - - var previndex = data.order; - if(previndex >= luckysheetfile.length){ - previndex = luckysheetfile.length - 1; - $("#luckysheet-sheets-item" + data.index).insertAfter($("#luckysheet-sheets-item" + luckysheetfile[previndex].index)); - } - else{ - $("#luckysheet-sheets-item" + data.index).insertBefore($("#luckysheet-sheets-item" + luckysheetfile[previndex].index)); - } - - luckysheetfile.push(data); - - $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); - $("#luckysheet-sheets-item" + data.index).addClass("luckysheet-sheets-item-active"); - $("#luckysheet-cell-main").append('
'); - luckysheet.cleargridelement(); - - if(isrenew != null){ - luckysheet.server.saveParam("shre", null, { "reIndex": data.index }); - data.hide = 0; - - luckysheet.server.saveParam("sh", data.index, 0, {"op": "show", "cur": null}); - } - else{ - luckysheet.server.saveParam("sha", null, data); - } - - this.changeSheetExec(data.index, data.isPivotTable, true); - this.reOrderAllSheet(); - }, - deleteSheet: function (index) { - var arrIndex = this.getSheetIndex(index); - this.setSheetHide(index); - $("#luckysheet-sheets-item" + index).remove(); - $("#luckysheet-datavisual-selection-set-" + index).remove(); - var removedsheet = luckysheetfile.splice(arrIndex, 1); - this.reOrderAllSheet(); - - luckysheet.server.saveParam("shd", null, {"deleIndex": index }); - - if (clearjfundo) { - removedsheet[0].type = "deleteSheet"; - luckysheet.jfredo.push(removedsheet[0]); - } - }, - nulldata: null, - getGridData:function(d){ - var ret = []; - for(var r = 0; r < d.length; r++){ - for(var c = 0; c < d[0].length; c++){ - if(d[r][c] == null){ - continue; - } - ret.push({r:r, c:c, v:d[r][c]}); - } - } - return ret; - }, - buildGridData:function(file){ - var row = file.row == null ? defaultrowNum : file.row, - column = file.column == null ? defaultcolumnNum : file.column; - var data = luckysheet.datagridgrowth([], row, column); - - var celldata = file.celldata; - if(celldata != null){ - for(var i = 0; i < celldata.length; i++){ - var item = celldata[i]; - var r = item.r; - var c = item.c; - var v = item.v; - - if(r >= data.length){ - data = luckysheet.datagridgrowth(data, r - data.length + 1, 0); - } - if(c >= data[0].length){ - data = luckysheet.datagridgrowth(data, 0, c - data[0].length + 1); - } - - luckysheet.setcellvalue(r, c, data, v); - } - } - - //亿万格式+精确度 恢复全局初始化 - luckysheetConfigsetting.autoFormatw = false; - luckysheetConfigsetting.accuracy = undefined; - return data; - }, - cutGridData:function(d){ - var rowindex = 0; - for(var r = d.length - 1; r >= 0; r--){ - var isnull = true; - for(var c = 0; c < d[0].length; c++){ - var value = luckysheet.getcellvalue(r, c); - if(value != null && $.trim(value).length > 0){ - isnull = false; - break; - } - } - - if(!isnull){ - break; - } - else{ - rowindex = r; - } - } - - return d.slice(0, rowindex); - }, - addGridData:function(celldata, row, column){ - var data = luckysheet.datagridgrowth([], row, column); - if(celldata != null){ - for(var i = 0; i < celldata.length; i++){ - var item = celldata[i]; - var r = item.r; - var c = item.c; - var v = item.v; - - if(r >= data.length){ - data = luckysheet.datagridgrowth(data, r - data.length + 1, 0); - } - - if(c >= data[0].length){ - data = luckysheet.datagridgrowth(data, 0, c - data[0].length + 1); - } - luckysheet.setcellvalue(r, c, data, v) - } - } - - return data; - }, - initialjfFile: function (menu, title) { - var _this = this; - this.getCurSheet(); - var file = luckysheetfile[_this.getSheetIndex(luckysheet.currentSheetIndex)]; - - this.nulldata = luckysheet.datagridgrowth([], defaultrowNum, defaultcolumnNum); - var data = _this.buildGridData(file); - - luckysheet_select_save = file["luckysheet_select_save"]; - if(luckysheet_select_save == null || luckysheet_select_save.length == 0){ - if(data[0] != null && data[0][0] != null && data[0][0].mc != null){ - luckysheet_select_save = [{ "row": [0, data[0][0].mc.rs - 1], "column": [0, data[0][0].mc.cs - 1] }]; - } - else{ - luckysheet_select_save = [{ "row": [0, 0], "column": [0, 0] }]; - } - } - - luckysheet_selection_range = file["luckysheet_selection_range"] == null ? [] : file["luckysheet_selection_range"]; - config = file["config"] == null ? {} : file["config"]; - - var r2 = luckysheet_select_save[0].row[1], c2 = luckysheet_select_save[0].column[1]; - if(luckysheet_select_save.length > 1){ - for(var i = 0; i < luckysheet_select_save.length; i++){ - if(luckysheet_select_save[i].row[1] > r2){ - r2 = luckysheet_select_save[i].row[1]; - } - - if(luckysheet_select_save[i].column[1] > c2){ - c2 = luckysheet_select_save[i].column[1]; - } - } - } - - file.data = data; - - var rowheight = data.length; - if(r2 > rowheight - 1){ - rowheight = r2 + 1; - } - - var colwidth = data[0].length; - if(c2 > colwidth - 1){ - colwidth = c2 + 1; - } - - luckysheet.luckysheetcreatedom(colwidth, rowheight, data, menu, title); - - setTimeout(function () { - luckysheet.tooltip.createHoverTip("#luckysheet_info_detail" ,".luckysheet_info_detail_title, .luckysheet_info_detail_input, .luckysheet_info_detail_update"); - - luckysheet.tooltip.createHoverTip("#luckysheet-wa-editor" ,".luckysheet-toolbar-menu-button, .luckysheet-toolbar-button, .luckysheet-toolbar-combo-button"); - - luckysheetTableContentHW = [$("#luckysheet-cell-main").width() + rowHeaderWidth - cellMainSrollBarSize, $("#luckysheet-cell-main").height() + columeHeaderHeight - cellMainSrollBarSize]; - $("#luckysheetTableContent, #luckysheetTableContentF").attr({ width: Math.ceil(luckysheetTableContentHW[0]*devicePixelRatio), height: Math.ceil(luckysheetTableContentHW[1]*devicePixelRatio) }).css({ width: luckysheetTableContentHW[0], height: luckysheetTableContentHW[1] }).get(0).getContext("2d"); - - var key = luckysheet.server.gridKey; - var cahce_key = key + "__qkcache"; - - var ini = function(){ - file["load"] = "1"; - - _this.createSheet(); - - var sheetindexset = _this.checkLoadSheetIndex(file); - var sheetindex = []; - for(var i=0;i 0) { - $("#luckysheet-scrollbar-x").scrollLeft(file["scrollLeft"]); //列标题 - } - else { - $("#luckysheet-scrollbar-x").scrollLeft(0); - } - - if (file["scrollTop"] != null && file["scrollTop"] > 0) { - $("#luckysheet-scrollbar-y").scrollTop(file["scrollTop"]); //列标题 - } - else { - $("#luckysheet-scrollbar-y").scrollTop(0); - } - }, - storeSheetParamALL: function () { - this.storeSheetParam(); - var index = this.getSheetIndex(luckysheet.currentSheetIndex); - luckysheetfile[index]["data"] = luckysheet.flowdata; - luckysheetfile[index]["config"] = $.extend(true, {}, config); - }, - changeSheet: function (index, isPivotInitial, isNewSheet) { - if(luckysheet.isEditMode()){ - // alert("非编辑模式下不允许该操作!"); - return; - } - - if(luckysheet.server.allowUpdate){ - $("#luckysheet-cell-main #luckysheet-multipleRange-show").empty(); - luckysheet.server.multipleIndex = 0; - } - - $('#luckysheet-filter-selected-sheet' + luckysheet.currentSheetIndex + ', #luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).hide(); - $('#luckysheet-filter-selected-sheet' + index + ', #luckysheet-filter-options-sheet' + index).show(); - - this.storeSheetParamALL(); - this.setCurSheet(index); - var file = luckysheetfile[this.getSheetIndex(index)], data = file.data, cfg = file.config; - - if (!!file.isPivotTable) { - luckysheetcurrentisPivotTable = true; - if (!isPivotInitial) { - luckysheet.pivotTable.changePivotTable(index); - } - } - else { - luckysheetcurrentisPivotTable = false; - $("#luckysheet-modal-dialog-slider-pivot").hide(); - luckysheet.luckysheetsizeauto(); - } - - var _this = this; - var load = file["load"]; - if (load != null) { - _this.setSheetParam(true); - _this.showSheet(); - - setTimeout(function () { - //luckysheet.flowdata = data; - luckysheet.formula.execFunctionGroup(); - luckysheet.luckysheetrefreshgrid(); - luckysheet.server.saveParam("shs", null, luckysheet.currentSheetIndex); - }, 1); - } - else { - //$("#" + container + " div.luckysheetsheetchange").hide(); - var loadSheetUrl = luckysheet.server.loadSheetUrl; - if(loadSheetUrl == "" || luckysheetcurrentisPivotTable || !!isNewSheet){ - //var row = file.row==null?defaultrowNum:file.row, column = file.cloumn==null?defaultcolumnNum:file.cloumn; - var data = _this.buildGridData(file); - - file["data"] = data; - file["load"] = "1"; - - _this.setSheetParam(); - _this.showSheet(); - - setTimeout(function () { - luckysheet.sheetmanage.restoreCache(); - luckysheet.formula.execFunctionGroup(); - luckysheet.sheetmanage.restoreSheetAll(luckysheet.currentSheetIndex); - luckysheet.luckysheetrefreshgrid(); - }, 1); - - luckysheet.server.saveParam("shs", null, luckysheet.currentSheetIndex); - } - else{ - $("#luckysheet-grid-window-1").append('
渲染中...
'); - - var sheetindex = this.checkLoadSheetIndex(file); - - $.post(loadSheetUrl, {"gridKey" : luckysheet.server.gridKey, "index": sheetindex.join(",")}, function (d) { - var dataset = eval("(" + d + ")"); - file.celldata = dataset[index.toString()]; - var data = _this.buildGridData(file); - - setTimeout(function(){ - $("#luckysheetloadingdata").fadeOut().remove(); - }, 500); - - for(var item in dataset){ - if(item == index){ - continue; - } - - var otherfile = luckysheetfile[_this.getSheetIndex(item)]; - - if(otherfile["load"] == null || otherfile["load"] == "0"){ - otherfile.celldata = dataset[item.toString()]; - otherfile["data"] = _this.buildGridData(otherfile); - otherfile["load"] = "1"; - } - } - - file["data"] = data; - file["load"] = "1"; - - _this.setSheetParam(); - _this.showSheet(); - - setTimeout(function () { - luckysheet.sheetmanage.restoreCache(); - luckysheet.formula.execFunctionGroup(); - luckysheet.sheetmanage.restoreSheetAll(luckysheet.currentSheetIndex); - luckysheet.luckysheetrefreshgrid(); - }, 1); - - luckysheet.server.saveParam("shs", null, luckysheet.currentSheetIndex); - }); - } - } - - $("#luckysheet-cell-main .luckysheet-datavisual-selection-set").hide(); - $("#luckysheet-datavisual-selection-set-" + index).show(); - //隐藏其他sheet的图表,显示当前sheet的图表 chartMix - !!window.generator && generator.renderChartShow(index); - // $("#luckysheet-cell-main .luckysheet-data-visualization-chart[sheetIndex!='" + index + "']").hide(); - // $("#luckysheet-cell-main .luckysheet-data-visualization-chart[sheetIndex='" + index + "']").show(); - luckysheet.freezen.initialFreezen(index); - - this.restoreselect(); - }, - checkLoadSheetIndex:function(file){ - var calchain = file.calcChain; //index - var chart = file.chart; //dataSheetIndex - var pivotTable = file.pivotTable; //pivotDataSheetIndex - - var ret= [], cache={}; - ret.push(file.index); - cache[file.index.toString()] = 1; - - if(calchain != null){ - for(var i = 0; i < calchain.length; i++){ - var func = calchain[i]; - var dataindex = func.index; - if(dataindex == null){ - continue; - } - if(cache[dataindex.toString()] == null){ - ret.push(dataindex); - cache[dataindex.toString()] = 1; - } - } - } - - if(chart != null){ - for(var i = 0; i < chart.length; i++){ - var cc = chart[i]; - var dataindex = cc.dataSheetIndex; - if(dataindex == null){ - continue; - } - if(cache[dataindex.toString()] == null){ - ret.push(dataindex); - cache[dataindex.toString()] = 1; - } - } - } - - if(pivotTable != null){ - var dataindex = pivotTable.pivotDataSheetIndex; - if(dataindex != null && cache[dataindex.toString()] == null){ - ret.push(dataindex); - cache[dataindex.toString()] = 1; - } - } - - return ret; - }, - showSheet: function () { - //$("#" + container + " div.luckysheetsheetchange").hide(); - // $("#luckysheetrowHeader_" + luckysheet.currentSheetIndex).show(); - // $("#luckysheet-cell-flow_" + luckysheet.currentSheetIndex).show(); - // $("#luckysheet-cols-h-cells_" + luckysheet.currentSheetIndex).show(); - $("#luckysheet-cell-flow_0").css({ "width": ch_width, "top": "-1px" }); //width更新 - $("#luckysheet-sheettable_0").css({ "width": ch_width - 1, "height": rh_height }); - $("#luckysheetrowHeader_0").css("height", rh_height); - $("#luckysheet-cols-h-cells_0").css("width", ch_width); //width更新 - - $("#luckysheet-scrollbar-x div").width(ch_width); - $("#luckysheet-scrollbar-y div").height(rh_height - 30); - }, - setCurSheet: function (index) { - for (var i = 0; i < luckysheetfile.length; i++) { - if (luckysheetfile[i]["index"] == index) { - luckysheetfile[i].status = 1; - } - else { - luckysheetfile[i].status = 0; - } - } - luckysheet.currentSheetIndex = index; - }, - getSheetIndex: function (index) { - for (var i = 0; i < luckysheetfile.length; i++) { - if (luckysheetfile[i]["index"] == index) { - return i; - } - } - return null; - }, - changeSheetExec: function (index, isPivotInitial, isNewSheet) { - var $sheet = $("#luckysheet-sheets-item" + index); - //sheet-filter切换 - //$('#luckysheet-filter-selected-sheet'+ luckysheet.currentSheetIndex +', #luckysheet-filter-options-sheet'+ luckysheet.currentSheetIndex).hide(); - //$('#luckysheet-filter-selected-sheet'+ index +', #luckysheet-filter-options-sheet'+ index).show(); - //$("#luckysheet-cell-main").append('
'); - window.luckysheet_getcelldata_cache = null; - $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); - $sheet.addClass("luckysheet-sheets-item-active").show(); - luckysheet.cleargridelement(); - this.changeSheet(index, isPivotInitial, isNewSheet); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - - if (luckysheet.formula.rangestart) { - luckysheet.formula.createRangeHightlight(); - } - - var $c = $("#luckysheet-sheet-container-c"); - $c.scrollLeft($sheet.offset().left); - - var c_width = $c.width(), c_srollwidth = $c[0].scrollWidth, scrollLeft = $c.scrollLeft(); - - if (scrollLeft <= 0) { - $("#luckysheet-sheet-container .docs-sheet-fade-left").hide(); - } - else { - $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); - } - - if (c_width + scrollLeft >= c_srollwidth) { - $("#luckysheet-sheet-container .docs-sheet-fade-right").hide(); - } - else { - $("#luckysheet-sheet-container .docs-sheet-fade-right").show(); - } - }, - delChart: function (chart_id, sheetIndex) { - var index = this.getSheetIndex(sheetIndex); - var file = luckysheetfile[index]; - if (file.chart == null) { - file.chart = []; - } - else { - for (var i = 0; i < file.chart.length; i++) { - if (file.chart[i].chart_id == chart_id) { - luckysheetfile[index].chart.splice(i, 1); - break; - } - } - } - }, - saveChart: function (json) {//采用chartMix store存储,弃用luckysheetfile存储,防止重复存储 - var index = this.getSheetIndex(json.sheetIndex); - var file = luckysheetfile[index]; - if (file.chart == null) { - file.chart = []; - file.chart.push(json); - } - else { - for (var i = 0; i < file.chart.length; i++) { - if (file.chart[i].chart_id == json.chart_id) { - var old = $.extend(true, {}, file.chart[i]); - file.chart[i] = $.extend(true, {}, old, json); - return; - } - } - file.chart.push(json); - } - }, - getChart: function (sheetIndex, chart_id) { - var index = getSheetIndex(sheetIndex); - var file = luckysheetfile[index]; - if (file.chart == null) { - return null; - } - else { - for (var i = 0; i < file.chart.length; i++) { - if (file.chart[i].chart_id == chart_id) { - return file.chart[i]; - } - } - return null; - } - }, - restoreChart: function (sheetIndex) { - if (luckysheet.chartparam.luckysheet_chartIns_index == -1) { - luckysheet.chartparam.luckysheet_chartIns_index = 0; - for (var i = 0; i < luckysheetfile.length; i++) { - var chart = luckysheetfile[i].chart; - if (chart != null) { - luckysheet.chartparam.luckysheet_chartIns_index += chart.length; - } - } - } - - var index = this.getSheetIndex(sheetIndex); - var file = luckysheetfile[index]; - if (file.chart != null) { - for (var i = 0; i < file.chart.length; i++) { - var c = file.chart[i]; - if(c.sheetIndex == null || c.dataSheetIndex == null || c.row == null || c.column == null){ - continue; - } - - if ($("#" + c.chart_id).length == 0) { - var chart_selection_color = null; - var chart_id = null; - var chart_selection_id = null; - - if(c.chart_id != null){ - chart_id = c.chart_id; - var chart_id_index = parseInt(chart_id); - if(isNaN(chart_id_index)){ - chart_id_index = luckysheet.chartparam.luckysheet_chartIns_index++; - } - else{ - if(chart_id_index>luckysheet.chartparam.luckysheet_chartIns_index ){ - luckysheet.chartparam.luckysheet_chartIns_index = chart_id_index; - } - } - chart_selection_color = luckysheet.jfcolor[chart_id_index]; - chart_selection_id = chart_id + "_selection"; - } - else{ - chart_selection_color = luckysheet.jfcolor[luckysheet.chartparam.luckysheet_chartIns_index]; - chart_id = "luckysheet-datav-chart-" + luckysheet.chartparam.luckysheet_chartIns_index++; - chart_selection_id = chart_id + "_selection"; - c.chart_id = chart_id; - } - - var chartTheme = c.chartTheme; - chartTheme = chartTheme == null ? "default0000" : chartTheme; - - luckysheet.insertChartTosheet(c.sheetIndex, c.dataSheetIndex, c.option, c.chartType, c.selfOption, c.defaultOption, c.row, c.column, chart_selection_color, chart_id, chart_selection_id, c.chartStyle, c.rangeConfigCheck, c.rangeRowCheck, c.rangeColCheck, c.chartMarkConfig, c.chartTitleConfig, c.winWidth, c.winHeight, c.scrollLeft, c.scrollTop, chartTheme, c.myWidth, c.myHeight, c.myLeft!=null?parseFloat(c.myLeft):null, c.myTop!=null?parseFloat(c.myTop):null, c.myindexrank, true); - } - } - } - }, - getRangetxt: function (sheetIndex, range, currentIndex) { - var sheettxt = ""; - - if (currentIndex == null) { - currentIndex = luckysheet.currentSheetIndex; - } - - if (sheetIndex != currentIndex) { - sheettxt = luckysheetfile[this.getSheetIndex(sheetIndex)].name + "!"; - } - - var row0 = range["row"][0], row1 = range["row"][1]; - var column0 = range["column"][0], column1 = range["column"][1]; - - if (row0 == null && row1 == null) { - return sheettxt + luckysheet.luckysheetchatatABC(column0) + ":" + luckysheet.luckysheetchatatABC(column1); - } - else if (column0 == null && column1 == null) { - return sheettxt + (row0 + 1) + ":" + (row1 + 1); - } - else { - if (column0 == column1 && row0 == row1) { - return sheettxt + luckysheet.luckysheetchatatABC(column0) + (row0 + 1); - } - else { - return sheettxt + luckysheet.luckysheetchatatABC(column0) + (row0 + 1) + ":" + luckysheet.luckysheetchatatABC(column1) + (row1 + 1); - } - } - }, - getSheetName: function (sheetIndex) { - if (sheetIndex == null) { - sheetIndex = luckysheet.currentSheetIndex; - } - - return luckysheetfile[this.getSheetIndex(sheetIndex)].name; - }, - getSheetMerge: function () { - if(config.merge == null){ - return null; - } - return config.merge; - }, - getSheetData: function (sheetIndex) { - if (sheetIndex == null) { - sheetIndex = luckysheet.currentSheetIndex; - } - - return luckysheetfile[this.getSheetIndex(sheetIndex)].data; - }, - getSheetConfig: function (sheetIndex) { - if (sheetIndex == null) { - sheetIndex = luckysheet.currentSheetIndex; - } - - var config = luckysheetfile[this.getSheetIndex(sheetIndex)].config; - if(config == null){ - luckysheetfile[this.getSheetIndex(sheetIndex)].config = {}; - } - return luckysheetfile[this.getSheetIndex(sheetIndex)].config; - }, - restoreFilter: function(sheetIndex){ - var index = this.getSheetIndex(sheetIndex); - var file = luckysheetfile[index]; - - if($('#luckysheet-filter-selected-sheet' + sheetIndex).length > 0 || file.filter_select == null || JSON.stringify(file.filter_select) == "{}"){ - if(file.config != null && file.config.rowhidden != null){ - file.config.rowhidden = {}; - config = file.config; - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - - return; - } - - if(luckysheet.getObjType(file.filter_select) != "object"){ - file.filter_select = JSON.parse(file.filter_select); - } - - if(file.filter_select == null || file.filter_select.row == null || file.filter_select.column == null){ - return; - } - - luckysheet.createFilterOptions(file.filter_select); - - if(luckysheet.getObjType(file.filter) != "object"){ - if(file.filter != null && luckysheet.getObjType(file.filter) == "string"){ - file.filter = JSON.parse(file.filter); - } - } - - var rowhidden = {}; - if(file.config != null && file.config.rowhidden != null){ - rowhidden = file.config.rowhidden; - } - - $("#luckysheet-filter-options-sheet" + sheetIndex + " .luckysheet-filter-options").each(function(i){ - if(file.filter == null){ - return false; - } - - var $top = $(this); - var item = file.filter[i]; - - if(item == null){ - return true; - } - - if(luckysheet.getObjType(item) != "object"){ - item = JSON.parse(item); - } - - luckysheet.labelFilterOptionState($top, item.optionstate, item.rowhidden, item.caljs, false, item.st_r, item.ed_r, item.cindex, item.st_c, item.ed_c); - - rowhidden = $.extend(true, rowhidden, item.rowhidden); - }); - - if(file.config == null){ - file.config = {}; - } - - file.config["rowhidden"] = rowhidden; - config = file.config; - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - // var $t = $("#luckysheet-filter-options-sheet" + sheetIndex + " .luckysheet-filter-options").eq(0); - // luckysheet.filterseletedbyindex($t.data("str"), $t.data("edr"), $t.data("stc"), $t.data("edc")); - }, - restorePivot:function(sheetIndex){ - var index = this.getSheetIndex(sheetIndex); - var file = luckysheetfile[index]; - if (!file.isPivotTable) { - return; - } - luckysheet.pivotTable.getCellData(sheetIndex); - luckysheet.pivotTable.initialPivotManage(true); - luckysheet.pivotTable.refreshPivotTable(); - }, - restoreSheetAll:function(sheetIndex){ - var _this= this; - _this.restorePivot(sheetIndex); - _this.restoreFilter(sheetIndex); - // _this.restoreChart(sheetIndex);//TODO:chartMix重写restoreChart方法 - _this.restoreFreezen(sheetIndex); - }, - restoreFreezen:function(sheetIndex){ - luckysheet.freezen.initialFreezen(sheetIndex); - }, - restoreCache:function(){ - var key = luckysheet.server.gridKey; - var cahce_key = key + "__qkcache"; - var _this = this; - - var data = _this.CacheNotLoadControll; - //.concat(ret); - _this.CacheNotLoadControll = []; - if(data.length == 0){ - return; - } - console.log(data); - for(var i = 0; i < data.length; i++){ - var item = data[i]; - _this.execCache(item); - } - - // localforage.getItem(cahce_key).then(function(readValue) { - // if(readValue!=null){ - // _this.CacheNotLoadControll = readValue; - // } - - // luckysheet.server.getlocaldata(function(ret){ - // if(ret==null){ - // ret = []; - // } - // var data = _this.CacheNotLoadControll; - // //.concat(ret); - // _this.CacheNotLoadControll = []; - // if(data.length==0){ - // return; - // } - - // for(var i=0;i= index && cell.r < index + len){ - // delete cell; - // } - // else if(cell.r >= index + len){ - // cell.r -= len; - // } - // } - for(var i = 0; celldata.length == 0; i++){ - var cell = celldata[i]; - if(cell.r >= index && cell.r < index + len){ - delete cell; - } - else if(cell.r >= index + len){ - cell.r -= len; - } - } - file.row -= len; - } - else{ - // for(var i = 0; celldata.length < 0; i++){ - // var cell = celldata[i]; - // if(cell.c >= index && cell.c < index + len){ - // delete cell; - // } - // else if(cell.c >= index + len){ - // cell.c -= len; - // } - // } - for(var i = 0; celldata.length == 0; i++){ - var cell = celldata[i]; - if(cell.c >= index && cell.c < index + len){ - delete cell; - } - else if(cell.c >= index + len){ - cell.c -= len; - } - } - file.column -= len; - } - - var ret = []; - for(var i = 0; i < celldata.length; i++){ - if(celldata[i] != null){ - ret.push(celldata[i]); - } - } - file.celldata = ret; - - var mtype, mst, med; - if(rc == "r"){ - mtype = "row"; - } - else{ - mtype = "column"; - } - mst = index; - med = index + len - 1; - - luckysheet.luckysheetdeletetable(mtype, mst, med, true); - // setTimeout(function(){ - // luckysheet.jfrefreshgridall(luckysheet.flowdata[0].length, luckysheet.flowdata.length, luckysheet.flowdata); - // }, 10); - } - else if(type=="arc"){ - var rc = item.rc, index = value.index, len = value.len; - var celldata = file.celldata; - if(rc == "r"){ - // for(var i = 0; celldata.length < 0; i++){ - // var cell = celldata[i]; - // if(cell.r > index){ - // cell.r += len; - // } - // } - for(var i = 0; i < celldata.length; i++){ - var cell = celldata[i]; - if(cell.r > index){ - cell.r += len; - } - } - file.row += len; - } - else{ - // for(var i = 0; celldata.length < 0; i++){ - // var cell = celldata[i]; - // if(cell.c > index){ - // cell.c += len; - // } - // } - for(var i = 0; i < celldata.length; i++){ - var cell = celldata[i]; - if(cell.c > index){ - cell.c += len; - } - } - file.column += len; - } - - var mtype; - if(rc == "r"){ - mtype = "row"; - } - else{ - mtype = "column"; - } - // mst = index; - // med = index + len - 1; - //console.log(rc,mtype, mst, med); - luckysheet.luckysheetextendtable(mtype, index, len, true); - - // var ret = []; - // for(var i=0;i
渲染中...
'); - - if(luckysheetConfigsetting.pointEdit){ - //编辑器qksheet表格编辑状态 - $("#" + container).attr("tabindex", 0).focus(); - $("#luckysheetloadingdata .luckysheetLoaderGif").css({ "width": "4em", "height": "4em" }); - } - - var data = []; - if (loadurl == "") { - luckysheet.sheetmanage.initialjfFile(menu, title); - luckysheet.luckysheetsizeauto(); - luckysheet.luckysheetHandler(); - luckysheet.chartInitial(); - //luckysheet.luckysheetactiveCell(); - } - else { - $.post(loadurl, {"gridKey" : luckysheet.server.gridKey}, function (d) { - var data = eval("(" + d + ")"); - luckysheetfile = data; - - luckysheet.sheetmanage.initialjfFile(menu, title); - luckysheet.luckysheetsizeauto(); - luckysheet.luckysheetHandler(); - luckysheet.chartInitial(); - - //需要更新数据给后台时,建立WebSocket连接 - if(luckysheet.server.allowUpdate){ - luckysheet.server.openWebSocket(); - } - - // setTimeout(function(){ - // $("#luckysheetloadingdata").fadeOut().remove(); - // }, 500); - //luckysheet.luckysheetactiveCell(); - }); - } - - return luckysheet; - } - - var gridW = 0, gridH = 0, cellmainHeight = 0, cellmainWidth = 0; - luckysheet.luckysheetsizeauto = function () { - // var winW = $(window).outerWidth(), winH = $(window).outerHeight(); - // $("#"+ container).height(winH-2).width(winW-2); - if (!luckysheetConfigsetting.showinfobar) { - infobarHeight = 0; - $("#luckysheet_info_detail").hide(); - } - else { - infobarHeight = 30; - $("#luckysheet_info_detail").show(); - } - - if (!luckysheetConfigsetting.showtoolbar) { - $("#" + container).find(".luckysheet-wa-editor, .luckysheet-share-logo").hide(); - toolbarHeight = 0; - } - else { - $("#" + container).find(".luckysheet-wa-editor, .luckysheet-share-logo").show(); - toolbarHeight = 35; - } - - if (!luckysheetConfigsetting.showsheetbar) { - $("#" + container).find("#luckysheet-sheet-area").hide(); - sheetBarHeight = 0; - } - else { - $("#" + container).find("#luckysheet-sheet-area").show(); - sheetBarHeight = 27; - } - - if (!luckysheetConfigsetting.showstatisticBar) { - $("#" + container).find(".luckysheet-stat-area").hide(); - statisticBarHeight = 0; - } - else { - $("#" + container).find(".luckysheet-stat-area").show(); - statisticBarHeight = 23; - } - - if(luckysheetConfigsetting.pointEdit){ - //编辑器qksheet表格编辑时,不要滚动条 - cellMainSrollBarSize = 0; - } - - $("#" + container).find(".luckysheet-grid-container").css("top", toolbarHeight + infobarHeight + calculatebarHeight); - - gridW = $("#" + container).width(), gridH = $("#" + container).height(); - - if(luckysheetConfigsetting.showConfigWindowResize){//数据透视表 图表 交替颜色 - if($("#luckysheet-modal-dialog-slider-pivot").is(":visible")){ - gridW -= $("#luckysheet-modal-dialog-slider-pivot").outerWidth(); - } - else if($("#luckysheet-data-visualization").is(":visible")){ - gridW -= $("#luckysheet-data-visualization").outerWidth(); - } - else if($("#luckysheet-modal-dialog-slider-alternateformat").is(":visible")){ - gridW -= $("#luckysheet-modal-dialog-slider-alternateformat").outerWidth(); - } - } - - $("#" + container).find(".luckysheet").height(gridH - 2).width(gridW - 2); - cellmainHeight = gridH - (infobarHeight + toolbarHeight + calculatebarHeight + columeHeaderHeight + sheetBarHeight + statisticBarHeight); - cellmainWidth = gridW - rowHeaderWidth; - $("#luckysheet-cols-h-c, #luckysheet-cell-main, #luckysheet-scrollbar-x").width(cellmainWidth); - $("#luckysheet-cell-main").height(cellmainHeight); - $("#luckysheet-rows-h").height(cellmainHeight - cellMainSrollBarSize); - - $("#luckysheet-scrollbar-y").height(cellmainHeight+6); - $("#luckysheet-scrollbar-x").height(cellMainSrollBarSize); - $("#luckysheet-scrollbar-y").width(cellMainSrollBarSize); - - luckysheetTableContentHW = [cellmainWidth + rowHeaderWidth - cellMainSrollBarSize, cellmainHeight + columeHeaderHeight - cellMainSrollBarSize]; - $("#luckysheetTableContent, #luckysheetTableContentF").attr({ width: Math.ceil(luckysheetTableContentHW[0]*devicePixelRatio), height: Math.ceil(luckysheetTableContentHW[1]*devicePixelRatio) }).css({ width: luckysheetTableContentHW[0], height: luckysheetTableContentHW[1] }); - - $("#" + container).find("#luckysheet-grid-window-1").css("bottom", sheetBarHeight); - $("#" + container).find(".luckysheet-grid-window").css("bottom", statisticBarHeight); - - var gridwidth = $("#luckysheet-grid-window-1").width(); - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({ "width": gridwidth - 10 }).end().find(".luckysheet-freezebar-horizontal-drop").css({ "width": gridwidth - 10 }); - - var gridheight = $("#luckysheet-grid-window-1").height(); - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({ "height": gridheight - 10 }).end().find(".luckysheet-freezebar-vertical-drop").css({ "height": gridheight - 10 }); - luckysheet.freezen.createAssistCanvas(); - - luckysheet.luckysheetrefreshgrid($("#luckysheet-cell-main").scrollLeft(), $("#luckysheet-cell-main").scrollTop()); - - var ismore = false, toolbarW = 0, morebtn='
更多...
'; - var morediv = '
'; - if($("#luckysheet-icon-morebtn-div").length==0){ - $("body").append(morediv); - } - $("#luckysheet-icon-morebtn-div").hide(); - $("#luckysheet-icon-morebtn-div > div").appendTo($("#luckysheet-wa-editor")); - // $("#luckysheet-wa-editor > div").trigger("create"); - // $("#luckysheet-icon-morebtn-div > div").trigger("create"); - $("#luckysheet-icon-morebtn").prev().remove().end().remove(); - - $("#luckysheet-wa-editor > div").each(function(){ - var $t = $(this); - toolbarW += $t.outerWidth(); - - if(!ismore && toolbarW>gridW-120){ - ismore = true; - } - - if(ismore){ - $("#luckysheet-icon-morebtn-div").append($(this)); - } - }); - - if(ismore){ - $("#luckysheet-wa-editor").append(morebtn); - $("#luckysheet-icon-morebtn").click(function(){ - var right = $(window).width() - $("#luckysheet-icon-morebtn").offset().left - $("#luckysheet-icon-morebtn").width()+ $("body").scrollLeft(); - $("#luckysheet-icon-morebtn-div").toggle().css("right", right<0?0:right); - var $txt = $(this).find(".luckysheet-toolbar-menu-button-caption"); - if($txt.text().indexOf("更多")>-1){ - $(this).find(".luckysheet-toolbar-menu-button-caption").html(' 收起... '); - } - else{ - $(this).find(".luckysheet-toolbar-menu-button-caption").html(' 更多... '); - } - - }); - //$("#luckysheet-wa-editor div").trigger("create"); - - $("#luckysheet-icon-morebtn-div .luckysheet-toolbar-menu-button").css("margin-right", -1); - $("#luckysheet-icon-morebtn-div .luckysheet-toolbar-button-split-left").css("margin-right", -3); - } - - $("#"+ container + " .luckysheet-wa-editor .luckysheet-toolbar-button-split-left").off("hover").hover(function(){ - $(this).next(".luckysheet-toolbar-button-split-right").addClass("luckysheet-toolbar-button-split-right-hover"); - }, function(){ - $(this).next(".luckysheet-toolbar-button-split-right").removeClass("luckysheet-toolbar-button-split-right-hover"); - }); - - $("#"+ container + " .luckysheet-wa-editor .luckysheet-toolbar-button-split-right").off("hover").hover(function(){ - $(this).prev(".luckysheet-toolbar-button-split-left").addClass("luckysheet-toolbar-button-hover"); - }, function(){ - $(this).prev(".luckysheet-toolbar-button-split-left").removeClass("luckysheet-toolbar-button-hover"); - }); - } - - luckysheet.filterseletedbyindex = function (r1, r2, c1, c2) { - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - $('#luckysheet-filter-selected-sheet' + luckysheet.currentSheetIndex).css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }); - $option = $('#luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).find(".luckysheet-filter-options"); - for (var c = c1; c <= c2; c++) { - $option.eq(c - c1).css({ "left": (visibledatacolumn[c] - 20), "top": visibledatarow[r1 - 1] }); - } - } - - //公式函数 选区实体框 - luckysheet.seletedHighlistByindex = function (id, r1, r2, c1, c2) { - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - $('#' + id).css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }); - } - - //选区 - luckysheet.selectHightlightShow = function(){ - $("#luckysheet-cell-selected-boxs").show(); - $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").siblings(".luckysheet-cell-selected").remove(); - - if(luckysheet_select_save.length > 0){ - for(var i = 0; i < luckysheet_select_save.length; i++){ - var r1 = luckysheet_select_save[i].row[0], r2 = luckysheet_select_save[i].row[1]; - var c1 = luckysheet_select_save[i].column[0], c2 = luckysheet_select_save[i].column[1]; - - if(luckysheet_select_save[i].row_focus == null){ - var rf = r1; - } - else{ - var rf = luckysheet_select_save[i].row_focus; - } - - if(luckysheet_select_save[i].column_focus == null){ - var cf = c1; - } - else{ - var cf = luckysheet_select_save[i].column_focus; - } - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var row_f = visibledatarow[rf], row_pre_f = rf - 1 == -1 ? 0 : visibledatarow[rf - 1]; - var col_f = visibledatacolumn[cf], col_pre_f = cf - 1 == -1 ? 0 : visibledatacolumn[cf - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, rf, cf); - if(!!margeset){ - row_f = margeset.row[1]; - row_pre_f = margeset.row[0]; - - col_f = margeset.column[1]; - col_pre_f = margeset.column[0]; - } - - luckysheet_select_save[i]["row"] = [r1, r2]; - luckysheet_select_save[i]["column"] = [c1, c2]; - - luckysheet_select_save[i]["row_focus"] = rf; - luckysheet_select_save[i]["column_focus"] = cf; - - luckysheet_select_save[i]["left"] = col_pre_f; - luckysheet_select_save[i]["width"] = col_f - col_pre_f - 1; - luckysheet_select_save[i]["top"] = row_pre_f; - luckysheet_select_save[i]["height"] = row_f - row_pre_f - 1; - - luckysheet_select_save[i]["left_move"] = col_pre; - luckysheet_select_save[i]["width_move"] = col - col_pre - 1; - luckysheet_select_save[i]["top_move"] = row_pre; - luckysheet_select_save[i]["height_move"] = row - row_pre - 1; - - if(i == 0){ - if(luckysheet_select_save.length == 1){ - if(mobilecheck){//移动端 - $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({ - "left": luckysheet_select_save[i]["left_move"], - "width": luckysheet_select_save[i]["width_move"], - "top": luckysheet_select_save[i]["top_move"], - "height": luckysheet_select_save[i]["height_move"], - "display": "block", - "border": "1px solid #0188fb" - }) - .find(".luckysheet-cs-draghandle") - .css("display", "block") - .end() - .find(".luckysheet-cs-fillhandle") - .css("display", "none") - .end() - .find(".luckysheet-cs-touchhandle") - .css("display", "block"); - } - else{ - $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({ - "left": luckysheet_select_save[i]["left_move"], - "width": luckysheet_select_save[i]["width_move"], - "top": luckysheet_select_save[i]["top_move"], - "height": luckysheet_select_save[i]["height_move"], - "display": "block", - "border": "1px solid #0188fb" - }) - .find(".luckysheet-cs-draghandle") - .css("display", "block") - .end() - .find(".luckysheet-cs-fillhandle") - .css("display", "block") - .end() - .find(".luckysheet-cs-touchhandle") - .css("display", "none"); - } - } - else{ - $("#luckysheet-cell-selected-boxs #luckysheet-cell-selected").css({ - "left": luckysheet_select_save[i]["left_move"], - "width": luckysheet_select_save[i]["width_move"], - "top": luckysheet_select_save[i]["top_move"], - "height": luckysheet_select_save[i]["height_move"], - "display": "block", - "border": "1px solid rgba(1, 136, 251, 0.15)" - }) - .find(".luckysheet-cs-draghandle") - .css("display", "none") - .end() - .find(".luckysheet-cs-fillhandle") - .css("display", "none"); - } - } - else{ - $("#luckysheet-cell-selected-boxs").append('
'); - } - - if(i == luckysheet_select_save.length - 1){ - //focus 取选区数组最后一个 - $("#luckysheet-cell-selected-focus").css({ - "left": luckysheet_select_save[i]["left"], - "width": luckysheet_select_save[i]["width"], - "top": luckysheet_select_save[i]["top"], - "height": luckysheet_select_save[i]["height"], - "display": "block" - }); - //行列数 - luckysheet.luckysheet_count_show( - luckysheet_select_save[i]["left_move"], - luckysheet_select_save[i]["top_move"], - luckysheet_select_save[i]["width_move"], - luckysheet_select_save[i]["height_move"], - [r1, r2], - [c1, c2] - ); - //左上角选择区域框 - luckysheet.formula.fucntionboxshow(rf, cf); - } - } - - //行列标题栏 - luckysheet.selectTitlesShow(luckysheet_select_save); - - //左上角范围显示 - $("#luckysheet-helpbox-cell").text(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save[luckysheet_select_save.length - 1])); - - //动态数组显示 - if(luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1]){ - luckysheet.dynamicArray_hightShow(luckysheet_select_save[0].row[0], luckysheet_select_save[0].column[0]); - } - } - - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].luckysheet_select_save = luckysheet_select_save; - } - - //选区标题栏 - luckysheet.selectTitlesShow = function(rangeArr){ - var s = $.extend(true, [], rangeArr); - - var rowTitleMap = {}, columnTitleMap = {}; - for(var i = 0; i < s.length; i++){ - var r1 = s[i]["row"][0], r2 = s[i]["row"][1], c1 = s[i]["column"][0], c2 = s[i]["column"][1]; - //行、列标题栏 - rowTitleMap = luckysheet.selectTitlesMap(rowTitleMap, r1, r2); - columnTitleMap = luckysheet.selectTitlesMap(columnTitleMap, c1, c2); - } - - //行标题 - $("#luckysheet-rows-h-selected").empty(); - - var rowTitleRange = luckysheet.selectTitlesRange(rowTitleMap); - for(var i = 0; i < rowTitleRange.length; i++){ - var r1 = rowTitleRange[i][0], r2 = rowTitleRange[i][rowTitleRange[i].length - 1]; - var row = luckysheet.rowLocationByIndex(r2)[1], row_pre = luckysheet.rowLocationByIndex(r1)[0]; - - $("#luckysheet-rows-h-selected").append('
'); - } - - //列标题 - $("#luckysheet-cols-h-selected").empty(); - - var columnTitleRange = luckysheet.selectTitlesRange(columnTitleMap); - for(var j = 0; j < columnTitleRange.length; j++){ - var c1 = columnTitleRange[j][0], c2 = columnTitleRange[j][columnTitleRange[j].length - 1]; - var col = luckysheet.colLocationByIndex(c2)[1], col_pre = luckysheet.colLocationByIndex(c1)[0]; - - $("#luckysheet-cols-h-selected").append('
'); - } - } - luckysheet.selectTitlesMap = function(rangeMap, range1, range2){ - var map = $.extend(true, {}, rangeMap); - for(var i = range1; i <= range2; i++){ - if(i in map){ - continue; - } - map[i] = 0; - } - return map; - } - luckysheet.selectTitlesRange = function(map){ - var mapArr = []; - for(var i in map){ - mapArr.push(i); - } - mapArr.sort(function(a, b){ return a - b; }); - - var rangeArr = []; - var item = []; - if(mapArr.length > 1){ - for(var j = 1; j < mapArr.length; j++){ - if(mapArr[j] - mapArr[j - 1] == 1){ - item.push(mapArr[j - 1]); - if(j == mapArr.length - 1){ - item.push(mapArr[j]); - rangeArr.push(item); - } - } - else{ - if(j == 1){ - if(j == mapArr.length - 1){ - item.push(mapArr[j - 1]); - rangeArr.push(item); - rangeArr.push([mapArr[j]]); - } - else{ - rangeArr.push(mapArr[0]); - } - } - else if(j == mapArr.length - 1){ - item.push(mapArr[j - 1]); - rangeArr.push(item); - rangeArr.push([mapArr[j]]); - } - else{ - item.push(mapArr[j - 1]); - rangeArr.push(item); - item = []; - } - } - } - } - else{ - rangeArr.push([mapArr[0]]); - } - - return rangeArr; - } - - //选区是否重叠 - luckysheet.selectIsOverlap = function(){ - var overlap = false; - var map = {}; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var str_r = luckysheet_select_save[s].row[0], end_r = luckysheet_select_save[s].row[1]; - var str_c = luckysheet_select_save[s].column[0], end_c = luckysheet_select_save[s].column[1]; - - for(var r = str_r; r <= end_r; r++){ - for(var c = str_c; c <= end_c; c++){ - if((r + "_" + c) in map){ - overlap = true; - break; - } - else{ - map[r + "_" + c] = 0; - } - } - } - } - - return overlap; - } - - //复制选区虚线框 - luckysheet.selectionCopyShow = function(range){ - $("#luckysheet-selection-copy").empty(); - - if(range == null){ - range = luckysheet_selection_range; - } - - if(range.length > 0){ - for(var s = 0; s < range.length; s++){ - var r1 = range[s].row[0], r2 = range[s].row[1]; - var c1 = range[s].column[0], c2 = range[s].column[1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var copyDomHtml = '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'; - $("#luckysheet-selection-copy").append(copyDomHtml); - } - } - } - - //范围是否只包含部分合并单元格 - luckysheet.hasPartMC = function(cfg, r1, r2, c1, c2){ - var hasPartMC = false; - - for(x in config["merge"]){ - var mc = cfg["merge"][x]; - - if(r1 < mc.r){ - if(r2 >= mc.r && r2 < (mc.r + mc.rs - 1)){ - if(c1 >= mc.c && c1 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c2 >= mc.c && c2 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 < mc.c && c2 > (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - } - else if(r2 >= mc.r && r2 == (mc.r + mc.rs - 1)){ - if(c1 > mc.c && c1 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c2 > mc.c && c2 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 == mc.c && c2 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 > mc.c && c2 == (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - } - else if(r2 > (mc.r + mc.rs - 1)){ - if(c1 > mc.c && c1 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c2 >= mc.c && c2 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 == mc.c && c2 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 > mc.c && c2 == (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - } - } - else if(r1 == mc.r){ - if(r2 < (mc.r + mc.rs - 1)){ - if(c1 >= mc.c && c1 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c2 >= mc.c && c2 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 < mc.c && c2 > (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - } - else if(r2 >= (mc.r + mc.rs - 1)){ - if(c1 > mc.c && c1 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c2 >= mc.c && c2 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 == mc.c && c2 < (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 > mc.c && c2 == (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - } - } - else if(r1 <= (mc.r + mc.rs - 1)){ - if(c1 >= mc.c && c1 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c2 >= mc.c && c2 <= (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - else if(c1 < mc.c && c2 > (mc.c + mc.cs - 1)){ - hasPartMC = true; - break; - } - } - } - - return hasPartMC; - } - - //范围是否都是空单元格(除第一个单元格) - luckysheet.dynamicArray_rangeIsAllNull = function(range, data){ - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var isAllNull = true; - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - if(!(r == r1 && c == c1) && data[r][c] != null && data[r][c].v != null && data[r][c].v.toString() != ""){ - isAllNull = false; - break; - } - } - } - - return isAllNull; - } - luckysheet.dynamicArray_spillEditCompute = function(computeObj, r, c){ - var rowIndex = computeObj[r + "_" + c].r; - var colIndex = computeObj[r + "_" + c].c; - - for(x in computeObj){ - if(x == (rowIndex + "_" + colIndex)){ - computeObj[x].v = "#SPILL!"; - } - else if(computeObj[x].r == rowIndex && computeObj[x].c == colIndex){ - delete computeObj[x]; - } - } - - return computeObj; - } - - //点击表格区域是否属于动态数组区域 - luckysheet.dynamicArray_hightShow = function(r, c){ - var dynamicArray = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["dynamicArray"] == null ? [] : luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["dynamicArray"]; - var dynamicArray_compute = luckysheet.dynamicArray_compute(dynamicArray); - - if((r + "_" + c) in dynamicArray_compute && dynamicArray_compute[r + "_" + c].v != "#SPILL!"){ - var d_row = dynamicArray_compute[r + "_" + c].r; - var d_col = dynamicArray_compute[r + "_" + c].c; - - var d_f = luckysheet.flowdata[d_row][d_col].f; - - var rlen, clen; - for(var i = 0; i < dynamicArray.length; i++){ - if(dynamicArray[i].f == d_f){ - rlen = dynamicArray[i].data.length; - - if(luckysheet.getObjType(dynamicArray[i].data[0]) == "array"){ - clen = dynamicArray[i].data[0].length; - } - else{ - clen = 1; - } - } - } - - var d_row_end = d_row + rlen - 1; - var d_col_end = d_col + clen - 1; - - var row = visibledatarow[d_row_end], row_pre = d_row - 1 == -1 ? 0 : visibledatarow[d_row - 1]; - var col = visibledatacolumn[d_col_end], col_pre = d_col - 1 == -1 ? 0 : visibledatacolumn[d_col - 1]; - - $("#luckysheet-dynamicArray-hightShow").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1, "display": "block" }); - } - else{ - $("#luckysheet-dynamicArray-hightShow").hide(); - } - } - - //动态数组计算 - luckysheet.dynamicArray_compute = function(dynamicArray){ - var dynamicArray_compute = {}; - - if(luckysheet.getObjType(dynamicArray) == "array"){ - for(var i = 0; i < dynamicArray.length; i++){ - var d_row = dynamicArray[i].r; - var d_col = dynamicArray[i].c; - var d_f = dynamicArray[i].f; - - if(luckysheet.flowdata[d_row][d_col] != null && luckysheet.flowdata[d_row][d_col].f != null && luckysheet.flowdata[d_row][d_col].f == d_f){ - if((d_row + "_" + d_col) in dynamicArray_compute){ - dynamicArray_compute = luckysheet.dynamicArray_spillEditCompute(dynamicArray_compute, d_row , d_col); - } - - var d_data = dynamicArray[i].data; - var d_rowlen = d_data.length; - var d_collen = 1; - - if(luckysheet.getObjType(d_data[0]) == "array"){ - d_collen = d_data[0].length; - } - - if(luckysheet.dynamicArray_rangeIsAllNull({ "row": [d_row, d_row + d_rowlen - 1], "column": [d_col, d_col + d_collen - 1] }, luckysheet.flowdata)){ - for(var x = 0; x < d_rowlen; x++){ - for(var y = 0; y < d_collen; y++){ - var rowIndex = d_row + x; - var colIndex = d_col + y; - - if(luckysheet.getObjType(d_data[0]) == "array"){ - dynamicArray_compute[rowIndex + "_" + colIndex] = {"v": d_data[x][y], "r": d_row, "c": d_col}; - } - else{ - dynamicArray_compute[rowIndex + "_" + colIndex] = {"v": d_data[x], "r": d_row, "c": d_col}; - } - } - } - } - else{ - dynamicArray_compute[d_row + "_" + d_col] = {"v": "#SPILL!", "r": d_row, "c": d_col}; - } - } - } - } - - return dynamicArray_compute; - } - - //shift + 方向键 / ctrl + shift + 方向键 功能 - luckysheet.rowHasMerge = function(r, c1, c2){ - var rowHasMerge = false; - - for(var c = c1; c <= c2; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - rowHasMerge = true; - break; - } - } - - return rowHasMerge; - } - luckysheet.colHasMerge = function(c, r1, r2){ - var colHasMerge = false; - - for(var r = r1; r <= r2; r++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - colHasMerge = true; - break; - } - } - - return colHasMerge; - } - luckysheet.getRowMerge = function(rIndex, c1, c2){ - var r1 = 0, r2 = luckysheet.flowdata.length - 1; - - var str = null; - if(rIndex > r1){ - for(var r = rIndex; r >= r1; r--){ - for(var c = c1; c <= c2; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - var mc = config["merge"][cell["mc"].r + "_" + cell["mc"].c]; - - if(str == null || mc.r < str){ - str = mc.r; - } - } - } - - if(luckysheet.rowHasMerge(str - 1, c1, c2) && str > r1){ - r = str - 1; - } - else{ - break; - } - } - } - else{ - str = r1; - } - - var end = null; - if(rIndex < r2){ - for(var r = rIndex; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - var mc = config["merge"][cell["mc"].r + "_" + cell["mc"].c]; - - if(end == null || (mc.r + mc.rs - 1) > end){ - end = mc.r + mc.rs - 1; - } - } - } - - if(luckysheet.rowHasMerge(end + 1, c1, c2) && end < r2){ - r = end + 1; - } - else{ - break; - } - } - } - else{ - end = r2; - } - - return [str, end]; - } - luckysheet.getColMerge = function(cIndex, r1, r2){ - var c1 = 0, c2 = luckysheet.flowdata[0].length - 1; - - var str = null; - if(cIndex > c1){ - for(var c = cIndex; c >= c1; c--){ - for(var r = r1; r <= r2; r++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - var mc = config["merge"][cell["mc"].r + "_" + cell["mc"].c]; - - if(str == null || mc.c < str){ - str = mc.c; - } - } - } - - if(luckysheet.colHasMerge(str - 1, r1, r2) && str > c1){ - c = str - 1; - } - else{ - break; - } - } - } - else{ - str = c1; - } - - var end = null; - if(cIndex < c2){ - for(var c = cIndex; c <= c2; c++){ - for(var r = r1; r <= r2; r++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - var mc = config["merge"][cell["mc"].r + "_" + cell["mc"].c]; - - if(end == null || (mc.c + mc.cs - 1) > end){ - end = mc.c + mc.cs - 1; - } - } - } - - if(luckysheet.colHasMerge(end + 1, r1, r2) && end < c2){ - c = end + 1; - } - else{ - break; - } - } - } - else{ - end = c2; - } - - return [str, end]; - } - luckysheet.getNextIndex = function(direction, focusIndex, strIndex, endIndex){ - var index = null; - - var stNull; - if(direction == "down"){ - var stValue = luckysheet.flowdata[strIndex][focusIndex]; - - if(luckysheet.getObjType(stValue) == "object" && luckysheet.func_methods.isRealNull(stValue.v)){ - stNull = false; - } - else if(luckysheet.func_methods.isRealNull(stValue)){ - stNull = false; - } - else{ - stNull = true; - } - - var cellNull = [], i = 0; - for(var r = strIndex + 1; r <= endIndex; r++){ - var cell = luckysheet.flowdata[r][focusIndex]; - - if(luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)){ - cellNull.push(false); - } - else if(luckysheet.func_methods.isRealNull(cell)){ - cellNull.push(false); - } - else{ - cellNull.push(true); - } - - if(cellNull.length == 1 && stNull && cellNull[i] == false){ - index = strIndex + i + 1; - break; - } - else if(cellNull.length > 1){ - if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 - index = strIndex + i + 1; - break; - } - else if(!stNull){ //起始有值,找一个有值的位置 - if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 - index = strIndex + i + 1; - break; - } - else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 - index = strIndex + i; - break; - } - } - } - - if(r == endIndex){ - index = endIndex; - } - - i++; - } - } - else if(direction == "up"){ - var stValue = luckysheet.flowdata[endIndex][focusIndex]; - - if(luckysheet.getObjType(stValue) == "object" && luckysheet.func_methods.isRealNull(stValue.v)){ - stNull = false; - } - else if(luckysheet.func_methods.isRealNull(stValue)){ - stNull = false; - } - else{ - stNull = true; - } - - var cellNull = [], i = 0; - for(var r = endIndex - 1; r >= strIndex; r--){ - var cell = luckysheet.flowdata[r][focusIndex]; - - if(luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)){ - cellNull.push(false); - } - else if(luckysheet.func_methods.isRealNull(cell)){ - cellNull.push(false); - } - else{ - cellNull.push(true); - } - - if(cellNull.length == 1 && stNull && cellNull[i] == false){ - index = endIndex - (i + 1); - break; - } - else if(cellNull.length > 1){ - if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 - index = endIndex - (i + 1); - break; - } - else if(!stNull){ //起始有值,找一个有值的位置 - if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 - index = endIndex - (i + 1); - break; - } - else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 - index = endIndex - i; - break; - } - } - } - - if(r == strIndex){ - index = strIndex; - } - - i++; - } - } - else if(direction == "right"){ - var stValue = luckysheet.flowdata[focusIndex][strIndex]; - - if(luckysheet.getObjType(stValue) == "object" && luckysheet.func_methods.isRealNull(stValue.v)){ - stNull = false; - } - else if(luckysheet.func_methods.isRealNull(stValue)){ - stNull = false; - } - else{ - stNull = true; - } - - var cellNull = [], i = 0; - for(var c = strIndex + 1; c <= endIndex; c++){ - var cell = luckysheet.flowdata[focusIndex][c]; - - if(luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)){ - cellNull.push(false); - } - else if(luckysheet.func_methods.isRealNull(cell)){ - cellNull.push(false); - } - else{ - cellNull.push(true); - } - - if(cellNull.length == 1 && stNull && cellNull[i] == false){ - index = strIndex + i + 1; - break; - } - else if(cellNull.length > 1){ - if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 - index = strIndex + i + 1; - break; - } - else if(!stNull){ //起始有值,找一个有值的位置 - if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 - index = strIndex + i + 1; - break; - } - else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 - index = strIndex + i; - break; - } - } - } - - if(c == endIndex){ - index = endIndex; - } - - i++; - } - } - else if(direction == "left"){ - var stValue = luckysheet.flowdata[focusIndex][endIndex]; - - if(luckysheet.getObjType(stValue) == "object" && luckysheet.func_methods.isRealNull(stValue.v)){ - stNull = false; - } - else if(luckysheet.func_methods.isRealNull(stValue)){ - stNull = false; - } - else{ - stNull = true; - } - - var cellNull = [], i = 0; - for(var c = endIndex - 1; c >= strIndex; c--){ - var cell = luckysheet.flowdata[focusIndex][c]; - - if(luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)){ - cellNull.push(false); - } - else if(luckysheet.func_methods.isRealNull(cell)){ - cellNull.push(false); - } - else{ - cellNull.push(true); - } - - if(cellNull.length == 1 && stNull && cellNull[i] == false){ - index = endIndex - (i + 1); - break; - } - else if(cellNull.length > 1){ - if(stNull && cellNull[i] == false){ //起始是空,找第一个有值的位置 - index = endIndex - (i + 1); - break; - } - else if(!stNull){ //起始有值,找一个有值的位置 - if(cellNull[i] == false && cellNull[i - 1] == true){ //前面为空 - index = endIndex - (i + 1); - break; - } - else if(cellNull[i] == true && cellNull[i - 1] == false){ //后面为空 - index = endIndex - i; - break; - } - } - } - - if(c == strIndex){ - index = strIndex; - } - - i++; - } - } - - return index; - } - - //获取表格边框数据计算值 - luckysheet.getBorderInfoCompute = function(sheetIndex){ - var borderInfoCompute = {}; - - if(sheetIndex == null){ - var cfg = config; - var data = luckysheet.flowdata; - } - else{ - var cfg = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)].config; - var data = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)].data; - } - - var borderInfo = cfg["borderInfo"]; - - if(borderInfo != null && borderInfo.length > 0){ - for(var i = 0; i < borderInfo.length; i++){ - var rangeType = borderInfo[i].rangeType; - - if(rangeType == "range"){ - var borderType = borderInfo[i].borderType; - var borderColor = borderInfo[i].color; - var borderStyle = borderInfo[i].style; - - var borderRange = borderInfo[i].range; - - for(var j = 0; j < borderRange.length; j++){ - var bd_r1 = borderRange[j].row[0], bd_r2 = borderRange[j].row[1]; - var bd_c1 = borderRange[j].column[0], bd_c2 = borderRange[j].column[1]; - - if(borderType == "border-left"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - if(borderInfoCompute[bd_r + "_" + bd_c1] == null){ - borderInfoCompute[bd_r + "_" + bd_c1] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c1].l = { "color": borderColor, "style": borderStyle }; - - var bd_c_left = bd_c1 - 1; - - if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ - var cell_left = data[bd_r][bd_c_left]; - - var mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; - - if(mc.c + mc.cs - 1 == bd_c_left){ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; - } - } - } - } - else if(borderType == "border-right"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - if(borderInfoCompute[bd_r + "_" + bd_c2] == null){ - borderInfoCompute[bd_r + "_" + bd_c2] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c2].r = { "color": borderColor, "style": borderStyle }; - - var bd_c_right = bd_c2 + 1; - - if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ - var cell_right = data[bd_r][bd_c_right]; - - var mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; - - if(mc.c == bd_c_right){ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; - } - } - } - } - else if(borderType == "border-top"){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r1] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(borderInfoCompute[bd_r1 + "_" + bd_c] == null){ - borderInfoCompute[bd_r1 + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r1 + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - - var bd_r_top = bd_r1 - 1; - - if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ - if(data[bd_r_top] != null && luckysheet.getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ - var cell_top = data[bd_r_top][bd_c]; - - var mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; - - if(mc.r + mc.rs - 1 == bd_r_top){ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - } - } - else if(borderType == "border-bottom"){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r2] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(borderInfoCompute[bd_r2 + "_" + bd_c] == null){ - borderInfoCompute[bd_r2 + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r2 + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - - var bd_r_bottom = bd_r2 + 1; - - if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ - if(data[bd_r_bottom] != null && luckysheet.getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ - var cell_bottom = data[bd_r_bottom][bd_c]; - - var mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; - - if(mc.r == bd_r_bottom){ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - } - } - else if(borderType == "border-all"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.r == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - - if(mc.r + mc.rs - 1 == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - - if(mc.c == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - } - - if(mc.c + mc.cs - 1 == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - - if(bd_r == bd_r1){ - var bd_r_top = bd_r1 - 1; - - if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ - if(data[bd_r_top] != null && luckysheet.getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ - var cell_top = data[bd_r_top][bd_c]; - - var mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; - - if(mc.r + mc.rs - 1 == bd_r_top){ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - } - - if(bd_r == bd_r2){ - var bd_r_bottom = bd_r2 + 1; - - if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ - if(data[bd_r_bottom] != null && luckysheet.getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ - var cell_bottom = data[bd_r_bottom][bd_c]; - - var mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; - - if(mc.r == bd_r_bottom){ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - } - - if(bd_c == bd_c1){ - var bd_c_left = bd_c1 - 1; - - if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ - var cell_left = data[bd_r][bd_c_left]; - - var mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; - - if(mc.c + mc.cs - 1 == bd_c_left){ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; - } - } - } - - if(bd_c == bd_c2){ - var bd_c_right = bd_c2 + 1; - - if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ - var cell_right = data[bd_r][bd_c_right]; - - var mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; - - if(mc.c == bd_c_right){ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; - } - } - } - } - } - } - else if(borderType == "border-outside"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(!(bd_r == bd_r1 || bd_r == bd_r2 || bd_c == bd_c1 || bd_c == bd_c2)){ - continue; - } - - if(bd_r == bd_r1){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - - var bd_r_top = bd_r1 - 1; - - if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ - if(data[bd_r_top] != null && luckysheet.getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ - var cell_top = data[bd_r_top][bd_c]; - - var mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; - - if(mc.r + mc.rs - 1 == bd_r_top){ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - } - - if(bd_r == bd_r2){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - - var bd_r_bottom = bd_r2 + 1; - - if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ - if(data[bd_r_bottom] != null && luckysheet.getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ - var cell_bottom = data[bd_r_bottom][bd_c]; - - var mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; - - if(mc.r == bd_r_bottom){ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - } - - if(bd_c == bd_c1){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - - var bd_c_left = bd_c1 - 1; - - if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ - var cell_left = data[bd_r][bd_c_left]; - - var mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; - - if(mc.c + mc.cs - 1 == bd_c_left){ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle }; - } - } - } - - if(bd_c == bd_c2){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - - var bd_c_right = bd_c2 + 1; - - if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ - var cell_right = data[bd_r][bd_c_right]; - - var mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; - - if(mc.c == bd_c_right){ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle }; - } - } - } - } - } - } - else if(borderType == "border-inside"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(bd_r == bd_r1 && bd_c == bd_c1){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_r == bd_r2 && bd_c == bd_c1){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_r == bd_r1 && bd_c == bd_c2){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_r == bd_r2 && bd_c == bd_c2){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_r == bd_r1){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.c == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - } - else if(mc.c + mc.cs - 1 == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_r == bd_r2){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.c == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - } - else if(mc.c + mc.cs - 1 == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_c == bd_c1){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.r == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - else if(mc.r + mc.rs - 1 == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_c == bd_c2){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.r == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - else if(mc.r + mc.rs - 1 == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.r == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - else if(mc.r + mc.rs - 1 == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - - if(mc.c == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - } - else if(mc.c + mc.cs - 1 == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - } - } - } - else if(borderType == "border-horizontal"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(bd_r == bd_r1){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_r == bd_r2){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.r == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - } - else if(mc.r + mc.rs - 1 == bd_r){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle }; - } - } - } - } - } - else if(borderType == "border-vertical"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(bd_c == bd_c1){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - else if(bd_c == bd_c2){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(mc.c == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - } - else if(mc.c + mc.cs - 1 == bd_c){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - else{ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle }; - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle }; - } - } - } - } - } - else if(borderType == "border-none"){ - for(var bd_r = bd_r1; bd_r <= bd_r2; bd_r++){ - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - for(var bd_c = bd_c1; bd_c <= bd_c2; bd_c++){ - if(borderInfoCompute[bd_r + "_" + bd_c] != null){ - delete borderInfoCompute[bd_r + "_" + bd_c]; - } - - if(bd_r == bd_r1){ - var bd_r_top = bd_r1 - 1; - - if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ - delete borderInfoCompute[bd_r_top + "_" + bd_c].b; - } - } - - if(bd_r == bd_r2){ - var bd_r_bottom = bd_r2 + 1; - - if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ - delete borderInfoCompute[bd_r_bottom + "_" + bd_c].t; - } - } - - if(bd_c == bd_c1){ - var bd_c_left = bd_c1 - 1; - - if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ - delete borderInfoCompute[bd_r + "_" + bd_c_left].r; - } - } - - if(bd_c == bd_c2){ - var bd_c_right = bd_c2 + 1; - - if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ - delete borderInfoCompute[bd_r + "_" + bd_c_right].l; - } - } - } - } - } - } - } - else if(rangeType == "cell"){ - var value = borderInfo[i].value; - - var bd_r = value.row_index, bd_c = value.col_index; - - if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) { - continue; - } - - if(value.l != null || value.r != null || value.t != null || value.b != null){ - if(borderInfoCompute[bd_r + "_" + bd_c] == null){ - borderInfoCompute[bd_r + "_" + bd_c] = {}; - } - - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){ - var cell = data[bd_r][bd_c]; - var mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c]; - - if(value.l != null && bd_c == mc.c){ //左边框 - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style }; - - var bd_c_left = bd_c - 1; - - if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ - var cell_left = data[bd_r][bd_c_left]; - - var mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; - - if(mc_l.c + mc_l.cs - 1 == bd_c_left){ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].l = null; - } - - if(value.r != null && bd_c == mc.c + mc.cs - 1){ //右边框 - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style }; - - var bd_c_right = bd_c + 1; - - if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ - var cell_right = data[bd_r][bd_c_right]; - - var mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; - - if(mc_r.c == bd_c_right){ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].r = null; - } - - if(value.t != null && bd_r == mc.r){ //上边框 - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style }; - - var bd_r_top = bd_r - 1; - - if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ - if(data[bd_r_top] != null && luckysheet.getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ - var cell_top = data[bd_r_top][bd_c]; - - var mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; - - if(mc_t.r + mc_t.rs - 1 == bd_r_top){ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; - } - } - else{ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].t = null; - } - - if(value.b != null && bd_r == mc.r + mc.rs - 1){ //下边框 - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style }; - - var bd_r_bottom = bd_r + 1; - - if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ - if(data[bd_r_bottom] != null && luckysheet.getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ - var cell_bottom = data[bd_r_bottom][bd_c]; - - var mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; - - if(mc_b.r == bd_r_bottom){ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; - } - } - else{ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].b = null; - } - } - else{ - if(value.l != null){ //左边框 - borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style }; - - var bd_c_left = bd_c - 1; - - if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){ - var cell_left = data[bd_r][bd_c_left]; - - var mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c]; - - if(mc_l.c + mc_l.cs - 1 == bd_c_left){ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].l = null; - } - - if(value.r != null){ //右边框 - borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style }; - - var bd_c_right = bd_c + 1; - - if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){ - if(data[bd_r] != null && luckysheet.getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){ - var cell_right = data[bd_r][bd_c_right]; - - var mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c]; - - if(mc_r.c == bd_c_right){ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].r = null; - } - - if(value.t != null){ //上边框 - borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style }; - - var bd_r_top = bd_r - 1; - - if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){ - if(data[bd_r_top] != null && luckysheet.getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){ - var cell_top = data[bd_r_top][bd_c]; - - var mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c]; - - if(mc_t.r + mc_t.rs - 1 == bd_r_top){ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; - } - } - else{ - borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].t = null; - } - - if(value.b != null){ //下边框 - borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style }; - - var bd_r_bottom = bd_r + 1; - - if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){ - if(data[bd_r_bottom] != null && luckysheet.getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){ - var cell_bottom = data[bd_r_bottom][bd_c]; - - var mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c]; - - if(mc_b.r == bd_r_bottom){ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; - } - } - else{ - borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style }; - } - } - } - else{ - borderInfoCompute[bd_r + "_" + bd_c].b = null; - } - } - } - else{ - delete borderInfoCompute[bd_r + "_" + bd_c]; - } - } - } - } - - return borderInfoCompute; - } - - var luckysheetbinary_search = function (arr, key) { - var low = 0, high = arr.length - 1; - while (low <= high) { - var mid = parseInt((high + low) / 2); - if (key < arr[mid] && (mid == 0 || key >= arr[mid - 1])) { - return mid; - } - else if (key >= arr[mid]) { - low = mid + 1; - } - else if (key < arr[mid]) { - high = mid - 1; - } - else { - return -1; - } - } - } - - var luckysheetorder_search = function (arr, y) { - var i = 0, row = 0, row_pre = 0, row_index = -1, i_ed = arr.length - 1; - while (i < arr.length && i_ed >= 0 && i_ed >= i) { - row = arr[i_ed]; - if (i_ed == 0) { - row_pre = 0; - } - else { - row_pre = arr[i_ed - 1]; - } - - if (y >= row_pre && y < row) { - row_index = i_ed; - break; - } - - row = arr[i]; - if (i == 0) { - row_pre = 0; - } - else { - row_pre = arr[i - 1]; - } - - if (y >= row_pre && y < row) { - row_index = i; - break; - } - - i++; - i_ed--; - } - - return row_index; - } - - var luckysheet_searcharray = function (arr, y) { - if(luckysheetConfigsetting.pointEdit){ - arr = $.extend(true, [], arr); - - for(var i = 0; i < arr.length; i++){ - arr[i] = arr[i] * luckysheetConfigsetting.pointEditZoom; - } - } - - var index = arr.length - 1; - if (arr.length < 40 || y <= arr[20] || y >= arr[index - 20]) { - index = luckysheetorder_search(arr, y); - } - else { - index = luckysheetbinary_search(arr, y); - } - return index; - } - - //, columeflowset, rowflowset - luckysheet.luckysheetHandler = function () { - //var rowshowstate = []; - //for(var i=0; i= scrollLeft) { - // // //col_ed -= 1; - // // if (col_ed <= 0) { - // // scrollLeft = 0; - // // } - // // else { - // // scrollLeft = visibledatacolumn_c[col_ed]; - // // } - // // } - - // // if (luckysheetautoscrollp[1] < scrollTop) { - // // //row_ed += luckysheetautoadjustmousedown; - // // if (row_ed == 0) { - // // scrollTop = visibledatarow_c[0]; - // // } - // // else { - // // scrollTop = visibledatarow_c[row_ed-1]; - // // } - // // //console.log(scrollTop, visibledatarow_c, row_ed); - // // } - // // else if (luckysheetautoscrollp[1] >= scrollTop) { - // // //row_ed -= luckysheetautoadjustmousedown; - // // if (row_ed <= 0) { - // // scrollTop = 0; - // // } - // // else { - // // scrollTop = visibledatarow_c[row_ed]; - // // } - // // } - // } - - if (luckysheet.freezen.freezenhorizontaldata != null) { - if (scrollTop < luckysheet.freezen.freezenhorizontaldata[2]) { - scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - $("#luckysheet-scrollbar-y").scrollTop(scrollTop); - return; - //$(this).scrollTop(scrollTop); - } - } - - if (luckysheet.freezen.freezenverticaldata != null) { - if (scrollLeft < luckysheet.freezen.freezenverticaldata[2]) { - scrollLeft = luckysheet.freezen.freezenverticaldata[2]; - $("#luckysheet-scrollbar-x").scrollLeft(scrollLeft); - return; - //$(this).scrollTop(scrollLeft); - } - } - - $("#luckysheet-cols-h-c").scrollLeft(scrollLeft);//列标题 - $("#luckysheet-rows-h").scrollTop(scrollTop);//行标题 - - luckysheetautoscrollp = [scrollLeft, scrollTop]; - $t.scrollLeft(scrollLeft).scrollTop(scrollTop); - - $("#luckysheet-input-box-index").css({"left": $("#luckysheet-input-box").css("left"), "top": (parseInt($("#luckysheet-input-box").css("top")) - 20) + "px", "z-index": $("#luckysheet-input-box").css("z-index")}).show(); - - luckysheet.luckysheetrefreshgrid(scrollLeft, scrollTop); - - $("#luckysheet-bottom-controll-row").css("left", scrollLeft + 10); - - //有选区且有冻结时,滚动适应 - if(luckysheet.freezen.freezenhorizontaldata != null || luckysheet.freezen.freezenverticaldata != null){ - luckysheet.freezen.scrollAdapt(); - } - } - - $("#luckysheet-cell-main").scroll(function () { - - //luckysheet.luckysheetscrollevent(true); - - // else{ - // luckysheetautoadjust = setTimeout(function(){ - // luckysheet.luckysheetscrollevent(true); - // }, 100); - // } - // luckysheetautoadjust = setTimeout(function(){ - // luckysheet.luckysheetscrollevent(true); - // }, 100); - }).mousewheel(function (event, delta) { - //luckysheetautoadjustmousedown = 2; - //$("#luckysheet-scrollbar-x").scrollLeft($("#luckysheet-scrollbar-x").scrollLeft() - event.deltaX*19*2); - //$("#luckysheet-scrollbar-y").scrollTop($("#luckysheet-scrollbar-y").scrollTop() - event.deltaY*19*2); - event.preventDefault(); - }); - - $("#luckysheet-grid-window-1").mousewheel(function (event, delta) { - var scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(), scrollTop = $("#luckysheet-scrollbar-y").scrollTop(); - var visibledatacolumn_c = visibledatacolumn, visibledatarow_c = visibledatarow; - - if (luckysheet.freezen.freezenhorizontaldata != null) { - visibledatarow_c = luckysheet.freezen.freezenhorizontaldata[3]; - } - - if (luckysheet.freezen.freezenverticaldata != null) { - visibledatacolumn_c = luckysheet.freezen.freezenverticaldata[3]; - } - - visibledatacolumn_c = luckysheet.ArrayUnique(visibledatacolumn_c); - visibledatarow_c = luckysheet.ArrayUnique(visibledatarow_c); - - var col_st = luckysheet_searcharray(visibledatacolumn_c, scrollLeft); - var row_st = luckysheet_searcharray(visibledatarow_c, scrollTop); - - var colscroll = 0; - var rowscroll = 0; - - if(event.deltaX != 0){ - if(event.deltaX < 0){ - var col_ed = col_st + 3; - if(col_ed >= visibledatacolumn_c.length){ - col_ed = visibledatacolumn_c.length - 1; - } - } - else{ - var col_ed = col_st - 3; - if(col_ed < 0){ - col_ed = 0; - } - } - - colscroll = col_ed == 0 ? 0 : visibledatacolumn_c[col_ed - 1]; - - $("#luckysheet-scrollbar-x").scrollLeft(colscroll); - } - - if(event.deltaY != 0){ - if(event.deltaY < 0){ - var row_ed = row_st + 3; - if(row_ed >= visibledatarow_c.length){ - row_ed = visibledatarow_c.length - 1; - } - } - else{ - var row_ed = row_st - 3; - if(row_ed < 0){ - row_ed = 0; - } - } - - rowscroll = row_ed == 0 ? 0 : visibledatarow_c[row_ed - 1]; - - $("#luckysheet-scrollbar-y").scrollTop(rowscroll); - } - }); - $("#luckysheet-scrollbar-x").scroll(function(){ - //luckysheet.luckysheetscrollevent(true); - setTimeout(function(){ - luckysheet.luckysheetscrollevent(true); - },10); - }).mousewheel(function (event, delta) { - event.preventDefault(); - }); - - $("#luckysheet-scrollbar-y").scroll(function(){ - //luckysheet.luckysheetscrollevent(true); - setTimeout(function(){ - luckysheet.luckysheetscrollevent(true); - },10); - }).mousewheel(function (event, delta) { - event.preventDefault(); - }); - - $(window).resize(function () { - iscopyself = false; - //luckysheetautoadjustmousedown = 1; - var luckysheetDocument = document.getElementById("luckysheet"); - if(luckysheetDocument){ - luckysheet.luckysheetsizeauto(); - } - //luckysheetautoadjustmousedown = 2; - }); - - //数组去重 - luckysheet.ArrayUnique = function(dataArr){ - var arr = []; - - if(dataArr.length > 0){ - for(var i = 0; i < dataArr.length; i++){ - if(arr.indexOf(dataArr[i]) == -1){ - arr.push(dataArr[i]); - } - } - } - - return arr; - } - - luckysheet.rowLocationByIndex = function(row_index){ - var row = 0, row_pre = 0; - row = visibledatarow[row_index]; - - if (row_index == 0) { - row_pre = 0; - } - else { - row_pre = visibledatarow[row_index - 1]; - } - - return [row_pre, row, row_index]; - } - - luckysheet.rowLocation = function (y) { - //var row = 0, row_pre = 0; - var row_index = luckysheet_searcharray(visibledatarow, y); - - if (row_index == -1 && y > 0) { - row_index = visibledatarow.length - 1; - } - else if (row_index == -1 && y <= 0) { - row_index = 0; - } - - // row = visibledatarow[row_index]; - - // if (row_index == 0) { - // row_pre = 0; - // } - // else { - // row_pre = visibledatarow[row_index - 1]; - // } - return luckysheet.rowLocationByIndex(row_index); - } - - luckysheet.colLocationByIndex = function(col_index){ - var col = 0, col_pre = 0; - col = visibledatacolumn[col_index]; - - if (col_index == 0) { - col_pre = 0; - } - else { - col_pre = visibledatacolumn[col_index - 1]; - } - - return [col_pre, col, col_index]; - } - - luckysheet.colLocation = function (x) { - //var col = 0, col_pre = 0; - var col_index = luckysheet_searcharray(visibledatacolumn, x); - - if (col_index == -1 && x > 0) { - col_index = visibledatacolumn.length - 1; - } - else if (col_index == -1 && x <= 0) { - col_index = 0; - } - - return luckysheet.colLocationByIndex(col_index); - - // col = visibledatacolumn[col_index]; - // if (col_index == 0) { - // col_pre = 0; - // } - // else { - // col_pre = visibledatacolumn[col_index - 1]; - // } - // return [col_pre, col, col_index]; - } - - var mouseposition = function (x, y) { - var container_offset = $("#" + container).offset(); - - if(luckysheetConfigsetting.pointEdit){ - var newX = x - container_offset.left - rowHeaderWidth * luckysheetConfigsetting.pointEditZoom, - newY = y - container_offset.top - (infobarHeight + toolbarHeight + calculatebarHeight + columeHeaderHeight) * luckysheetConfigsetting.pointEditZoom; - } - else{ - var newX = x - container_offset.left - rowHeaderWidth, - newY = y - container_offset.top - infobarHeight - toolbarHeight - calculatebarHeight - columeHeaderHeight; - } - - return [newX, newY]; - } - - luckysheet.mouseposition = mouseposition; - - //选区拖动替换 - var luckysheet_cell_selected_move = false, luckysheet_cell_selected_move_index = []; - $("#luckysheet-cell-main div.luckysheet-cs-draghandle").mousedown(function (event) { - if(luckysheet.isEditMode()){//此模式下禁用选区拖动 - return; - } - - $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","move").end().find(".luckysheet-cs-draghandle").css("cursor","move"); - $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","move"); - - luckysheet_cell_selected_move = true; - luckysheet_scroll_status = true; - - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), row_pre = rowLocation[0], row = rowLocation[1], row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col_pre = colLocation[0], col = colLocation[1], col_index = colLocation[2]; - - luckysheet_cell_selected_move_index = [row_index, col_index]; - - $("#luckysheet-cell-selected-move").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1, "display": "block" }); - - event.stopPropagation(); - }); - - //选区下拉 - var luckysheet_cell_selected_extend = false, luckysheet_cell_selected_extend_index = [], luckysheet_cell_selected_extend_time = null; - $("#luckysheet-cell-main div.luckysheet-cs-fillhandle").mousedown(function (event) { - if(luckysheet.isEditMode()){//此模式下禁用选区下拉 - return; - } - - $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","crosshair"); - $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","crosshair"); - - luckysheet_cell_selected_extend_time = setTimeout(function () { - luckysheet_cell_selected_extend = true; - luckysheet_scroll_status = true; - - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft() - 5; - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop() - 5; - - var rowLocation = luckysheet.rowLocation(y), row_pre = rowLocation[0], row = rowLocation[1], row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col_pre = colLocation[0], col = colLocation[1], col_index = colLocation[2]; - - luckysheet_cell_selected_extend_index = [row_index, col_index]; - - $("#luckysheet-cell-selected-extend").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1, "display": "block" }); - }, 100); - - event.stopPropagation(); - }).click(function () { - clearTimeout(luckysheet_cell_selected_extend_time); - event.stopPropagation(); - }).dblclick(function () { - var last = luckysheet_select_save[0]; - - var r0 = last.row[0], - r1 = last.row[1], - c0 = last.column[0], - c1 = last.column[1]; - - if(luckysheet.pivotTable.isPivotRange(r0, c0)){ - return; - } - - var dropCellState = false; - var step = 0; - - for(var r = r1 + 1; r < luckysheet.flowdata.length; r++){ - if(c0 - 1 >= 0 && c1 + 1 < luckysheet.flowdata[0].length){ - var cell1 = luckysheet.flowdata[r][c0 - 1]; - var cell2 = luckysheet.flowdata[r][c1 + 1]; - - if(r == r1 + 1){ - if((cell1 == null || luckysheet.func_methods.isRealNull(cell1.v)) && (cell2 == null || luckysheet.func_methods.isRealNull(cell2.v))){ - dropCellState = false; - break; - } - else{ - dropCellState = true; - step++; - } - } - else{ - if((cell1 == null || luckysheet.func_methods.isRealNull(cell1.v)) && (cell2 == null || luckysheet.func_methods.isRealNull(cell2.v))){ - break; - } - - step++; - } - } - else if(c0 - 1 >= 0){ - var cell = luckysheet.flowdata[r][c0 - 1]; - - if(r == r1 + 1){ - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - dropCellState = false; - break; - } - else{ - dropCellState = true; - step++; - } - } - else{ - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - break; - } - - step++; - } - } - else if(c1 + 1 < luckysheet.flowdata[0].length){ - var cell = luckysheet.flowdata[r][c1 + 1]; - - if(r == r1 + 1){ - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - dropCellState = false; - break; - } - else{ - dropCellState = true; - step++; - } - } - else{ - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - break; - } - - step++; - } - } - } - - if(!dropCellState || step == 0){ - event.stopPropagation(); - return; - } - - //复制范围 - luckysheet.dropCell.copyRange = { "row": [r0, r1], "column": [c0, c1] }; - - //applyType - var typeItemHide = luckysheet.dropCell.typeItemHide(); - - if(!typeItemHide[0] && !typeItemHide[1] && !typeItemHide[2] && !typeItemHide[3] && !typeItemHide[4] && !typeItemHide[5] && !typeItemHide[6]){ - luckysheet.dropCell.applyType = "0"; - } - else{ - luckysheet.dropCell.applyType = "1"; - } - - luckysheet.dropCell.applyRange = { "row": [r1 + 1, r1 + step], "column": [c0, c1] }; - luckysheet.dropCell.direction = "down"; - - luckysheet_select_save = [{ "row": [r0, r1 + step], "column": [c0, c1] }]; - - luckysheet.dropCell.update(); - luckysheet.dropCell.createIcon(); - - $("#luckysheet-cell-selected-move").hide(); - - $("#luckysheet-sheettable").css("cursor", "default"); - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - - event.stopPropagation(); - }); - - $("#luckysheet-cell-main, #luckysheetTableContent").mousedown(function (event) { - $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","default").end().find(".luckysheet-cs-draghandle").css("cursor","default"); - $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"); - - //有批注在编辑时 - luckysheet.postil.removeActivePs(); - - //luckysheetautoadjustmousedown = 1; - var mouse = mouseposition(event.pageX, event.pageY); - if (mouse[0] >= cellmainWidth - cellMainSrollBarSize || mouse[1] >= cellmainHeight - cellMainSrollBarSize) { - return; - } - - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - if(luckysheet.freezen.freezenverticaldata != null && mouse[0] < (luckysheet.freezen.freezenverticaldata[0] - luckysheet.freezen.freezenverticaldata[2])){ - x = mouse[0] + luckysheet.freezen.freezenverticaldata[2]; - } - - if(luckysheet.freezen.freezenhorizontaldata != null && mouse[1] < (luckysheet.freezen.freezenhorizontaldata[0] - luckysheet.freezen.freezenhorizontaldata[2])){ - y = mouse[1] + luckysheet.freezen.freezenhorizontaldata[2]; - } - - var rowLocation = luckysheet.rowLocation(y), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - - var row_index_ed = row_index, col_index_ed = col_index; - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, row_index, col_index); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - row_index = margeset.row[2]; - row_index_ed = margeset.row[3]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - col_index = margeset.column[2]; - col_index_ed = margeset.column[3]; - } - - //若点击单元格部分不在视图内 - if(col_pre < $("#luckysheet-cell-main").scrollLeft()){ - $("#luckysheet-scrollbar-x").scrollLeft(col_pre); - } - - if(row_pre < $("#luckysheet-cell-main").scrollTop()){ - $("#luckysheet-scrollbar-y").scrollTop(row_pre); - } - - //mousedown是右键 - if (event.which == "3") { - var isright = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - if (luckysheet_select_save[s]["row"] != null && (row_index >= luckysheet_select_save[s]["row"][0] && row_index <= luckysheet_select_save[s]["row"][1] && col_index >= luckysheet_select_save[s]["column"][0] && col_index <= luckysheet_select_save[s]["column"][1])) { - isright = true; - break; - } - } - - if(isright){ - return; - } - } - - //单元格数据下钻 - if(luckysheet.flowdata[row_index] != null && luckysheet.flowdata[row_index][col_index] != null && luckysheet.flowdata[row_index][col_index].dd != null){ - if(luckysheetConfigsetting.fireMousedown != null && luckysheet.getObjType(luckysheetConfigsetting.fireMousedown) == "function"){ - luckysheetConfigsetting.fireMousedown(luckysheet.flowdata[row_index][col_index].dd); - return; - } - } - - luckysheet_scroll_status = true; - - //公式相关 - var $input = $("#luckysheet-input-box"); - if (parseInt($input.css("top")) > 0) { - if (luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start || luckysheet.formula.israngeseleciton()) { - //公式选区 - var rowseleted = [row_index, row_index_ed]; - var columnseleted = [col_index, col_index_ed]; - - var left = col_pre; - var width = col - col_pre - 1; - var top = row_pre; - var height = row - row_pre - 1; - - if(event.shiftKey){ - var last = luckysheet.formula.func_selectedrange; - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - luckysheet.luckysheet_count_show(left, top, width, height, rowseleted, columnseleted); - - last["row"] = rowseleted; - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - last["top_move"] = top; - last["height_move"] = height; - - luckysheet.formula.func_selectedrange = last; - } - else if(event.ctrlKey && $("#luckysheet-rich-text-editor").find("span").last().text() != ","){ - //按住ctrl 选择选区时 先处理上一个选区 - var vText = $("#luckysheet-rich-text-editor").text() + ","; - if(vText.length > 0 && vText.substr(0, 1) == "="){ - vText = luckysheet.formula.functionHTMLGenerate(vText); - - if (window.getSelection) { // all browsers, except IE before version 9 - var currSelection = window.getSelection(); - luckysheet.formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; - } - else { // Internet Explorer before version 9 - var textRange = document.selection.createRange(); - luckysheet.formula.functionRangeIndex = textRange; - } - - $("#luckysheet-rich-text-editor").html(vText); - - luckysheet.formula.canceFunctionrangeSelected(); - luckysheet.formula.createRangeHightlight(); - } - - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - $("#luckysheet-functionbox-cell").html(vText); - luckysheet.formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); - - //再进行 选区的选择 - luckysheet.formula.israngeseleciton(); - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": top, - "height": height, - "left_move": left, - "width_move": width, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": columnseleted, - "row_focus": row_index, - "column_focus": col_index - }; - } - else{ - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": top, - "height": height, - "left_move": left, - "width_move": width, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": columnseleted, - "row_focus": row_index, - "column_focus": col_index - }; - } - - luckysheet.formula.rangeSetValue({ "row": rowseleted, "column": columnseleted }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - $("#luckysheet-formula-functionrange-select").css({ "left": left, "width": width, "top": top, "height": height }).show(); - $("#luckysheet-formula-help-c").hide(); - luckysheet.luckysheet_count_show(left, top, width, height, rowseleted, columnseleted); - - setTimeout(function(){ - var currSelection = window.getSelection(); - var anchorOffset = currSelection.anchorNode; - if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ - $editor=$("#luckysheet-rich-text-editor"); - luckysheet.formula.rangechangeindex = luckysheet.formula.data_parm_index; - } - else{ - $editor = $(anchorOffset).closest("div"); - } - var $span = $editor.find("span[rangeindex='" + luckysheet.formula.rangechangeindex + "']"); - - luckysheet.formula.setCaretPosition($span.get(0), 0, $span.html().length); - }, 1); - - return; - } - else { - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheet_select_status = true; - - if($("#luckysheet-info").is(":visible")){ - luckysheet_select_status = false; - } - } - } - else { - luckysheet_select_status = true; - } - - //条件格式 应用范围可选择多个单元格 - if($("#luckysheet-multiRange-dialog").is(":visible")){ - luckysheet.conditionformat.selectStatus = true; - luckysheet_select_status = false; - - if(event.shiftKey){ - var last = luckysheet.conditionformat.selectRange[luckysheet.conditionformat.selectRange.length - 1]; - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - last["top_move"] = top; - last["height_move"] = height; - - luckysheet.conditionformat.selectRange[luckysheet.conditionformat.selectRange.length - 1] = last; - } - else if(event.ctrlKey){ - luckysheet.conditionformat.selectRange.push({ - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [row_index, row_index_ed], - "column": [col_index, col_index_ed], - "row_focus": row_index, - "column_focus": col_index - }); - } - else{ - luckysheet.conditionformat.selectRange = []; - luckysheet.conditionformat.selectRange.push({ - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [row_index, row_index_ed], - "column": [col_index, col_index_ed], - "row_focus": row_index, - "column_focus": col_index - }); - } - - luckysheet.selectionCopyShow(luckysheet.conditionformat.selectRange); - - var range = luckysheet.conditionformat.getTxtByRange(luckysheet.conditionformat.selectRange); - $("#luckysheet-multiRange-dialog input").val(range); - - return; - } - else{ - luckysheet.conditionformat.selectStatus = false; - luckysheet.conditionformat.selectRange = []; - } - - //条件格式 条件值只能选择单个单元格 - if($("#luckysheet-singleRange-dialog").is(":visible")){ - luckysheet_select_status = false; - - luckysheet.selectionCopyShow([{"row": [row_index, row_index], "column": [col_index, col_index]}]); - - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": [row_index, row_index], "column": [col_index, col_index] }, luckysheet.currentSheetIndex); - $("#luckysheet-singleRange-dialog input").val(range); - - return; - } - - //if公式生成器 - if(luckysheet.ifFormulaGenerator.singleRangeFocus){ - $("#luckysheet-ifFormulaGenerator-dialog .singRange").click(); - } - if($("#luckysheet-ifFormulaGenerator-singleRange-dialog").is(":visible")){ - //选择单个单元格 - luckysheet_select_status = false; - luckysheet.formula.rangestart = false; - - $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); - $("#luckysheet-formula-help-c").hide(); - - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": [row_index, row_index], "column": [col_index, col_index] }, luckysheet.currentSheetIndex); - $("#luckysheet-ifFormulaGenerator-singleRange-dialog input").val(range); - - return; - } - if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){ - //选择范围 - luckysheet_select_status = false; - luckysheet.formula.func_selectedrange = { "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1, "left_move": col_pre, "width_move": col - col_pre - 1, "top_move": row_pre, "height_move": row - row_pre - 1, "row": [row_index, row_index], "column": [col_index, col_index], "row_focus": row_index, "column_focus": col_index }; - luckysheet.formula.rangestart = true; - - $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); - $("#luckysheet-formula-help-c").hide(); - - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": [row_index, row_index], "column": [col_index, col_index] }, luckysheet.currentSheetIndex); - $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); - - $("#luckysheet-row-count-show").hide(); - $("#luckysheet-column-count-show").hide(); - return; - } - - if (luckysheet_select_status) { - if(event.shiftKey){ - //按住shift点击,选择范围 - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); //选区最后一个 - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - last["top_move"] = top; - last["height_move"] = height; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - - //交替颜色选择范围 - if($("#luckysheet-alternateformat-rangeDialog").is(":visible")){ - $("#luckysheet-alternateformat-rangeDialog input").val(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save)); - } - - if (luckysheet.chartparam.luckysheet_chart_data_select_state) { - $("#luckysheet-datavisual-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][0]) + (luckysheet_select_save[0]["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][1]) + (luckysheet_select_save[0]["row"][1] + 1)); - } - - if (luckysheet.pivotTable.luckysheet_pivotTable_select_state) { - $("#luckysheet-pivotTable-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][0]) + (luckysheet_select_save[0]["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][1]) + (luckysheet_select_save[0]["row"][1] + 1)); - } - } - else if(event.ctrlKey){ - //选区添加 - luckysheet_select_save.push({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1, "left_move": col_pre, "width_move": col - col_pre - 1, "top_move": row_pre, "height_move": row - row_pre - 1, "row": [row_index, row_index_ed], "column": [col_index, col_index_ed], "row_focus": row_index, "column_focus": col_index }); - } - else{ - luckysheet_select_save = []; - luckysheet_select_save.push({ - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [row_index, row_index_ed], - "column": [col_index, col_index_ed], - "row_focus": row_index, - "column_focus": col_index - }); - - //单元格格式icon对应 - luckysheet.menuButton.menuButtonFocus(luckysheet.flowdata, row_index, col_index); - //函数公式显示栏 - luckysheet.formula.fucntionboxshow(row_index, col_index); - } - - luckysheet.selectHightlightShow(); - - if(luckysheet.freezen.freezenhorizontaldata != null || luckysheet.freezen.freezenverticaldata != null){ - luckysheet.freezen.scrollAdaptOfselect(); - } - - if(!mobilecheck){ //非移动端聚焦输入框 - luckysheetactiveCell(); - } - - if(luckysheet.server.allowUpdate){ - //允许编辑后的后台更新时 - luckysheet.server.saveParam("mv", luckysheet.currentSheetIndex, luckysheet_select_save); - } - } - - clearTimeout(luckysheet.chartparam.luckysheet_chart_rangefocus_timeout); - if (luckysheet.chartparam.luckysheet_chart_rangefocus) { - luckysheet.chartparam.luckysheet_chart_rangefocus = false; - $("#luckysheet-datavisual-range-button").click(); - } - - //交替颜色 - if(luckysheet.alternateformat.rangefocus){ - luckysheet.alternateformat.rangefocus = false; - $("#luckysheet-alternateformat-range .fa-table").click(); - } - - $("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(); - - if(!luckysheet.isEditMode()){ - //chartMix 隐藏当前页的数据选择区域高亮 - !!window.store && store.commit("hideAllNeedRangeShow"); - } - - $("#luckysheet-helpbox-cell").text(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save[luckysheet_select_save.length - 1])); - - //数据透视表 - luckysheet.pivotTable.pivotclick(row_index, col_index, luckysheet.currentSheetIndex); - - $("#" + container).attr("tabindex", 0).focus(); - - //$("#luckysheet-cols-h-c .luckysheet-cols-h-cells-c .luckysheet-cols-h-cells-clip .luckysheet-cols-h-cell-sel").removeClass("luckysheet-cols-h-cell-sel").addClass("luckysheet-cols-h-cell-nosel"); - - //$("#luckysheet-rows-h .luckysheet-rows-h-cells .luckysheet-rows-h-cells-c .luckysheet-rows-h-cells-clip .luckysheet-rows-h-cell-sel").removeClass("luckysheet-rows-h-cell-sel").addClass("luckysheet-rows-h-cell-nosel"); - - - //$("#luckysheet-cols-h-c .luckysheet-cols-h-cells-c .luckysheet-cols-h-cells-clip .luckysheet-cols-h-cell-nosel").eq(col_index).removeClass("luckysheet-cols-h-cell-nosel").addClass("luckysheet-cols-h-cell-sel"); - - //$("#luckysheet-rows-h .luckysheet-rows-h-cells .luckysheet-rows-h-cells-c .luckysheet-rows-h-cells-clip .luckysheet-rows-h-cell-nosel").eq(row_index).removeClass("luckysheet-rows-h-cell-nosel").addClass("luckysheet-rows-h-cell-sel"); - - //event.stopImmediatePropagation(); - - }).mouseup(function (event) { - if (event.which == "3") { - if(luckysheet.isEditMode()){ //非编辑模式下禁止右键功能框 - return; - } - - var x = event.pageX; - var y = event.pageY; - var data = luckysheet.flowdata; - - var obj_s = luckysheet_select_save[0]; - - $("#luckysheet-cols-rows-data").show(); - $("#luckysheet-cols-rows-add, #luckysheet-cols-rows-shift").hide(); - - if (obj_s["row"] != null && obj_s["row"][0] == 0 && obj_s["row"][1] == luckysheet.flowdata.length - 1) { - luckysheetRightHeadClickIs = "column"; - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text("列"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text("宽"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text("左"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text("右"); - - $("#luckysheet-cols-rows-add").show(); - $("#luckysheet-cols-rows-data").show(); - $("#luckysheet-cols-rows-shift").hide(); - - luckysheet_cols_menu_status = true; - - //列宽默认值 - var cfg = $.extend(true, {}, config); - if(cfg["columlen"] == null){ - cfg["columlen"] = {}; - } - - var first_collen = cfg["columlen"][luckysheet_select_save[0].column[0]] == null ? luckysheet.defaultcollen : cfg["columlen"][luckysheet_select_save[0].column[0]]; - var isSame = true; - - for(var i = 0; i < luckysheet_select_save.length; i++){ - var s = luckysheet_select_save[i]; - var c1 = s.column[0], c2 = s.column[1]; - - for(var c = c1; c <= c2; c++){ - var collen = cfg["columlen"][c] == null ? luckysheet.defaultcollen : cfg["columlen"][c]; - - if(collen != first_collen){ - isSame = false; - break; - } - } - } - - if(isSame){ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_collen); - } - else{ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); - } - } - else if (obj_s["column"] != null && obj_s["column"][0] == 0 && obj_s["column"][1] == luckysheet.flowdata[0].length - 1) { - luckysheetRightHeadClickIs = "row"; - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text("行"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text("高"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text("上"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text("下"); - - $("#luckysheet-cols-rows-add").show(); - $("#luckysheet-cols-rows-data").show(); - $("#luckysheet-cols-rows-shift").hide(); - - luckysheet_cols_menu_status = true; - - //行高默认值 - var cfg = $.extend(true, {}, config); - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - var first_rowlen = cfg["rowlen"][luckysheet_select_save[0].row[0]] == null ? luckysheet.defaultrowlen : cfg["rowlen"][luckysheet_select_save[0].row[0]]; - var isSame = true; - - for(var i = 0; i < luckysheet_select_save.length; i++){ - var s = luckysheet_select_save[i]; - var r1 = s.row[0], r2 = s.row[1]; - - for(var r = r1; r <= r2; r++){ - var rowlen = cfg["rowlen"][r] == null ? luckysheet.defaultrowlen : cfg["rowlen"][r]; - - if(rowlen != first_rowlen){ - isSame = false; - break; - } - } - } - - if(isSame){ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_rowlen); - } - else{ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); - } - } - - showrightclickmenu($("#luckysheet-rightclick-menu"), x, y); - } - }).dblclick(function (event) { - if(parseInt($("#luckysheet-input-box").css("top")) > 0){ - return; - } - - var mouse = mouseposition(event.pageX, event.pageY); - if (mouse[0] >= cellmainWidth - cellMainSrollBarSize || mouse[1] >= cellmainHeight - cellMainSrollBarSize) { - return; - } - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - //row_index = luckysheet.freezen.changeFreezenIndex(row_index, "h"); - //col_index = luckysheet.freezen.changeFreezenIndex(col_index, "v"); - - if (luckysheet.pivotTable.isPivotRange(row_index, col_index)) { - //数据透视表没有 任何数据 - if((luckysheet.pivotTable.filter == null || luckysheet.pivotTable.filter.length == 0) && (luckysheet.pivotTable.row == null || luckysheet.pivotTable.row.length == 0) && (luckysheet.pivotTable.column == null || luckysheet.pivotTable.column.length == 0) && (luckysheet.pivotTable.values == null || luckysheet.pivotTable.values.length == 0)){ - - return; - } - - //数据透视表没有 数值数据 - if(luckysheet.pivotTable.values == null || luckysheet.pivotTable.values.length == 0){ - return; - } - - //点击位置不是 数值数据 所在区域 - if(row_index == 0 || col_index == 0){ - return; - } - - if(luckysheet.pivotTable.column != null && luckysheet.pivotTable.column.length > 0){ - if(luckysheet.pivotTable.values.length >= 2 && luckysheet.pivotTable.showType == "column"){ - if(row_index <= luckysheet.pivotTable.column.length || col_index >= luckysheet.pivotTable.pivotDatas[0].length - luckysheet.pivotTable.values.length){ - - return; - } - } - else{ - if(row_index <= luckysheet.pivotTable.column.length - 1 || col_index >= luckysheet.pivotTable.pivotDatas[0].length - 1){ - - return; - } - } - } - - if(luckysheet.pivotTable.row != null && luckysheet.pivotTable.row.length > 0){ - if(luckysheet.pivotTable.values.length >= 2 && luckysheet.pivotTable.showType == "row"){ - if(col_index <= luckysheet.pivotTable.row.length || row_index >= luckysheet.pivotTable.pivotDatas.length - luckysheet.pivotTable.values.length){ - - return; - } - } - else{ - if(col_index <= luckysheet.pivotTable.row.length - 1 || row_index >= luckysheet.pivotTable.pivotDatas.length - 1){ - - return; - } - } - } - - luckysheet.sheetmanage.addNewSheet(event); - - luckysheet.pivotTable.drillDown(row_index, col_index); - - return; - } - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, row_index, col_index); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - row_index = margeset.row[2]; - col = margeset.column[1]; - col_pre = margeset.column[0]; - col_index = margeset.column[2]; - } - - // $("#luckysheet-cell-selected").hide(); - - if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ - //公式参数栏显示 - $("#luckysheet-cell-selected").hide(); - } - else if($("#luckysheet-conditionformat-dialog").is(":visible")||$("#luckysheet-administerRule-dialog").is(":visible")||$("#luckysheet-newConditionRule-dialog").is(":visible")||$("#luckysheet-editorConditionRule-dialog").is(":visible")||$("#luckysheet-singleRange-dialog").is(":visible")||$("#luckysheet-multiRange-dialog").is(":visible")){ - //条件格式 - return; - } - else if($("#luckysheet-modal-dialog-slider-alternateformat").is(":visible") || $("#luckysheet-alternateformat-rangeDialog").is(":visible")){ - //交替颜色 - return; - } - else{ - if(luckysheet.menuButton.luckysheetPaintModelOn){ - luckysheet.menuButton.cancelPaintModel(); - } - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata); - } - - //luckysheetCellUpdate = [row_index, col_index]; - //$("#luckysheet-rich-text-editor").focus().select(); - //$("#luckysheet-input-box").css({ "background-color": "rgb(255, 255, 255)", "padding": "0px 2px", "font-size": "13px", "max-width": winW - col_pre - 20 + scrollLeft, "max-height": winH - row_index - 20 + scrollTop, "min-width": col - col_pre + 1 - 8, "min-height": row - row_pre + 1 - 4, "left": left - 2, "top": top - 2, "right": "auto" }).show(); - //$("#luckysheet-rich-text-editor").text(d[row_index][col_index]); - //luckysheetRangeLast($("#luckysheet-rich-text-editor")[0]); - }); - - $("#luckysheet-bottom-add-row, #luckysheet-bottom-add-row-input, #luckysheet-bottom-return-top").on("mousedown dblclick mouseup",function(e){ - e.stopPropagation(); - }); - - $("#luckysheet-bottom-add-row").on("click",function(e){ - $("#luckysheet-rightclick-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), value = $("#luckysheet-bottom-add-row-input").val(); - - if(value == ""){ - value = 100; - } - - if (isNaN(parseInt(value))) { - if(luckysheet.isEditMode()){ - alert("请输入数字"); - } - else{ - luckysheet.tooltip.info("增加错误", "请输入数字"); - } - return; - } - - value = parseInt(value); - if (value < 1 || value > 100) { - if(luckysheet.isEditMode()){ - alert("增加范围限制在1-100"); - } - else{ - luckysheet.tooltip.info("增加错误", "增加范围限制在1-100"); - } - return; - } - - //var st_index = luckysheet_select_save[luckysheetRightHeadClickIs][0]; - luckysheetextendtable("row", luckysheet.flowdata.length - 1, value); - }); - - $("#luckysheet-bottom-return-top").on("click",function(e){ - $("#luckysheet-scrollbar-y").scrollTop(0); - }); - - var luckysheetactiveCell = function () { - if (!!fullscreenmode) { - setTimeout(function () { - $("#luckysheet-rich-text-editor").focus().select(); - }, 50); - } - } - - luckysheet.luckysheetactiveCell = luckysheetactiveCell; - - luckysheet.luckysheetupdateCell = function (row, row_pre, row_index, col, col_pre, col_index, d, cover, isnotfocus) { - if(luckysheet.isEditMode()){//此模式下禁用单元格编辑 - return; - } - - if($("#luckysheet-dropCell-icon").is(":visible")){ - $("#luckysheet-dropCell-icon").remove(); - } - - var winH = $(window).height(), winW = $(window).width(); - var container_offset = $("#" + container).offset(); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - - if(luckysheetConfigsetting.pointEdit){ - var left = col_pre * luckysheetConfigsetting.pointEditZoom + container_offset.left + rowHeaderWidth * luckysheetConfigsetting.pointEditZoom - scrollLeft, - top = row_pre * luckysheetConfigsetting.pointEditZoom + container_offset.top + (infobarHeight + toolbarHeight + calculatebarHeight + columeHeaderHeight) * luckysheetConfigsetting.pointEditZoom - scrollTop; - } - else{ - var left = col_pre + container_offset.left + rowHeaderWidth - scrollLeft, - top = row_pre + container_offset.top + infobarHeight + toolbarHeight + calculatebarHeight + columeHeaderHeight - scrollTop; - } - - if (luckysheet.pivotTable.isPivotRange(row_index, col_index)) { - return; - } - - luckysheetCellUpdate = [row_index, col_index]; - if (!isnotfocus) { - $("#luckysheet-rich-text-editor").focus().select(); - } - - if(luckysheetConfigsetting.pointEdit){ - $("#luckysheet-input-box").removeAttr("style").css({ - "background-color": "rgb(255, 255, 255)", - "padding": "0px 2px", - "font-size": "13px", - "max-width": winW + scrollLeft - col_pre - 20 - rowHeaderWidth, - "max-height": winH + scrollTop - row_pre - 20 - 15 - toolbarHeight - infobarHeight - calculatebarHeight - sheetBarHeight - statisticBarHeight, - "min-width": col - col_pre + 1 - 8, - "min-height": row - row_pre + 1 - 4, - "left": left - 2 * luckysheetConfigsetting.pointEditZoom, - "top": top - 2 * luckysheetConfigsetting.pointEditZoom, - "right": "auto", - "overflow-y": "auto", - "box-sizing": "initial", - "transform-origin": "0 0", - "transform": "scale("+ luckysheetConfigsetting.pointEditZoom +")", - "z-index": 1000 - }); - } - else{ - $("#luckysheet-input-box").removeAttr("style").css({ - "background-color": "rgb(255, 255, 255)", - "padding": "0px 2px", - "font-size": "13px", - "max-width": winW + scrollLeft - col_pre - 20 - rowHeaderWidth, - "max-height": winH + scrollTop - row_pre - 20 - 15 - toolbarHeight - infobarHeight - calculatebarHeight - sheetBarHeight - statisticBarHeight, - "min-width": col - col_pre + 1 - 8, - "min-height": row - row_pre + 1 - 4, - "left": left - 2, - "top": top - 2, - "right": "auto", - "overflow-y": "auto", - "box-sizing": "initial" - }); - } - - if(luckysheet.freezen.freezenverticaldata != null || luckysheet.freezen.freezenhorizontaldata != null){ - $("#luckysheet-input-box").css("z-index", 10002); - } - - $("#luckysheet-input-box-index").html(luckysheet.luckysheetchatatABC(col_index) + (row_index + 1)).hide(); - $("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").addClass("luckysheet-wa-calculate-active"); - var value = ""; - - if (d[row_index] != null && d[row_index][col_index] != null) { - var cell = d[row_index][col_index]; - if (!cover) { - if(cell.f!=null){ - value = luckysheet.getcellvalue(row_index, col_index, d, "f"); - } - else{ - value = luckysheet.mask.valueShowEs(row_index, col_index, d); - } - } - - var style = luckysheet.menuButton.getStyleByCell(d, row_index, col_index); - style = $("#luckysheet-input-box").get(0).style.cssText + style; - - $("#luckysheet-input-box").get(0).style.cssText = style; - if($("#luckysheet-input-box").get(0).style.backgroundColor == "rgba(0, 0, 0, 0)"){ - $("#luckysheet-input-box").get(0).style.background = "rgb(255,255,255)"; - } - } - else{ - //交替颜色 - var af_compute = luckysheet.alternateformat.getComputeMap(); - var checksAF = luckysheet.alternateformat.checksAF(row_index, col_index, af_compute); - - //条件格式 - var cf_compute = luckysheet.conditionformat.getComputeMap(); - var checksCF = luckysheet.conditionformat.checksCF(row_index, col_index, cf_compute); - - if(checksCF != null && checksCF["cellColor"] != null){ - $("#luckysheet-input-box").get(0).style.background = checksCF["cellColor"]; - } - else if(checksAF != null){ - $("#luckysheet-input-box").get(0).style.background = checksAF[1]; - } - } - - if((value == null || value.toString() == "") && !cover){ - value = "
"; - } - - $("#luckysheet-rich-text-editor").html(value); - if (!isnotfocus) { - luckysheetRangeLast($("#luckysheet-rich-text-editor")[0]); - } - luckysheet.formula.rangetosheet = luckysheet.currentSheetIndex; - luckysheet.formula.createRangeHightlight(); - luckysheet.formula.rangeResizeTo = $("#luckysheet-rich-text-editor"); - luckysheet.cleargridelement(); - } - - $("#luckysheet-input-box").click(function () { - luckysheet.formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); - }).add("#" + container).on("keydown", function (event) { - if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("formulaInputFocus")) { - return; - } - - var ctrlKey = event.ctrlKey; - var altKey = event.altKey; - var shiftKey = event.shiftKey; - var kcode = event.keyCode; - if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("sp-input") || (parseInt($("#luckysheet-input-box").css("top")) > 0 && $(event.target).closest(".luckysheet-input-box").length > 0 && kcode != keycode.ENTER && kcode != keycode.TAB && kcode != keycode.UP && kcode != keycode.DOWN && kcode != keycode.LEFT && kcode != keycode.RIGHT)) { - var anchor = $(window.getSelection().anchorNode); - - if(anchor.parent().is("#luckysheet-helpbox-cell") || anchor.is("#luckysheet-helpbox-cell")){ - if(kcode == keycode.ENTER){ - var helpboxValue = $("#luckysheet-helpbox-cell").text(); - if(luckysheet.formula.iscelldata(helpboxValue)){ - var cellrange = luckysheet.formula.getcellrange(helpboxValue); - - luckysheet_select_save = [{ "row": cellrange["row"], "column": cellrange["column"], "row_focus": cellrange["row"][0], "column_focus": cellrange["column"][0] }]; - luckysheet.selectHightlightShow(); - - $("#luckysheet-helpbox-cell").blur(); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var row = visibledatarow[cellrange["row"][1]], row_pre = cellrange["row"][0] - 1 == -1 ? 0 : visibledatarow[cellrange["row"][0] - 1]; - var col = visibledatacolumn[cellrange["column"][1]], col_pre = cellrange["column"][0] - 1 == -1 ? 0 : visibledatacolumn[cellrange["column"][0] - 1]; - - if (col - scrollLeft - winW + 20 > 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); - } - else if (col_pre - scrollLeft - 20 < 0) { - $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); - } - - if (row - scrollTop - winH + 20 > 0) { - $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); - } - else if (row_pre - scrollTop - 20 < 0) { - $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); - } - } - } - } - - return; - } - - var $inputbox = $("#luckysheet-input-box"); - if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible") && luckysheet.formula.searchFunctionCell != null) { - luckysheet.formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); - } - else { - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheet_select_save = [{ "row": [luckysheetCellUpdate[0], luckysheetCellUpdate[0]], "column": [luckysheetCellUpdate[1], luckysheetCellUpdate[1]], "row_focus": luckysheetCellUpdate[0], "column_focus": luckysheetCellUpdate[1] }]; - luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - //$("#luckysheet-input-box").blur(); - } - - //若有参数弹出框,隐藏 - if($("#luckysheet-search-formula-parm").is(":visible")){ - $("#luckysheet-search-formula-parm").hide(); - } - //若有参数选取范围弹出框,隐藏 - if($("#luckysheet-search-formula-parm-select").is(":visible")){ - $("#luckysheet-search-formula-parm-select").hide(); - } - event.preventDefault(); - } - else if (kcode == keycode.TAB) { - if (parseInt($inputbox.css("top")) > 0) { - return; - } - - // luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); - event.preventDefault(); - } - else if(kcode == keycode.F2){ - if (parseInt($inputbox.css("top")) > 0) { - return; - } - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata); - event.preventDefault(); - } - else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.setfreezonFuc(event); - event.preventDefault(); - } - else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - event.preventDefault(); - } - else if (kcode == keycode.ENTER) { - if($(event.target).hasClass("formulaInputFocus") || $("#luckysheet-conditionformat-dialog").is(":visible")){ - return; - } - else if (String.fromCharCode(kcode) != null && $("#luckysheet-cell-selected").is(":visible")) { - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, row_index, col_index); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - row_index = margeset.row[2]; - col = margeset.column[1]; - col_pre = margeset.column[0]; - col_index = margeset.column[2]; - } - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata); - event.preventDefault(); - } - } - else { - - if (ctrlKey || event.metaKey) { - if (shiftKey) { - if (!luckysheet_shiftkeydown) { - luckysheet.luckysheet_shiftpositon = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); - luckysheet_shiftkeydown = true; - } - - //Ctrl + shift + 方向键 调整选区 - if (kcode == keycode.UP) { - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightRange2("up", "rangeOfSelect"); - } - else if (kcode == keycode.DOWN) { - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightRange2("down", "rangeOfSelect"); - } - else if (kcode == keycode.LEFT) { - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightRange2("left", "rangeOfSelect"); - } - else if (kcode == keycode.RIGHT) { - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightRange2("right", "rangeOfSelect"); - } - } - else if (kcode == 66) {//Ctrl + B 加粗 - $("#luckysheet-icon-bold").click(); - } - else if (kcode == 67) {//Ctrl + C 复制 - //复制时存在格式刷状态,取消格式刷 - if(luckysheet.menuButton.luckysheetPaintModelOn){ - luckysheet.menuButton.cancelPaintModel(); - } - - if(luckysheet_select_save.length == 0){ - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - //多重选区 有条件格式时 提示 - var cdformat = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].luckysheet_conditionformat_save; - if(luckysheet_select_save.length > 1 && cdformat != null && cdformat.length > 0){ - var hasCF = false; - - var cf_compute = luckysheet.conditionformat.getComputeMap(); - - label: - for(var s = 0; s < luckysheet_select_save.length; s++){ - if(hasCF){ - break; - } - - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - if(luckysheet.conditionformat.checksCF(r, c, cf_compute) != null){ - hasCF = true; - continue label; - } - } - } - } - - if(hasCF){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对多重选择区域执行此操作", ""); - } - return; - } - } - - //多重选区 行不一样且列不一样时 提示 - if(luckysheet_select_save.length > 1){ - var isSameRow = true, str_r = luckysheet_select_save[0].row[0], end_r = luckysheet_select_save[0].row[1]; - var isSameCol = true, str_c = luckysheet_select_save[0].column[0], end_c = luckysheet_select_save[0].column[1]; - - for(var s = 1; s < luckysheet_select_save.length; s++){ - if(luckysheet_select_save[s].row[0] != str_r || luckysheet_select_save[s].row[1] != end_r){ - isSameRow = false; - } - if(luckysheet_select_save[s].column[0] != str_c || luckysheet_select_save[s].column[1] != end_c){ - isSameCol = false; - } - } - - if((!isSameRow && !isSameCol) || luckysheet.selectIsOverlap()){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对多重选择区域执行此操作", ""); - } - return; - } - } - - luckysheet.selection.copy(event); - - luckysheet_paste_iscut = false; - luckysheetactiveCell(); - - event.stopPropagation(); - return; - } - else if (kcode == 70) {//Ctrl + F 查找 - luckysheet.searchReplace.createDialog(0); - luckysheet.searchReplace.init(); - - $("#luckysheet-search-replace #searchInput input").focus(); - } - else if (kcode == 72) {//Ctrl + H 替换 - luckysheet.searchReplace.createDialog(1); - luckysheet.searchReplace.init(); - - $("#luckysheet-search-replace #searchInput input").focus(); - } - else if (kcode == 73) {//Ctrl + I 斜体 - $("#luckysheet-icon-italic").click(); - } - else if (kcode == 86) {//Ctrl + V 粘贴 - if(luckysheet.isEditMode()){//此模式下禁用粘贴 - return; - } - - if($(event.target).hasClass("formulaInputFocus")){ - return; - } - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("无法在此处粘贴此内容,请选择粘贴区域的一个单元格,然后再次尝试粘贴"); - } - else{ - luckysheet.tooltip.info("无法在此处粘贴此内容,请选择粘贴区域的一个单元格,然后再次尝试粘贴", ""); - } - return; - } - - luckysheet.selection.isPasteAction = true; - luckysheetactiveCell(); - - event.stopPropagation(); - return; - } - else if (kcode == 88) {//Ctrl + X 剪切 - //复制时存在格式刷状态,取消格式刷 - if(luckysheet.menuButton.luckysheetPaintModelOn){ - luckysheet.menuButton.cancelPaintModel(); - } - - if(luckysheet_select_save.length == 0){ - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.luckysheetConfigsetting.editMode){ - alert("无法对合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对合并单元格执行此操作", ""); - } - return; - } - } - - //多重选区时 提示 - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - luckysheet.selection.copy(event); - - luckysheet_paste_iscut = true; - luckysheetactiveCell(); - - event.stopPropagation(); - return; - } - else if (kcode == 90) {//Ctrl + Z 撤销 - luckysheet.controlHistory.redo(event); - luckysheetactiveCell(); - event.stopPropagation(); - return; - } - else if (kcode == 89) {//Ctrl + Y 重做 - luckysheet.controlHistory.undo(event); - luckysheetactiveCell(); - event.stopPropagation(); - return; - } - else if (kcode == keycode.UP) {//Ctrl + up 调整单元格 - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell2("up", "rangeOfSelect"); - } - else if (kcode == keycode.DOWN) {//Ctrl + down 调整单元格 - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell2("down", "rangeOfSelect"); - } - else if (kcode == keycode.LEFT) {//Ctrl + top 调整单元格 - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell2("left", "rangeOfSelect"); - } - else if (kcode == keycode.RIGHT) {//Ctrl + right 调整单元格 - if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell2("right", "rangeOfSelect"); - } - else if (String.fromCharCode(kcode).toLocaleUpperCase() == "A") {//Ctrl + A 全选 - $("#luckysheet-left-top").trigger("mousedown"); - $(document).trigger("mouseup"); - } - - event.preventDefault(); - return; - } - else if (shiftKey && (kcode == keycode.UP || kcode == keycode.DOWN || kcode == keycode.LEFT || kcode == keycode.RIGHT || (altKey && (kcode == 53 || kcode == 101)))) { - if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus")) { - return; - } - - if (!luckysheet_shiftkeydown) { - luckysheet.luckysheet_shiftpositon = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); - luckysheet_shiftkeydown = true; - } - - //shift + 方向键 调整选区 - if (kcode == keycode.UP) { - if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ - return; - } - - luckysheetMoveHighlightRange("down", -1, "rangeOfSelect"); - } - else if (kcode == keycode.DOWN) { - if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ - return; - } - - luckysheetMoveHighlightRange("down", 1, "rangeOfSelect"); - } - else if (kcode == keycode.LEFT) { - if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ - return; - } - - luckysheetMoveHighlightRange("right", -1, "rangeOfSelect"); - } - else if (kcode == keycode.RIGHT) { - if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){ - return; - } - - luckysheetMoveHighlightRange("right", 1, "rangeOfSelect"); - } - else if (altKey && (kcode == 53 || kcode == 101)) { - //Alt + Shift + 5(删除线) - $("#luckysheet-icon-strikethrough").click(); - } - - event.preventDefault(); - } - else if (kcode == keycode.ESC) { - if(luckysheet.menuButton.luckysheetPaintModelOn){ - luckysheet.menuButton.cancelPaintModel(); - } - else{ - luckysheet.cleargridelement(event); - event.preventDefault(); - } - - luckysheet.selectHightlightShow(); - } - else if (kcode == keycode.DELETE) { - if (luckysheet.chartparam.luckysheetCurrentChartActive && !luckysheet.isEditMode()) { - luckysheet.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-controll-del").click(); - } - else { - $("#luckysheet-delete-text").click(); - } - - event.preventDefault(); - } - else if (kcode == keycode.UP) { - if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); - event.preventDefault(); - } - else if (kcode == keycode.DOWN) { - if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - event.preventDefault(); - } - else if (kcode == keycode.LEFT) { - if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); - event.preventDefault(); - } - else if (kcode == keycode.RIGHT) { - if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) { - return; - } - - luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); - event.preventDefault(); - } - else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || kcode == 0 || (event.ctrlKey && kcode == 86)) { - if (String.fromCharCode(kcode) != null && $("#luckysheet-cell-selected").is(":visible") && (kcode != keycode.CAPSLOCK && kcode != keycode.WIN && kcode != 18)) { - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, row_index, col_index); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - row_index = margeset.row[2]; - col = margeset.column[1]; - col_pre = margeset.column[0]; - col_index = margeset.column[2]; - } - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata, true); - if(kcode == 8){ - $("#luckysheet-rich-text-editor").html("
"); - } - luckysheet.formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode); - } - } - } - - luckysheetactiveCell(); - - event.stopPropagation(); - }); - - var luckysheetMoveEndCell = function (postion, type, isScroll, terminal, onlyvalue) { - if (isScroll == null) { - isScroll = true; - } - - if (!postion) { - postion = "down"; - } - - if (!type) { - type = "cell"; - } - - if (onlyvalue == null) { - onlyvalue = false; - } - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var curR = last["row"] == null ? 0 : last["row"][0]; - var curC = last["column"] == null ? 0 : last["column"][0]; - - var startR = last["row"] == null ? 0 : last["row"][0]; - var startC = last["column"] == null ? 0 : last["column"][0]; - - var endR = last["row"] == null ? 0 : last["row"][1]; - var endC = last["column"] == null ? 0 : last["column"][1]; - - luckysheet.formula.fucntionboxshow(curR, curC); - - if (type == "range") { - var p_startR = luckysheet.luckysheet_shiftpositon["row"][0]; - var p_startC = luckysheet.luckysheet_shiftpositon["column"][0]; - - var p_endR = luckysheet.luckysheet_shiftpositon["row"][1]; - var p_endC = luckysheet.luckysheet_shiftpositon["column"][1]; - - if (postion == "down" || postion == "up") { - - if (p_endR < endR) { - curR = last["row"] == null ? 0 : last["row"][1]; - } - else if (p_startR > startR) { - curR = last["row"] == null ? 0 : last["row"][0]; - } - else if (p_endR == endR && p_startR == startR) { - if (postion == "down") { - curR = last["row"] == null ? 0 : last["row"][1]; - } - else { - curR = last["row"] == null ? 0 : last["row"][0]; - } - } - - - //if (endR >= datarowlen) { - // endR = datarowlen - 1; - //} - - //if (endR < 0) { - // endR = 0; - //} - - //if (startR >= datarowlen) { - // startR = datarowlen - 1; - //} - - //if (startR < 0) { - // startR = 0; - //} - } - else if (postion == "right" || postion == "left") { - if (p_endC < endC) { - curC = last["column"] == null ? 0 : last["column"][1]; - } - else if (p_startC > startC) { - curC = last["column"] == null ? 0 : last["column"][0]; - } - else if (p_endC == endC && p_startC == startC) { - if (postion == "right") { - curC = last["column"] == null ? 0 : last["column"][1]; - } - else { - curC = last["column"] == null ? 0 : last["column"][0]; - } - } - - - //console.log(p_startC, p_endC, startC, endC, curC); - - //if (endC >= datacolumnlen) { - // endC = datacolumnlen - 1; - //} - - //if (endC < 0) { - // endC = 0; - //} - - //if (startC >= datacolumnlen) { - // startC = datacolumnlen - 1; - //} - - //if (startC < 0) { - // startC = 0; - //} - } - } - - var datarowlen = luckysheet.flowdata.length, datacolumnlen = luckysheet.flowdata[0].length; - - var data = luckysheet.flowdata, moveP = "", moveV = 0; - - if (postion == "up") { - if (curR == 0) { - return; - } - else { - var stvalue = [], p = null, i = 0, p_pre = null; - for (var c = startC; c <= endC; c++) { - stvalue = []; - i = 0; - - for (var r = curR - 1; r >= 0; r--) { - var cell = data[r][c]; - - if (luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)) { - stvalue.push(false); - } - else if (luckysheet.func_methods.isRealNull(cell)) { - stvalue.push(false); - } - else { - stvalue.push(true); - } - - if (stvalue.length > 1) { - if (stvalue[i] == true && stvalue[i - 1] == false) { - p = r; - break - } - else if (stvalue[i] == false && stvalue[i - 1] == true) { - p = r + 1; - break - } - } - - i++; - } - - if(p == null){ - p = 0; - } - - if (p_pre == null || p < p_pre) { - p_pre = p; - } - } - - moveP = "down"; - moveV = p_pre - curR; - } - } - else if (postion == "down") { - if (curR == datarowlen - 1) { - return; - } - else { - var stvalue = [], p = null, i = 0, p_pre = null; - for (var c = startC; c <= endC; c++) { - stvalue = []; - i = 0; - - for (var r = curR + 1; r < data.length; r++) { - var cell = data[r][c]; - - if (luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)) { - stvalue.push(false); - } - else if (luckysheet.func_methods.isRealNull(cell)) { - stvalue.push(false); - } - else { - stvalue.push(true); - } - - if (stvalue.length > 1) { - if (stvalue[i] == true && stvalue[i - 1] == false) { - p = r; - break - } - else if (stvalue[i] == false && stvalue[i - 1] == true) { - p = r - 1; - break - } - } - - i++; - } - - if(p == null){ - p = data.length - 1; - } - - if (p_pre == null || p > p_pre) { - p_pre = p; - } - } - - moveP = "down"; - moveV = p_pre - curR; - } - } - else if (postion == "left") { - if (curC == 0) { - return; - } - else { - var stvalue = [], p = null, i = 0, p_pre = null; - for (var r = startR; r <= endR; r++) { - stvalue = []; - i = 0; - for (var c = curC - 1; c >= 0; c--) { - var cell = data[r][c]; - - if (luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)) { - stvalue.push(false); - } - else if (luckysheet.func_methods.isRealNull(cell)) { - stvalue.push(false); - } - else { - stvalue.push(true); - } - - if (stvalue.length > 1) { - if (stvalue[i] == true && stvalue[i - 1] == false) { - p = c; - break - } - else if (stvalue[i] == false && stvalue[i - 1] == true) { - p = c + 1; - break - } - } - - i++; - } - - if(p == null){ - p = 0; - } - - if (p_pre == null || p < p_pre) { - p_pre = p; - } - } - - moveP = "right"; - moveV = p_pre - curC; - } - } - else if (postion == "right") { - if (curC == datacolumnlen - 1) { - return; - } - else { - var stvalue = [], p = null, i = 0, p_pre = null; - for (var r = startR; r <= endR; r++) { - stvalue = []; - i = 0; - for (var c = curC + 1; c < data[0].length; c++) { - var cell = data[r][c]; - - if (luckysheet.getObjType(cell) == "object" && luckysheet.func_methods.isRealNull(cell.v)) { - stvalue.push(false); - } - else if (luckysheet.func_methods.isRealNull(cell)) { - stvalue.push(false); - } - else { - stvalue.push(true); - } - - if (stvalue.length > 1) { - if (stvalue[i] == true && stvalue[i - 1] == false) { - p = c; - break - } - else if (stvalue[i] == false && stvalue[i - 1] == true) { - p = c - 1; - break - } - } - - i++; - } - - if(p == null){ - p = data[0].length - 1; - } - - if (p_pre == null || p > p_pre) { - p_pre = p; - } - } - - moveP = "right"; - moveV = p_pre - curC; - } - } - - //console.log("up", moveV, curR, p_endR, moveV + curR < p_endR); - //console.log("down", moveV, curR, p_startR, moveV + curR > p_startR); - //console.log("left", moveV, curC, p_endC, moveV + curC < p_endC); - //console.log("right", moveV, curC, p_startC, moveV + curC > p_startC); - - if (type == "range") { - if (postion == "up") { - if (p_endR < endR) { - if (moveV + curR < p_endR) { - moveV = p_endR - curR; - } - } - } - else if (postion == "down") { - if (p_startR > startR) { - if (moveV + curR > p_startR) { - moveV = p_startR - curR; - } - } - } - else if (postion == "left") { - if (p_endC < endC) { - if (moveV + curC < p_endC) { - moveV = p_endC - curC; - } - } - //else if (p_startC > startC) { - - //} - //else if (p_endC == endC && p_startC == startC) { - // if (postion == "right") { - - // } - // else { - - // } - //} - - //if (curC != p_endC && moveV + curC > p_endC) { - // moveV = curC - p_endC; - //} - } - else if (postion == "right") { - if (p_startC > startC) { - if (moveV + curC > p_startC) { - moveV = p_startC - curC; - } - } - } - - if (terminal != null && Math.abs(moveV) > Math.abs(terminal)) { - moveV = terminal; - } - } - - if (!onlyvalue) { - if (type == "cell") { - luckysheetMoveHighlightCell(moveP, moveV, "rangeOfSelect", isScroll); - } - else if (type == "range") { - luckysheetMoveHighlightRange(moveP, moveV, "rangeOfSelect", isScroll); - } - } - else { - return moveV; - } - } - - luckysheet.luckysheetMoveEndCell = luckysheetMoveEndCell; - - //方向键 调整单元格 - var luckysheetMoveHighlightCell = function (postion, index, type, isScroll) { - if (isScroll == null) { - isScroll = true; - } - - if (!postion) { - postion == "down"; - } - - var datarowlen = luckysheet.flowdata.length, datacolumnlen = luckysheet.flowdata[0].length; - - if(type == "rangeOfSelect"){ - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - if(last["row_focus"] == null){ - var curR = last["row"][0]; - } - else{ - var curR = last["row_focus"]; - } - - if(last["column_focus"] == null){ - var curC = last["column"][0]; - } - else{ - var curC = last["column_focus"]; - } - - //focus单元格 是否是合并单元格 - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, curR, curC); - if(!!margeset){ - var str_r = margeset.row[2]; - var end_r = margeset.row[3]; - - var str_c = margeset.column[2]; - var end_c = margeset.column[3]; - - if(index > 0){ - if(postion == "down"){ - curR = end_r; - curC = str_c; - } - else if(postion == "right"){ - curR = str_r; - curC = end_c; - } - } - else{ - curR = str_r; - curC = str_c; - } - } - - var moveX = last["moveXY"] == null ? curR : last["moveXY"].x; - var moveY = last["moveXY"] == null ? curC : last["moveXY"].y; - - if (postion == "down") { - curR += index; - moveX = curR; - } - else if (postion == "right") { - curC += index; - moveY = curC; - } - - if (curR >= datarowlen) { - curR = datarowlen - 1; - moveX = curR; - } - - if (curR < 0) { - curR = 0; - moveX = curR; - } - - if (curC >= datacolumnlen) { - curC = datacolumnlen - 1; - moveY = curC; - } - - if (curC < 0) { - curC = 0; - moveY = curC; - } - - //移动的下一个单元格是否是合并的单元格 - var margeset2 = luckysheet.menuButton.mergeborer(luckysheet.flowdata, curR, curC); - if(!!margeset2){ - var row = margeset2.row[1]; - var row_pre = margeset2.row[0]; - var row_index = margeset2.row[2]; - var row_index_ed = margeset2.row[3]; - - var col = margeset2.column[1]; - var col_pre = margeset2.column[0]; - var col_index = margeset2.column[2]; - var col_index_ed = margeset2.column[3]; - } - else{ - var row = visibledatarow[moveX], row_pre = moveX - 1 == -1 ? 0 : visibledatarow[moveX - 1]; - var col = visibledatacolumn[moveY], col_pre = moveY - 1 == -1 ? 0 : visibledatacolumn[moveY - 1]; - var row_index = moveX; - var row_index_ed = moveX; - var col_index = moveY; - var col_index_ed = moveY; - } - - last["row"] = [row_index, row_index_ed]; - last["column"] = [col_index, col_index_ed]; - last["row_focus"] = row_index; - last["column_focus"] = col_index; - last["moveXY"] = {"x": moveX,"y": moveY}; - - luckysheet.selectHightlightShow(); - - luckysheet.pivotTable.pivotclick(row_index, col_index); - - luckysheet.formula.fucntionboxshow(row_index, col_index); - - //图表 - if (luckysheet.chartparam.luckysheet_chart_data_select_state) { - $("#luckysheet-datavisual-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(last["column"][0]) + (last["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(last["column"][1]) + (last["row"][1] + 1)); - } - } - else if(type == "rangeOfFormula"){ - var last = luckysheet.formula.func_selectedrange; - - if(last["row_focus"] == null){ - var curR = last["row"][0]; - } - else{ - var curR = last["row_focus"]; - } - - if(last["column_focus"] == null){ - var curC = last["column"][0]; - } - else{ - var curC = last["column_focus"]; - } - - //focus单元格 是否是合并单元格 - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, curR, curC); - if(!!margeset){ - var str_r = margeset.row[2]; - var end_r = margeset.row[3]; - - var str_c = margeset.column[2]; - var end_c = margeset.column[3]; - - if(index > 0){ - if(postion == "down"){ - curR = end_r; - curC = str_c; - } - else if(postion == "right"){ - curR = str_r; - curC = end_c; - } - } - else{ - curR = str_r; - curC = str_c; - } - } - - var moveX = last["moveXY"] == null ? curR : last["moveXY"].x; - var moveY = last["moveXY"] == null ? curC : last["moveXY"].y; - - if (postion == "down") { - curR += index; - moveX = curR; - } - else if (postion == "right") { - curC += index; - moveY = curC; - } - - if (curR >= datarowlen) { - curR = datarowlen - 1; - moveX = curR; - } - - if (curR < 0) { - curR = 0; - moveX = curR; - } - - if (curC >= datacolumnlen) { - curC = datacolumnlen - 1; - moveY = curC; - } - - if (curC < 0) { - curC = 0; - moveY = curC; - } - - //移动的下一个单元格是否是合并的单元格 - var margeset2 = luckysheet.menuButton.mergeborer(luckysheet.flowdata, curR, curC); - if(!!margeset2){ - var row = margeset2.row[1]; - var row_pre = margeset2.row[0]; - var row_index = margeset2.row[2]; - var row_index_ed = margeset2.row[3]; - - var col = margeset2.column[1]; - var col_pre = margeset2.column[0]; - var col_index = margeset2.column[2]; - var col_index_ed = margeset2.column[3]; - } - else{ - var row = visibledatarow[moveX], row_pre = moveX - 1 == -1 ? 0 : visibledatarow[moveX - 1]; - var col = visibledatacolumn[moveY], col_pre = moveY - 1 == -1 ? 0 : visibledatacolumn[moveY - 1]; - var row_index = moveX; - var row_index_ed = moveX; - var col_index = moveY; - var col_index_ed = moveY; - } - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [row_index, row_index_ed], - "column": [col_index, col_index_ed], - "row_focus": row_index, - "column_focus": col_index, - "moveXY": {"x": moveX, "y": moveY} - }; - - $("#luckysheet-formula-functionrange-select").css({ - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1 - }).show(); - - luckysheet.formula.rangeSetValue({ - "row": [row_index, row_index_ed], - "column": [col_index, col_index_ed] - }); - } - - //var winW = $(window).width(), winH = $(window).height(); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var sleft = 0, stop = 0; - if (col - scrollLeft - winW + 20 > 0) { - sleft = col - winW + 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - else if (col_pre - scrollLeft - 20 < 0) { - sleft = col_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - - if (row - scrollTop - winH + 20 > 0) { - stop = row - winH + 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - else if (row_pre - scrollTop - 20 < 0) { - stop = row_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - - clearTimeout(jfcountfuncTimeout); - jfcountfunc(); - } - - //ctrl + 方向键 调整单元格 - var luckysheetMoveHighlightCell2 = function(postion, type, isScroll){ - if(!isScroll){ - isScroll = true; - } - - if(type == "rangeOfSelect"){ - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var rf = last["row_focus"], cf = last["column_focus"]; - - if(config["merge"] != null && (rf + "_" + cf) in config["merge"]){ - var focusIsMerge = true; - var mc = config["merge"][rf + "_" + cf]; - } - else{ - var focusIsMerge = false; - } - - if(postion == "down"){ - if(rf == luckysheet.flowdata.length - 1){ - return; - } - - if(focusIsMerge){ - rf = luckysheet.getNextIndex("down", cf, mc.r + mc.rs - 1, luckysheet.flowdata.length - 1); - } - else{ - rf = luckysheet.getNextIndex("down", cf, rf, luckysheet.flowdata.length - 1); - } - } - else if(postion == "up"){ - if(rf == 0){ - return; - } - - if(focusIsMerge){ - rf = luckysheet.getNextIndex("up", cf, 0, mc.r); - } - else{ - rf = luckysheet.getNextIndex("up", cf, 0, rf); - } - } - else if(postion == "right"){ - if(cf == luckysheet.flowdata[0].length - 1){ - return; - } - - if(focusIsMerge){ - cf = luckysheet.getNextIndex("right", rf, mc.c + mc.cs - 1, luckysheet.flowdata[0].length - 1); - } - else{ - cf = luckysheet.getNextIndex("right", rf, cf, luckysheet.flowdata[0].length - 1); - } - } - else if(postion == "left"){ - if(cf == 0){ - return; - } - - if(focusIsMerge){ - cf = luckysheet.getNextIndex("left", rf, 0, mc.c); - } - else{ - cf = luckysheet.getNextIndex("left", rf, 0, cf); - } - } - - var rowseleted = [rf, rf]; - var columnseleted = [cf, cf]; - - var row = visibledatarow[rf], row_pre = rf - 1 == -1 ? 0 : visibledatarow[rf - 1]; - var col = visibledatacolumn[cf], col_pre = cf - 1 == -1 ? 0 : visibledatacolumn[cf - 1]; - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, row_pre, row - row_pre - 1, col_pre, col - col_pre - 1); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - // top = changeparam[2]; - // height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - } - - luckysheet_select_save = [{"row": rowseleted, "column": columnseleted}]; - - luckysheet.selectHightlightShow(); - - luckysheet.pivotTable.pivotclick(rf, cf); - - luckysheet.formula.fucntionboxshow(rf, cf); - - //图表 - if (luckysheet.chartparam.luckysheet_chart_data_select_state) { - $("#luckysheet-datavisual-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(columnseleted[0]) + (rowseleted[0] + 1) + ":" + luckysheet.luckysheetchatatABC(columnseleted[1]) + (rowseleted[1] + 1)); - } - } - else if(type == "rangeOfFormula"){ - var last = luckysheet.formula.func_selectedrange; - var rf = last["row_focus"], cf = last["column_focus"]; - - if(config["merge"] != null && (rf + "_" + cf) in config["merge"]){ - var focusIsMerge = true; - var mc = config["merge"][rf + "_" + cf]; - } - else{ - var focusIsMerge = false; - } - - if(postion == "down"){ - if(rf == luckysheet.flowdata.length - 1){ - return; - } - - if(focusIsMerge){ - rf = luckysheet.getNextIndex("down", cf, mc.r + mc.rs - 1, luckysheet.flowdata.length - 1); - } - else{ - rf = luckysheet.getNextIndex("down", cf, rf, luckysheet.flowdata.length - 1); - } - } - else if(postion == "up"){ - if(rf == 0){ - return; - } - - if(focusIsMerge){ - rf = luckysheet.getNextIndex("up", cf, 0, mc.r); - } - else{ - rf = luckysheet.getNextIndex("up", cf, 0, rf); - } - } - else if(postion == "right"){ - if(cf == luckysheet.flowdata[0].length - 1){ - return; - } - - if(focusIsMerge){ - cf = luckysheet.getNextIndex("right", rf, mc.c + mc.cs - 1, luckysheet.flowdata[0].length - 1); - } - else{ - cf = luckysheet.getNextIndex("right", rf, cf, luckysheet.flowdata[0].length - 1); - } - } - else if(postion == "left"){ - if(cf == 0){ - return; - } - - if(focusIsMerge){ - cf = luckysheet.getNextIndex("left", rf, 0, mc.c); - } - else{ - cf = luckysheet.getNextIndex("left", rf, 0, cf); - } - } - - var rowseleted = [rf, rf]; - var columnseleted = [cf, cf]; - - var row = visibledatarow[rf], row_pre = rf - 1 == -1 ? 0 : visibledatarow[rf - 1]; - var col = visibledatacolumn[cf], col_pre = cf - 1 == -1 ? 0 : visibledatacolumn[cf - 1]; - - var top = row_pre, height = row - row_pre - 1; - var left = col_pre, width = col - col_pre - 1; - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": top, - "height": height, - "left_move": left, - "width_move": width, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": columnseleted, - "row_focus": rf, - "column_focus": cf - }; - - $("#luckysheet-formula-functionrange-select").css({ - "left": left, - "width": width, - "top": top, - "height": height - }).show(); - - luckysheet.formula.rangeSetValue({ - "row": rowseleted, - "column": columnseleted - }); - } - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var sleft = 0, stop = 0; - if (col - scrollLeft - winW + 20 > 0) { - sleft = col - winW + 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - else if (col_pre - scrollLeft - 20 < 0) { - sleft = col_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - - if (row - scrollTop - winH + 20 > 0) { - stop = row - winH + 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - else if (row_pre - scrollTop - 20 < 0) { - stop = row_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - - clearTimeout(jfcountfuncTimeout); - jfcountfunc(); - } - - //shift + 方向键 调整选区 - var luckysheetMoveHighlightRange = function (postion, index, type, isScroll) { - if (isScroll == null) { - isScroll = true; - } - - if (!postion) { - postion == "down"; - } - - if(type == "rangeOfSelect"){ - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var curR = last["row"][0], endR = last["row"][1]; - var curC = last["column"][0], endC = last["column"][1]; - var rf = last["row_focus"], cf = last["column_focus"]; - - var datarowlen = luckysheet.flowdata.length, datacolumnlen = luckysheet.flowdata[0].length; - - if(postion == "down"){ //选区上下变动 - if(luckysheet.rowHasMerge(rf, curC, endC)){ //focus单元格所在行有合并单元格 - var rfMerge = luckysheet.getRowMerge(rf, curC, endC); - var rf_str = rfMerge[0], rf_end = rfMerge[1]; - - if(rf_str > curR && rf_end == endR){ - if(index > 0 && luckysheet.rowHasMerge(curR, curC, endC)){ - curR = luckysheet.getRowMerge(curR, curC, endC)[1]; - } - - curR += index; - } - else if(rf_end < endR && rf_str == curR){ - if(index < 0 && luckysheet.rowHasMerge(endR, curC, endC)){ - endR = luckysheet.getRowMerge(endR, curC, endC)[0]; - } - - endR += index; - } - else{ - if(index > 0){ - endR += index; - } - else{ - curR += index; - } - } - } - else{ - if(rf > curR && rf == endR){ - if(index > 0 && luckysheet.rowHasMerge(curR, curC, endC)){ - curR = luckysheet.getRowMerge(curR, curC, endC)[1]; - } - - curR += index; - } - else if(rf < endR && rf == curR){ - if(index < 0 && luckysheet.rowHasMerge(endR, curC, endC)){ - endR = luckysheet.getRowMerge(endR, curC, endC)[0]; - } - - endR += index; - } - else if(rf == curR && rf == endR){ - if(index > 0){ - endR += index; - } - else{ - curR += index; - } - } - } - - if (endR >= datarowlen) { - endR = datarowlen - 1; - } - - if (endR < 0) { - endR = 0; - } - - if (curR >= datarowlen) { - curR = datarowlen - 1; - } - - if (curR < 0) { - curR = 0; - } - } - else{ - if(luckysheet.colHasMerge(cf, curR, endR)){ //focus单元格所在列有合并单元格 - var cfMerge = luckysheet.getColMerge(cf, curR, endR); - var cf_str = cfMerge[0], cf_end = cfMerge[1]; - - if(cf_str > curC && cf_end == endC){ - if(index > 0 && luckysheet.colHasMerge(curC, curR, endR)){ - curC = luckysheet.getColMerge(curC, curR, endR)[1]; - } - - curC += index; - } - else if(cf_end < endC && cf_str == curC){ - if(index < 0 && luckysheet.colHasMerge(endC, curR, endR)){ - endC = luckysheet.getColMerge(endC, curR, endR)[0]; - } - - endC += index; - } - else{ - if(index > 0){ - endC += index; - } - else{ - curC += index; - } - } - } - else{ - if(cf > curC && cf == endC){ - if(index > 0 && luckysheet.colHasMerge(curC, curR, endR)){ - curC = luckysheet.getColMerge(curC, curR, endR)[1]; - } - - curC += index; - } - else if(cf < endC && cf == curC){ - if(index < 0 && luckysheet.colHasMerge(endC, curR, endR)){ - endC = luckysheet.getColMerge(endC, curR, endR)[0]; - } - - endC += index; - } - else if(cf == curC && cf == endC){ - if(index > 0){ - endC += index; - } - else{ - curC += index; - } - } - } - - if (endC >= datacolumnlen) { - endC = datacolumnlen - 1; - } - - if (endC < 0) { - endC = 0; - } - - if (curC >= datacolumnlen) { - curC = datacolumnlen - 1; - } - - if (curC < 0) { - curC = 0; - } - } - - var rowseleted = [curR, endR]; - var columnseleted = [curC, endC]; - - var row = visibledatarow[endR], row_pre = curR - 1 == -1 ? 0 : visibledatarow[curR - 1]; - var col = visibledatacolumn[endC], col_pre = curC - 1 == -1 ? 0 : visibledatacolumn[curC - 1]; - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, row_pre, row - row_pre - 1, col_pre, col - col_pre - 1); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - // top = changeparam[2]; - // height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - luckysheet.selectHightlightShow(); - - //图表 - if (luckysheet.chartparam.luckysheet_chart_data_select_state) { - $("#luckysheet-datavisual-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(last["column"][0]) + (last["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(last["column"][1]) + (last["row"][1] + 1)); - } - } - else if(type == "rangeOfFormula"){ - var last = luckysheet.formula.func_selectedrange; - - var curR = last["row"][0], endR = last["row"][1]; - var curC = last["column"][0], endC = last["column"][1]; - var rf = last["row_focus"], cf = last["column_focus"]; - - var datarowlen = luckysheet.flowdata.length, datacolumnlen = luckysheet.flowdata[0].length; - - if(postion == "down"){ //选区上下变动 - if(luckysheet.rowHasMerge(rf, curC, endC)){ //focus单元格所在行有合并单元格 - var rfMerge = luckysheet.getRowMerge(rf, curC, endC); - var rf_str = rfMerge[0], rf_end = rfMerge[1]; - - if(rf_str > curR && rf_end == endR){ - if(index > 0 && luckysheet.rowHasMerge(curR, curC, endC)){ - curR = luckysheet.getRowMerge(curR, curC, endC)[1]; - } - - curR += index; - } - else if(rf_end < endR && rf_str == curR){ - if(index < 0 && luckysheet.rowHasMerge(endR, curC, endC)){ - endR = luckysheet.getRowMerge(endR, curC, endC)[0]; - } - - endR += index; - } - else{ - if(index > 0){ - endR += index; - } - else{ - curR += index; - } - } - } - else{ - if(rf > curR && rf == endR){ - if(index > 0 && luckysheet.rowHasMerge(curR, curC, endC)){ - curR = luckysheet.getRowMerge(curR, curC, endC)[1]; - } - - curR += index; - } - else if(rf < endR && rf == curR){ - if(index < 0 && luckysheet.rowHasMerge(endR, curC, endC)){ - endR = luckysheet.getRowMerge(endR, curC, endC)[0]; - } - - endR += index; - } - else if(rf == curR && rf == endR){ - if(index > 0){ - endR += index; - } - else{ - curR += index; - } - } - } - - if (endR >= datarowlen) { - endR = datarowlen - 1; - } - - if (endR < 0) { - endR = 0; - } - - if (curR >= datarowlen) { - curR = datarowlen - 1; - } - - if (curR < 0) { - curR = 0; - } - } - else{ - if(luckysheet.colHasMerge(cf, curR, endR)){ //focus单元格所在列有合并单元格 - var cfMerge = luckysheet.getColMerge(cf, curR, endR); - var cf_str = cfMerge[0], cf_end = cfMerge[1]; - - if(cf_str > curC && cf_end == endC){ - if(index > 0 && luckysheet.colHasMerge(curC, curR, endR)){ - curC = luckysheet.getColMerge(curC, curR, endR)[1]; - } - - curC += index; - } - else if(cf_end < endC && cf_str == curC){ - if(index < 0 && luckysheet.colHasMerge(endC, curR, endR)){ - endC = luckysheet.getColMerge(endC, curR, endR)[0]; - } - - endC += index; - } - else{ - if(index > 0){ - endC += index; - } - else{ - curC += index; - } - } - } - else{ - if(cf > curC && cf == endC){ - if(index > 0 && luckysheet.colHasMerge(curC, curR, endR)){ - curC = luckysheet.getColMerge(curC, curR, endR)[1]; - } - - curC += index; - } - else if(cf < endC && cf == curC){ - if(index < 0 && luckysheet.colHasMerge(endC, curR, endR)){ - endC = luckysheet.getColMerge(endC, curR, endR)[0]; - } - - endC += index; - } - else if(cf == curC && cf == endC){ - if(index > 0){ - endC += index; - } - else{ - curC += index; - } - } - } - - if (endC >= datacolumnlen) { - endC = datacolumnlen - 1; - } - - if (endC < 0) { - endC = 0; - } - - if (curC >= datacolumnlen) { - curC = datacolumnlen - 1; - } - - if (curC < 0) { - curC = 0; - } - } - - var rowseleted = [curR, endR]; - var columnseleted = [curC, endC]; - - var row = visibledatarow[endR], row_pre = curR - 1 == -1 ? 0 : visibledatarow[curR - 1]; - var col = visibledatacolumn[endC], col_pre = curC - 1 == -1 ? 0 : visibledatacolumn[curC - 1]; - - var top = row_pre, height = row - row_pre - 1; - var left = col_pre, width = col - col_pre - 1; - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": top, - "height": height, - "left_move": left, - "width_move": width, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": columnseleted, - "row_focus": rf, - "column_focus": cf - }; - - $("#luckysheet-formula-functionrange-select").css({ - "left": left, - "width": width, - "top": top, - "height": height - }).show(); - - luckysheet.formula.rangeSetValue({ - "row": rowseleted, - "column": columnseleted - }); - } - - //var winW = $(window).width(), winH = $(window).height(); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var sleft = 0, stop = 0; - if (col - scrollLeft - winW + 20 > 0) { - sleft = col - winW + 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - else if (col_pre - scrollLeft - 20 < 0) { - sleft = col_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - - if (row - scrollTop - winH + 20 > 0) { - stop = row - winH + 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - else if (row_pre - scrollTop - 20 < 0) { - stop = row_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - - clearTimeout(jfcountfuncTimeout); - jfcountfunc(); - } - - //ctrl + shift + 方向键 调整选区 - var luckysheetMoveHighlightRange2 = function(postion, type, isScroll){ - if(!isScroll){ - isScroll = true; - } - - if(type == "rangeOfSelect"){ - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var rf = last["row_focus"], cf = last["column_focus"]; - - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - - if(postion == "down"){ - if(r2 == luckysheet.flowdata.length - 1){ - return; - } - - if(luckysheet.rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 - var rfMerge = luckysheet.getRowMerge(rf, c1, c2); - var rf_str = rfMerge[0], rf_end = rfMerge[1]; - - if(rf_str > r1 && rf_end == r2){ - r1 = luckysheet.getNextIndex("down", cf, r1, r2); - } - else{ - r2 = luckysheet.getNextIndex("down", cf, r2, luckysheet.flowdata.length - 1); - } - } - else{ - if(rf > r1 && rf == r2){ - r1 = luckysheet.getNextIndex("down", cf, r1, r2); - } - else{ - r2 = luckysheet.getNextIndex("down", cf, r2, luckysheet.flowdata.length - 1); - } - } - } - else if(postion == "up"){ - if(r1 == 0){ - return; - } - - if(luckysheet.rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 - var rfMerge = luckysheet.getRowMerge(rf, c1, c2); - var rf_str = rfMerge[0], rf_end = rfMerge[1]; - - if(rf_end < r2 && rf_str == r1){ - r2 = luckysheet.getNextIndex("up", cf, r1, r2); - } - else{ - r1 = luckysheet.getNextIndex("up", cf, 0, r1); - } - } - else{ - if(rf < r2 && rf == r1){ - r2 = luckysheet.getNextIndex("up", cf, r1, r2); - } - else{ - r1 = luckysheet.getNextIndex("up", cf, 0, r1); - } - } - } - else if(postion == "right"){ - if(c2 == luckysheet.flowdata[0].length - 1){ - return; - } - - if(luckysheet.colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 - var cfMerge = luckysheet.getColMerge(cf, r1, r2); - var cf_str = cfMerge[0], cf_end = cfMerge[1]; - - if(cf_str > c1 && cf_end == c2){ - c1 = luckysheet.getNextIndex("right", rf, c1, c2); - } - else{ - c2 = luckysheet.getNextIndex("right", rf, c2, luckysheet.flowdata[0].length - 1); - } - } - else{ - if(cf > c1 && cf == c2){ - c1 = luckysheet.getNextIndex("right", rf, c1, c2); - } - else{ - c2 = luckysheet.getNextIndex("right", rf, c2, luckysheet.flowdata[0].length - 1); - } - } - } - else if(postion == "left"){ - if(c1 == 0){ - return; - } - - if(luckysheet.colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 - var cfMerge = luckysheet.getColMerge(cf, r1, r2); - var cf_str = cfMerge[0], cf_end = cfMerge[1]; - - if(cf_end < c2 && cf_str == c1){ - c2 = luckysheet.getNextIndex("left", rf, c1, c2); - } - else{ - c1 = luckysheet.getNextIndex("left", rf, 0, c1); - } - } - else{ - if(cf < c2 && cf == c1){ - c2 = luckysheet.getNextIndex("left", rf, c1, c2); - } - else{ - c1 = luckysheet.getNextIndex("left", rf, 0, c1); - } - } - } - - var rowseleted = [r1, r2]; - var columnseleted = [c1, c2]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, row_pre, row - row_pre - 1, col_pre, col - col_pre - 1); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - // top = changeparam[2]; - // height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - luckysheet.selectHightlightShow(); - - //图表 - if (luckysheet.chartparam.luckysheet_chart_data_select_state) { - $("#luckysheet-datavisual-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(last["column"][0]) + (last["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(last["column"][1]) + (last["row"][1] + 1)); - } - } - else if(type == "rangeOfFormula"){ - var last = luckysheet.formula.func_selectedrange; - var rf = last["row_focus"], cf = last["column_focus"]; - - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - - if(postion == "down"){ - if(r2 == luckysheet.flowdata.length - 1){ - return; - } - - if(luckysheet.rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 - var rfMerge = luckysheet.getRowMerge(rf, c1, c2); - var rf_str = rfMerge[0], rf_end = rfMerge[1]; - - if(rf_str > r1 && rf_end == r2){ - r1 = luckysheet.getNextIndex("down", cf, r1, r2); - } - else{ - r2 = luckysheet.getNextIndex("down", cf, r2, luckysheet.flowdata.length - 1); - } - } - else{ - if(rf > r1 && rf == r2){ - r1 = luckysheet.getNextIndex("down", cf, r1, r2); - } - else{ - r2 = luckysheet.getNextIndex("down", cf, r2, luckysheet.flowdata.length - 1); - } - } - } - else if(postion == "up"){ - if(r1 == 0){ - return; - } - - if(luckysheet.rowHasMerge(rf, c1, c2)){ //focus所在行有合并单元格 - var rfMerge = luckysheet.getRowMerge(rf, c1, c2); - var rf_str = rfMerge[0], rf_end = rfMerge[1]; - - if(rf_end < r2 && rf_str == r1){ - r2 = luckysheet.getNextIndex("up", cf, r1, r2); - } - else{ - r1 = luckysheet.getNextIndex("up", cf, 0, r1); - } - } - else{ - if(rf < r2 && rf == r1){ - r2 = luckysheet.getNextIndex("up", cf, r1, r2); - } - else{ - r1 = luckysheet.getNextIndex("up", cf, 0, r1); - } - } - } - else if(postion == "right"){ - if(c2 == luckysheet.flowdata[0].length - 1){ - return; - } - - if(luckysheet.colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 - var cfMerge = luckysheet.getColMerge(cf, r1, r2); - var cf_str = cfMerge[0], cf_end = cfMerge[1]; - - if(cf_str > c1 && cf_end == c2){ - c1 = luckysheet.getNextIndex("right", rf, c1, c2); - } - else{ - c2 = luckysheet.getNextIndex("right", rf, c2, luckysheet.flowdata[0].length - 1); - } - } - else{ - if(cf > c1 && cf == c2){ - c1 = luckysheet.getNextIndex("right", rf, c1, c2); - } - else{ - c2 = luckysheet.getNextIndex("right", rf, c2, luckysheet.flowdata[0].length - 1); - } - } - } - else if(postion == "left"){ - if(c1 == 0){ - return; - } - - if(luckysheet.colHasMerge(cf, r1, r2)){ //focus所在行有合并单元格 - var cfMerge = luckysheet.getColMerge(cf, r1, r2); - var cf_str = cfMerge[0], cf_end = cfMerge[1]; - - if(cf_end < c2 && cf_str == c1){ - c2 = luckysheet.getNextIndex("left", rf, c1, c2); - } - else{ - c1 = luckysheet.getNextIndex("left", rf, 0, c1); - } - } - else{ - if(cf < c2 && cf == c1){ - c2 = luckysheet.getNextIndex("left", rf, c1, c2); - } - else{ - c1 = luckysheet.getNextIndex("left", rf, 0, c1); - } - } - } - - var rowseleted = [r1, r2]; - var columnseleted = [c1, c2]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var top = row_pre, height = row - row_pre - 1; - var left = col_pre, width = col - col_pre - 1; - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": top, - "height": height, - "left_move": left, - "width_move": width, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": columnseleted, - "row_focus": rf, - "column_focus": cf - }; - - $("#luckysheet-formula-functionrange-select").css({ - "left": left, - "width": width, - "top": top, - "height": height - }).show(); - - luckysheet.formula.rangeSetValue({ - "row": rowseleted, - "column": columnseleted - }); - } - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var sleft = 0, stop = 0; - if (col - scrollLeft - winW + 20 > 0) { - sleft = col - winW + 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - else if (col_pre - scrollLeft - 20 < 0) { - sleft = col_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - - if (row - scrollTop - winH + 20 > 0) { - stop = row - winH + 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - else if (row_pre - scrollTop - 20 < 0) { - stop = row_pre - 20; - if (isScroll) { - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - } - - clearTimeout(jfcountfuncTimeout); - jfcountfunc(); - } - luckysheet.luckysheetMoveHighlightRange2 = luckysheetMoveHighlightRange2; - - var luckysheetRangeLast = function (obj) { - var range; - if(document.createRange){ //chrome, firefox, opera, safari, ie9+ - if(obj.innerHTML != obj.innerText || obj.innerHTML == ""){ - obj.focus(); //解决ff不获取焦点无法定位问题 - range = window.getSelection();//创建range - range.selectAllChildren(obj);//range 选择obj下所有子内容 - range.collapseToEnd();//光标移至最后 - } - else{ - var len = obj.innerText.length; - - range = document.createRange(); - range.selectNodeContents(obj); - range.setStart(obj.childNodes[0], len); - range.collapse(true); - - var selection = window.getSelection(); - selection.removeAllRanges(); - selection.addRange(range); - } - } - else if(document.selection){ //ie8 and lower - range = document.body.createTextRange(); - range.moveToElementText(obj); - range.collapse(false); - range.select(); - } - - // if (window.getSelection) {//ie11 10 9 ff safari - // obj.focus(); //解决ff不获取焦点无法定位问题 - // var range = window.getSelection();//创建range - // range.selectAllChildren(obj);//range 选择obj下所有子内容 - // range.collapseToEnd();//光标移至最后 - // } - // else if (document.selection) {//ie10 9 8 7 6 5 - // var range = document.selection.createRange();//创建选择对象 - // //var range = document.body.createTextRange(); - // range.moveToElementText(obj);//range定位到obj - // range.collapse(false);//光标移至最后 - // range.select(); - // } - } - - function getCursortPosition(textDom){ - var cursorPos = 0; - if(document.selection){ - textDom.focus(); - var selectRange = document.selection.createRange(); - selectRange.moveStart("character", -textDom.value.length); - cursorPos = selectRange.text.length; - } - else if(textDom.selectionStart || textDom.selectionStart == "0"){ - cursorPos = textDom.selectionStart; - } - return cursorPos; - } - - luckysheet.luckysheetRangeLast = luckysheetRangeLast; - - $("#luckysheet-copy-btn, #luckysheet-cols-copy-btn, #luckysheet-paste-btn-title").click(function (event) { - $(this).parent().hide(); - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - //多重选区 有条件格式时 提示 - var cdformat = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].luckysheet_conditionformat_save; - if(luckysheet_select_save.length > 1 && cdformat != null && cdformat.length > 0){ - var hasCF = false; - - var cf_compute = luckysheet.conditionformat.getComputeMap(); - - label: - for(var s = 0; s < luckysheet_select_save.length; s++){ - if(hasCF){ - break; - } - - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - if(luckysheet.conditionformat.checksCF(r, c, cf_compute) != null){ - hasCF = true; - continue label; - } - } - } - } - - if(hasCF){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对多重选择区域执行此操作", ""); - } - return; - } - } - - //多重选区 行不一样且列不一样时 提示 - if(luckysheet_select_save.length > 1){ - var isSameRow = true, str_r = luckysheet_select_save[0].row[0], end_r = luckysheet_select_save[0].row[1]; - var isSameCol = true, str_c = luckysheet_select_save[0].column[0], end_c = luckysheet_select_save[0].column[1]; - - for(var s = 1; s < luckysheet_select_save.length; s++){ - if(luckysheet_select_save[s].row[0] != str_r || luckysheet_select_save[s].row[1] != end_r){ - isSameRow = false; - } - if(luckysheet_select_save[s].column[0] != str_c || luckysheet_select_save[s].column[1] != end_c){ - isSameCol = false; - } - } - - if((!isSameRow && !isSameCol) || luckysheet.selectIsOverlap()){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对多重选择区域执行此操作", ""); - } - return; - } - } - - luckysheet.selection.copy(event); - }); - - $("#luckysheet-copy-paste, #luckysheet-cols-paste-btn, #luckysheet-paste-btn-title").click(function (event) { - luckysheet.selection.paste(event, "btn"); - $(this).parent().hide(); - }); - - $("#luckysheet-chart-btn-title").click(function () { - $("#luckysheetdatavisual").click(); - }); - - $("#luckysheet-pivot-btn-title").click(function (e) { - luckysheet.pivotTable.createPivotTable(e); - }); - - $("#luckysheet-selectall-btn-title").click(function () { - $("#luckysheet-left-top").trigger("mousedown"); - $(document).trigger("mouseup"); - }); - - $("#luckysheet-download-btn-title").click(function () { - if(luckysheet.isEditMode()){ - alert("正在下载!"); - } - else{ - luckysheet.tooltip.info("正在下载!", ""); - } - }); - - //截图 - $("#luckysheet-chart-btn-screenshot").click(function () { - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请框选需要截图的范围"); - } - else{ - luckysheet.tooltip.info("提示!", "请框选需要截图的范围"); - } - return; - } - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("提示!", "无法对多重选择区域执行此操作"); - } - - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("提示!", "无法对合并单元格执行此操作"); - } - return; - } - } - - var st_r = luckysheet_select_save[0].row[0], ed_r = luckysheet_select_save[0].row[1]; - var st_c = luckysheet_select_save[0].column[0], ed_c = luckysheet_select_save[0].column[1]; - - var shotData = luckysheet.datagridgrowth([], ed_r + 1, ed_c + 1); - - for(var r = st_r; r <= ed_r; r++){ - for(var c = st_c; c <= ed_c; c++){ - shotData[r][c] = luckysheet.flowdata[r][c]; - } - } - - if(st_r - 1 < 0){ - var scrollHeight = 0; - var rh_height = visibledatarow[ed_r]; - } - else{ - var scrollHeight = visibledatarow[st_r - 1]; - var rh_height = visibledatarow[ed_r] - visibledatarow[st_r - 1]; - } - - if(st_c - 1 < 0){ - var scrollWidth = 0; - var ch_width = visibledatacolumn[ed_c]; - } - else{ - var scrollWidth = visibledatacolumn[st_c - 1]; - var ch_width = visibledatacolumn[ed_c] - visibledatacolumn[st_c - 1]; - } - - var newCanvas = $("").attr({ width: Math.ceil(ch_width * devicePixelRatio), height: Math.ceil(rh_height * devicePixelRatio) }).css({ width: ch_width, height: rh_height }); - - var d = luckysheet.flowdata; - luckysheet.flowdata = shotData; - - luckysheetDrawMain(scrollWidth, scrollHeight, ch_width, rh_height, 1, 1, null, null, newCanvas); - // luckysheetDrawMain(scrollWidth, scrollHeight, ch_width, rh_height, 0, 0, null, null, newCanvas); - - luckysheet.flowdata = d; - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - - var image = new Image(); - var url = newCanvas.get(0).toDataURL("image/png"); - image.src = url; - - if(ch_width > rh_height){ - image.style.width = "100%"; - } - else{ - image.style.height = "100%"; - } - - var maxHeight = $(window).height() - 200; - luckysheet.tooltip.screenshot("截取成功!", '
', url); - $("#luckysheet-confirm-screenshot-save").append(image); - newCanvas.remove(); - //newCanvas.appendTo("body"); - }); - $(document).on("click", "a.download", function(){ //截图下载 - var dataURI = $("#luckysheet-confirm-screenshot-save img").attr("src"); - - var binStr = atob(dataURI.split(",")[1]), - len = binStr.length, - arr = new Uint8Array(len); - - for(var i = 0; i < len; i++){ - arr[i] = binStr.charCodeAt(i); - } - - var blob = new Blob([arr]); - - var element = document.createElement('a'); - element.setAttribute('href', URL.createObjectURL(blob)); - element.setAttribute('download', '截图.png'); - - element.style.display = 'none'; - document.body.appendChild(element); - - element.click(); - - var clickHandler; - element.addEventListener('click', clickHandler=function(){ - requestAnimationFrame(function(){ - URL.revokeObjectURL(element.href); - }); - - element.removeAttribute('href'); - element.removeEventListener('click', clickHandler); - }) - - document.body.removeChild(element); - }) - - $("#luckysheet-share-btn-title").click(function () { - var savedata = []; - for (var i = 0; i < luckysheetfile.length; i++) { - var charts = luckysheetfile[i].chart; - if (charts == null) { - continue; - } - for (var c = 0; c < charts.length; c++) { - var chart = charts[c]; - var data = luckysheet.getdatabyselectionD(luckysheetfile[i].data, { "row": eval('(' + chart.row + ')'), "column": eval('(' + chart.column + ')') }); - savedata.push([chart.defaultOption, chart.selfOption, chart.chartType, chart.chartStyle, chart.chartMarkConfig, chart.chartTitleConfig, data]); - } - } - - luckysheet.tooltip.info("正在发布数据", '
渲染中...
'); - $.post("../Home/seth5js", { "text": JSON.stringify(savedata) }, function (data) { - if (data == "0") { - if(luckysheet.isEditMode()){ - alert("发布数据失败, 请稍后再试!"); - } - else{ - luckysheet.tooltip.info("发布数据失败", '请稍后再试!'); - } - } - else { - var img = ''; - - luckysheet.tooltip.info("发布成功!请扫二维码", img); - - } - }); - }); - - //分列 - $("#luckysheet-splitColumn-btn-title").click(function(){ - if(luckysheet_select_save == null || luckysheet_select_save.length == 0){ - return; - } - - if(luckysheet_select_save.length > 1){ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - return; - } - - if(luckysheet_select_save[0].column[0] != luckysheet_select_save[0].column[1]){ - luckysheet.tooltip.info("一次只能转换一列数据,选定区域可以有多行,但不能有多列,请在选定单列区域以后再试", ""); - return; - } - - luckysheet.splitColumn.createDialog(); - luckysheet.splitColumn.init(); - }); - - $("#luckysheet-freezen-btn-horizontal").click(function () { - if($.trim($(this).text())=="取消冻结"){ - if (luckysheet.freezen.freezenverticaldata != null) { - luckysheet.freezen.cancelFreezenVertical(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - if (luckysheet.freezen.freezenhorizontaldata != null) { - luckysheet.freezen.cancelFreezenHorizontal(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - luckysheet.freezen.scrollAdapt(); - } - else{ - if (luckysheet.freezen.freezenverticaldata != null) { - luckysheet.freezen.cancelFreezenVertical(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - if (luckysheet.freezen.freezenhorizontaldata == null) { - luckysheet.freezen.createFreezenHorizontal(); - luckysheet.freezen.createAssistCanvas(); - } - } - }); - - $("#luckysheet-freezen-btn-vertical").click(function () { - if (luckysheet.freezen.freezenverticaldata != null) { - luckysheet.freezen.cancelFreezenVertical(); - luckysheet.luckysheetrefreshgrid(); - } - else { - luckysheet.freezen.createFreezenVertical(); - } - luckysheet.freezen.createAssistCanvas(); - }); - - - var submenuhide = null, rightclickmenu = null; - $(".luckysheet-cols-menu .luckysheet-cols-submenu").hover( - function () { - var $t = $(this), attrid = $t.attr("id"), $attr = $("#" + attrid + "_sub"), $con = $t.parent(); - var winW = $(window).width(), winH = $(window).height(); - var menuW = $con.width(), attrH = $attr.height() + 25, attrW = $attr.width() + 5; - var offset = $t.offset(); - var top = offset.top, left = offset.left + menuW; - - if (left + attrW > winW) { - left = offset.left - attrW; - } - - if (top + attrH > winH) { - top = winH - attrH; - } - - $attr.css({ "top": top, "left": left }).show(); - rightclickmenu = $t; - }, - function () { - var $t = $(this), attrid = $t.attr("id"), $attr = $("#" + attrid + "_sub"); - submenuhide = setTimeout(function () { $attr.hide(); }, 200); - } - ); - - $(".luckysheet-rightgclick-menu-sub").hover( - function () { - rightclickmenu.addClass("luckysheet-cols-menuitem-hover"); - clearTimeout(submenuhide); - }, - function () { - rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"); - $(this).hide(); - } - ); - - $(".luckysheet-grid-container, #luckysheet-rightclick-menu").on("contextmenu", function (e) { - e.preventDefault(); - }); - - $("#luckysheet-rightclick-menu input").on("keydown", function (e) { - e.stopPropagation(); - }); - - var copychange = function () { - if (document.hidden || document.webkitHidden || document.msHidden) { - iscopyself = false; - } - } - - $("#luckysheet-modal-dialog-mask").on("click dbclick mousedown mousemove mouseup", function (e) { - e.stopPropagation(); - e.preventDefault(); - }); - - //$("#" + container).mouseover(function () { - // luckysheet.luckysheetactiveCell(); - //}); - - $(document).on("visibilitychange webkitvisibilitychange msvisibilitychange", copychange).mouseleave(function () { - iscopyself = false; - }).mousedown(function (event) { - //有批注在编辑时 - luckysheet.postil.removeActivePs(); - - //luckysheet.luckysheetactiveCell(); - if (!$(event.target).hasClass("luckysheet-mousedown-cancel") && $(event.target).filter("[class*='sp-palette']").length == 0 && $(event.target).filter("[class*='sp-thumb']").length == 0 && $(event.target).filter("[class*='sp-']").length == 0) { - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-cols-h-hover").hide(); - $("#luckysheet-cols-menu-btn").hide(); - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu, #luckysheet-user-menu").hide(); - $("body > .luckysheet-filter-menu, body > .luckysheet-filter-submenu, body > .luckysheet-cols-menu").hide(); - //$("body > luckysheet-menuButton").hide(); - luckysheet_cols_menu_status = false; - } - - //点击功能栏时 如果是单元格编辑模式 则退出编辑模式 - if($(event.target).closest("#luckysheet-wa-editor").length > 0 && parseInt($("#luckysheet-input-box").css("top")) > 0){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - } - }); - - $("#" + container).add("#luckysheet-input-box").keydown(function (event) { - if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("formulaInputFocus")) { - return; - } - - var ctrlKey = event.ctrlKey; - var altKey = event.altKey; - var shiftKey = event.shiftKey; - var kcode = event.keyCode; - //luckysheet.formula.rangeHightlightselected(); - var $inputbox = $("#luckysheet-input-box"); - if (kcode == keycode.ESC && parseInt($("#luckysheet-input-box").css("top")) > 0) { - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - event.preventDefault(); - } - else if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible") && luckysheet.formula.searchFunctionCell != null) { - luckysheet.formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); - event.preventDefault(); - } - } - else if(kcode == keycode.TAB && parseInt($inputbox.css("top")) > 0){ - if ($("#luckysheet-formula-search-c").is(":visible") && luckysheet.formula.searchFunctionCell != null) { - luckysheet.formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); - } - else{ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); - } - - event.preventDefault(); - } - else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.setfreezonFuc(event); - event.preventDefault(); - } - else if (kcode == keycode.UP && parseInt($inputbox.css("top")) > 0) { - if($("#luckysheet-formula-search-c").is(":visible")){ - var $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev(); - if ($up.length == 0) { - $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last(); - } - - $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); - $up.addClass("luckysheet-formula-search-item-active"); - - event.preventDefault(); - } - else if(ctrlKey && shiftKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange2("up", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange2("up", "rangeOfFormula"); - } - - event.preventDefault(); - } - } - else if(ctrlKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell2("up", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell2("up", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(shiftKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange("down", -1, "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange("down", -1, "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else{ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell("down", -1, "rangeOfFormula"); - - event.preventDefault(); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell("down", -1, "rangeOfFormula"); - - event.preventDefault(); - } - } - else{ - var anchor = $(window.getSelection().anchorNode); - var anchorOffset = window.getSelection().anchorOffset; - - if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); - - event.preventDefault(); - } - } - } - } - else if (kcode == keycode.DOWN && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible")) { - var $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next(); - if ($up.length == 0) { - $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first(); - } - - $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); - $up.addClass("luckysheet-formula-search-item-active"); - - event.preventDefault(); - } - else if(ctrlKey && shiftKey){ //ctrl + shift + up 调整公式选区 - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange2("down", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange2("down", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(ctrlKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell2("down", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell2("down", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(shiftKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange("down", 1, "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange("down", 1, "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else{ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell("down", 1, "rangeOfFormula"); - - event.preventDefault(); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell("down", 1, "rangeOfFormula"); - - event.preventDefault(); - } - } - else{ - var anchor = $(window.getSelection().anchorNode); - var anchorOffset = window.getSelection().anchorOffset; - - if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - - event.preventDefault(); - } - } - } - } - else if (kcode == keycode.LEFT && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible")){ - event.preventDefault(); - } - else if(ctrlKey && shiftKey){ //ctrl + shift + up 调整公式选区 - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange2("left", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange2("left", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(ctrlKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell2("left", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell2("left", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(shiftKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange("right", -1, "rangeOfFormula"); - - event.preventDefault(); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange("right", -1, "rangeOfFormula"); - - event.preventDefault(); - } - } - } - else{ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell("right", -1, "rangeOfFormula"); - - event.preventDefault(); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell("right", -1, "rangeOfFormula"); - - event.preventDefault(); - } - } - else{ - var anchor = $(window.getSelection().anchorNode); - var anchorOffset = window.getSelection().anchorOffset; - - if(anchor.parent().is("span") && anchor.parent().prev().length == 0 && anchorOffset == 0){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.is("#luckysheet-rich-text-editor") && anchorOffset == 1){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchorOffset == 0){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", -1, "rangeOfSelect"); - - event.preventDefault(); - } - } - } - } - else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible")){ - event.preventDefault(); - } - else if(ctrlKey && shiftKey){ //ctrl + shift + up 调整公式选区 - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange2("right", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange2("right", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(ctrlKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell2("right", "rangeOfFormula"); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell2("right", "rangeOfFormula"); - } - } - - event.preventDefault(); - } - else if(shiftKey){ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightRange("right", 1, "rangeOfFormula"); - - event.preventDefault(); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightRange("right", 1, "rangeOfFormula"); - - event.preventDefault(); - } - } - } - else{ - if($("#luckysheet-formula-functionrange-select").is(":visible")){ - luckysheetMoveHighlightCell("right", 1, "rangeOfFormula"); - - event.preventDefault(); - } - else if(luckysheet.formula.israngeseleciton()){ - var anchor = $(window.getSelection().anchorNode); - if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){ - var vText = $("#luckysheet-input-box #luckysheet-input-box-index").text(); - var range = luckysheet.formula.getcellrange(vText); - - if(range == null){ - range = luckysheet.formula.getcellrange($("#luckysheet-input-box-index").text()); - } - - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - luckysheet.formula.func_selectedrange = { - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [r1, r2], - "column": [c1, c2], - "row_focus": r1, - "column_focus": c1 - }; - - luckysheet.formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] }); - - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - luckysheetMoveHighlightCell("right", 1, "rangeOfFormula"); - - event.preventDefault(); - } - } - else{ - var anchor = $(window.getSelection().anchorNode); - var anchorOffset = window.getSelection().anchorOffset; - - if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); - - event.preventDefault(); - } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); - - event.preventDefault(); - } - } - } - } - else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) { - luckysheet.formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode); - } - }).keyup(function (e) { - var kcode = e.keyCode; - if (!e.shiftKey && kcode == 16) { - luckysheet_shiftkeydown = false; - luckysheet.luckysheet_shiftpositon = null; - } - - //输入框中文输入后 shift 和 空格 处理 - if(parseInt($("#luckysheet-input-box").css("top")) > 0 && (kcode == 13 || kcode == 16 || kcode == 32)){ - luckysheet.formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode); - } - - e.preventDefault(); - }); - - //表格计数栏 - var jfcountfunc = function () { - if(luckysheet_select_save.length == 0){ - return; - } - - var min = Infinity, max = -Infinity, sum = 0, count = 0, mean = 0; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var data = luckysheet.getdatabyselectionNoCopy(luckysheet_select_save[s]); - - for (var r = 0; r < data.length; r++) { - for (var c = 0; c < data[0].length; c++) { - if(luckysheet.func_methods.isRealNull(data[r][c])){ - continue; - } - - count++; - - if(data[r][c].ct != null && data[r][c].ct.t == "d"){ - continue; - } - - var value = data[r][c].v; - - if(!luckysheet.func_methods.isRealNum(value)){ - continue; - } - - value = parseFloat(value); - - sum += value; - - if(value < min){ - min = value; - } - - if(value > max){ - max = value; - } - } - } - } - - var ret = ""; - ret += "计数:" + count + ""; - - // if (sum != 0 && (isFinite(max) || isFinite(min))) { - if (isFinite(max) || isFinite(min)) { - //ret += "求和:" + luckysheet.numFormat(sum) + ""; - //ret += "平均值:" + luckysheet.numFormat(sum / count, 4) + ""; - - //new runze - //处理成亿万格式 - // ret += "求和:" + luckysheet.mask.update("w", luckysheet.numFormat(sum)) + ""; - ret += "求和:" + luckysheet.mask.update("w", sum) + ""; - // ret += "平均值:" + luckysheet.mask.update("w", luckysheet.numFormat(sum / count, 4)) + ""; - ret += "平均值:" + luckysheet.mask.update("w", Math.round(sum / count * 10000) / 10000) + ""; - } - - if (isFinite(max)) { - //ret += "最大值:" + luckysheet.numFormat(max) + ""; - // ret += "最大值:" + luckysheet.mask.update("w", luckysheet.numFormat(max)) + ""; - ret += "最大值:" + luckysheet.mask.update("w", max) + ""; - } - - if (isFinite(min)) { - //ret += "最小值:" + luckysheet.numFormat(min) + ""; - // ret += "最小值:" + luckysheet.mask.update("w", luckysheet.numFormat(min)) + ""; - ret += "最小值:" + luckysheet.mask.update("w", min) + ""; - } - $("#luckysheet-sta-content").html(ret); - } - - luckysheet.jfcountfunc = jfcountfunc; - - $(document).mousemove(function (event) { - luckysheet.postil.overshow(event); //有批注显示 - - clearInterval(jfautoscrollTimeout); - if(luckysheet.formula.functionResizeStatus){ - var y = event.pageY; - var movepx = y - luckysheet.formula.functionResizeData.y; - var mpx = luckysheet.formula.functionResizeData.calculatebarHeight + movepx; - var winh = Math.round($(window).height()/2); - if(mpx <= 28){ - if(mpx <= 20){ - return; - } - mpx = 28; - } - else if(mpx >= winh){ - if(mpx >= winh + 8){ - return; - } - mpx = winh; - } - calculatebarHeight = mpx; - $("#luckysheet-wa-calculate").css("height", calculatebarHeight - 2); - $("#luckysheet-wa-calculate-size").css({"background":"#5e5e5e", "cursor":"ns-resize"}); - clearTimeout(luckysheet.formula.functionResizeTimeout); - luckysheet.formula.functionResizeTimeout = setTimeout(function(){ - luckysheet.luckysheetsizeauto(); - }, 15); - } - else if (!!luckysheet.freezen.horizontalmovestate) { - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var top = mouse[1] + columeHeaderHeight; - - if (top < columeHeaderHeight) { - top = columeHeaderHeight; - } - - if (top > luckysheet.freezen.windowHeight - 4) { - top = luckysheet.freezen.windowHeight - 4; - } - - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css({ "top": top }); - - if (top + scrollTop - columeHeaderHeight >= row_pre + (row - row_pre) / 2) { - top = row - 2 - scrollTop + columeHeaderHeight; - luckysheet.freezen.freezenhorizontaldata = [row, row_index + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_index + 1), top]; - } - else { - top = row_pre - 2 - scrollTop + columeHeaderHeight; - luckysheet.freezen.freezenhorizontaldata = [row_pre, row_index, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_index), top]; - } - - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-drop").css({ "top": top }); - luckysheet.freezen.saveFreezen(luckysheet.freezen.freezenhorizontaldata, top, null, null); - } - else if (!!luckysheet.freezen.verticalmovestate) { - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var left = mouse[0] + rowHeaderWidth; - - if (left < rowHeaderWidth) { - left = rowHeaderWidth; - } - - if (left > luckysheet.freezen.windowWidth - 4) { - left = luckysheet.freezen.windowWidth - 4; - } - - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css({ "left": left }); - - if (left + scrollLeft - rowHeaderWidth >= col_pre + (col - col_pre) / 2) { - left = col - 2 - scrollLeft + rowHeaderWidth; - luckysheet.freezen.freezenverticaldata = [col, col_index + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_index + 1), left]; - } - else { - left = col_pre - 2 - scrollLeft + rowHeaderWidth; - luckysheet.freezen.freezenverticaldata = [col_pre, col_index, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_index), left]; - } - - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-drop").css({ "left": left }); - luckysheet.freezen.saveFreezen(null, null, luckysheet.freezen.freezenverticaldata, left); - luckysheet.luckysheetsizeauto();//调节选区时下部单元格溢出 - } - else if (!!luckysheet.pivotTable && luckysheet.pivotTable.movestate) { - var x = event.pageX, y = event.pageY; - $("#luckysheet-modal-dialog-slider-pivot-move").css({ "left": x - luckysheet.pivotTable.movesave.width / 2, "top": y - luckysheet.pivotTable.movesave.height }); - } - else if (!!luckysheet.chartparam.luckysheet_chart_point_config && luckysheet.chartparam.luckysheet_chart_point_config.movestart) { - var x = event.pageX, y = event.pageY, $container = luckysheet.chartparam.luckysheet_chart_point_config.container; - var curleft = x - $container.offset().left + $container.scrollLeft(); - var curtop = y - $container.offset().top + $container.scrollTop(); - //var $cur = $(event.target), $item = $(event.target).closest(".luckysheet-chart-point-searchitem"); - //$item.addClass("luckysheet-chart-point-searchitem-active"); - var top = 0, height = 0; - if (luckysheet.chartparam.luckysheet_chart_point_config.top > curtop) { - top = curtop; - height = luckysheet.chartparam.luckysheet_chart_point_config.top - curtop; - } - else if (luckysheet.chartparam.luckysheet_chart_point_config.top == curtop) { - top = curtop; - height = luckysheet.chartparam.luckysheet_chart_point_config.top - curtop; - } - else { - top = luckysheet.chartparam.luckysheet_chart_point_config.top; - height = curtop - luckysheet.chartparam.luckysheet_chart_point_config.top - 1; - } - - var left = 0, width = 0; - if (luckysheet.chartparam.luckysheet_chart_point_config.left > curleft) { - left = curleft; - width = luckysheet.chartparam.luckysheet_chart_point_config.left - curleft; - } - else if (luckysheet.chartparam.luckysheet_chart_point_config.left == curleft) { - left = curleft; - width = luckysheet.chartparam.luckysheet_chart_point_config.left - curleft; - } - else { - left = luckysheet.chartparam.luckysheet_chart_point_config.left; - width = curleft - luckysheet.chartparam.luckysheet_chart_point_config.left - 1; - } - - for (var i = 0; i < luckysheet.chartparam.luckysheet_chart_point_config.objectIndicator.length; i++) { - var obj = luckysheet.chartparam.luckysheet_chart_point_config.objectIndicator[i]; - if (!(((obj.left + obj.width + $container.scrollLeft()) <= left || (obj.top + obj.height + $container.scrollTop()) <= top) || ((obj.left + $container.scrollLeft()) >= (left + width) || (obj.top + $container.scrollTop()) >= (top + height)))) { - if (obj.isselected) { - obj.item.removeClass("luckysheet-chart-point-searchitem-active"); - } - else { - obj.item.addClass("luckysheet-chart-point-searchitem-active"); - } - } - else { - if (!obj.isselected) { - obj.item.removeClass("luckysheet-chart-point-searchitem-active"); - } - } - } - - $("#luckysheet-chart-point-selectedhelp").css({ "left": left, "width": width, "top": top, "height": height }); - } - else if (luckysheet_sheet_move_status) { - var scrollLeft = $("#luckysheet-sheet-container-c").scrollLeft(); - var x = event.pageX + scrollLeft; - - if (Math.abs(event.pageX - luckysheet_sheet_move_data.pageX) < 3) { - return; - } - - var winW = $("#luckysheet-sheet-container").width(); - var left = x - luckysheet_sheet_move_data.curleft - $("#luckysheet-sheet-container").offset().left; - luckysheet_sheet_move_data.activeobject.css({ "left": left }); - var row_index = luckysheet_searcharray(luckysheet_sheet_move_data.widthlist, left + luckysheet_sheet_move_data.curleft); - luckysheet_sheet_move_data.cursorobject.css({ "cursor": "move" }); - - if (left - scrollLeft <= 6) { - $("#luckysheet-sheets-leftscroll").click(); - } - - if (left - scrollLeft >= winW - 40) { - $("#luckysheet-sheets-rightscroll").click(); - } - - if (row_index != luckysheet_sheet_move_data.curindex) { - if (row_index == -1 && left > 0) { - row_index = luckysheet_sheet_move_data.widthlist.length - 1; - $("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(row_index)); - } - else if (row_index == -1 && left <= 0) { - $("#luckysheet-sheets-item-clone").insertBefore($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(0)); - } - else { - $("#luckysheet-sheets-item-clone").insertAfter($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").eq(row_index)); - } - - luckysheet_sheet_move_data.widthlist = []; - //luckysheet_sheet_move_data.curleft = x; - $("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function (i) { - if (i == 0) { - luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())); - } - else { - luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth()) + luckysheet_sheet_move_data.widthlist[i - 1]); - } - }); - - luckysheet_sheet_move_data.curindex = $("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").index($("#luckysheet-sheets-item-clone")); - } - } - else if (luckysheet_model_move_state) { - var scrollTop = $(document).scrollTop(), scrollLeft = $(document).scrollLeft(); - var y = event.pageY + scrollTop, x = event.pageX + scrollLeft; - var winH = $(window).height(), winW = $(window).width(); - var myh = luckysheet_model_move_obj.height(), myw = luckysheet_model_move_obj.width(); - var top = y - luckysheet_model_xy[1], left = x - luckysheet_model_xy[0]; - - if (top < 0) { - top = 0; - } - - if (top + myh + 62 > winH) { - top = winH - myh - 62; - } - - if (left < 0) { - left = 0; - } - - if (left + myw + 86 > winW) { - left = winW - myw - 86; - } - - luckysheet_model_move_obj.css({ "top": top, "left": left }); - event.preventDefault(); - } - else if (!!luckysheet_scroll_status || !!luckysheet_select_status || !!luckysheet_rows_selected_status || !!luckysheet_cols_selected_status || !!luckysheet_cell_selected_move || !!luckysheet_cell_selected_move || !!luckysheet_cell_selected_extend || !!luckysheet_cols_change_size || !!luckysheet_rows_change_size || !!luckysheet.chartparam.luckysheetCurrentChartMove || !!luckysheet.chartparam.luckysheetCurrentChartResize || !!luckysheet.formula.rangeResize || !!luckysheet.formula.rangeMove) { - if (luckysheet_select_status) { - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - } - - jfautoscrollTimeout = setInterval(function () { - if (luckysheet_scroll_status && !luckysheet_cols_change_size && !luckysheet_rows_change_size) { - var mouse = mouseposition(event.pageX, event.pageY); - var left = $("#luckysheet-scrollbar-x").scrollLeft(), top = $("#luckysheet-scrollbar-y").scrollTop(); - var x = mouse[0]; - var y = mouse[1]; - var winH = $("#luckysheet-cell-main").height() - 20, winW = $("#luckysheet-cell-main").width() - 60; - - if (y < 0 || y > winH) { - var stop; - if (y < 0) { - stop = top + y/2; - } - else { - stop = top + (y - winH)/2; - } - $("#luckysheet-scrollbar-y").scrollTop(stop); - } - - if (x < 0 || x > winW) { - var sleft; - if (x < 0) { - sleft = left + x/2; - } - else { - sleft = left + (x - winW)/2; - } - $("#luckysheet-scrollbar-x").scrollLeft(sleft); - } - } - if (luckysheet_select_status) { - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - last["top_move"] = top; - last["height_move"] = height; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - - luckysheet.selectHightlightShow(); - - luckysheet.freezen.scrollFreezen(); - - $("#luckysheet-helpbox-cell").text(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save[luckysheet_select_save.length - 1])); - - //交替颜色选择范围 - if($("#luckysheet-alternateformat-rangeDialog").is(":visible")){ - $("#luckysheet-alternateformat-rangeDialog input").val(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save[luckysheet_select_save.length - 1])); - } - - if (luckysheet.chartparam.luckysheet_chart_data_select_state) { - $("#luckysheet-datavisual-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][0]) + (luckysheet_select_save[0]["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][1]) + (luckysheet_select_save[0]["row"][1] + 1)); - } - - if (luckysheet.pivotTable.luckysheet_pivotTable_select_state) { - $("#luckysheet-pivotTable-range-selection-input").val(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].name + "!" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][0]) + (luckysheet_select_save[0]["row"][0] + 1) + ":" + luckysheet.luckysheetchatatABC(luckysheet_select_save[0]["column"][1]) + (luckysheet_select_save[0]["row"][1] + 1)); - } - } - else if(luckysheet.conditionformat.selectStatus){ - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var last = luckysheet.conditionformat.selectRange[luckysheet.conditionformat.selectRange.length - 1]; - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - last["row"] = rowseleted; - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - last["top_move"] = top; - last["height_move"] = height; - - luckysheet.conditionformat.selectRange[luckysheet.conditionformat.selectRange.length - 1] = last; - - luckysheet.selectionCopyShow(luckysheet.conditionformat.selectRange); - - var range = luckysheet.conditionformat.getTxtByRange(luckysheet.conditionformat.selectRange); - $("#luckysheet-multiRange-dialog input").val(range); - } - else if (luckysheet.formula.rangestart) { - luckysheet.formula.rangedrag(event); - } - else if (luckysheet.formula.rangedrag_row_start) { - luckysheet.formula.rangedrag_row(event); - } - else if (luckysheet.formula.rangedrag_column_start) { - luckysheet.formula.rangedrag_column(event); - } - else if (luckysheet_rows_selected_status) { - var mouse = mouseposition(event.pageX, event.pageY); - var y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); - if (y < 0) { - return false; - } - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var col_index = visibledatacolumn.length - 1, col = visibledatacolumn[col_index], col_pre = 0; - - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - // var changeparam = luckysheet.menuButton.mergeMoveMain([0, col_index], rowseleted, last, top, height, col_pre, col); - // if(changeparam != null){ - // //columnseleted = changeparam[0]; - // rowseleted= changeparam[1]; - // top = changeparam[2]; - // height = changeparam[3]; - // //left = changeparam[4]; - // //width = changeparam[5]; - // } - - last["row"] = rowseleted; - - last["top_move"] = top; - last["height_move"] = height; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - - luckysheet.selectHightlightShow(); - - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - //event.preventDefault(); - } - else if (luckysheet_cols_selected_status) { - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cols-h-c").scrollLeft(); - if (x < 0) { - return false; - } - - var row_index = visibledatarow.length - 1, row = visibledatarow[row_index], row_pre = 0; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - // var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, [0, row_index], last, row_pre, row, left, width); - // if(changeparam != null){ - // columnseleted = changeparam[0]; - // //rowseleted= changeparam[1]; - // //top = changeparam[2]; - // //height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - // } - - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - - luckysheet.selectHightlightShow(); - - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - //event.preventDefault(); - } - else if (luckysheet_cell_selected_move) { - var mouse = mouseposition(event.pageX, event.pageY); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var winH = $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, winW = $(window).width() + scrollLeft; - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var row_index_original = luckysheet_cell_selected_move_index[0], col_index_original = luckysheet_cell_selected_move_index[1]; - - var row_s = luckysheet_select_save[0]["row"][0] - row_index_original + row_index, row_e = luckysheet_select_save[0]["row"][1] - row_index_original + row_index; - - var col_s = luckysheet_select_save[0]["column"][0] - col_index_original + col_index, col_e = luckysheet_select_save[0]["column"][1] - col_index_original + col_index; - - if (row_s < 0 || y < 0) { - row_s = 0; - row_e = luckysheet_select_save[0]["row"][1] - luckysheet_select_save[0]["row"][0]; - } - - if (col_s < 0 || x < 0) { - col_s = 0; - col_e = luckysheet_select_save[0]["column"][1] - luckysheet_select_save[0]["column"][0]; - } - - if (row_e >= visibledatarow[visibledatarow.length - 1] || y > winH) { - row_s = visibledatarow.length - 1 - luckysheet_select_save[0]["row"][1] + luckysheet_select_save[0]["row"][0]; - row_e = visibledatarow.length - 1; - } - - if (col_e >= visibledatacolumn[visibledatacolumn.length - 1] || x > winW) { - col_s = visibledatacolumn.length - 1 - luckysheet_select_save[0]["column"][1] + luckysheet_select_save[0]["column"][0]; - col_e = visibledatacolumn.length - 1; - } - - var col_pre = col_s - 1 == -1 ? 0 : visibledatacolumn[col_s - 1], col = visibledatacolumn[col_e]; - var row_pre = row_s - 1 == -1 ? 0 : visibledatarow[row_s - 1], row = visibledatarow[row_e]; - - $("#luckysheet-cell-selected-move").css({ "left": col_pre, "width": col - col_pre - 2, "top": row_pre, "height": row - row_pre - 2, "display": "block" }); - //clearTimeout(jfcountfuncTimeout); - //jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - //event.preventDefault(); - } - else if (luckysheet_cell_selected_extend) { - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft() - 5; - var scrollTop = $("#luckysheet-cell-main").scrollTop() - 5; - - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var winH = $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, winW = $(window).width() + scrollLeft; - - /* if (x < 0 || y < 0) { - return; - }*/ - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var row_index_original = luckysheet_cell_selected_extend_index[0], col_index_original = luckysheet_cell_selected_extend_index[1]; - - var row_s = luckysheet_select_save[0]["row"][0], row_e = luckysheet_select_save[0]["row"][1]; - var col_s = luckysheet_select_save[0]["column"][0], col_e = luckysheet_select_save[0]["column"][1]; - - if (row_s < 0 || y < 0) { - row_s = 0; - row_e = luckysheet_select_save[0]["row"][1] - luckysheet_select_save[0]["row"][0]; - } - - if (col_s < 0 || x < 0) { - col_s = 0; - col_e = luckysheet_select_save[0]["column"][1] - luckysheet_select_save[0]["column"][0]; - } - - if (row_e >= visibledatarow[visibledatarow.length - 1] || y > winH) { - row_s = visibledatarow.length - 1 - luckysheet_select_save[0]["row"][1] + luckysheet_select_save[0]["row"][0]; - row_e = visibledatarow.length - 1; - } - - if (col_e >= visibledatacolumn[visibledatacolumn.length - 1] || x > winW) { - col_s = visibledatacolumn.length - 1 - luckysheet_select_save[0]["column"][1] + luckysheet_select_save[0]["column"][0]; - col_e = visibledatacolumn.length - 1; - } - - var top = luckysheet_select_save[0].top_move, height = luckysheet_select_save[0].height_move; - var left = luckysheet_select_save[0].left_move, width = luckysheet_select_save[0].width_move; - - if (Math.abs(row_index_original - row_index) > Math.abs(col_index_original - col_index)) { - if (!(row_index >= row_s && row_index <= row_e)) { - if (luckysheet_select_save[0].top_move >= row_pre) { - top = row_pre; - height = luckysheet_select_save[0].top_move + luckysheet_select_save[0].height_move - row_pre; - } - else { - top = luckysheet_select_save[0].top_move; - height = row - luckysheet_select_save[0].top_move - 1; - } - } - } - else { - if (!(col_index >= col_s && col_index <= col_e)) { - if (luckysheet_select_save[0].left_move >= col_pre) { - left = col_pre; - width = luckysheet_select_save[0].left_move + luckysheet_select_save[0].width_move - col_pre; - } - else { - left = luckysheet_select_save[0].left_move; - width = col - luckysheet_select_save[0].left_move - 1; - } - } - } - - $("#luckysheet-cell-selected-extend").css({ "left": left, "width": width, "top": top, "height": height, "display": "block" }); - //event.preventDefault(); - } - else if (luckysheet_cols_change_size) { - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); - var x = mouse[0] + scrollLeft; - var winW = $(window).width(); - - var row_index = visibledatarow.length - 1, row = visibledatarow[row_index], row_pre = 0; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - if(luckysheetConfigsetting.pointEdit){//编辑器qksheet表格编辑状态 - if ((x + 3) / luckysheetConfigsetting.pointEditZoom - luckysheet_cols_change_size_start[0] > 30 && x / luckysheetConfigsetting.pointEditZoom < winW + scrollLeft - 100) { - $("#luckysheet-change-size-line").css({ "left": x / luckysheetConfigsetting.pointEditZoom }); - $("#luckysheet-cols-change-size").css({ "left": (x - 2) / luckysheetConfigsetting.pointEditZoom }); - } - } - else{ - if ((x + 3) - luckysheet_cols_change_size_start[0] > 30 && x < winW + scrollLeft - 100) { - $("#luckysheet-change-size-line").css({ "left": x }); - $("#luckysheet-cols-change-size").css({ "left": x - 2 }); - } - } - //event.preventDefault(); - } - else if (luckysheet_rows_change_size) { - var mouse = mouseposition(event.pageX, event.pageY); - var scrollTop = $("#luckysheet-rows-h").scrollTop(); - var y = mouse[1] + scrollTop; - var winH = $(window).height(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - if(luckysheetConfigsetting.pointEdit){//编辑器qksheet表格编辑状态 - if ((y + 3) / luckysheetConfigsetting.pointEditZoom - luckysheet_rows_change_size_start[0] > 19 && y / luckysheetConfigsetting.pointEditZoom < winH + scrollTop - 200) { - $("#luckysheet-change-size-line").css({ "top": y / luckysheetConfigsetting.pointEditZoom }); - $("#luckysheet-rows-change-size").css({ "top": y / luckysheetConfigsetting.pointEditZoom }); - } - } - else{ - if ((y + 3) - luckysheet_rows_change_size_start[0] > 19 && y < winH + scrollTop - 200) { - $("#luckysheet-change-size-line").css({ "top": y }); - $("#luckysheet-rows-change-size").css({ "top": y }); - } - } - //event.preventDefault(); - } - else if (luckysheet.chartparam.luckysheetCurrentChartMove) { - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - // var scrollTop = $("#luckysheet-cell-main").scrollTop(), scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - // var y = event.pageY + scrollTop, x = event.pageX + scrollLeft; - - var myh = luckysheet.chartparam.luckysheetCurrentChartMoveObj.height(), myw = luckysheet.chartparam.luckysheetCurrentChartMoveObj.width(); - var top = y - luckysheet.chartparam.luckysheetCurrentChartMoveXy[1], left = x - luckysheet.chartparam.luckysheetCurrentChartMoveXy[0]; - - if (top < 0) { - top = 0; - } - - if (top + myh + 42 + 6 > luckysheet.chartparam.luckysheetCurrentChartMoveWinH) { - top = luckysheet.chartparam.luckysheetCurrentChartMoveWinH - myh - 42 - 6; - } - - if (left < 0) { - left = 0; - } - - if (left + myw + 22 + 36 > luckysheet.chartparam.luckysheetCurrentChartMoveWinW) { - left = luckysheet.chartparam.luckysheetCurrentChartMoveWinW - myw - 22 - 36; - } - - luckysheet.chartparam.luckysheetCurrentChartMoveObj.css({ "top": top, "left": left }); - - if(luckysheet.freezen.freezenhorizontaldata != null || luckysheet.freezen.freezenverticaldata != null){ - luckysheet.freezen.scrollAdapt(); - - var toffset = luckysheet.chartparam.luckysheetCurrentChartMoveObj.offset(); - var tpsition = luckysheet.chartparam.luckysheetCurrentChartMoveObj.position(); - luckysheet.chartparam.luckysheetCurrentChartMoveXy = [event.pageX - toffset.left, event.pageY - toffset.top, tpsition.left, tpsition.top, $("#luckysheet-scrollbar-x").scrollLeft(), $("#luckysheet-scrollbar-y").scrollTop()]; - } - //event.preventDefault(); - } - else if (!!luckysheet.chartparam.luckysheetCurrentChartResize) { - var scrollTop = $("#luckysheet-cell-main").scrollTop(), scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - if (x < 0 || y < 0) { - return false; - } - - var myh = luckysheet.chartparam.luckysheetCurrentChartResizeObj.height(), myw = luckysheet.chartparam.luckysheetCurrentChartResizeObj.width(); - var topchange = y - luckysheet.chartparam.luckysheetCurrentChartResizeXy[1], leftchange = x - luckysheet.chartparam.luckysheetCurrentChartResizeXy[0]; - - var top = luckysheet.chartparam.luckysheetCurrentChartResizeXy[5], height = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3], left = luckysheet.chartparam.luckysheetCurrentChartResizeXy[4], width = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2]; - - if (luckysheet.chartparam.luckysheetCurrentChartResize == "lm" || luckysheet.chartparam.luckysheetCurrentChartResize == "lt" || luckysheet.chartparam.luckysheetCurrentChartResize == "lb") { - left = x; - width = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] - leftchange; - if (left > luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[4] - 60) { - left = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[4] - 60; - width = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] - (luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[4] - 60 - luckysheet.chartparam.luckysheetCurrentChartResizeXy[0]); - } - else if (left <= 0) { - left = 0; - width = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[0]; - } - } - - if (luckysheet.chartparam.luckysheetCurrentChartResize == "rm" || luckysheet.chartparam.luckysheetCurrentChartResize == "rt" || luckysheet.chartparam.luckysheetCurrentChartResize == "rb") { - width = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2] + leftchange; - if (width < 60) { - width = 60; - } - else if (width >= luckysheet.chartparam.luckysheetCurrentChartResizeWinW - luckysheet.chartparam.luckysheetCurrentChartResizeXy[4] - 22 - 36) { - width = luckysheet.chartparam.luckysheetCurrentChartResizeWinW - luckysheet.chartparam.luckysheetCurrentChartResizeXy[4] - 22 - 36; - } - } - - if (luckysheet.chartparam.luckysheetCurrentChartResize == "mt" || luckysheet.chartparam.luckysheetCurrentChartResize == "lt" || luckysheet.chartparam.luckysheetCurrentChartResize == "rt") { - top = y; - height = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] - topchange; - if (top > luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[5] - 60) { - top = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[5] - 60; - height = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] - (luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[5] - 60 - luckysheet.chartparam.luckysheetCurrentChartResizeXy[1]); - } - else if (top <= 0) { - top = 0; - height = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] + luckysheet.chartparam.luckysheetCurrentChartResizeXy[1]; - } - } - - if (luckysheet.chartparam.luckysheetCurrentChartResize == "mb" || luckysheet.chartparam.luckysheetCurrentChartResize == "lb" || luckysheet.chartparam.luckysheetCurrentChartResize == "rb") { - height = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3] + topchange; - if (height < 60) { - height = 60; - } - else if (height >= luckysheet.chartparam.luckysheetCurrentChartResizeWinH - luckysheet.chartparam.luckysheetCurrentChartResizeXy[5] - 42 - 6) { - height = luckysheet.chartparam.luckysheetCurrentChartResizeWinH - luckysheet.chartparam.luckysheetCurrentChartResizeXy[5] - 42 - 6; - } - } - - //if (top < 0) { - // top = 0; - //} - - //if (top + myh > luckysheet.chartparam.luckysheetCurrentChartResizeWinH) { - // top = luckysheet.chartparam.luckysheetCurrentChartResizeWinH - myh; - //} - - //if (left < 0) { - // left = 0; - //} - - //if (left + myw > luckysheet.chartparam.luckysheetCurrentChartResizeWinW) { - // left = luckysheet.chartparam.luckysheetCurrentChartResizeWinW - myw; - //} - - var resizedata = { "top": top, "left": left, "height": height, "width": width }; - luckysheet.chartparam.luckysheetCurrentChartResizeObj.css(resizedata); - //echarts.getInstanceById(luckysheet.chartparam.luckysheetCurrentChartResizeObj.find(".luckysheet-modal-dialog-content").attr("_echarts_instance_")).resize(); - !!window.generator && generator.resize(luckysheet.chartparam.luckysheetcurrentChart); - //event.preventDefault(); - } - else if (luckysheet.postil.move){ - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - var myh = luckysheet.postil.currentObj.outerHeight(), - myw = luckysheet.postil.currentObj.outerWidth(); - - var top = y - luckysheet.postil.moveXY[1], left = x - luckysheet.postil.moveXY[0]; - - if (top < 0) { - top = 0; - } - - if (top + myh + 42 + 6 > luckysheet.postil.currentWinH) { - top = luckysheet.postil.currentWinH - myh - 42 - 6; - } - - if (left < 0) { - left = 0; - } - - if (left + myw + 22 + 36 > luckysheet.postil.currentWinW) { - left = luckysheet.postil.currentWinW - myw - 22 - 36; - } - - luckysheet.postil.currentObj.css({ "left": left, "top": top }); - } - else if (!!luckysheet.postil.resize){ - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - if (x < 0 || y < 0) { - return false; - } - - var topchange = y - luckysheet.postil.resizeXY[1], - leftchange = x - luckysheet.postil.resizeXY[0]; - - var top = luckysheet.postil.resizeXY[5], - height = luckysheet.postil.resizeXY[3], - left = luckysheet.postil.resizeXY[4], - width = luckysheet.postil.resizeXY[2]; - - if(luckysheet.postil.resize == "lm" || luckysheet.postil.resize == "lt" || luckysheet.postil.resize == "lb"){ - left = x; - width = luckysheet.postil.resizeXY[2] - leftchange; - - if(left > luckysheet.postil.resizeXY[2] + luckysheet.postil.resizeXY[4] - 60){ - left = luckysheet.postil.resizeXY[2] + luckysheet.postil.resizeXY[4] - 60; - width = luckysheet.postil.resizeXY[2] - (luckysheet.postil.resizeXY[2] + luckysheet.postil.resizeXY[4] - 60 - luckysheet.postil.resizeXY[0]); - } - else if(left <= 0){ - left = 0; - width = luckysheet.postil.resizeXY[2] + luckysheet.postil.resizeXY[0]; - } - } - - if(luckysheet.postil.resize == "rm" || luckysheet.postil.resize == "rt" || luckysheet.postil.resize == "rb"){ - width = luckysheet.postil.resizeXY[2] + leftchange; - - if(width < 60){ - width = 60; - } - else if(width >= luckysheet.postil.currentWinW - luckysheet.postil.resizeXY[4] - 22 - 36){ - width = luckysheet.postil.currentWinW - luckysheet.postil.resizeXY[4] - 22 - 36; - } - } - - if(luckysheet.postil.resize == "mt" || luckysheet.postil.resize == "lt" || luckysheet.postil.resize == "rt"){ - top = y; - height = luckysheet.postil.resizeXY[3] - topchange; - - if(top > luckysheet.postil.resizeXY[3] + luckysheet.postil.resizeXY[5] - 60){ - top = luckysheet.postil.resizeXY[3] + luckysheet.postil.resizeXY[5] - 60; - height = luckysheet.postil.resizeXY[3] - (luckysheet.postil.resizeXY[3] + luckysheet.postil.resizeXY[5] - 60 - luckysheet.postil.resizeXY[1]); - } - else if(top <= 0){ - top = 0; - height = luckysheet.postil.resizeXY[3] + luckysheet.postil.resizeXY[1]; - } - } - - if(luckysheet.postil.resize == "mb" || luckysheet.postil.resize == "lb" || luckysheet.postil.resize == "rb"){ - height = luckysheet.postil.resizeXY[3] + topchange; - - if(height < 60){ - height = 60; - } - else if(height >= luckysheet.postil.currentWinH - luckysheet.postil.resizeXY[5] - 42 - 6){ - height = luckysheet.postil.currentWinH - luckysheet.postil.resizeXY[5] - 42 - 6; - } - } - - luckysheet.postil.currentObj.css({ "width": width, "height": height, "left": left, "top": top }); - } - else if (!!luckysheet.formula.rangeResize) { - luckysheet.formula.rangeResizeDraging(event, luckysheet.formula.rangeResizeObj, luckysheet.formula.rangeResizexy, luckysheet.formula.rangeResize, luckysheet.formula.rangeResizeWinW, luckysheet.formula.rangeResizeWinH, ch_width, rh_height); - } - else if (!!luckysheet.formula.rangeMove) { - luckysheet.formula.rangeMoveDraging(event, luckysheet.formula.rangeMovexy, luckysheet.formula.rangeMoveObj.data("range"), luckysheet.formula.rangeMoveObj, sheetBarHeight, statisticBarHeight); - } - else if (!!luckysheet.chart_selection.rangeResize) { - luckysheet.chart_selection.rangeResizeDraging(event, sheetBarHeight, statisticBarHeight); - } - else if (!!luckysheet.chart_selection.rangeMove) { - luckysheet.chart_selection.rangeMoveDraging(event, sheetBarHeight, statisticBarHeight); - } - }, 1); - } - }); - - $(document).mouseup(function (event) { - //数据窗格主体 - - if (luckysheet_select_status) { - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function(){ - jfcountfunc(); - }, 0); - - //格式刷 - if(luckysheet.menuButton.luckysheetPaintModelOn){ - luckysheet.selection.pasteHandlerOfPaintModel(luckysheet_copy_save); - - if(luckysheet.menuButton.luckysheetPaintSingle){ - //单次 格式刷 - luckysheet.menuButton.cancelPaintModel(); - } - } - } - - //$("#text-select").remove(); - - luckysheet_select_status = false; - clearTimeout(jfautoscrollTimeout); - luckysheet_scroll_status = false; - - $("#luckysheet-cell-selected").find(".luckysheet-cs-fillhandle").css("cursor","crosshair").end().find(".luckysheet-cs-draghandle").css("cursor","move"); - $("#luckysheet-cell-main, #luckysheetTableContent, #luckysheet-sheettable_0").css("cursor","default"); - - //行标题窗格主体 - luckysheet_rows_selected_status = false; - - //列标题窗格主体 - luckysheet_cols_selected_status = false; - - luckysheet_model_move_state = false; - - // if (luckysheetautoadjustmousedown == 1) { - // //luckysheet.luckysheetscrollevent(true); - // luckysheetautoadjustmousedown = 2; - // } - - if(luckysheet.formula.functionResizeStatus){ - luckysheet.formula.functionResizeStatus = false; - $("#luckysheet-wa-calculate-size").removeAttr("style"); - } - - - if (!!luckysheet.freezen.horizontalmovestate) { - luckysheet.freezen.horizontalmovestate = false; - $("#luckysheet-freezebar-horizontal").removeClass("luckysheet-freezebar-active"); - $("#luckysheet-freezebar-horizontal").find(".luckysheet-freezebar-horizontal-handle").css("cursor", "-webkit-grab"); - if (luckysheet.freezen.freezenhorizontaldata[4] <= columeHeaderHeight) { - luckysheet.freezen.cancelFreezenHorizontal(); - } - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - if (!!luckysheet.freezen.verticalmovestate) { - luckysheet.freezen.verticalmovestate = false; - $("#luckysheet-freezebar-vertical").removeClass("luckysheet-freezebar-active"); - $("#luckysheet-freezebar-vertical").find(".luckysheet-freezebar-vertical-handle").css("cursor", "-webkit-grab"); - if (luckysheet.freezen.freezenverticaldata[4] <= rowHeaderWidth) { - luckysheet.freezen.cancelFreezenVertical(); - } - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - if (!!luckysheet.pivotTable && luckysheet.pivotTable.movestate) { - $("#luckysheet-modal-dialog-slider-pivot-move").remove(); - luckysheet.pivotTable.movestate = false; - $("#luckysheet-modal-dialog-pivotTable-list, #luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").css("cursor", "default"); - if (luckysheet.pivotTable.movesave.containerid != "luckysheet-modal-dialog-pivotTable-list") { - var $cur = $(event.target).closest(".luckysheet-modal-dialog-slider-config-list"); - if ($cur.length == 0) { - if (luckysheet.pivotTable.movesave.containerid == "luckysheet-modal-dialog-config-value") { - luckysheet.pivotTable.resetOrderby(luckysheet.pivotTable.movesave.obj); - } - luckysheet.pivotTable.movesave.obj.remove(); - luckysheet.pivotTable.showvaluecolrow(); - $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { - $(this).find(".luckysheet-slider-list-item-selected").find("i").remove(); - }); - - $("#luckysheet-modal-dialog-config-filter, #luckysheet-modal-dialog-config-row, #luckysheet-modal-dialog-config-column, #luckysheet-modal-dialog-config-value").find(".luckysheet-modal-dialog-slider-config-item").each(function () { - var index = $(this).data("index"); - - $("#luckysheet-modal-dialog-pivotTable-list").find(".luckysheet-modal-dialog-slider-list-item").each(function () { - var $seleted = $(this).find(".luckysheet-slider-list-item-selected"); - if ($(this).data("index") == index && $seleted.find("i").length == 0) { - $seleted.append(''); - } - }); - - }); - luckysheet.pivotTable.refreshPivotTable(); - } - } - } - - if (!!luckysheet.chartparam.luckysheet_chart_point_config && luckysheet.chartparam.luckysheet_chart_point_config.movestart) { - clearTimeout(luckysheet.chartparam.luckysheet_chart_point_config.lagTimeoutclick); - luckysheet.chartparam.luckysheet_chart_point_config.mouseupdone = true; - luckysheet.chartparam.luckysheet_chart_point_config.movestart = false; - - $("#luckysheet-chart-point-selectedhelp").hide(); - - luckysheet.chartparam.luckysheet_chart_point_config.objectIndicator = []; - luckysheet.chartparam.luckysheet_chart_point_config.changeindex = []; - - var dataOpt = null, initialpointset = true; - var currentOpt = luckysheet.chartparam.luckysheet_chart_point_config.pointchart.getOption(); - $("#luckysheet-chart-point-config .luckysheet-chart-point-searchitem-c").find(".luckysheet-chart-point-searchitem-active").each(function () { - luckysheet.chartparam.luckysheet_chart_point_config.changeindex.push($(this).data("index")); - - var dataOpt1 = currentOpt.series[0].data[$(this).data("index")]; - if (initialpointset && !(dataOpt1 instanceof Array)) { - initialpointset = false; - dataOpt = dataOpt1; - } - }); - - luckysheet.luckysheetactivepointconfig(currentOpt, dataOpt); - //var data = luckysheet.chartparam.luckysheet_chart_point_config.pointchart.series[0].data[luckysheet.chartparam.luckysheet_chart_point_config.changeindex[0]] - } - - if (luckysheet_sheet_move_status) { - luckysheet_sheet_move_status = false; - luckysheet_sheet_move_data.activeobject.insertBefore($("#luckysheet-sheets-item-clone")); - luckysheet_sheet_move_data.activeobject.removeAttr("style"); - //luckysheet_sheet_move_data.activeobject.css({ "position": "relative", "opacity": 1, "cursor": "pointer", "transition": "all 0.1s", "z-index": "initial" }); - $("#luckysheet-sheets-item-clone").remove(); - luckysheet_sheet_move_data.cursorobject.css({ "cursor": "pointer" }); - luckysheet_sheet_move_data = {}; - luckysheet.sheetmanage.reOrderAllSheet(); - } - - clearTimeout(luckysheet.chartparam.luckysheetCurrentChartMoveTimeout); - - //图表拖动 chartMix - if (luckysheet.chartparam.luckysheetCurrentChartMove) { - luckysheet.chartparam.luckysheetCurrentChartMove = false; - if (luckysheet.chartparam.luckysheetInsertChartTosheetChange) { - - //myTop, myLeft: 本次的chart框位置,scrollLeft,scrollTop: 上一次的滚动条位置 - var myTop = luckysheet.chartparam.luckysheetCurrentChartMoveObj.css("top"), myLeft = luckysheet.chartparam.luckysheetCurrentChartMoveObj.css("left"), scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - - //点击时候存储的信息,即上一次操作结束的图表信息,x,y: chart框位置,scrollLeft1,scrollTop1: 滚动条位置 - var x = luckysheet.chartparam.luckysheetCurrentChartMoveXy[2]; - var y = luckysheet.chartparam.luckysheetCurrentChartMoveXy[3]; - - var scrollLeft1 = luckysheet.chartparam.luckysheetCurrentChartMoveXy[4]; - var scrollTop1 = luckysheet.chartparam.luckysheetCurrentChartMoveXy[5]; - - var chart_id = luckysheet.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id"); - - var sheetIndex = !!window.store && store.state.chartSetting.chartList[chart_id].sheetIndex; - - //去除chartobj,改用chart_id代替即可定位到此图表 - luckysheet.jfredo.push({ "type": "moveChart", "chart_id": chart_id, "sheetIndex": sheetIndex, "myTop": myTop, "myLeft": myLeft, "scrollTop": scrollTop, "scrollLeft": scrollLeft, "x": x, "y": y, "scrollTop1": scrollTop1, "scrollLeft1": scrollLeft1 }); - - //在store中更新数据 - !!window.store && store.commit({ - type:"updateChartItem", - key:"left", - value:myLeft, - chartId:chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"top", - value:myTop, - chartId:chart_id - }); - - // luckysheet.sheetmanage.saveChart({ "chart_id": chart_id, "sheetIndex": sheetIndex, "top": myTop, "left": myLeft }); - //存储滚动条位置 - luckysheet.server.saveParam("c", sheetIndex, { "left":myLeft, "top":myTop,"scrollTop": scrollTop, "scrollLeft": scrollLeft }, { "op":"xy", "cid": chart_id}); - //协同编辑时可能影响用户操作,可以考虑不存储滚动条位置(google sheet没有存储滚动条位置) - // luckysheet.server.saveParam("c", sheetIndex, { "left":myLeft, "top":myTop }, { "op":"xy", "cid": chart_id}); - } - } - - if (!!luckysheet.formula.rangeResize) { - luckysheet.formula.rangeResizeDragged(event, luckysheet.formula.rangeResizeObj, luckysheet.formula.rangeResize, luckysheet.formula.rangeResizexy, luckysheet.formula.rangeResizeWinW, luckysheet.formula.rangeResizeWinH); - } - - - //图表改变大小 chartMix - if (!!luckysheet.chartparam.luckysheetCurrentChartResize) { - luckysheet.chartparam.luckysheetCurrentChartResize = null; - if (luckysheet.chartparam.luckysheetInsertChartTosheetChange) { - var myHeight = luckysheet.chartparam.luckysheetCurrentChartResizeObj.height(), myWidth = luckysheet.chartparam.luckysheetCurrentChartResizeObj.width(), scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - - var myTop = luckysheet.chartparam.luckysheetCurrentChartMoveObj.css("top"), - myLeft = luckysheet.chartparam.luckysheetCurrentChartMoveObj.css("left") - - - var chart_id = luckysheet.chartparam.luckysheetCurrentChartResizeObj.find(".luckysheet-modal-dialog-content").attr("id"); - var sheetIndex = !!window.store && store.state.chartSetting.chartList[chart_id].sheetIndex; - - var myWidth1 = luckysheet.chartparam.luckysheetCurrentChartResizeXy[2]; - var myHeight1 = luckysheet.chartparam.luckysheetCurrentChartResizeXy[3]; - var x = luckysheet.chartparam.luckysheetCurrentChartResizeXy[4];//增加上一次的位置x,y - var y = luckysheet.chartparam.luckysheetCurrentChartResizeXy[5]; - var scrollLeft1 = luckysheet.chartparam.luckysheetCurrentChartResizeXy[6]; - var scrollTop1 = luckysheet.chartparam.luckysheetCurrentChartResizeXy[7]; - - luckysheet.jfredo.push({ "type": "resizeChart", "chart_id": chart_id, "sheetIndex": sheetIndex,"myTop": myTop, "myLeft": myLeft, "myHeight": myHeight, "myWidth": myWidth, "scrollTop": scrollTop, "scrollLeft": scrollLeft, "x": x, "y": y, "myWidth1": myWidth1, "myHeight1": myHeight1, "scrollTop1": scrollTop1, "scrollLeft1": scrollLeft1 }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"height", - value:myHeight, - chartId:chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"width", - value:myWidth, - chartId:chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"left", - value:myLeft, - chartId:chart_id - }); - - !!window.store && store.commit({ - type:"updateChartItem", - key:"top", - value:myTop, - chartId:chart_id - }); - - //加上滚动条的位置 - // luckysheet.sheetmanage.saveChart({ "chart_id": chart_id, "sheetIndex": sheetIndex, "height": myHeight, "width": myWidth, "top": myTop, "left": myLeft, "scrollTop": scrollTop, "scrollLeft": scrollLeft }); - - luckysheet.server.saveParam("c", sheetIndex, { "width":myWidth, "height":myHeight, "top": myTop, "left": myLeft, "scrollTop": scrollTop, "scrollLeft": scrollLeft}, { "op":"wh", "cid": chart_id}); - // luckysheet.server.saveParam("c", sheetIndex, { "width":myWidth, "height":myHeight, "top": myTop, "left": myLeft }, { "op":"wh", "cid": chart_id}); - } - } - - //批注框 移动 - if (luckysheet.postil.move) { - luckysheet.postil.move = false; - - var ps_id = luckysheet.postil.currentObj.closest(".luckysheet-postil-show").attr("id"); - - var ps_r = ps_id.split("luckysheet-postil-show_")[1].split("_")[0]; - var ps_c = ps_id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var rc = []; - - d[ps_r][ps_c].ps.left = luckysheet.postil.currentObj.position().left; - d[ps_r][ps_c].ps.top = luckysheet.postil.currentObj.position().top; - d[ps_r][ps_c].ps.value = luckysheet.postil.currentObj.find(".formulaInputFocus").text(); - - rc.push(ps_r + "_" + ps_c); - - luckysheet.postil.ref(d, rc); - - $("#" + ps_id).remove(); - - if(d[ps_r][ps_c].ps.isshow){ - luckysheet.postil.buildPs(ps_r, ps_c, d[ps_r][ps_c].ps); - $("#" + ps_id).addClass("luckysheet-postil-show-active"); - $("#" + ps_id).find(".luckysheet-postil-dialog-resize").show(); - } - else{ - luckysheet.postil.editPs(ps_r, ps_c); - } - } - - //批注框 改变大小 - if (!!luckysheet.postil.resize) { - luckysheet.postil.resize = null; - - var ps_id = luckysheet.postil.currentObj.closest(".luckysheet-postil-show").attr("id"); - - var ps_r = ps_id.split("luckysheet-postil-show_")[1].split("_")[0]; - var ps_c = ps_id.split("luckysheet-postil-show_")[1].split("_")[1]; - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var rc = []; - - d[ps_r][ps_c].ps.left = luckysheet.postil.currentObj.position().left; - d[ps_r][ps_c].ps.top = luckysheet.postil.currentObj.position().top; - d[ps_r][ps_c].ps.width = luckysheet.postil.currentObj.outerWidth(); - d[ps_r][ps_c].ps.height = luckysheet.postil.currentObj.outerHeight(); - d[ps_r][ps_c].ps.value = luckysheet.postil.currentObj.find(".formulaInputFocus").text(); - - rc.push(ps_r + "_" + ps_c); - - luckysheet.postil.ref(d, rc); - - $("#" + ps_id).remove(); - - if(d[ps_r][ps_c].ps.isshow){ - luckysheet.postil.buildPs(ps_r, ps_c, d[ps_r][ps_c].ps); - $("#" + ps_id).addClass("luckysheet-postil-show-active"); - $("#" + ps_id).find(".luckysheet-postil-dialog-resize").show(); - } - else{ - luckysheet.postil.editPs(ps_r, ps_c); - } - } - - //改变行高 - if (luckysheet_rows_change_size) { - luckysheet_rows_change_size = false; - - $("#luckysheet-change-size-line").hide(); - $("#luckysheet-rows-change-size").css("opacity", 0); - $("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor", "default"); - - var mouse = mouseposition(event.pageX, event.pageY); - var scrollTop = $("#luckysheet-rows-h").scrollTop(); - var y = mouse[1] + scrollTop; - var winH = $(window).height(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - if(luckysheetConfigsetting.pointEdit){//编辑器qksheet表格编辑状态 - var size = (y + 3) / luckysheetConfigsetting.pointEditZoom - luckysheet_rows_change_size_start[0]; - - if ((y + 3) / luckysheetConfigsetting.pointEditZoom - luckysheet_rows_change_size_start[0] < 19) { - size = 19; - } - - if (y / luckysheetConfigsetting.pointEditZoom >= winH - 200 + scrollTop) { - size = winW - 200 - luckysheet_rows_change_size_start[0] + scrollTop; - } - } - else{ - var size = (y + 3) - luckysheet_rows_change_size_start[0]; - - if ((y + 3) - luckysheet_rows_change_size_start[0] < 19) { - size = 19; - } - - if (y >= winH - 200 + scrollTop) { - size = winW - 200 - luckysheet_rows_change_size_start[0] + scrollTop; - } - } - - var cfg = $.extend(true, {}, config); - if (cfg["rowlen"] == null) { - cfg["rowlen"] = {}; - } - - cfg["rowlen"][luckysheet_rows_change_size_start[1]] = Math.ceil(size); - - if (clearjfundo) { - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": "resize", - "ctrlType": "resizeR", - "config": $.extend(true, {}, config), - "curconfig": $.extend(true, {}, cfg), - "sheetIndex": luckysheet.currentSheetIndex - }); - } - - //config - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["rowlen"], { "k": "rowlen" }); - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, null); - - // if ($("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).length > 0) { - // var $t = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).find(".luckysheet-filter-options").eq(0); - // var st_r = $t.data("str"), ed_r = $t.data("edr"), cindex = $t.data("cindex"), st_c = $t.data("stc"), ed_c = $t.data("edc"); - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - // } - - //luckysheet.cleargridelement(event); - } - - //改变列宽 - if (luckysheet_cols_change_size) { - luckysheet_cols_change_size = false; - - $("#luckysheet-change-size-line").hide(); - $("#luckysheet-cols-change-size").css("opacity", 0); - $("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor", "default"); - - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); - var x = mouse[0] + scrollLeft; - var winW = $(window).width(); - - var row_index = visibledatarow.length - 1, row = visibledatarow[row_index], row_pre = 0; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - if(luckysheetConfigsetting.pointEdit){//编辑器qksheet表格编辑状态 - var size = (x + 3) / luckysheetConfigsetting.pointEditZoom - luckysheet_cols_change_size_start[0]; - } - else{ - var size = (x + 3) - luckysheet_cols_change_size_start[0]; - } - - var firstcolumlen = defaultcollen; - if (config["columlen"] != null && config["columlen"][luckysheet_cols_change_size_start[1]] != null) { - firstcolumlen = config["columlen"][luckysheet_cols_change_size_start[1]]; - } - - if (Math.abs(size - firstcolumlen) < 3) { - return; - } - - if(luckysheetConfigsetting.pointEdit){//编辑器qksheet表格编辑状态 - if ((x + 3) / luckysheetConfigsetting.pointEditZoom - luckysheet_cols_change_size_start[0] < 30) { - size = 30; - } - - if (x / luckysheetConfigsetting.pointEditZoom >= winW - 100 + scrollLeft) { - size = winW - 100 - luckysheet_cols_change_size_start[0] + scrollLeft; - } - } - else{ - if ((x + 3) - luckysheet_cols_change_size_start[0] < 30) { - size = 30; - } - - if (x >= winW - 100 + scrollLeft) { - size = winW - 100 - luckysheet_cols_change_size_start[0] + scrollLeft; - } - } - - var cfg = $.extend(true, {}, config); - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; - } - - cfg["columlen"][luckysheet_cols_change_size_start[1]] = Math.ceil(size); - - if (clearjfundo) { - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": "resize", - "ctrlType": "resizeC", - "config": $.extend(true, {}, config), - "curconfig": $.extend(true, {}, cfg), - "sheetIndex": luckysheet.currentSheetIndex - }); - } - - //config - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["columlen"], { "k": "columlen" }); - - luckysheet.jfrefreshgrid_rhcw(null, luckysheet.flowdata[0].length); - - // if ($("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).length > 0) { - // var $t = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).find(".luckysheet-filter-options").eq(0); - // var st_r = $t.data("str"), ed_r = $t.data("edr"), cindex = $t.data("cindex"), st_c = $t.data("stc"), ed_c = $t.data("edc"); - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - // } - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - //luckysheet.cleargridelement(event); - } - - if (luckysheet.formula.rangeMove) { - luckysheet.formula.rangeMoveDragged(luckysheet.formula.rangeMoveObj); - } - - //改变选择框的位置并替换目标单元格 - if (luckysheet_cell_selected_move) { - $("#luckysheet-cell-selected-move").hide(); - - luckysheet_cell_selected_move = false; - var mouse = mouseposition(event.pageX, event.pageY); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - - var winH = $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, winW = $(window).width() + scrollLeft; - - var rowLocation = luckysheet.rowLocation(y), row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col_index = colLocation[2]; - - var row_index_original = luckysheet_cell_selected_move_index[0], col_index_original = luckysheet_cell_selected_move_index[1]; - - if(row_index == row_index_original && col_index == col_index_original){ - return; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var data = luckysheet.getdatabyselection(last); - - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - //选区包含部分单元格 - if(luckysheet.hasPartMC(cfg, last["row"][0], last["row"][1], last["column"][0], last["column"][1])){ - if(luckysheet.isEditMode()){ - alert("无法对合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info('提示',"无法对合并单元格执行此操作"); - } - return; - } - - var row_s = last["row"][0] - row_index_original + row_index, row_e = last["row"][1] - row_index_original + row_index; - var col_s = last["column"][0] - col_index_original + col_index, col_e = last["column"][1] - col_index_original + col_index; - - if (row_s < 0 || y < 0) { - row_s = 0; - row_e = last["row"][1] - last["row"][0]; - } - - if (col_s < 0 || x < 0) { - col_s = 0; - col_e = last["column"][1] - last["column"][0]; - } - - if (row_e >= visibledatarow[visibledatarow.length - 1] || y > winH) { - row_s = visibledatarow.length - 1 - last["row"][1] + last["row"][0]; - row_e = visibledatarow.length - 1; - } - - if (col_e >= visibledatacolumn[visibledatacolumn.length - 1] || x > winW) { - col_s = visibledatacolumn.length - 1 - last["column"][1] + last["column"][0]; - col_e = visibledatacolumn.length - 1; - } - - //替换的位置包含部分单元格 - if(luckysheet.hasPartMC(cfg, row_s, row_e, col_s, col_e)){ - if(luckysheet.isEditMode()){ - alert("无法对合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info('提示',"无法对合并单元格执行此操作"); - } - return; - } - - var borderInfoCompute = luckysheet.getBorderInfoCompute(luckysheet.currentSheetIndex); - - - //删除原本位置的数据 - var RowlChange = null; - for (var r = last["row"][0]; r <= last["row"][1]; r++) { - if(r in cfg["rowlen"]){ - RowlChange = true; - } - - for (var c = last["column"][0]; c <= last["column"][1]; c++) { - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - if((cell["mc"].r + "_" + cell["mc"].c) in cfg["merge"]){ - delete cfg["merge"][cell["mc"].r + "_" + cell["mc"].c]; - } - } - - d[r][c] = null; - } - } - - //边框 - if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ - var borderInfo = []; - - for(var i = 0; i < cfg["borderInfo"].length; i++){ - var bd_rangeType = cfg["borderInfo"][i].rangeType; - - if(bd_rangeType == "range"){ - var bd_range = cfg["borderInfo"][i].range; - var bd_emptyRange = []; - - for(var j = 0; j < bd_range.length; j++){ - bd_emptyRange = bd_emptyRange.concat(luckysheet.conditionformat.CFSplitRange(bd_range[j], {"row": last["row"], "column": last["column"]}, {"row": [row_s, row_e], "column": [col_s, col_e]}, "restPart")); - } - - cfg["borderInfo"][i].range = bd_emptyRange; - - borderInfo.push(cfg["borderInfo"][i]); - } - else if(bd_rangeType == "cell"){ - var bd_r = cfg["borderInfo"][i].value.row_index; - var bd_c = cfg["borderInfo"][i].value.col_index; - - if(!(bd_r >= last["row"][0] && bd_r <= last["row"][1] && bd_c >= last["column"][0] && bd_c <= last["column"][1])){ - borderInfo.push(cfg["borderInfo"][i]); - } - } - } - - cfg["borderInfo"] = borderInfo; - } - - //替换位置数据更新 - var offsetMC = {}; - for (var r = 0; r < data.length; r++) { - for (var c = 0; c < data[0].length; c++) { - if(borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])]){ - var bd_obj = { - "rangeType": "cell", - "value": { - "row_index": r + row_s, - "col_index": c + col_s, - "l": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].l, - "r": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].r, - "t": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].t, - "b": borderInfoCompute[(r + last["row"][0]) + "_" + (c + last["column"][0])].b - } - } - - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - cfg["borderInfo"].push(bd_obj); - } - - var value = ""; - if (data[r] != null && data[r][c] != null) { - value = data[r][c]; - } - - if(luckysheet.getObjType(value) == "object" && ("mc" in value)){ - var mc = $.extend(true, {}, value["mc"]); - if("rs" in value["mc"]){ - offsetMC[mc.r + "_" + mc.c] = [r + row_s, c + col_s]; - - value["mc"].r = r + row_s; - value["mc"].c = c + col_s; - - cfg["merge"][(r + row_s) + "_" + (c + col_s)] = value["mc"]; - } - else{ - value["mc"].r = offsetMC[mc.r + "_" + mc.c][0]; - value["mc"].c = offsetMC[mc.r + "_" + mc.c][1]; - } - } - d[r + row_s][c + col_s] = value; - } - } - - if(RowlChange){ - cfg = luckysheet.rowlenByRange(d, last["row"][0], last["row"][1], cfg); - cfg = luckysheet.rowlenByRange(d, row_s, row_e, cfg); - } - - //条件格式 - var cdformat = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]); - if(cdformat != null && cdformat.length > 0){ - for(var i = 0; i < cdformat.length; i++){ - var cdformat_cellrange = cdformat[i].cellrange; - var emptyRange = []; - for(var j = 0; j < cdformat_cellrange.length; j++){ - var range = luckysheet.conditionformat.CFSplitRange(cdformat_cellrange[j], {"row": last["row"], "column": last["column"]}, {"row": [row_s, row_e], "column": [col_s, col_e]}, "allPart"); - emptyRange = emptyRange.concat(range); - } - cdformat[i].cellrange = emptyRange; - } - } - - if(luckysheet_select_save[0].row_focus == luckysheet_select_save[0].row[0]){ - var rf = row_s; - } - else{ - var rf = row_e; - } - - if(luckysheet_select_save[0].column_focus == luckysheet_select_save[0].column[0]){ - var cf = col_s; - } - else{ - var cf = col_e; - } - - var range = []; - range.push({ "row": last["row"], "column": last["column"] }); - range.push({ "row": [row_s, row_e], "column": [col_s, col_e] }); - - last["row"] = [row_s, row_e]; - last["column"] = [col_s, col_e]; - last["row_focus"] = rf; - last["column_focus"] = cf; - - luckysheet.jfrefreshgrid(d, range, cfg, cdformat, RowlChange); - - luckysheet.selectHightlightShow(); - - $("#luckysheet-sheettable").css("cursor", "default"); - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - } - - //图表选区拖拽移动 - if (luckysheet.chart_selection.rangeMove) { - luckysheet.chart_selection.rangeMoveDragged(); - } - - //图表选区拖拽拉伸 - if (!!luckysheet.chart_selection.rangeResize) { - luckysheet.chart_selection.rangeResizeDragged(); - } - - //选区下拉 - if (luckysheet_cell_selected_extend) { - luckysheet_cell_selected_extend = false; - $("#luckysheet-cell-selected-extend").hide(); - - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - - var x = mouse[0] + scrollLeft - 5; - var y = mouse[1] + scrollTop - 5; - - var winH = $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, winW = $(window).width() + scrollLeft; - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var row_index_original = luckysheet_cell_selected_extend_index[0], col_index_original = luckysheet_cell_selected_extend_index[1]; - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var row_s = last["row"][0], row_e = last["row"][1]; - var col_s = last["column"][0], col_e = last["column"][1]; - - if (row_s < 0 || y < 0) { - row_s = 0; - row_e = last["row"][1] - last["row"][0]; - } - - if (col_s < 0 || x < 0) { - col_s = 0; - col_e = last["column"][1] - last["column"][0]; - } - - if (row_e >= visibledatarow[visibledatarow.length - 1] || y > winH) { - row_s = visibledatarow.length - 1 - last["row"][1] + last["row"][0]; - row_e = visibledatarow.length - 1; - } - - if (col_e >= visibledatacolumn[visibledatacolumn.length - 1] || x > winW) { - col_s = visibledatacolumn.length - 1 - last["column"][1] + last["column"][0]; - col_e = visibledatacolumn.length - 1; - } - - //复制范围 - luckysheet.dropCell.copyRange = {"row": $.extend(true, [], last["row"]), "column": $.extend(true, [], last["column"])}; - //applyType - var typeItemHide = luckysheet.dropCell.typeItemHide(); - - if(!typeItemHide[0] && !typeItemHide[1] && !typeItemHide[2] && !typeItemHide[3] && !typeItemHide[4] && !typeItemHide[5] && !typeItemHide[6]){ - luckysheet.dropCell.applyType = "0"; - } - else{ - luckysheet.dropCell.applyType = "1"; - } - - if (Math.abs(row_index_original - row_index) > Math.abs(col_index_original - col_index)) { - if (!(row_index >= row_s && row_index <= row_e)) { - if (luckysheet_select_save[0].top_move >= row_pre) {//当往上拖拽时 - luckysheet.dropCell.applyRange = {"row": [row_index, last["row"][0] - 1], "column": last["column"]}; - luckysheet.dropCell.direction = "up"; - - row_s -= last["row"][0] - row_index; - - //是否有数据透视表范围 - if(luckysheet.pivotTable.isPivotRange(row_s, col_e)){ - luckysheet.tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); - return; - } - } - else {//当往下拖拽时 - luckysheet.dropCell.applyRange = {"row": [last["row"][1] + 1, row_index], "column": last["column"]}; - luckysheet.dropCell.direction = "down"; - - row_e += row_index - last["row"][1]; - - //是否有数据透视表范围 - if(luckysheet.pivotTable.isPivotRange(row_e, col_e)){ - luckysheet.tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); - return; - } - } - } - else{ - return; - } - } - else { - if (!(col_index >= col_s && col_index <= col_e)) { - if (luckysheet_select_save[0].left_move >= col_pre) {//当往左拖拽时 - luckysheet.dropCell.applyRange = {"row": last["row"], "column": [col_index, last["column"][0] - 1]}; - luckysheet.dropCell.direction = "left"; - - col_s -= last["column"][0] - col_index; - - //是否有数据透视表范围 - if(luckysheet.pivotTable.isPivotRange(row_e, col_s)){ - luckysheet.tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); - return; - } - } - else {//当往右拖拽时 - luckysheet.dropCell.applyRange = {"row": last["row"], "column": [last["column"][1] + 1, col_index]}; - luckysheet.dropCell.direction = "right"; - - col_e += col_index - last["column"][1]; - - //是否有数据透视表范围 - if(luckysheet.pivotTable.isPivotRange(row_e, col_e)){ - luckysheet.tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!",""); - return; - } - } - } - else{ - return; - } - } - - if(config["merge"] != null){ - var hasMc = false; - - for(var r = last["row"][0]; r <= last["row"][1]; r++){ - for(var c = last["column"][0]; c <= last["column"][1]; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(cell != null && cell.mc != null){ - hasMc = true; - break; - } - } - } - - if(hasMc){ - if(luckysheet.isEditMode()){ - alert("无法对合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对合并单元格执行此操作", ""); - } - - return; - } - - for(var r = row_s; r <= row_e; r++){ - for(var c = col_s; c <= col_e; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(cell != null && cell.mc != null){ - hasMc = true; - break; - } - } - } - - if(hasMc){ - if(luckysheet.isEditMode()){ - alert("无法对合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对合并单元格执行此操作", ""); - } - - return; - } - } - - last["row"] = [row_s, row_e]; - last["column"] = [col_s, col_e]; - - luckysheet.dropCell.update(); - luckysheet.dropCell.createIcon(); - - $("#luckysheet-cell-selected-move").hide(); - - $("#luckysheet-sheettable").css("cursor", "default"); - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - } - }); - - $("#luckysheet-left-top").mousedown(function (event) { - $("#luckysheet-wa-functionbox-confirm").click(); - luckysheet_select_status = false; - - luckysheet_select_save = [{ "row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1], "row_focus": 0, "column_focus": 0 }]; - luckysheet.selectHightlightShow(); - - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { jfcountfunc() }, 500); - - event.stopPropagation(); - }); - - var luckysheet_rows_selected_status = false; - $("#luckysheet-rows-h").mousedown(function (event) { - //有批注在编辑时 - luckysheet.postil.removeActivePs(); - - var mouse = mouseposition(event.pageX, event.pageY); - var y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var col_index = visibledatacolumn.length - 1, col = visibledatacolumn[col_index], col_pre = 0; - - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - - //mousedown是右键 - if (event.which == "3") { - var isright = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var obj_s = luckysheet_select_save[s]; - - if(obj_s["row"] != null && (row_index >= obj_s["row"][0] && row_index <= obj_s["row"][1]) && (obj_s["column"][0] == 0 && obj_s["column"][1] == luckysheet.flowdata[0].length - 1)){ - isright = true; - break; - } - } - - if(isright){ - return; - } - } - - var top = row_pre, height = row - row_pre - 1; - var rowseleted = [row_index, row_index]; - - luckysheet_scroll_status = true; - - //公式相关 - var $input = $("#luckysheet-input-box"); - if (parseInt($input.css("top")) > 0) { - if (luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start || luckysheet.formula.israngeseleciton() || $("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")) { - //公式选区 - var changeparam = luckysheet.menuButton.mergeMoveMain([0, col_index], rowseleted, {"row_focus": row_index, "column_focus": 0}, top, height, col_pre, col); - if(changeparam != null){ - //columnseleted = changeparam[0]; - rowseleted = changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - //left = changeparam[4]; - //width = changeparam[5]; - } - - if(event.shiftKey){ - var last = luckysheet.formula.func_selectedrange; - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain([0, col_index], rowseleted, {"row_focus": row_index, "column_focus": 0}, top, height, col_pre, col); - if(changeparam != null){ - // columnseleted = changeparam[0]; - rowseleted = changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - } - - last["row"] = rowseleted; - - last["top_move"] = top; - last["height_move"] = height; - - luckysheet.formula.func_selectedrange = last; - } - else if(event.ctrlKey && $("#luckysheet-rich-text-editor").find("span").last().text() != ","){ - //按住ctrl 选择选区时 先处理上一个选区 - var vText = $("#luckysheet-rich-text-editor").text() + ","; - if(vText.length > 0 && vText.substr(0, 1) == "="){ - vText = luckysheet.formula.functionHTMLGenerate(vText); - - if (window.getSelection) { // all browsers, except IE before version 9 - var currSelection = window.getSelection(); - luckysheet.formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; - } - else { // Internet Explorer before version 9 - var textRange = document.selection.createRange(); - luckysheet.formula.functionRangeIndex = textRange; - } - - $("#luckysheet-rich-text-editor").html(vText); - - luckysheet.formula.canceFunctionrangeSelected(); - luckysheet.formula.createRangeHightlight(); - } - - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - $("#luckysheet-functionbox-cell").html(vText); - luckysheet.formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); - - //再进行 选区的选择 - luckysheet.formula.israngeseleciton(); - luckysheet.formula.func_selectedrange = { - "left": luckysheet.colLocationByIndex(0)[0], - "width": luckysheet.colLocationByIndex(0)[1] - luckysheet.colLocationByIndex(0)[0] - 1, - "top": top, - "height": height, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": [0, col_index], - "row_focus": row_index, - "column_focus": 0 - } - } - else{ - luckysheet.formula.func_selectedrange = { - "left": luckysheet.colLocationByIndex(0)[0], - "width": luckysheet.colLocationByIndex(0)[1] - luckysheet.colLocationByIndex(0)[0] - 1, - "top": top, - "height": height, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": [0, col_index], - "row_focus": row_index, - "column_focus": 0 - } - } - - if(luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start || luckysheet.formula.israngeseleciton()){ - luckysheet.formula.rangeSetValue({ "row": rowseleted, "column": [null, null] }); - } - else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){//if公式生成器 - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": rowseleted, "column": [0, col_index] }, luckysheet.currentSheetIndex); - $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); - } - - luckysheet.formula.rangedrag_row_start = true; - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_column_start = false; - - $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": top, "height": height }).show(); - $("#luckysheet-formula-help-c").hide(); - - luckysheet.luckysheet_count_show(col_pre, top, col - col_pre - 1, height, rowseleted, [0, col_index]); - - setTimeout(function(){ - var currSelection = window.getSelection(); - var anchorOffset = currSelection.anchorNode; - if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ - $editor=$("#luckysheet-rich-text-editor"); - luckysheet.formula.rangechangeindex = luckysheet.formula.data_parm_index; - } - else{ - $editor = $(anchorOffset).closest("div"); - } - var $span = $editor.find("span[rangeindex='" + luckysheet.formula.rangechangeindex + "']"); - - luckysheet.formula.setCaretPosition($span.get(0), 0, $span.html().length); - }, 1); - - return; - } - else { - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheet_rows_selected_status = true; - } - } - else { - luckysheet_rows_selected_status = true; - } - - if (luckysheet_rows_selected_status) { - if(event.shiftKey){ - //按住shift点击行索引选取范围 - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); //选区最后一个 - - var top = 0, height = 0, rowseleted = []; - if (last.top > row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - - if(last.row[1] > last.row_focus){ - last.row[1] = last.row_focus; - } - - rowseleted = [row_index, last.row[1]]; - } - else if (last.top == row_pre) { - top = row_pre; - height = last.top + last.height - row_pre; - rowseleted = [row_index, last.row[0]]; - } - else { - top = last.top; - height = row - last.top - 1; - - if(last.row[0] < last.row_focus){ - last.row[0] = last.row_focus; - } - - rowseleted = [last.row[0], row_index]; - } - - last["row"] = rowseleted; - - last["top_move"] = top; - last["height_move"] = height; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - } - else if(event.ctrlKey){ - luckysheet_select_save.push({ - "left": luckysheet.colLocationByIndex(0)[0], - "width": luckysheet.colLocationByIndex(0)[1] - luckysheet.colLocationByIndex(0)[0] - 1, - "top": top, - "height": height, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": [0, col_index], - "row_focus": row_index, - "column_focus": 0 - }); - } - else{ - luckysheet_select_save = []; - luckysheet_select_save.push({ - "left": luckysheet.colLocationByIndex(0)[0], - "width": luckysheet.colLocationByIndex(0)[1] - luckysheet.colLocationByIndex(0)[0] - 1, - "top": top, - "height": height, - "left_move": col_pre, - "width_move": col - col_pre - 1, - "top_move": top, - "height_move": height, - "row": rowseleted, - "column": [0, col_index], - "row_focus": row_index, - "column_focus": 0 - }); - } - - luckysheet.selectHightlightShow(); - - if(luckysheet.server.allowUpdate){ - //允许编辑后的后台更新时 - luckysheet.server.saveParam("mv", luckysheet.currentSheetIndex, luckysheet_select_save); - } - } - - $("#luckysheet-helpbox-cell").text(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save[luckysheet_select_save.length - 1])); - - setTimeout(function () { - clearTimeout(jfcountfuncTimeout); - jfcountfunc(); - }, 101); - }).mousemove(function (event) { - if (luckysheet_rows_selected_status || luckysheet_rows_change_size || luckysheet_select_status) { - $("#luckysheet-rows-h-hover").hide(); - return; - } - - var mouse = mouseposition(event.pageX, event.pageY); - var y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - $("#luckysheet-rows-h-hover").css({ "top": row_pre, "height": row - row_pre - 1, "display": "block" }); - - if (y < row - 1 && y >= row - 5) { - $("#luckysheet-rows-change-size").css({ "top": row - 3, "opacity": 0 }); - } - else { - //$("#luckysheet-rows-change-size").hide(); - $("#luckysheet-rows-change-size").css("opacity", 0); - } - }).mouseleave(function (event) { - $("#luckysheet-rows-h-hover").hide(); - //$("#luckysheet-rows-change-size").hide(); - $("#luckysheet-rows-change-size").css("opacity", 0); - }).mouseup(function (event) { - if (event.which == 3) { - if(luckysheet.isEditMode()){ //非编辑模式下禁止右键功能框 - return; - } - - $("#luckysheet-cols-rows-shift").hide(); - luckysheetRightHeadClickIs = "row"; - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text("行"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text("高"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text("上"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text("下"); - - $("#luckysheet-cols-rows-add").show(); - $("#luckysheet-cols-rows-data").show(); - $("#luckysheet-cols-rows-shift").hide(); - - showrightclickmenu($("#luckysheet-rightclick-menu"), $(this).offset().left + 46, event.pageY); - luckysheet_cols_menu_status = true; - - //行高默认值 - var cfg = $.extend(true, {}, config); - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - var first_rowlen = cfg["rowlen"][luckysheet_select_save[0].row[0]] == null ? luckysheet.defaultrowlen : cfg["rowlen"][luckysheet_select_save[0].row[0]]; - var isSame = true; - - for(var i = 0; i < luckysheet_select_save.length; i++){ - var s = luckysheet_select_save[i]; - var r1 = s.row[0], r2 = s.row[1]; - - for(var r = r1; r <= r2; r++){ - var rowlen = cfg["rowlen"][r] == null ? luckysheet.defaultrowlen : cfg["rowlen"][r]; - - if(rowlen != first_rowlen){ - isSame = false; - break; - } - } - } - - if(isSame){ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_rowlen); - } - else{ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); - } - } - }); - - - luckysheet.luckysheet_count_show = function (left, top, width, height, rowseleted, columnseleted) { - var rowl = rowseleted[1] - rowseleted[0] + 1, coll = columnseleted[1] - columnseleted[0] + 1; - var drawWidth = luckysheetTableContentHW[0], drawHeight = luckysheetTableContentHW[1]; - var scrollWidth = $("#luckysheet-cell-main").scrollLeft(), scrollHeight = $("#luckysheet-cell-main").scrollTop(); - - if (rowl >= 4) { - var leftv = left - 25; - if (leftv < 0) { - leftv = left + 5; - } - - if (leftv < scrollWidth) { - leftv = scrollWidth + 10; - } - - var topv = top + height / 2; - if (height > drawHeight) { - topv = scrollHeight + drawHeight / 2; - } - - $("#luckysheet-row-count-show").css({ "left": leftv, "top": topv, "display": "block" }).html("
" + rowl.toString().split("").join("
") + "
"); - } - else { - $("#luckysheet-row-count-show").hide(); - } - - if (coll >= 4) { - var topv = top - 25; - if (topv < 0) { - topv = top + 5; - } - - if (topv < scrollHeight) { - topv = scrollHeight + 10; - } - - var leftv = left + width / 2; - if (width > drawWidth) { - leftv = scrollWidth + drawWidth / 2; - } - - $("#luckysheet-column-count-show").css({ "left": leftv, "top": topv, "display": "block" }).text(coll + "列"); - } - else { - $("#luckysheet-column-count-show").hide(); - } - } - - var luckysheet_cols_selected_status = false; - $("#luckysheet-cols-h-c").mousedown(function (event) { - //有批注在编辑时 - luckysheet.postil.removeActivePs(); - - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $(this).scrollLeft(); - - var row_index = visibledatarow.length - 1, row = visibledatarow[row_index], row_pre = 0; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - orderbyindex = col_index;//排序全局函数 - - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - - //mousedown是右键 - if (event.which == "3") { - var isright = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var obj_s = luckysheet_select_save[s]; - - if(obj_s["column"] != null && (col_index >= obj_s["column"][0] && col_index <= obj_s["column"][1]) && (obj_s["row"][0] == 0 && obj_s["row"][1] == luckysheet.flowdata.length - 1)){ - isright = true; - break; - } - } - - if(isright){ - return; - } - } - - var left = col_pre, width = col - col_pre - 1; - var columnseleted = [col_index, col_index]; - - // var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted , [0, row_index], luckysheet_select_save[luckysheet_select_save.length - 1], row_pre, row, left, width); - // if(changeparam != null){ - // columnseleted = changeparam[0]; - // //rowseleted= changeparam[1]; - // //top = changeparam[2]; - // //height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - // } - - luckysheet_scroll_status = true; - - //公式相关 - var $input = $("#luckysheet-input-box"); - if (parseInt($input.css("top")) > 0) { - - if (luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start || luckysheet.formula.israngeseleciton() || $("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")) { - //公式选区 - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, [0, row_index], {"row_focus": 0, "column_focus": col_index}, row_pre, row, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - //rowseleted= changeparam[1]; - //top = changeparam[2]; - //height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - if(event.shiftKey){ - var last = luckysheet.formula.func_selectedrange; - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted , [0, row_index], {"row_focus": 0, "column_focus": col_index}, row_pre, row, left, width); - if(changeparam != null){ - columnseleted = changeparam[0]; - //rowseleted= changeparam[1]; - //top = changeparam[2]; - //height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - - luckysheet.formula.func_selectedrange = last; - } - else if(event.ctrlKey && $("#luckysheet-rich-text-editor").find("span").last().text() != ","){ - //按住ctrl 选择选区时 先处理上一个选区 - var vText = $("#luckysheet-rich-text-editor").text() + ","; - if(vText.length > 0 && vText.substr(0, 1) == "="){ - vText = luckysheet.formula.functionHTMLGenerate(vText); - - if (window.getSelection) { // all browsers, except IE before version 9 - var currSelection = window.getSelection(); - luckysheet.formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; - } - else { // Internet Explorer before version 9 - var textRange = document.selection.createRange(); - luckysheet.formula.functionRangeIndex = textRange; - } - - $("#luckysheet-rich-text-editor").html(vText); - - luckysheet.formula.canceFunctionrangeSelected(); - luckysheet.formula.createRangeHightlight(); - } - - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - $("#luckysheet-functionbox-cell").html(vText); - luckysheet.formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); - - //再进行 选区的选择 - luckysheet.formula.israngeseleciton(); - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": luckysheet.rowLocationByIndex(0)[0], - "height": luckysheet.rowLocationByIndex(0)[1] - luckysheet.rowLocationByIndex(0)[0] - 1, - "left_move": left, - "width_move": width, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [0, row_index], - "column": columnseleted, - "row_focus": 0, - "column_focus": col_index - } - } - else{ - luckysheet.formula.func_selectedrange = { - "left": left, - "width": width, - "top": luckysheet.rowLocationByIndex(0)[0], - "height": luckysheet.rowLocationByIndex(0)[1] - luckysheet.rowLocationByIndex(0)[0] - 1, - "left_move": left, - "width_move": width, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [0, row_index], - "column": columnseleted, - "row_focus": 0, - "column_focus": col_index - } - } - - if(luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start || luckysheet.formula.israngeseleciton()){ - luckysheet.formula.rangeSetValue({ "row": [null, null], "column": columnseleted }); - } - else if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){//if公式生成器 - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": [0, row_index], "column": columnseleted }, luckysheet.currentSheetIndex); - $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); - } - - luckysheet.formula.rangedrag_column_start = true; - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_row_start = false; - - $("#luckysheet-formula-functionrange-select").css({ "left": left, "width": width, "top": row_pre, "height": row - row_pre - 1 }).show(); - $("#luckysheet-formula-help-c").hide(); - - luckysheet.luckysheet_count_show(left, row_pre, width, row - row_pre - 1, [0, row_index], columnseleted); - - return; - } - else { - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheet_cols_selected_status = true; - } - } - else { - luckysheet_cols_selected_status = true; - } - - if (luckysheet_cols_selected_status) { - if(event.shiftKey){ - //按住shift点击列索引选取范围 - var last = $.extend(true, {}, luckysheet_select_save[luckysheet_select_save.length - 1]); //选区最后一个 - - var left = 0, width = 0, columnseleted = []; - if (last.left > col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - - if(last.column[1] > last.column_focus){ - last.column[1] = last.column_focus; - } - - columnseleted = [col_index, last.column[1]]; - } - else if (last.left == col_pre) { - left = col_pre; - width = last.left + last.width - col_pre; - columnseleted = [col_index, last.column[0]]; - } - else { - left = last.left; - width = col - last.left - 1; - - if(last.column[0] < last.column_focus){ - last.column[0] = last.column_focus; - } - - columnseleted = [last.column[0], col_index]; - } - - last["column"] = columnseleted; - - last["left_move"] = left; - last["width_move"] = width; - - luckysheet_select_save[luckysheet_select_save.length - 1] = last; - } - else if(event.ctrlKey){ - //选区添加 - luckysheet_select_save.push({ - "left": left, - "width": width, - "top": luckysheet.rowLocationByIndex(0)[0], - "height": luckysheet.rowLocationByIndex(0)[1] - luckysheet.rowLocationByIndex(0)[0] - 1, - "left_move": left, - "width_move": width, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [0, row_index], - "column": columnseleted, - "row_focus": 0, - "column_focus": col_index - }); - } - else{ - luckysheet_select_save = []; - luckysheet_select_save.push({ - "left": left, - "width": width, - "top": luckysheet.rowLocationByIndex(0)[0], - "height": luckysheet.rowLocationByIndex(0)[1] - luckysheet.rowLocationByIndex(0)[0] - 1, - "left_move": left, - "width_move": width, - "top_move": row_pre, - "height_move": row - row_pre - 1, - "row": [0, row_index], - "column": columnseleted, - "row_focus": 0, - "column_focus": col_index - }); - } - - luckysheet.selectHightlightShow(); - - if(luckysheet.server.allowUpdate){ - //允许编辑后的后台更新时 - luckysheet.server.saveParam("mv", luckysheet.currentSheetIndex, luckysheet_select_save); - } - } - - $("#luckysheet-helpbox-cell").text(luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, luckysheet_select_save[luckysheet_select_save.length - 1])); - - setTimeout(function () { - clearTimeout(jfcountfuncTimeout); - jfcountfunc(); - }, 101); - - if (luckysheet_cols_menu_status) { - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-cols-h-hover").hide(); - $("#luckysheet-cols-menu-btn").hide(); - luckysheet_cols_menu_status = false; - } - event.stopPropagation(); - }).mousemove(function (event) { - if (luckysheet_cols_selected_status || luckysheet_select_status) { - $("#luckysheet-cols-h-hover").hide(); - $("#luckysheet-cols-menu-btn").hide(); - return; - } - - if (luckysheet_cols_menu_status || luckysheet_cols_change_size) { - return; - } - - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cols-h-c").scrollLeft(); - - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - $("#luckysheet-cols-h-hover").css({ "left": col_pre, "width": col - col_pre - 1, "display": "block" }); - $("#luckysheet-cols-menu-btn").css({ "left": col - 19, "display": "block" }); - - $("#luckysheet-cols-change-size").css({ "left": col - 5 }); - if (x < col && x >= col - 5) { - $("#luckysheet-cols-change-size").css({ "opacity": 0 }); - $("#luckysheet-cols-menu-btn").hide(); - } - else { - $("#luckysheet-change-size-line").hide(); - $("#luckysheet-cols-change-size").css("opacity", 0); - } - }).mouseleave(function (event) { - if (luckysheet_cols_menu_status || luckysheet_cols_change_size) { - return; - } - - $("#luckysheet-cols-h-hover").hide(); - $("#luckysheet-cols-menu-btn").hide(); - $("#luckysheet-cols-change-size").css("opacity", 0); - }).mouseup(function (event) { - if (event.which == 3) { - if(luckysheet.isEditMode()){ //非编辑模式下禁止右键功能框 - return; - } - - luckysheetRightHeadClickIs = "column"; - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text("列"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-size").text("宽"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text("左"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text("右"); - - $("#luckysheet-cols-rows-add").show(); - $("#luckysheet-cols-rows-data").show(); - $("#luckysheet-cols-rows-shift").hide(); - - showrightclickmenu($("#luckysheet-rightclick-menu"), event.pageX, $(this).offset().top + 18); - luckysheet_cols_menu_status = true; - - //列宽默认值 - var cfg = $.extend(true, {}, config); - if(cfg["columlen"] == null){ - cfg["columlen"] = {}; - } - - var first_collen = cfg["columlen"][luckysheet_select_save[0].column[0]] == null ? luckysheet.defaultcollen : cfg["columlen"][luckysheet_select_save[0].column[0]]; - var isSame = true; - - for(var i = 0; i < luckysheet_select_save.length; i++){ - var s = luckysheet_select_save[i]; - var c1 = s.column[0], c2 = s.column[1]; - - for(var c = c1; c <= c2; c++){ - var collen = cfg["columlen"][c] == null ? luckysheet.defaultcollen : cfg["columlen"][c]; - - if(collen != first_collen){ - isSame = false; - break; - } - } - } - - if(isSame){ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(first_collen); - } - else{ - $("#luckysheet-cols-rows-add").find("input[type='number'].rcsize").val(""); - } - } - }); - - var luckysheet_cols_change_size = false, luckysheet_cols_change_size_start = [], luckysheet_cols_dbclick_timeout = null, luckysheet_cols_dbclick_times = 0; - $("#luckysheet-cols-change-size").mousedown(function (event) { - //有批注在编辑时 - luckysheet.postil.removeActivePs(); - - $("#luckysheet-input-box").hide(); - $("#luckysheet-cols-change-size").css({ "opacity": 1 }); - - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(); - var x = mouse[0] + scrollLeft; - - var row_index = visibledatarow.length - 1, row = visibledatarow[row_index], row_pre = 0; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - luckysheet_cols_change_size = true; - luckysheet_scroll_status = true; - $("#luckysheet-change-size-line").css({ "height": winH + scrollTop, "border-width": "0 1px 0 0", "top": 0, "left": col - 3, "width": "1px", "display": "block", "cursor": "ew-resize" }); - $("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor", "ew-resize"); - luckysheet_cols_change_size_start = [col_pre, col_index]; - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-cols-h-hover").hide(); - $("#luckysheet-cols-menu-btn").hide(); - luckysheet_cols_dbclick_times = 0; - event.stopPropagation(); - }).dblclick(function () { - luckysheetcolsdbclick(); - // console.log(luckysheet_cols_dbclick_times, luckysheet_cols_dbclick_timeout); - // luckysheet_cols_dbclick_times += 1; - // if(luckysheet_cols_dbclick_times>=2){ - // luckysheet_cols_dbclick_times = 0; - // luckysheetcolsdbclick(); - // clearTimeout(luckysheet_cols_dbclick_timeout); - // } - - // luckysheet_cols_dbclick_timeout = setTimeout(function(){ - // luckysheet_cols_dbclick_times = 0; - // }, 300); - }) - - - function luckysheetcolsdbclick() { - luckysheet_cols_change_size = false; - //$("#luckysheet-change-size-line, #luckysheet-cols-change-size").hide(); - $("#luckysheet-change-size-line").hide(); - $("#luckysheet-cols-change-size").css("opacity", 0); - $("#luckysheet-sheettable, #luckysheet-cols-h-c, .luckysheet-cols-h-cells, .luckysheet-cols-h-cells canvas").css("cursor", "default"); - - var mouse = mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-cols-h-c").scrollLeft(); - var x = mouse[0] + scrollLeft; - var winW = $(window).width(); - - var row_index = visibledatarow.length - 1, row = visibledatarow[row_index], row_pre = 0; - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - //console.log(luckysheet_select_save["column"], col_index, luckysheet_select_save["column"][0], col_index, luckysheet_select_save["column"][1]); - luckysheet_cols_change_size_start = [col_pre, col_index]; - var dataflow = $("#luckysheetTableContent").get(0).getContext("2d"); - var cfg = $.extend(true, {}, config); - - var matchColumn = {}; - for(var s = 0; s < luckysheet_select_save.length; s++){ - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - if (col_index < c1 || col_index > c2) { - if(col_index in matchColumn){//此列已计算过 - continue; - } - - x = -Infinity; - var countret = 0; - var fontsize = 13; - for (var r = 0; r < luckysheet.flowdata.length; r++) { - if (countret >= 15) { - break; - } - - var value = luckysheet.getcellvalue(r, luckysheet_cols_change_size_start[1], luckysheet.flowdata); - var mask = luckysheet.getcellvalue(r, luckysheet_cols_change_size_start[1], luckysheet.flowdata, "m"); - - if(mask != null){ - value = mask; - } - - var cell = luckysheet.flowdata[r][luckysheet_cols_change_size_start[1]]; - if(luckysheet.getObjType(cell) == "object" && ("fs" in cell)){ - if(cell.fs > fontsize){ - fontsize = cell.fs; - } - } - - if (value == null || value.toString().length == 0) { - countret++; - continue; - } - var textMetrics = dataflow.measureText(value).width; - if (textMetrics > x) { - x = textMetrics; - } - } - - var size = x + fontsize * 1.5; - if ((x + 3) < 30) { - size = 30; - } - - if (x >= winW - 100 + scrollLeft) { - size = winW - 100 + scrollLeft; - } - - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; - } - - cfg["columlen"][luckysheet_cols_change_size_start[1]] = Math.ceil(size); - - matchColumn[col_index] = 1; - } - else { - for (var c = c1; c <= c2; c++) { - if(c in matchColumn){//此列已计算过 - continue; - } - - x = -Infinity; - var countret = 0; - var fontsize = 13; - for (var r = 0; r < luckysheet.flowdata.length; r++) { - if (countret >= 15) { - break; - } - var value = luckysheet.getcellvalue(r, c, luckysheet.flowdata); - - var cell = luckysheet.flowdata[r][c]; - if(luckysheet.getObjType(cell) == "object" && ("fs" in cell)){ - if(cell.fs > fontsize){ - fontsize = cell.fs; - } - } - - if (luckysheet.func_methods.isRealNull(value)) { - countret++; - continue; - } - - var textMetrics = dataflow.measureText(value).width; - if (textMetrics > x) { - x = textMetrics; - } - } - - var size = x + fontsize*1.5;; - if ((x + 3) < 30) { - size = 30; - } - - if (x >= winW - 100 + scrollLeft) { - size = winW - 100 + scrollLeft; - } - - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; - } - cfg["columlen"][c] = Math.ceil(size); - - matchColumn[c] = 1; - } - } - } - - // if (luckysheet_select_save[0]["column"] == null || col_index < luckysheet_select_save[0]["column"][0] || col_index > luckysheet_select_save[0]["column"][1]) { - // x = -Infinity; - // var countret = 0; - // var fontsize = 13; - // for (var r = 0; r < luckysheet.flowdata.length; r++) { - // if (countret >= 15) { - // break; - // } - - // var value = luckysheet.getcellvalue(r, luckysheet_cols_change_size_start[1], luckysheet.flowdata); - // var mask = luckysheet.getcellvalue(r, luckysheet_cols_change_size_start[1], luckysheet.flowdata, "m"); - - // if(mask != null){ - // value = mask; - // } - - // var cell = luckysheet.flowdata[r][luckysheet_cols_change_size_start[1]]; - // if((cell instanceof Object) && "fs" in cell){ - // if(cell.fs > fontsize){ - // fontsize = cell.fs; - // } - // } - - // if (value == null || value.toString().length == 0) { - // countret++; - // continue; - // } - // var textMetrics = dataflow.measureText(value).width; - // if (textMetrics > x) { - // x = textMetrics; - // } - // } - - // var size = x + fontsize*1.5; - // if ((x + 3) < 30) { - // size = 30; - // } - - // if (x >= winW - 100 + scrollLeft) { - // size = winW - 100 + scrollLeft; - // } - - // if (cfg["columlen"] == null) { - // cfg["columlen"] = {}; - // } - - // cfg["columlen"][luckysheet_cols_change_size_start[1]] = Math.ceil(size); - // } - // else { - // for (var c = luckysheet_select_save[0]["column"][0]; c <= luckysheet_select_save[0]["column"][1]; c++) { - // x = -Infinity; - // var countret = 0; - // var fontsize = 13; - // for (var r = 0; r < luckysheet.flowdata.length; r++) { - // if (countret >= 15) { - // break; - // } - // var value = luckysheet.getcellvalue(r, c, luckysheet.flowdata); - - // var cell = luckysheet.flowdata[r][c]; - // if((cell instanceof Object) && "fs" in cell){ - // if(cell.fs > fontsize){ - // fontsize = cell.fs; - // } - // } - - // if (value==null || value.toString().length == 0) { - // countret++; - // continue; - // } - - // var textMetrics = dataflow.measureText(value).width; - // if (textMetrics > x) { - // x = textMetrics; - // } - // } - - // var size = x + fontsize*1.5;; - // if ((x + 3) < 30) { - // size = 30; - // } - - // if (x >= winW - 100 + scrollLeft) { - // size = winW - 100 + scrollLeft; - // } - - // if (cfg["columlen"] == null) { - // cfg["columlen"] = {}; - // } - // cfg["columlen"][c] = Math.ceil(size); - // } - // } - //console.log(luckysheet.flowdata[0].length, luckysheet.flowdata.length, luckysheet.flowdata); - luckysheet.jfrefreshgridall(luckysheet.flowdata[0].length, luckysheet.flowdata.length, luckysheet.flowdata, cfg, luckysheet_select_save, "resizeC", "columlen"); - - //console.log($("luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).length); - // if ($("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).length > 0) { - // var $t = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).find(".luckysheet-filter-options").eq(0); - // var st_r = $t.data("str"), ed_r = $t.data("edr"), cindex = $t.data("cindex"), st_c = $t.data("stc"), ed_c = $t.data("edc"); - // //console.log(st_r, ed_r, st_c, ed_c); - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - // } - - //luckysheet.cleargridelement(); - } - - var luckysheet_rows_change_size = false, luckysheet_rows_change_size_start = []; - $("#luckysheet-rows-change-size").mousedown(function (event) { - //有批注在编辑时 - luckysheet.postil.removeActivePs(); - - $("#luckysheet-input-box").hide(); - $("#luckysheet-rows-change-size").css({ "opacity": 1 }); - - var mouse = mouseposition(event.pageX, event.pageY); - var y = mouse[1] + $("#luckysheet-rows-h").scrollTop(); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var winW = $("#luckysheet-cell-main").width(); - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - luckysheet_rows_change_size = true; - luckysheet_scroll_status = true; - $("#luckysheet-change-size-line").css({ "height": "1px", "border-width": "0 0px 1px 0", "top": row - 3, "left": 0, "width": scrollLeft + winW, "display": "block", "cursor": "ns-resize" }); - $("#luckysheet-sheettable, #luckysheet-rows-h, #luckysheet-rows-h canvas").css("cursor", "ns-resize"); - luckysheet_rows_change_size_start = [row_pre, row_index]; - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-rows-h-hover").hide(); - $("#luckysheet-cols-menu-btn").hide(); - event.stopPropagation(); - }); - - //改为全局变量 - window.luckysheet_cols_menu_status = false; - $("#luckysheet-cols-menu-btn").click(function (event) { - var $menu = $("#luckysheet-rightclick-menu"); - var offset = $(this).offset(); - //console.log(offset); - $("#luckysheet-cols-rows-shift").show(); - luckysheetRightHeadClickIs = "column"; - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-word").text("列"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-left").text("左"); - $("#luckysheet-rightclick-menu .luckysheet-cols-rows-shift-right").text("右"); - - $("#luckysheet-cols-rows-add").show(); - $("#luckysheet-cols-rows-data").hide(); - $("#luckysheet-cols-rows-shift").show(); - - showrightclickmenu($menu, offset.left, offset.top + 18); - luckysheet_cols_menu_status = true; - }); - - var orderbyindex = 0; - $("#luckysheetorderbyasc, #luckysheetorderbyasc_t").mousedown(function (event) { - luckysheet.cleargridelement(event); - luckysheet.sortColumnSeletion(orderbyindex, true); - luckysheet.selectHightlightShow(); - }); - - $("#luckysheetorderbydesc, #luckysheetorderbydesc_t").click(function (event) { - luckysheet.cleargridelement(event); - luckysheet.sortColumnSeletion(orderbyindex, false); - luckysheet.selectHightlightShow(); - }); - - //右键功能键 - - //复制为json格式字符串,首行为标题 - $("#luckysheet-copy-json-head").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - - if (getdata.length == 1) { - var obj = {}; - for (var i = 0; i < getdata[0].length; i++) { - obj[luckysheet.getcellvalue(0, i, getdata)] = ""; - } - arr.push(obj); - } - else { - for (var r = 1; r < getdata.length; r++) { - var obj = {}; - for (var c = 0; c < getdata[0].length; c++) { - if(luckysheet.getcellvalue(0, c, getdata) == undefined){ - obj[""] = luckysheet.getcellvalue(r, c, getdata); - }else{ - obj[luckysheet.getcellvalue(0, c, getdata)] = luckysheet.getcellvalue(r, c, getdata); - } - } - arr.push(obj); - } - } - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - }); - - //复制为json格式字符串,无标题,采用ABCD作为标题 - $("#luckysheet-copy-json-nohead").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - var st = luckysheet_select_save[0]["column"][0]; - for (var r = 0; r < getdata.length; r++) { - var obj = {}; - for (var c = 0; c < getdata[0].length; c++) { - obj[luckysheet.luckysheetchatatABC(c + st)] = luckysheet.getcellvalue(r, c, getdata); - } - arr.push(obj); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - }); - - //复制为一维数组 - $("#luckysheet-copy-array1").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - for (var r = 0; r < getdata.length; r++) { - for (var c = 0; c < getdata[0].length; c++) { - arr.push(luckysheet.getcellvalue(r, c, getdata)); - } - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - }); - - //复制为二维数组 - $("#luckysheet-copy-array2").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - for (var r = 0; r < getdata.length; r++) { - var a = []; - for (var c = 0; c < getdata[0].length; c++) { - a.push(luckysheet.getcellvalue(r, c, getdata)); - } - arr.push(a); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - }); - - //复制为多维数组 - $("#luckysheet-copy-arraymore-confirm").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - - for (var r = 0; r < getdata.length; r++) { - for (var c = 0; c < getdata[0].length; c++) { - arr.push(getdata[r][c]); - } - } - - var row = $("#luckysheet-copy-arraymore-row").val(), col = $("#luckysheet-copy-arraymore-col").val(); - - if (row == "" && col == "") { - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - $("body .luckysheet-cols-menu").hide(); - return; - } - - if (row == "") { - row = 1; - } - else { - row = parseInt(row); - if (row == null) { - row = 1; - } - } - - if (col == "") { - col = 1; - } - else { - col = parseInt(col); - if (col == null) { - col = 1; - } - } - - if(row.toString() == "NaN" || col.toString() == "NaN"){ - if(luckysheet.isEditMode()){ - alert("请输入正确的数值!"); - } - else{ - luckysheet.tooltip.info("请输入正确的数值!", ""); - } - return; - } - - if(row < 1 || col < 1){ - if(luckysheet.isEditMode()){ - alert("行列数不能小于1!"); - } - else{ - luckysheet.tooltip.info("行列数不能小于1!", ""); - } - return; - } - - var arrlen = arr.length, i = 0, ret = []; - for (var r = 0; r < row; r++) { - var a = []; - for (var c = 0; c < col; c++) { - a.push(arr[i++]); - if (i >= arrlen) { - luckysheet.selection.copybyformat(event, JSON.stringify(ret)); - $("body .luckysheet-cols-menu").hide(); - return; - } - } - ret.push(a); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(ret)); - }); - - //复制为对角线 - $("#luckysheet-copy-diagonal").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - - var clen = getdata[0].length; - for (var r = 0; r < getdata.length; r++) { - if (r >= clen) { - break; - } - arr.push(getdata[r][r]); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - copyType = "diagonal"; - copysetting = []; - }); - - //复制为反对角线 - $("#luckysheet-copy-antidiagonal").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - - var clen = getdata[0].length; - for (var r = 0; r < getdata.length; r++) { - if (r >= clen) { - break; - } - arr.push(getdata[r][clen - r - 1]); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - copyType = "antidiagonal"; - copysetting = []; - }); - - //复制为对角偏移n列 - $("#luckysheet-copy-diagonaloffset").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - - var clen = getdata[0].length, offset = parseInt($("#luckysheet-copy-diagonaloffset-value").val()); - - if(offset.toString() == "NaN"){ - if(luckysheet.isEditMode()){ - alert("请输入正确的数值!"); - } - else{ - luckysheet.tooltip.info("请输入正确的数值!", ""); - } - return; - } - - if(offset < 0){ - if(luckysheet.isEditMode()){ - alert("偏移列不能为负数!"); - } - else{ - luckysheet.tooltip.info("偏移列不能为负数!", ""); - } - return; - } - - if (offset == null) { - offset = 1; - } - - var clen = getdata[0].length; - for (var r = 0; r < getdata.length; r++) { - console.log(r, offset, clen); - if (r + offset >= clen) { - break; - } - arr.push(getdata[r][r + offset]); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - copyType = "diagonaloffset"; - copysetting = [offset]; - }); - - //复制为布尔值 - $("#luckysheet-copy-boolvalue").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - //复制范围内包含部分合并单元格,提示 - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - var arr = []; - if (getdata.length == 0) { - return; - } - for (var r = 0; r < getdata.length; r++) { - var a = []; - for (var c = 0; c < getdata[0].length; c++) { - var bool = false; - - if(luckysheet.getObjType(getdata[r][c]) == "object"){ - var v = getdata[r][c].v; - } - else{ - var v = getdata[r][c]; - } - - if (v == null || v == "") { - bool = false; - } - else { - v = parseInt(v); - if (v == null || v > 0) { - bool = true; - } - else { - bool = false; - } - } - a.push(bool); - } - arr.push(a); - } - - luckysheet.selection.copybyformat(event, JSON.stringify(arr)); - copyType = "boolvalue"; - copysetting = []; - }); - - //矩阵操作选区 翻转 上下 - $("#luckysheet-matrix-turn-up").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - for (var r = getdata.length - 1; r >= 0; r--) { - var a = []; - for (var c = 0; c < getdata[0].length; c++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - } - a.push(value); - } - arr.push(a); - } - - luckysheet.editor.controlHandler(arr); - }); - - //矩阵操作选区 翻转 左右 - $("#luckysheet-matrix-turn-left").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - for (var r = 0; r < getdata.length; r++) { - var a = []; - for (var c = getdata[0].length - 1; c >= 0; c--) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - } - a.push(value); - } - arr.push(a); - } - - luckysheet.editor.controlHandler(arr); - }); - - //矩阵操作选区 翻转 顺时针 - $("#luckysheet-matrix-turn-cw").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - for (var c = 0; c < getdata[0].length; c++) { - var a = []; - for (var r = getdata.length - 1; r >= 0; r--) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - } - a.push(value); - } - arr.push(a); - } - - luckysheet.editor.controlHandlerD(arr); - }); - - //矩阵操作选区 翻转 逆时针 - $("#luckysheet-matrix-turn-anticw").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - for (var c = getdata[0].length - 1; c >= 0; c--) { - var a = []; - for (var r = 0; r < getdata.length; r++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - } - a.push(value); - } - arr.push(a); - } - - luckysheet.editor.controlHandlerD(arr); - }); - - //矩阵操作选区 转置 - $("#luckysheet-matrix-turn-trans").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - for (var c = 0; c < getdata[0].length; c++) { - var a = []; - for (var r = 0; r < getdata.length; r++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - } - a.push(value); - } - arr.push(a); - } - - luckysheet.editor.controlHandlerD(arr); - }); - - var jfnqrt = function (x, p) { - if (x == 0) - return 0; - var x0, x1; - x0 = x; - x1 = ((p - 1) * x0 / p) + (x / (Math.pow(x0, p - 1) * p));//利用迭代法求解 - while (Math.abs(x1 - x0) > 0.000001) { - x0 = x1; - x1 = ((p - 1) * x0 / p) + (x / (Math.pow(x0, p - 1) * p)); - } - return x1; - } - - //矩阵操作选区 矩阵计算 - $("#luckysheet-matrix-cal-confirm").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var caltype = $("#luckysheet-matrix-cal-type").val(), - calvalue = parseInt($("#luckysheet-matrix-cal-value").val()); - - if(calvalue.toString() == "NaN"){ - if(luckysheet.isEditMode()){ - alert("请输入正确的数值!"); - } - else{ - luckysheet.tooltip.info("请输入正确的数值!", ""); - } - return; - } - - if (calvalue == null) { - calvalue = 2; - } - - var arr = []; - - for (var r = 0; r < getdata.length; r++) { - var a = []; - - for (var c = 0; c < getdata[0].length; c++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - if (parseInt(value) != null && getdata[r][c].ct != undefined && getdata[r][c].ct.t == "n") { - if (caltype == "minus") { - value.v = value.v - calvalue; - } - else if (caltype == "multiply") { - value.v = value.v * calvalue; - } - else if (caltype == "divided") { - value.v = luckysheet.numFormat(value.v / calvalue, 4); - } - else if (caltype == "power") { - value.v = Math.pow(value.v, calvalue); - } - else if (caltype == "root") { - if (calvalue == 2) { - value.v = luckysheet.numFormat(Math.sqrt(value.v), 4); - } - else if (calvalue == 3 && Math.cbrt) { - value.v = luckysheet.numFormat(Math.cbrt(value.v), 4); - } - else { - value.v = luckysheet.numFormat(jfnqrt(value.v, calvalue), 4); - } - } - else if (caltype == "log") { - value.v = luckysheet.numFormat(Math.log(value.v) * 10000 / Math.log(Math.abs(calvalue)), 4); - } - else { - value.v = value.v + calvalue; - } - - if(value.v == null){ - value.m = ""; - } - else{ - value.m = value.v.toString(); - } - } - } - a.push(value); - } - arr.push(a); - } - - luckysheet.editor.controlHandler(arr); - }); - - //矩阵操作选区 删除两端0值 按行 - $("#luckysheet-matrix-delezero-row").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - var getdatalen = getdata[0].length; - for (var r = 0; r < getdata.length; r++) { - var a = [], stdel = true, eddel = true; - for (var c = 0; c < getdatalen; c++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - if ((value.v == "0" || value.v == 0) && stdel) { - continue; - } - else { - stdel = false; - } - } - a.push(value); - } - - var a1 = []; - if (a.length == getdatalen) { - a1 = a; - } - else { - for (var c = a.length - 1; c >= 0; c--) { - var value = ""; - if (a[c] != null) { - value = a[c]; - if ((value.v == "0" || value.v == 0) && eddel) { - continue; - } - else { - eddel = false; - } - } - a1.unshift(value); - } - - var l = getdatalen - a1.length; - for (var c1 = 0; c1 < l; c1++) { - a1.push(""); - } - } - arr.push(a1); - } - - luckysheet.editor.controlHandler(arr); - }); - - //矩阵操作选区 删除两端0值 按列 - $("#luckysheet-matrix-delezero-column").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - var getdatalen = getdata.length, collen = getdata[0].length; - for (var c = 0; c < collen; c++) { - var a = [], stdel = true, eddel = true; - for (var r = 0; r < getdatalen; r++) { - var value = ""; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - if ((value.v == "0" || value.v == 0) && stdel) { - continue; - } - else { - stdel = false; - } - } - a.push(value); - } - - var a1 = []; - if (a.length == getdatalen) { - a1 = a; - } - else { - for (var r = a.length - 1; r >= 0; r--) { - var value = ""; - if (a[r] != null) { - value = a[r]; - if ((value.v == "0" || value.v == 0) && eddel) { - continue; - } - else { - eddel = false; - } - } - a1.unshift(value); - } - - var l = getdatalen - a1.length; - for (var r1 = 0; r1 < l; r1++) { - a1.push(""); - } - } - arr.push(a1); - } - - var arr1 = []; - for (var c = 0; c < arr[0].length; c++) { - var a = []; - for (var r = 0; r < arr.length; r++) { - var value = ""; - if (arr[r] != null && arr[r][c] != null) { - value = arr[r][c]; - } - a.push(value); - } - arr1.push(a); - } - - luckysheet.editor.controlHandler(arr1); - }); - - //矩阵操作选区 删除重复值 按行 - $("#luckysheet-matrix-delerpt-row").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - var getdatalen = getdata[0].length; - for (var r = 0; r < getdata.length; r++) { - var a = [], repeat = {}; - - for (var c = 0; c < getdatalen; c++) { - var value = null; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - - if(value.v in repeat){ - repeat[value.v].push(value); - } - else{ - repeat[value.v] = []; - repeat[value.v].push(value); - } - } - } - - for (var c = 0; c < getdatalen; c++) { - var value = null; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - - if(repeat[value.v].length == 1){ - a.push(value); - } - } - } - - var l = getdatalen - a.length; - for (var c1 = 0; c1 < l; c1++) { - a.push(null); - } - arr.push(a); - } - - luckysheet.editor.controlHandler(arr); - }); - - //矩阵操作选区 删除重复值 按列 - $("#luckysheet-matrix-delerpt-column").click(function (event) { - $("body .luckysheet-cols-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选定区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选定区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var getdata = luckysheet.getdatabyselection(luckysheet_select_save[0]); - if (getdata.length == 0) { - return; - } - - var arr = []; - var getdatalen = getdata.length, collen = getdata[0].length; - for (var c = 0; c < collen; c++) { - var a = [], repeat = {}; - - for (var r = 0; r < getdatalen; r++) { - var value = null; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - - if(value.v in repeat){ - repeat[value.v].push(value); - } - else{ - repeat[value.v] = []; - repeat[value.v].push(value); - } - } - } - - for (var r = 0; r < getdatalen; r++) { - var value = null; - if (getdata[r] != null && getdata[r][c] != null) { - value = getdata[r][c]; - - if(repeat[value.v].length == 1){ - a.push(value); - } - } - } - - a1 = a; - var l = getdatalen - a1.length; - for (var r1 = 0; r1 < l; r1++) { - a1.push(null); - } - arr.push(a1); - } - - var arr1 = []; - for (var c = 0; c < arr[0].length; c++) { - var a = []; - for (var r = 0; r < arr.length; r++) { - var value = null; - if (arr[r] != null && arr[r][c] != null) { - value = arr[r][c]; - } - a.push(value); - } - arr1.push(a); - } - - luckysheet.editor.controlHandler(arr1); - }); - - $("#luckysheet-icon-undo").click(function (event) { - luckysheet.controlHistory.redo(event); - }); - - $("#luckysheet-icon-redo").click(function (event) { - luckysheet.controlHistory.undo(event); - }); - - var isInitialSheetConfig = false, luckysheetcurrentSheetitem = null, jfdbclicklagTimeout = null; - - function showsheetconfigmenu() { - if (!isInitialSheetConfig) { - isInitialSheetConfig = true; - $("#luckysheetsheetconfigcolorur").spectrum({ - showPalette: true, - preferredFormat: "hex", - clickoutFiresChange: false, - showInitial: true, - showInput: true, - flat: true, - hideAfterPaletteSelect: false, - showSelectionPalette: true, - maxPaletteSize: 10, - cancelText: "取消", - chooseText: "确定颜色", - togglePaletteMoreText: "更多", - togglePaletteLessText: "少于", - clearText: "清除颜色选择", - noColorSelectedText: "没有颜色被选择", - palette: [["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", "rgb(204, 204, 204)", "rgb(217, 217, 217)", "rgb(255, 255, 255)"], ["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)", "rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"], ["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)", "rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)"], ["rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)", "rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)"], ["rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)", "rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)"], ["rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)", "rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)"], ["rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)", "rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"], ["#c1232b", "#27727b", "#fcce10", "#e87c25", "#b5c334", "#fe8463", "#9bca63", "#fad860", "#f3a43b", "#60c0dd", "#d7504b", "#c6e579", "#f4e001", "#f0805a", "#26c0c0", "#c12e34", "#e6b600", "#0098d9", "#2b821d", "#005eaa", "#339ca8", "#cda819", "#32a487", "#3fb1e3", "#6be6c1", "#626c91", "#a0a7e6", "#c4ebad", "#96dee8"]], - change: function (color) { - var $input = $(this); - if (color != null) { - color = color.toHexString(); - } - else { - color = "rgb(0, 0, 0)"; - } - - var oldcolor = null; - if(luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").length>0){ - oldcolor = luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").css("background-color"); - } - - luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); - luckysheetcurrentSheetitem.append('
'); - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - luckysheetfile[index].color = color; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, color, { "k": "color" }); - - if (clearjfundo) { - var redo = {}; - redo["type"] = "sheetColor"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["oldcolor"] = oldcolor; - redo["color"] = color; - - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - } - } - }); - - $("#luckysheetsheetconfigcolorreset").click(function () { - var oldcolor = null; - if(luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").length>0){ - oldcolor = luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").css("background-color"); - } - - luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - luckysheetfile[index].color = null; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, null, { "k": "color" } ); - - if (clearjfundo) { - var redo = {}; - redo["type"] = "sheetColor"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["oldcolor"] = oldcolor; - redo["color"] = null; - - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - } - }); - } - - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - if (luckysheetfile[index].color != null && luckysheetfile[index].color.length > 0) { - $("#luckysheetsheetconfigcolorur").spectrum("set", luckysheetfile[index].color); - - } - - //showrightclickmenu($("#luckysheet-rightclick-sheet-menu"), luckysheetcurrentSheetitem.offset().left + 46, event.pageY); - $("#luckysheetsheetconfigcolorur").parent().find("span, div, button, input, a").addClass("luckysheet-mousedown-cancel"); - setTimeout(function(){ - mouseclickposition($("#luckysheet-rightclick-sheet-menu"), luckysheetcurrentSheetitem.offset().left + luckysheetcurrentSheetitem.width(), luckysheetcurrentSheetitem.offset().top - 18, "leftbottom"); - },1); - - } - - - var luckysheetsheetrightclick = function ($t, $cur, e) { - //var $t = $(this), $cur = $(e.target); - clearTimeout(jfdbclicklagTimeout); - //console.log($cur, $cur.hasClass("luckysheet-sheets-item-name"), $cur.attr("contenteditable")); - if ($cur.hasClass("luckysheet-sheets-item-name") && $cur.attr("contenteditable") == "true") { - return; - } - if (luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start || luckysheet.formula.israngeseleciton()) { - //luckysheet.formula.rangeSetValue({ "row": [row_index, row_index], "column": [col_index, col_index] }); - //luckysheet.formula.rangestart = true; - //this.rangeSetValueTo.parent(); - - setTimeout(function () { - luckysheet.formula.setCaretPosition(luckysheet.formula.rangeSetValueTo.get(0), 0, luckysheet.formula.rangeSetValueTo.text().length); - luckysheet.formula.createRangeHightlight(); - $("#luckysheet-input-box-index").find(".luckysheet-input-box-index-sheettxt").remove().end().prepend("" + luckysheet.sheetmanage.getSheetName(luckysheet.formula.rangetosheet) + "!").show(); - $("#luckysheet-input-box-index").css({"left": $("#luckysheet-input-box").css("left"), "top": (parseInt($("#luckysheet-input-box").css("top")) - 20) + "px", "z-index": $("#luckysheet-input-box").css("z-index")}); - }, 1); - //$("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); - } - else { - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); - } - - $("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active"); - $t.addClass("luckysheet-sheets-item-active"); - luckysheet.cleargridelement(e); - luckysheet.sheetmanage.changeSheet($t.data("index")); - //$("#luckysheet-input-box").hide(); - //console.log(luckysheet.formula.rangestart); - - - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - - if ($cur.hasClass("luckysheet-sheets-item-menu") || $cur.hasClass("fa-sort-desc") || e.which == "3") { - luckysheetcurrentSheetitem = $cur.closest(".luckysheet-sheets-item"); - showsheetconfigmenu(); - } - } - - $("#luckysheet-sheet-area").on("mousedown", "div.luckysheet-sheets-item", function (e) { - if(luckysheet.isEditMode()){ - // alert("非编辑模式下不允许该操作!"); - return; - } - - var $t = $(this), $cur = $(e.target), $item = $cur.closest(".luckysheet-sheets-item"); - - if (e.which == "3") { - luckysheetsheetrightclick($t, $cur, e); - luckysheetcurrentSheetitem = $item; - showsheetconfigmenu(); - - return; - } - - if ($item.hasClass("luckysheet-sheets-item-active") && $item.find(".luckysheet-sheets-item-name").attr("contenteditable") == "false") { - jfdbclicklagTimeout = setTimeout(function () { - luckysheet_sheet_move_status = true; - luckysheet_sheet_move_data = {}; - luckysheet_sheet_move_data.widthlist = []; - - $("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").each(function (i) { - if (i == 0) { - luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth())); - } - else { - luckysheet_sheet_move_data.widthlist.push(parseInt($(this).outerWidth()) + luckysheet_sheet_move_data.widthlist[i - 1]); - } - }); - - luckysheet_sheet_move_data.curindex = $("#luckysheet-sheet-area div.luckysheet-sheets-item").index($item); - var x = e.pageX; - luckysheet_sheet_move_data.curleft = x - $item.offset().left; - luckysheet_sheet_move_data.pageX = x; - luckysheet_sheet_move_data.activeobject = $item; - luckysheet_sheet_move_data.cursorobject = $cur; - var $itemclone = $item.clone().css("visibility", "hidden").attr("id", "luckysheet-sheets-item-clone"); - $item.after($itemclone); - $item.css({ "position": "absolute", "opacity": 0.8, "cursor": "move", "transition": "initial", "z-index": 10 }); - //$cur.css({ "cursor": "move" }); - }, 200); - } - }).on("click", "div.luckysheet-sheets-item", function (e) { - if(luckysheet.isEditMode()){ - // alert("非编辑模式下不允许该操作!"); - return; - } - - var $t = $(this), $cur = $(e.target); - luckysheetsheetrightclick($t, $cur, e); - }); - - - var luckysheetsheetnameeditor = function ($t) { - //var $t = $(this); - $t.attr("contenteditable", "true").addClass("luckysheet-mousedown-cancel").data("oldtxt", $t.text()); - - setTimeout(function () { - if (document.selection) { - var range = document.body.createTextRange(); - range.moveToElementText($t.get(0)); - range.select(); - } else if (window.getSelection) { - var range = document.createRange(); - range.selectNodeContents($t.get(0)); - window.getSelection().removeAllRanges(); - window.getSelection().addRange(range); - } - }, 1); - } - - $("#luckysheet-sheet-area").on("dblclick", "span.luckysheet-sheets-item-name", function (e) { - luckysheetsheetnameeditor($(this)); - }); - - $("#luckysheet-sheet-area").on("blur", "span.luckysheet-sheets-item-name", function (e) { - var $t = $(this); - var txt = $t.text(), oldtxt = $t.data("oldtxt"); - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - for (var i = 0; i < luckysheetfile.length; i++) { - if (index != i && luckysheetfile[i].name == txt) { - if(luckysheet.isEditMode()){ - alert("标签页的名称不能重复!请重新修改"); - } - else{ - luckysheet.tooltip.info("提示", "标签页的名称不能重复!请重新修改"); - } - $t.text(oldtxt).attr("contenteditable", "false"); - return; - } - } - - var winW = $(window).width(); - - var c_width = 0; - $("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){ - c_width += $(this).outerWidth(); - }); - - if (c_width >= winW * 0.7) { - $("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display", "inline-block"); - $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); - } - - luckysheetfile[index].name = txt; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, txt, { "k": "name" }); - - $t.attr("contenteditable", "false").removeClass("luckysheet-mousedown-cancel"); - - if (clearjfundo) { - var redo = {}; - redo["type"] = "sheetName"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["oldtxt"] = oldtxt; - redo["txt"] = txt; - - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - } - }); - - $("#luckysheet-sheet-area").on("keydown", "span.luckysheet-sheets-item-name", function (e) { - var kcode = e.keyCode; - var $t = $(this); - if (kcode == keycode.ENTER) { - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - luckysheetfile[index].name = $t.text(); - $t.attr("contenteditable", "false"); - } - }); - - $("#luckysheetsheetconfigrename").click(function () { - luckysheetsheetnameeditor(luckysheetcurrentSheetitem.find("span.luckysheet-sheets-item-name")); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - }); - - $("#luckysheetsheetconfigshow").click(function () { - $("#luckysheet-sheets-m").click(); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-rightclick-sheet-menu").hide(); - }); - - $("#luckysheetsheetconfigmoveleft").click(function () { - //var oldorders = luckysheet.sheetmanage.getCurrentOrder(); - if (luckysheetcurrentSheetitem.prevAll(":visible").length > 0) { - luckysheetcurrentSheetitem.insertBefore(luckysheetcurrentSheetitem.prevAll(":visible").eq(0)); - luckysheet.sheetmanage.reOrderAllSheet(); - } - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - //var orders = luckysheet.sheetmanage.getCurrentOrder(); - - // if (clearjfundo) { - // var redo = {}; - // redo["type"] = "sheetorder"; - // luckysheet.jfundo = []; - // redo["oldorders"] = oldorders; - // redo["orders"] = orders; - // luckysheet.jfredo.push(redo); - // } - }); - - $("#luckysheetsheetconfigmoveright").click(function () { - if (luckysheetcurrentSheetitem.nextAll(":visible").length > 0) { - luckysheetcurrentSheetitem.insertAfter(luckysheetcurrentSheetitem.nextAll(":visible").eq(0)); - luckysheet.sheetmanage.reOrderAllSheet(); - } - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - }); - - $("#luckysheetsheetconfigdelete").click(function (e) { - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - - if($("#luckysheet-sheet-container-c .luckysheet-sheets-item:visible").length <= 1){ - if(luckysheet.isEditMode()){ - alert("工作薄内至少含有一张可视工作表。若需删除选定的工作表,请先插入一张新工作表或显示一张隐藏的工作表。"); - } - else{ - luckysheet.tooltip.info("工作薄内至少含有一张可视工作表。若需删除选定的工作表,请先插入一张新工作表或显示一张隐藏的工作表。", ""); - } - - return; - } - - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - - luckysheet.tooltip.confirm("是否删除【" + luckysheetfile[index].name + "】?", "可以通过Ctrl+Z撤销删除", function () { - luckysheet.sheetmanage.deleteSheet(luckysheetcurrentSheetitem.data("index")); - }, null); - - $("#luckysheet-input-box").removeAttr("style"); - }); - - - $("#luckysheetsheetconfigcopy").click(function (e) { - //var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - luckysheet.sheetmanage.copySheet(luckysheetcurrentSheetitem.data("index"), e); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - }); - - $("#luckysheetsheetconfighide").click(function () { - if ($("#luckysheet-sheet-area div.luckysheet-sheets-item:visible").length == 1) { - if(luckysheet.isEditMode()){ - alert("不能隐藏, 至少保留一个sheet标签"); - } - else{ - luckysheet.tooltip.info("不能隐藏", "至少保留一个sheet标签"); - } - return; - } - luckysheet.sheetmanage.setSheetHide(luckysheetcurrentSheetitem.data("index")); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide(); - }); - - - $("#luckysheet-sheets-add").click(function (e) { - luckysheet.sheetmanage.addNewSheet(e); - - luckysheet.sheetmanage.locationSheet(); - // var $c = $("#luckysheet-sheet-container-c"), c_width = $c.width(), winW = $("#"+container).width(); - // $c.scrollLeft(100000000000); - - // if (c_width + $c.scrollLeft() >= winW * 0.7) { - // //console.log(c_width, $c.scrollLeft(), winW * 0.7); - // $("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display", "inline-block"); - // $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); - // } - //$("#luckysheet-input-box").hide(); - $("#luckysheet-input-box").removeAttr("style"); - }); - - var sheetscrollani = null, sheetscrollstart = 0, sheetscrollend = 0, sheetscrollstep = 150; - $("#luckysheet-sheets-leftscroll").click(function () { - var $c = $("#luckysheet-sheet-container-c"); - sheetscrollstart = $c.scrollLeft(); - sheetscrollend = $c.scrollLeft() - sheetscrollstep; - if (sheetscrollend <= 0) { - $("#luckysheet-sheet-container .docs-sheet-fade-left").hide(); - } - $("#luckysheet-sheet-container .docs-sheet-fade-right").show(); - clearInterval(sheetscrollani); - sheetscrollani = setInterval(function () { - //console.log(sheetscrollstart, sheetscrollend); - sheetscrollstart -= 4; - $c.scrollLeft(sheetscrollstart); - if (sheetscrollstart <= sheetscrollend) { - clearInterval(sheetscrollani); - } - }, 1); - - }); - - - $("#luckysheet-sheets-rightscroll").click(function () { - var $c = $("#luckysheet-sheet-container-c"); - sheetscrollstart = $c.scrollLeft(); - sheetscrollend = $c.scrollLeft() + sheetscrollstep; - if (sheetscrollstart > 0) { - $("#luckysheet-sheet-container .docs-sheet-fade-right").hide(); - } - $("#luckysheet-sheet-container .docs-sheet-fade-left").show(); - clearInterval(sheetscrollani); - sheetscrollani = setInterval(function () { - //console.log(sheetscrollstart, sheetscrollend); - sheetscrollstart += 4; - $c.scrollLeft(sheetscrollstart); - if (sheetscrollstart >= sheetscrollend) { - clearInterval(sheetscrollani); - } - }, 1); - - }); - - var initialOpenSheet = true; - $("#luckysheet-sheets-m").click(function (e) { - - $("#luckysheet-sheet-list").html(""); - - var item = ""; - for (var i = 0; i < luckysheetfile.length; i++) { - var f = luckysheetfile[i], icon = '', style = ""; - //console.log(f.status); - if (f["status"] == 1) { - icon = ''; - } - - if (f["hide"] == 1) { - icon = ''; - style += "color:#BBBBBB;"; - } - - if (f["color"] != null && f["color"].length > 0) { - style += "border-right:4px solid " + f["color"] + ";"; - } - - item += luckysheet.replaceHtml(sheetselectlistitemHTML, { "index": f["index"], "name": f["name"], "icon": icon, "style": style }); - } - - if (initialOpenSheet) { - $("#" + container).append(luckysheet.replaceHtml(sheetselectlistHTML, { "item": item })); - $("#luckysheet-sheet-list").on("click", ".luckysheet-cols-menuitem", function (e) { - if(luckysheet.isEditMode()){ - // luckysheet.tooltip.info("提示", "图表编辑模式下不允许该操作!"); - alert("图表编辑模式下不允许该操作!"); - return; - } - - var $item = $(this), index = $item.data("index"); - - if ($item.data("index") != luckysheet.currentSheetIndex) { - luckysheet.sheetmanage.setSheetShow(index); - - luckysheet.sheetmanage.locationSheet(); - } - }); - initialOpenSheet = false; - } - else { - $("#luckysheet-sheet-list").html(item); - } - - $t = $("#luckysheet-sheet-list"); - - //$t.find("span.icon").html(""); - //$("#luckysheet-sheet-btn" + luckysheet.currentSheetIndex + " span.icon").html(''); - - mouseclickposition($t, $(this).offset().left, $(this).offset().top - 12, "leftbottom"); - //$("#luckysheet-input-box").hide(); - $("#luckysheet-input-box").removeAttr("style"); - //$t.css({"left":"", "top":"", "display":"block"}); - }); - - var luckysheetextendtable = function (type, index, value, direction) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - value = Math.floor(value); - var cfg = $.extend(true, {}, config); - - //合并单元格配置变动 - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - var merge_new = {}; - for(var m in cfg["merge"]){ - var mc = cfg["merge"][m]; - - var r = mc.r, - c = mc.c, - rs = mc.rs, - cs = mc.cs; - - if(type == "row"){ - if(index < r){ - merge_new[(r + value) + "_" + c] = { "r": r + value, "c": c, "rs": rs, "cs": cs }; - } - else if(index == r){ - if(direction == "lefttop"){ - merge_new[(r + value) + "_" + c] = { "r": r + value, "c": c, "rs": rs, "cs": cs }; - } - else{ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs + value, "cs": cs }; - } - } - else if(index < r + rs - 1){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs + value, "cs": cs }; - } - else if(index == r + rs - 1){ - if(direction == "lefttop"){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs + value, "cs": cs }; - } - else{ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; - } - } - else{ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; - } - } - else if(type == "column"){ - if(index < c){ - merge_new[r + "_" + (c + value)] = { "r": r, "c": c + value, "rs": rs, "cs": cs }; - } - else if(index == c){ - if(direction == "lefttop"){ - merge_new[r + "_" + (c + value)] = { "r": r, "c": c + value, "rs": rs, "cs": cs }; - } - else{ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs + value }; - } - } - else if(index < c + cs - 1){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs + value }; - } - else if(index == c + cs - 1){ - if(direction == "lefttop"){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs + value }; - } - else{ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; - } - } - else{ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; - } - } - } - cfg["merge"] = merge_new; - - //公式配置变动 - var calcChain = file.calcChain; - var newCalcChain = []; - if(calcChain != null && calcChain.length > 0){ - for(var i = 0; i < calcChain.length; i++){ - var calc = $.extend(true, {}, calcChain[i]); - var calc_r = calc.r, calc_c = calc.c, calc_i = calc.index, calc_funcStr = calc.func[2]; - - if(type == "row"){ - var functionStr = "=" + luckysheet.formula.functionStrChange(calc_funcStr, "add", "row", direction, index, value); - - if(d[calc_r][calc_c].f == calc_funcStr){ - d[calc_r][calc_c].f = functionStr; - } - - calc.func[2] = functionStr; - - if(direction == "lefttop"){ - if(calc_r >= index){ - calc.r += value; - } - } - else if(direction == "rightbottom"){ - if(calc_r > index){ - calc.r += value; - } - } - - newCalcChain.push(calc); - } - else if(type == "column"){ - var functionStr = "=" + luckysheet.formula.functionStrChange(calc_funcStr, "add", "col", direction, index, value); - - if(d[calc_r][calc_c].f == calc_funcStr){ - d[calc_r][calc_c].f = functionStr; - } - - calc.func[2] = functionStr; - - if(direction == "lefttop"){ - if(calc_c >= index){ - calc.c += value; - } - } - else if(direction == "rightbottom"){ - if(calc_c > index){ - calc.c += value; - } - } - - newCalcChain.push(calc); - } - } - } - - //筛选配置变动 - var filter_select = file.filter_select; - var filter = file.filter; - var newFilterObj = null; - if(filter_select != null && JSON.stringify(filter_select) != "{}"){ - newFilterObj = { "filter_select": null, "filter": null }; - - var f_r1 = filter_select.row[0], f_r2 = filter_select.row[1]; - var f_c1 = filter_select.column[0], f_c2 = filter_select.column[1]; - - if(type == "row"){ - if(f_r1 < index){ - if(f_r2 == index && direction == "lefttop"){ - f_r2 += value; - } - else if(f_r2 > index){ - f_r2 += value; - } - } - else if(f_r1 == index){ - if(direction == "lefttop"){ - f_r1 += value; - f_r2 += value; - } - else if(direction == "rightbottom" && f_r2 > index){ - f_r2 += value; - } - } - else{ - f_r1 += value; - f_r2 += value; - } - - if(filter != null){ - newFilterObj.filter = {}; - - for(var k in filter){ - var f_rowhidden = filter[k].rowhidden; - var f_rowhidden_new = {}; - - for(var n in f_rowhidden){ - n = parseFloat(n); - - if(n < index){ - f_rowhidden_new[n] = 0; - } - else if(n == index){ - if(direction == "lefttop"){ - f_rowhidden_new[n + value] = 0; - } - else if(direction == "rightbottom"){ - f_rowhidden_new[n] = 0; - } - } - else{ - f_rowhidden_new[n + value] = 0; - } - } - - newFilterObj.filter[k] = $.extend(true, {}, filter[k]); - newFilterObj.filter[k].rowhidden = f_rowhidden_new; - newFilterObj.filter[k].str = f_r1; - newFilterObj.filter[k].edr = f_r2; - } - } - } - else if(type == "column"){ - if(f_c1 < index){ - if(f_c2 == index && direction == "lefttop"){ - f_c2 += value; - } - else if(f_c2 > index){ - f_c2 += value; - } - } - else if(f_c1 == index){ - if(direction == "lefttop"){ - f_c1 += value; - f_c2 += value; - } - else if(direction == "rightbottom" && f_c2 > index){ - f_c2 += value; - } - } - else{ - f_c1 += value; - f_c2 += value; - } - - if(filter != null){ - newFilterObj.filter = {}; - - for(var k in filter){ - var f_cindex = filter[k].cindex; - - if(f_cindex == index && direction == "lefttop"){ - f_cindex += value; - } - else if(f_cindex > index){ - f_cindex += value; - } - - newFilterObj.filter[f_cindex - f_c1] = $.extend(true, {}, filter[k]); - newFilterObj.filter[f_cindex - f_c1].cindex = f_cindex; - newFilterObj.filter[f_cindex - f_c1].stc = f_c1; - newFilterObj.filter[f_cindex - f_c1].edc = f_c2; - } - } - } - - newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; - } - - if(newFilterObj != null && newFilterObj.filter != null){ - cfg["rowhidden"] = {}; - - for(var k in newFilterObj.filter){ - var f_rowhidden = newFilterObj.filter[k].rowhidden; - - for(var n in f_rowhidden){ - cfg["rowhidden"][n] = 0; - } - } - } - else{ - delete cfg["rowhidden"]; - } - - //条件格式配置变动 - var CFarr = file.luckysheet_conditionformat_save; - var newCFarr = []; - if(CFarr != null && CFarr.length > 0){ - for(var i = 0; i < CFarr.length; i++){ - var cf_range = CFarr[i].cellrange; - var cf_new_range = []; - - for(var j = 0; j < cf_range.length; j++){ - var CFr1 = cf_range[j].row[0], - CFr2 = cf_range[j].row[1], - CFc1 = cf_range[j].column[0], - CFc2 = cf_range[j].column[1]; - - if(type == "row"){ - if(CFr1 < index){ - if(CFr2 == index && direction == "lefttop"){ - CFr2 += value; - } - else if(CFr2 > index){ - CFr2 += value; - } - } - else if(CFr1 == index){ - if(direction == "lefttop"){ - CFr1 += value; - CFr2 += value; - } - else if(direction == "rightbottom" && CFr2 > index){ - CFr2 += value; - } - } - else{ - CFr1 += value; - CFr2 += value; - } - } - else if(type == "column"){ - if(CFc1 < index){ - if(CFc2 == index && direction == "lefttop"){ - CFc2 += value; - } - else if(CFc2 > index){ - CFc2 += value; - } - } - else if(CFc1 == index){ - if(direction == "lefttop"){ - CFc1 += value; - CFc2 += value; - } - else if(direction == "rightbottom" && CFc2 > index){ - CFc2 += value; - } - } - else{ - CFc1 += value; - CFc2 += value; - } - } - - cf_new_range.push({ "row": [CFr1, CFr2], "column": [CFc1, CFc2] }); - } - - var cf = $.extend(true, {}, CFarr[i]); - cf.cellrange = cf_new_range; - - newCFarr.push(cf); - } - } - - //交替颜色配置变动 - var AFarr = file.luckysheet_alternateformat_save; - var newAFarr = []; - if(AFarr != null && AFarr.length > 0){ - for(var i = 0; i < AFarr.length; i++){ - var AFr1 = AFarr[i].cellrange.row[0], - AFr2 = AFarr[i].cellrange.row[1], - AFc1 = AFarr[i].cellrange.column[0], - AFc2 = AFarr[i].cellrange.column[1]; - - var af = $.extend(true, {}, AFarr[i]); - - if(type == "row"){ - if(AFr1 < index){ - if(AFr2 == index && direction == "lefttop"){ - AFr2 += value; - } - else if(AFr2 > index){ - AFr2 += value; - } - } - else if(AFr1 == index){ - if(direction == "lefttop"){ - AFr1 += value; - AFr2 += value; - } - else if(direction == "rightbottom" && AFr2 > index){ - AFr2 += value; - } - } - else{ - AFr1 += value; - AFr2 += value; - } - } - else if(type == "column"){ - if(AFc1 < index){ - if(AFc2 == index && direction == "lefttop"){ - AFc2 += value; - } - else if(AFc2 > index){ - AFc2 += value; - } - } - else if(AFc1 == index){ - if(direction == "lefttop"){ - AFc1 += value; - AFc2 += value; - } - else if(direction == "rightbottom" && AFc2 > index){ - AFc2 += value; - } - } - else{ - AFc1 += value; - AFc2 += value; - } - } - - af.cellrange = { "row": [AFr1, AFr2], "column": [AFc1, AFc2] }; - - newAFarr.push(af); - } - } - - //冻结配置变动 - var newFreezen = { "freezenhorizontaldata": null, "freezenverticaldata": null }; - if(luckysheet.freezen.freezenhorizontaldata != null && type == "row"){ - var freezen_scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - var freezen_row_st = luckysheet.freezen.freezenhorizontaldata[1] - 1; - - if(freezen_row_st == index && direction == "lefttop"){ - freezen_row_st += value; - } - else if(freezen_row_st > index){ - freezen_row_st += value; - } - - var freezen_top = visibledatarow[freezen_row_st] - 2 - freezen_scrollTop + columeHeaderHeight; - - newFreezen.freezenhorizontaldata = [visibledatarow[freezen_row_st], freezen_row_st + 1, freezen_scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, freezen_row_st + 1), freezen_top]; - } - else{ - newFreezen.freezenhorizontaldata = luckysheet.freezen.freezenhorizontaldata; - } - - if(luckysheet.freezen.freezenverticaldata != null && type == "column"){ - var freezen_scrollLeft = luckysheet.freezen.freezenverticaldata[2]; - var freezen_col_st = luckysheet.freezen.freezenverticaldata[1] - 1; - - if(freezen_col_st == index && direction == "lefttop"){ - freezen_col_st += value; - } - else if(freezen_col_st > index){ - freezen_col_st += value; - } - - var freezen_left = visibledatacolumn[freezen_col_st] - 2 - freezen_scrollLeft + rowHeaderWidth; - - newFreezen.freezenverticaldata = [visibledatacolumn[freezen_col_st], freezen_col_st + 1, freezen_scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, freezen_col_st + 1), freezen_left]; - } - else{ - newFreezen.freezenverticaldata = luckysheet.freezen.freezenverticaldata; - } - - if (type == "row") { - var type1 = "r"; - - //行高配置变动 - if(cfg["rowlen"] != null){ - var rowlen_new = {}; - - for(var r in cfg["rowlen"]){ - r = parseFloat(r); - - if(r < index){ - rowlen_new[r] = cfg["rowlen"][r]; - } - else if(r == index){ - if(direction == "lefttop"){ - rowlen_new[(r + value)] = cfg["rowlen"][r]; - } - else if(direction == "rightbottom"){ - rowlen_new[r] = cfg["rowlen"][r]; - } - } - else{ - rowlen_new[(r + value)] = cfg["rowlen"][r]; - } - } - - cfg["rowlen"] = rowlen_new; - } - - //空行模板 - var row = []; - for(var c = 0; c < d[0].length; c++){ - row.push(null); - } - - //边框 - if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ - var borderInfo = []; - - for(var i = 0; i < cfg["borderInfo"].length; i++){ - var rangeType = cfg["borderInfo"][i].rangeType; - - if(rangeType == "range"){ - var borderRange = cfg["borderInfo"][i].range; - - var emptyRange = []; - - for(var j = 0; j < borderRange.length; j++){ - var bd_r1 = borderRange[j].row[0], - bd_r2 = borderRange[j].row[1]; - - if(direction == "lefttop"){ - if(index <= bd_r1){ - bd_r1 += value; - bd_r2 += value; - } - else if(index <= bd_r2){ - bd_r2 += value; - } - } - else{ - if(index < bd_r1){ - bd_r1 += value; - bd_r2 += value; - } - else if(index < bd_r2){ - bd_r2 += value; - } - } - - if(bd_r2 >= bd_r1){ - emptyRange.push({ "row": [bd_r1, bd_r2], "column": borderRange[j].column }); - } - } - - if(emptyRange.length > 0){ - var bd_obj = { - "rangeType": "range", - "borderType": cfg["borderInfo"][i].borderType, - "style": cfg["borderInfo"][i].style, - "color": cfg["borderInfo"][i].color, - "range": emptyRange - } - - borderInfo.push(bd_obj); - } - } - else if(rangeType == "cell"){ - var row_index = cfg["borderInfo"][i].value.row_index; - - if(direction == "lefttop"){ - if(index <= row_index){ - row_index += value; - } - } - else{ - if(index < row_index){ - row_index += value; - } - } - - cfg["borderInfo"][i].value.row_index = row_index; - borderInfo.push(cfg["borderInfo"][i]); - } - } - - cfg["borderInfo"] = borderInfo; - } - - var arr = []; - for (var r = 0; r < value; r++) { - arr.push(JSON.stringify(row)); - } - - if(direction == "lefttop"){ - if(index == 0){ - eval('d.unshift(' + arr.join(",") + ')'); - } - else{ - eval('d.splice(' + index + ', 0, ' + arr.join(",") + ')'); - } - } - else{ - eval('d.splice(' + (index + 1) + ', 0, ' + arr.join(",") + ')'); - } - } - else { - var type1 = "c"; - - //行高配置变动 - if(cfg["columlen"] != null){ - var columlen_new = {}; - - for(var c in cfg["columlen"]){ - c = parseFloat(c); - - if(c < index){ - columlen_new[c] = cfg["columlen"][c]; - } - else if(c == index){ - if(direction == "lefttop"){ - columlen_new[(c + value)] = cfg["columlen"][c]; - } - else if(direction == "rightbottom"){ - columlen_new[c] = cfg["columlen"][c]; - } - } - else{ - columlen_new[(c + value)] = cfg["columlen"][c]; - } - } - - cfg["columlen"] = columlen_new; - } - - //空列模板 - var col = []; - for(var r = 0; r < d.length; r++){ - col.push(null); - } - - //边框 - if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ - var borderInfo = []; - - for(var i = 0; i < cfg["borderInfo"].length; i++){ - var rangeType = cfg["borderInfo"][i].rangeType; - - if(rangeType == "range"){ - var borderRange = cfg["borderInfo"][i].range; - - var emptyRange = []; - - for(var j = 0; j < borderRange.length; j++){ - var bd_c1 = borderRange[j].column[0], - bd_c2 = borderRange[j].column[1]; - - if(direction == "lefttop"){ - if(index <= bd_c1){ - bd_c1 += value; - bd_c2 += value; - } - else if(index <= bd_c2){ - bd_c2 += value; - } - } - else{ - if(index < bd_c1){ - bd_c1 += value; - bd_c2 += value; - } - else if(index < bd_c2){ - bd_c2 += value; - } - } - - if(bd_c2 >= bd_c1){ - emptyRange.push({ "row": borderRange[j].row, "column": [bd_c1, bd_c2] }); - } - } - - if(emptyRange.length > 0){ - var bd_obj = { - "rangeType": "range", - "borderType": cfg["borderInfo"][i].borderType, - "style": cfg["borderInfo"][i].style, - "color": cfg["borderInfo"][i].color, - "range": emptyRange - } - - borderInfo.push(bd_obj); - } - } - else if(rangeType == "cell"){ - var col_index = cfg["borderInfo"][i].value.col_index; - - if(direction == "lefttop"){ - if(index <= col_index){ - col_index += value; - } - } - else{ - if(index < col_index){ - col_index += value; - } - } - - cfg["borderInfo"][i].value.col_index = col_index; - borderInfo.push(cfg["borderInfo"][i]); - } - } - - cfg["borderInfo"] = borderInfo; - } - - for (var r = 0; r < d.length; r++) { - var row = d[r]; - - for(var i = 0; i < value; i++){ - if(direction == "lefttop"){ - if(index == 0){ - row.unshift(col[r]); - } - else{ - row.splice(index, 0, col[r]); - } - } - else{ - row.splice((index + 1), 0, col[r]); - } - } - } - } - - luckysheet.jfrefreshgrid_adRC(d, cfg, "addRC", { "index": index, "len": value, "direction": direction, "rc": type1, "restore": false }, newCalcChain, newFilterObj, newCFarr, newAFarr, newFreezen); - - var range = null; - if(type == "row"){ - if(direction == "lefttop"){ - range = [{ "row": [index, index + value - 1], "column": [0 , d[0].length - 1] }]; - } - else{ - range = [{ "row": [index + 1, index + value], "column": [0 , d[0].length - 1] }]; - } - } - else{ - if(direction == "lefttop"){ - range = [{ "row": [0, d.length - 1], "column": [index, index + value - 1] }]; - } - else{ - range = [{ "row": [0, d.length - 1], "column": [index + 1, index + value] }]; - } - } - luckysheet_select_save = range; - luckysheet.selectHightlightShow(); - - if (type == "row"){ - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var winH = $("#luckysheet-cell-main").height(), winW = $("#luckysheet-cell-main").width(); - - var row = visibledatarow[range[0].row[1]], row_pre = range[0].row[0] - 1 == -1 ? 0 : visibledatarow[range[0].row[0] - 1]; - // var col = visibledatacolumn[range[0].column[1]], col_pre = range[0].column[0] - 1 == -1 ? 0 : visibledatacolumn[range[0].column[0] - 1]; - - // if (col - scrollLeft - winW + 20 > 0) { - // $("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20); - // } - // else if (col_pre - scrollLeft - 20 < 0) { - // $("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20); - // } - - if (row - scrollTop - winH + 20 > 0) { - $("#luckysheet-scrollbar-y").scrollTop(row - winH + 20); - } - else if (row_pre - scrollTop - 20 < 0) { - $("#luckysheet-scrollbar-y").scrollTop(row_pre - 20); - } - - if(value > 30){ - $("#luckysheet-row-count-show").hide(); - $("#luckysheet-column-count-show").hide(); - } - } - } - luckysheet.luckysheetextendtable = luckysheetextendtable; - - var luckysheetextendData = function (rowlen, newData) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - var collen = d[0].length; - var addNullData = luckysheet.datagridgrowth([], rowlen, collen); - - d = d.concat(addNullData); - - for(var i = 0; i < newData.length; i++){ - var r = newData[i].r, - c = newData[i].c, - v = newData[i].v; - - luckysheet.setcellvalue(r, c, d, v); - - if(v != null && v.mc != null && v.mc.rs != null){ - cfg["merge"][v.mc.r + "_" + v.mc.c] = $.extend(true, {}, v.mc); - } - } - - //luckysheet.flowdata - luckysheet.flowdata = d; - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = d; - - //config - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - //行高、列宽刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - luckysheet.luckysheetextendData = luckysheetextendData; - - //向左增加列,向上增加行 - $("#luckysheet-add-lefttop, #luckysheet-add-lefttop_t").click(function (event) { - $("#luckysheet-rightclick-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - - return; - } - - var $t = $(this), value = $t.parent().find("input").val(); - if (!luckysheet.func_methods.isRealNum(value)) { - if(luckysheet.isEditMode()){ - alert("增加错误, 请输入数字"); - } - else{ - luckysheet.tooltip.info("增加错误, 请输入数字", ""); - } - - return; - } - - value = parseInt(value); - - if (value < 1 || value > 100) { - if(luckysheet.isEditMode()){ - alert("增加错误, 增加范围限制在1-100"); - } - else{ - luckysheet.tooltip.info("增加错误, 增加范围限制在1-100", ""); - } - return; - } - - var st_index = luckysheet_select_save[0][luckysheetRightHeadClickIs][0]; - luckysheetextendtable(luckysheetRightHeadClickIs, st_index, value, "lefttop"); - }); - - //向右增加列,向下增加行 - $("#luckysheet-add-rightbottom, #luckysheet-add-rightbottom_t").click(function (event) { - $("#luckysheet-rightclick-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - - return; - } - - var $t = $(this), value = $t.parent().find("input").val(); - if (!luckysheet.func_methods.isRealNum(value)) { - if(luckysheet.isEditMode()){ - alert("增加错误, 请输入数字"); - } - else{ - luckysheet.tooltip.info("增加错误, 请输入数字", ""); - } - - return; - } - - value = parseInt(value); - - if (value < 1 || value > 100) { - if(luckysheet.isEditMode()){ - alert("增加错误, 增加范围限制在1-100"); - } - else{ - luckysheet.tooltip.info("增加错误, 增加范围限制在1-100", ""); - } - - return; - } - - var st_index = luckysheet_select_save[0][luckysheetRightHeadClickIs][1]; - luckysheetextendtable(luckysheetRightHeadClickIs, st_index, value, "rightbottom"); - }); - - var luckysheetdeletetable = function (type, st, ed) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - var slen = ed - st + 1; - var cfg = $.extend(true, {}, config); - - //合并单元格配置变动 - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - var merge_new = {}; - for(var m in cfg["merge"]){ - var mc = cfg["merge"][m]; - - var r = mc.r, - c = mc.c, - rs = mc.rs, - cs = mc.cs; - - if(type == "row"){ - if(r < st){ - if(r + rs - 1 < st){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; - } - else if(r + rs - 1 >= st && r + rs - 1 < ed){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": st - r, "cs": cs }; - } - else if(r + rs - 1 >= ed){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs - slen, "cs": cs }; - } - } - else if(r >= st && r <= ed){ - if(r + rs - 1 > ed){ - merge_new[st + "_" + c] = { "r": st, "c": c, "rs": r + rs - 1 - ed, "cs": cs }; - } - } - else if(r > ed){ - merge_new[(r - slen) + "_" + c] = { "r": r - slen, "c": c, "rs": rs, "cs": cs }; - } - } - else if(type == "column"){ - if(c < st){ - if(c + cs - 1 < st){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs }; - } - else if(c + cs - 1 >= st && c + cs - 1 < ed){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": st - c }; - } - else if(c + cs - 1 >= ed){ - merge_new[r + "_" + c] = { "r": r, "c": c, "rs": rs, "cs": cs - slen }; - } - } - else if(c >= st && c <= ed){ - if(c + cs - 1 > ed){ - merge_new[r + "_" + st] = { "r": r, "c": st, "rs": rs, "cs": c + cs - 1 - ed }; - } - } - else if(c > ed){ - merge_new[r + "_" + (c - slen)] = { "r": r, "c": c - slen, "rs": rs, "cs": cs }; - } - } - } - cfg["merge"] = merge_new; - - //公式配置变动 - var calcChain = file.calcChain; - var newCalcChain = []; - if(calcChain != null && calcChain.length > 0){ - for(var i = 0; i < calcChain.length; i++){ - var calc = $.extend(true, {}, calcChain[i]); - var calc_r = calc.r, calc_c = calc.c, calc_i = calc.index, calc_funcStr = calc.func[2]; - - if(type == "row"){ - if(calc_r < st || calc_r > ed){ - var functionStr = "=" + luckysheet.formula.functionStrChange(calc_funcStr, "del", "row", null, st, slen); - - if(d[calc_r][calc_c].f == calc_funcStr){ - d[calc_r][calc_c].f = functionStr; - } - - calc.func[2] = functionStr; - - if(calc_r > ed){ - calc.r = calc_r - slen; - } - - newCalcChain.push(calc); - } - } - else if(type == "column"){ - if(calc_c < st || calc_c > ed){ - var functionStr = "=" + luckysheet.formula.functionStrChange(calc_funcStr, "del", "col", null, st, slen); - - if(d[calc_r][calc_c].f == calc_funcStr){ - d[calc_r][calc_c].f = functionStr; - } - - calc.func[2] = functionStr; - - if(calc_c > ed){ - calc.c = calc_c - slen; - } - - newCalcChain.push(calc); - } - } - } - } - - //筛选配置变动 - var filter_select = file.filter_select; - var filter = file.filter; - var newFilterObj = null; - if(filter_select != null && JSON.stringify(filter_select) != "{}"){ - newFilterObj = { "filter_select": null, "filter": null }; - - var f_r1 = filter_select.row[0], f_r2 = filter_select.row[1]; - var f_c1 = filter_select.column[0], f_c2 = filter_select.column[1]; - - if(type == "row"){ - if(f_r1 > ed){ - f_r1 -= slen; - f_r2 -= slen; - - newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; - } - else if(f_r1 < st){ - if(f_r2 < st){ - - } - else if(f_r2 <= ed){ - f_r2 = st - 1; - } - else{ - f_r2 -= slen; - } - - newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; - } - - if(newFilterObj.filter_select != null && filter != null){ - for(var k in filter){ - var f_rowhidden = filter[k].rowhidden; - var f_rowhidden_new = {}; - - for(var n in f_rowhidden){ - if(n < st){ - f_rowhidden_new[n] = 0; - } - else if(n > ed){ - f_rowhidden_new[n - slen] = 0; - } - } - - if(JSON.stringify(f_rowhidden_new) != "{}"){ - if(newFilterObj.filter == null){ - newFilterObj.filter = {}; - } - - newFilterObj.filter[k] = $.extend(true, {}, filter[k]); - newFilterObj.filter[k].rowhidden = f_rowhidden_new; - newFilterObj.filter[k].str = f_r1; - newFilterObj.filter[k].edr = f_r2; - } - } - } - } - else if(type == "column"){ - if(f_c1 > ed){ - f_c1 -= slen; - f_c2 -= slen; - - newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; - } - else if(f_c1 < st){ - if(f_c2 < st){ - - } - else if(f_c2 <= ed){ - f_c2 = st - 1; - } - else{ - f_c2 -= slen; - } - - newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; - } - else{ - if(f_c2 > ed){ - f_c1 = st; - f_c2 -= slen; - - newFilterObj.filter_select = { "row": [f_r1, f_r2], "column": [f_c1, f_c2] }; - } - } - - if(newFilterObj.filter_select != null && filter != null){ - for(var k in filter){ - var f_cindex = filter[k].cindex; - - if(f_cindex < st){ - if(newFilterObj.filter == null){ - newFilterObj.filter = {}; - } - - newFilterObj.filter[f_cindex - f_c1] = $.extend(true, {}, filter[k]); - newFilterObj.filter[f_cindex - f_c1].edc = f_c2; - } - else if(f_cindex > ed){ - f_cindex -= slen; - - if(newFilterObj.filter == null){ - newFilterObj.filter = {}; - } - - newFilterObj.filter[f_cindex - f_c1] = $.extend(true, {}, filter[k]); - newFilterObj.filter[f_cindex - f_c1].cindex = f_cindex; - newFilterObj.filter[f_cindex - f_c1].stc = f_c1; - newFilterObj.filter[f_cindex - f_c1].edc = f_c2; - } - } - } - } - } - - if(newFilterObj != null && newFilterObj.filter != null){ - cfg["rowhidden"] = {}; - - for(var k in newFilterObj.filter){ - var f_rowhidden = newFilterObj.filter[k].rowhidden; - - for(var n in f_rowhidden){ - cfg["rowhidden"][n] = 0; - } - } - } - else{ - delete cfg["rowhidden"]; - } - - //条件格式配置变动 - var CFarr = file.luckysheet_conditionformat_save; - var newCFarr = []; - if(CFarr != null && CFarr.length > 0){ - for(var i = 0; i < CFarr.length; i++){ - var cf_range = CFarr[i].cellrange; - var cf_new_range = []; - - for(var j = 0; j < cf_range.length; j++){ - var CFr1 = cf_range[j].row[0], - CFr2 = cf_range[j].row[1], - CFc1 = cf_range[j].column[0], - CFc2 = cf_range[j].column[1]; - - if(type == "row"){ - if(!(CFr1 >= st && CFr2 <= ed)){ - if(CFr1 > ed){ - CFr1 -= slen; - CFr2 -= slen; - } - else if(CFr1 < st){ - if(CFr2 < st){ - - } - else if(CFr2 <= ed){ - CFr2 = st - 1; - } - else{ - CFr2 -= slen; - } - } - else{ - if(CFr2 > ed){ - CFr1 = st; - CFr2 -= slen; - } - } - - cf_new_range.push({ "row": [CFr1, CFr2], "column": [CFc1, CFc2] }); - } - } - else if(type == "column"){ - if(!(CFc1 >= st && CFc2 <= ed)){ - if(CFc1 > ed){ - CFc1 -= slen; - CFc2 -= slen; - } - else if(CFc1 < st){ - if(CFc2 < st){ - - } - else if(CFc2 <= ed){ - CFc2 = st - 1; - } - else{ - CFc2 -= slen; - } - } - else{ - if(CFc2 > ed){ - CFc1 = st; - CFc2 -= slen; - } - } - - cf_new_range.push({ "row": [CFr1, CFr2], "column": [CFc1, CFc2] }); - } - } - } - - if(cf_new_range.length > 0){ - var cf = $.extend(true, {}, CFarr[i]); - cf.cellrange = cf_new_range; - - newCFarr.push(cf); - } - } - } - - //交替颜色配置变动 - var AFarr = file.luckysheet_alternateformat_save; - var newAFarr = []; - if(AFarr != null && AFarr.length > 0){ - for(var i = 0; i < AFarr.length; i++){ - var AFr1 = AFarr[i].cellrange.row[0], - AFr2 = AFarr[i].cellrange.row[1], - AFc1 = AFarr[i].cellrange.column[0], - AFc2 = AFarr[i].cellrange.column[1]; - - if(type == "row"){ - if(!(AFr1 >= st && AFr2 <= ed)){ - var af = $.extend(true, {}, AFarr[i]); - - if(AFr1 > ed){ - AFr1 -= slen; - AFr2 -= slen; - } - else if(AFr1 < st){ - if(AFr2 < st){ - - } - else if(AFr2 <= ed){ - AFr2 = st - 1; - } - else{ - AFr2 -= slen; - } - } - else{ - if(AFr2 > ed){ - AFr1 = st; - AFr2 -= slen; - } - } - - af.cellrange = { "row": [AFr1, AFr2], "column": [AFc1, AFc2] }; - - newAFarr.push(af); - } - } - else if(type == "column"){ - if(!(AFc1 >= st && AFc2 <= ed)){ - var af = $.extend(true, {}, AFarr[i]); - - if(AFc1 > ed){ - AFc1 -= slen; - AFc2 -= slen; - } - else if(AFc1 < st){ - if(AFc2 < st){ - - } - else if(AFc2 <= ed){ - AFc2 = st - 1; - } - else{ - AFc2 -= slen; - } - } - else{ - if(AFc2 > ed){ - AFc1 = st; - AFc2 -= slen; - } - } - - af.cellrange = { "row": [AFr1, AFr2], "column": [AFc1, AFc2] }; - - newAFarr.push(af); - } - } - } - } - - //冻结配置变动 - var newFreezen = { "freezenhorizontaldata": null, "freezenverticaldata": null }; - if(luckysheet.freezen.freezenhorizontaldata != null && type == "row"){ - var freezen_scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - var freezen_st = luckysheet_searcharray(visibledatarow, freezen_scrollTop); - if(freezen_st == -1){ - freezen_st = 0; - } - - var freezen_row_st = luckysheet.freezen.freezenhorizontaldata[1] - 1; - - if(freezen_row_st >= st){ - if(freezen_row_st < ed){ - freezen_row_st = st - 1; - } - else{ - freezen_row_st -= slen; - } - } - - if(freezen_row_st < freezen_st){ - freezen_row_st = freezen_st; - } - - var freezen_top = visibledatarow[freezen_row_st] - 2 - freezen_scrollTop + columeHeaderHeight; - - newFreezen.freezenhorizontaldata = [visibledatarow[freezen_row_st], freezen_row_st + 1, freezen_scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, freezen_row_st + 1), freezen_top]; - } - else{ - newFreezen.freezenhorizontaldata = luckysheet.freezen.freezenhorizontaldata; - } - - if(luckysheet.freezen.freezenverticaldata != null && type == "column"){ - var freezen_scrollLeft = luckysheet.freezen.freezenverticaldata[2]; - var freezen_st2 = luckysheet_searcharray(visibledatacolumn, freezen_scrollLeft); - if(freezen_st2 == -1){ - freezen_st2 = 0; - } - - var freezen_col_st = luckysheet.freezen.freezenverticaldata[1] - 1; - - if(freezen_col_st >= st){ - if(freezen_col_st < ed){ - freezen_col_st = st - 1; - } - else{ - freezen_col_st -= slen; - } - } - - if(freezen_col_st < freezen_st2){ - freezen_col_st = freezen_st2; - } - - var freezen_left = visibledatacolumn[freezen_col_st] - 2 - freezen_scrollLeft + rowHeaderWidth; - - newFreezen.freezenverticaldata = [visibledatacolumn[freezen_col_st], freezen_col_st + 1, freezen_scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, freezen_col_st + 1), freezen_left]; - } - else{ - newFreezen.freezenverticaldata = luckysheet.freezen.freezenverticaldata; - } - - //主逻辑 - if (type == "row") { - var type1 = "r"; - - //行高配置变动 - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - var rowlen_new = {}; - for(var r in cfg["rowlen"]){ - if(r < st){ - rowlen_new[r] = cfg["rowlen"][r]; - } - else if(r > ed){ - rowlen_new[r - slen] = cfg["rowlen"][r]; - } - } - - cfg["rowlen"] = rowlen_new; - - //边框配置变动 - if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ - var borderInfo = []; - - for(var i = 0; i < cfg["borderInfo"].length; i++){ - var rangeType = cfg["borderInfo"][i].rangeType; - - if(rangeType == "range"){ - var borderRange = cfg["borderInfo"][i].range; - - var emptyRange = []; - - for(var j = 0; j < borderRange.length; j++){ - var bd_r1 = borderRange[j].row[0], - bd_r2 = borderRange[j].row[1]; - - for(var r = st; r <= ed; r++){ - if(r < borderRange[j].row[0]){ - bd_r1 -= 1; - bd_r2 -= 1; - } - else if(r <= borderRange[j].row[1]){ - bd_r2 -= 1; - } - } - - if(bd_r2 >= bd_r1){ - emptyRange.push({ "row": [bd_r1, bd_r2], "column": borderRange[j].column }); - } - } - - if(emptyRange.length > 0){ - var bd_obj = { - "rangeType": "range", - "borderType": cfg["borderInfo"][i].borderType, - "style": cfg["borderInfo"][i].style, - "color": cfg["borderInfo"][i].color, - "range": emptyRange - } - - borderInfo.push(bd_obj); - } - } - else if(rangeType == "cell"){ - var row_index = cfg["borderInfo"][i].value.row_index; - - if(row_index < st){ - borderInfo.push(cfg["borderInfo"][i]); - } - else if(row_index > ed){ - cfg["borderInfo"][i].value.row_index = row_index - (ed - st + 1); - borderInfo.push(cfg["borderInfo"][i]); - } - } - } - - cfg["borderInfo"] = borderInfo; - } - - //删除选中行 - d.splice(st, slen); - - if(!luckysheetConfigsetting.pointEdit){//非编辑器qksheet表格编辑状态 - //空白行模板 - var row = []; - for (var c = 0; c < d[0].length; c++) { - row.push(null); - } - - //删除多少行,增加多少行空白行 - for (var r = 0; r < slen; r++) { - d.push(row); - } - } - } - else { - var type1 = "c"; - - //列宽配置变动 - if(cfg["columlen"] == null){ - cfg["columlen"] = {}; - } - - var columlen_new = {}; - for(var c in cfg["columlen"]){ - if(c < st){ - columlen_new[c] = cfg["columlen"][c]; - } - else if(c > ed){ - columlen_new[c - slen] = cfg["columlen"][c]; - } - } - - cfg["columlen"] = columlen_new; - - //边框配置变动 - if(cfg["borderInfo"] && cfg["borderInfo"].length > 0){ - var borderInfo = []; - - for(var i = 0; i < cfg["borderInfo"].length; i++){ - var rangeType = cfg["borderInfo"][i].rangeType; - - if(rangeType == "range"){ - var borderRange = cfg["borderInfo"][i].range; - - var emptyRange = []; - - for(var j = 0; j < borderRange.length; j++){ - var bd_c1 = borderRange[j].column[0], - bd_c2 = borderRange[j].column[1]; - - for(var c = st; c <= ed; c++){ - if(c < borderRange[j].column[0]){ - bd_c1 -= 1; - bd_c2 -= 1; - } - else if(c <= borderRange[j].column[1]){ - bd_c2 -= 1; - } - } - - if(bd_c2 >= bd_c1){ - emptyRange.push({ "row": borderRange[j].row, "column": [bd_c1, bd_c2] }); - } - } - - if(emptyRange.length > 0){ - var bd_obj = { - "rangeType": "range", - "borderType": cfg["borderInfo"][i].borderType, - "style": cfg["borderInfo"][i].style, - "color": cfg["borderInfo"][i].color, - "range": emptyRange - } - - borderInfo.push(bd_obj); - } - } - else if(rangeType == "cell"){ - var col_index = cfg["borderInfo"][i].value.col_index; - - if(col_index < st){ - borderInfo.push(cfg["borderInfo"][i]); - } - else if(col_index > ed){ - cfg["borderInfo"][i].value.col_index = col_index - (ed - st + 1); - borderInfo.push(cfg["borderInfo"][i]); - } - } - } - - cfg["borderInfo"] = borderInfo; - } - - //空白列模板 - var addcol = []; - if(!luckysheetConfigsetting.pointEdit){//非编辑器qksheet表格编辑状态 - for (var r = 0; r < slen; r++) { - addcol.push(null); - } - } - - for (var r = 0; r < d.length; r++) { - var row = [].concat(d[r]); - - //删除选中列 - row.splice(st, slen); - - d[r] = row.concat(addcol); - } - } - - luckysheet.jfrefreshgrid_adRC(d, cfg, "delRC", { "index": st, "len": ed - st + 1, "rc": type1 }, newCalcChain, newFilterObj, newCFarr, newAFarr, newFreezen); - } - luckysheet.luckysheetdeletetable = luckysheetdeletetable; - - //删除选中行列 - $("#luckysheet-del-selected, #luckysheet-del-selected_t").click(function (event) { - $("#luckysheet-rightclick-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheetRightHeadClickIs == "row"){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - } - else if(luckysheetRightHeadClickIs == "column"){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - } - return; - } - - var st_index = luckysheet_select_save[0][luckysheetRightHeadClickIs][0], ed_index = luckysheet_select_save[0][luckysheetRightHeadClickIs][1]; - luckysheetdeletetable(luckysheetRightHeadClickIs, st_index, ed_index); - }); - - //清除单元格内容 - $("#luckysheet-delete-text").click(function(){ - $("#luckysheet-rightclick-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 0){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - if(luckysheet.hasPartMC(config, r1, r2, c1, c2)){ - hasPartMC = true; - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - - return; - } - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - if(luckysheet.pivotTable.isPivotRange(r, c)){ - continue; - } - - if(luckysheet.getObjType(d[r][c]) == "object"){ - delete d[r][c]["m"]; - delete d[r][c]["v"]; - - if(d[r][c]["f"] != null){ - delete d[r][c]["f"]; - luckysheet.formula.delFunctionGroup(r, c, luckysheet.currentSheetIndex); - - delete d[r][c]["spl"]; - } - } - else{ - d[r][c] = null; - } - } - } - } - - luckysheet.jfrefreshgrid(d, luckysheet_select_save); - } - }); - - //行高列宽设置 - $("#luckysheet-rows-cols-changesize").click(function(){ - $("#luckysheet-rightclick-menu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var size = parseInt($(this).siblings("input[type='number']").val().trim()); - - if(size < 0 || size > 255){ - if(luckysheet.isEditMode()){ - alert("数值必须在0 ~ 255之间"); - } - else{ - luckysheet.tooltip.info("数值必须在0 ~ 255之间", ""); - } - - return; - } - - var cfg = $.extend(true, {}, config); - var type; - - if(luckysheetRightHeadClickIs == "row"){ - type = "resizeR"; - - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0]; - var r2 = luckysheet_select_save[s].row[1]; - - for(var r = r1; r <= r2; r++){ - cfg["rowlen"][r] = size; - } - } - } - else if(luckysheetRightHeadClickIs == "column"){ - type = "resizeC"; - - if(cfg["columlen"] == null){ - cfg["columlen"] = {}; - } - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var c1 = luckysheet_select_save[s].column[0]; - var c2 = luckysheet_select_save[s].column[1]; - - for(var c = c1; c <= c2; c++){ - cfg["columlen"][c] = size; - } - } - } - - if (clearjfundo) { - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": "resize", - "ctrlType": type, - "config": $.extend(true, {}, config), - "curconfig": $.extend(true, {}, cfg), - "sheetIndex": luckysheet.currentSheetIndex - }); - } - - //config - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - if(luckysheetRightHeadClickIs == "row"){ - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["rowlen"], { "k": "rowlen" }); - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, null); - } - else if(luckysheetRightHeadClickIs == "column"){ - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["columlen"], { "k": "columlen" }); - - luckysheet.jfrefreshgrid_rhcw(null, luckysheet.flowdata[0].length); - } - }); - - var luckysheet_sort_existSort = {}, luckysheet_sort_initial = true, luckysheet_model_move_state = false, luckysheet_model_xy = [0, 0], luckysheet_model_move_obj = null; - - $(document).on("mousedown", "div.luckysheet-modal-dialog", function (e) { - if (!$(e.target).is(".luckysheet-modal-dialog")) { - return; - } - - luckysheet_model_move_state = true; - - luckysheet_model_move_obj = $(e.currentTarget); - var toffset = luckysheet_model_move_obj.offset(); - luckysheet_model_xy = [e.pageX - toffset.left, e.pageY - toffset.top]; - }); - - $(document).on("click", ".luckysheet-modal-dialog-title-close, .luckysheet-model-close-btn", function (e) { - //选择文本颜色和单元格颜色弹出框取消 - if($("#textcolorselect").is(":visible")||$("#cellcolorselect").is(":visible")){ - $("#luckysheet-conditionformat-dialog").show(); - } - $(e.currentTarget).parents(".luckysheet-modal-dialog").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - //函数查找功能所有弹出框关闭和取消 - if($(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula")){ - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - } - if($(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm")){ - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - } - if($(this).parents(".luckysheet-modal-dialog").hasClass("luckysheet-search-formula-parm-select")){ - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - } - - $("#" + container).attr("tabindex", 0).focus(); - }); - - - $("#luckysheetorderby").click(function () { - $("body .luckysheet-cols-menu").hide(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var last = luckysheet_select_save[0]; - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - - if (luckysheet_sort_initial) { - luckysheet_sort_initial = false; - var content = '
排序依据
+ 添加其他排序列
'; - - $("body").append(luckysheet.replaceHtml(modelHTML, { "id": "luckysheet-sort-dialog", "addclass": "", "title": "排序范围", "content": content, "botton": '' })); - - $("#luckysheet-sort-dialog .luckysheet-sort-dialog-additem").click(function () { - var last = luckysheet_select_save[0]; - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - - var option = "", i = $("#luckysheet-sort-dialog table").data("itemcount") + 1; - var t = $("#luckysheet-sort-haveheader").is(':checked'); - - for (var c = c1; c <= c2; c++) { - if (t) { - var v = luckysheet.getcellvalue(r1, c, luckysheet.flowdata, "m"); - - if(v == null){ - v = "列" + (c - c1 + 1); - } - - option += ''; - } - else { - option += ''; - } - } - - $("#luckysheet-sort-dialog table").append('次要排序
'); - $("#luckysheet-sort-dialog table").data("itemcount", i); - }); - - $("#luckysheet-sort-haveheader").change(function () { - var last = luckysheet_select_save[0]; - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - - var t = $(this).is(':checked'); - var option = ""; - - for (var c = c1; c <= c2; c++) { - if (t) { - var v = luckysheet.getcellvalue(r1, c, luckysheet.flowdata, "m"); - - if(v == null){ - v = "列" + (c - c1 + 1); - } - - option += ''; - } - else { - option += ''; - } - } - - $("#luckysheet-sort-dialog tr select").each(function () { - $(this).html(option); - }); - }); - - //自定义排序 - $("#luckysheet-sort-modal-confirm").click(function () { - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - - return; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var last = luckysheet_select_save[0]; - var r1 = last["row"][0], r2 = last["row"][1]; - var c1 = last["column"][0], c2 = last["column"][1]; - - //数据具有标题行 - var t = $("#luckysheet-sort-haveheader").is(':checked'); - - if(t){ - var str = r1 + 1; - } - else{ - var str = r1; - } - - var hasMc = false; //排序选区是否有合并单元格 - var data = []; - - for(var r = str; r <= r2; r++){ - var data_row = []; - - for(var c = c1; c <= c2; c++){ - if(d[r][c] != null && d[r][c].mc != null){ - hasMc = true; - break; - } - - data_row.push(d[r][c]); - } - - data.push(data_row); - } - - if(hasMc){ - if(luckysheet.isEditMode()){ - alert("选区有合并单元格,无法执行此操作!"); - } - else{ - luckysheet.tooltip.info("选区有合并单元格,无法执行此操作!", ""); - } - - return; - } - - $($("#luckysheet-sort-dialog table tr").toArray().reverse()).each(function () { - var i = $(this).find("select").val(), - asc = $(this).find('input:radio:checked').val(); - - i -= c1; - - if (asc == "asc") { - asc = true; - } - else { - asc = false; - } - - data = luckysheet.orderbydata([].concat(data), i, asc); - }); - - for(var r = str; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - d[r][c] = data[r - str][c - c1]; - } - } - - if(config["rowlen"] != null){ - var cfg = $.extend(true, {}, config); - cfg = luckysheet.rowlenByRange(d, str, r2, cfg); - - luckysheet.jfrefreshgrid(d, [{ "row": [str, r2], "column": [c1, c2] }], cfg, null, true); - } - else{ - luckysheet.jfrefreshgrid(d, [{ "row": [str, r2], "column": [c1, c2] }]); - } - - $("#luckysheet-sort-dialog").hide(); - $("#luckysheet-modal-dialog-mask").hide(); - }); - } - - var option = ""; - for (var c = c1; c <= c2; c++) { - option += ''; - } - - $("#luckysheet-sort-dialog select").html(option); - - $("#luckysheet-sort-dialog .luckysheet-sort-dialog-tr").remove(); - - $("#luckysheet-sort-haveheader").prop("checked", false); - $("#luckysheet-sort-dialog input:radio:first").prop("checked", "checked"); - - $("#luckysheet-sort-dialog .luckysheet-modal-dialog-title-text").html("排序范围从" + luckysheet.luckysheetchatatABC(c1) + (r1 + 1) + "" + luckysheet.luckysheetchatatABC(c2) + (r2 + 1) + ""); - - var $t = $("#luckysheet-sort-dialog"), myh = $t.outerHeight(), myw = $t.outerWidth(); - var winw = $(window).width(), winh = $(window).height(); - var scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop(); - - $("#luckysheet-sort-dialog-tablec").css("max-height", (winh - myh) / 2); - $("#luckysheet-sort-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 2 }).show(); - $("#luckysheet-modal-dialog-mask").show(); - - - if (r1 < r2) { - setTimeout(function () { - var flowrowdata1 = luckysheet.flowdata[r1], flowrowdata2 = luckysheet.flowdata[r1 + 1], hastitle = false; - - for (var i = c1; i <= c2; i++) { - var isdatatype_r1 = luckysheet.isdatatype(flowrowdata1[i]), isdatatype_r2 = luckysheet.isdatatype(flowrowdata2[i]); - - if (isdatatype_r1 != isdatatype_r2) { - hastitle = true; - } - } - - if (hastitle) { - $("#luckysheet-sort-haveheader").prop("checked", true).change(); - } - }, 10); - } - }); - - - - //筛选事件处理 - var hidefilersubmenu = null; - $("#luckysheet-filter-menu").mouseover(function () { - clearTimeout(hidefilersubmenu); - - hidefilersubmenu = setTimeout(function () { - $("#luckysheet-filter-submenu").hide(); - }, 500); - }); - - $("#luckysheet-filter-submenu").mouseover(function () { - clearTimeout(hidefilersubmenu); - }).find(".luckysheet-cols-menuitem").click(function (e) { - $("#luckysheet-filter-selected span").html($(this).find(".luckysheet-cols-menuitem-content").text()).data("value", $(this).data("value")); - $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide(); - - var $type = $(this).data("type"); - var $value = $(this).attr("data-value"); - - if ($type == "2") { - $("#luckysheet-filter-selected span").data("type", "2"); - $("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show(); - $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "number"); - } - else if ($type == "0") { - $("#luckysheet-filter-selected span").data("type", "0"); - } - else { - $("#luckysheet-filter-selected span").data("type", "1"); - $("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show(); - - //若是日期 改变input type类型为date - if($value == "dateequal" || $value == "datelessthan" || $value == "datemorethan"){ - $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "date"); - } - else if($value == "morethan" || $value == "moreequalthan" || $value == "lessthan" || $value == "lessequalthan" || $value == "equal" || $value == "noequal"){ - $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "number"); - } - else{ - $("#luckysheet-filter-menu .luckysheet-filter-selected-input input").prop("type", "text"); - } - } - - $("#luckysheet-filter-byvalue").next().slideUp(); - $("#luckysheet-filter-submenu").hide(); - }); - - $("#luckysheet-filter-bycondition, #luckysheet-filter-byvalue").click(function () { - var $t = $(this); - $t.next().slideToggle(200); - - setTimeout(function () { - if ($t.attr("id") == "luckysheet-filter-bycondition" && $("#luckysheet-filter-bycondition").next().is(":visible")) { - if ($("#luckysheet-filter-selected span").text() != "无") { - $("#luckysheet-filter-byvalue").next().slideUp(200); - } - } - - if ($t.is($("#luckysheet-filter-bycondition"))) { - if ($("#luckysheet-filter-bycondition").next().is(":hidden") && $("#luckysheet-filter-byvalue").next().is(":hidden")) { - $("#luckysheet-filter-byvalue").next().slideDown(200); - } - } - }, 300); - }); - - //筛选取消 - $("#luckysheet-filter-cancel").click(function () { - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - }); - - //筛选 确认 - $("#luckysheet-filter-confirm").click(function () { - var $menu = $("#luckysheet-filter-menu"); - var st_r = $menu.data("str"), - ed_r = $menu.data("edr"), - cindex = $menu.data("cindex"), - st_c = $menu.data("stc"), - ed_c = $menu.data("edc"); - - var rowhiddenother = {}; //其它筛选列的隐藏行 - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c).get(0)).each(function () { - var $t = $(this), rh = $t.data("rowhidden"); - - if (rh == "") { - return true; - } - - rh = JSON.parse(rh.replace(/\'/g, '"')); - - for (var r in rh) { - rowhiddenother[r] = 0; - } - }); - - var filterdata = {}; - var rowhidden = {}; - var caljs = {}; - - if ($("#luckysheet-filter-bycondition").next().is(":visible") && $("#luckysheet-filter-byvalue").next().is(":hidden") && $("#luckysheet-filter-selected span").data("value") != "null") { - var $t = $("#luckysheet-filter-selected span"); - var type = $t.data("type"), value = $t.data("value"); - - caljs["value"] = value; - caljs["text"] = $t.text(); - - if (type == "0") { - caljs["type"] = "0"; - } - else if (type == "2") { - var $input = $("#luckysheet-filter-menu .luckysheet-filter-selected-input2 input"); - caljs["type"] = "2"; - caljs["value1"] = $input.eq(0).val(); - caljs["value2"] = $input.eq(1).val(); - } - else { - caljs["type"] = "1"; - caljs["value1"] = $("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).find("input").val(); - } - - for (var r = st_r + 1; r <= ed_r; r++) { - if(r in rowhiddenother){ - continue; - } - - if(luckysheet.flowdata[r] == null){ - continue; - } - - var cell = luckysheet.flowdata[r][cindex]; - - if (value == "cellnull") { //单元格为空 - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - } - else if (value == "cellnonull") { //单元格有数据 - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - } - else if (value == "textinclude") { //文本包含 - var value1 = caljs["value1"]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(cell.m.indexOf(value1) == -1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textnotinclude") { //文本不包含 - var value1 = caljs["value1"]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - - } - else{ - if(cell.m.indexOf(value1) > -1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textstart") { //文本开头为 - var value1 = caljs["value1"], valuelen = value1.length; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(cell.m.substr(0, valuelen) != value1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textend") { //文本结尾为 - var value1 = caljs["value1"], valuelen = value1.length; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(valuelen > cell.m.length || cell.m.substr(cell.m.length - valuelen, valuelen) != value1){ - rowhidden[r] = 0; - } - } - } - else if (value == "textequal") { //文本等于 - var value1 = caljs["value1"]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else{ - if(cell.m != value1){ - rowhidden[r] = 0; - } - } - } - else if (value == "dateequal") { //日期等于 - var value1 = luckysheet.mask.genarate(caljs["value1"])[2]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "d"){ - if(parseInt(cell.v) != value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "datelessthan") { //日期早于 - var value1 = luckysheet.mask.genarate(caljs["value1"])[2]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "d"){ - if(parseInt(cell.v) >= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "datemorethan") { //日期晚于 - var value1 = luckysheet.mask.genarate(caljs["value1"])[2]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "d"){ - if(parseInt(cell.v) <= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "morethan") { //大于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v <= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "moreequalthan") { //大于等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v < value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "lessthan") { //小于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v >= value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "lessequalthan") { //小于等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v > value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "equal") { //等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v != value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "noequal") { //不等于 - var value1 = parseFloat(caljs["value1"]); - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v == value1){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "include") { //介于 - var value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); - - if(value1 < value2){ - var min = value1; - var max = value2; - } - else{ - var max = value1; - var min = value2; - } - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v < min || cell.v > max){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - else if (value == "noinclude") { //不在其中 - var value1 = parseFloat(caljs["value1"]), value2 = parseFloat(caljs["value2"]); - - if(value1 < value2){ - var min = value1; - var max = value2; - } - else{ - var max = value1; - var min = value2; - } - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - else if(cell.ct != null && cell.ct.t == "n"){ - if(cell.v >= min && cell.v <= max){ - rowhidden[r] = 0; - } - } - else{ - rowhidden[r] = 0; - } - } - } - } - else { - $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(i, e){ - if($(e).is(":visible") && $(e).is(":checked")){ - return true; - } - - if($(e).closest(".day").length > 0){ - var day = $(e).siblings("label").text(); - if(Number(day) < 10){ - day = "0" + Number(day); - } - - var month = $(e).closest(".monthBox").find(".month label").text().replace("月", ""); - if(Number(month) < 10){ - month = "0" + Number(month); - } - - var year = $(e).closest(".yearBox").find(".year label").text().replace("年", ""); - - var itemV = "日期格式#$$$#" + year + "-" + month + "-" + day; - - filterdata[itemV] = "1"; - } - - if($(e).closest(".textBox").length > 0){ - var itemV = $(e).closest(".textBox").data("filter"); - - filterdata[itemV] = "1"; - } - }); - - for (var r = st_r + 1; r <= ed_r; r++) { - if(r in rowhiddenother){ - continue; - } - - if(luckysheet.flowdata[r] == null){ - continue; - } - - var cell = luckysheet.flowdata[r][cindex]; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - var value = "null#$$$#null"; - } - else if(cell.ct != null && cell.ct.t == "d"){ - var fmt = luckysheet.mask.update("YYYY-MM-DD", cell.v); - var value = "日期格式#$$$#" + fmt; - } - else{ - var value = cell.v + "#$$$#" + cell.m; - } - - if(value in filterdata){ - rowhidden[r] = 0; - } - } - } - - var $top = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c); - - var optionstate = $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible:checked").length < $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']:visible").length || $("#luckysheet-filter-byvalue-input").val().length > 0 || ($("#luckysheet-filter-bycondition").next().is(":visible") && $("#luckysheet-filter-byvalue").next().is(":hidden") && $("#luckysheet-filter-selected span").data("value") != "null"); - - var rowhiddenall = $.extend(true, rowhiddenother, rowhidden), - rowhidenPre = luckysheet.json.parseJsonParm($top.data("rowhidden")); - - luckysheet.labelFilterOptionState($top, optionstate, rowhidden, caljs, true, st_r, ed_r, cindex, st_c, ed_c); - - var cfg = $.extend(true, {}, config); - cfg["rowhidden"] = rowhiddenall; - - //保存撤销 - if(clearjfundo){ - var redo = {}; - redo["type"] = "datachangeAll_filter"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = cfg; - - redo["optionstate"] = optionstate; - redo["optionsindex"] = cindex - st_c; - - redo["rowhidden"] = $.extend(true, {}, rowhidden); - redo["rowhidenPre"] = $.extend(true, {}, rowhidenPre); - - if (caljs != null) { - redo["caljs"] = caljs; - } - - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - } - - //config - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["rowhidden"], { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - luckysheet.cleargridelement(); - }); - - luckysheet.json = { - parseJsonParm: function(obj){ - if(obj == null){ - return {}; - } - else if(luckysheet.getObjType(obj) == "string"){ - try { - var json = eval('('+ obj +')'); - return json; - } - catch(e) { - return {}; - } - } - else{ - return obj; - } - }, - hasKey: function(obj){ - var _this = this; - var json = _this.parseJsonParm(obj); - - for(var item in json){ - return true; - } - - return false; - } - } - - luckysheet.labelFilterOptionState = function($top, optionstate, rowhidden, caljs, notSave, str, edr, cindex, stc, edc){ - if (optionstate) { - $top.addClass("luckysheet-filter-options-active").data("rowhidden", JSON.stringify(rowhidden)).data("caljs", JSON.stringify(caljs)).html(''); - - if (caljs != null) { - $top.data("byconditionvalue", caljs["value"]).data("byconditiontype", caljs["type"]).data("byconditiontext", caljs["text"]); - - if (caljs["value1"] != null) { - $top.data("byconditionvalue1", caljs["value1"]); - } - - if (caljs["value2"] != null) { - $top.data("byconditionvalue2", caljs["value2"]); - } - } - } - else { - $top.removeClass("luckysheet-filter-options-active").data("rowhidden", "").data("caljs", "").html(''); - - $top.data("byconditionvalue", "null").data("byconditiontype", "0").data("byconditiontext", "无").data("byconditionvalue1", "").data("byconditionvalue2", ""); - } - - if(!!notSave){ - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - if(file.filter == null){ - file.filter = {}; - } - - if (optionstate) { - var param = { - "caljs": caljs, - "rowhidden": rowhidden, - "optionstate": optionstate, - "str": str, - "edr": edr, - "cindex": cindex, - "stc": stc, - "edc": edc - }; - - // luckysheet.server.saveParam("f", luckysheet.currentSheetIndex, param, { "op": "upOrAdd", "pos": cindex - stc }); - - file.filter[cindex - stc] = param; - } - else { - // luckysheet.server.saveParam("f", luckysheet.currentSheetIndex, null, { "op": "del", "pos": cindex - stc }); - - delete file.filter[cindex - stc]; - // file.filter[cindex - stc] = null; - } - - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file.filter, { "k": "filter" }); - } - } - - $("#luckysheet-filter-selected").click(function () { - var $t = $(this), toffset = $t.offset(), $menu = $("#luckysheet-filter-submenu"); - $menu.hide(); - - var winH = $(window).height(), winW = $(window).width(); - var menuW = $menu.width(), menuH = $menu.height(); - var top = toffset.top, left = toffset.left, mheight = winH - toffset.top - 20; - - if (toffset.left + menuW > winW) { - left = toffset.left - menuW; - } - - if (toffset.top > winH / 2) { - top = winH - toffset.top; - - if (top < 0) { - top = 0; - } - - mheight = toffset.top - 20; - } - - $menu.css({ "top": top, "left": left, "height": mheight }).show(); - clearTimeout(hidefilersubmenu); - }); - - var orderbydatafiler = function (str, stc, edr, edc, index, asc) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - str = str + 1; - - var hasMc = false; //排序选区是否有合并单元格 - var data = []; - - for(var r = str; r <= edr; r++){ - var data_row = []; - - for(var c = stc; c <= edc; c++){ - if(d[r][c] != null && d[r][c].mc != null){ - hasMc = true; - break; - } - - data_row.push(d[r][c]); - } - - data.push(data_row); - } - - if(hasMc){ - if(luckysheet.isEditMode()){ - alert("筛选选区有合并单元格,无法执行此操作!"); - } - else{ - luckysheet.tooltip.info("筛选选区有合并单元格,无法执行此操作!", ""); - } - - return; - } - - data = luckysheet.orderbydata(data, index - stc, asc); - - for(var r = str; r <= edr; r++){ - for(var c = stc; c <= edc; c++){ - d[r][c] = data[r - str][c - stc]; - } - } - - if(config["rowlen"] != null){ - var cfg = $.extend(true, {}, config); - cfg = luckysheet.rowlenByRange(d, str, edr, cfg); - - luckysheet.jfrefreshgrid(d, [{ "row": [str, edr], "column": [stc, edc] }], cfg, null, true); - } - else{ - luckysheet.jfrefreshgrid(d, [{ "row": [str, edr], "column": [stc, edc] }]); - } - } - - //创建筛选按钮 - luckysheet.createFilter = function () { - if(luckysheet_select_save.length > 1){ - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - - return; - } - - if(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].isPivotTable){ - return; - } - - $('#luckysheet-filter-selected-sheet' + luckysheet.currentSheetIndex + ', #luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).remove(); - - var last = luckysheet_select_save[0]; - if (last["row"][0] == last["row"][1] && last["column"][0] == last["column"][1]) { - var st_c, ed_c, curR = last["row"][1]; - - for (var c = 0; c < luckysheet.flowdata[curR].length; c++) { - var cell = luckysheet.flowdata[curR][c]; - - if (cell != null && !luckysheet.func_methods.isRealNull(cell.v)) { - if (st_c == null) { - st_c = c; - } - } - else if (st_c != null) { - ed_c = c - 1; - break; - } - } - - if (ed_c == null) { - ed_c = luckysheet.flowdata[curR].length - 1; - } - - luckysheet_select_save = [{ "row": [curR, curR], "column": [st_c, ed_c] }]; - luckysheet.selectHightlightShow(); - - luckysheet.luckysheet_shiftpositon = $.extend(true, {}, last); - luckysheetMoveEndCell("down", "range"); - } - else if (last["row"][1] - last["row"][0] < 2) { - luckysheet.luckysheet_shiftpositon = $.extend(true, {}, last); - luckysheetMoveEndCell("down", "range"); - } - - luckysheet_filter_save = $.extend(true, {}, luckysheet_select_save[0]); - - luckysheet.createFilterOptions(luckysheet_filter_save); - - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, luckysheet_filter_save, { "k": "filter_select" }); - - if (filterchage) { - luckysheet.jfredo.push({ - "type": "filtershow", - "data": [], - "curdata": [], - "sheetIndex": luckysheet.currentSheetIndex, - "filter_save": luckysheet_filter_save - }); - } - } - - luckysheet.createFilterOptions = function(luckysheet_filter_save, filterObj){ - $("#luckysheet-filter-selected-sheet" + luckysheet.currentSheetIndex).remove(); - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex).remove(); - - if(luckysheet_filter_save == null || JSON.stringify(luckysheet_filter_save) == "{}"){ - return; - } - - var r1 = luckysheet_filter_save.row[0], r2 = luckysheet_filter_save.row[1]; - var c1 = luckysheet_filter_save.column[0], c2 = luckysheet_filter_save.column[1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var newSelectedHTML = '
'; - $("#luckysheet-cell-main").append(newSelectedHTML); - - var optionHTML = ""; - - for (var c = c1; c <= c2; c++) { - if(filterObj == null || filterObj[c - c1] == null){ - optionHTML += '
'; - } - else{ - if(filterObj[c - c1].caljs != null){ - if (filterObj[c - c1].caljs["value1"] != null) { - var caljs_value1_data = 'data-byconditionvalue1="'+ filterObj[c - c1].caljs["value1"] +'" '; - } - else{ - var caljs_value1_data = ''; - } - - if (filterObj[c - c1].caljs["value2"] != null) { - var caljs_value2_data = 'data-byconditionvalue2="'+ filterObj[c - c1].caljs["value2"] +'" '; - } - else{ - var caljs_value2_data = ''; - } - - var caljs_data = 'data-caljs="'+ JSON.stringify(filterObj[c - c1].caljs) +'" ' + - 'data-byconditionvalue="'+ filterObj[c - c1].caljs["value"] +'" ' + - 'data-byconditiontype="'+ filterObj[c - c1].caljs["type"] +'" ' + - 'data-byconditiontext="'+ filterObj[c - c1].caljs["text"] +'" ' + - caljs_value1_data + caljs_value2_data; - } - else{ - var caljs_data = ''; - } - - optionHTML += '
'; - } - } - - $("#luckysheet-cell-main").append('
' + optionHTML + '
'); - $("#luckysheet-rightclick-menu").hide(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - - if ($("#luckysheet-cell-main").scrollTop() > luckysheet_filter_save["top_move"]) { - $("#luckysheet-scrollbar-y").scrollTop(luckysheet_filter_save["top_move"]); - } - - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - file.filter_select = luckysheet_filter_save; - } - - $("#luckysheetfilter").click(luckysheet.createFilter); - - //按颜色筛选 - var submenuhide = null; - $("#luckysheet-filter-orderby-color").hover( - function(){ - //遍历筛选列颜色 - var $menu = $("#luckysheet-filter-menu"); - var st_r = $menu.data("str"), - ed_r = $menu.data("edr"), - cindex = $menu.data("cindex"), - st_c = $menu.data("stc"), - ed_c = $menu.data("edc"); - var bgMap = {}; //单元格颜色 - var fcMap = {}; //字体颜色 - - var af_compute = luckysheet.alternateformat.getComputeMap(); - var cf_compute = luckysheet.conditionformat.getComputeMap(); - - for (var r = st_r + 1; r <= ed_r; r++) { - var cell = luckysheet.flowdata[r][cindex]; - - //单元格颜色 - var bg = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, cindex , "bg"); - - var checksAF = luckysheet.alternateformat.checksAF(r, cindex, af_compute); - if(checksAF != null){//若单元格有交替颜色 - bg = checksAF[1]; - } - - var checksCF = luckysheet.conditionformat.checksCF(r, cindex, cf_compute); - if(checksCF != null && checksCF["cellColor"] != null){//若单元格有条件格式 - bg = checksCF["cellColor"]; - } - - if(bg.indexOf("rgb") > -1){ - bg = luckysheet.rgbTohex(bg); - } - - if(bg.length == 4){ - bg = bg.substr(0, 1) + bg.substr(1, 1).repeat(2) + bg.substr(2, 1).repeat(2) + bg.substr(3, 1).repeat(2); - } - - //字体颜色 - var fc = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, cindex , "fc"); - - if(checksAF != null){//若单元格有交替颜色 - fc = checksAF[0]; - } - - if(checksCF != null && checksCF["textColor"] != null){//若单元格有条件格式 - fc = checksCF["textColor"]; - } - - if(fc.indexOf("rgb") > -1){ - fc = luckysheet.rgbTohex(fc); - } - - if(fc.length == 4){ - fc = fc.substr(0, 1) + fc.substr(1, 1).repeat(2) + fc.substr(2, 1).repeat(2) + fc.substr(3, 1).repeat(2); - } - - if(config != null && config["rowhidden"] != null && r in config["rowhidden"]){ - bgMap[bg] = 1; - - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v)){ - fcMap[fc] = 1; - } - } - else{ - bgMap[bg] = 0; - - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v)){ - fcMap[fc] = 0; - } - } - } - // - var filterBgColorHtml = ''; - if(JSON.stringify(bgMap).length > 2 && Object.keys(bgMap).length > 1){ - var bgColorItemHtml = ''; - for(b in bgMap){ - if(bgMap[b] == 0){ - bgColorItemHtml += '
'; - } - else{ - bgColorItemHtml += '
'; - } - } - filterBgColorHtml = '
按单元格颜色筛选
' + bgColorItemHtml + '
'; - } - - var filterFcColorHtml = ''; - if(JSON.stringify(fcMap).length > 2 && Object.keys(fcMap).length > 1){ - var fcColorItemHtml = ''; - for(f in fcMap){ - if(fcMap[f] == 0){ - fcColorItemHtml += '
'; - } - else{ - fcColorItemHtml += '
'; - } - } - filterFcColorHtml = '
按字体颜色筛选
' + fcColorItemHtml + '
'; - } - // - if(filterBgColorHtml == '' && filterFcColorHtml == ''){ - var content = '
本列仅包含一种颜色
'; - } - else{ - var content = filterBgColorHtml + filterFcColorHtml + '
'; - } - //颜色筛选子菜单 - $("#luckysheet-filter-orderby-color-submenu").remove(); - $("body").append('
'+content+'
'); - var $t = $("#luckysheet-filter-orderby-color-submenu").end(), myh = $t.outerHeight(), myw = $t.outerWidth(); - var $con = $(this).parent(); - var winW = $(window).width(), winH = $(window).height(); - var menuW = $con.width(), myh = $t.height() + 25, myw = $t.width() + 5; - var offset = $(this).offset(); - var top = offset.top, left = offset.left + menuW; - - if (left + myw > winW) { - left = offset.left - myw; - } - - if (top + myh > winH) { - top = winH - myh; - } - - $("#luckysheet-filter-orderby-color-submenu").css({ "top": top, "left": left }).show(); - }, - function(){ - submenuhide = setTimeout(function () { $("#luckysheet-filter-orderby-color-submenu").hide(); }, 200); - } - ); - $(document).on("mouseover mouseleave", "#luckysheet-filter-orderby-color-submenu", function(e){ - if (e.type === "mouseover") { - clearTimeout(submenuhide); - } - else { - $(this).hide(); - } - }); - $(document).on("click", "#luckysheet-filter-orderby-color-submenu .item label", function(){ - $(this).siblings("input[type='checkbox']").click(); - }); - $(document).off("click.orderbyColorConfirm").on("click.orderbyColorConfirm", "#luckysheet-filter-orderby-color-submenu #luckysheet-filter-orderby-color-confirm", function(){ - var bg_colorMap = {}; - var fc_colorMap = {}; - - $("#luckysheet-filter-orderby-color-submenu .item").each(function(i, e){ - if($(e).find("input[type='checkbox']").is(":checked")){ - var color = $(this).find("label").attr("title"); - var $id = $(this).closest(".box").attr("id"); - - if($id == "filterBgColor"){ - bg_colorMap[color] = 0; - } - else if($id == "filterFcColor"){ - fc_colorMap[color] = 0; - } - } - }); - - if($("#luckysheet-filter-orderby-color-submenu #filterBgColor").length > 0){ - var bg_filter = true; - } - else{ - var bg_filter = false; - } - - if($("#luckysheet-filter-orderby-color-submenu #filterFcColor").length > 0){ - var fc_filter = true; - } - else{ - var fc_filter = false; - } - - var $menu = $("#luckysheet-filter-menu"); - var st_r = $menu.data("str"), - ed_r = $menu.data("edr"), - cindex = $menu.data("cindex"), - st_c = $menu.data("stc"), - ed_c = $menu.data("edc"); - - var rowhiddenother = {}; //其它筛选列的隐藏行 - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").not($("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c).get(0)).each(function () { - var $t = $(this), rh = $t.data("rowhidden"); - - if (rh == "") { - return true; - } - - rh = JSON.parse(rh); - - for (var r in rh) { - rowhiddenother[r] = 0; - } - }); - - var filterdata = {}; - var rowhidden = {}; - var caljs = {}; - - var af_compute = luckysheet.alternateformat.getComputeMap(); - var cf_compute = luckysheet.conditionformat.getComputeMap(); - - for (var r = st_r + 1; r <= ed_r; r++) { - if(r in rowhiddenother){ - continue; - } - - if(luckysheet.flowdata[r] == null){ - continue; - } - - var cell = luckysheet.flowdata[r][cindex]; - - //单元格颜色 - var bg = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, cindex , "bg"); - - var checksAF = luckysheet.alternateformat.checksAF(r, cindex, af_compute); - if(checksAF != null){//若单元格有交替颜色 - bg = checksAF[1]; - } - - var checksCF = luckysheet.conditionformat.checksCF(r, cindex, cf_compute); - if(checksCF != null && checksCF["cellColor"] != null){//若单元格有条件格式 - bg = checksCF["cellColor"]; - } - - if(bg.indexOf("rgb") > -1){ - bg = luckysheet.rgbTohex(bg); - } - - if(bg.length == 4){ - bg = bg.substr(0, 1) + bg.substr(1, 1).repeat(2) + bg.substr(2, 1).repeat(2) + bg.substr(3, 1).repeat(2); - } - - //文本颜色 - var fc = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, cindex , "fc"); - - if(checksAF != null){//若单元格有交替颜色 - fc = checksAF[0]; - } - - if(checksCF != null && checksCF["textColor"] != null){//若单元格有条件格式 - fc = checksCF["textColor"]; - } - - if(fc.indexOf("rgb") > -1){ - fc = luckysheet.rgbTohex(fc); - } - - if(fc.length == 4){ - fc = fc.substr(0, 1) + fc.substr(1, 1).repeat(2) + fc.substr(2, 1).repeat(2) + fc.substr(3, 1).repeat(2); - } - - if(bg_filter && fc_filter){ - if(!(bg in bg_colorMap) && (!(fc in fc_colorMap) || cell == null || luckysheet.func_methods.isRealNull(cell.v))){ - rowhidden[r] = 0; - } - } - else if(bg_filter){ - if(!(bg in bg_colorMap)){ - rowhidden[r] = 0; - } - } - else if(fc_filter){ - if(!(fc in fc_colorMap) || cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - rowhidden[r] = 0; - } - } - } - - var $top = $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").eq(cindex - st_c); - - var optionstate = Object.keys(rowhidden).length > 0; - - var rowhiddenall = $.extend(true, rowhiddenother, rowhidden), - rowhidenPre = luckysheet.json.parseJsonParm($top.data("rowhidden")); - - luckysheet.labelFilterOptionState($top, optionstate, rowhidden, caljs, true, st_r, ed_r, cindex, st_c, ed_c); - - var cfg = $.extend(true, {}, config); - cfg["rowhidden"] = rowhiddenall; - - //保存撤销 - if(clearjfundo){ - var redo = {}; - redo["type"] = "datachangeAll_filter"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = cfg; - - redo["optionstate"] = optionstate; - redo["optionsindex"] = cindex - st_c; - - redo["rowhidden"] = $.extend(true, {}, rowhidden); - redo["rowhidenPre"] = $.extend(true, {}, rowhidenPre); - - if (caljs != null) { - redo["caljs"] = caljs; - } - - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - } - - //config - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["rowhidden"], { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - - // luckysheet.filterseletedbyindex(st_r, ed_r, st_c, ed_c); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu, #luckysheet-filter-orderby-color-submenu").hide(); - luckysheet.cleargridelement(); - }); - - //筛选按钮点击事件 - $("#luckysheet-cell-main").on("click", ".luckysheet-filter-options", function (e) { - var $t = $(e.currentTarget), - toffset = $t.offset(), - $menu = $("#luckysheet-filter-menu"), - winH = $(window).height(), - winW = $(window).width(); - - var st_r = $t.data("str"), - ed_r = $t.data("edr"), - cindex = $t.data("cindex"), - st_c = $t.data("stc"), - ed_c = $t.data("edc"), - rowhidden = $t.data("rowhidden") == "" ? {} : JSON.parse($t.data("rowhidden").replace(/\'/g, '"')); - - $("body .luckysheet-cols-menu").hide(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - $("#luckysheet-filter-byvalue-input").val(""); - $("#luckysheet-filter-bycondition").next().hide(); - $("#luckysheet-filter-byvalue").next().show(); - - $menu.data("str", st_r); - $menu.data("edr", ed_r); - $menu.data("cindex", cindex); - $menu.data("stc", st_c); - $menu.data("edc", ed_c); - - $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(); - $("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无"); - - var byconditiontype = $t.data("byconditiontype"); - $("#luckysheet-filter-selected span").data("value", $t.data("byconditionvalue")).data("type", byconditiontype).text($t.data("byconditiontext")); - - if (byconditiontype == "2") { - var $input = $("#luckysheet-filter-menu .luckysheet-filter-selected-input2").show().find("input"); - $input.eq(0).val($t.data("byconditionvalue1")); - $input.eq(1).val($t.data("byconditionvalue2")); - } - else if (byconditiontype == "1") { - $("#luckysheet-filter-menu .luckysheet-filter-selected-input").eq(0).show().find("input").val($t.data("byconditionvalue1")); - } - - $("#luckysheet-filter-orderby-asc").off("click").on("click", function () { - orderbydatafiler(st_r, st_c, ed_r, ed_c, cindex, true); - }); - - $("#luckysheet-filter-orderby-desc").off("click").on("click", function () { - orderbydatafiler(st_r, st_c, ed_r, ed_c, cindex, false); - }); - - $("#luckysheet-filter-byvalue-select").empty().html('
数据量大!请稍后
'); - - var rowhiddenother = {}; //其它筛选列的隐藏行 - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").not(this).each(function () { - var $t = $(this), rh = $t.data("rowhidden"); - - if (rh == "") { - return true; - } - - rh = JSON.parse(rh.replace(/\'/g, '"')); - - for (var r in rh) { - rowhiddenother[r] = 0; - } - }); - - var data = luckysheet.flowdata; - - setTimeout(function () { - //日期值 - var dvmap = {}; - var dvmap_uncheck = {}; - - //除日期以外的值 - var vmap = {}; - var vmap_uncheck = {}; - - for (var r = st_r + 1; r <= ed_r; r++) { - if(r in rowhiddenother){ - continue; - } - - if(luckysheet.flowdata[r] == null){ - continue; - } - - var cell = luckysheet.flowdata[r][cindex]; - - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v) && cell.ct != null && cell.ct.t == "d" ){ //单元格是日期 - var v = luckysheet.mask.update("YYYY-MM-DD", cell.v); - - var y = v.split("-")[0]; - var m = v.split("-")[1]; - var d = v.split("-")[2]; - - if(!(y in dvmap)){ - dvmap[y] = {}; - } - - if(!(m in dvmap[y])){ - dvmap[y][m] = {}; - } - - if(!(d in dvmap[y][m])){ - dvmap[y][m][d] = 0; - } - - dvmap[y][m][d]++; - - if(r in rowhidden){ - dvmap_uncheck[y] = 0; - dvmap_uncheck[m] = 0; - dvmap_uncheck[d] = 0; - } - } - else{ - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - var v = null; - var m = null; - } - else{ - var v = cell.v; - var m = cell.m; - } - - if(!(v in vmap)){ - vmap[v] = {}; - } - - if(!(m in vmap[v])){ - vmap[v][m] = 0; - } - - vmap[v][m]++; - - if(r in rowhidden){ - vmap_uncheck[v + "#$$$#" + m] = 0; - } - } - } - - //遍历数据加到页面 - var item = []; - - if(JSON.stringify(dvmap).length > 2){ - for(y in dvmap){ - var ysum = 0; - var monthHtml = ''; - - for(m in dvmap[y]){ - var msum = 0; - var dayHtml = ''; - - for(d in dvmap[y][m]){ - var dayL = dvmap[y][m][d]; - msum += dayL; - - //月 小于 10 - if(Number(m) < 10){ - var mT = "0" + Number(m); - } - else{ - var mT = m; - } - - //日 小于 10 - if(Number(d) < 10){ - var dT = "0" + Number(d); - } - else{ - var dT = d; - } - - //日是否选中状态 - if((y in dvmap_uncheck) && (m in dvmap_uncheck) && (d in dvmap_uncheck)){ - dayHtml += '
' + - '' + - '' + - '( ' + dayL + ' )' + - '
'; - } - else{ - dayHtml += '
' + - '' + - '' + - '( ' + dayL + ' )' + - '
'; - } - } - - ysum += msum; - - //月 小于 10 - if(Number(m) < 10){ - var mT2 = "0" + Number(m); - } - else{ - var mT2 = m; - } - - //月是否选中状态 - if((y in dvmap_uncheck) && (m in dvmap_uncheck)){ - monthHtml += '
' + - '
' + - '' + - '' + - '' + - '( ' + msum + ' )' + - '
' + - '
' + dayHtml + '
' + - '
'; - } - else{ - monthHtml += '
' + - '
' + - '' + - '' + - '' + - '( ' + msum + ' )' + - '
' + - '
' + dayHtml + '
' + - '
'; - } - } - - //年是否选中状态 - if(y in dvmap_uncheck){ - var yearHtml = '
' + - '
' + - '' + - '' + - '' + - '( ' + ysum + ' )' + - '
' + - '
' + monthHtml + '
' + - '
'; - } - else{ - var yearHtml = '
' + - '
' + - '' + - '' + - '' + - '( ' + ysum + ' )' + - '
' + - '
' + monthHtml + '
' + - '
'; - } - - item.unshift(yearHtml); - } - } - - if(JSON.stringify(vmap).length > 2){ - var vmapKeys = Object.keys(vmap); - vmapKeys = luckysheet.orderbydata1D(vmapKeys, true); - - for(var i = 0; i < vmapKeys.length; i++){ - var v = vmapKeys[i]; - - for(x in vmap[v]){ - if((v + "#$$$#" + x) == "null#$$$#null"){ - var text = "(空白)"; - } - else{ - var text = x; - } - - //是否选中状态 - if((v + "#$$$#" + x) in vmap_uncheck){ - var dataHtml = '
' + - '' + - '' + - '( ' + vmap[v][x] + ' )' + - '
'; - } - else{ - var dataHtml = '
' + - '' + - '' + - '( ' + vmap[v][x] + ' )' + - '
'; - } - - item.push(dataHtml); - } - } - } - - $("#luckysheet-filter-byvalue-select").html("
" + item.join("") + "
"); - }, 1); - - showrightclickmenu($menu, toffset.left, toffset.top + 20); - - e.stopPropagation(); - return false; - }); - - //点击复选框 - $(document).off("click.filterCheckbox1").on("click.filterCheckbox1", "#luckysheet-filter-byvalue-select .textBox",function(){ - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).find("input[type='checkbox']").prop("checked", true); - } - }) - $(document).off("click.filterCheckbox2").on("click.filterCheckbox2", "#luckysheet-filter-byvalue-select .year",function(){ - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).parents(".yearBox").find(".month").attr("data-check", "false"); - $(this).parents(".yearBox").find(".day").attr("data-check", "false"); - $(this).parents(".yearBox").find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).parents(".yearBox").find(".month").attr("data-check", "true"); - $(this).parents(".yearBox").find(".day").attr("data-check", "true"); - $(this).parents(".yearBox").find("input[type='checkbox']").prop("checked", true); - } - }) - $(document).off("click.filterCheckbox3").on("click.filterCheckbox3", "#luckysheet-filter-byvalue-select .month",function(){ - //月份 对应的 天 - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).parents(".monthBox").find(".day").attr("data-check", "false"); - $(this).parents(".monthBox").find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).parents(".monthBox").find(".day").attr("data-check", "true"); - $(this).parents(".monthBox").find("input[type='checkbox']").prop("checked", true); - } - //月份 对应的 年份 - var yearDayAllCheck = true; - var $yearDay = $(this).parents(".yearBox").find(".day"); - $yearDay.each(function(i,e){ - if($(e).attr("data-check") == "true"){ - - } - else{ - yearDayAllCheck = false; - } - }); - if(yearDayAllCheck){ - $(this).parents(".yearBox").find(".year").attr("data-check", "true"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); - } - else{ - $(this).parents(".yearBox").find(".year").attr("data-check", "false"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); - } - }) - $(document).off("click.filterCheckbox4").on("click.filterCheckbox4", "#luckysheet-filter-byvalue-select .day",function(){ - if($(this).attr("data-check") == "true"){ - $(this).attr("data-check", "false"); - $(this).find("input[type='checkbox']").removeAttr("checked"); - } - else{ - $(this).attr("data-check", "true"); - $(this).find("input[type='checkbox']").prop("checked", true); - } - //天 对应的 月份 - var monthDayAllCheck = true; - var $monthDay = $(this).parents(".monthBox").find(".day"); - $monthDay.each(function(i,e){ - if($(e).attr("data-check") == "true"){ - - } - else{ - monthDayAllCheck = false; - } - }); - if(monthDayAllCheck){ - $(this).parents(".monthBox").find(".month").attr("data-check", "true"); - $(this).parents(".monthBox").find(".month input[type='checkbox']").prop("checked", true); - } - else{ - $(this).parents(".monthBox").find(".month").attr("data-check", "false"); - $(this).parents(".monthBox").find(".month input[type='checkbox']").removeAttr("checked"); - } - //天 对应的 年份 - var yearDayAllCheck = true; - var $yearDay = $(this).parents(".yearBox").find(".day"); - $yearDay.each(function(i,e){ - if($(e).attr("data-check") == "true"){ - - } - else{ - yearDayAllCheck = false; - } - }); - if(yearDayAllCheck){ - $(this).parents(".yearBox").find(".year").attr("data-check", "true"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").prop("checked", true); - } - else{ - $(this).parents(".yearBox").find(".year").attr("data-check", "false"); - $(this).parents(".yearBox").find(".year input[type='checkbox']").removeAttr("checked"); - } - }) - - //日期 三级下拉显示 - $(document).off("click.filterYearDropdown").on("click.filterYearDropdown", "#luckysheet-filter-byvalue-select .yearBox .fa-caret-right",function(event){ - var $p = $(this).parents(".luckysheet-mousedown-cancel"); - if($p.hasClass("year")){ - $(this).parents(".yearBox").find(".monthList").slideToggle(); - } - if($p.hasClass("month")){ - $(this).parents(".monthBox").find(".dayList").slideToggle(); - } - - event.stopPropagation(); - }); - - //全选 - $("#luckysheet-filter-byvalue-btn-all").click(function () { - $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").prop("checked", true); - $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); - }); - - //清除 - $("#luckysheet-filter-byvalue-btn-clear").click(function () { - $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").removeAttr("checked"); - $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); - }); - - //反选 - $("#luckysheet-filter-byvalue-btn-contra").click(function () { - var $input = $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']"); - $input.each(function(i, e){ - if($(e).is(":checked")){ - $(e).removeAttr("checked"); - $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "false"); - } - else{ - $(e).prop("checked", true); - $(e).parents(".luckysheet-mousedown-cancel").attr("data-check", "true"); - } - }); - //天 对应的 月份 - var $month = $("#luckysheet-filter-byvalue-select .ListBox .monthBox"); - $month.each(function(index, event){ - var monthDayAllCheck = true; - var $monthDay = $(event).find(".day input[type='checkbox']"); - $monthDay.each(function(i,e){ - if($(e).is(":checked")){ - - } - else{ - monthDayAllCheck = false; - } - }); - if(monthDayAllCheck){ - $(event).find(".month input[type='checkbox']").prop("checked", true); - $(event).attr("data-check", "true"); - } - else{ - $(event).find(".month input[type='checkbox']").removeAttr("checked"); - $(event).attr("data-check", "false"); - } - }); - //天 对应的 年份 - var $year = $("#luckysheet-filter-byvalue-select .ListBox .yearBox"); - $year.each(function(index, event){ - var yearDayAllCheck = true; - var $yearDay = $(event).find(".day input[type='checkbox']"); - $yearDay.each(function(i,e){ - if($(e).is(":checked")){ - - } - else{ - yearDayAllCheck = false; - } - }); - if(yearDayAllCheck){ - $(event).find(".year input[type='checkbox']").prop("checked", true); - $(event).attr("data-check", "true"); - } - else{ - $(event).find(".year input[type='checkbox']").removeAttr("checked"); - $(event).attr("data-check", "false"); - } - }); - }); - - //清除筛选 - $("#luckysheet-filter-initial").click(function () { - $("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val(); - $("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无"); - - $('#luckysheet-filter-selected-sheet' + luckysheet.currentSheetIndex + ', #luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).remove(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - - var redo = {}; - redo["type"] = "datachangeAll_filter_clear"; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["config"] = $.extend(true, {}, config); - config["rowhidden"] = {}; - redo["curconfig"] = $.extend(true, {}, config); - - redo["filter_save"] = $.extend(true, {}, luckysheet_filter_save); - - var optiongroups = []; - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").each(function () { - var $t = $(this); - - var optionstate = $t.hasClass("luckysheet-filter-options-active"); - var rowhidden = luckysheet.json.parseJsonParm($t.data("rowhidden")); - var caljs = luckysheet.json.parseJsonParm($t.data("caljs")); - - optiongroups.push({ - "optionstate":optionstate, - "rowhidden": rowhidden, - "caljs":caljs, - "str": $t.data("str"), - "edr": $t.data("edr"), - "cindex": $t.data("cindex"), - "stc": $t.data("stc"), - "edc": $t.data("edc") - }); - }); - redo["optiongroups"] = optiongroups; - - luckysheet.jfundo = []; - luckysheet.jfredo.push(redo); - - //清除筛选发送给后台 - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].filter = null; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].filter_select = null; - - luckysheet.server.saveParam("fsc", luckysheet.currentSheetIndex, null); - - //config - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, {}, { "k": "rowhidden" }); - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - }); - - //按照值进行筛选 - $("#luckysheet-filter-byvalue-input").on('input propertychange', function () { - var v = $(this).val().toString(); - $("#luckysheet-filter-byvalue-select .ListBox .luckysheet-mousedown-cancel").show(); - - if(v != ""){ - $("#luckysheet-filter-byvalue-select .ListBox input[type='checkbox']").each(function(i, e){ - if($(e).closest(".day").length > 0){ - var day = $(e).siblings("label").text().toString(); - var month = $(e).closest(".monthBox").find(".month label").text().toString(); - var year = $(e).closest(".yearBox").find(".year label").text().toString(); - var itemV = year + "-" + month + "-" + day; - - if(itemV.indexOf(v) == -1){ - $(e).closest(".day").hide(); - - //天 对应的 月份 - var $monthDay = $(e).closest(".dayList").find(".day:visible"); - if($monthDay.length == 0){ - $(e).closest(".monthBox").find(".month").hide(); - } - - //天 对应的 年份 - var $yearDay = $(e).closest(".monthList").find(".day:visible"); - if($yearDay.length == 0){ - $(e).closest(".yearBox").find(".year").hide(); - } - } - } - - if($(e).closest(".textBox").length > 0){ - var itemV = $(e).siblings("label").text().toString(); - - if(itemV.indexOf(v) == -1){ - $(e).parents(".textBox").hide(); - } - } - }); - } - }); - - //info处理 - // $("#luckysheet_info_detail_user").html(luckysheetConfigsetting.userInfo+' ').click(function(){ - // if(luckysheetConfigsetting.userMenuItem.length==0){ - // return - // } - - // var userlen = $(this).outerWidth(); - // var tlen = $("#luckysheet-user-menu").outerWidth(); - - // var menuleft = $(this).offset().left; - // if(tlen>userlen && (tlen + menuleft)>$("#"+container).width()){ - // menuleft = menuleft - tlen + userlen; - // } - - // mouseclickposition($("#luckysheet-user-menu"), menuleft, $(this).offset().top+20, "lefttop"); - // }); - - if(luckysheetConfigsetting.userMenuItem.length>0){ - $("body").append('
${item}
'); - var itemset = ""; - for(var i=0;i
'+ item.icon +' '+ item.name +'
'; - } - $("#luckysheet-user-menu").html(itemset).find("i").addClass("luckysheet-mousedown-cancel").end().find(".luckysheet-cols-menuitem").click(function(){ - window.open($(this).data("src"), "_self"); - }); - } - - $("#luckysheet_info_detail_title").click(function(){ - window.open(luckysheetConfigsetting.myFolderUrl, "_self"); - }); - - - $("#luckysheet_info_detail_input").val(luckysheet.server.title).css("width", luckysheet.getByteLen(luckysheet.server.title)*10).keydown(function(){ - var ctrlKey = event.ctrlKey; - var altKey = event.altKey; - var shiftKey = event.shiftKey; - var kcode = event.keyCode; - var $t = $(this); - if(kcode == keycode.ENTER){ - $t.blur().change(); - } - }).bind('input propertychange', function() { - var $t = $(this); - var inputlen = luckysheet.getByteLen($t.val())*10; - var updatelen = $("#luckysheet_info_detail_update").outerWidth(); - var savelen = $("#luckysheet_info_detail_save").outerWidth(); - var userlen = $("#luckysheet_info_detail_user").parent().outerWidth()+60; - var containerlen = $("#"+container).outerWidth(); - var otherlen = 100; - - var minuslen = containerlen- savelen - updatelen - userlen - otherlen; - if(inputlen > minuslen){ - $("#luckysheet_info_detail_input").css("width", minuslen); - } - else{ - $("#luckysheet_info_detail_input").css("width", inputlen); - } - }).change(function(){ - luckysheet.server.saveParam("na", null, $(this).val()); - }); - - - //公式处理 - $("#luckysheet-functionbox-cell").focus(function () { - if(luckysheet.isEditMode()){//此模式下禁用公式栏 - return; - } - - if(luckysheet_select_save.length > 0){ - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, row_index, col_index); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - row_index = margeset.row[2]; - col = margeset.column[1]; - col_pre = margeset.column[0]; - col_index = margeset.column[2]; - } - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata, null, true); - luckysheet.formula.rangeResizeTo = $("#luckysheet-functionbox-cell"); - } - }).keydown(function (event) { - if(luckysheet.isEditMode()){//此模式下禁用公式栏 - return; - } - - var ctrlKey = event.ctrlKey; - var altKey = event.altKey; - var shiftKey = event.shiftKey; - var kcode = event.keyCode; - var $inputbox = $("#luckysheet-input-box"); - //luckysheet.formula.rangeHightlightselected(); - - - if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible") && luckysheet.formula.searchFunctionCell != null) { - luckysheet.formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active")); - } - else { - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheet_select_save = [{ "row": [luckysheetCellUpdate[0], luckysheetCellUpdate[0]], "column": [luckysheetCellUpdate[1], luckysheetCellUpdate[1]], "row_focus": luckysheetCellUpdate[0], "column_focus": luckysheetCellUpdate[1] }]; - luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - $("#luckysheet-functionbox-cell").blur(); - } - event.preventDefault(); - } - else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - event.preventDefault(); - } - else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.setfreezonFuc(event); - event.preventDefault(); - } - else if (kcode == keycode.UP && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible")) { - var $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev(); - if ($up.length == 0) { - $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last(); - } - $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); - $up.addClass("luckysheet-formula-search-item-active"); - event.preventDefault(); - } - } - else if (kcode == keycode.DOWN && parseInt($inputbox.css("top")) > 0) { - if ($("#luckysheet-formula-search-c").is(":visible")) { - var $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next(); - if ($up.length == 0) { - $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first(); - } - $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); - $up.addClass("luckysheet-formula-search-item-active"); - event.preventDefault(); - } - } - else if (kcode == keycode.LEFT && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.rangeHightlightselected($("#luckysheet-functionbox-cell")); - } - else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) { - luckysheet.formula.rangeHightlightselected($("#luckysheet-functionbox-cell")); - } - else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) { - luckysheet.formula.functionInputHanddler($("#luckysheet-rich-text-editor"), $("#luckysheet-functionbox-cell"), kcode); - // var value1 = $("#luckysheet-functionbox-cell").html(), value1txt = $("#luckysheet-functionbox-cell").text(); - // setTimeout(function(){ - // var value = $("#luckysheet-functionbox-cell").text(), valuetxt = value; - // if (value.length > 0 && value.substr(0, 1) == "=" && kcode != 229) { - // value = luckysheet.formula.functionHTMLGenerate(value); - // value1 = luckysheet.formula.functionHTMLGenerate(value1txt); - // if (window.getSelection) { // all browsers, except IE before version 9 - // var currSelection = window.getSelection(); - // luckysheet.formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; - // } - // else { // Internet Explorer before version 9 - // var textRange = document.selection.createRange(); - // luckysheet.formula.functionRangeIndex = textRange; - // } - - // $("#luckysheet-functionbox-cell").html(value); - - // luckysheet.formula.functionRange($("#luckysheet-functionbox-cell"), value, value1); - - // //console.log(value, value1, luckysheet.formula.functionRangeIndex); - // // if (luckysheet.formula.functionRangeIndex != null) { - // // luckysheet.formula.functionRange($("#luckysheet-functionbox-cell"), value, value1); - // // } - // // else{ - // // luckysheetRangeLast($("#luckysheet-functionbox-cell")[0]); - // // } - - // } - // $("#luckysheet-rich-text-editor").html(value); - - //},1); - } - - }).click(function () { - if(luckysheet.isEditMode()){//此模式下禁用公式栏 - return; - } - - luckysheet.formula.rangeHightlightselected($("#luckysheet-functionbox-cell")); - //console.log(window.getSelection().getRangeAt(0)); - //if ($(this).text().length == 0) { - // luckysheet.formula.functionRangeIndex = null; - //} - //else{ - // if (window.getSelection) { // all browsers, except IE before version 9 - // var currSelection = window.getSelection(); - // luckysheet.formula.functionRangeIndex = currSelection.getRangeAt(0).endOffset; - // //currSelection.removeAllRanges(); - // } - // else { // Internet Explorer before version 9 - // var textRange = document.selection.createRange(); - // luckysheet.formula.functionRangeIndex = textRange; - // } - //} - //console.log(luckysheet.formula.functionRangeIndex); - }); - - $("#luckysheet-wa-functionbox-cancel").click(function () { - if (!$(this).hasClass("luckysheet-wa-calculate-active")) { - return; - } - //若有参数弹出框,隐藏 - if($("#luckysheet-search-formula-parm").is(":visible")){ - $("#luckysheet-search-formula-parm").hide(); - } - //若有参数选取范围弹出框,隐藏 - if($("#luckysheet-search-formula-parm-select").is(":visible")){ - $("#luckysheet-search-formula-parm-select").hide(); - } - - luckysheet.formula.dontupdate(); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - }); - - $("#luckysheet-wa-functionbox-confirm").click(function () { - if (!$(this).hasClass("luckysheet-wa-calculate-active")) { - return; - } - //若有参数弹出框,隐藏 - if($("#luckysheet-search-formula-parm").is(":visible")){ - $("#luckysheet-search-formula-parm").hide(); - } - //若有参数选取范围弹出框,隐藏 - if($("#luckysheet-search-formula-parm-select").is(":visible")){ - $("#luckysheet-search-formula-parm-select").hide(); - } - - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); - //$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - }); - - $("#luckysheet-wa-functionbox-fx").click(function () { - //点击函数查找弹出框 - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择单元格插入函数"); - } - else{ - luckysheet.tooltip.info("请选择单元格插入函数",""); - } - - return; - } - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata); - - var cell = luckysheet.flowdata[row_index][col_index]; - if(cell != null && cell.f != null){ - //单元格有计算 - var functionStr = luckysheet.formula.getfunctionParam(cell.f); - if(functionStr.fn != null){ - //有函数公式 - luckysheet.insertFormula.formulaParmDialog(functionStr.fn, functionStr.param); - } - else{ - //无函数公式 - luckysheet.insertFormula.formulaListDialog(); - } - } - else{ - //单元格无计算 - $("#luckysheet-rich-text-editor").html('='); - $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - luckysheet.insertFormula.formulaListDialog(); - } - - luckysheet.insertFormula.init(); - }); - - $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-copy", function (event) { - luckysheet.formula.rangeMove = true; - luckysheet_scroll_status = true; - luckysheet.formula.rangeMoveObj = $(this).parent(); - luckysheet.formula.rangeMoveIndex = $(this).parent().attr("rangeindex"); - var mouse = mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - $("#luckysheet-formula-functionrange-highlight-" + luckysheet.formula.rangeMoveIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13); - var type = $(this).data("type"); - if (type == "top") { - y += 3; - } - else if (type == "right") { - x -= 3; - } - else if (type == "bottom") { - y -= 3; - } - else if (type == "left") { - x += 3; - } - - var rowLocation = luckysheet.rowLocation(y), row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), col_index = colLocation[2]; - - luckysheet.formula.rangeMovexy = [row_index, col_index]; - $("#luckysheet-sheettable").css("cursor", "move"); - event.stopPropagation(); - }); - - $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (e) { - luckysheet.formula.rangeResize = $(this).data("type");//开始状态resize - luckysheet.formula.rangeResizeIndex = $(this).parent().attr("rangeindex"); - var mouse = mouseposition(e.pageX, e.pageY), scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - luckysheet.formula.rangeResizeObj = $(this).parent(); - $("#luckysheet-formula-functionrange-highlight-" + luckysheet.formula.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13); - if (luckysheet.formula.rangeResize == "lt") { - x += 3; - y += 3; - } - else if (luckysheet.formula.rangeResize == "lb") { - x += 3; - y -= 3; - } - else if (luckysheet.formula.rangeResize == "rt") { - x -= 3; - y += 3; - } - else if (luckysheet.formula.rangeResize == "rb") { - x -= 3; - y -= 3; - } - - var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - - var position = luckysheet.formula.rangeResizeObj.position(); - luckysheet.formula.rangeResizexy = [col_pre, row_pre, luckysheet.formula.rangeResizeObj.width(), luckysheet.formula.rangeResizeObj.height(), position.left + scrollLeft, position.top + scrollTop, col, row]; - luckysheet.formula.rangeResizeWinH = $("#luckysheet-cell-main")[0].scrollHeight - luckysheet.formula.rangeResizeWinW = $("#luckysheet-cell-main")[0].scrollWidth; - luckysheet_scroll_status = true; - event.stopPropagation(); - }); - - //图表选区mousedown - $("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowMove", ".luckysheet-chart-rangeShow-move", function(event){ - luckysheet.chart_selection.rangeMove = true; - luckysheet_scroll_status = true; - - luckysheet.chart_selection.rangeMoveObj = $(this).parent(); - - var chart_id = luckysheet.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id"); - // var vue = !!window.generator && generator.chartEditorComponent; - var chart_json = !!window.store && store.state.chartSetting.chartList[chart_id]; - - var $id = $(this).parent().attr("id"); - if($id == "luckysheet-chart-rangeShow-content"){ - var row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.content.row[0]; - var col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.content.column[0]; - - luckysheet.chart_selection.rangeMoveIndex = [row_s, col_s]; - } - else if($id == "luckysheet-chart-rangeShow-rowtitle"){ - var row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.rowtitle.row[0]; - var col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.rowtitle.column[0]; - - luckysheet.chart_selection.rangeMoveIndex = [row_s, col_s]; - } - else if($id == "luckysheet-chart-rangeShow-coltitle"){ - var row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.coltitle.row[0]; - var col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.coltitle.column[0]; - - luckysheet.chart_selection.rangeMoveIndex = [row_s, col_s]; - } - - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - var type = $(this).data("type"); - if (type == "top") { - y += 3; - } - else if (type == "right") { - x -= 3; - } - else if (type == "bottom") { - y -= 3; - } - else if (type == "left") { - x += 3; - } - - var rowLocation = luckysheet.rowLocation(y), row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col_index = colLocation[2]; - - luckysheet.chart_selection.rangeMovexy = [row_index, col_index]; - - event.stopPropagation(); - }); - - $("#luckysheet-chart-rangeShow").on("mousedown.chartRangeShowResize", ".luckysheet-chart-rangeShow-resize", function(event){ - luckysheet.chart_selection.rangeResize = $(this).data("type");//开始状态resize - luckysheet_scroll_status = true; - - luckysheet.chart_selection.rangeResizeObj = $(this).parent(); - - var chart_id = luckysheet.chartparam.luckysheetCurrentChartMoveObj.find(".luckysheet-modal-dialog-content").attr("id"); - // var vue = !!window.generator && generator.chartEditorComponent; - var chart_json = !!window.store && store.state.chartSetting.chartList[chart_id]; - - var $id = $(this).parent().attr("id"); - if($id == "luckysheet-chart-rangeShow-content"){ - if(chart_json.rangeRowCheck.exits){ - var row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.content.row[0]; - var row_e = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.content.row[1]; - } - else{ - var row_s = chart_json.rangeSplitArray.content.row[0]; - var row_e = chart_json.rangeSplitArray.content.row[0]; - } - - if(chart_json.rangeColCheck.exits){ - var col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.content.column[0]; - var col_e = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.content.column[1]; - } - else{ - var col_s = chart_json.rangeSplitArray.content.column[0]; - var col_e = chart_json.rangeSplitArray.content.column[1]; - } - - luckysheet.chart_selection.rangeResizeIndex = { "row": [row_s, row_e], "column": [col_s, col_e] }; - } - else if($id == "luckysheet-chart-rangeShow-rowtitle"){ - var row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.rowtitle.row[0]; - var row_e = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.rowtitle.row[1]; - - var col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.rowtitle.column[0]; - var col_e = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.rowtitle.column[1]; - - luckysheet.chart_selection.rangeResizeIndex = { "row": [row_s, row_e], "column": [col_s, col_e] }; - } - else if($id == "luckysheet-chart-rangeShow-coltitle"){ - var row_s = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.coltitle.row[0]; - var row_e = chart_json.rangeArray[0].row[0] + chart_json.rangeSplitArray.coltitle.row[1]; - - var col_s = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.coltitle.column[0]; - var col_e = chart_json.rangeArray[0].column[0] + chart_json.rangeSplitArray.coltitle.column[1]; - - luckysheet.chart_selection.rangeResizeIndex = { "row": [row_s, row_e], "column": [col_s, col_e] }; - } - - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - - if (luckysheet.chart_selection.rangeResize == "lt") { - x += 3; - y += 3; - } - else if (luckysheet.chart_selection.rangeResize == "lb") { - x += 3; - y -= 3; - } - else if (luckysheet.chart_selection.rangeResize == "rt") { - x -= 3; - y += 3; - } - else if (luckysheet.chart_selection.rangeResize == "rb") { - x -= 3; - y -= 3; - } - - var rowLocation = luckysheet.rowLocation(y), row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), col_index = colLocation[2]; - - luckysheet.chart_selection.rangeResizexy = [row_index, col_index]; - - event.stopPropagation(); - }) - - $("#luckysheet-wa-calculate-size").mousedown(function(e){ - var y = e.pageY; - luckysheet.formula.functionResizeData.y = y; - luckysheet.formula.functionResizeStatus = true; - luckysheet.formula.functionResizeData.calculatebarHeight = calculatebarHeight; - if(luckysheet.formula.rangetosheet!=null){ - luckysheet.formula.updatecell(luckysheetCellUpdate[0], luckysheetCellUpdate[1]); - } - - }); - - var luckysheet_function_exe = {}; - - for (var i = 0; i < luckysheet.functionlist.length; i++) { - var func = luckysheet.functionlist[i]; - luckysheet_function_exe[func.n] = func; - } - window.luckysheet_function = luckysheet_function_exe; - - - //toolbar菜单 - $("#"+ container +" .luckysheet-wa-editor").on("click", ".luckysheet-toolbar-zoom-combobox", function(e){ - $(e.currentTarget).addClass("luckysheet-toolbar-combo-button-open"); - $(e.currentTarget).find(".luckysheet-toolbar-combo-button-input").focus(); - }); - - $("#"+ container +" .luckysheet-wa-editor").on("blur", ".luckysheet-toolbar-combo-button-input", function(e){ - $(e.currentTarget).closest(".luckysheet-toolbar-zoom-combobox").removeClass("luckysheet-toolbar-combo-button-open"); - }); - - //表格格式处理 - luckysheet.menuButton.initialMenuButton(); - - var devicePixelRatio = window.devicePixelRatio || 1; - devicePixelRatio = Math.ceil(devicePixelRatio); - - luckysheet.dpi_x = document.getElementById('testdpidiv').offsetWidth * devicePixelRatio; - luckysheet.dpi_y = document.getElementById('testdpidiv').offsetHeight * devicePixelRatio; - $("#testdpidiv").remove(); - - //粘贴事件处理 - $(document).on("paste", function(e){ - if(luckysheet.isEditMode()){//此模式下禁用粘贴 - return; - } - - if(luckysheet.selection.isPasteAction){ - $("#luckysheet-rich-text-editor").blur(); - luckysheet.selection.isPasteAction = false; - - var clipboardData = window.clipboardData; //for IE - if (!clipboardData) { // for chrome - clipboardData = e.originalEvent.clipboardData; - } - - var txtdata = clipboardData.getData("text/html"); - - //如果标示是qksheet复制的内容,判断剪贴板内容是否是当前页面复制的内容 - if(txtdata.indexOf("luckysheet_copy_action_table") >- 1 && luckysheet_copy_save["copyRange"] != null && luckysheet_copy_save["copyRange"].length > 0){ - //剪贴板内容解析 - var cpDataArr = []; - - var reg = new RegExp('(.*?)', 'g'); - var reg2 = new RegExp('(.*?)', 'g'); - - var regArr = txtdata.match(reg); - - for(var i = 0; i < regArr.length; i++){ - var cpRowArr = []; - - var reg2Arr = regArr[i].match(reg2); - - for(var j = 0; j < reg2Arr.length; j++){ - var cpValue = reg2Arr[j].replace(//g, "").replace(/<\/td>/g, ""); - cpRowArr.push(cpValue); - } - - cpDataArr.push(cpRowArr); - } - - //当前页面复制区内容 - var copy_r1 = luckysheet_copy_save["copyRange"][0].row[0], - copy_r2 = luckysheet_copy_save["copyRange"][0].row[1], - copy_c1 = luckysheet_copy_save["copyRange"][0].column[0], - copy_c2 = luckysheet_copy_save["copyRange"][0].column[1]; - - var copy_index = luckysheet_copy_save["dataSheetIndex"]; - - if(copy_index == luckysheet.currentSheetIndex){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - } - else{ - var d = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(copy_index)].data; - } - - var isEqual = true; - - for(var r = copy_r1; r <= copy_r2; r++){ - if(r - copy_r1 > 5){ - break; - } - - for(var c = copy_c1; c <= copy_c2; c++){ - var cell = d[r][c]; - - if(cell != null && cell.ct != null && cell.ct.fa.indexOf("w") > -1){ - var v = d[r][c].v; - } - else{ - var v = d[r][c].m; - } - - if(v != cpDataArr[r - copy_r1][c - copy_c1]){ - isEqual = false; - break; - } - } - } - } - - if(txtdata.indexOf("luckysheet_copy_action_table") >- 1 && luckysheet_copy_save["copyRange"] != null && luckysheet_copy_save["copyRange"].length > 0 && isEqual){ - //剪切板内容 和 luckysheet本身复制的内容 一致 - if(luckysheet_paste_iscut){ - luckysheet_paste_iscut = false; - luckysheet.selection.pasteHandlerOfCutPaste(luckysheet_copy_save); - luckysheet.selection.clearcopy(e); - } - else{ - luckysheet.selection.pasteHandlerOfCopyPaste(luckysheet_copy_save); - } - } - else{ - // if(txtdata.indexOf("table") > -1 && txtdata.indexOf("microsoft") > -1 && txtdata.indexOf("office") > -1 && txtdata.indexOf("excel") > -1 && txtdata.indexOf("mso-") > -1){ - if(txtdata.indexOf("table") > -1){ - $("#luckysheet-copy-content").html(txtdata); - - var data = new Array($("#luckysheet-copy-content").find("table tr").length); - var colLen = 0; - $("#luckysheet-copy-content").find("table tr").eq(0).find("td").each(function(){ - var colspan = parseInt($(this).attr("colspan")); - if(isNaN(colspan)){ - colspan = 1; - } - colLen += colspan; - }); - - for(var i = 0; i < data.length; i++){ - data[i] = new Array(colLen); - } - - var r = 0; - var borderInfo = {}; - $("#luckysheet-copy-content").find("table tr").each(function(){ - var $tr = $(this); - var c = 0; - $tr.find("td").each(function(){ - var $td = $(this); - var cell = {}; - var txt = $td.text(); - - if($.trim(txt).length == 0){ - cell.v = null; - cell.m = ""; - } - else{ - var mask = luckysheet.mask.genarate($td.text()); - cell.v = mask[2]; - cell.ct = mask[1]; - cell.m = mask[0]; - } - - var bg = $td.css("background-color"); - if(bg == "rgba(0, 0, 0, 0)"){ - bg = "rgba(255,255,255)"; - } - // console.log(bg); - // if(bg.indexOf("rgb")>-1){ - // bg = luckysheet.rgbTohex(bg); - // } - // console.log(bg); - cell.bg = bg; - - var bl = $td.css("font-weight"); - if(bl == 400 || bl == "normal"){ - cell.bl = 0; - } - else{ - cell.bl = 1; - } - - var it = $td.css("font-style"); - if(it == "normal"){ - cell.it = 0; - } - else{ - cell.it = 1; - } - - var ff = $td.css("font-family"); - var ffs = ff.split(","); - for(var i = 0; i < ffs.length; i++){ - var fa = $.trim(ffs[i].toLowerCase()); - fa = luckysheet.menuButton.fontjson[fa]; - if(fa == null){ - cell.ff = 0; - } - else{ - cell.ff = fa; - break; - } - } - - var fs = Math.floor(parseInt($td.css("font-size")) * 72 / luckysheet.dpi_y) + 1; - cell.fs = fs; - - var fc = $td.css("color"); - // if(fc.indexOf("rgb")>-1){ - // fc = luckysheet.rgbTohex(fc); - // } - cell.fc = fc; - - var ht = $td.css("text-align"); - if(ht == "center"){ - cell.ht = 0; - } - else if(ht == "right"){ - cell.ht = 2; - } - else{ - cell.ht = 1; - } - - var vt = $td.css("vertical-align"); - if(vt == "middle"){ - cell.vt = 0; - } - else if(vt == "top" || vt == "text-top"){ - cell.vt = 1; - } - else{ - cell.vt = 2; - } - - // var borderstyle = $td.css("border"); - - // if(borderstyle != null && borderstyle.length > 0 && borderstyle.substr(0, 3).toLowerCase() != "0px"){ - // var width = $td.css("border-width"); - // var type = $td.css("border-style"); - // var color = $td.css("border-color"); - // var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - // cell.bs = borderconfig[0]; - // cell.bc = borderconfig[1]; - // } - // else{ - // var bt = $td.css("border-top"); - // if(bt != null && bt.length > 0 && bt.substr(0, 3).toLowerCase() != "0px"){ - // var width = $td.css("border-top-width"); - // var type = $td.css("border-top-style"); - // var color = $td.css("border-top-color"); - // var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - // cell.bs_t = borderconfig[0]; - // cell.bc_t = borderconfig[1]; - // } - // var bb = $td.css("border-bottom"); - // if(bb != null && bb.length > 0 && bb.substr(0, 3).toLowerCase() != "0px"){ - // var width = $td.css("border-bottom-width"); - // var type = $td.css("border-bottom-style"); - // var color = $td.css("border-bottom-color"); - // var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - // cell.bs_b = borderconfig[0]; - // cell.bc_b = borderconfig[1]; - // } - // var bl = $td.css("border-left"); - // if(bl != null && bl.length > 0 && bl.substr(0, 3).toLowerCase() != "0px"){ - // var width = $td.css("border-left-width"); - // var type = $td.css("border-left-style"); - // var color = $td.css("border-left-color"); - // var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - // cell.bs_l = borderconfig[0]; - // cell.bc_l = borderconfig[1]; - // } - // var br = $td.css("border-right"); - // if(br != null && br.length > 0 && br.substr(0, 3).toLowerCase() != "0px"){ - // var width = $td.css("border-right-width"); - // var type = $td.css("border-right-style"); - // var color = $td.css("border-right-color"); - // var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - // cell.bs_r = borderconfig[0]; - // cell.bc_r = borderconfig[1]; - - // if(bl != null && bl.length > 0 && bl.substr(0, 3).toLowerCase() != "0px"){ - - // } - // else{ - // if(bb != null && bb.length > 0 && bb.substr(0, 3).toLowerCase() != "0px"){ - // cell.bs_l = borderconfig[0]; - // cell.bc_l = borderconfig[1]; - // } - // } - // } - // } - - while (c < colLen && data[r][c] != null) { - c++; - } - - if(c == colLen){ - return true; - } - - if(data[r][c] == null){ - data[r][c] = cell; - var rowspan = parseInt($td.attr("rowspan")); - var colspan = parseInt($td.attr("colspan")); - - if(isNaN(rowspan)){ - rowspan = 1; - } - - if(isNaN(colspan)){ - colspan = 1; - } - - var r_ab = luckysheet_select_save[0]["row"][0] + r; - var c_ab = luckysheet_select_save[0]["column"][0] + c; - for(var rp = 0; rp < rowspan; rp++){ - for(var cp = 0; cp < colspan; cp++){ - if(rp == 0){ - var bt = $td.css("border-top"); - if(bt != null && bt.length > 0 && bt.substr(0, 3).toLowerCase() != "0px"){ - var width = $td.css("border-top-width"); - var type = $td.css("border-top-style"); - var color = $td.css("border-top-color"); - var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - - if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ - borderInfo[(r + rp) + "_" + (c + cp)] = {}; - } - - borderInfo[(r + rp) + "_" + (c + cp)].t = { "style": borderconfig[0], "color": borderconfig[1] }; - } - } - - if(rp == rowspan - 1){ - var bb = $td.css("border-bottom"); - if(bb != null && bb.length > 0 && bb.substr(0, 3).toLowerCase() != "0px"){ - var width = $td.css("border-bottom-width"); - var type = $td.css("border-bottom-style"); - var color = $td.css("border-bottom-color"); - var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - - if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ - borderInfo[(r + rp) + "_" + (c + cp)] = {}; - } - - borderInfo[(r + rp) + "_" + (c + cp)].b = { "style": borderconfig[0], "color": borderconfig[1] }; - } - } - - if(cp == 0){ - var bl = $td.css("border-left"); - if(bl != null && bl.length > 0 && bl.substr(0, 3).toLowerCase() != "0px"){ - var width = $td.css("border-left-width"); - var type = $td.css("border-left-style"); - var color = $td.css("border-left-color"); - var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - - if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ - borderInfo[(r + rp) + "_" + (c + cp)] = {}; - } - - borderInfo[(r + rp) + "_" + (c + cp)].l = { "style": borderconfig[0], "color": borderconfig[1] }; - } - } - - if(cp == colspan - 1){ - var br = $td.css("border-right"); - if(br != null && br.length > 0 && br.substr(0, 3).toLowerCase() != "0px"){ - var width = $td.css("border-right-width"); - var type = $td.css("border-right-style"); - var color = $td.css("border-right-color"); - var borderconfig = luckysheet.menuButton.getQKBorder(width, type, color); - - if(borderInfo[(r + rp) + "_" + (c + cp)] == null){ - borderInfo[(r + rp) + "_" + (c + cp)] = {}; - } - - borderInfo[(r + rp) + "_" + (c + cp)].r = { "style": borderconfig[0], "color": borderconfig[1] }; - } - } - - if(rp == 0 && cp == 0){ - continue; - } - data[r + rp][c + cp] = { "mc": {"r": r_ab, "c": c_ab} }; - } - } - - if(rowspan > 1 || colspan > 1){ - var first = { "rs": rowspan, "cs": colspan, "r": r_ab, "c": c_ab}; - data[r][c].mc = first; - // mclist.push(first); - } - } - - c++; - - if(c == colLen){ - return true; - } - //row.push(cell); - }); - - r++; - //data.push(row); - }); - - luckysheet_selection_range = []; - luckysheet.selection.pasteHandler(data, borderInfo); - $("#luckysheet-copy-content").empty(); - } - else{ - txtdata = clipboardData.getData("text/plain"); - luckysheet.selection.pasteHandler(txtdata); - } - } - } - }); - - if(luckysheetConfigsetting.enablePage){ - $("#luckysheet-bottom-page-next").click(function(){ - - // rptapp - var queryExps = luckysheetConfigsetting.pageInfo.queryExps; - var reportId = luckysheetConfigsetting.pageInfo.reportId; - var fields = luckysheetConfigsetting.pageInfo.fields; - var mobile = luckysheetConfigsetting.pageInfo.mobile; - var frezon = luckysheetConfigsetting.pageInfo.frezon; - var currentPage = luckysheetConfigsetting.pageInfo.currentPage; - var totalPage = luckysheetConfigsetting.pageInfo.totalPage; - var pageUrl = luckysheetConfigsetting.pageInfo.pageUrl; - - // rptapp - luckysheet.method.addDataAjax({"queryExps":queryExps, "reportId":reportId, "fields":fields, "mobile":mobile, "frezon":frezon ,"pageIndex": currentPage,"currentPage":currentPage}, luckysheet.currentSheetIndex, pageUrl, function(){ - - luckysheetConfigsetting.pageInfo.currentPage++; - //$("#luckysheet-bottom-page-info").html('共'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage+1) +'页,每页'+ luckysheetConfigsetting.pageInfo.pageSize +'条'); - if(luckysheetConfigsetting.pageInfo.totalPage == (luckysheetConfigsetting.pageInfo.currentPage)){ - $("#luckysheet-bottom-page-next").hide(); - $("#luckysheet-bottom-page-info").html('共'+luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,'+'已显示全部数据'); - } - else{ - $("#luckysheet-bottom-page-info").html('共'+luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页'); - } - }); - }).mousedown(function(e){ - e.stopPropagation(); - }); - - } - $("#luckysheet-bottom-bottom-top").click(function(){ - $("#luckysheet-scrollbar-y").scrollTop(0); - }).mousedown(function(e){ - e.stopPropagation(); - }); - - - } - - - - - var showrightclickmenu = function ($menu, x, y) { - var winH = $(window).height(), winW = $(window).width(); - var menuW = $menu.width(), menuH = $menu.height(); - var top = y, left = x; - if (x + menuW > winW) { - left = x - menuW; - } - - if (y + menuH > winH) { - top = y - menuH; - } - - if (top < 0) { - top = 0; - } - - $menu.css({ "top": top, "left": left }).show(); - } - - luckysheet.showrightclickmenu = showrightclickmenu; - - function mouseclickposition($menu, x, y, p) { - var winH = $(window).height(), winW = $(window).width(); - var menuW = $menu.width(), menuH = $menu.height(); - var top = y, left = x; - - if (p == null) { - p = "lefttop"; - } - - if (p == "lefttop") { - $menu.css({ "top": y, "left": x }).show(); - } - else if (p == "righttop") { - $menu.css({ "top": y, "left": x - menuW }).show(); - } - else if (p == "leftbottom") { - $menu.css({ "bottom": winH - y - 12, "left": x }).show(); - } - else if (p == "rightbottom") { - $menu.css({ "bottom": winH - y - 12, "left": x - menuW }).show(); - } - } - - //function luckysheetsliderlistitemfilter($filter) { - - //} - - - var luckysheetfontformat = function(format){ - if(luckysheet.getObjType(format) == "object"){ - var font = ""; - - //font-style - if(format.it == "0" || format.it == null){ - font += "normal "; - } - else{ - font += "italic "; - } - - //font-variant - font += "normal "; - - //font-weight - if(format.bl == "0" || format.bl == null){ - font += "normal "; - } - else{ - font += "bold "; - } - - //font-size/line-height - if(!format.fs){ - font += Math.ceil(10 * devicePixelRatio) + "pt "; - } - else{ - font += Math.ceil(format.fs * devicePixelRatio) + "pt "; - } - - if(!format.ff){ - font += '微软雅黑, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif'; - } - else{ - var fontarray = luckysheet.menuButton.fontarray; - var fontfamily = null; - if(luckysheet.isdatatypemulti(format.ff)["num"]){ - fontfamily = fontarray[parseInt(format.ff)]; - } - else{ - fontfamily = fontarray[luckysheet.menuButton.fontjson[format.ff]]; - } - - if(fontfamily == null){ - fontfamily = "微软雅黑"; - } - font += fontfamily + ', "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif'; - } - - return font; - } - else{ - return luckysheetdefaultstyle.font; - } - } - luckysheet.luckysheetfontformat = luckysheetfontformat; - - luckysheet.menuButton = { - "menu":'
${item}
', - "item":'
${name} ${example}
', - "split":'', - "color":'
重置颜色
${coloritem}
', - "coloritem":'
${name}
', - "subcolor":'
', - "rightclickmenu":null, - "submenuhide":null, - "focus":function($obj, value){ - $obj.find(".luckysheet-cols-menuitem").find("span.icon").html(""); - if(value==null){ - $obj.find(".luckysheet-cols-menuitem").eq(0).find("span.icon").html(''); - } - else{ - $obj.find(".luckysheet-cols-menuitem[itemvalue='"+ value +"']").find("span.icon").html(''); - } - }, - "createButtonMenu":function(itemdata){ - var itemset = ""; - var _this = this; - for(var i=0;i 1){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("提示","无法对多重选择区域执行此操作"); - } - return; - } - - luckysheet.tooltip.popover(" 格式刷开启", "topCenter", true, null, "ESC键退出",function(){ - //alert("关闭格式刷"); - // $("#luckysheet-sheettable_0").removeClass("luckysheetPaintCursor"); - // $("#luckysheet-selection-copy").hide(); - // luckysheet_selection_range=null; - _this.cancelPaintModel(); - }); - $("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"); - - luckysheet_selection_range = [{ "row": luckysheet_select_save[0].row, "column": luckysheet_select_save[0].column }]; - luckysheet.selectionCopyShow(); - - var RowlChange = false, HasMC = false; - for(var r = luckysheet_select_save[0].row[0]; r <= luckysheet_select_save[0].row[1]; r++){ - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - if (config["rowlen"] != null && (r in config["rowlen"])){ - RowlChange = true; - } - - for(var c = luckysheet_select_save[0].column[0]; c <= luckysheet_select_save[0].column[1]; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell) && cell.mc.rs != null){ - HasMC = true; - } - } - } - luckysheet_copy_save = { "dataSheetIndex": luckysheet.currentSheetIndex, "copyRange": [{ "row": luckysheet_select_save[0].row, "column": luckysheet_select_save[0].column }], "RowlChange": RowlChange, "HasMC": HasMC }; - - _this.luckysheetPaintModelOn = true; - _this.luckysheetPaintSingle = true; - }); - $("#luckysheet-icon-paintformat").dblclick(function(){ - if(luckysheet_select_save == null || luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择需要复制格式的区域"); - } - else{ - luckysheet.tooltip.info("提示","请选择需要复制格式的区域"); - } - return; - } - else if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("无法对多重选择区域执行此操作"); - } - else{ - luckysheet.tooltip.info("提示","无法对多重选择区域执行此操作"); - } - return; - } - - luckysheet.tooltip.popover(" 格式刷开启", "topCenter", true, null, "ESC键退出",function(){ - //alert("关闭格式刷"); - // $("#luckysheet-sheettable_0").removeClass("luckysheetPaintCursor"); - // $("#luckysheet-selection-copy").hide(); - // luckysheet_selection_range=null; - _this.cancelPaintModel(); - }); - $("#luckysheet-sheettable_0").addClass("luckysheetPaintCursor"); - - luckysheet_selection_range = [{ "row": luckysheet_select_save[0].row, "column": luckysheet_select_save[0].column }]; - luckysheet.selectionCopyShow(); - - var RowlChange = false, HasMC = false; - for(var r = luckysheet_select_save[0].row[0]; r <= luckysheet_select_save[0].row[1]; r++){ - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - if (config["rowlen"] != null && (r in config["rowlen"])){ - RowlChange = true; - } - - for(var c = luckysheet_select_save[0].column[0]; c <= luckysheet_select_save[0].column[1]; c++){ - var cell = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell) && cell.mc.rs != null){ - HasMC = true; - } - } - } - luckysheet_copy_save = { "dataSheetIndex": luckysheet.currentSheetIndex, "copyRange": [{ "row": luckysheet_select_save[0].row, "column": luckysheet_select_save[0].column }], "RowlChange": RowlChange, "HasMC": HasMC }; - - _this.luckysheetPaintModelOn = true; - _this.luckysheetPaintSingle = false; - }); - - //货币格式 - $("#luckysheet-icon-currency").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - - _this.updateFormat(d, "ct", "¥ #.00"); - }); - - //百分比 - $("#luckysheet-icon-percent").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - - _this.updateFormat(d, "ct", "0.00%"); - }); - - //减少小数位数 - $("#luckysheet-icon-fmt-decimal-decrease").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var row_index = luckysheet_select_save[0]["row_focus"], - col_index = luckysheet_select_save[0]["column_focus"]; - var foucsStatus = _this.checkstatus(d, row_index, col_index, "ct"); - var cell = d[row_index][col_index]; - - if(foucsStatus == null || foucsStatus.t != "n"){ - return; - } - - if(foucsStatus.fa == "General"){ - var mask = luckysheet.mask.genarate(cell.v); - foucsStatus = mask[1]; - } - - //万亿格式 - var reg = /^(w|W)((0?)|(0\.0+))$/; - if(reg.test(foucsStatus.fa)){ - if(foucsStatus.fa.indexOf(".") > -1){ - if(foucsStatus.fa.substr(-2) == ".0"){ - _this.updateFormat(d, "ct", foucsStatus.fa.split(".")[0]); - } - else{ - _this.updateFormat(d, "ct", foucsStatus.fa.substr(0, foucsStatus.fa.length - 1)); - } - } - else{ - _this.updateFormat(d, "ct", foucsStatus.fa); - } - - return; - } - - var prefix = "", main = ""; - if(foucsStatus.fa.indexOf(".")>-1){ - fa = foucsStatus.fa.split("."); - prefix = fa[0]; - main = fa[1]; - } - else{ - return; - } - - var fa = main.split(""); - var tail = ""; - for(i=fa.length-1;i>=0;i--){ - var c = fa[i]; - if((c!="#" && c!="0" && c!="," && isNaN(parseInt(c)))) { - tail = c + tail; - } - else{ - break; - } - } - - var fmt = ""; - if(foucsStatus.fa.indexOf(".")>-1){ - var suffix = main; - if(tail.length>0){ - suffix = main.replace(tail, ""); - } - - var pos = suffix.replace(/#/g, "0"); - pos = pos.substr(0, pos.length-1); - if(pos==""){ - fmt = prefix + tail; - } - else{ - fmt = prefix + "." + pos + tail; - } - } - - _this.updateFormat(d, "ct", fmt); - }); - - //增加小数位数 - $("#luckysheet-icon-fmt-decimal-increase").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - var row_index = luckysheet_select_save[0]["row_focus"], - col_index = luckysheet_select_save[0]["column_focus"]; - var foucsStatus = _this.checkstatus(d, row_index, col_index, "ct"); - var cell = d[row_index][col_index]; - - if(foucsStatus== null || foucsStatus.t != "n"){ - return; - } - - if(foucsStatus.fa == "General"){ - var mask = luckysheet.mask.genarate(cell.v); - foucsStatus = mask[1]; - } - - if(foucsStatus.fa == "General"){ - _this.updateFormat(d, "ct", "#.0"); - return; - } - - //万亿格式 - var reg = /^(w|W)((0?)|(0\.0+))$/; - if(reg.test(foucsStatus.fa)){ - if(foucsStatus.fa.indexOf(".") > -1){ - _this.updateFormat(d, "ct", foucsStatus.fa + "0"); - } - else{ - if(foucsStatus.fa.substr(-1) == "0"){ - _this.updateFormat(d, "ct", foucsStatus.fa + ".0"); - } - else{ - _this.updateFormat(d, "ct", foucsStatus.fa + "0.0"); - } - } - - return; - } - - var prefix = "", main = ""; - if(foucsStatus.fa.indexOf(".")>-1){ - fa = foucsStatus.fa.split("."); - prefix = fa[0]; - main = fa[1]; - } - else{ - main = foucsStatus.fa; - } - - var fa = main.split(""); - var tail = ""; - for(i=fa.length-1;i>=0;i--){ - var c = fa[i]; - if(( c!="#" && c!="0" && c!="," && isNaN(parseInt(c)))) { - tail = c + tail; - } - else{ - break; - } - } - - var fmt = ""; - if(foucsStatus.fa.indexOf(".")>-1){ - var suffix = main; - if(tail.length>0){ - suffix = main.replace(tail, ""); - } - - var pos = suffix.replace(/#/g, "0"); - pos += "0"; - fmt = prefix + "." + pos + tail; - } - else{ - if(tail.length>0){ - fmt = main.replace(tail, "") + ".0" + tail; - } - else{ - fmt = main + ".0" + tail; - } - } - - - _this.updateFormat(d, "ct", fmt); - }); - - //更多格式 - $("#luckysheet-icon-fmt-other").click(function(){ - var menuButtonId = $(this).attr("id")+"-menuButton"; - var $menuButton = $("#"+menuButtonId); - if($menuButton.length == 0){ - var itemdata = [ - { "text": "自动", "value": "General", "example": "" }, - { "text": "纯文本", "value": "@", "example": "" }, - { "text": "", "value": "split", "example": "" }, - { "text": "数字", "value": "##0.00", "example": "1000.12" }, - { "text": "百分比", "value": "#0.00%", "example": "12.21%" }, - { "text": "科学计数", "value": "0.00E+00", "example": "1.01E+5" }, - { "text": "", "value": "split", "example": "" }, - { "text": "会计", "value": "¥(0.00)", "example": "¥(1200.09)" }, - //{ "text": "财务", "value": "(#.####)", "example": "(1200.09)" }, - { "text": "万元", "value": "w", "example": "1亿2000万2500" }, - { "text": "货币", "value": "¥0.00", "example": "¥1200.09" }, - //{ "text": "货币整数", "value": "¥####", "example": "¥1200" }, - { "text": "万元2位小数", "value": "w0.00", "example": "2万2500.55" }, - { "text": "", "value": "split", "example": "" }, - { "text": "日期", "value": "yyyy-MM-dd", "example": "2017-11-29" }, - { "text": "时间", "value": "hh:mm AM/PM", "example": "3:00 PM" }, - { "text": "时间24H", "value": "hh:mm", "example": "15:00" }, - { "text": "日期时间", "value": "yyyy-MM-dd hh:mm AM/PM", "example": "2017-11-29 3:00 PM" }, - { "text": "日期时间24H", "value": "yyyy-MM-dd hh:mm", "example": "2017-11-29 15:00" }, - { "text": "", "value": "split", "example": "" }, - { "text": "自定义格式", "value": "fmtOtherSelf", "example": "more" } - ]; - - var itemset = _this.createButtonMenu(itemdata); - - // luckysheet-menuButton-sub - var menu = luckysheet.replaceHtml(_this.menu, {"id":"fmt-other", "item": itemset, "subclass":"", "sub":""}); - - var subitemdata = [ - {"text":"更多货币格式...", "value":"morecurrency", "example":""}, - {"text":"更多日期与时间格式...", "value":"moredatetime", "example":""}, - {"text":"更多数字格式...", "value":"moredigit", "example":""} - ]; - var subitemset = _this.createButtonMenu(subitemdata); - var submenu = luckysheet.replaceHtml(_this.menu, {"id":"fmtOtherSelf", "item": subitemset, "subclass":"luckysheet-menuButton-sub"}); - //luckysheet-icon-fmt-other-menuButton_sub - $("body").append(menu+submenu); - $menuButton = $("#"+menuButtonId).width(250); - _this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(itemvalue == "fmtOtherSelf"){ - return; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata);//取数据 - _this.focus($menuButton, itemvalue); - - _this.updateFormat(d, "ct", itemvalue); - }); - - //更多格式 - $("#luckysheet-icon-fmtOtherSelf-menuButton").find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#luckysheet-icon-fmtOtherSelf-menuButton").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var itemvalue = $(this).attr("itemvalue"); - - luckysheet.moreFormat.createDialog(itemvalue); - luckysheet.moreFormat.init(); - }) - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen>userlen && (tlen + menuleft)>$("#"+container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top+25, "lefttop"); - }); - - //字体设置 - $("#luckysheet-icon-font-family").click(function(){ - var menuButtonId = $(this).attr("id")+"-menuButton"; - var $menuButton = $("#"+menuButtonId); - if($menuButton.length == 0){ - var itemdata = [ - { "value": "0", "text": "微软雅黑", "example": "" }, - { "value": "1", "text": "宋体", "example": "" }, - { "value": "2", "text": "黑体", "example": "" }, - { "value": "3", "text": "楷体", "example": "" }, - { "value": "4", "text": "仿宋", "example": "" }, - { "value": "5", "text": "新宋体", "example": "" }, - { "value": "6", "text": "华文新魏", "example": "" }, - { "value": "7", "text": "华文行楷", "example": "" }, - { "value": "8", "text": "华文隶书", "example": "" }, - { "value": "9", "text": "Arial", "example": "" }, - { "value": "10", "text": "Times New Roman", "example": "" }, - { "value": "11", "text": "Tahoma", "example": "" }, - { "value": "12", "text": "Verdana", "example": "" } - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, {"id": "font-family", "item": itemset, "subclass":"", "sub": ""}); - - $("body").append(menu); - $menuButton = $("#"+menuButtonId).width(150); - _this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"), itemname = $t.attr("itemname"); - _this.focus($menuButton, itemvalue); - $("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+ itemname +" "); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - _this.updateFormat(d, "ff", itemvalue); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen>userlen && (tlen + menuleft)>$("#"+container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top+25, "lefttop"); - }); - - //字体颜色 - $("#luckysheet-icon-text-color").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var color = $(this).attr("color"); - if(color==null){ - color = "#000000"; - } - _this.updateFormat(d, "fc", color); - }); - - - $("#luckysheet-icon-text-color-menu").click(function(){ - var menuButtonId = $(this).attr("id")+"-menuButton"; - var $menuButton = $("#"+menuButtonId); - console.log($menuButton.length); - if($menuButton.length==0){ - var itemdata = [ - {"name":"交替颜色...", "id":"luckysheet-color-alternate", "example":""} - ]; - - var itemset = _this.createButtonMenu(itemdata); - var subid = "text-color-self"; - var coloritem = luckysheet.replaceHtml(_this.coloritem, {"class":"luckysheet-icon-alternateformat", "name":"交替颜色..."}); - // luckysheet-menuButton-sub - var menu = luckysheet.replaceHtml(_this.color, {"id":menuButtonId, "coloritem": coloritem, "colorself":subid, "sub":""}); - - //var submenu = luckysheet.replaceHtml(_this.subcolor, {"id": subid, "subclass":"luckysheet-menuButton-sub"}); - //luckysheet-icon-fmt-other-menuButton_sub - $("body").append(menu); - $menuButton = $("#"+menuButtonId); - - // $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - // var $t = $(this), itemvalue = $t.attr("itemvalue"); - // if(itemvalue=="fmtOtherSelf"){ - // return; - // } - // _this.focus($menuButton, itemvalue); - // $menuButton.hide(); - // }); - - //console.log(111) - - $("#"+ menuButtonId).find(".luckysheet-color-selected").spectrum({ - showPalette: true, - showPaletteOnly:true, - preferredFormat: "hex", - clickoutFiresChange: false, - showInitial: true, - showInput: true, - flat: true, - hideAfterPaletteSelect: true, - showSelectionPalette: true, - maxPaletteSize: 8, - maxSelectionSize: 8, - cancelText: "取消", - chooseText: "确定颜色", - togglePaletteMoreText: "自定义", - togglePaletteLessText: "收起", - togglePaletteOnly: true, - clearText: "清除颜色选择", - color:"#000", - noColorSelectedText: "没有颜色被选择", - localStorageKey: "spectrum.textcolor" + luckysheet.server.gridKey, - palette: [["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"], - ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"], - ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"], - ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"], - ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"], - ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"], - ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"], - ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]], - change: function (color) { - var $input = $(this); - if (color != null) { - color = color.toHexString(); - } - else { - color = "#000"; - } - - var oldcolor = null; - $("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", color); - // var $input = $("#"+ menuButtonId).find(".luckysheet-color-selected"); - // $input.spectrum("set", $input.val()); - $("#luckysheet-icon-text-color").attr("color", color); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "fc", color); - - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - }, - }); - - $menuButton.find(".luckysheet-color-reset").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $input = $("#"+ menuButtonId).find(".luckysheet-color-selected"); - $input.val("#000000"); - $("#luckysheet-icon-text-color").attr("color", null); - $input.spectrum("set", "#000000"); - $("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", "#000000"); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "fc", null); - }); - - //交替颜色 - $menuButton.find(".luckysheet-icon-alternateformat").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var range = $.extend(true, {}, luckysheet_select_save[0]); - - var isExists = luckysheet.alternateformat.rangeIsExists(range)[0]; - if(!isExists){ - luckysheet.alternateformat.modelfocusIndex = 0; - luckysheet.alternateformat.new(range); - } - - luckysheet.alternateformat.init(); - luckysheet.alternateformat.perfect(); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen>userlen && (tlen + menuleft)>$("#"+container).width()){ - menuleft = menuleft - tlen + userlen; - } - - var offsetTop = $(this).offset().top+26; - setTimeout(function(){ - var $input = $("#"+ menuButtonId).find(".luckysheet-color-selected"); - $input.spectrum("set", $input.val()); - mouseclickposition($menuButton, menuleft-28, offsetTop, "lefttop"); - }, 1); - - }); - - - //背景颜色 - $("#luckysheet-icon-cell-color").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var color = $(this).attr("color"); - if(color == null){ - color = "#ffffff"; - } - _this.updateFormat(d, "bg", color); - }); - - - $("#luckysheet-icon-cell-color-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var subid = "cell-color-self"; - var coloritem = luckysheet.replaceHtml(_this.coloritem, { "class": "luckysheet-icon-alternateformat", "name": "交替颜色..." }); - var menu = luckysheet.replaceHtml(_this.color, { "id": menuButtonId, "coloritem": coloritem, "colorself": subid, "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId); - - $("#" + menuButtonId).find(".luckysheet-color-selected").spectrum({ - showPalette: true, - showPaletteOnly: true, - preferredFormat: "hex", - clickoutFiresChange: false, - showInitial: true, - showInput: true, - flat: true, - hideAfterPaletteSelect: true, - showSelectionPalette: true, - maxPaletteSize: 8, - maxSelectionSize: 8, - color: "#fff", - cancelText: "取消", - chooseText: "确定颜色", - togglePaletteMoreText: "自定义", - togglePaletteLessText: "收起", - togglePaletteOnly: true, - clearText: "清除颜色选择", - noColorSelectedText: "没有颜色被选择", - localStorageKey: "spectrum.bgcolor" + luckysheet.server.gridKey, - palette: [ - ["#000", "#444", "#666", "#999", "#ccc", "#eee", "#f3f3f3", "#fff"], - ["#f00", "#f90", "#ff0", "#0f0", "#0ff", "#00f", "#90f", "#f0f"], - ["#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d0e0e3", "#cfe2f3", "#d9d2e9", "#ead1dc"], - ["#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#9fc5e8", "#b4a7d6", "#d5a6bd"], - ["#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6fa8dc", "#8e7cc3", "#c27ba0"], - ["#c00", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3d85c6", "#674ea7", "#a64d79"], - ["#900", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#0b5394", "#351c75", "#741b47"], - ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] - ], - change: function (color) { - var $input = $(this); - if (color != null) { - color = color.toHexString(); - } - else { - color = "#fff"; - } - - var oldcolor = null; - $("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", color); - - $("#luckysheet-icon-cell-color").attr("color", color); - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "bg", color); - - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - } - }); - - $menuButton.find(".luckysheet-color-reset").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $input = $("#" + menuButtonId).find(".luckysheet-color-selected"); - $input.val("#ffffff"); - $("#luckysheet-icon-cell-color").attr("color", null); - $input.spectrum("set", "#ffffff"); - $("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", "#ffffff"); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "bg", null); - }); - - //交替颜色 - $menuButton.find(".luckysheet-icon-alternateformat").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet_select_save.length > 1){ - if(luckysheet.isEditMode()){ - alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); - } - else{ - luckysheet.tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); - } - return; - } - - var range = $.extend(true, {}, luckysheet_select_save[0]); - - var isExists = luckysheet.alternateformat.rangeIsExists(range)[0]; - if(!isExists){ - luckysheet.alternateformat.modelfocusIndex = 0; - luckysheet.alternateformat.new(range); - } - - luckysheet.alternateformat.init(); - luckysheet.alternateformat.perfect(); - }); - - $("#" + menuButtonId).find(".luckysheet-color-selected").val("#fff"); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - - var offsetTop = $(this).offset().top + 26; - setTimeout(function(){ - var $input = $("#"+ menuButtonId).find(".luckysheet-color-selected"); - $input.spectrum("set", $input.val()); - mouseclickposition($menuButton, menuleft - 28, offsetTop, "lefttop"); - }, 1); - }); - - - //字体大小 - var luckysheet_fs_setTimeout = null; - $("#luckysheet-icon-font-size").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - { "text": "9", "value": "9", "example": "" }, - { "text": "10", "value": "10", "example": "" }, - { "text": "11", "value": "11", "example": "" }, - { "text": "12", "value": "12", "example": "" }, - { "text": "14", "value": "14", "example": "" }, - { "text": "16", "value": "16", "example": "" }, - { "text": "18", "value": "18", "example": "" }, - { "text": "20", "value": "20", "example": "" }, - { "text": "22", "value": "22", "example": "" }, - { "text": "24", "value": "24", "example": "" }, - { "text": "26", "value": "26", "example": "" }, - { "text": "28", "value": "28", "example": "" }, - { "text": "36", "value": "36", "example": "" }, - { "text": "48", "value": "48", "example": "" }, - { "text": "72", "value": "72", "example": "" } - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "font-size", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(150); - _this.focus($menuButton, 10); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"), $input = $("#luckysheet-icon-font-size input"); - $("#luckysheet-icon-font-size").attr("itemvalue", itemvalue); - _this.focus($menuButton, itemvalue); - $input.val(itemvalue); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "fs", itemvalue); - - clearTimeout(luckysheet_fs_setTimeout); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var defualtvalue = $("#luckysheet-icon-font-size").attr("itemvalue"); - if(defualtvalue == null){ - defualtvalue = 10; - } - _this.focus($menuButton, defualtvalue); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); - }) - // .find("input.luckysheet-toolbar-textinput").blur(function(){ - // var itemvalue = parseInt($(this).val()); - // var $menuButton = $("#luckysheet-icon-font-size-menuButton"); - // _this.focus($menuButton, itemvalue); - // var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - // _this.updateFormat(d, "fs", itemvalue); - // luckysheet_fs_setTimeout = setTimeout(function(){ - // $menuButton.hide(); - // }, 200); - // }); - - //边框设置 - $("#luckysheet-icon-border-all").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var type = $(this).attr("type"); - if(type == null){ - type = "border-all"; - } - - var subcolormenuid = "luckysheet-icon-borderColor-menuButton"; - var color = $("#" + subcolormenuid).find(".luckysheet-color-selected").val(); - var style = $("#luckysheetborderSizepreview").attr("itemvalue"); - - if(color == null || color == ""){ - color = "#000"; - } - - if(style == null || style == ""){ - style = "1"; - } - - var cfg = $.extend(true, {}, config); - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - var borderInfo = { - "rangeType": "range", - "borderType": type, - "color": color, - "style": style, - "range": luckysheet_select_save - } - - cfg["borderInfo"].push(borderInfo); - - if (clearjfundo) { - luckysheet.jfundo = []; - - var redo = []; - - redo["type"] = "borderChange"; - - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = $.extend(true, {}, cfg); - - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - luckysheet.jfredo.push(redo); - } - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["borderInfo"], { "k": "borderInfo" }); - - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - }); - - $("#luckysheet-icon-border-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var canvasH = 10, canvasW = 120; - - var itemdata = [ - {"text": "上框线", "value": "border-top", "example": '
'}, - {"text": "下框线", "value":"border-bottom", "example": '
'}, - {"text": "左框线", "value":"border-left", "example": '
'}, - {"text": "右框线", "value":"border-right", "example": '
'}, - {"text": "", "value": "split", "example":""}, - {"text": "无", "value": "border-none", "example": '
'}, - {"text": "所有", "value": "border-all", "example": '
'}, - {"text": "外侧", "value": "border-outside", "example": '
'}, - {"text": "", "value": "split", "example": ""}, - {"text": "内侧", "value": "border-inside", "example": '
'}, - {"text": "内侧横线", "value": "border-horizontal", "example": '
'}, - {"text": "内侧竖线", "value": "border-vertical", "example": '
'}, - {"text": "", "value": "split", "example": ""}, - {"text": "边框颜色", "value":"borderColor", "example":"more"}, - {"text": "边框粗细", "value":"borderSize", "example":"more"} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "border-menu", "item": itemset, "subclass": "", "sub": "" }); - - var subitemdata = [ - {"text": "无边框", "value": "0", "example": ""}, - {"text": "", "value": "1", "example": ""}, - {"text": "", "value": "2", "example": ""}, - {"text": "", "value": "3", "example": ""}, - {"text": "", "value": "4", "example": ""}, - {"text": "", "value": "5", "example": ""}, - {"text": "", "value": "6", "example": ""}, - // {"text":"", "value":"7", "example":""}, - {"text": "", "value": "8", "example": ""}, - {"text": "", "value": "9", "example": ""}, - {"text": "", "value": "10", "example": ""}, - {"text": "", "value": "11", "example": ""}, - // {"text":"", "value":"12", "example":""}, - {"text": "", "value": "13", "example": ""} - ]; - - var subitemset = _this.createButtonMenu(subitemdata); - var submenu = luckysheet.replaceHtml(_this.menu, { "id": "borderSize", "item": subitemset, "subclass": "luckysheet-menuButton-sub" }); - var submenuid = "luckysheet-icon-borderSize-menuButton"; - var subcolormenuid = "luckysheet-icon-borderColor-menuButton"; - var colormenu = luckysheet.replaceHtml(_this.color, { "id": subcolormenuid, "coloritem": "", "colorself": "", "sub": "luckysheet-menuButton-sub" }); - - $("body").append(menu + colormenu + submenu); - $menuButton = $("#" + menuButtonId).width(150); - _this.focus($menuButton, "border-all"); - - $("#" + submenuid + " canvas").each(function(i){ - var type = $(this).attr("type"); - var itemvalue = $(this).closest(".luckysheet-cols-menuitem").attr("itemvalue"); - var canvasborder = $(this).addClass("luckysheet-mousedown-cancel").get(0).getContext("2d"); - canvasborder.translate(0.5, 0.5); - - _this.setLineDash(canvasborder, itemvalue, "h", 0, 5, 100, 5); - - canvasborder.strokeStyle = "#000000"; - canvasborder.stroke(); - canvasborder.closePath(); - }); - - $("#" + submenuid + " .luckysheet-cols-menuitem").click(function(){ - $("#"+ submenuid).hide(); - - var $t = $(this), - itemvalue = $t.attr("itemvalue"); - - if(itemvalue == 0){ - $("#luckysheetborderSizepreview").attr("src", "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==").attr("itemvalue", null); - } - else{ - var bg = $t.find("canvas").get(0).toDataURL("image/png"); - $("#luckysheetborderSizepreview").attr("src", bg).attr("itemvalue", itemvalue); - } - - _this.focus($("#" + submenuid), itemvalue); - }); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - if(itemvalue == "borderColor" || itemvalue == "borderSize"){ - return; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - var color = $("#"+ subcolormenuid).find(".luckysheet-color-selected").val(); - var style = $("#luckysheetborderSizepreview").attr("itemvalue"); - - if(color == null || color == ""){ - color = "#000"; - } - - if(style == null || style == ""){ - style = "1"; - } - - var cfg = $.extend(true, {}, config); - if(cfg["borderInfo"] == null){ - cfg["borderInfo"] = []; - } - - var borderInfo = { - "rangeType": "range", - "borderType": itemvalue, - "color": color, - "style": style, - "range": luckysheet_select_save - } - - cfg["borderInfo"].push(borderInfo); - - if (clearjfundo) { - luckysheet.jfundo = []; - - var redo = []; - - redo["type"] = "borderChange"; - - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = $.extend(true, {}, cfg); - - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - luckysheet.jfredo.push(redo); - } - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, cfg["borderInfo"], { "k": "borderInfo" }); - - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - $("#luckysheet-icon-border-all").attr("type", itemvalue); - - var $icon = $("#luckysheet-icon-border-all").find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-" + itemvalue); - - _this.focus($menuButton, itemvalue); - }); - - - $("#" + subcolormenuid).find(".luckysheet-color-selected").spectrum({ - showPalette: true, - showPaletteOnly: true, - preferredFormat: "hex", - clickoutFiresChange: false, - showInitial: true, - showInput: true, - flat: true, - hideAfterPaletteSelect: true, - showSelectionPalette: true, - maxPaletteSize: 8, - maxSelectionSize: 8, - color: "#000", - cancelText: "取消", - chooseText: "确定颜色", - togglePaletteMoreText: "自定义", - togglePaletteLessText: "收起", - togglePaletteOnly: true, - clearText: "清除颜色选择", - noColorSelectedText: "没有颜色被选择", - localStorageKey: "spectrum.bordercolor" + luckysheet.server.gridKey, - palette: [ - ["#000", "#444", "#666", "#999", "#ccc", "#eee", "#f3f3f3", "#fff"], - ["#f00", "#f90", "#ff0", "#0f0", "#0ff", "#00f", "#90f", "#f0f"], - ["#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d0e0e3", "#cfe2f3", "#d9d2e9", "#ead1dc"], - ["#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#9fc5e8", "#b4a7d6", "#d5a6bd"], - ["#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6fa8dc", "#8e7cc3", "#c27ba0"], - ["#c00", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3d85c6", "#674ea7", "#a64d79"], - ["#900", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#0b5394", "#351c75", "#741b47"], - ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] - ], - change: function (color) { - var $input = $(this); - if (color != null) { - color = color.toHexString(); - } - else { - color = "#000"; - } - - var oldcolor = null; - $("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color", color); - $("#"+ subcolormenuid).find(".luckysheet-color-selected").val(color); - } - }); - - $("#"+ subcolormenuid).find(".luckysheet-color-reset").click(function(){ - var $input = $("#"+ subcolormenuid).find(".luckysheet-color-selected"); - $input.val("#000"); - $("#luckysheet-icon-cell-color").attr("color", null); - $input.spectrum("set", "#000"); - $("#luckysheet-icon-borderColor-linecolor").css("border-bottom-color", "#000"); - // var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - // _this.updateFormat(d, "bg", null); - // $menuButton.hide(); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen>userlen && (tlen + menuleft)>$("#"+container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft-28, $(this).offset().top+25, "lefttop"); - }); - - //合并单元格 - $("#luckysheet-icon-merge-button").click(function(){ - if(luckysheet.selectIsOverlap()){ - if(luckysheet.isEditMode()){ - alert("不能合并重叠区域"); - } - else{ - luckysheet.tooltip.info("不能合并重叠区域", ""); - } - return; - } - - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat_mc(d, "mergeAll"); - }); - - $("#luckysheet-icon-merge-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "全部合并", "value": "mergeAll", "example": ""}, - {"text": "垂直合并", "value": "mergeV", "example": ""}, - {"text": "水平合并", "value": "mergeH", "example": ""}, - {"text": "取消合并", "value": "mergeCancel", "example": ""} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "merge-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#"+menuButtonId).width(100); - _this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - if(luckysheet.selectIsOverlap()){ - if(luckysheet.isEditMode()){ - alert("不能合并重叠区域"); - } - else{ - luckysheet.tooltip.info("不能合并重叠区域", ""); - } - return; - } - - if(config["merge"] != null){ - var hasPartMC = false; - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var r1 = luckysheet_select_save[s].row[0], r2 = luckysheet_select_save[s].row[1]; - var c1 = luckysheet_select_save[s].column[0], c2 = luckysheet_select_save[s].column[1]; - - hasPartMC = luckysheet.hasPartMC(config, r1, r2, c1, c2); - - if(hasPartMC){ - break; - } - } - - if(hasPartMC){ - if(luckysheet.isEditMode()){ - alert("无法对部分合并单元格执行此操作"); - } - else{ - luckysheet.tooltip.info("无法对部分合并单元格执行此操作", ""); - } - return; - } - } - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - _this.focus($menuButton, itemvalue); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat_mc(d, itemvalue); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); - }); - - //水平对齐 - $("#luckysheet-icon-align").click(function(){ - var itemvalue = $("#luckysheet-icon-align").attr("type"); - if(itemvalue == null){ - itemvalue = "left"; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "ht", itemvalue); - }); - - $("#luckysheet-icon-align-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "左对齐", "value": "left", "example": '
'}, - {"text": "中间对齐", "value": "center", "example": '
'}, - {"text": "右对齐", "value": "right", "example": '
'} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "align-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(120); - _this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-align").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-" + itemvalue); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "ht", itemvalue); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); - }); - - //垂直对齐 - $("#luckysheet-icon-valign").click(function(){ - var itemvalue = $("#luckysheet-icon-valign").attr("type"); - if(itemvalue == null){ - itemvalue = "bottom"; - } - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "vt", itemvalue); - }); - - $("#luckysheet-icon-valign-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "顶部对齐", "value": "top", "example": '
'}, - {"text": "居中对齐", "value": "middle", "example": '
'}, - {"text": "底部对齐", "value": "bottom", "example": '
'} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "valign-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(120); - _this.focus($menuButton, "bottom"); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-valign").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-" + itemvalue); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "vt", itemvalue); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); - }); - - //文本换行 - $("#luckysheet-icon-textwrap-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "溢出", "value": "overflow", "example": '
'}, - {"text": "自动换行", "value": "wrap", "example": '
'}, - {"text": "截断", "value": "clip", "example": '
'} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "textwrap-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(120); - _this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-textwrap").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-" + itemvalue); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "tb", itemvalue); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); - }); - - //文本旋转 - $("#luckysheet-icon-rotation-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "无旋转", "value": "none", "example": '
'}, - {"text": "向上倾斜", "value": "angleup", "example": '
'}, - {"text": "向下倾斜", "value": "angledown", "example": '
'}, - {"text": "竖排文字", "value": "vertical", "example": '
'}, - {"text": "向上90°", "value": "rotation-up", "example": '
'}, - {"text": "向下90°", "value": "rotation-down", "example": '
'}, - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "rotation-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(120); - _this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-rotation").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-" + itemvalue); - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - _this.updateFormat(d, "tr", itemvalue); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft - 28, $(this).offset().top + 25, "lefttop"); - }); - - //冻结行列 - $("#luckysheet-icon-freezen-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "冻结首行", "value": "freezenRow", "example": ''}, - {"text": "冻结首列", "value": "freezenColumn", "example": ''}, - {"text": "冻结行列", "value": "freezenRC", "example": ''}, - {"text": "", "value": "split", "example": ""}, - {"text": "冻结行到选区", "value": "freezenRowRange", "example": ''}, - {"text": "冻结列到选区", "value": "freezenColumnRange", "example": ''}, - {"text": "冻结行列到选区", "value": "freezenRCRange", "example": ''}, - {"text": "", "value": "split", "example": ""}, - {"text": "取消冻结", "value": "freezenCancel", "example": ''} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "freezen-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(130); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - _this.focus($menuButton, itemvalue); - - if(itemvalue == "freezenRow"){ //首行冻结 - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var row_st = luckysheet_searcharray(visibledatarow, scrollTop); - if(row_st == -1){ - row_st = 0; - } - var top = visibledatarow[row_st] - 2 - scrollTop + columeHeaderHeight; - var freezenhorizontaldata = [visibledatarow[row_st], row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_st + 1), top]; - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, null, null); - - if (luckysheet.freezen.freezenverticaldata != null) { - luckysheet.freezen.cancelFreezenVertical(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - luckysheet.freezen.createFreezenHorizontal(freezenhorizontaldata, top); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - else if(itemvalue == "freezenColumn"){ //首列冻结 - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var col_st = luckysheet_searcharray(visibledatacolumn, scrollLeft); - if(col_st == -1){ - col_st = 0; - } - var left = visibledatacolumn[col_st] - 2 - scrollLeft + rowHeaderWidth; - var freezenverticaldata = [visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_st + 1), left]; - luckysheet.freezen.saveFreezen(null, null, freezenverticaldata, left); - - if (luckysheet.freezen.freezenhorizontaldata != null) { - luckysheet.freezen.cancelFreezenHorizontal(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - luckysheet.freezen.createFreezenVertical(freezenverticaldata, left); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - else if(itemvalue == "freezenRC"){ //首行列冻结 - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var row_st = luckysheet_searcharray(visibledatarow, scrollTop); - if(row_st == -1){ - row_st = 0; - } - var top = visibledatarow[row_st] - 2 - scrollTop + columeHeaderHeight; - var freezenhorizontaldata = [visibledatarow[row_st], row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_st + 1), top]; - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, null, null); - - luckysheet.freezen.createFreezenHorizontal(freezenhorizontaldata, top); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var col_st = luckysheet_searcharray(visibledatacolumn, scrollLeft); - if(col_st == -1){ - col_st = 0; - } - var left = visibledatacolumn[col_st] - 2 - scrollLeft + rowHeaderWidth; - var freezenverticaldata = [visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_st + 1), left]; - luckysheet.freezen.saveFreezen(null, null, freezenverticaldata, left); - - luckysheet.freezen.createFreezenVertical(freezenverticaldata, left); - - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - else if(itemvalue == "freezenRowRange"){ //选区行冻结 - if(luckysheet_select_save == null || luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有选区"); - } - else{ - luckysheet.tooltip.info("没有选区", ""); - } - - return; - } - - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var row_st = luckysheet_searcharray(visibledatarow, scrollTop); - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var row_focus = last["row_focus"] == null ? last["row"][0] : last["row_focus"]; - - if(row_focus > row_st){ - row_st = row_focus; - } - - if(row_st == -1){ - row_st = 0; - } - - var top = visibledatarow[row_st] - 2 - scrollTop + columeHeaderHeight; - var freezenhorizontaldata = [visibledatarow[row_st], row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_st + 1), top]; - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, null, null); - - if (luckysheet.freezen.freezenverticaldata != null) { - luckysheet.freezen.cancelFreezenVertical(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - luckysheet.freezen.createFreezenHorizontal(freezenhorizontaldata, top); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - else if(itemvalue == "freezenColumnRange"){ //选区列冻结 - if(luckysheet_select_save == null || luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有选区"); - } - else{ - luckysheet.tooltip.info("没有选区",""); - } - - return; - } - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var col_st = luckysheet_searcharray(visibledatacolumn, scrollLeft); - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var column_focus = last["column_focus"] == null ? last["column"][0] : last["column_focus"]; - - if(column_focus > col_st){ - col_st = column_focus; - } - - if(col_st == -1){ - col_st = 0; - } - - var left = visibledatacolumn[col_st] - 2 - scrollLeft + rowHeaderWidth; - var freezenverticaldata = [visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_st + 1), left]; - luckysheet.freezen.saveFreezen(null, null, freezenverticaldata, left); - - if (luckysheet.freezen.freezenhorizontaldata != null) { - luckysheet.freezen.cancelFreezenHorizontal(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - luckysheet.freezen.createFreezenVertical(freezenverticaldata, left); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - else if(itemvalue == "freezenRCRange"){ //选区行列冻结 - if(luckysheet_select_save == null || luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("没有选区"); - } - else{ - luckysheet.tooltip.info("没有选区",""); - } - - return; - } - - var scrollTop = $("#luckysheet-cell-main").scrollTop(); - var row_st = luckysheet_searcharray(visibledatarow, scrollTop); - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var row_focus = last["row_focus"] == null ? last["row"][0] : last["row_focus"]; - - if(row_focus > row_st){ - row_st = row_focus; - } - - if(row_st == -1){ - row_st = 0; - } - - var top = visibledatarow[row_st] - 2 - scrollTop + columeHeaderHeight; - var freezenhorizontaldata = [visibledatarow[row_st], row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_st + 1), top]; - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, null, null); - - luckysheet.freezen.createFreezenHorizontal(freezenhorizontaldata, top); - - var scrollLeft = $("#luckysheet-cell-main").scrollLeft(); - var col_st = luckysheet_searcharray(visibledatacolumn, scrollLeft); - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var column_focus = last["column_focus"] == null ? last["column"][0] : last["column_focus"]; - - if(column_focus > col_st){ - col_st = column_focus; - } - - if(col_st == -1){ - col_st = 0; - } - - var left = visibledatacolumn[col_st] - 2 - scrollLeft + rowHeaderWidth; - var freezenverticaldata = [visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_st + 1), left]; - luckysheet.freezen.saveFreezen(null, null, freezenverticaldata, left); - - luckysheet.freezen.createFreezenVertical(freezenverticaldata, left); - - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - else if(itemvalue == "freezenCancel"){ //取消冻结 - if (luckysheet.freezen.freezenverticaldata != null) { - luckysheet.freezen.cancelFreezenVertical(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - if (luckysheet.freezen.freezenhorizontaldata != null) { - luckysheet.freezen.cancelFreezenHorizontal(); - luckysheet.freezen.createAssistCanvas(); - luckysheet.luckysheetrefreshgrid(); - } - - luckysheet.freezen.scrollAdapt(); - } - - setTimeout(function(){ - luckysheet.luckysheetsizeauto(); - },0); - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft - 68, $(this).offset().top + 25, "lefttop"); - }); - - //过滤和排序 - $("#luckysheet-icon-autofilter").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "升序", "value": "asc", "example": ''}, - {"text": "降序", "value": "desc", "example": ''}, - {"text": "自定义排序...", "value": "diysort", "example": ''}, - {"text": "", "value": "split", "example": ""}, - {"text": "筛选", "value": "filter", "example": ''}, - {"text": "清除筛选", "value": "clearfilter", "example": ''} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, {"id":"autofilter", "item": itemset, "subclass":"", "sub":""}); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(150); - //_this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - //_this.focus($menuButton, itemvalue); - - if(itemvalue == "diysort"){ - $("#luckysheetorderby").click(); - } - else if(itemvalue == "asc"){ - luckysheet.sortSelection(true); - } - else if(itemvalue == "desc"){ - luckysheet.sortSelection(false); - } - else if(itemvalue == "filter"){ - if($('#luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).length > 0){ - $("#luckysheet-filter-initial").click(); - } - else{ - luckysheet.createFilter(); - } - } - else if(itemvalue == "clearfilter"){ - $("#luckysheet-filter-initial").click(); - } - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); - }); - - //查找和替换 - $("#luckysheet-icon-seachmore").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "查找 ...", "value": "search", "example": ''}, - {"text": "替换 ...", "value": "replace", "example": ''}, - {"text": "转到 ...", "value": "goto", "example": ''}, - {"text": "", "value": "split", "example": ""}, - {"text": "定位条件 ...", "value": "location", "example": ''}, - {"text": "公式", "value": "locationFormula", "example": '定位'}, - {"text": "日期", "value": "locationConstantDate", "example": '定位'}, - {"text": "数字", "value": "locationConstantNumber", "example": '定位'}, - {"text": "字符", "value": "locationConstantString", "example": '定位'}, - {"text": "错误", "value": "locationConstantError", "example": '定位'}, - {"text": "条件格式", "value": "locationCF", "example": '定位'}, - {"text": "间隔行", "value": "locationStepRow", "example": '定位'}, - {"text": "间隔列", "value": "locationStepColumn", "example": '定位'} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "seachmore", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(150); - //_this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - //_this.focus($menuButton, itemvalue); - - if(itemvalue == "search" || itemvalue == "replace"){ //查找替换 - if(itemvalue == "search"){ - luckysheet.searchReplace.createDialog(0); - } - else if(itemvalue == "replace"){ - luckysheet.searchReplace.createDialog(1); - } - - luckysheet.searchReplace.init(); - - $("#luckysheet-search-replace #searchInput input").focus(); - } - else if(itemvalue == "location"){ //定位条件 - luckysheet.locationCell.createDialog(); - luckysheet.locationCell.init(); - } - else if(itemvalue == "locationFormula" || itemvalue == "locationConstantDate" || itemvalue == "locationConstantNumber" || itemvalue == "locationConstantString" || itemvalue == "locationConstantError" || itemvalue == "locationCF"){ - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1] && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - //单个单元格 - var range = [{"row": [0, luckysheet.flowdata.length - 1], "column": [0, luckysheet.flowdata[0].length - 1]}]; - } - else{ - var range = $.extend(true, [], luckysheet_select_save); - } - - if(itemvalue == "locationFormula"){ //公式 - luckysheet.locationCell.apply(range, "locationFormula", "all"); - } - else if(itemvalue == "locationConstantDate"){ //日期 - luckysheet.locationCell.apply(range, "locationConstant", "d"); - } - else if(itemvalue == "locationConstantNumber"){ //数字 - luckysheet.locationCell.apply(range, "locationConstant", "n"); - } - else if(itemvalue == "locationConstantString"){ //字符 - luckysheet.locationCell.apply(range, "locationConstant", "s,g"); - } - else if(itemvalue == "locationConstantError"){ //错误 - luckysheet.locationCell.apply(range, "locationConstant", "e"); - } - else if(itemvalue == "locationCF"){ //条件格式 - luckysheet.locationCell.apply(range, "locationCF"); - } - } - else if(itemvalue == "locationStepRow"){ //间隔行 - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].row[0] == luckysheet_select_save[0].row[1])){ - if(luckysheet.isEditMode()){ - alert("请选择最少两行"); - } - else{ - luckysheet.tooltip.info("提示", "请选择最少两行"); - } - return; - } - - var range = $.extend(true, [], luckysheet_select_save); - - luckysheet.locationCell.apply(range, "locationStepRow"); - } - else if(itemvalue == "locationStepColumn"){ //间隔列 - if(luckysheet_select_save.length == 0 || (luckysheet_select_save.length == 1 && luckysheet_select_save[0].column[0] == luckysheet_select_save[0].column[1])){ - if(luckysheet.isEditMode()){ - alert("请选择最少两列"); - } - else{ - luckysheet.tooltip.info("提示", "请选择最少两列"); - } - return; - } - - var range = $.extend(true, [], luckysheet_select_save); - - luckysheet.locationCell.apply(range, "locationStepColumn"); - } - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); - }); - - //公式 - $("#luckysheet-icon-function").click(function(){ - _this.autoSelectionFormula("SUM"); - }); - - //公式菜单 - $("#luckysheet-icon-function-menu").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "求和", "value": "SUM", "example": 'SUM'}, - {"text": "平均值", "value": "AVERAGE", "example": 'AVERAGE'}, - {"text": "计数", "value": "COUNT", "example": 'COUNT'}, - {"text": "最大值", "value": "MAX", "example": 'MAX'}, - {"text": "最小值", "value": "MIN", "example": 'MIN'}, - {"text": "", "value": "split", "example": ""}, - {"text": "if公式生成器", "value": "if", "example": 'IF'}, - {"text": "函数查找 ...", "value": "formula", "example": ""} - ]; - - var itemset = _this.createButtonMenu(itemdata); - - var menu = luckysheet.replaceHtml(_this.menu, { "id": "function-menu", "item": itemset, "subclass": "", "sub": "" }); - - $("body").append(menu); - $menuButton = $("#" + menuButtonId).width(150); - //_this.focus($menuButton); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - //_this.focus($menuButton, itemvalue); - - if(itemvalue == "if"){ - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - var r = last["row_focus"] == null ? last["row"][0] : last["row_focus"]; - var c = last["column_focus"] == null ? last["column"][0] : last["column_focus"]; - - if(!!luckysheet.flowdata[r] && !!luckysheet.flowdata[r][c] && !!luckysheet.flowdata[r][c]["f"]){ - var fp = luckysheet.flowdata[r][c]["f"].toString(); - if(fp.indexOf("=if(") != -1){ - luckysheet.ifFormulaGenerator.ifFormulaDialog(fp); - } - else{ - if(luckysheet.isEditMode()){ - alert("该单元格函数不属于if公式!"); - } - else{ - luckysheet.tooltip.info("该单元格函数不属于if公式!",""); - } - return; - } - } - else{ - luckysheet.ifFormulaGenerator.ifFormulaDialog(); - } - - luckysheet.ifFormulaGenerator.init(); - } - else if(itemvalue == "formula"){ - //点击函数查找弹出框 - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择单元格插入函数"); - } - else{ - luckysheet.tooltip.info("请选择单元格插入函数",""); - } - - return; - } - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"], col_index = last["column_focus"]; - var row = visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : visibledatarow[row_index - 1]; - var col = visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : visibledatacolumn[col_index - 1]; - - luckysheet.luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, luckysheet.flowdata); - - var cell = luckysheet.flowdata[row_index][col_index]; - if(cell != null && cell.f != null){ - //单元格有计算 - var functionStr = luckysheet.formula.getfunctionParam(cell.f); - if(functionStr.fn != null){ - //有函数公式 - luckysheet.insertFormula.formulaParmDialog(functionStr.fn, functionStr.param); - } - else{ - //无函数公式 - luckysheet.insertFormula.formulaListDialog(); - } - } - else{ - //单元格无计算 - $("#luckysheet-rich-text-editor").html('='); - $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - luckysheet.insertFormula.formulaListDialog(); - } - - luckysheet.insertFormula.init(); - } - else { - _this.autoSelectionFormula(itemvalue); - } - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen>userlen && (tlen + menuleft)>$("#"+container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft-48, $(this).offset().top+25, "lefttop"); - }); - - //加粗 - $("#luckysheet-icon-bold").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var row_index = luckysheet_select_save[0]["row_focus"], col_index = luckysheet_select_save[0]["column_focus"]; - var foucsStatus = _this.checkstatus(d, row_index, col_index, "bl"); - - if(foucsStatus == 1){ - foucsStatus = 0; - } - else{ - foucsStatus = 1; - } - - _this.updateFormat(d, "bl", foucsStatus); - - luckysheet.menuButton.menuButtonFocus(d, row_index, col_index); - }); - - //斜体 - $("#luckysheet-icon-italic").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var row_index = luckysheet_select_save[0]["row_focus"], col_index = luckysheet_select_save[0]["column_focus"]; - var foucsStatus = _this.checkstatus(d, row_index, col_index, "it"); - - if(foucsStatus == 1){ - foucsStatus = 0; - } - else{ - foucsStatus = 1; - } - - _this.updateFormat(d, "it", foucsStatus); - - luckysheet.menuButton.menuButtonFocus(d, row_index, col_index); - }); - - //删除线 - $("#luckysheet-icon-strikethrough").click(function(){ - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var row_index = luckysheet_select_save[0]["row_focus"], col_index = luckysheet_select_save[0]["column_focus"]; - var foucsStatus = _this.checkstatus(d, row_index, col_index, "cl"); - - if(foucsStatus == 1){ - foucsStatus = 0; - } - else{ - foucsStatus = 1; - } - - _this.updateFormat(d, "cl", foucsStatus); - - luckysheet.menuButton.menuButtonFocus(d, row_index, col_index); - }); - - //条件格式 - $("#luckysheet-icon-conditionformat").click(function(){ - var menuButtonId = $(this).attr("id") + "-menuButton"; - var $menuButton = $("#" + menuButtonId); - - if($menuButton.length == 0){ - var itemdata = [ - {"text": "突出显示单元格规则", "value": "highlightCellRule", "example": "more"}, - {"text": "项目选取规则", "value": "projectSelectRule", "example": "more"}, - {"text": "数据条", "value": "dataBar", "example": "more"}, - {"text": "色阶", "value": "colorGradation", "example": "more"}, - {"text": "图标集", "value": "icons", "example": ""}, - {"text": "", "value": "split", "example": ""}, - {"text": "新建规则", "value": "newRule", "example": ""}, - {"text": "清除规则", "value": "deleteRule", "example": "more"}, - {"text": "管理规则", "value": "administerRule", "example": ""} - ]; - var itemset = _this.createButtonMenu(itemdata); - var menu = luckysheet.replaceHtml(_this.menu, {"id": "conditionformat", "item": itemset, "subclass": "", "sub": ""}); - - //突出显示单元格规则子菜单 - var subitemdata = [ - {"text": "大于", "value": "greaterThan", "example": ">"}, - {"text": "小于", "value": "lessThan", "example": "<"}, - {"text": "介于", "value": "betweenness", "example": "[]"}, - {"text": "等于", "value": "equal", "example": "="}, - {"text": "文本包含", "value": "textContains", "example": "()"}, - {"text": "发生日期", "value": "occurrenceDate", "example": "昨天"}, - {"text": "重复值", "value": "duplicateValue", "example": "##"} - ]; - var subitemset = _this.createButtonMenu(subitemdata); - var submenu = luckysheet.replaceHtml(_this.menu, {"id": "highlightCellRule", "item": subitemset, "subclass": "luckysheet-menuButton-sub"}); - - //项目选取规则子菜单 - var subitemdata2 = [ - {"text": "前 10 项", "value": "top10", "example": "前10项"}, - {"text": "前 10%", "value": "top10%", "example": "前10%"}, - {"text": "最后 10 项", "value": "last10", "example": "后10项"}, - {"text": "最后 10%", "value": "last10%", "example": "后10%"}, - {"text": "高于平均值", "value": "AboveAverage", "example": "高于均值"}, - {"text": "低于平均值", "value": "SubAverage", "example": "低于均值"} - ]; - var subitemset2 = _this.createButtonMenu(subitemdata2); - var submenu2 = luckysheet.replaceHtml(_this.menu, {"id": "projectSelectRule", "item": subitemset2, "subclass": "luckysheet-menuButton-sub"}); - - //数据条子菜单 - var submenu3 = ''; - - //色阶 - var submenu4 = ''; - - //清除规则子菜单 - var subitemdata6 = [ - // {"text":"清除所选单元格的规则", "value":"", "example":""}, - {"text":"清除整个工作表的规则", "value":"delSheet", "example":""} - ]; - var subitemset6 = _this.createButtonMenu(subitemdata6); - var submenu6 = luckysheet.replaceHtml(_this.menu, {"id": "deleteRule", "item": subitemset6, "subclass":"luckysheet-menuButton-sub"}); - - $("body").append(menu + submenu + submenu2 + submenu3 + submenu4 + submenu6); - $menuButton = $("#"+menuButtonId).width(190); - $("#luckysheet-icon-highlightCellRule-menuButton").width(130); - $("#luckysheet-icon-projectSelectRule-menuButton").width(170); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(itemvalue == "icons"){ - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择应用范围"); - } - else{ - luckysheet.tooltip.info("请选择应用范围", ""); - } - return; - } - - luckysheet.conditionformat.CFiconsDialog(); - luckysheet.conditionformat.init(); - } - else if(itemvalue == "newRule"){ - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择应用范围"); - } - else{ - luckysheet.tooltip.info("请选择应用范围", ""); - } - return; - } - - luckysheet.conditionformat.newConditionRuleDialog(0); - luckysheet.conditionformat.init(); - } - else if(itemvalue == "administerRule"){ - var loadSheetUrl = luckysheet.server.loadSheetUrl; - var file = luckysheet.getluckysheetfile(); - - if(loadSheetUrl != "" && loadSheetUrl != null){ - var sheetindex = []; - for(var i = 0; i < file.length; i++){ - sheetindex.push(file[i].index); - } - - $.post(loadSheetUrl, {"gridKey" : luckysheet.server.gridKey, "index": sheetindex.join(",")}, function (d) { - var dataset = eval("(" + d + ")"); - - setTimeout(function(){ - $("#luckysheetloadingdata").fadeOut().remove(); - }, 500); - - for(var item in dataset){ - if(item == luckysheet.currentSheetIndex){ - continue; - } - - var otherfile = file[luckysheet.sheetmanage.getSheetIndex(item)]; - - otherfile.celldata = dataset[item.toString()]; - otherfile["data"] = luckysheet.sheetmanage.buildGridData(otherfile); - } - - luckysheet.setluckysheetfile(file); - - luckysheet.conditionformat.fileClone = $.extend(true, [], file); - luckysheet.conditionformat.administerRuleDialog(); - luckysheet.conditionformat.init(); - }); - } - else{ - luckysheet.conditionformat.fileClone = $.extend(true, [], file); - luckysheet.conditionformat.administerRuleDialog(); - luckysheet.conditionformat.init(); - } - } - }); - - //突出显示单元格规则子菜单点击事件 - $(document).off("click.CFhighlightCellRule").on("click.CFhighlightCellRule", "#luckysheet-icon-highlightCellRule-menuButton .luckysheet-cols-menuitem", function(){ - $menuButton.hide(); - $("#luckysheet-icon-highlightCellRule-menuButton").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择条件格式的应用范围"); - } - else{ - luckysheet.tooltip.info("请选择条件格式的应用范围", ""); - } - return; - } - else{ - var textCellColorHtml = luckysheet.conditionformat.textCellColorHtml; - - switch(itemvalue){ - case "greaterThan": - var title = "条件格式——大于"; - var content = '
' + - '
为大于以下值的单元格设置格式:
' + - '
' + - '' + - '' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "lessThan": - var title = "条件格式——小于"; - var content = '
' + - '
为小于以下值的单元格设置格式:
' + - '
' + - '' + - '' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "betweenness": - var title = "条件格式——介于"; - var content = '
' + - '
为介于以下值的单元格设置格式:
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "equal": - var title = "条件格式——等于"; - var content = '
' + - '
为等于以下值的单元格设置格式:
' + - '
' + - '' + - '' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "textContains": - var title = "条件格式——文本包含"; - var content = '
' + - '
为包含以下文本的单元格设置格式:
' + - '
' + - '' + - '' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "occurrenceDate": - var title = "条件格式——发生日期"; - var content = '
' + - '
为包含以下日期的单元格设置格式:
' + - '
' + - '' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "duplicateValue": - var title = "条件格式——重复值"; - var content = '
' + - '
为包含以下类型值的单元格设置格式:
' + - '' + - '' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - } - - luckysheet.conditionformat.conditionformatDialog(title, content); - } - }); - - //项目选取规则子菜单点击事件 - $(document).off("click.CFprojectSelectRule").on("click.CFprojectSelectRule", "#luckysheet-icon-projectSelectRule-menuButton .luckysheet-cols-menuitem", function(){ - $menuButton.hide(); - $("#luckysheet-icon-projectSelectRule-menuButton").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(luckysheet_select_save.length == 0){ - if(luckysheet.isEditMode()){ - alert("请选择条件格式的应用范围"); - } - else{ - luckysheet.tooltip.info("请选择条件格式的应用范围", ""); - } - return; - } - else{ - var textCellColorHtml = luckysheet.conditionformat.textCellColorHtml; - - switch(itemvalue){ - case "top10": - var title = "条件格式——前 10 项"; - var content = '
' + - '
为值最大的那些单元格设置格式:
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "top10%": - var title = "条件格式——前 10%"; - var content = '
' + - '
为值最大的那些单元格设置格式:
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
%
' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "last10": - var title = "条件格式——最后 10 项"; - var content = '
' + - '
为值最小的那些单元格设置格式:
' + - '
' + - '
最后
' + - '
' + - '' + - '
' + - '
' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "last10%": - var title = "条件格式——最后 10%"; - var content = '
' + - '
为值最小的那些单元格设置格式:
' + - '
' + - '
最后
' + - '
' + - '' + - '
' + - '
%
' + - '
' + - '
设置为:
' + - textCellColorHtml + - '
'; - break; - case "AboveAverage": - var title = "条件格式——高于平均值"; - var content = '
' + - '
为高于平均值的单元格设置格式:
' + - '
针对选定区域,设置为:
' + - textCellColorHtml + - '
'; - break; - case "SubAverage": - var title = "条件格式——低于平均值"; - var content = '
' + - '
为低于平均值的单元格设置格式:
' + - '
针对选定区域,设置为:
' + - textCellColorHtml + - '
'; - break; - } - - luckysheet.conditionformat.conditionformatDialog(title,content); - } - }); - - //数据条子菜单点击事件 - $(document).off("click.CFdataBar").on("click.CFdataBar", "#luckysheet-icon-dataBar-menuButton .luckysheet-cols-menuitem", function(){ - $menuButton.hide(); - $("#luckysheet-icon-dataBar-menuButton").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(luckysheet_select_save.length > 0){ - var cellrange = $.extend(true, [], luckysheet_select_save); - var format = luckysheet.conditionformat.dataBarList[itemvalue]["format"]; - - luckysheet.conditionformat.updateItem("dataBar", cellrange, format); - } - }); - - //色阶子菜单点击事件 - $(document).off("click.CFcolorGradation").on("click.CFcolorGradation", "#luckysheet-icon-colorGradation-menuButton .luckysheet-cols-menuitem", function(){ - $menuButton.hide(); - $("#luckysheet-icon-colorGradation-menuButton").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(luckysheet_select_save.length > 0){ - var cellrange = $.extend(true, [], luckysheet_select_save); - var format = luckysheet.conditionformat.colorGradationList[itemvalue]["format"]; - - luckysheet.conditionformat.updateItem("colorGradation", cellrange, format); - } - }); - - //清除规则子菜单点击事件 - $(document).off("click.CFdeleteRule").on("click.CFdeleteRule", "#luckysheet-icon-deleteRule-menuButton .luckysheet-cols-menuitem", function(){ - $menuButton.hide(); - $("#luckysheet-icon-deleteRule-menuButton").hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(itemvalue == "delSheet"){ - luckysheet.conditionformat.updateItem("delSheet"); - } - }); - } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); - }); - - //批注 - $("#luckysheet-icon-postil").click(function(){ - var menuButtonId = $(this).attr("id")+"-menuButton"; - var $menuButton = $("#" + menuButtonId); - - $menuButton.remove(); - - // if($menuButton.length == 0){ - luckysheet.postil.removeActivePs(); - - var last = luckysheet_select_save[luckysheet_select_save.length - 1]; - - var row_index = last["row_focus"]; - if(row_index == null){ - row_index = last["row"][0]; - } - - var col_index = last["column_focus"]; - if(col_index == null){ - col_index = last["column"][0]; - } - - if(luckysheet.flowdata[row_index][col_index] != null && luckysheet.flowdata[row_index][col_index].ps != null){ - var itemdata = [ - {"text": "编辑批注", "value": "editPs", "example": ""}, - {"text": "删除", "value": "delPs", "example": ""}, - {"text": "", "value": "split", "example": ""}, - {"text": "显示/隐藏批注", "value": "showHidePs", "example": ""}, - {"text": "显示/隐藏所有批注", "value": "showHideAllPs", "example": ""} - ]; - } - else{ - var itemdata = [ - {"text": "新建批注", "value": "newPs", "example": ""}, - {"text": "", "value": "split", "example": ""}, - {"text": "显示/隐藏所有批注", "value": "showHideAllPs", "example": ""} - ]; - } - - var itemset = _this.createButtonMenu(itemdata); - var menu = luckysheet.replaceHtml(_this.menu, {"id": "postil", "item": itemset, "subclass": "", "sub": ""}); - - $("body").append(menu); - $menuButton = $("#"+menuButtonId).width(150); - - $menuButton.find(".luckysheet-cols-menuitem").click(function(){ - $menuButton.hide(); - $("#" + container).attr("tabindex", 0).focus(); - - var $t = $(this), itemvalue = $t.attr("itemvalue"); - - if(itemvalue == "newPs"){ - luckysheet.postil.newPs(row_index, col_index); - } - else if(itemvalue == "editPs"){ - luckysheet.postil.editPs(row_index, col_index); - } - else if(itemvalue == "delPs"){ - luckysheet.postil.delPs(row_index, col_index); - } - else if(itemvalue == "showHidePs"){ - luckysheet.postil.showHidePs(row_index, col_index); - } - else if(itemvalue == "showHideAllPs"){ - luckysheet.postil.showHideAllPs(); - } - }); - // } - - var userlen = $(this).outerWidth(); - var tlen = $menuButton.outerWidth(); - - var menuleft = $(this).offset().left; - if(tlen > userlen && (tlen + menuleft) > $("#" + container).width()){ - menuleft = menuleft - tlen + userlen; - } - mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); - }); - - $("body").on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu", function(e){ - var $t = $(this), attrid = $t.attr("itemvalue"), $attr = $("#luckysheet-icon-" + attrid + "-menuButton"); - //clearTimeout(_this.submenuhide); - if (e.type === "mouseover") { - var $con = $t.parent(); - var winW = $(window).width(), winH = $(window).height(); - var menuW = $con.width(), attrH = $attr.height() + 25, attrW = $attr.width() + 5; - var offset = $t.offset(); - var top = offset.top, left = offset.left + menuW; - - if (left + attrW > winW) { - left = offset.left - attrW; - } - - if (top + attrH > winH) { - top = winH - attrH; - } - - $attr.css({ "top": top, "left": left }).show(); - _this.rightclickmenu = $t; - } else { - //var $t = $(this), attrid = $t.attr("itemvalue"), $attr = $("#" + attrid + "_sub"); - _this.submenuhide = setTimeout(function () { $attr.hide(); }, 200); - } - }).on("mouseover mouseleave",".luckysheet-menuButton-sub", function(e){ - if (e.type === "mouseover") { - _this.rightclickmenu.addClass("luckysheet-cols-menuitem-hover"); - clearTimeout(_this.submenuhide); - } else { - _this.rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"); - $(this).hide(); - } - }); - }, - fontarray:["微软雅黑","宋体","黑体","楷体","仿宋","新宋体","华文新魏","华文行楷","华文隶书","Arial","Times New Roman","Tahoma","Verdana"], - fontjson:{"微软雅黑":0,"microsoft yahei":0,"宋体":1,"simsun":1,"黑体":2,"simhei":2,"楷体":3,"kaiti":3,"仿宋":4,"fangsong":4,"新宋体":5,"nsimsun":5,"华文新魏":6,"stxinwei":6,"华文行楷":7,"stxingkai":7,"华文隶书":8,"stliti":8,"arial":9,"times new roman":10,"tahoma":11,"verdana":12}, - getQKBorder:function(width, type, color){ - var borderType = {"0":"none", "1":"Thin", "2":"Hair", "3":"Dotted", "4":"Dashed", "5":"DashDot", "6":"DashDotDot", "7":"Double", "8":"Medium", "9":"MediumDashed", "10":"MediumDashDot", "11":"MediumDashDotDot", "12":"SlantedDashDot", "13":"Thick"}; - var style = 0; - - type = type.toLowerCase(); - - // var bordertype = "solid"; - // if(type=="double"){ - // style = 2; - // } - // else if(type=="dotted"){ - // style = 2; - // } - // else if(type=="dashed"){ - // style = 2; - // } - // else if(type=="solid"){ - // style = 2; - // } - // else{ - // style = 0; - // } - - var bordertype = ""; - if(width.indexOf("pt")>-1){ - var width = parseFloat(width); - if(width<1){ - - } - else if(width<1.5){ - bordertype = "Medium"; - } - else{ - bordertype = "Thick"; - } - } - else{ - var width = parseFloat(width); - if(width<2){ - - } - else if(width<3){ - bordertype = "Medium"; - } - else{ - bordertype = "Thick"; - } - } - - var bordertype = "solid"; - if(type=="double"){ - style = 2; - } - else if(type=="dotted"){ - if(bordertype=="Medium" || bordertype=="Thick"){ - style = 3; - } - else{ - style = 10; - } - } - else if(type=="dashed"){ - if(bordertype=="Medium" || bordertype=="Thick"){ - style = 4; - } - else{ - style = 9; - } - } - else if(type=="solid"){ - if(bordertype=="Medium"){ - style = 8; - } - else if(bordertype=="Thick"){ - style = 13; - } - else{ - style = 1; - } - } - - - // if(color.indexOf("rgb")>-1){ - // color = luckysheet.rgbTohex(color); - // } - //console.log([style, color]); - return [style, color]; - }, - updateFormat:function(d, attr, foucsStatus){ - var _this = this; - - var canvasElement = document.createElement('canvas'); - var canvas = canvasElement.getContext("2d"); - - var cfg = $.extend(true, {}, config); - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var row_st = luckysheet_select_save[s]["row"][0], row_ed = luckysheet_select_save[s]["row"][1]; - var col_st = luckysheet_select_save[s]["column"][0], col_ed = luckysheet_select_save[s]["column"][1]; - - if(attr == "ct"){ - for (var r = row_st; r <= row_ed; r++) { - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - for (var c = col_st; c <= col_ed; c++) { - var cell = d[r][c], value = null; - - if (luckysheet.getObjType(cell) == "object") { - value = d[r][c]["v"]; - } - else{ - value = d[r][c]; - } - - if(foucsStatus != "@" && luckysheet.func_methods.isRealNum(value)){ - value = parseFloat(value); - } - - var mask = luckysheet.mask.update(foucsStatus, value); - var type = "n"; - if(luckysheet.mask.is_date(foucsStatus) || foucsStatus === 14 || foucsStatus === 15 || foucsStatus === 16 || foucsStatus === 17 || foucsStatus === 18 || foucsStatus === 19 || foucsStatus === 20 || foucsStatus === 21 || foucsStatus === 22 || foucsStatus === 45 || foucsStatus === 46 || foucsStatus === 47){ - type = "d"; - } - else if(foucsStatus == "@" || foucsStatus === 49){ - type = "s" - } - else if(foucsStatus == "General" || foucsStatus === 0){ - type = "g"; - } - - if (luckysheet.getObjType(cell) == "object") { - d[r][c]["m"] = mask; - if(d[r][c]["ct"] == null){ - d[r][c]["ct"] = {}; - } - d[r][c]["ct"]["fa"] = foucsStatus; - d[r][c]["ct"]["t"] = type; - } - else{ - d[r][c] = { "ct":{"fa":foucsStatus, "t":type}, "v": value, "m": mask }; - } - } - } - } - else{ - if(attr == "ht"){ - if(foucsStatus == "left"){ - foucsStatus = "1"; - } - else if(foucsStatus == "center"){ - foucsStatus = "0"; - } - else if(foucsStatus == "right"){ - foucsStatus = "2"; - } - } - else if(attr == "vt"){ - if(foucsStatus == "top"){ - foucsStatus = "1"; - } - else if(foucsStatus == "middle"){ - foucsStatus = "0"; - } - else if(foucsStatus == "bottom"){ - foucsStatus = "2"; - } - } - else if(attr == "tb"){ - if(foucsStatus == "overflow"){ - foucsStatus = "1"; - } - else if(foucsStatus == "clip"){ - foucsStatus = "0"; - } - else if(foucsStatus == "wrap"){ - foucsStatus = "2"; - } - } - else if(attr == "tr"){ - if(foucsStatus == "none"){ - foucsStatus = "0"; - } - else if(foucsStatus == "angleup"){ - foucsStatus = "2"; - } - else if(foucsStatus == "angledown"){ - foucsStatus = "1"; - } - else if(foucsStatus == "vertical"){ - foucsStatus = "3"; - } - else if(foucsStatus == "rotation-up"){ - foucsStatus = "5"; - } - else if(foucsStatus == "rotation-down"){ - foucsStatus = "4"; - } - } - - for (var r = row_st; r <= row_ed; r++) { - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - for (var c = col_st; c <= col_ed; c++) { - var value = d[r][c]; - - if (luckysheet.getObjType(value) == "object") { - d[r][c][attr] = foucsStatus; - } - else{ - d[r][c] = { v: value }; - d[r][c][attr] = foucsStatus; - } - - if(attr == "tr" && d[r][c].tb != null){ - d[r][c].tb = "0"; - } - } - } - } - - if(attr == "tb" && foucsStatus == "2"){ - //自动换行 - for (var r = row_st; r <= row_ed; r++) { - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - var currentRowLen = defaultrowlen; - if(cfg["rowlen"][r] != null){ - currentRowLen = cfg["rowlen"][r]; - } - - for (var c = col_st; c <= col_ed; c++) { - var cell = d[r][c]; - - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v)){ - var fontset = luckysheetfontformat(cell); - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - canvas.font = fontset; - - var strValue = cell.m.toString(); - var tbWidth = canvas.measureText(strValue).width; - var cellWidth = luckysheet.colLocationByIndex(c)[1] - luckysheet.colLocationByIndex(c)[0] - 8; - - if(tbWidth > cellWidth){ - var strArr = [];//文本截断数组 - for(var strI = 1; strI <= strValue.length; strI++){ - var strV = strValue.substring(strArr.join("").length, strI); - var strtextMetrics = canvas.measureText(strV).width; - if(strtextMetrics > cellWidth){ - strArr.push(strValue.substring(strArr.join("").length, strI-1)); - strI = strI - 2; - } - else if(strtextMetrics <= cellWidth && strI == strValue.length){ - strArr.push(strV); - } - } - var computeRowlen = oneLineTextHeight * strArr.length; - //比较计算高度和当前高度取最大高度 - if(computeRowlen > currentRowLen){ - currentRowLen = computeRowlen; - } - } - } - } - - if(currentRowLen != defaultrowlen){ - cfg["rowlen"][r] = currentRowLen; - } - } - } - else if(attr == "tr"){ - //文本旋转 - for (var r = row_st; r <= row_ed; r++) { - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - var currentRowLen = defaultrowlen; - if(cfg["rowlen"][r] != null){ - currentRowLen = cfg["rowlen"][r]; - } - - for (var c = col_st; c <= col_ed; c++) { - var cell = d[r][c]; - - if(cell != null && !luckysheet.func_methods.isRealNull(cell.v)){ - var fontset = luckysheetfontformat(cell); - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - canvas.font = fontset; - - var value = cell.m.toString(); - var textMetrics = canvas.measureText(value).width; - - var computeRowlen; //计算高度 - if(foucsStatus == "0"){ - //无旋转 - computeRowlen = oneLineTextHeight; - } - else if(foucsStatus == "1" || foucsStatus == "2"){ - //向下倾斜(45 旋转)----向上倾斜(-45 旋转) - computeRowlen = 0.707 * (textMetrics + oneLineTextHeight) + 4; - } - else if(foucsStatus == "3"){ - //竖排文字 - computeRowlen = value.length * oneLineTextHeight + 4; - } - else if(foucsStatus == "4" || foucsStatus == "5"){ - //向下90(90 旋转)----向上90(-90 旋转) - computeRowlen = textMetrics + 4; - } - computeRowlen = Math.round(computeRowlen); - //比较计算高度和当前高度取最大高度 - if(computeRowlen > currentRowLen){ - currentRowLen = computeRowlen; - } - } - } - - if(currentRowLen != defaultrowlen){ - cfg["rowlen"][r] = currentRowLen; - } - } - } - else if(attr == "fs"){ - //字体大小 - for (var r = row_st; r <= row_ed; r++) { - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - continue; - } - - var currentRowLen = defaultrowlen; - if(cfg["rowlen"][r] != null){ - currentRowLen = cfg["rowlen"][r]; - } - - for (var c = col_st; c <= col_ed; c++) { - var cell = d[r][c]; - - if(cell == null){ - continue; - } - - var fontset = luckysheetfontformat(cell); - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - canvas.font = fontset; - - //计算高度 - var computeRowlen; - if(luckysheet.func_methods.isRealNull(cell.v)){ - computeRowlen = oneLineTextHeight; - } - else{ - if(cell.tb == "2"){ - //单元格有自动换行标示 - var strValue = cell.m.toString(); - var tbWidth = canvas.measureText(strValue).width; - var cellWidth = luckysheet.colLocationByIndex(c)[1] - luckysheet.colLocationByIndex(c)[0] - 8; - - if(tbWidth > cellWidth){ - var strArr = [];//文本截断数组 - for(var strI = 1; strI <= strValue.length; strI++){ - var strV = strValue.substring(strArr.join("").length, strI); - var strtextMetrics = canvas.measureText(strV).width; - if(strtextMetrics > cellWidth){ - strArr.push(strValue.substring(strArr.join("").length, strI-1)); - strI = strI - 2; - } - else if(strtextMetrics <= cellWidth && strI == strValue.length){ - strArr.push(strV); - } - } - - computeRowlen = oneLineTextHeight * strArr.length; - } - else{ - computeRowlen = oneLineTextHeight; - } - } - else if(cell.tr != null){ - //单元格有旋转标示 - var tr = cell.tr; - var value = cell.m.toString(); - var textMetrics = canvas.measureText(value).width; - - if(tr == "0"){ - //无旋转 - computeRowlen = oneLineTextHeight; - } - else if(tr == "1" || tr == "2"){ - //向下倾斜(45 旋转)----向上倾斜(-45 旋转) - computeRowlen = 0.707 * (textMetrics + oneLineTextHeight) + 4; - } - else if(tr == "3"){ - //竖排文字 - computeRowlen = value.length * oneLineTextHeight + 4; - } - else if(tr == "4" || tr == "5"){ - //向下90(90 旋转)----向上90(-90 旋转) - computeRowlen = textMetrics + 4; - } - - computeRowlen = Math.round(computeRowlen); - } - else{ - computeRowlen = oneLineTextHeight; - } - } - - //比较计算高度和当前高度取最大高度 - if(computeRowlen > currentRowLen){ - currentRowLen = computeRowlen; - } - } - - if(currentRowLen != defaultrowlen){ - cfg["rowlen"][r] = currentRowLen; - } - } - } - } - - if((attr == "tb" && foucsStatus == "2") || attr == "tr" || attr == "fs"){ - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg, null, true); - } - else{ - luckysheet.jfrefreshgrid(d, luckysheet_select_save); - } - }, - updateFormat_mc: function(d, foucsStatus){ - var cfg = $.extend(true, {}, config); - if(cfg["merge"] == null){ - cfg["merge"] = {}; - } - - if(foucsStatus == "mergeCancel"){ - for(var i = 0; i < luckysheet_select_save.length; i++){ - var range = luckysheet_select_save[i]; - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - if(r1 == r2 && c1 == c2){ - continue; - } - - var fv = {}; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - var cell = d[r][c]; - - if(cell != null && cell.mc != null){ - var mc_r = cell.mc.r, mc_c = cell.mc.c; - - if("rs" in cell.mc){ - delete cell.mc; - delete cfg["merge"][mc_r + "_" + mc_c]; - - fv[mc_r + "_" + mc_c] = $.extend(true, {}, cell); - } - else{ - var cell_clone = fv[mc_r + "_" + mc_c]; - - delete cell_clone.v; - delete cell_clone.m; - delete cell_clone.ct; - delete cell_clone.f; - delete cell_clone.spl; - - d[r][c] = cell_clone; - } - } - } - } - } - } - else{ - var isHasMc = false; //选区是否含有 合并的单元格 - for(var i = 0; i < luckysheet_select_save.length; i++){ - var range = luckysheet_select_save[i]; - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - isHasMc = true; - break; - } - } - } - } - - if(isHasMc){//选区有合并单元格(选区都执行 取消合并) - for(var i = 0; i < luckysheet_select_save.length; i++){ - var range = luckysheet_select_save[i]; - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - if(r1 == r2 && c1 == c2){ - continue; - } - - var fv = {}; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - var cell = d[r][c]; - - if(cell != null && cell.mc != null){ - var mc_r = cell.mc.r, mc_c = cell.mc.c; - - if("rs" in cell.mc){ - delete cell.mc; - delete cfg["merge"][mc_r + "_" + mc_c]; - - fv[mc_r + "_" + mc_c] = $.extend(true, {}, cell); - } - else{ - var cell_clone = fv[mc_r + "_" + mc_c]; - - delete cell_clone.v; - delete cell_clone.m; - delete cell_clone.ct; - delete cell_clone.f; - delete cell_clone.spl; - - d[r][c] = cell_clone; - } - } - } - } - } - } - else{ - for(var i = 0; i < luckysheet_select_save.length; i++){ - var range = luckysheet_select_save[i]; - var r1 = range["row"][0], r2 = range["row"][1]; - var c1 = range["column"][0], c2 = range["column"][1]; - - if(r1 == r2 && c1 == c2){ - continue; - } - - if(foucsStatus == "mergeAll"){ - var fv = {}, isfirst = false; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - var cell = d[r][c]; - - if(cell != null && (!luckysheet.func_methods.isRealNull(cell.v) || cell.f != null) && !isfirst){ - fv = $.extend(true, {}, cell); - isfirst = true; - } - - d[r][c] = { "mc": { "r": r1, "c": c1 } }; - } - } - - d[r1][c1] = fv; - d[r1][c1].mc = { "r": r1, "c": c1, "rs": r2 - r1 + 1, "cs": c2 - c1 + 1 }; - - cfg["merge"][r1 + "_" + c1] = { "r": r1, "c": c1, "rs": r2 - r1 + 1, "cs": c2 - c1 + 1 }; - } - else if(foucsStatus == "mergeV"){ - for(var c = c1; c <= c2; c++){ - var fv = {}, isfirst = false; - - for(var r = r1; r <= r2; r++){ - var cell = d[r][c]; - - if(cell != null && (!luckysheet.func_methods.isRealNull(cell.v) || cell.f != null) && !isfirst){ - fv = $.extend(true, {}, cell); - isfirst = true; - } - - d[r][c] = { "mc": { "r": r1, "c": c } }; - } - - d[r1][c] = fv; - d[r1][c].mc = { "r": r1, "c": c, "rs": r2 - r1 + 1, "cs": 1 }; - - cfg["merge"][r1 + "_" + c] = { "r": r1, "c": c, "rs": r2 - r1 + 1, "cs": 1 }; - } - } - else if(foucsStatus == "mergeH"){ - for(var r = r1; r <= r2; r++){ - var fv = {}, isfirst = false; - - for(var c = c1; c <= c2; c++){ - var cell = d[r][c]; - - if(cell != null && (!luckysheet.func_methods.isRealNull(cell.v) || cell.f != null) && !isfirst){ - fv = $.extend(true, {}, cell); - isfirst = true; - } - - d[r][c] = { "mc": { "r": r, "c": c1 } }; - } - - d[r][c1] = fv; - d[r][c1].mc = { "r": r, "c": c1, "rs": 1, "cs": c2 - c1 + 1 }; - - cfg["merge"][r + "_" + c1] = { "r": r, "c": c1, "rs": 1, "cs": c2 - c1 + 1 }; - } - } - } - } - } - - if (clearjfundo) { - luckysheet.jfundo = []; - luckysheet.jfredo.push({ - "type": "mergeChange", - "sheetIndex": luckysheet.currentSheetIndex, - "data": luckysheet.flowdata, - "curData": d, - "range": $.extend(true, [], luckysheet_select_save), - "config": $.extend(true, {}, config), - "curConfig": cfg - }); - } - - clearjfundo = false; - luckysheet.jfrefreshgrid(d, luckysheet_select_save, cfg); - clearjfundo = true; - }, - borderfix:function(d, r, c){ - return [-1, -1, 2, 2]; - - var cell = d[r][c]; - var bg = null; - - if(cell == null){ - return [0, 0, 0, 0]; - } - else if(d[r][c].bg == null || d[r][c].bg == ""){ - return [0, 0, 0, 0]; - } - else { - return [-1, -1, 2, 2]; - } - }, - menuButtonFocus:function(d, r, c){ - var foucsList = ["bl", "it", "cl", "ff", "ht", "vt", "fs", "tb", "tr"]; - var _this = this; - - for(var i = 0; i < foucsList.length; i++){ - var attr = foucsList[i]; - var foucsStatus = _this.checkstatus(d, r, c, attr); - - if(attr == "bl"){ - if(foucsStatus != "0"){ - $("#luckysheet-icon-bold").addClass("luckysheet-toolbar-button-hover"); - } - else{ - $("#luckysheet-icon-bold").removeClass("luckysheet-toolbar-button-hover"); - } - } - else if(attr == "it"){ - if(foucsStatus != "0"){ - $("#luckysheet-icon-italic").addClass("luckysheet-toolbar-button-hover"); - } - else{ - $("#luckysheet-icon-italic").removeClass("luckysheet-toolbar-button-hover"); - } - } - else if(attr == "cl"){ - if(foucsStatus != "0"){ - $("#luckysheet-icon-strikethrough").addClass("luckysheet-toolbar-button-hover"); - } - else{ - $("#luckysheet-icon-strikethrough").removeClass("luckysheet-toolbar-button-hover"); - } - } - else if(attr == "ff"){ - var menuButtonId = "luckysheet-icon-font-family-menuButton"; - var $menuButton = $("#"+menuButtonId); - var itemname = "微软雅黑", itemvalue = 0; - - if(foucsStatus != null){ - var fontfamily = null; - - if(luckysheet.isdatatypemulti(foucsStatus)["num"]){ - itemvalue = parseInt(foucsStatus); - itemname = _this.fontarray[itemvalue]; - } - else{ - itemvalue = _this.fontjson[foucsStatus]; - itemname = _this.fontarray[itemvalue]; - } - } - - _this.focus($menuButton, itemvalue); - $("#luckysheet-icon-font-family").find(".luckysheet-toolbar-menu-button-caption").html(" "+ itemname +" "); - } - else if(attr == "fs"){ - var $menuButton = $("#luckysheet-icon-font-size-menuButton"); - var itemvalue = foucsStatus, $input = $("#luckysheet-icon-font-size input"); - _this.focus($menuButton, itemvalue); - $("#luckysheet-icon-font-size").attr("itemvalue", itemvalue); - $input.val(itemvalue); - } - else if(attr == "ht"){ - var $menuButton = $("#luckysheet-icon-align-menu-menuButton"); - var $t = $("luckysheet-icon-align"), itemvalue = "left"; - - if(foucsStatus == "0"){ - itemvalue = "center"; - } - else if(foucsStatus == "2"){ - itemvalue = "right"; - } - - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-align").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-align-" + itemvalue); - $menuButton.hide(); - } - else if(attr == "vt"){ - var $menuButton = $("#luckysheet-icon-valign-menu-menuButton"); - var $t = $("luckysheet-icon-valign"), itemvalue = "bottom"; - - if(foucsStatus == "1"){ - itemvalue = "top"; - } - else if(foucsStatus == "0"){ - itemvalue = "middle"; - } - - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-valign").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-valign-" + itemvalue); - $menuButton.hide(); - } - else if(attr == "tb"){ - var $menuButton = $("#luckysheet-icon-textwrap-menu-menuButton"); - var $t = $("luckysheet-icon-textwrap"), itemvalue = "clip"; - - if(foucsStatus == "1"){ - itemvalue = "overflow"; - } - else if(foucsStatus == "2"){ - itemvalue = "wrap"; - } - - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-textwrap").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-textwrap-" + itemvalue); - $menuButton.hide(); - } - else if(attr == "tr"){ - var $menuButton = $("#luckysheet-icon-rotation-menu-menuButton"); - var $t = $("luckysheet-icon-rotation"), itemvalue = "none"; - - if(foucsStatus == "1"){ - itemvalue = "angledown"; - } - else if(foucsStatus == "2"){ - itemvalue = "angleup"; - } - else if(foucsStatus == "3"){ - itemvalue = "vertical"; - } - else if(foucsStatus == "4"){ - itemvalue = "rotation-down"; - } - else if(foucsStatus == "5"){ - itemvalue = "rotation-up"; - } - - _this.focus($menuButton, itemvalue); - - var $icon = $("#luckysheet-icon-rotation").attr("type", itemvalue).find(".luckysheet-icon-img-container"); - $icon.removeAttr("class").addClass("luckysheet-icon-img-container luckysheet-icon-img luckysheet-icon-rotation-" + itemvalue); - $menuButton.hide(); - } - } - }, - checkstatus:function(d, r, c, a){ - var foucsStatus = d[r][c]; - var tf = {"bl":1, "it":1 , "ff":1, "cl":1}; - if(a in tf){ - if(foucsStatus==null){ - foucsStatus = "0"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus="0"; - } - } - } - else if(a == "fc"){ - if(foucsStatus == null){ - foucsStatus = "#000000"; - } - else{ - foucsStatus = foucsStatus[a]; - - if(foucsStatus == null){ - foucsStatus = "#000000"; - } - - if(foucsStatus.indexOf("rgba") > -1){ - foucsStatus = luckysheet.rgbTohex(foucsStatus); - } - } - } - else if(a == "bg"){ - if(foucsStatus == null){ - foucsStatus = "#ffffff"; - } - else{ - foucsStatus = foucsStatus[a]; - - if(foucsStatus == null){ - foucsStatus = "#ffffff"; - } - - if(foucsStatus.toString().indexOf("rgba") > -1){ - foucsStatus = luckysheet.rgbTohex(foucsStatus); - } - } - } - else if(a.substr(0, 2) == "bs"){ - if(foucsStatus==null){ - foucsStatus = "none"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus = "none"; - } - } - } - else if(a.substr(0, 2) == "bc"){ - //console.log(foucsStatus[a]); - if(foucsStatus==null){ - foucsStatus = "#000000"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus = "#000000"; - } - } - } - else if(a == "ht"){ - if(foucsStatus == null){ - foucsStatus = "1"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus == null){ - foucsStatus = "1"; - } - } - - if(["0", "1", "2"].indexOf(foucsStatus) == -1){ - foucsStatus = "1"; - } - } - else if(a == "vt"){ - if(foucsStatus == null){ - foucsStatus = "2"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus == null){ - foucsStatus = "2"; - } - } - - if(["0", "1", "2"].indexOf(foucsStatus) == -1){ - foucsStatus = "2"; - } - } - else if(a == "ct"){ - if(foucsStatus==null){ - foucsStatus = null; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus = null; - } - } - } - else if(a == "fs"){ - if(foucsStatus==null){ - foucsStatus = "10"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus = "10"; - } - } - } - else if(a == "tb"){ - if(foucsStatus==null){ - foucsStatus = "0"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus = "0"; - } - } - } - else if(a == "tr"){ - if(foucsStatus==null){ - foucsStatus = "0"; - } - else{ - foucsStatus = foucsStatus[a]; - if(foucsStatus==null){ - foucsStatus = "0"; - } - } - } - - - return foucsStatus; - }, - setLineDash:function(canvasborder, type, hv, m_st, m_ed, line_st, line_ed){ - - var borderType = {"0":"none", "1":"Thin", "2":"Hair", "3":"Dotted", "4":"Dashed", "5":"DashDot", "6":"DashDotDot", "7":"Double", "8":"Medium", "9":"MediumDashed", "10":"MediumDashDot", "11":"MediumDashDotDot", "12":"SlantedDashDot", "13":"Thick"}; - - type = borderType[type.toString()]; - - try { - if(type=="Hair"){ - canvasborder.setLineDash([1, 2]); - } - else if(type.indexOf("DashDotDot")>-1){ - canvasborder.setLineDash([2, 2, 5, 2, 2]); - } - else if(type.indexOf("DashDot")>-1){ - canvasborder.setLineDash([2, 5, 2]); - } - else if(type.indexOf("Dotted")>-1){ - canvasborder.setLineDash([2]); - } - else if(type.indexOf("Dashed")>-1){ - canvasborder.setLineDash([3]); - } - else{ - canvasborder.setLineDash([0]); - } - } catch(e) { - console.log(e); - } - - canvasborder.beginPath(); - - if(type.indexOf("Medium")>-1){ - if(hv=="h"){ - canvasborder.moveTo(m_st, m_ed-0.5); - canvasborder.lineTo(line_st, line_ed-0.5); - } - else{ - canvasborder.moveTo(m_st-0.5, m_ed); - canvasborder.lineTo(line_st-0.5, line_ed); - } - - canvasborder.lineWidth = 2*devicePixelRatio; - } - else if(type=="Thick"){ - canvasborder.moveTo(m_st, m_ed); - canvasborder.lineTo(line_st, line_ed); - canvasborder.lineWidth = 3*devicePixelRatio; - } - else { - canvasborder.moveTo(m_st, m_ed); - canvasborder.lineTo(line_st, line_ed); - canvasborder.lineWidth = devicePixelRatio; - } - }, - moveMergeData:function(d, offset_r, offset_c){ - if(luckysheet.func_methods.isRealNull(d)){ - return d; - } - - var deleMC = [], insertMC=[], hasMC = false; - for(var r = 0; r < d.length; r++){ - for(var c = 0; c < d[0].length; c++){ - var cell = d[r][c]; - - if(luckysheet.getObjType(cell) == "object" && ("mc" in cell)){ - if(cell.mc.rs != null){ - //deleMC.push(cell.mc.r + "_" + cell.mc.c); - deleMC.push({ rs: cell.mc.rs, cs: cell.mc.cs, r: cell.mc.r, c: cell.mc.c}); - //insertMC.push((cell.mc.r+offset_r) + "_" + (cell.mc.c+offset_c)); - insertMC.push({ rs: cell.mc.rs, cs: cell.mc.cs, r: cell.mc.r+offset_r, c: cell.mc.c+offset_c}); - - hasMC= true; - } - - d[r][c].mc.r += offset_r; - d[r][c].mc.c += offset_c; - } - } - } - - return {"deleMC":deleMC, "insertMC":insertMC, "hasMC": hasMC}; - }, - getRangeInMerge:function(st_r, rlen, st_c, clen, sheetIndex){ - var mergelist = []; - var cfg = null; - if(sheetIndex!=null){ - //cfg = $.extend(true, {}, luckysheetfile[luckysheet.sheetmanage.getSheetIndex(sheetIndex)].config); - cfg = $.extend(true, {}, luckysheet.sheetmanage.getSheetConfig()); - } - else{ - cfg = $.extend(true, {}, config) - } - - //console.log(cfg); - - if(cfg!=null && cfg["merge"]!=null){ - for(var key in cfg["merge"]){ - var mc = cfg["merge"][key]; - //console.log(!( (st_r+rlen-1) < mc.r || st_r>(mc.r+mc.rs-1)), !((st_c+clen-1) < mc.c || st_c>(mc.c+mc.cs-1))); - if( !( (st_r+rlen-1) < mc.r || st_r>(mc.r+mc.rs-1)) && !((st_c+clen-1) < mc.c || st_c>(mc.c+mc.cs-1)) ){ - mergelist.push(mc); - } - } - } - return mergelist; - }, - mergeborer:function(d, row_index, col_index){ - var value = d[row_index][col_index]; - - if(luckysheet.getObjType(value) == "object" && ("mc" in value)){ - var margeMaindata = value["mc"]; - col_index = margeMaindata.c; - row_index = margeMaindata.r; - - var col_rs = d[row_index][col_index].mc.cs; - var row_rs = d[row_index][col_index].mc.rs; - - var scrollWidth = $("#luckysheet-cell-main").scrollLeft(); - - var scrollHeight = $("#luckysheet-cell-main").scrollTop(); - - var start_r, end_r; - //var r= row_index, c = col_index; - var margeMain = d[row_index][col_index].mc; - - var row_pre , row , col , col_pre; - for(var r = row_index; r < margeMain.rs + row_index; r++){ - if (r == 0) { - start_r = - 1; - } - else { - start_r = visibledatarow[r - 1] - 1; - } - - end_r = visibledatarow[r]; - - if(row_pre == null){ - row_pre = start_r; - row = end_r; - } - else{ - row += end_r - start_r - 1; - } - } - - var start_c, end_c; - for(var c = col_index; c < margeMain.cs + col_index; c++){ - if (c == 0) { - start_c = 0; - } - else { - start_c = visibledatacolumn[c - 1]; - } - - end_c = visibledatacolumn[c]; - - if(col_pre == null){ - col_pre = start_c; - col = end_c; - } - else{ - col += end_c - start_c; - } - } - - return {"row": [row_pre , row, row_index, row_index + row_rs - 1], "column": [col_pre, col , col_index, col_index + col_rs - 1]}; - } - else{ - return null; - } - }, - mergeMoveData:{}, - mergeMoveMain:function(columnseleted, rowseleted, s, top , height, left , width){ - var mergesetting = luckysheet.sheetmanage.getSheetMerge(); - var _this = this; - - if(mergesetting==null){ - return; - } - - var mcset = []; - for(var key in mergesetting){ - mcset.push(key); - } - - if(rowseleted[0]>rowseleted[1]){ - rowseleted[1] = rowseleted[0]; - } - - if(columnseleted[0]>columnseleted[1]){ - columnseleted[1] = columnseleted[0]; - } - - var columnseleted1 = [].concat(columnseleted); - var rowseleted1= [].concat(rowseleted); - var top1 = top; - var height1 = height; - var left1 = left; - var width1 = width; - - //var anchor = mcset.length; - var offloop = true; - _this.mergeMoveData = {}; - - //console.log(rowseleted1); - - while (offloop) { - offloop = false; - for(var i=0;i=col_ed && rowseleted[0]<=row_st && rowseleted[1]>=row_ed) && - var changeparam = _this.mergeMove(mc, columnseleted, rowseleted, s, top , height, left , width); - - //console.log(key, changeparam); - if(changeparam!=null){ - _this.mergeMoveData[key] = mc; - - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - - offloop = true; - } - else{ - delete _this.mergeMoveData[key]; - } - } - - } - - //console.log(rowseleted); - // if(rowseleted[0]>rowseleted[1]){ - // rowseleted = rowseleted1; - // height = height1; - // top = top1; - // } - return [columnseleted, rowseleted, top , height, left , width]; - }, - mergeMove:function(mc, columnseleted, rowseleted, s, top , height, left , width){ - var row_st = mc.r, row_ed = mc.r + mc.rs - 1; - var col_st = mc.c, col_ed = mc.c + mc.cs - 1; - - var ismatch = false; - var _this = this; - - if(columnseleted[1] < columnseleted[0]){ - columnseleted[0] = columnseleted[1]; - } - - if(rowseleted[1] < rowseleted[0]){ - rowseleted[0] = rowseleted[1]; - } - - if( (columnseleted[0] <= col_st && columnseleted[1] >= col_ed && rowseleted[0] <= row_st && rowseleted[1] >= row_ed) || (!(columnseleted[1] < col_st || columnseleted[0] > col_ed) && !(rowseleted[1] < row_st || rowseleted[0] > row_ed))){ - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, mc.r, mc.c); - if(!!margeset){ - var row = margeset.row[1], - row_pre = margeset.row[0], - row_index = margeset.row[2], - col = margeset.column[1], - col_pre = margeset.column[0], - col_index = margeset.column[2]; - - // var row_edc = row_ed, row_stc = row_st; - // var col_edc = col_ed, col_stc = col_st; - // for(var key in _this.mergeMoveData){ - // var othermc = _this.mergeMoveData[key]; - // var otherMargeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, othermc.r, othermc.c); - // //console.log(row, otherMargeset.row[1], row_pre, otherMargeset.row[0]); - // // row = row>otherMargeset.row[1]?row:otherMargeset.row[1]; - // // row_pre = row_preotherMargeset.column[1]?col:otherMargeset.column[1]; - // // col_pre = col_prerow_ed1?row_edc:row_ed1; - // row_stc = row_stccol_ed1?col_edc:col_ed1; - // col_stc = col_stc rowseleted[0] && luckysheet_select_save.row_focus > row_stc){ - // rowseleted[0] = row_stc; - // } - - // if(row_edc < rowseleted[1] && luckysheet_select_save.row_focus < row_edc){ - // rowseleted[1] = row_edc; - // } - - - - //console.log(rowseleted, row_st, row_ed, columnseleted, col_st, col_ed); - //console.log("sssss"); - //_this.mergeMoveData[key] = "1"; - - var top1 = null , height1 = null, left1 = null, width1 = null; - if(!(columnseleted[1] < col_st || columnseleted[0] > col_ed)){ - //向上滑动 - if(rowseleted[0] <= row_ed && rowseleted[0] >= row_st){ - // var fix = luckysheet_select_save.height; - // if(luckysheet_select_save.row_focus>=row_st && luckysheet_select_save.row_focus<=row_ed){ - // fix = height; - // } - // height = luckysheet_select_save.top + fix - row_pre; - height += top - row_pre; - top = row_pre; - rowseleted[0] = row_st; - //console.log("向上滑动"); - } - - //向下滑动或者居中时往上滑动的向下补齐 - if(rowseleted[1] >= row_st && rowseleted[1] <= row_ed){ - if(s.row_focus >= row_st && s.row_focus <= row_ed){ - //height = height + row - luckysheet_select_save.top-luckysheet_select_save.height; - height = row - top; - } - else{ - height = row - top; - } - - rowseleted[1] = row_ed; - //console.log("向下滑动"); - } - // if(rowseleted[0]>=row_st && rowseleted[1]<=row_ed){ - // top = row_pre; - // height = row - top; - - // rowseleted[0] = row_st; - // rowseleted[1] = row_ed; - // console.log("居中"); - // } - // else if(rowseleted[0]>=row_st){ - // top = row_pre; - // height = luckysheet_select_save.top + height - row_pre; - - // } - // else if(rowseleted[1]<=row_ed){ - // height = height + row - luckysheet_select_save.top; - // } - } - - if(!(rowseleted[1] < row_st || rowseleted[0] > row_ed)){ - //console.log(columnseleted, col_st, col_ed); - if(columnseleted[0] <= col_ed && columnseleted[0] >= col_st){ - // left = col_pre; - // var fix = luckysheet_select_save.width; - // if(luckysheet_select_save.column_focus>=col_st && luckysheet_select_save.column_focus<=col_ed){ - // fix = width; - // } - // width = luckysheet_select_save.left + fix - col_pre; - width += left - col_pre; - left = col_pre; - columnseleted[0] = col_st; - } - - //向右滑动或者居中时往左滑动的向下补齐 - if(columnseleted[1] >= col_st && columnseleted[1] <= col_ed){ - if(s.column_focus >= col_st && s.column_focus <= col_ed){ - //width = width + col - luckysheet_select_save.left-luckysheet_select_save.width; - width = col - left; - } - else{ - width = col - left; - } - - columnseleted[1] = col_ed; - } - // if(columnseleted[0]>=col_st && columnseleted[1]<=col_ed){ - // left = col_pre; - // width = col - left; - - // columnseleted[0] = col_st; - // columnseleted[1] = col_ed; - // } - } - - ismatch = true; - } - } - - if(ismatch){ - return [columnseleted, rowseleted, top , height, left , width]; - } - else{ - return null; - } - }, - getCellRealSize:function(d, cell_r, cell_c){ - var width = luckysheet.defaultcollen; - var height = luckysheet.defaultrowlen; - var celldata = d[cell_r][cell_c]; - if(!!celldata && celldata["mc"]!=null){ - var mc = celldata["mc"]; - var margeset = luckysheet.menuButton.mergeborer(d, mc.r, mc.c); - if(!!margeset){ - var row = margeset.row[1]; - var row_pre = margeset.row[0]; - var row_index = margeset.row[2]; - var row_index_ed = margeset.row[3]; - - var col = margeset.column[1]; - var col_pre = margeset.column[0]; - var col_index = margeset.column[2]; - var col_index_ed = margeset.column[3]; - - width = col - col_pre - 1; - height = row - row_pre - 1; - } - } - else{ - var config=luckysheet.getluckysheetfile()[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["config"]; - - if (config["columlen"] != null && config["columlen"][cell_c] != null) { - width = config["columlen"][cell_c]; - } - - if (config["rowlen"] != null && config["rowlen"][cell_r] != null) { - height = config["rowlen"][cell_r]; - } - } - - return [width, height]; - }, - getTextHeightCache:{}, - getTextSize:function(text, font){ - var f = font || '10pt 微软雅黑'; - var _this = this; - if (f in _this.getTextHeightCache){ - return _this.getTextHeightCache[f]; - } - - if($("#luckysheetTextSizeTest").length==0){ - $('').appendTo($('body')); - } - - var o = $("#luckysheetTextSizeTest").text(text).css({'font': f}), - w = o.width(), h = o.height(); - _this.getTextHeightCache[f] = [w, h]; - return [w, h]; - }, - activeFormulaInput:function(row_index, col_index, rowh, columnh, formula, isnull){ - if(isnull==null){ - isnull = false; - } - var row_range = luckysheet.rowLocationByIndex(row_index); - var col_range = luckysheet.colLocationByIndex(col_index); - - luckysheet.luckysheetupdateCell(row_range[1], row_range[0], row_index, col_range[1], col_range[0], col_index, luckysheet.flowdata, true); - - //console.log(row_index, col_index, row, column); - if(isnull){ - var formulaTxt = '='+ formula.toUpperCase() +'()'; - - $("#luckysheet-rich-text-editor").html(formulaTxt); - - var currSelection = window.getSelection(); - var $span = $("#luckysheet-rich-text-editor").find("span"); - luckysheet.formula.setCaretPosition($span.get($span.length-2), 0, 1); - - return; - } - - var row_pre = luckysheet.rowLocationByIndex(rowh[0])[0], row = luckysheet.rowLocationByIndex(rowh[1])[1], col_pre = luckysheet.colLocationByIndex(columnh[0])[0], col = luckysheet.colLocationByIndex(columnh[1])[1]; - - var formulaTxt = '='+ formula.toUpperCase() +'('+ luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, {"row":rowh, "column":columnh }, luckysheet.currentSheetIndex) +')'; - - $("#luckysheet-rich-text-editor").html(formulaTxt); - //$("#luckysheet-rich-text-editor").html("=" + formula.toUpperCase() + "(" + luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, {"row":row, "column":column }, luckysheet.currentSheetIndex) + ")"); - - luckysheet.formula.israngeseleciton(); - luckysheet.formula.rangestart = true; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - luckysheet.formula.rangechangeindex = 0; - luckysheet.formula.rangeSetValue({ "row": rowh, "column": columnh }); - - - luckysheet.formula.func_selectedrange = { "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1, "left_move": col_pre, "width_move": col - col_pre - 1, "top_move": row_pre, "height_move": row - row_pre - 1, "row": [row_index, row_index], "column": [col_index, col_index] }; - - $("#luckysheet-formula-functionrange-select").css({ "left": col_pre, "width": col - col_pre - 1, "top": row_pre, "height": row - row_pre - 1 }).show(); - - $("#luckysheet-formula-help-c").hide(); - }, - backFormulaInput:function(d, r, c, rowh, columnh, formula){ - var f = '='+ formula.toUpperCase() +'('+ luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, {"row":rowh, "column":columnh }, luckysheet.currentSheetIndex) +')'; - var v = luckysheet.formula.execfunction(f, r, c); - var value = { "v": v[1], "f": v[2] }; - luckysheet.setcellvalue(r, c, d, value); - luckysheet.formula.execFunctionExist.push({ "r": r, "c": c, "i": luckysheet.currentSheetIndex }); - - luckysheet.server.historyParam(d, luckysheet.currentSheetIndex, {"row": [r, r], "column": [c, c]}); - }, - checkNoNullValue:function(cell){ - var v = cell; - if(luckysheet.getObjType(v) == "object"){ - v = v.v; - } - - if(!luckysheet.func_methods.isRealNull(v) && luckysheet.isdatatypemulti(v).num && (cell.ct == null || cell.ct.t == null || cell.ct.t == "n" || cell.ct.t == "g") ){ - return true; - } - else{ - return false; - } - }, - checkNoNullValueAll:function(cell){ - var v = cell; - if(luckysheet.getObjType(v) == "object"){ - v = v.v; - } - - if(!luckysheet.func_methods.isRealNull(v)){ - return true; - } - else{ - return false; - } - }, - getNoNullValue:function(d, st_x, ed, type){ - var hasValueSum = 0, hasValueStart = null; - var nullNum = 0, nullTime = 0; - var _this = this; - - for(var r = ed - 1 ; r >= 0; r--){ - var cell; - if(type == "c"){ - cell = d[st_x][r]; - } - else{ - cell = d[r][st_x]; - } - - if(_this.checkNoNullValue(cell)){ - hasValueSum++; - hasValueStart = r; - } - else if(cell == null || cell.v == null || cell.v == ""){ - nullNum++; - if(nullNum >= 40){ - if(nullTime <= 0){ - nullTime = 1; - } - else{ - break; - } - } - } - else{ - break; - } - } - - return hasValueStart; - }, - singleFormulaInput:function(d, _index, fix, st_m, ed_m, formula, type, noNum, noNull){ - if(type == null){ - type="r"; - } - - if(noNum == null){ - noNum = true; - } - - if(noNull == null){ - noNull = true; - } - - var _this = this; - var isNull = true, isNum= false; - - for(var c = st_m; c <= ed_m; c++){ - var cell = null; - if(type == "c"){ - cell = d[c][fix]; - } - else{ - cell = d[fix][c]; - } - if(_this.checkNoNullValue(cell)){ - isNull = false; - isNum= true; - } - else if(_this.checkNoNullValueAll(cell)){ - isNull = false; - } - } - - if(isNull && noNull){ - var st_r_r = _this.getNoNullValue(d, _index, fix, type); - if(st_r_r == null){ - if(type == "c"){ - _this.activeFormulaInput(_index, fix, null, null, formula, true); - } - else{ - _this.activeFormulaInput(fix, _index, null, null, formula, true); - } - } - else{ - if(_index==st_m){ - for(var c = st_m; c <= ed_m; c++){ - var st_r_r = _this.getNoNullValue(d, c, fix, type); - if(st_r_r==null){ - break; - } - - if(type == "c"){ - _this.backFormulaInput(d, c, fix, [c, c], [st_r_r, fix-1], formula); - } - else{ - _this.backFormulaInput(d, fix, c, [st_r_r, fix-1], [c, c], formula); - } - - } - } - else{ - for(var c = ed_m; c >= st_m; c--){ - var st_r_r = _this.getNoNullValue(d, c, fix, type); - if(st_r_r==null){ - break; - } - //_this.backFormulaInput(d, st_r, c, [st_r_r, ed_r-1], [c, c], formula); - if(type=="c"){ - _this.backFormulaInput(d, c, fix, [c, c], [st_r_r, fix-1], formula); - } - else{ - _this.backFormulaInput(d, fix, c, [st_r_r, fix-1], [c, c], formula); - } - } - } - } - } - else if(isNum && noNum){ - var cell = null; - if(type=="c"){ - cell = d[ed_m][fix]; - } - else{ - cell = d[fix][ed_m]; - } - if(cell!=null && cell.v!=null && cell.v.toString().length>0){ - var c = ed_m; - if(type=="c"){ - cell = d[ed_m][fix]; - } - else{ - cell = d[fix][ed_m]; - } - - while ( cell!=null && cell.v!=null && cell.v.toString().length>0) { - c++; - var len = null; - if(type=="c"){ - len = d.length; - } - else{ - len = d[0].length; - } - - if(c >= len){ - return; - } - //cell = d[fix][c]; - if(type=="c"){ - cell = d[c][fix]; - } - else{ - cell = d[fix][c]; - } - } - - if(type=="c"){ - //_this.backFormulaInput(d, c, fix, [c, c], [st_r_r, fix-1], formula); - _this.backFormulaInput(d, c, fix, [st_m, ed_m], [fix ,fix], formula); - } - else{ - _this.backFormulaInput(d, fix, c, [fix ,fix], [st_m, ed_m], formula); - } - } - else{ - if(type=="c"){ - //_this.backFormulaInput(d, c, fix, [c, c], [st_r_r, fix-1], formula); - _this.backFormulaInput(d, ed_m, fix, [st_m, ed_m], [fix ,fix], formula); - } - else{ - _this.backFormulaInput(d, fix, ed_m, [fix ,fix], [st_m, ed_m], formula); - } - } - } - else{ - return true; - } - - // luckysheet.formula.execFunctionExist.reverse(); - // luckysheet.formula.execFunctionGroup(null, null, null, null, d); - // luckysheet.jfrefreshgrid(d, st_r, ed_r, st_c, ed_c); - - // clearTimeout(jfcountfuncTimeout); - // jfcountfunc(); - }, - autoSelectionFormula:function(formula){ - var _this = this; - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var nullfindnum = 40; - var isfalse = true; - luckysheet.formula.execFunctionExist = []; - - var execFormulaInput_c = function(){ - var st_c_c = _this.getNoNullValue(d, st_r, ed_c, "c"); - if(st_c_c == null){ - _this.activeFormulaInput(st_r, st_c, null, null, formula, true); - } - else{ - _this.activeFormulaInput(st_r, st_c, [st_r ,ed_r], [st_c_c, ed_c-1], formula); - } - } - - var execFormulaInput = function(){ - var st_r_c = _this.getNoNullValue(d, st_c, ed_r, "r"); - if(st_r_c == null){ - execFormulaInput_c(); - } - else{ - _this.activeFormulaInput(st_r, st_c, [st_r_c, ed_r-1], [st_c ,ed_c], formula); - } - } - - for(var s = 0; s < luckysheet_select_save.length; s++){ - var st_r = luckysheet_select_save[s].row[0], ed_r = luckysheet_select_save[s].row[1]; - var st_c = luckysheet_select_save[s].column[0], ed_c = luckysheet_select_save[s].column[1]; - var row_index = luckysheet_select_save[s].row_focus, col_index = luckysheet_select_save[s].column_focus; - - if(st_r == ed_r && st_c == ed_c){ - if(ed_r - 1 < 0 && ed_c - 1 < 0){ - _this.activeFormulaInput(st_r, st_c, null, null, formula, true); - return; - } - - if(ed_r - 1 >= 0 && _this.checkNoNullValue(d[ed_r - 1][st_c])){ - execFormulaInput(); - } - else if(ed_c - 1 >= 0 && _this.checkNoNullValue(d[st_r][ed_c - 1])){ - execFormulaInput_c(); - } - else{ - execFormulaInput(); - } - } - else if(st_r == ed_r){ - isfalse = _this.singleFormulaInput(d, col_index, st_r, st_c, ed_c, formula, "r"); - } - else if(st_c == ed_c){ - isfalse = _this.singleFormulaInput(d, row_index, st_c, st_r, ed_r, formula, "c"); - } - else{ - var r_false = true; - for(var r = st_r; r <= ed_r; r++){ - r_false = _this.singleFormulaInput(d, col_index, r, st_c, ed_c, formula, "r",true, false) && r_false; - } - - var c_false = true; - for(var c = st_c; c <= ed_c; c++){ - c_false = _this.singleFormulaInput(d, row_index, c, st_r, ed_r, formula, "c", true, false) && c_false; - } - - isfalse = !!r_false && !!c_false; - } - isfalse = isfalse && isfalse; - } - - if(!isfalse){ - luckysheet.formula.execFunctionExist.reverse(); - luckysheet.formula.execFunctionGroup(null, null, null, null, d); - luckysheet.jfrefreshgrid(d, [{"row": [st_r, ed_r], "column": [st_c, ed_c]}]); - - clearTimeout(jfcountfuncTimeout); - jfcountfuncTimeout = setTimeout(function () { luckysheet.jfcountfunc() }, 500); - } - }, - getStyleByCell:function(d, r, c){ - var style = ""; - - //交替颜色 - var af_compute = luckysheet.alternateformat.getComputeMap(); - var checksAF = luckysheet.alternateformat.checksAF(r, c, af_compute); - - //条件格式 - var cf_compute = luckysheet.conditionformat.getComputeMap(); - var checksCF = luckysheet.conditionformat.checksCF(r, c, cf_compute); - - var cell = d[r][c]; - for(var key in cell){ - var value = luckysheet.menuButton.checkstatus(d, r, c , key); - - if(checksAF != null || (checksCF != null && checksCF["cellColor"] != null)){ - if(checksCF != null && checksCF["cellColor"] != null){ - style += "background: " + checksCF["cellColor"] + ";"; - } - else if(checksAF != null){ - style += "background: " + checksAF[1] + ";"; - } - } - - if(luckysheet.getObjType(value) == "object"){ - continue; - } - - if(key == "bg" || checksAF != null || (checksCF != null && checksCF["cellColor"] != null)){ - if(checksCF != null && checksCF["cellColor"] != null){ - style += "background: " + checksCF["cellColor"] + ";"; - } - else if(checksAF != null){ - style += "background: " + checksAF[1] + ";"; - } - else{ - style += "background: " + value + ";"; - } - } - - if(key == "bl" && value != "0"){ - style += "font-weight: bold;"; - } - - if(key == "it" && value != "0"){ - style += "font-style:italic;"; - } - - if(key == "ff" && value != "0"){ - var f = value; - if(!isNaN(parseInt(value))){ - f = luckysheet.menuButton.fontarray[parseInt(value)]; - } - style += "font-family: " + f + ";"; - } - - if(key == "fs" && value != "10"){ - style += "font-size: "+ value + "pt;"; - } - - if((key == "fc" && value != "#000000") || checksAF != null || (checksCF != null && checksCF["textColor"] != null)){ - if(checksCF != null && checksCF["textColor"] != null){ - style += "color: " + checksCF["textColor"] + ";"; - } - else if(checksAF != null){ - style += "color: " + checksAF[0] + ";"; - } - else{ - style += "color: " + value + ";"; - } - } - - if(key == "ht" && value != "1"){ - if(value == "0"){ - style += "text-align: center;"; - } - else if(value == "2"){ - style += "text-align: right;"; - } - } - - if(key == "vt" && value != "0"){ - if(value == "1"){ - style += "vertical-align: top;"; - } - else if(value == "2"){ - style += "vertical-align: bottom;"; - } - } - } - - return style; - } - } - - luckysheet.server = { - gridKey: null, - loadUrl: null, - updateUrl: null, - updateImageUrl: null, - title: null, - historyParam: function(data, sheetIndex, range){ - var _this = this; - - var r1 = range.row[0], r2 = range.row[1]; - var c1 = range.column[0], c2 = range.column[1]; - - if(r1 == r2 && c1 == c2){ //单个单元格更新 - var v = data[r1][c1]; - - _this.saveParam("v", sheetIndex, v, { "r": r1, "c": c1 }); - } - else{ //范围单元格更新 - var rowlen = r2 - r1 + 1; - var collen = c2 - c1 + 1; - - var timeR = Math.floor(1000 / collen); - var n = Math.ceil(rowlen / timeR); //分批次更新,一次最多1000个单元格 - - for(var i = 0; i < n; i++){ - var str = r1 + timeR * i; - - if(i == n - 1){ - var edr = r2; - } - else{ - var edr = r1 + timeR * (i + 1) - 1; - } - - var v = []; - - for(var r = str; r <= edr; r++){ - var v_row = []; - - for(var c = c1; c <= c2; c++){ - v_row.push(data[r][c]); - } - - v.push(v_row); - } - - _this.saveParam("rv", sheetIndex, v, { "range": { "row": [str, edr], "column": [c1, c2] } }); - - if(i == n - 1){ - _this.saveParam("rv_end", sheetIndex, null); - } - } - } - }, - saveParam: function (type, index, value, params) { - if(!luckysheet.server.allowUpdate){ - return; - } - - if(value == undefined){ - value = null; - } - - var d = {}; - d.t = type; - d.i = index; - d.v = value; - - if (type == "rv") { //单元格批量更新 - d.range = params.range; - } - else if (type == "v" || type == "fu" || type == "fm") { - d.r = params.r; - d.c = params.c; - } - else if (type == "fc") { - d.op = params.op; - d.pos = params.pos; - } - else if (type == "drc" || type == "arc" || type == "h" || type == "wh") { - d.rc = params.rc; - } - else if (type == "c") { - d.cid = params.cid; - d.op = params.op; - } - else if (type == "f") { - d.op = params.op; - d.pos = params.pos; - } - else if (type == "s") { - - } - else if (type == "sh") { - d.op = params.op; - if(params.cur!=null){ - d.cur = params.cur; - } - } - else if (type == "cg") { - d.k = params.k; - } - else if (type == "all") { - d.k = params.k; - // d.s = params.s; - } - - var msg = pako.gzip(encodeURIComponent(JSON.stringify(d)), { to: "string" }); - - luckysheet.server.websocket.send(msg); - - // var _this = this; - // _this.requestlast = moment(); - // _this.setlocaldata(d, function(data){ - // _this.checksubmit(data); - // }); - }, - websocket: null, - wxErrorCount: 0, - openWebSocket: function(){ - if('WebSocket' in window){ - luckysheet.server.websocket = new WebSocket(luckysheet.server.updateUrl + "?t=111&g=" + encodeURIComponent(luckysheet.server.gridKey)); - - //连接建立时触发 - luckysheet.server.websocket.onopen = function(){ - console.info('WebSocket连接成功'); - luckysheet.jfhideloading(); - luckysheet.server.wxErrorCount = 0; - - setInterval(function(){ - luckysheet.server.websocket.send("rub"); - }, 60000); - } - - //客户端接收服务端数据时触发 - luckysheet.server.websocket.onmessage = function(result){ - var data = eval('(' + result.data + ')'); - console.info(data); - var type = data.type; - - if(type == 1){ //send 成功或失败 - - } - else if(type == 2){ //更新数据 - var item = JSON.parse(data.data); - luckysheet.server.wsUpdateMsg(item); - } - else if(type == 3){ //多人操作不同选区("t": "mv")(用不同颜色显示其他人所操作的选区) - var id = data.id; - var username = data.username; - var item = JSON.parse(data.data); - - var type = item.t, - index = item.i, - value = item.v; - - if(luckysheet.getObjType(value) != "array"){ - value = JSON.parse(value); - } - - if(index == luckysheet.currentSheetIndex){ - var r = value[value.length - 1].row[0]; - var c = value[value.length - 1].column[0]; - - luckysheet.server.multipleRangeShow(id, username, r, c); - } - } - else if(type == 4){ //批量指令更新 - var items = JSON.parse(data.data); - for(var i = 0; i < items.length; i++){ - luckysheet.server.wsUpdateMsg(item[i]); - } - } - } - - //通信发生错误时触发 - luckysheet.server.websocket.onerror = function(){ - luckysheet.server.wxErrorCount++; - - if(luckysheet.server.wxErrorCount > 3){ - luckysheet.jfshowloading("WebSocket连接发生错误, 请刷新页面!"); - } - else{ - luckysheet.jfshowloading("WebSocket连接发生错误, 请耐心等待!"); - luckysheet.server.openWebSocket(); - } - } - - //连接关闭时触发 - luckysheet.server.websocket.onclose = function(){ - console.info('WebSocket连接关闭'); - alert("服务器通信发生错误,请刷新页面后再试,如若不行请联系管理员!"); - } - } - else{ - alert('当前浏览器 Not Support WebSocket'); - } - }, - wsUpdateMsg: function(item){ - var type = item.t, - index = item.i, - value = item.v; - - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - - if(file == null){ - return; - } - - if(type == "v"){ //单个单元格数据更新 - if(file.data == null || file.data.length == 0){ - return; - } - - var r = item.r, c = item.c; - file.data[r][c] = value; - - if(index == luckysheet.currentSheetIndex){ - luckysheet.flowdata = file.data; - - //如果更新的单元格有批注 - if(value != null && value.ps != null){ - luckysheet.postil.buildPs(r, c, value.ps); - } - else{ - luckysheet.postil.buildPs(r, c, null); - } - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(type == "rv"){ //范围单元格数据更新 - if(file.data == null || file.data.length == 0){ - return; - } - - var r1 = item.range.row[0], r2 = item.range.row[1]; - var c1 = item.range.column[0], c2 = item.range.column[1]; - - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - file.data[r][c] = value[r - r1][c - c1]; - } - } - - if(index == luckysheet.currentSheetIndex){ - luckysheet.flowdata = file.data; - - //如果更新的单元格有批注 - for(var r = r1; r <= r2; r++){ - for(var c = c1; c <= c2; c++){ - if(value[r - r1][c - c1] != null && value[r - r1][c - c1].ps != null){ - luckysheet.postil.buildPs(r, c, value[r - r1][c - c1].ps); - } - else{ - luckysheet.postil.buildPs(r, c, null); - } - } - } - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(type == "cg"){ //config更新(rowhidden,rowlen,columlen,merge,borderInfo) - var k = item.k; - - if(k == "borderInfo"){ - file["config"]["borderInfo"] = value; - } - else{ - if(!(k in file["config"])){ - file["config"][k] = {}; - } - - for(var key in value){ - file["config"][k][key] = value[key]; - } - } - - if(index == luckysheet.currentSheetIndex){ - config = file["config"]; - - if(k == "rowlen" || k == "columlen" || k == "rowhidden"){ - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(type == "all"){ //通用保存更新 - var k = item.k; - file[k] = value; - - if(k == "name"){ //表格名 - $("#luckysheet-sheet-container-c #luckysheet-sheets-item" + index).find("span.luckysheet-sheets-item-name").html(value); - } - else if(k == "color"){ //表格颜色 - var luckysheetcurrentSheetitem = $("#luckysheet-sheet-container-c #luckysheet-sheets-item" + index); - luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove(); - - if(value != null || value != ""){ - luckysheetcurrentSheetitem.append('
'); - } - } - else if(k == "pivotTable"){ //数据透视表 - // luckysheet.pivotTable.changePivotTable(index); - } - else if(k == "freezen"){ //冻结行列 - if(index == luckysheet.currentSheetIndex){ - if(file["freezen"].horizontal == null){ - $("#luckysheet-freezen-btn-horizontal").html(' 冻结首行'); - luckysheet.freezen.freezenhorizontaldata = null; - $("#luckysheet-freezebar-horizontal").hide(); - } - else{ - luckysheet.freezen.createFreezenHorizontal(file["freezen"].horizontal.freezenhorizontaldata, file["freezen"].horizontal.top); - } - - if(file["freezen"].vertical == null){ - $("#luckysheet-freezen-btn-vertical").html(' 冻结首列'); - luckysheet.freezen.freezenverticaldata = null; - $("#luckysheet-freezebar-vertical").hide(); - } - else{ - luckysheet.freezen.createFreezenVertical(file["freezen"].vertical.freezenverticaldata, file["freezen"].vertical.left); - } - - luckysheet.freezen.createAssistCanvas(); - } - } - else if(k == "filter_select"){ //筛选范围 - if(index == luckysheet.currentSheetIndex){ - luckysheet.createFilterOptions(value); - } - } - else if(k == "filter"){ //筛选保存 - if(index == luckysheet.currentSheetIndex){ - luckysheet.createFilterOptions(file.filter_select, value); - } - } - else if(k == "luckysheet_conditionformat_save"){ //条件格式 - if(index == luckysheet.currentSheetIndex){ - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(k == "luckysheet_alternateformat_save"){ //交替颜色 - if(index == luckysheet.currentSheetIndex){ - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(k == "config"){ //config - if(index == luckysheet.currentSheetIndex){ - config = value; - - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - } - else if(k == "dynamicArray"){ //动态数组 - if(index == luckysheet.currentSheetIndex){ - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - } - else if(type == "fc"){ //函数链calc - var op = item.op, pos = item.pos; - - if(luckysheet.getObjType(value) != "object"){ - value = eval('('+ value +')'); - } - - var r = value.r, c = value.c; - var func = value.func; - - var calcChain = file["calcChain"] == null ? [] : file["calcChain"]; - - if(op == "add"){ - calcChain.push(value); - } - else if(op == "del"){ - for(var a = 0; a < calcChain.length; a++){ - if(r == calcChain[a].r && c == calcChain[a].c && index == calcChain[a].index){ - calcChain.splice(a, 1); - } - } - } - else if(op == "update"){ - for(var a = 0; a < calcChain.length; a++){ - if(r == calcChain[a].r && c == calcChain[a].c && index == calcChain[a].index){ - calcChain[a].func = func; - } - } - } - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - else if(type == "drc"){ //删除行列 - if(file.data == null || file.data.length == 0){ - return; - } - - var rc = item.rc, st_i = value.index, len = value.len, mc = value.mc, borderInfo = value.borderInfo; - var data = file.data; - - if(rc == "r"){ - file["row"] -= len; - - data.splice(st_i, len); - - //空白行模板 - var row = []; - for (var c = 0; c < data[0].length; c++) { - row.push(null); - } - - //删除多少行,增加多少行空白行 - for (var r = 0; r < len; r++) { - data.push(row); - } - } - else{ - file["column"] -= len; - - //空白列模板 - var addcol = []; - for (var r = 0; r < len; r++) { - addcol.push(null); - } - - for(var i = 0; i < data.length; i++){ - data[i].splice(st_i, len); - - data[i] = data[i].concat(addcol); - } - } - - for(x in mc){ - var r = mc[x].r, c = mc[x].c; - data[r][c].mc = mc[x]; - } - - file["config"].merge = mc; - file["config"].borderInfo = borderInfo; - - if(index == luckysheet.currentSheetIndex){ - luckysheet.flowdata = data; - - config["merge"] = mc; - config["borderInfo"] = borderInfo; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(type == "arc"){ //增加行列 - if(file.data == null || file.data.length == 0){ - return; - } - - var rc = item.rc, st_i = value.index, len = value.len, addData = value.data, mc = value.mc, borderInfo = value.borderInfo; - var data = file.data; - - if(rc == "r"){ - file["row"] += len; - - var arr = []; - for(var i = 0; i < len; i++){ - arr.push(JSON.stringify(addData[i])); - } - - eval('data.splice(' + st_i + ', 0, ' + arr.join(",") + ')'); - } - else{ - file["column"] += len; - - for(var i = 0; i < data.length; i++){ - data[i].splice(st_i, 0, addData[i]); - } - } - - for(x in mc){ - var r = mc[x].r, c = mc[x].c; - data[r][c].mc = mc[x]; - } - - file["config"].merge = mc; - file["config"].borderInfo = borderInfo; - - if(index == luckysheet.currentSheetIndex){ - luckysheet.flowdata = data; - - config["merge"] = mc; - config["borderInfo"] = borderInfo; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - } - else if(type == "f"){ //筛选 - var op = item.op, pos = item.pos; - - var filter = file.filter; - - if(filter == null){ - filter = {}; - } - - if(op == "upOrAdd"){ - filter[pos] = value; - } - else if(op == "del"){ - delete filter[pos]; - } - - if(index == luckysheet.currentSheetIndex){ - luckysheet.createFilterOptions(file.filter_select, filter); - } - } - else if(type == "fsc"){ //清除筛选 - file.filter = null; - file.filter_select = null; - - if(index == luckysheet.currentSheetIndex){ - $('#luckysheet-filter-selected-sheet' + luckysheet.currentSheetIndex + ', #luckysheet-filter-options-sheet' + luckysheet.currentSheetIndex).remove(); - $("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide(); - } - } - else if(type == "fsr"){ //恢复筛选 - file.filter = value.filter; - file.filter_select = value.filter_select; - - if(index == luckysheet.currentSheetIndex){ - luckysheet.createFilterOptions(file.filter_select, file.filter); - } - } - else if(type == "sha"){ //新建sheet - luckysheetfile.push(value); - - var colorset = ''; - if(value.color != null){ - colorset = '
'; - } - - $("#luckysheet-sheet-container-c").append(luckysheet.replaceHtml(sheetHTML, { "index": value.index, "active": "", "name": value.name, "style": "", "colorset": colorset })); - $("#luckysheet-cell-main").append('
'); - } - else if(type == "shc"){ //复制sheet - var copyindex = value.copyindex, name = value.name; - - var copyarrindex = luckysheet.sheetmanage.getSheetIndex(copyindex); - var copyjson = $.extend(true, {}, luckysheetfile[copyarrindex]); - - copyjson.index = index; - copyjson.name = name; - - luckysheetfile.splice(copyarrindex + 1, 0, copyjson); - - var copyobject = $("#luckysheet-sheets-item" + copyindex); - $("#luckysheet-sheet-container-c").append(luckysheet.replaceHtml(sheetHTML, { "index": copyjson.index, "active": "", "name": copyjson.name, "style": "", "colorset": "" })); - $("#luckysheet-sheets-item" + copyjson.index).insertAfter(copyobject); - $("#luckysheet-cell-main").append('
'); - } - else if(type == "shd"){ //删除sheet - for(var i = 0; i < luckysheetfile.length; i++){ - if(luckysheetfile[i].index == value.deleIndex){ - luckysheet.server.sheetDeleSave.push(luckysheetfile[i]); - - luckysheetfile.splice(i, 1); - break; - } - } - - $("#luckysheet-sheets-item" + value.deleIndex).remove(); - $("#luckysheet-datavisual-selection-set-" + value.deleIndex).remove(); - } - else if(type == "shr"){ //sheet位置 - for(x in value){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(x)].order = value[x]; - } - } - else if(type == "shre"){ //删除sheet恢复操作 - for(var i = 0; i < luckysheet.server.sheetDeleSave.length; i++){ - if(luckysheet.server.sheetDeleSave[i].index == value.reIndex){ - var datav = luckysheet.server.sheetDeleSave[i]; - - luckysheetfile.push(datav); - - var colorset = ''; - if(value.color != null){ - colorset = '
'; - } - - $("#luckysheet-sheet-container-c").append(luckysheet.replaceHtml(sheetHTML, { "index": datav.index, "active": "", "name": datav.name, "style": "", "colorset": colorset })); - $("#luckysheet-cell-main").append('
'); - break; - } - } - } - else if(type == "sh"){ //隐藏sheet - var op = item.op, cur = item.cur; - - if(op == "hide"){ - file.hide = 1; - $("#luckysheet-sheets-item" + index).hide(); - - if(index == luckysheet.currentSheetIndex){ - $("#luckysheet-sheets-item" + cur).addClass("luckysheet-sheets-item-active"); - luckysheet.sheetmanage.changeSheetExec(cur); - } - } - else if(op == "show"){ - file.hide = 0; - $("#luckysheet-sheets-item" + index).show(); - } - } - else if(type == "c"){ //图表操作 - var op = item.op, cid = item.cid; - - if(op == "add"){ //插入 - file.chart.push(value); - - luckysheet.insertChartTosheet(value.sheetIndex, value.dataSheetIndex, value.option, value.chartType, value.selfOption, value.defaultOption, value.row, value.column, value.chart_selection_color, value.chart_id, value.chart_selection_id, value.chartStyle, value.rangeConfigCheck, value.rangeRowCheck, value.rangeColCheck, value.chartMarkConfig, value.chartTitleConfig, value.winWidth, value.winHeight, value.scrollLeft1, value.scrollTop1, value.chartTheme, value.myWidth, value.myHeight, value.myLeft, value.myTop, value.myindexrank1, true); - } - else if(op == "xy" || op == "wh" || op == "update"){ //移动 缩放 更新 - for(var i = 0; i < file.chart.length; i++){ - var chartjson = file.chart[i]; - - if(chartjson.chart_id == cid){ - for(var item in chartjson){ - for(var vitem in value){ - if(item == vitem){ - chartjson[item] = value[vitem]; - } - } - } - - luckysheet.sheetmanage.saveChart(chartjson); - - return; - } - } - } - else if(op == "del"){ //删除 - for(var i = 0; i < file.chart.length; i++){ - var chartjson = file.chart[i]; - - if(chartjson.chart_id == cid){ - file.chart.splice(i, 1); - - $("#" + cid).remove(); - luckysheet.sheetmanage.delChart($("#" + cid).attr("chart_id"), $("#" + cid).attr("sheetIndex")); - - return; - } - } - } - } - else if(type == "na"){ //表格名称 - $("#luckysheet_info_detail_input").val(value).css("width", luckysheet.getByteLen(value) * 10); - } - }, - multipleIndex: 0, - multipleRangeShow: function(id, name, r, c){ - var r1 = r2 = r; - var c1 = c2 = c; - - var row = visibledatarow[r2], - row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1], - col = visibledatacolumn[c2], - col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - var margeset = luckysheet.menuButton.mergeborer(luckysheet.flowdata, r1, c1); - if(!!margeset){ - row = margeset.row[1]; - row_pre = margeset.row[0]; - - col = margeset.column[1]; - col_pre = margeset.column[0]; - } - - if($("#luckysheet-multipleRange-show-" + id).length > 0){ - $("#luckysheet-multipleRange-show-" + id).css({ "position": "absolute", "left": col_pre - 1, "width": col - col_pre - 1, "top": row_pre - 1, "height": row - row_pre - 1 }); - } - else{ - var itemHtml = '
'+ - '
'+ - '
'; - - $(itemHtml).appendTo($("#luckysheet-cell-main #luckysheet-multipleRange-show")); - - luckysheet.server.multipleIndex++; - } - }, - sheetDeleSave: [], //共享编辑模式下 删除的sheet保存下来,方便恢复时取值 - submitInterval: 1000, - imagesubmitInterval: 5000, - submitdatalimit: 50, - submitcompresslimit: 1000, - checksubmit: function(data){ - var _this = this; - //clearTimeout(_this.requestTimeOut); - - _this.submitTimeout(); - - clearTimeout(_this.imageRequestTimeout); - _this.imageRequestTimeout = setTimeout(function(){ - _this.imageRequest(); - }, _this.imagesubmitInterval); - }, - submitTimeout: function(){ - var _this = this; - clearTimeout(_this.requestTimeOut); - - //console.log(_this.requestlast, moment(), (_this.requestlast!=null && _this.requestlast.add(10, 'seconds').isBefore(moment()) ) ); - if(!_this.requestLock && (_this.requestlast!=null && _this.requestlast.clone().add(1, 'seconds').isBefore(moment()) ) ){ - _this.request(); - } - - // if(!_this.imageRequestLock && (_this.imageRequestLast==null || _this.imageRequestLast.clone().add(30, 'seconds').isBefore(moment()) ) ){ - - // } - - _this.requestTimeOut = setTimeout(function(){ - _this.submitTimeout(); - }, _this.submitInterval); - }, - requestLock: false, - requestlast: null, - firstchange: true, - requestTimeOut: null, - request: function () { - var _this = this; - var key = this.gridKey; - var cahce_key = key + "__qkcache"; - _this.cachelocaldata(function(cahce_key, params){ - if(params.length==0){ - return; - } - console.log(params); - - params = encodeURIComponent(JSON.stringify(params)); - var compressBeginLen = params.length; - var iscommpress = false; - // if (compressBeginLen > _this.submitcompresslimit) { - // params = pako.gzip(params, { to: "string" }); - // iscommpress = true; - // } - _this.requestLock = true; - //console.log(params); - console.log("request"); - if(_this.updateUrl != ""){ - $.post(_this.updateUrl, { compress: iscommpress, gridKey: _this.gridKey, data: params }, function (data) { - var re = eval('('+ data +')') - if(re.status){ - $("#luckysheet_info_detail_update").html("最近存档时间:"+ moment().format("M-D H:m:s")); - $("#luckysheet_info_detail_save").html("同步成功"); - _this.clearcachelocaldata(); - } - else{ - $("#luckysheet_info_detail_save").html("同步失败"); - _this.restorecachelocaldata(); - } - _this.requestlast = moment(); - _this.requestLock = false; - }); - } - }); - }, - imageRequestLast: null, - imageRequestLock: false, - imageRequestTimeout: null, - imageRequest: function(){ - var _this = this; - html2canvas($("#" + container).find(".luckysheet-grid-window").get(0), { - onrendered: function(canvas) { - //var imgcut = $("#luckysheet-cell-main").find(".luckysheet-grid-window"); - //document.body.appendChild(canvas); - var old = $(canvas).appendTo("body"); - old.hide(); - var newwidth = old.width(); - var newheight = old.height(); - var imageData = old.get(0).getContext("2d").getImageData(0, 0, newwidth, newheight); - - var cutW = newwidth, cutH = newheight; - if(cutW*0.54 > cutH){ - cutW = cutH / 0.54; - } - else{ - cutH = cutW * 0.54; - } - var newCanvas = $("").attr("width", cutW).attr("height", cutH)[0]; - - newCanvas.getContext("2d").putImageData(imageData, 0, 0); - - old.attr("width", 350); - old.attr("height", 189); - old.get(0).getContext("2d").drawImage(newCanvas, 0, 0, 350, 189); - var base64 = old.get(0).toDataURL('image/jpeg', 0.9); - - //console.log(base64); - //console.log("压缩:", pako.gzip(base64, { to: "string" })); - //console.log("imageRequest"); - var curindex = luckysheet.sheetmanage.getCurSheetnoset(); - _this.imageRequestLock =true; - // var data1 = pako.gzip(encodeURIComponent(JSON.stringify({"t":"thumb", "img": base64, "curindex":curindex })), { to: "string" }); - var data1 = encodeURIComponent(JSON.stringify({"t":"thumb", "img": base64, "curindex":curindex })); - old.remove(); - //console.log("缩略图", _this.imageRequestLast,base64); - if(_this.updateImageUrl != ""){ - // $.post(_this.updateImageUrl, { compress: true, gridKey: _this.gridKey, data:data1 }, function (data) { - $.post(_this.updateImageUrl, { compress: false, gridKey: _this.gridKey, data:data1 }, function (data) { - var re = eval('('+ data +')') - if(re.status){ - imageRequestLast = moment(); - } - else{ - $("#luckysheet_info_detail_save").html("网络不稳定"); - } - _this.imageRequestLock =true; - }); - } - - } - }); - }, - localdata: [], - matchOpt: function(v, d){ - for(var vitem in v){ - if(vitem == "t" && v["t"] in {"drc":1, "arc":1,"sha":1,"shc":1,"shd":1 } ){ - return false; - } - - if(vitem=="v"){ - continue; - } - - if(!(vitem in d)){ - return false; - } - - if(d[vitem] != v[vitem]){ - return false; - } - } - - return true; - }, - deleteRepeatOpt: function(data, value){ - //var d = $.extend(true, [], data); //原来 - var d = data; - var _this = this; - - if(value instanceof Array){ - for(var i = 0; i < value.length; i++){ - var vitem = value[i]; - - for(var a = 0; a < d.length; a++){ - var ditem = data[i]; //var ditem = data[a];? - - if(_this.matchOpt(vitem, ditem)){ - delete d[a]; - } - } - } - } - else{ - for(var a = 0; a < d.length; a++){ - var ditem = d[a]; - - if(_this.matchOpt(value, ditem)){ - delete d[a]; - } - } - } - - var ret = []; - for(var i = 0; i < d.length; i++){ - if(d[i] != null){ - ret.push(d[i]); - } - } - - return ret; - }, - setlocaldata: function (value, func) { - var key = this.gridKey; - //!!window.store && store.push(key, data); - var _this = this; - _this.getlocaldata(function(data){ - if(data==null){ - data = []; - } - - //此处不去重,在request同步后台时统一循环一次去重 - //var data = _this.deleteRepeatOpt(data, value); - - if(value instanceof Array){ - data = data.concat(value); - } - else{ - data.push(value); - } - - _this.localdata = data; - func(_this.localdata); - - //console.log(value); - // localforage.setItem(key, data).then(function () { - // console.log(data); - // func(data); - // }).catch(function (err) { - - // }); - }); - }, - getlocaldata: function (func) { - var key = this.gridKey; - //return !!window.store && store.get(key); - func(this.localdata); - // localforage.getItem(key).then(function(readValue) { - // func(readValue); - // }); - }, - clearlocaldata: function (func) { - var key = this.gridKey; - //!!window.store && store.remove(key); - this.localdata = []; - func(); - // localforage.removeItem(key, function(err,value) { - // func(); - // }); - }, - cachelocaldata: function (func) { - var key = this.gridKey; - var _this = this; - var cahce_key = key + "__qkcache"; - //!!window.store && store.remove(key); - //console.log(key, cahce_key); - - - //处理localdata去重 - var updatedata = _this.localdata; - var uLen = updatedata.length; - if(uLen > 1){ - var prevData = []; - prevData[0] = updatedata[0]; - for(var i = 1; i < uLen; i++){ - var value = updatedata[i]; - var flag = true; - for(var a=0;a .luckysheet-cols-menu, body > .luckysheet-modal-dialog-slider").remove(); - $("body > .luckysheet-cols-menu").remove(); - - $("#luckysheet-modal-dialog-mask, #luckysheetTextSizeTest, #luckysheet-icon-morebtn-div").remove(); - $("#luckysheet-input-box").parent().remove(); - $("#luckysheet-formula-help-c").remove(); - - //参数重置 - luckysheet.jfredo = []; - luckysheet.jfundo = []; - - luckysheet.freezen.initialHorizontal = true; - luckysheet.freezen.initialVertical = true; - luckysheetConfigsetting.pointEdit = false; - }, - editorChart:function(c){ - var file = luckysheetfile[0]; - var chart_selection_color = luckysheet.jfcolor[0]; - var chart_id = "luckysheetEditMode-datav-chart"; - var chart_selection_id = chart_id + "_selection"; - c.chart_id = chart_id; - var chartTheme = c.chartTheme; - chartTheme = chartTheme==null?"default0000":chartTheme; - - luckysheet.insertChartTosheet(c.sheetIndex, c.dataSheetIndex, c.option, c.chartType, c.selfOption, c.defaultOption, c.row, c.column, chart_selection_color, chart_id, chart_selection_id, c.chartStyle, c.rangeConfigCheck, c.rangeRowCheck, c.rangeColCheck, c.chartMarkConfig, c.chartTitleConfig, c.winWidth, c.winHeight, c.scrollLeft, c.scrollTop, chartTheme, c.myWidth, c.myHeight, c.myLeft!=null?parseFloat(c.myLeft):null, c.myTop!=null?parseFloat(c.myTop):null, c.myindexrank, true); - - $("#"+chart_id).find(".luckysheet-modal-controll-update").click(); - } - } - - luckysheet.jfrefreshchartall = function (flowdata1, r_st, r_ed, c_st, c_ed) { - //chartMix - !!window.generator && generator.changeChartCellDataHook(flowdata1, r_st, r_ed, c_st, c_ed); - // $("#luckysheet-cell-main .luckysheet-data-visualization-chart[sheetindex='" + luckysheet.currentSheetIndex + "']").each(function () { - // luckysheet.jfrefreshchart($(this), flowdata1, r_st, r_ed, c_st, c_ed); - // }); - } - - luckysheet.jfrefreshchart = function ($obj, flowdata1, r_st, r_ed, c_st, c_ed) { - var row = eval('(' + $obj.attr("row") + ')'), column = eval('(' + $obj.attr("column") + ')'); - - if (r_st > row[1] || r_ed < row[0] || c_st > column[1] || c_ed < column[0]) { - return; - } - //console.log(row[1], row[0], column[1], column[0], r_st, r_ed, c_st, c_ed, r_st > row[1] ,r_ed < row[0], c_st > column[1] , c_ed < column[0]); - var type = $obj.attr("chartType"), style = $obj.attr("chartStyle"), selfOption = $obj.attr("selfOption"), defaultOption = $obj.attr("defaultOption"), chartMarkConfig = $obj.attr("chartMarkConfig"), chartTitleConfig = $obj.attr("chartTitleConfig"), chartTheme = $obj.attr("chartTheme"); - - //console.log(type, style, selfOption, chartMarkConfig, chartTitleConfig, luckysheet.chartparam.luckysheetcurrentChart); - - luckysheet.chartparam.jgridCurrentChartSelection = { "row": row, "column": column }; - luckysheet.chartparam.jgridCurrentChartData = luckysheet.getdatabyselectionD(flowdata1, luckysheet.chartparam.jgridCurrentChartSelection); - - if (luckysheet.chartparam.jgridCurrentChartData.length >= luckysheet.chartparam.jgridCurrentChartData[0].length) { - rangeConfigCheck = false; - } - else { - rangeConfigCheck = true; - } - - if (luckysheet.chartparam.jgridCurrentChartData.length == 1) { - rangeRowCheck = false; - } - else{ - rangeRowCheck = true; - } - - if (luckysheet.chartparam.jgridCurrentChartData[0].length == 1) { - rangeColCheck = false; - } - else{ - rangeColCheck = true; - } - - luckysheet.range_config(rangeConfigCheck, rangeRowCheck, rangeColCheck); - - luckysheet.chartparam.luckysheetcurrentChart = echarts.getInstanceById($obj.find(".luckysheet-modal-dialog-content").attr("_echarts_instance_")); - if(luckysheet.getObjType(chartMarkConfig) != "object"){ - chartMarkConfig = eval('('+ chartMarkConfig +')'); - } - - if(luckysheet.getObjType(chartTitleConfig) != "object"){ - chartTitleConfig = eval('('+ chartTitleConfig +')'); - } - - if(luckysheet.getObjType(selfOption) != "object"){ - selfOption = eval('('+ selfOption +')'); - } - - luckysheet.chartparam.luckysheet_chart_mark_config = chartMarkConfig; - luckysheet.chartparam.luckysheet_chart_title_config = chartTitleConfig; - luckysheet.chartparam.luckysheet_chart_self_config = selfOption == null ? {} : selfOption; - //luckysheet.chartparam.luckysheet_chart_default_config = defaultOption; - luckysheet.luckysheet_datavisual_item_active("datachange", type, style); - // = chartTheme - - - if(typeof luckysheet.luckysheetConfigsetting.chartConfigChange == "function" ){ - luckysheet.luckysheetConfigsetting.chartConfigChange({ "sheetIndex": $obj.attr("sheetIndex"), "dataSheetIndex": $obj.attr("dataSheetIndex"), "option": luckysheet.chartparam.luckysheetcurrentChart.getOption(), "chartType": type, "selfOption": selfOption, "defaultOption": defaultOption, "row": row, "column": column, "chart_id": $obj.attr("chart_id"), "chart_selection_color": $obj.attr("chart_selection_color"), "chart_selection_id": $obj.attr("chart_selection_id"), "chartStyle": style, "rangeConfigCheck": rangeConfigCheck, "rangeRowCheck": rangeRowCheck, "rangeColCheck": rangeColCheck, "chartMarkConfig": chartMarkConfig, "chartTitleConfig": chartTitleConfig, "chartTheme": chartTheme }); - } - - // luckysheet.chartparam.luckysheetcurrentChart = null; - // luckysheet.chartparam.luckysheet_chart_mark_config = null; - // luckysheet.chartparam.luckysheet_chart_title_config = null; - } - - - //得到单元格的值 - luckysheet.getcellvalue = function (r, c, data, type) { - try { - if (type == null) { - type = "v"; - } - - if (data == null) { - data = luckysheet.flowdata; - } - - var d_value; - - if (r != null && c != null) { - d_value = data[r][c]; - } - else if (r != null) { - d_value = data[r]; - } - else if (c != null) { - var newData = data[0].map(function(col, i) { - return data.map(function(row) { - return row[i]; - }) - }); - d_value = newData[c]; - } - else { - return data; - } - - var retv = d_value; - - if(luckysheet.getObjType(d_value) == "object"){ - retv = d_value[type]; - - if (type == "f" && retv != null) { - retv = luckysheet.formula.functionHTMLGenerate(retv); - } - else if(type == "f"){ - retv = d_value["v"]; - }else if(d_value && d_value.ct && d_value.ct.fa == 'yyyy-MM-dd'){ - retv = d_value.m - } - } - - if(retv == undefined){ - retv = null; - } - - return retv; - } - catch(err) { - console.log(err); - } - } - - //new runze 根据亿万格式autoFormatw和精确度accuracy 转换成 w/w0/w0.00 or 0/0.0格式 - luckysheet.setAccuracy = function(autoFormatw, accuracy){ - var acc = "0."; - var fmt; - if(autoFormatw == "TRUE"){ - if(accuracy == undefined){ - return "w"; - }else{ - var alength = parseInt(accuracy); - if(alength == 0){ - return "w0"; - }else{ - acc = "w0." - for(var i = 0; i < alength; i++){ - acc += "0"; - } - fmt = acc; - } - - } - }else{ - if(accuracy == undefined){ - return "General"; - }else{ - var alength = parseInt(accuracy); - if(alength == 0){ - return "0"; - }else{ - for(var i = 0; i < alength; i++){ - acc += "0"; - } - fmt = acc; - } - - } - } - - return fmt.toString(); - } - - //设置单元格的值 - luckysheet.setcellvalue = function (r, c, d, v) { - var cell = d[r][c]; - - var vupdate; - - if(luckysheet.getObjType(v) == "object"){ - cell = v; - - if(v.f != null){ - cell.f = v.f; - } - - if(v.spl != null){ - cell.spl = v.spl; - } - - if(luckysheet.getObjType(v.v) == "object"){ - vupdate = v.v.v; - } - else{ - vupdate = v.v; - } - } - else{ - var vupdate = v; - } - - if(luckysheet.func_methods.isRealNull(vupdate)){ - if(luckysheet.getObjType(cell) == "object"){ - delete cell.m; - delete cell.v; - } - else{ - cell = null; - } - - d[r][c] = cell; - - return; - } - - if(luckysheet.func_methods.isRealNull(cell)){ - cell = {}; - } - - if(vupdate.toString().substr(0, 1) == "'"){ - cell.m = vupdate.toString().substr(1); - cell.ct = { "fa": "@", "t": "s" }; - cell.v = vupdate.toString().substr(1); - } - else if(vupdate.toString().toUpperCase() === "TRUE"){ - cell.m = "TRUE"; - cell.ct = { "fa": "General", "t": "b" }; - cell.v = true; - } - else if(vupdate.toString().toUpperCase() === "FALSE"){ - cell.m = "FALSE"; - cell.ct = { "fa": "General", "t": "b" }; - cell.v = false; - } - else if(luckysheet.func_methods.valueIsError(vupdate)){ - cell.m = vupdate.toString(); - cell.ct = { "fa": "General", "t": "e" }; - cell.v = vupdate; - } - else{ - if(cell.f != null && luckysheet.func_methods.isRealNum(vupdate) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(vupdate)){ - cell.v = parseFloat(vupdate); - cell.ct = { "fa": "General", "t": "n" }; - - if(cell.v == Infinity || cell.v == -Infinity){ - cell.m = cell.v.toString(); - } - else{ - if(cell.v.toString().indexOf("e") > -1){ - var len = cell.v.toString().split(".")[1].split("e")[0].length; - if(len > 5){ - len = 5; - } - - cell.m = cell.v.toExponential(len).toString(); - } - else{ - var mask = luckysheet.mask.genarate(Math.round(cell.v * 1000000000) / 1000000000); - - cell.m = mask[0].toString(); - } - } - } - else if(cell.ct != null && cell.ct.fa == "@"){ - cell.m = vupdate.toString(); - cell.v = vupdate; - } - else if(cell.ct != null && cell.ct.fa != null && cell.ct.fa != "General"){ - if(luckysheet.func_methods.isRealNum(vupdate)){ - vupdate = parseFloat(vupdate); - } - - var mask = luckysheet.mask.update(cell.ct.fa, vupdate); - - if(mask === vupdate){ //若原来单元格格式 应用不了 要更新的值,则获取更新值的 格式 - mask = luckysheet.mask.genarate(vupdate); - - cell.m = mask[0].toString(); - cell.ct = mask[1]; - cell.v = mask[2]; - } - else{ - cell.m = mask.toString(); - cell.v = vupdate; - } - } - else{ - if(luckysheet.func_methods.isRealNum(vupdate) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(vupdate)){ - vupdate = parseFloat(vupdate); - - cell.v = parseFloat(vupdate); - cell.ct = { "fa": "General", "t": "n" }; - - if(cell.v == Infinity || cell.v == -Infinity){ - cell.m = cell.v.toString(); - } - else{ - var mask = luckysheet.mask.genarate(cell.v); - - cell.m = mask[0].toString(); - } - } - else{ - var mask = luckysheet.mask.genarate(vupdate); - - cell.m = mask[0].toString(); - cell.ct = mask[1]; - cell.v = mask[2]; - } - } - } - - if(!luckysheet.server.allowUpdate && !luckysheetConfigsetting.pointEdit){ //报表模式下,强制把四位以上的数字转换成万亿格式 - if(cell.ct != null && /^(w|W)((0?)|(0\.0+))$/.test(cell.ct.fa) == false && cell.ct.t == "n" && cell.v != null && parseInt(cell.v).toString().length > 4){ - // var autoFormatw = luckysheetConfigsetting.autoFormatw.toString().toUpperCase(); - // var accuracy = luckysheetConfigsetting.accuracy; - - // rptapp - //报表修改,下一页不会转换万亿 如果传的有配置,走用户传的配置,否则走默认配置 - var autoFormatw = "", accuracy; - if(luckysheet.rptSetting && luckysheet.rptSetting.autoFormatw){ - autoFormatw = luckysheet.rptSetting.autoFormatw.toString().toUpperCase(); - }else{ - autoFormatw = luckysheetConfigsetting.autoFormatw.toString().toUpperCase(); - } - if(luckysheet.rptSetting && luckysheet.rptSetting.accuracy){ - accuracy = luckysheet.rptSetting.accuracy; - }else{ - accuracy = luckysheetConfigsetting.accuracy; - } - var sfmt = luckysheet.setAccuracy(autoFormatw, accuracy); - - if(sfmt != "General") { - cell.ct.fa = sfmt; - cell.m = luckysheet.mask.update(sfmt, cell.v); - } - } - } - - d[r][c] = cell; - } - - luckysheet.jfrefreshcell = function (value, ur, uc) { - if (clearjfundo) { - luckysheet.jfundo = []; - luckysheet.jfredo.push({ "type": "cellchange", "sheetIndex": luckysheet.currentSheetIndex, "value": luckysheet.flowdata[ur][uc], "curvalue": $.extend(true, {}, value), "uprow": ur, "upcolumn": uc }); - } - - if (sourcechange) { - var row = [].concat(luckysheet.flowdata[ur]); - row[uc] = value; - luckysheet.flowdata[ur] = row; - } - - var data = luckysheet.flowdata; - var luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - var scrollWidth = $("#luckysheet-cell-main").scrollLeft(), scrollHeight = $("#luckysheet-cell-main").scrollTop(); - - var start_r, start_c, end_r, end_c; - - if (ur == 0) { - start_r = 0; - } - else { - start_r = visibledatarow[ur - 1] - scrollHeight - 1; - } - end_r = visibledatarow[ur] - scrollHeight; - - if (uc == 0) { - start_c = 0; - } - else { - start_c = visibledatacolumn[uc - 1] - scrollWidth; - } - end_c = visibledatacolumn[uc] - scrollWidth; - - - - if ($("#luckysheet-data-visualization").length > 0 && $("#luckysheet-data-visualization").is(":visible")) { - luckysheet.chartparam.jgridCurrentChartData = luckysheet.getdatabyselectionD(luckysheet.flowdata, luckysheet.chartparam.jgridCurrentChartSelection); - luckysheet.luckysheet_datavisual_item_active(); - } - - if (data[ur] != null && data[ur][uc] != null) { - var value = luckysheet.getcellvalue(ur, uc, data); - - //console.log(config); - - var firstcolumlen = defaultcollen; - if (config["columlen"] != null && config["columlen"][uc] != null) { - firstcolumlen = config["columlen"][uc]; - } - - var textMetrics = luckysheetTableContent.measureText(value).width; - if (textMetrics > firstcolumlen) { - var v = "", value_array = value.toString().split(""); - for (var i = 0; i < value_array.length; i++) { - if (luckysheetTableContent.measureText(v + "" + value_array[i]).width + 12 > firstcolumlen) { - break; - } - v += value_array[i]; - } - value = v + "..."; - } - - luckysheetTableContent.clearRect(start_c + rowHeaderWidth - 1, start_r + columeHeaderHeight - 1, end_c - start_c - 1, end_r - start_r - 2); - luckysheetTableContent.fillText(value==null?"":value, start_c + 4 + rowHeaderWidth, columeHeaderHeight + start_r + (end_r - start_r) / 2 - 1); - - var rowlen = defaultrowlen; - if (config["rowlen"] != null && config["rowlen"][ur] != null) { - rowlen = config["rowlen"][ur]; - } - - luckysheetTableContent.clearRect(start_c + rowHeaderWidth - 1 + firstcolumlen - 1, start_r + columeHeaderHeight - 1, 3, end_r - start_r - 2); - - //列 - if (!luckysheetcurrentisPivotTable) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(start_c + rowHeaderWidth - 1 + firstcolumlen, start_r + columeHeaderHeight - 1); - luckysheetTableContent.lineTo(start_c + rowHeaderWidth - 1 + firstcolumlen, start_r + columeHeaderHeight - 1 + rowlen); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - } - - luckysheet.server.saveParam("v", luckysheet.currentSheetIndex, value, { "r":ur, "c":uc }); - - luckysheet.jfrefreshchartall(luckysheet.flowdata, ur, ur, uc, uc); - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - - luckysheet.jfrefreshrange = function (data, range, cdformat) { - //单元格数据更新联动 - luckysheet.formula.execFunctionExist = []; - for(var s = 0; s < range.length; s++){ - for(var r = range[s].row[0]; r <= range[s].row[1]; r++){ - for(var c = range[s].column[0]; c <= range[s].column[1]; c++){ - luckysheet.formula.execFunctionExist.push({ "r": r, "c": c, "i": luckysheet.currentSheetIndex }); - } - } - } - luckysheet.formula.execFunctionExist.reverse(); - luckysheet.formula.execFunctionGroup(null, null, null, null, data); - luckysheet.formula.execFunctionGroupData = null; - - if (clearjfundo) { - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": "rangechange", - "data": luckysheet.flowdata, - "curdata": data, - "range": range, - "sheetIndex": luckysheet.currentSheetIndex, - "cdformat": $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]), - "curCdformat": cdformat - }); - } - - //luckysheet.flowdata - luckysheet.flowdata = data; - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = luckysheet.flowdata; - - //条件格式 - if(cdformat != null){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] = cdformat; - } - - //刷新表格 - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - //发送给后台 - for(var s = 0; s < range.length; s++){ - luckysheet.server.historyParam(luckysheet.flowdata, luckysheet.currentSheetIndex, range[s]); - - luckysheet.jfrefreshchartall(luckysheet.flowdata, range[s].row[0], range[s].row[1], range[s].column[0], range[s].column[1]); - } - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - - luckysheet.jfrefreshgrid = function (data, range, cfg, cdformat, RowlChange) { - //单元格数据更新联动 - luckysheet.formula.execFunctionExist = []; - for(var s = 0; s < range.length; s++){ - for(var r = range[s].row[0]; r <= range[s].row[1]; r++){ - for(var c = range[s].column[0]; c <= range[s].column[1]; c++){ - luckysheet.formula.execFunctionExist.push({ "r": r, "c": c, "i": luckysheet.currentSheetIndex }); - } - } - } - luckysheet.formula.execFunctionExist.reverse(); - luckysheet.formula.execFunctionGroup(null, null, null, null, data); - luckysheet.formula.execFunctionGroupData = null; - - if (clearjfundo) { - luckysheet.jfundo = []; - - if(cfg == null){ - var curConfig = $.extend(true, {}, config); - } - else{ - var curConfig = $.extend(true, {}, cfg); - } - - if(cdformat == null){ - var curCdformat = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]); - } - else{ - var curCdformat = cdformat; - } - - luckysheet.jfredo.push({ - "type": "datachange", - "data": luckysheet.flowdata, - "curdata": data, - "sheetIndex": luckysheet.currentSheetIndex, - "range": range, - "config": $.extend(true, {}, config), - "curConfig": curConfig, - "cdformat": $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]), - "curCdformat": curCdformat, - "RowlChange": RowlChange - }); - } - - //luckysheet.flowdata - luckysheet.flowdata = data; - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = luckysheet.flowdata; - - //config - if(cfg != null){ - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, cfg, { "k": "config" }); - - if(RowlChange != null){ - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - } - - //条件格式 - if(cdformat != null){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] = cdformat; - - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, cdformat, { "k": "luckysheet_conditionformat_save" }); - } - - //更新数据的范围 - for(var s = 0; s < range.length; s++){ - var r1 = range[s].row[0]; - var c1 = range[s].column[0]; - - if(luckysheet.flowdata[r1][c1] != null && luckysheet.flowdata[r1][c1].spl != null){ - window.luckysheetCurrentRow = r1; - window.luckysheetCurrentColumn = c1; - window.luckysheetCurrentFunction = luckysheet.flowdata[r1][c1].f; - - var fp = $.trim(luckysheet.formula.functionParser(luckysheet.flowdata[r1][c1].f)); - var sparklines = eval(fp); - luckysheet.flowdata[r1][c1].spl = sparklines; - } - - if(luckysheet.server.allowUpdate){ //共享编辑模式 - luckysheet.server.historyParam(luckysheet.flowdata, luckysheet.currentSheetIndex, range[s]); - } - - luckysheet.jfrefreshchartall(luckysheet.flowdata, range[s].row[0], range[s].row[1], range[s].column[0], range[s].column[1]); - } - - //刷新表格 - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - window.luckysheet_getcelldata_cache = null; - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - - luckysheet.pointEdit_updateData = function(){ - var celldata = []; - - if(luckysheet.flowdata != null && luckysheet.flowdata.length > 0){ - celldata = luckysheet.dataToCelldata(luckysheet.flowdata); - } - - var msTable_files = $.extend(true, [], luckysheet.getluckysheetfile()); - - msTable_files[0].celldata = celldata; - msTable_files[0].row = luckysheet.flowdata.length; - msTable_files[0].column = luckysheet.flowdata[0].length; - - delete msTable_files[0].data; - - luckysheetConfigsetting.pointEditUpdate(msTable_files); - } - - luckysheet.dataToCelldata = function(data){ - var celldata = []; - - for(var r = 0; r < data.length; r++){ - for(var c = 0; c < data[0].length; c++){ - var cell = data[r][c]; - - if(cell != null){ - var obj = { - "r": r, - "c": c, - "v": cell - } - - celldata.push(obj); - } - } - } - - return celldata; - } - - luckysheet.jfrefreshgridall = function (colwidth, rowheight, data, cfg, range, ctrlType, ctrlValue, cdformat, changeSize) { - var redo = {}; - - if (ctrlType == "cellRowChange") { - redo["type"] = "cellRowChange"; - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = $.extend(true, {}, cfg); - - redo["range"] = $.extend(true, [], luckysheet_select_save); - redo["currange"] = range; - - redo["ctrlType"] = ctrlType; - redo["ctrlValue"] = ctrlValue; - - var setfield = cfg["rowlen"]; - - if(setfield == null){ - setfield = {}; - } - - luckysheet.server.saveParam("cg", luckysheet.currentSheetIndex, setfield, { "k": "rowlen" }); - } - else if (ctrlType.indexOf("extend")>-1) { - redo["type"] = "extend"; - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = $.extend(true, {}, cfg); - - redo["range"] = $.extend(true, [], luckysheet_select_save); - redo["currange"] = range; - - redo["ctrlType"] = ctrlType; - redo["ctrlValue"] = ctrlValue; - - luckysheet.server.saveParam("arc", luckysheet.currentSheetIndex, {"index": ctrlValue.index, "len": ctrlValue.len, "direction": ctrlValue.direction, "mc": cfg.merge }, { "rc": ctrlValue.type }); - } - else if (ctrlType.indexOf("dele")>-1) { - redo["type"] = "dele"; - redo["config"] = $.extend(true, {}, config); - redo["curconfig"] = $.extend(true, {}, cfg); - - redo["range"] = $.extend(true, [], luckysheet_select_save); - redo["currange"] = range; - - redo["ctrlType"] = ctrlType; - redo["ctrlValue"] = ctrlValue; - - luckysheet.server.saveParam("drc", luckysheet.currentSheetIndex, {"index": ctrlValue.index, "len":ctrlValue.len, "mc": cfg.merge, "borderInfo": cfg.borderInfo }, { "rc": ctrlValue.type}); - } - else { - //单元格数据更新联动 - luckysheet.formula.execFunctionExist = []; - for(var s = 0; s < range.length; s++){ - for(var r = range[s].row[0]; r <= range[s].row[1]; r++){ - for(var c = range[s].column[0]; c <= range[s].column[1]; c++){ - luckysheet.formula.execFunctionExist.push({ "r": r, "c": c, "i": luckysheet.currentSheetIndex }); - } - } - } - luckysheet.formula.execFunctionExist.reverse(); - luckysheet.formula.execFunctionGroup(null, null, null, null, data); - luckysheet.formula.execFunctionGroupData = null; - - redo["type"] = "datachangeAll"; - - redo["range"] = $.extend(true, [], luckysheet_select_save); - redo["currange"] = range; - - redo["ctrlType"] = ctrlType; - redo["ctrlValue"] = ctrlValue; - - for(var s = 0; s < range.length; s++){ - luckysheet.server.historyParam(data, luckysheet.currentSheetIndex, range[s]); - } - } - - if (clearjfundo) { - luckysheet.jfundo = []; - - redo["data"] = luckysheet.flowdata; - redo["curdata"] = data; - redo["sheetIndex"] = luckysheet.currentSheetIndex; - - redo["cdformat"] = $.extend(true, [], luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"]); - redo["curCdformat"] = cdformat; - - luckysheet.jfredo.push(redo); - } - - //luckysheet.flowdata - luckysheet.flowdata = data; - luckysheet.editor.webWorkerFlowDataCache(data);//worker存数据 - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = luckysheet.flowdata; - - //config - if (cfg != null) { - config = cfg; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].config = config; - - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, cfg, { "k": "config" }); - } - - //条件格式 - if(cdformat != null){ - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["luckysheet_conditionformat_save"] = cdformat; - - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, cdformat, { "k": "luckysheet_conditionformat_save" }); - } - - //选区 - luckysheet_select_save = $.extend(true, [], range); - if(luckysheet_select_save.length > 0){ - //有选区时,刷新一下选区 - luckysheet.selectHightlightShow(); - } - - //行高、列宽 刷新 - luckysheet.jfrefreshgrid_rhcw(rowheight, colwidth); - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - luckysheet.sheetmanage.storeSheetParamALL(); - - if (cfg == null) { - for(var s = 0; s < range.length; s++){ - luckysheet.jfrefreshchartall(luckysheet.flowdata, range[s].row[0], range[s].row[1], range[s].column[0], range[s].column[1]); - } - } - - window.luckysheet_getcelldata_cache = null; - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - - //删除、增加行列 刷新表格 - luckysheet.jfrefreshgrid_adRC = function(data, cfg, ctrlType, ctrlValue, calc, filterObj, cf, af, freezen){ - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - //merge改变对应的单元格值改变 - var mcData = []; - for(var m in cfg["merge"]){ - var mc = cfg["merge"][m]; - - for(var r = mc.r; r <= mc.r + mc.rs - 1; r++){ - for(var c = mc.c; c <= mc.c + mc.cs - 1; c++){ - if(data[r][c] == null){ - data[r][c] = {}; - } - - if(r == mc.r && c == mc.c){ - data[r][c].mc = mc; - } - else{ - data[r][c].mc = { "r": mc.r, "c": mc.c }; - } - - mcData.push({ "r": r, "c": c }); - } - } - } - - //公式链中公式范围改变对应单元格值的改变 - var funcData = []; - if(calc.length > 0){ - luckysheet.formula.execFunctionGroupData = data; - - for(var i = 0; i < calc.length; i++){ - var clc = calc[i]; - var clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = clc.func[2]; - var clc_result = luckysheet.formula.execfunction(clc_funcStr, clc_r, clc_c, null, true); - clc.func = clc_result; - - if(data[clc_r][clc_c].f == clc_funcStr){ - luckysheet.setcellvalue(clc_r, clc_c, data, clc_result[1]); - funcData.push({ "r": clc_r, "c": clc_c }); - } - } - } - - if(clearjfundo){ - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": ctrlType, - "sheetIndex": luckysheet.currentSheetIndex, - "data": luckysheet.flowdata, - "curData": data, - "config": $.extend(true, {}, config), - "curConfig": cfg, - "ctrlValue": ctrlValue, - "mcData": mcData, - "calc": $.extend(true, [], file.calcChain), - "curCalc": calc, - "funcData": funcData, - "filterObj": { "filter_select": $.extend(true, {}, file.filter_select), "filter": $.extend(true, {}, file.filter) }, - "curFilterObj": filterObj, - "cf": $.extend(true, [], file.luckysheet_conditionformat_save), - "curCf": cf, - "af": $.extend(true, [], file.luckysheet_alternateformat_save), - "curAf": af, - "freezen": { "freezenhorizontaldata": luckysheet.freezen.freezenhorizontaldata, "freezenverticaldata": luckysheet.freezen.freezenverticaldata }, - "curFreezen": freezen - }); - } - - var index = ctrlValue.index, - len = ctrlValue.len, - rc = ctrlValue.rc; - - if(ctrlType == "addRC"){ - var direction = ctrlValue.direction, - restore = ctrlValue.restore; - - var addData = []; - if(restore){ - if(rc == "r"){ - if(direction == "lefttop"){ - var st_r = index; - } - else if(direction == "rightbottom"){ - var st_r = index + 1; - } - var ed_r = st_r + len - 1; - - for(var r = st_r; r <= ed_r; r++){ - var row = []; - for(var c = 0; c < data[0].length; c++){ - var cell = data[r][c]; - row.push(cell); - } - addData.push(row); - } - } - else if(rc == "c"){ - if(direction == "lefttop"){ - var st_c = index; - } - else if(direction == "rightbottom"){ - var st_c = index + 1; - } - var ed_c = st_c + len - 1; - - for(var r = 0; r < data.length; r++){ - var row = []; - for(var c = st_c; c <= ed_c; c++){ - var cell = data[r][c]; - row.push(cell); - } - addData.push(row); - } - } - } - - luckysheet.server.saveParam("arc", luckysheet.currentSheetIndex, {"index": index, "len": len, "direction": direction, "data": addData }, { "rc": rc }); - } - else if(ctrlType == "delRC"){ - luckysheet.server.saveParam("drc", luckysheet.currentSheetIndex, {"index": index, "len": len }, { "rc": rc }); - } - - //luckysheet.flowdata - luckysheet.flowdata = data; - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - file.data = data; - - //config - config = cfg; - file.config = config; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, cfg, { "k": "config" }); - - //mcData - for(var i = 0; i < mcData.length; i++){ - var mcData_r = mcData[i].r, - mcData_c = mcData[i].c; - - luckysheet.server.saveParam("v", luckysheet.currentSheetIndex, luckysheet.flowdata[mcData_r][mcData_c], { "r": mcData_r, "c": mcData_c }); - } - - //calc函数链 - file.calcChain = calc; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, calc, { "k": "calcChain" }); - for(var i = 0; i < funcData.length; i++){ - var funcData_r = funcData[i].r, - funcData_c = funcData[i].c; - - luckysheet.server.saveParam("v", luckysheet.currentSheetIndex, luckysheet.flowdata[funcData_r][funcData_c], { "r": funcData_r, "c": funcData_c }); - } - - //筛选配置 - if(filterObj != null){ - file.filter_select = filterObj.filter_select; - file.filter = filterObj.filter; - } - else{ - file.filter_select = null; - file.filter = null; - } - luckysheet.createFilterOptions(file.filter_select, file.filter); - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file.filter_select, { "k": "filter_select" }); - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file.filter, { "k": "filter" }); - - //条件格式配置 - file.luckysheet_conditionformat_save = cf; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file.luckysheet_conditionformat_save, { "k": "luckysheet_conditionformat_save" }); - - //交替颜色配置 - file.luckysheet_alternateformat_save = af; - luckysheet.server.saveParam("all", luckysheet.currentSheetIndex, file.luckysheet_alternateformat_save, { "k": "luckysheet_alternateformat_save" }); - - //冻结配置 - if(freezen != null){ - luckysheet.freezen.freezenhorizontaldata = freezen.freezenhorizontaldata; - luckysheet.freezen.freezenverticaldata = freezen.freezenverticaldata; - } - else{ - luckysheet.freezen.freezenhorizontaldata = null; - luckysheet.freezen.freezenverticaldata = null; - } - - //行高、列宽刷新 - luckysheet.jfrefreshgrid_rhcw(luckysheet.flowdata.length, luckysheet.flowdata[0].length); - } - - //行高、列宽改变 刷新表格 - luckysheet.jfrefreshgrid_rhcw = function(rowheight, colwidth){ - //行高 - if(rowheight != null){ - visibledatarow = []; - rh_height = 0; - - for (var i = 0; i < rowheight; i++) { - var rowlen = defaultrowlen; - - if (config["rowlen"] != null && config["rowlen"][i] != null) { - rowlen = config["rowlen"][i]; - } - - if (config["rowhidden"] != null && config["rowhidden"][i] != null) { - rowlen = config["rowhidden"][i]; - visibledatarow.push(rh_height); - continue; - } - else { - rh_height += rowlen + 1; - } - - visibledatarow.push(rh_height); //行的临时长度分布 - } - - if(!luckysheetConfigsetting.pointEdit){ - //非编辑器qksheet表格编辑状态 - rh_height += 110; - } - } - - //列宽 - if(colwidth != null){ - visibledatacolumn = []; - ch_width = 0; - - var maxColumlen = 120; - - for (var i = 0; i < colwidth; i++) { - var firstcolumlen = defaultcollen; - - if (config["columlen"] != null && config["columlen"][i] != null) { - firstcolumlen = config["columlen"][i]; - } - else { - if (luckysheet.flowdata[0] != null && luckysheet.flowdata[0][i] != null) { - if (firstcolumlen > 300) { - firstcolumlen = 300; - } - else if (firstcolumlen < defaultcollen) { - firstcolumlen = defaultcollen; - } - - if (firstcolumlen != defaultcollen) { - if (config["columlen"] == null) { - config["columlen"] = {}; - } - - config["columlen"][i] = firstcolumlen; - } - } - } - - ch_width += firstcolumlen + 1; - - visibledatacolumn.push(ch_width);//列的临时长度分布 - - if(maxColumlen < firstcolumlen + 1){ - maxColumlen = firstcolumlen + 1; - } - } - - if(!luckysheetConfigsetting.pointEdit){ - //非编辑器qksheet表格编辑状态 - // ch_width += 120; - ch_width += maxColumlen; - } - } - - luckysheet.sheetmanage.storeSheetParam(); - - //行高列宽改变时 重新计算sparklines - var calcChain = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].calcChain; - - if(calcChain != null && calcChain.length > 0){ - if(config["rowlen"] == null){ - config["rowlen"] = {}; - } - - if(config["columlen"] == null){ - config["columlen"] = {}; - } - - for(var i = 0; i < calcChain.length; i++){ - var r = calcChain[i].r, c = calcChain[i].c, index = calcChain[i].index; - - if(index == luckysheet.currentSheetIndex && luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].spl != null && ((r in config["rowlen"]) || (c in config["columlen"]))){ - window.luckysheetCurrentRow = r; - window.luckysheetCurrentColumn = c; - window.luckysheetCurrentFunction = luckysheet.flowdata[r][c].f; - - var fp = $.trim(luckysheet.formula.functionParser(luckysheet.flowdata[r][c].f)); - var sparklines = eval(fp); - luckysheet.flowdata[r][c].spl = sparklines; - - luckysheet.server.saveParam("v", luckysheet.currentSheetIndex, luckysheet.flowdata[r][c], { "r": r, "c": c }); - } - } - - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = luckysheet.flowdata; - } - - //批注框同步 - luckysheet.postil.positionSync(); - - //选区同步 - luckysheet.selectHightlightShow(); - - //改变单元格行高,复制虚线框同步 - if($(".luckysheet-selection-copy").is(":visible")){ - luckysheet.selectionCopyShow(); - } - - //改变单元格行高,选区下拉icon隐藏 - if($("#luckysheet-dropCell-icon").is(":visible")){ - $("#luckysheet-dropCell-icon").remove(); - } - - //有冻结状态时,同步行高、列宽 - if(luckysheet.freezen.freezenhorizontaldata != null && luckysheet.freezen.freezenverticaldata != null){ - var row_st = luckysheet.freezen.freezenhorizontaldata[1] - 1; - var col_st = luckysheet.freezen.freezenverticaldata[1] - 1; - - var scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - var scrollLeft = luckysheet.freezen.freezenverticaldata[2]; - - var top = visibledatarow[row_st] - 2 - scrollTop + columeHeaderHeight; - var freezenhorizontaldata = [visibledatarow[row_st], row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_st + 1), top]; - var left = visibledatacolumn[col_st] - 2 - scrollLeft + rowHeaderWidth; - var freezenverticaldata = [visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_st + 1), left]; - - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, freezenverticaldata, left); - luckysheet.freezen.createFreezenHorizontal(freezenhorizontaldata, top); - luckysheet.freezen.createFreezenVertical(freezenverticaldata, left); - luckysheet.freezen.createAssistCanvas(); - } - else if(luckysheet.freezen.freezenhorizontaldata != null){ - var row_st = luckysheet.freezen.freezenhorizontaldata[1] - 1; - var scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - - var top = visibledatarow[row_st] - 2 - scrollTop + columeHeaderHeight; - var freezenhorizontaldata = [visibledatarow[row_st], row_st + 1, scrollTop, luckysheet.freezen.cutVolumn(visibledatarow, row_st + 1), top]; - - luckysheet.freezen.saveFreezen(freezenhorizontaldata, top, null, null); - luckysheet.freezen.createFreezenHorizontal(freezenhorizontaldata, top); - luckysheet.freezen.createAssistCanvas(); - } - else if(luckysheet.freezen.freezenverticaldata != null){ - var col_st = luckysheet.freezen.freezenverticaldata[1] - 1; - var scrollLeft = luckysheet.freezen.freezenverticaldata[2]; - - var left = visibledatacolumn[col_st] - 2 - scrollLeft + rowHeaderWidth; - var freezenverticaldata = [visibledatacolumn[col_st], col_st + 1, scrollLeft, luckysheet.freezen.cutVolumn(visibledatacolumn, col_st + 1), left]; - - luckysheet.freezen.saveFreezen(null, null, freezenverticaldata, left); - luckysheet.freezen.createFreezenVertical(freezenverticaldata, left); - luckysheet.freezen.createAssistCanvas(); - } - else{ - //有筛选标志时,同步筛选按钮和筛选范围位置 - if($("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").length > 0){ - $("#luckysheet-filter-options-sheet" + luckysheet.currentSheetIndex + " .luckysheet-filter-options").each(function(i, e){ - var str = $(e).data("str"), cindex = $(e).data("cindex"); - - var left = visibledatacolumn[cindex] - 20; - var top = str - 1 == -1 ? 0 : visibledatarow[str - 1]; - - $(e).css({ "left": left, "top": top }); - }); - } - } - - if($("#luckysheet-filter-selected-sheet" + luckysheet.currentSheetIndex).length > 0){ - var luckysheet_filter_save = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].filter_select; - - var r1 = luckysheet_filter_save.row[0], r2 = luckysheet_filter_save.row[1]; - var c1 = luckysheet_filter_save.column[0], c2 = luckysheet_filter_save.column[1]; - - var row = visibledatarow[r2], row_pre = r1 - 1 == -1 ? 0 : visibledatarow[r1 - 1]; - var col = visibledatacolumn[c2], col_pre = c1 - 1 == -1 ? 0 : visibledatacolumn[c1 - 1]; - - $("#luckysheet-filter-selected-sheet" + luckysheet.currentSheetIndex).css({ - "left": col_pre, - "width": col - col_pre - 1, - "top": row_pre, - "height": row - row_pre - 1 - }); - } - - luckysheet.sheetmanage.showSheet(); - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - - //复制剪切 刷新表格 - luckysheet.jfrefreshgrid_pastcut = function(source, target, RowlChange){ - //单元格数据更新联动 - var execF_rc = {}; - luckysheet.formula.execFunctionExist = []; - - for(var r = source["range"].row[0]; r <= source["range"].row[1]; r++){ - for(var c = source["range"].column[0]; c <= source["range"].column[1]; c++){ - if((r + "_" + c + "_" + source["sheetIndex"]) in execF_rc){ - continue; - } - - execF_rc[r + "_" + c + "_" + source["sheetIndex"]] = 0; - luckysheet.formula.execFunctionExist.push({ "r": r, "c": c, "i": source["sheetIndex"] }); - } - } - - for(var r = target["range"].row[0]; r <= target["range"].row[1]; r++){ - for(var c = target["range"].column[0]; c <= target["range"].column[1]; c++){ - if((r + "_" + c + "_" + target["sheetIndex"]) in execF_rc){ - continue; - } - - execF_rc[r + "_" + c + "_" + target["sheetIndex"]] = 0; - luckysheet.formula.execFunctionExist.push({ "r": r, "c": c, "i": target["sheetIndex"] }); - } - } - - luckysheet.formula.execFunctionExist.reverse(); - luckysheet.formula.execFunctionGroup(null, null, null, null, target["curData"]); - luckysheet.formula.execFunctionGroupData = null; - - if(clearjfundo){ - luckysheet.jfundo = []; - - luckysheet.jfredo.push({ - "type": "pasteCut", - "source": source, - "target": target, - "RowlChange": RowlChange - }) - } - - //config - if(luckysheet.currentSheetIndex == source["sheetIndex"]){ - config = source["curConfig"]; - var rowHeight = source["curData"].length; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(target["sheetIndex"])]["config"] = target["curConfig"]; - } - else if(luckysheet.currentSheetIndex == target["sheetIndex"]){ - config = target["curConfig"]; - var rowHeight = target["curData"].length; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(source["sheetIndex"])]["config"] = source["curConfig"]; - } - - if(RowlChange){ - visibledatarow = []; - rh_height = 0; - for (var i = 0; i < rowHeight; i++) { - var rowlen = defaultrowlen; - if (config["rowlen"] != null && config["rowlen"][i] != null) { - rowlen = config["rowlen"][i]; - } - if (config["rowhidden"] != null && config["rowhidden"][i] != null) { - rowlen = config["rowhidden"][i]; - visibledatarow.push(rh_height); - continue; - } - else { - rh_height += rowlen + 1; - } - visibledatarow.push(rh_height);//行的临时长度分布 - } - rh_height += 110; - luckysheet.sheetmanage.showSheet(); - - if(luckysheet.currentSheetIndex == source["sheetIndex"]){ - var rowlenArr = luckysheet.computeRowlenArr(target["curData"].length, target["curConfig"]); - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(target["sheetIndex"])]["visibledatarow"] = rowlenArr; - } - else if(luckysheet.currentSheetIndex == target["sheetIndex"]){ - var rowlenArr = luckysheet.computeRowlenArr(source["curData"].length, source["curConfig"]); - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(source["sheetIndex"])]["visibledatarow"] = rowlenArr; - } - } - - //luckysheet.flowdata - if(luckysheet.currentSheetIndex == source["sheetIndex"]){ - luckysheet.flowdata = source["curData"]; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(target["sheetIndex"])]["data"] = target["curData"]; - } - else if(luckysheet.currentSheetIndex == target["sheetIndex"]){ - luckysheet.flowdata = target["curData"]; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(source["sheetIndex"])]["data"] = source["curData"]; - } - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)].data = luckysheet.flowdata; - - //luckysheet_select_save - if(luckysheet.currentSheetIndex == target["sheetIndex"]){ - luckysheet_select_save = [{"row": target["range"].row, "column": target["range"].column}]; - } - else{ - luckysheet_select_save = [{"row": source["range"].row, "column": source["range"].column}]; - } - if(luckysheet_select_save.length > 0){ - //有选区时,刷新一下选区 - luckysheet.selectHightlightShow(); - } - - //条件格式 - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(source["sheetIndex"])].luckysheet_conditionformat_save = source["curCdformat"]; - luckysheetfile[luckysheet.sheetmanage.getSheetIndex(target["sheetIndex"])].luckysheet_conditionformat_save = target["curCdformat"]; - - setTimeout(function () { - luckysheet.luckysheetrefreshgrid(); - }, 1); - - luckysheet.sheetmanage.storeSheetParamALL(); - - luckysheet.jfrefreshchartall(luckysheet.flowdata, 0, luckysheet.flowdata.length - 1, 0, luckysheet.flowdata[0].length - 1); - - //saveparam - //来源表 - luckysheet.server.saveParam("all", source["sheetIndex"], source["curConfig"], { "k": "config" }); - //目的表 - luckysheet.server.saveParam("all", target["sheetIndex"], target["curConfig"], { "k": "config" }); - - //来源表 - luckysheet.server.historyParam(source["curData"], source["sheetIndex"], {"row": source["range"]["row"], "column": source["range"]["column"]}); - //目的表 - luckysheet.server.historyParam(target["curData"], target["sheetIndex"], {"row": target["range"]["row"], "column": target["range"]["column"]}); - - //编辑器qksheet表格编辑时 - if(luckysheetConfigsetting.pointEdit){ - luckysheet.pointEdit_updateData(); - } - } - - luckysheet.luckysheetcreatesheet = function (colwidth, rowheight, data, cfg, active) { - if(active == null){ - active = true; - } - - visibledatarow = []; - visibledatacolumn = []; - rowsplit = []; - colsplit = []; - ch_width = 0; - rh_height = 0; - - if(cfg != null){ - config = cfg; - } - else{ - config = {}; - } - - if (data.length == 0) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, rowheight, colwidth); - } - else if (data.length < rowheight && data[0].length < colwidth) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, rowheight - data.length, colwidth - data[0].length); - } - else if (data.length < rowheight) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, rowheight - data.length, 0); - } - else if (data[0].length < colwidth) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, 0, colwidth - data[0].length); - } - else { - luckysheet.flowdata = data; - } - - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - - var flowHTML = flow; - for (var i = 0; i < colwidth; i++) { - var firstcolumlen = defaultcollen; - if (config["columlen"] != null && config["columlen"][i] != null) { - firstcolumlen = config["columlen"][i]; - } - else { - if (data[0] != null && data[0][i] != null) { - firstcolumlen = Math.ceil(luckysheet.getByteLen(data[0][i]) * 11.5); - if (firstcolumlen > 300) { - firstcolumlen = 300; - } - else if (firstcolumlen < defaultcollen) { - firstcolumlen = defaultcollen; - } - - if (firstcolumlen != defaultcollen) { - if (config["columlen"] == null) { - config["columlen"] = {}; - } - config["columlen"][i] = firstcolumlen; - } - } - } - ch_width += firstcolumlen + 1; - visibledatacolumn.push(ch_width); //列的临时长度分布 - } - - for (var i = 0; i < rowheight; i++) { - var rowlen = defaultrowlen; - if (config["rowlen"] != null && config["rowlen"][i] != null) { - rowlen = config["rowlen"][i]; - } - if (config["rowhidden"] != null && config["rowhidden"][i] != null) { - rowlen = config["rowhidden"][i]; - visibledatarow.push(rh_height); - continue; - } - else { - rh_height += rowlen + 1; - } - visibledatarow.push(rh_height); //行的临时长度分布 - } - - - rh_height+= 110; - ch_width+= 120; - - - if(active){ - luckysheet.sheetmanage.showSheet(); - - setTimeout(function () { - luckysheet.sheetmanage.restoreCache(); - luckysheet.formula.execFunctionGroup(); - luckysheet.sheetmanage.restoreSheetAll(luckysheet.currentSheetIndex); - luckysheet.luckysheetrefreshgrid(); - }, 1); - } - else{ - - } - - // setTimeout(function () { - // for (var i = 0; i < refreshcanvas.length; i++) { - // refreshcanvas[i].stroke(); - // } - // }, 1); - } - - - //按照scrollHeight, scrollWidth刷新canvas展示数据 - luckysheet.luckysheetrefreshgrid = function (scrollWidth, scrollHeight) { - luckysheet.formula.groupValuesRefresh(); - - if (scrollWidth == null) { - scrollWidth = $("#luckysheet-cell-main").scrollLeft(); - } - if (scrollHeight == null) { - scrollHeight = $("#luckysheet-cell-main").scrollTop(); - } - - if (luckysheet.freezen.freezenverticaldata != null || luckysheet.freezen.freezenhorizontaldata != null) { - var freezen_horizon_px, freezen_horizon_ed, freezen_horizon_scrollTop; - var freezen_vertical_px, freezen_vertical_ed, freezen_vertical_scrollTop; - var drawWidth = luckysheetTableContentHW[0], drawHeight = luckysheetTableContentHW[1]; - - if (luckysheet.freezen.freezenverticaldata != null && luckysheet.freezen.freezenhorizontaldata != null) { - freezen_horizon_px = luckysheet.freezen.freezenhorizontaldata[0]; - freezen_horizon_ed = luckysheet.freezen.freezenhorizontaldata[1]; - freezen_horizon_scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - - freezen_vertical_px = luckysheet.freezen.freezenverticaldata[0]; - freezen_vertical_ed = luckysheet.freezen.freezenverticaldata[1]; - freezen_vertical_scrollTop = luckysheet.freezen.freezenverticaldata[2]; - - //左上canvas freezen_3 - luckysheetDrawMain( - freezen_vertical_scrollTop, - freezen_horizon_scrollTop, - freezen_vertical_px, - freezen_horizon_px, - 1, - 1, - null, - null, - "freezen_3" - ); - - //上右canvas freezen_4 - luckysheetDrawMain( - scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, - freezen_horizon_scrollTop, - drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, - freezen_horizon_px, - 1, - 1, - null, - null, - "freezen_4" - ); - - //左下canvas freezen_7 - luckysheetDrawMain( - freezen_vertical_scrollTop, - scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, - freezen_vertical_px, - drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, - 1, - 1, - null, - null, - "freezen_7" - ); - - //右下canvas luckysheetTableContent - luckysheetDrawMain( - scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, - scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, - drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, - drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, - freezen_vertical_px - freezen_vertical_scrollTop + rowHeaderWidth, - freezen_horizon_px - freezen_horizon_scrollTop + columeHeaderHeight - ); - - //标题 - luckysheetDrawgridColumnTitle( - scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, - drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, - freezen_vertical_px - freezen_vertical_scrollTop + rowHeaderWidth - ); - luckysheetDrawgridColumnTitle(freezen_vertical_scrollTop, freezen_vertical_px, rowHeaderWidth); - - luckysheetDrawgridRowTitle( - scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, - drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, - freezen_horizon_px - freezen_horizon_scrollTop + columeHeaderHeight - ); - luckysheetDrawgridRowTitle(freezen_horizon_scrollTop, freezen_horizon_px, columeHeaderHeight); - } - else if (luckysheet.freezen.freezenhorizontaldata != null) { - freezen_horizon_px = luckysheet.freezen.freezenhorizontaldata[0]; - freezen_horizon_ed = luckysheet.freezen.freezenhorizontaldata[1]; - freezen_horizon_scrollTop = luckysheet.freezen.freezenhorizontaldata[2]; - - luckysheetDrawMain( - scrollWidth, - freezen_horizon_scrollTop, - drawWidth, - freezen_horizon_px, - 1, - 1, - null, - null, - "freezen_h" - ); - luckysheetDrawMain( - scrollWidth, - scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, - drawWidth, - drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, - null, - freezen_horizon_px - freezen_horizon_scrollTop + columeHeaderHeight - ); - - luckysheetDrawgridColumnTitle(scrollWidth, drawWidth, null); - - luckysheetDrawgridRowTitle( - scrollHeight + freezen_horizon_px - freezen_horizon_scrollTop, - drawHeight - freezen_horizon_px + freezen_horizon_scrollTop, - freezen_horizon_px - freezen_horizon_scrollTop + columeHeaderHeight - ); - luckysheetDrawgridRowTitle(freezen_horizon_scrollTop, freezen_horizon_px, columeHeaderHeight); - } - else if (luckysheet.freezen.freezenverticaldata != null) { - freezen_vertical_px = luckysheet.freezen.freezenverticaldata[0]; - freezen_vertical_ed = luckysheet.freezen.freezenverticaldata[1]; - freezen_vertical_scrollTop = luckysheet.freezen.freezenverticaldata[2]; - - luckysheetDrawMain( - freezen_vertical_scrollTop, - scrollHeight, - freezen_vertical_px, - drawHeight, - 1, - 1, - null, - null, - "freezen_v" - ); - luckysheetDrawMain( - scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, - scrollHeight, - drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, - drawHeight, - freezen_vertical_px - freezen_vertical_scrollTop + rowHeaderWidth, - null - ); - - luckysheetDrawgridRowTitle(scrollHeight, drawHeight, null); - - luckysheetDrawgridColumnTitle( - scrollWidth + freezen_vertical_px - freezen_vertical_scrollTop, - drawWidth - freezen_vertical_px + freezen_vertical_scrollTop, - freezen_vertical_px - freezen_vertical_scrollTop + rowHeaderWidth - ); - luckysheetDrawgridColumnTitle(freezen_vertical_scrollTop, freezen_vertical_px, rowHeaderWidth); - } - } - else { - luckysheetDrawgrid(scrollWidth, scrollHeight); - } - } - - function luckysheetDrawgrid(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop) { - if($("#luckysheetTableContent").length == 0){ - return; - } - - if(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["isPivotTable"]){ - luckysheetDrawMain_back(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop); - } - else{ - luckysheetDrawMain(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop); - } - - $("#luckysheetTableContent").get(0).getContext("2d").clearRect(0, 0, 46, 20); - - luckysheetDrawgridColumnTitle(scrollWidth, drawWidth, offsetLeft); - luckysheetDrawgridRowTitle(scrollHeight, drawHeight, offsetTop); - } - - function luckysheetDrawgridRowTitle(scrollHeight, drawHeight, offsetTop) { - if (scrollHeight == null) { - scrollHeight = $("#luckysheet-cell-main").scrollTop(); - } - - if (drawHeight == null) { - drawHeight = luckysheetTableContentHW[1]; - } - - if (offsetTop == null) { - offsetTop = columeHeaderHeight; - } - - var luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - luckysheetTableContent.clearRect( - 0, - offsetTop * devicePixelRatio, - (rowHeaderWidth - 1) * devicePixelRatio, - drawHeight * devicePixelRatio - ); - - luckysheetTableContent.font = luckysheetdefaultstyle.font; - luckysheetTableContent.textBaseline = luckysheetdefaultstyle.textBaseline; - luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; - - var dataset_row_st, dataset_row_ed; - dataset_row_st = luckysheet_searcharray(visibledatarow, scrollHeight); - dataset_row_ed = luckysheet_searcharray(visibledatarow, scrollHeight + drawHeight); - - if (dataset_row_st == -1) { - dataset_row_st = 0; - } - if (dataset_row_ed == -1) { - dataset_row_ed = visibledatarow.length - 1; - } - - var end_r, start_r; - - for (var r = dataset_row_st; r <= dataset_row_ed; r++) { - if (r == 0) { - start_r = -scrollHeight - 1; - } - else { - start_r = visibledatarow[r - 1] - scrollHeight - 1; - } - end_r = visibledatarow[r] - scrollHeight; - - //若超出绘制区域终止 - if(end_r > scrollHeight + drawHeight){ - break; - } - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - - } - else { - //行标题栏序列号 - var textMetrics = luckysheetTableContent.measureText(r + 1); - - var horizonAlignPos = (rowHeaderWidth * devicePixelRatio - textMetrics.width) / 2; - var verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop) * devicePixelRatio; - - luckysheetTableContent.fillText(r + 1, horizonAlignPos, verticalAlignPos); - } - - //行标题栏横线 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - -1, - (end_r + offsetTop - 2 + 0.5) * devicePixelRatio - ); - luckysheetTableContent.lineTo( - (rowHeaderWidth - 1) * devicePixelRatio, - (end_r + offsetTop - 2 + 0.5) * devicePixelRatio - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - //行标题栏竖线 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - (rowHeaderWidth - 2 + 0.5) * devicePixelRatio, - (offsetTop - 1) * devicePixelRatio - ); - luckysheetTableContent.lineTo( - (rowHeaderWidth - 2 + 0.5) * devicePixelRatio, - (rh_height + offsetTop) * devicePixelRatio - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - - //清除canvas左上角区域 防止列标题栏序列号溢出显示 - luckysheetTableContent.clearRect(0, 0, rowHeaderWidth * devicePixelRatio, columeHeaderHeight * devicePixelRatio); - } - - function luckysheetDrawgridColumnTitle(scrollWidth, drawWidth, offsetLeft) { - if (scrollWidth == null) { - scrollWidth = $("#luckysheet-cell-main").scrollLeft(); - } - - if (drawWidth == null) { - drawWidth = luckysheetTableContentHW[0]; - } - - if (offsetLeft == null) { - offsetLeft = rowHeaderWidth; - } - - var luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - luckysheetTableContent.clearRect( - offsetLeft * devicePixelRatio, - -0.5, - drawWidth * devicePixelRatio, - (columeHeaderHeight - 1.5) * devicePixelRatio - ); - - - luckysheetTableContent.font = luckysheetdefaultstyle.font; - luckysheetTableContent.textBaseline = luckysheetdefaultstyle.textBaseline; - luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; - - var dataset_col_st, dataset_col_ed; - dataset_col_st = luckysheet_searcharray(visibledatacolumn, scrollWidth); - dataset_col_ed = luckysheet_searcharray(visibledatacolumn, scrollWidth + drawWidth); - - if (dataset_col_st == -1) { - dataset_col_st = 0; - } - if (dataset_col_ed == -1) { - dataset_col_ed = visibledatacolumn.length - 1; - } - - var end_c, start_c; - - for (var c = dataset_col_st; c <= dataset_col_ed; c++) { - if (c == 0) { - start_c = -scrollWidth; - } - else { - start_c = visibledatacolumn[c - 1] - scrollWidth; - } - end_c = visibledatacolumn[c] - scrollWidth; - - //若超出绘制区域终止 - if(end_c > scrollWidth + drawWidth){ - break; - } - - //列标题栏序列号 - var abc = luckysheet.luckysheetchatatABC(c); - var textMetrics = luckysheetTableContent.measureText(abc); - - var horizonAlignPos = Math.round((start_c + (end_c - start_c) / 2 + offsetLeft) * devicePixelRatio - textMetrics.width / 2); - var verticalAlignPos = Math.round(columeHeaderHeight / 2 * devicePixelRatio); - - luckysheetTableContent.fillText(abc, horizonAlignPos, verticalAlignPos); - - //列标题栏竖线 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - (end_c + offsetLeft - 2 + 0.5) * devicePixelRatio, - 0.5 - ); - luckysheetTableContent.lineTo( - (end_c + offsetLeft - 2 + 0.5) * devicePixelRatio, - (columeHeaderHeight - 2) * devicePixelRatio - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - //列标题栏横线 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - (offsetLeft - 1) * devicePixelRatio, - (columeHeaderHeight - 2 + 0.5) * devicePixelRatio - ); - luckysheetTableContent.lineTo( - (ch_width + offsetLeft - 2) * devicePixelRatio, - (columeHeaderHeight - 2 + 0.5) * devicePixelRatio - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - //清除canvas左上角区域 防止列标题栏序列号溢出显示 - luckysheetTableContent.clearRect(0, 0, rowHeaderWidth * devicePixelRatio, columeHeaderHeight * devicePixelRatio); - } - - function luckysheetDrawMain(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop, columnOffsetCell, rowOffsetCell, mycanvas, ctx, ctxdata) { - if(ctxdata != null){ - luckysheet.flowdata = ctxdata; - } - - if(luckysheet.flowdata == null){ - return; - } - - if (scrollWidth == null) { - scrollWidth = $("#luckysheet-cell-main").scrollLeft(); - } - if (scrollHeight == null) { - scrollHeight = $("#luckysheet-cell-main").scrollTop(); - } - - if (drawWidth == null) { - drawWidth = luckysheetTableContentHW[0]; - } - if (drawHeight == null) { - drawHeight = luckysheetTableContentHW[1]; - } - - if (offsetLeft == null) { - offsetLeft = rowHeaderWidth; - } - if (offsetTop == null) { - offsetTop = columeHeaderHeight; - } - - if (columnOffsetCell == null) { - columnOffsetCell = 0; - } - if (rowOffsetCell == null) { - rowOffsetCell = 0; - } - - var luckysheetTableContent = null; - if(ctx != null){ - var luckysheetTableElement = document.createElement('canvas'); - luckysheetTableElement.width = drawWidth; - luckysheetTableElement.height = drawHeight; - luckysheetTableContent = luckysheetTableElement.getContext("2d"); - } - else{ - if(mycanvas == null){ - luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - } - else { - if(luckysheet.getObjType(mycanvas) == "object"){ - try{ - luckysheetTableContent = mycanvas.get(0).getContext("2d"); - } - catch(err){ - luckysheetTableContent = mycanvas; - } - } - else{ - luckysheetTableContent = $("#" + mycanvas).get(0).getContext("2d"); - } - } - } - - luckysheetTableContent.clearRect( - 0, - 0, - luckysheetTableContentHW[0] * devicePixelRatio, - luckysheetTableContentHW[1] * devicePixelRatio - ); - - //离屏canvas - var offlinecanvas = null; - if(ctx != null){ - var offlineElement = document.createElement('canvas'); - offlineElement.width = drawWidth; - offlineElement.height = drawHeight; - offlinecanvas = offlineElement.getContext("2d"); - } - else{ - offlinecanvas = $("#luckysheetTableContentF").get(0).getContext("2d"); - } - //offlinecanvas.clearRect(0, 0, luckysheetTableContentHW[0], luckysheetTableContentHW[1]); - offlinecanvas.fillStyle = "#ffffff"; - offlinecanvas.fillRect( - 0, - 0, - luckysheetTableContentHW[0] * devicePixelRatio, - luckysheetTableContentHW[1] * devicePixelRatio - ); - offlinecanvas.font = luckysheetdefaultstyle.font; - offlinecanvas.textBaseline = "top"; - offlinecanvas.fillStyle = luckysheetdefaultstyle.fillStyle; - - // - var dataset_row_st, dataset_row_ed, dataset_col_st, dataset_col_ed; - - dataset_row_st = luckysheet_searcharray(visibledatarow, scrollHeight); - dataset_row_ed = luckysheet_searcharray(visibledatarow, scrollHeight + drawHeight); - - if (dataset_row_st == -1) { - dataset_row_st = 0; - } - - dataset_row_st += rowOffsetCell; - - if (dataset_row_ed == -1) { - dataset_row_ed = visibledatarow.length - 1; - } - - dataset_row_ed += rowOffsetCell; - - if (dataset_row_ed >= visibledatarow.length) { - dataset_row_ed = visibledatarow.length - 1; - } - - dataset_col_st = luckysheet_searcharray(visibledatacolumn, scrollWidth); - dataset_col_ed = luckysheet_searcharray(visibledatacolumn, scrollWidth + drawWidth); - - if (dataset_col_st == -1) { - dataset_col_st = 0; - } - - dataset_col_st += columnOffsetCell; - - if (dataset_col_ed == -1) { - dataset_col_ed = visibledatacolumn.length - 1; - } - - dataset_col_ed += columnOffsetCell; - - if (dataset_col_ed >= visibledatacolumn.length) { - dataset_col_ed = visibledatacolumn.length - 1; - } - - - var fill_row_st, fill_row_ed, fill_col_st, fill_col_ed; - if(dataset_row_st == 0){ - fill_row_st = 0; - } - else{ - fill_row_st = visibledatarow[dataset_row_st - 1]; - } - - fill_row_ed = visibledatarow[dataset_row_ed]; - - if(dataset_col_st == 0){ - fill_col_st = 0; - } - else{ - fill_col_st = visibledatacolumn[dataset_col_st - 1]; - } - - fill_col_ed = visibledatacolumn[dataset_col_ed]; - - luckysheetTableContent.fillStyle = "#ffffff"; - luckysheetTableContent.fillRect( - (offsetLeft - 1) * devicePixelRatio, - (offsetTop - 1) * devicePixelRatio, - (fill_col_ed - scrollWidth) * devicePixelRatio, - (fill_row_ed - scrollHeight) * devicePixelRatio - ); - luckysheetTableContent.font = luckysheetdefaultstyle.font; - luckysheetTableContent.textBaseline = "top"; - luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; - - var end_r, start_r, end_c, start_c; - - var cellupdate = []; - var mergeCache = {}; - - var borderOffset = {}; - - for (var r = dataset_row_st; r <= dataset_row_ed; r++) { - if (r == 0) { - start_r = -scrollHeight - 1; - } - else { - start_r = visibledatarow[r - 1] - scrollHeight - 1; - } - - end_r = visibledatarow[r] - scrollHeight; - - for (var c = dataset_col_st; c <= dataset_col_ed; c++) { - if (c == 0) { - start_c = -scrollWidth; - } - else { - start_c = visibledatacolumn[c - 1] - scrollWidth; - } - - end_c = visibledatacolumn[c] - scrollWidth; - - //横线 - if(c == dataset_col_ed && !luckysheetcurrentisPivotTable){ - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - devicePixelRatio * (offsetLeft - 1), - devicePixelRatio * (end_r + offsetTop - 2 + 0.5) - ); - luckysheetTableContent.lineTo( - devicePixelRatio * (fill_col_ed - scrollWidth + offsetLeft - 2), - devicePixelRatio * (end_r + offsetTop - 2 + 0.5) - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - //竖线 - if(r == dataset_row_st && !luckysheetcurrentisPivotTable){ - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - devicePixelRatio * (end_c + offsetLeft - 2 + 0.5), - devicePixelRatio * (offsetTop - 1) - ); - luckysheetTableContent.lineTo( - devicePixelRatio * (end_c + offsetLeft - 2 + 0.5), - devicePixelRatio * (fill_row_ed - scrollHeight + offsetTop - 2) - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - //数据透视表 - if (!!luckysheetcurrentisPivotTable && luckysheet.pivotTable.drawPivotTable) { - if ((c == 0 || c == 5) && r <= 11) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), - devicePixelRatio * (start_r + offsetTop) - ); - luckysheetTableContent.lineTo( - devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), - devicePixelRatio * (end_r - 2 + offsetTop) - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - if ((r == 2 || r == 11) && c <= 5) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - devicePixelRatio * (start_c - 1 + offsetLeft), - devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) - ); - luckysheetTableContent.lineTo( - devicePixelRatio * (end_c - 2 + offsetLeft), - devicePixelRatio * (end_r - 2 + 0.5 + offsetTop) - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - if (r == 6 && c == 3) { - luckysheetTableContent.fillText( - "数据透视表", - devicePixelRatio * (start_c + 4 + offsetLeft), - devicePixelRatio *(start_r + (end_r - start_r) / 2 - 1 + offsetTop) - ); - } - } - else if (!!luckysheetcurrentisPivotTable) { - if (c < luckysheet.pivotTable.pivotTableBoundary[1] && r < luckysheet.pivotTable.pivotTableBoundary[0]) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), - devicePixelRatio*(start_r + offsetTop) - ); - luckysheetTableContent.lineTo( - devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), - devicePixelRatio*(end_r - 2 + offsetTop) - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo( - devicePixelRatio*(start_c - 1 + offsetLeft), - devicePixelRatio*(end_r - 2 + 0.5 + offsetTop) - ); - luckysheetTableContent.lineTo( - devicePixelRatio*(end_c - 2 + offsetLeft), - devicePixelRatio*(end_r - 2 + 0.5 + offsetTop) - ); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - } - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - - } - else { - var firstcolumlen = defaultcollen; - if (config["columlen"] != null && config["columlen"][c] != null) { - firstcolumlen = config["columlen"][c]; - } - - if (luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null) { - var value = luckysheet.flowdata[r][c]; - - if(luckysheet.getObjType(value) == "object" && ("mc" in value)){ - borderOffset[r + "_" + c] = { - "start_r": start_r, - "start_c": start_c, - "end_r": end_r, - "end_c": end_c - }; - - if("rs" in value["mc"]){ - var key = "r"+ r + "c" + c; - mergeCache[key] = cellupdate.length; - } - else{ - var key = "r"+ value["mc"].r + "c" + value["mc"].c; - var margeMain = cellupdate[mergeCache[key]]; - - if(margeMain == null){ - mergeCache[key] = cellupdate.length; - cellupdate.push({ - "r": r, - "c": c, - "start_c": start_c, - "start_r": start_r, - "end_r": end_r, - "end_c": end_c, - "firstcolumlen": firstcolumlen, - startlist: [] - }); - } - else{ - if(margeMain.c == c){ - margeMain.end_r += (end_r - start_r - 1); - margeMain.startlist.push(start_r); - - // borderOffset[margeMain.r + "_" + margeMain.c].end_r = margeMain.end_r; - } - - if(margeMain.r == r){ - margeMain.end_c += (end_c - start_c); - margeMain.firstcolumlen += firstcolumlen; - - // borderOffset[margeMain.r + "_" + margeMain.c].end_c = margeMain.end_c; - } - } - - continue; - } - } - } - - cellupdate.push({ - "r": r, - "c": c, - "start_r": start_r, - "start_c": start_c, - "end_r": end_r, - "end_c": end_c, - "firstcolumlen": firstcolumlen, - startlist: [] - }); - borderOffset[r + "_" + c] = { - "start_r": start_r, - "start_c": start_c, - "end_r": end_r, - "end_c": end_c - }; - } - } - } - - //动态数组公式计算 - var dynamicArray_compute = luckysheet.dynamicArray_compute(luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["dynamicArray"]); - - //交替颜色计算 - var af_compute = luckysheet.alternateformat.getComputeMap(); - - //条件格式计算 - var cf_compute = luckysheet.conditionformat.getComputeMap(); - - //sparklines渲染 - var sparklinesRender = function(r, c, offsetX, offsetY, canvasid, ctx){ - if(luckysheet.flowdata[r] == null || luckysheet.flowdata[r][c] == null){ - return; - } - - var sparklines = luckysheet.flowdata[r][c].spl; - if(sparklines != null){ - if(typeof sparklines == "string"){ - sparklines = eval('('+ sparklines +')'); - } - - if(luckysheet.getObjType(sparklines) == "object"){ - var temp1 = sparklines; - var x = temp1.offsetX; - var y = temp1.offsetY; - x = x == null ? 0 : x; - y = y == null ? 0 : y; - luckysheet.sparkline.render(temp1.shapeseq, temp1.shapes, offsetX + x, offsetY + y, temp1.pixelWidth, temp1.pixelHeight, canvasid, ctx); - } - else if(luckysheet.getObjType(sparklines) == "array" && luckysheet.getObjType(sparklines[0]) == "object"){ - for(var i = 0; i < sparklines.length; i++){ - var temp1 = sparklines[i]; - var x = temp1.offsetX; - var y = temp1.offsetY; - x = x == null ? 0 : x; - y = y == null ? 0 : y; - luckysheet.sparkline.render(temp1.shapeseq, temp1.shapes, offsetX + x, offsetY + y, temp1.pixelWidth, temp1.pixelHeight, canvasid, ctx); - } - } - } - } - - //空白单元格渲染 - var nullCellRender = function(r, c, start_r, start_c, end_r, end_c){ - var checksAF = luckysheet.alternateformat.checksAF(r, c, af_compute); //交替颜色 - var checksCF = luckysheet.conditionformat.checksCF(r, c, cf_compute); //条件格式 - - var borderfix = luckysheet.menuButton.borderfix(luckysheet.flowdata, r, c); - - //背景色 - luckysheetTableContent.fillStyle = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bg"); - - if(checksAF != null && checksAF[1] != null){//交替颜色 - luckysheetTableContent.fillStyle = checksAF[1]; - } - - if(checksCF != null && checksCF["cellColor"] != null){//条件格式 - luckysheetTableContent.fillStyle = checksCF["cellColor"]; - } - - if(luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].tc != null){//标题色 - luckysheetTableContent.fillStyle = luckysheet.flowdata[r][c].tc; - } - - var cellsize = [ - devicePixelRatio * (start_c + offsetLeft + borderfix[0]), - devicePixelRatio * (start_r + offsetTop + 1 + borderfix[1]), - devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), - devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) - ]; - luckysheetTableContent.fillRect(cellsize[0], cellsize[1], cellsize[2], cellsize[3]); - - if((r + "_" + c) in dynamicArray_compute){ - var value = dynamicArray_compute[r + "_" + c].v; - - luckysheetTableContent.fillStyle = "#000000"; - //文本宽度和高度 - var fontset = luckysheetdefaultstyle.font; - luckysheetTableContent.font = fontset; - - var textMetrics = luckysheetTableContent.measureText(value).width; - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - - //水平对齐 (默认为1,左对齐) - var horizonAlignPos = (start_c + 4 + offsetLeft) * devicePixelRatio; - - //垂直对齐 (默认为2,下对齐) - var verticalFixed = luckysheet.browser.luckysheetrefreshfixed(); - var verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * devicePixelRatio - oneLineTextHeight; - - luckysheetTableContent.fillText(value == null ? "" : value, horizonAlignPos, verticalAlignPos); - } - - //若单元格有批注 - if(luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].ps != null){ - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio * (end_c + offsetLeft - 6), devicePixelRatio * (start_r + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio * (end_c + offsetLeft - 1), devicePixelRatio * (start_r + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio * (end_c + offsetLeft - 1), devicePixelRatio * (start_r + offsetTop + 5)); - luckysheetTableContent.fillStyle = "#FC6666"; - luckysheetTableContent.fill(); - luckysheetTableContent.closePath(); - } - - //右边框 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), devicePixelRatio * (start_r + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), devicePixelRatio * (end_r - 2 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - - if (!!luckysheetcurrentisPivotTable && !luckysheet.pivotTable.drawPivotTable) { - luckysheetTableContent.strokeStyle = "#000000"; - } - else{ - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - } - - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - - //下边框 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio * (start_c - 2 + offsetLeft), devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio * (end_c + offsetLeft - 2), devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - - if (!!luckysheetcurrentisPivotTable && !luckysheet.pivotTable.drawPivotTable) { - luckysheetTableContent.strokeStyle = "#000000"; - } - else{ - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - } - - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - } - - //非空白单元格渲染 - var cellRender = function(r, c, start_r, start_c, end_r, end_c, value, canvasType){ - var checksAF = luckysheet.alternateformat.checksAF(r, c, af_compute); //交替颜色 - var checksCF = luckysheet.conditionformat.checksCF(r, c, cf_compute); //条件格式 - - var borderfix = luckysheet.menuButton.borderfix(luckysheet.flowdata, r, c); - - //文本宽度和高度 - var fontset = luckysheetfontformat(luckysheet.flowdata[r][c]); - luckysheetTableContent.font = fontset; - - var textMetrics = luckysheetTableContent.measureText(value).width; - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - - if(luckysheet.flowdata[r][c].tb == "2"){ - var strValue = value.toString(); - var cellWidth = end_c - start_c - 8; - var strArr = []; - - for(var strI = 1; strI <= strValue.length; strI++){ - var strV = strValue.substring(strArr.join("").length, strI); - var strtextMetrics = luckysheetTableContent.measureText(strV).width; - - if(strtextMetrics > cellWidth){ - strArr.push(strValue.substring(strArr.join("").length, strI - 1)); - strI = strI - 2; - } - else if(strtextMetrics <= cellWidth && strI == strValue.length){ - strArr.push(strV); - } - } - - var textH = strArr.length * oneLineTextHeight; - } - else if(luckysheet.flowdata[r][c].tr != null && luckysheet.flowdata[r][c].tr != "0"){ - var tr = luckysheet.flowdata[r][c].tr; - - if(tr == "1" || tr == "2"){ - var textW = 0.707 * (textMetrics + oneLineTextHeight); - var textH = 0.707 * (textMetrics + oneLineTextHeight); - } - else if(tr == "3"){ - value = value.toString(); - - if(value.length > 1){ - var vArr = value.split(""); - } - else{ - var vArr = []; - vArr.push(value); - } - - var textW = luckysheetTableContent.measureText(vArr[0]).width; - var textH = vArr.length * oneLineTextHeight; - } - else if(tr == "4" || tr == "5"){ - var textW = oneLineTextHeight; - var textH = textMetrics; - } - } - else{ - var textW = textMetrics; - var textH = oneLineTextHeight; - } - - //水平对齐 - var horizonAlign = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "ht"); - var horizonAlignPos = (start_c + 4 + offsetLeft) * devicePixelRatio; //horizonAlign默认为1,左对齐 - if(horizonAlign == "0"){ //居中对齐 - horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * devicePixelRatio - (textMetrics) / 2; - } - else if(horizonAlign == "2"){ //右对齐 - horizonAlignPos = (end_c + offsetLeft - 8) * devicePixelRatio - (textMetrics); - } - - //垂直对齐 - var verticalAlign = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "vt"); - var verticalFixed = luckysheet.browser.luckysheetrefreshfixed(); - var verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * devicePixelRatio - oneLineTextHeight; //verticalAlign默认为2,下对齐 - if(verticalAlign == "0"){ //居中对齐 - verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * devicePixelRatio - oneLineTextHeight / 2; - } - else if(verticalAlign == "1"){ //上对齐 - verticalAlignPos = (start_r + offsetTop + verticalFixed) * devicePixelRatio; - } - - //水平对齐方式是 居中或居右对齐 且单元格宽度小于文字宽度 (用离屏canvas渲染) - if(luckysheet.browser.BrowserType() != "Safari" && (canvasType == "offline" || ((horizonAlign == "0" || horizonAlign == "2") && (end_c - start_c) < textW) || ((verticalAlign == "0" || verticalAlign == "2") && (end_r - start_r) < textH))){ - // if(canvasType == "offline" || ((horizonAlign == "0" || horizonAlign == "2") && (end_c - start_c) < textW) || ((verticalAlign == "0" || verticalAlign == "2") && (end_r - start_r) < textH) || (luckysheet.flowdata[r][c].tr != null && luckysheet.flowdata[r][c].tr != "0")){ - var canvasName = offlinecanvas; - - canvasName.font = fontset; - - var cellsize = [ - devicePixelRatio * (start_c + offsetLeft + borderfix[0]), - devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), - devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), - devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) - ]; - } - else{ - var canvasName = luckysheetTableContent; - - var cellsize = [ - devicePixelRatio * (start_c + offsetLeft + borderfix[0]), - devicePixelRatio * (start_r + offsetTop + 1 + borderfix[1]), - devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), - devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) - ]; - } - - //单元格 背景颜色 - canvasName.fillStyle= luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bg"); - - //若单元格有交替颜色 背景颜色 - if(checksAF != null && checksAF[1] != null){ - canvasName.fillStyle = checksAF[1]; - } - - //若单元格有条件格式 背景颜色 - if(checksCF != null && checksCF["cellColor"] != null){ - canvasName.fillStyle = checksCF["cellColor"]; - } - - //若单元格有标题色 - if(luckysheet.flowdata[r][c] != null && luckysheet.flowdata[r][c].tc != null){ - luckysheetTableContent.fillStyle = luckysheet.flowdata[r][c].tc; - } - - canvasName.fillRect(cellsize[0], cellsize[1], cellsize[2], cellsize[3]); - - //若单元格有批注 - if(luckysheet.flowdata[r][c].ps != null){ - canvasName.beginPath(); - canvasName.moveTo(devicePixelRatio * (end_c + offsetLeft - 6), devicePixelRatio * (start_r + offsetTop)); - canvasName.lineTo(devicePixelRatio * (end_c + offsetLeft - 1), devicePixelRatio * (start_r + offsetTop)); - canvasName.lineTo(devicePixelRatio * (end_c + offsetLeft - 1), devicePixelRatio * (start_r + offsetTop + 5)); - canvasName.fillStyle = "#FC6666"; - canvasName.fill(); - canvasName.closePath(); - } - - //若单元格有条件格式数据条 - if(checksCF != null && checksCF["dataBar"] != null){ - var x = devicePixelRatio * (start_c + offsetLeft + borderfix[0] + 2); - var y = devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1] + 2); - var w = devicePixelRatio * (end_c - start_c - 3 + borderfix[2] - 4); - var h = devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3] - 4); - - var valueType = checksCF["dataBar"]["valueType"]; - var valueLen = checksCF["dataBar"]["valueLen"]; - var format = checksCF["dataBar"]["format"]; - - if(format.length > 1){ //渐变 - if(valueType == "minus"){ - //负数 - var minusLen = checksCF["dataBar"]["minusLen"]; - - var my_gradient = canvasName.createLinearGradient(x + w * minusLen * (1 - valueLen), y, x + w * minusLen, y); - my_gradient.addColorStop(0, "#ffffff"); - my_gradient.addColorStop(1, "#ff0000"); - canvasName.fillStyle = my_gradient; - canvasName.fillRect(x + w * minusLen * (1 - valueLen), y, w * minusLen * valueLen, h); - - canvasName.beginPath(); - canvasName.moveTo(x + w * minusLen * (1 - valueLen), y); - canvasName.lineTo(x + w * minusLen * (1 - valueLen), y + h); - canvasName.lineTo(x + w * minusLen, y + h); - canvasName.lineTo(x + w * minusLen, y); - canvasName.lineTo(x + w * minusLen * (1 - valueLen), y); - canvasName.lineWidth = devicePixelRatio; - canvasName.strokeStyle = "#ff0000"; - canvasName.stroke(); - canvasName.closePath(); - } - else if(valueType == "plus"){ - //正数 - var plusLen = checksCF["dataBar"]["plusLen"]; - - if(plusLen == 1){ - var my_gradient = canvasName.createLinearGradient(x, y, x + w * valueLen, y); - my_gradient.addColorStop(0, format[0]); - my_gradient.addColorStop(1, format[1]); - canvasName.fillStyle = my_gradient; - canvasName.fillRect(x, y, w * valueLen, h); - - canvasName.beginPath(); - canvasName.moveTo(x, y); - canvasName.lineTo(x, y + h); - canvasName.lineTo(x + w * valueLen, y + h); - canvasName.lineTo(x + w * valueLen, y); - canvasName.lineTo(x, y); - canvasName.lineWidth = devicePixelRatio; - canvasName.strokeStyle = format[0]; - canvasName.stroke(); - canvasName.closePath(); - } - else{ - var minusLen = checksCF["dataBar"]["minusLen"]; - - var my_gradient = canvasName.createLinearGradient(x + w * minusLen, y, x + w * minusLen + w * plusLen * valueLen, y); - my_gradient.addColorStop(0, format[0]); - my_gradient.addColorStop(1, format[1]); - canvasName.fillStyle = my_gradient; - canvasName.fillRect(x + w * minusLen, y, w * plusLen * valueLen, h); - - canvasName.beginPath(); - canvasName.moveTo(x + w * minusLen, y); - canvasName.lineTo(x + w * minusLen, y + h); - canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y + h); - canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y); - canvasName.lineTo(x + w * minusLen, y); - canvasName.lineWidth = devicePixelRatio; - canvasName.strokeStyle = format[0]; - canvasName.stroke(); - canvasName.closePath(); - } - } - } - else{ //单色 - if(valueType == "minus"){ - //负数 - var minusLen = checksCF["dataBar"]["minusLen"]; - - canvasName.fillStyle = "#ff0000"; - canvasName.fillRect(x + w * minusLen * (1 - valueLen), y, w * minusLen * valueLen, h); - - canvasName.beginPath(); - canvasName.moveTo(x + w * minusLen * (1 - valueLen), y); - canvasName.lineTo(x + w * minusLen * (1 - valueLen), y + h); - canvasName.lineTo(x + w * minusLen, y + h); - canvasName.lineTo(x + w * minusLen, y); - canvasName.lineTo(x + w * minusLen * (1 - valueLen), y); - canvasName.lineWidth = devicePixelRatio; - canvasName.strokeStyle = "#ff0000"; - canvasName.stroke(); - canvasName.closePath(); - } - else if(valueType == "plus"){ - //正数 - var plusLen = checksCF["dataBar"]["plusLen"]; - - if(plusLen == 1){ - canvasName.fillStyle = format[0]; - canvasName.fillRect(x, y, w * valueLen, h); - - canvasName.beginPath(); - canvasName.moveTo(x, y); - canvasName.lineTo(x, y + h); - canvasName.lineTo(x + w * valueLen, y + h); - canvasName.lineTo(x + w * valueLen, y); - canvasName.lineTo(x, y); - canvasName.lineWidth = devicePixelRatio; - canvasName.strokeStyle = format[0]; - canvasName.stroke(); - canvasName.closePath(); - } - else{ - var minusLen = checksCF["dataBar"]["minusLen"]; - - canvasName.fillStyle = format[0]; - canvasName.fillRect(x + w * minusLen, y, w * plusLen * valueLen, h); - - canvasName.beginPath(); - canvasName.moveTo(x + w * minusLen, y); - canvasName.lineTo(x + w * minusLen, y + h); - canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y + h); - canvasName.lineTo(x + w * minusLen + w * plusLen * valueLen, y); - canvasName.lineTo(x + w * minusLen, y); - canvasName.lineWidth = devicePixelRatio; - canvasName.strokeStyle = format[0]; - canvasName.stroke(); - canvasName.closePath(); - } - } - } - } - - //若单元格有条件格式图标集 - if(checksCF != null && checksCF["icons"] != null){ - var l = checksCF["icons"]["left"]; - var t = checksCF["icons"]["top"]; - - canvasName.drawImage(luckysheet_CFiconsImg, l * 42, t * 32, 32, 32, cellsize[0], verticalAlignPos + 2, oneLineTextHeight - 2, oneLineTextHeight - 2); - - if(horizonAlign != "0" && horizonAlign != "2"){ //左对齐时 文本渲染空出一个图标的距离 - horizonAlignPos = horizonAlignPos + oneLineTextHeight - 2; - } - } - - //单元格 文本颜色 - canvasName.fillStyle = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "fc"); - - //若单元格有交替颜色 文本颜色 - if(checksAF != null && checksAF[0] != null){ - canvasName.fillStyle = checksAF[0]; - } - - //若单元格有条件格式 文本颜色 - if(checksCF != null && checksCF["textColor"] != null){ - canvasName.fillStyle = checksCF["textColor"]; - } - - //单元格有下钻属性,文本颜色变成超链接的颜色 - if(luckysheet.flowdata[r][c].dd != null){ - canvasName.fillStyle = "#0000ff"; - - canvasName.fillText(value == null ? "" : value, horizonAlignPos, verticalAlignPos); - - canvasName.beginPath(); - canvasName.strokeStyle = "#0000ff"; - canvasName.moveTo(horizonAlignPos, verticalAlignPos + oneLineTextHeight); - canvasName.lineTo(horizonAlignPos + textMetrics, verticalAlignPos + oneLineTextHeight); - canvasName.closePath(); - canvasName.stroke(); - } - else{ - //自动换行、旋转、删除线功能 - if(luckysheet.flowdata[r][c].tb == "2"){ - var strValue = value.toString(); - var cellWidth = end_c - start_c - 8; - var strArr = []; - - for(var strI = 1; strI <= strValue.length; strI++){ - var strV = strValue.substring(strArr.join("").length, strI); - var strtextMetrics = canvasName.measureText(strV).width; - - if(strtextMetrics > cellWidth){ - strArr.push(strValue.substring(strArr.join("").length, strI - 1)); - strI = strI - 2; - } - else if(strtextMetrics <= cellWidth && strI == strValue.length){ - strArr.push(strV); - } - } - - for(var iFill = 0; iFill < strArr.length; iFill++){ - //水平对齐计算 - var strWidth = canvasName.measureText(strArr[iFill]).width; - if(horizonAlign == "0"){ - horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * devicePixelRatio - (strWidth)/2; - } - else if(horizonAlign == "2"){ - horizonAlignPos = (end_c + offsetLeft - 8) * devicePixelRatio - (strWidth); - } - - //垂直对齐计算 - if(verticalAlign == "0"){ - verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * devicePixelRatio - oneLineTextHeight * strArr.length / 2; - } - else if(verticalAlign == "1"){ - verticalAlignPos = (start_r + offsetTop + verticalFixed) * devicePixelRatio; - } - else{ - verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * devicePixelRatio - oneLineTextHeight * strArr.length; - } - - canvasName.fillText(strArr[iFill], horizonAlignPos, (verticalAlignPos + iFill * oneLineTextHeight)); - } - } - else if(luckysheet.flowdata[r][c].tr != null && luckysheet.flowdata[r][c].tr != "0"){ - //单元格旋转属性 - var tr = luckysheet.flowdata[r][c].tr; - - if(tr == "1" || tr == "2"){ - //旋转重新计算水平、垂直方向坐标 - var textW = 0.707 * (textMetrics + oneLineTextHeight); - var textH = 0.707 * (textMetrics + oneLineTextHeight); - - var hAP = (start_c + 4 + offsetLeft) * devicePixelRatio; - if(horizonAlign == "0"){ - hAP = (start_c + (end_c - start_c) / 2 + offsetLeft) * devicePixelRatio - (textW) / 2; - } - else if(horizonAlign == "2"){ - hAP = (end_c + offsetLeft - 8) * devicePixelRatio - (textW); - } - - var vAP = (end_r + offsetTop - 2 + verticalFixed) * devicePixelRatio - textH; - if(verticalAlign == "0"){ - vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * devicePixelRatio - textH / 2; - } - else if(verticalAlign == "1"){ - vAP = (start_r + offsetTop + verticalFixed) * devicePixelRatio; - } - - //向下倾斜(45 旋转) - if(tr == "1"){ - canvasName.save(); - canvasName.translate(hAP, vAP); - canvasName.rotate(45 * Math.PI / 180); - canvasName.translate(-hAP, -vAP); - canvasName.fillText(value == null ? "" : value, hAP + (0.707 * 0.707 * oneLineTextHeight), vAP - (0.707 * 0.707 * oneLineTextHeight)); - canvasName.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !luckysheet.func_methods.isRealNull(value)){ - canvasName.beginPath(); - canvasName.strokeStyle = "#000"; - canvasName.moveTo(hAP + oneLineTextHeight / 2, vAP + oneLineTextHeight / 2); - canvasName.lineTo(hAP + textW - oneLineTextHeight / 2, vAP + textH - oneLineTextHeight / 2); - canvasName.closePath(); - canvasName.stroke(); - } - } - - //向上倾斜(-45 旋转) - if(tr == "2"){ - canvasName.save(); - canvasName.translate(hAP, vAP + textH); - canvasName.rotate(-45 * Math.PI / 180); - canvasName.translate(-hAP, -(vAP + textH)); - canvasName.fillText(value == null ? "" : value, hAP + (0.707 * 0.707 * oneLineTextHeight), vAP + textH - (0.707 * 0.707 * oneLineTextHeight)); - canvasName.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !luckysheet.func_methods.isRealNull(value)){ - canvasName.beginPath(); - canvasName.strokeStyle = "#000"; - canvasName.moveTo(hAP + oneLineTextHeight / 2, vAP + textH - oneLineTextHeight / 2); - canvasName.lineTo(hAP + textW - oneLineTextHeight / 2, vAP + oneLineTextHeight / 2); - canvasName.closePath(); - canvasName.stroke(); - } - } - } - else if(tr == "3"){ - if(!luckysheet.func_methods.isRealNull(value)){ - value = value.toString(); - - if(value.length > 1){ - var vArr = value.split(""); - } - else{ - var vArr = []; - vArr.push(value); - } - - var textW = canvasName.measureText(vArr[0]).width; - var textH = vArr.length * oneLineTextHeight; - - for(var i = 0; i < vArr.length; i++){ - var vWidth = canvasName.measureText(vArr[i]).width; - - //水平对齐计算 - if(horizonAlign == "0"){ - horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft) * devicePixelRatio - (vWidth)/2; - } - else if(horizonAlign == "2"){ - horizonAlignPos = (end_c + offsetLeft - 8) * devicePixelRatio - (vWidth); - } - else{ - horizonAlignPos = (start_c + 4 + offsetLeft) * devicePixelRatio; - } - - //垂直对齐计算 - if(verticalAlign == "0"){ - verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * devicePixelRatio - oneLineTextHeight * vArr.length/2; - } - else if(verticalAlign == "1"){ - verticalAlignPos = (start_r + offsetTop + verticalFixed) * devicePixelRatio; - } - else{ - verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed) * devicePixelRatio - oneLineTextHeight * vArr.length; - } - - canvasName.fillText(vArr[i], horizonAlignPos, (verticalAlignPos + i * oneLineTextHeight)); - } - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !luckysheet.func_methods.isRealNull(value)){ - canvasName.beginPath(); - canvasName.strokeStyle = "#000"; - canvasName.moveTo(horizonAlignPos + textW / 2, verticalAlignPos); - canvasName.lineTo(horizonAlignPos + textW / 2, verticalAlignPos + textH); - canvasName.closePath(); - canvasName.stroke(); - } - } - } - else if(tr == "4" || tr == "5"){ - //旋转重新计算水平、垂直方向坐标 - var textW = oneLineTextHeight; - var textH = textMetrics; - - var hAP = (start_c + 4 + offsetLeft) * devicePixelRatio; - if(horizonAlign == "0"){ - hAP = (start_c + (end_c - start_c) / 2 + offsetLeft) * devicePixelRatio - (textW) / 2; - } - else if(horizonAlign == "2"){ - hAP = (end_c + offsetLeft - 8) * devicePixelRatio - (textW); - } - - var vAP = (end_r + offsetTop - 2 + verticalFixed) * devicePixelRatio - textH; - if(verticalAlign == "0"){ - vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed) * devicePixelRatio - textH / 2; - } - else if(verticalAlign == "1"){ - vAP = (start_r + offsetTop + verticalFixed) * devicePixelRatio; - } - - //向下90(90 旋转) - if(tr == "4"){ - canvasName.save(); - canvasName.translate(hAP, vAP); - canvasName.rotate(90 * Math.PI / 180); - canvasName.translate(-hAP, -vAP); - canvasName.fillText(value == null ? "" : value, hAP, vAP - textW); - canvasName.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !luckysheet.func_methods.isRealNull(value)){ - canvasName.beginPath(); - canvasName.strokeStyle = "#000"; - canvasName.moveTo(hAP + textW / 2, vAP); - canvasName.lineTo(hAP + textW / 2, vAP + textH); - canvasName.closePath(); - canvasName.stroke(); - } - } - - //向上90(-90 旋转) - if(tr == "5"){ - canvasName.save(); - canvasName.translate(hAP + textH, vAP); - canvasName.rotate(-90 * Math.PI / 180); - canvasName.translate(-(hAP + textH), -vAP); - canvasName.fillText(value == null ? "" : value, hAP, vAP - textH); - canvasName.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !luckysheet.func_methods.isRealNull(value)){ - canvasName.beginPath(); - canvasName.strokeStyle = "#000"; - canvasName.moveTo(hAP + textW / 2, vAP); - canvasName.lineTo(hAP + textW / 2, vAP + textH); - canvasName.closePath(); - canvasName.stroke(); - } - } - } - } - else{ - canvasName.fillText(value == null ? "" : value, horizonAlignPos, verticalAlignPos); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !luckysheet.func_methods.isRealNull(value)){ - canvasName.beginPath(); - canvasName.strokeStyle = "#000"; - canvasName.moveTo(horizonAlignPos, verticalAlignPos + oneLineTextHeight / 2); - canvasName.lineTo(horizonAlignPos + textMetrics, verticalAlignPos + oneLineTextHeight / 2); - canvasName.closePath(); - canvasName.stroke(); - } - } - } - - //水平对齐方式是 居中或居右对齐 且单元格宽度小于文字宽度 (用离屏canvas渲染) - if(luckysheet.browser.BrowserType() != "Safari" && (canvasType == "offline" || ((horizonAlign == "0" || horizonAlign == "2") && (end_c - start_c) < textW) || ((verticalAlign == "0" || verticalAlign == "2") && (end_r - start_r) < textH))){ - canvasName.font = luckysheetdefaultstyle.font; - - if($("#luckysheetTableContentF").length > 0){ - luckysheetTableContent.drawImage($("#luckysheetTableContentF").get(0), cellsize[0], cellsize[1], cellsize[2], cellsize[3], cellsize[0], cellsize[1], cellsize[2], cellsize[3]); - } - else{ - luckysheetTableContent.drawImage(offlineElement, cellsize[0], cellsize[1], cellsize[2], cellsize[3], cellsize[0], cellsize[1], cellsize[2], cellsize[3]); - } - } - - luckysheetTableContent.font = luckysheetdefaultstyle.font; - - //右边框 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), devicePixelRatio * (start_r + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft), devicePixelRatio * (end_r - 2 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - - if (!!luckysheetcurrentisPivotTable && !luckysheet.pivotTable.drawPivotTable) { - luckysheetTableContent.strokeStyle = "#000000"; - } - else{ - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - } - - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - - //下边框 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio * (start_c - 2 + offsetLeft), devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio * (end_c + offsetLeft - 2), devicePixelRatio * (end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - - if (!!luckysheetcurrentisPivotTable && !luckysheet.pivotTable.drawPivotTable) { - luckysheetTableContent.strokeStyle = "#000000"; - } - else{ - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - } - - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - } - - var mcArr = []; - - for(var cud = 0; cud < cellupdate.length; cud++){ - var item = cellupdate[cud]; - var r = item.r, - c = item.c, - start_r = item.start_r, - start_c = item.start_c, - end_r = item.end_r, - end_c = item.end_c; - var firstcolumlen = item.firstcolumlen; - - if(luckysheet.flowdata[r] == null){ - continue; - } - - if(luckysheet.flowdata[r][c] == null){ //空单元格 - nullCellRender(r, c, start_r, start_c, end_r, end_c); - } - else{ - var cell = luckysheet.flowdata[r][c]; - var value = null, er = r, ec = c, end_ec = end_c; - - if((typeof cell == "object") && "mc" in cell){ - mcArr.push(cellupdate[cud]); - - var margeMaindata = cell["mc"]; - value = luckysheet.getcellvalue(margeMaindata.r, margeMaindata.c, null, "m"); - - if(value == null){ - value = luckysheet.getcellvalue(margeMaindata.r, margeMaindata.c); - } - - r = margeMaindata.r; - c = margeMaindata.c; - - er += margeMaindata.rs; - ec += margeMaindata.rc; - - if (c == 0) { - start_c = -scrollWidth; - } - else { - start_c = visibledatacolumn[c - 1] - scrollWidth; - } - - if (r == 0) { - start_r = -scrollHeight - 1; - } - else { - start_r = visibledatarow[r - 1] - scrollHeight - 1; - } - - end_ec = visibledatacolumn[ec] - scrollWidth; - } - else{ - value = luckysheet.getcellvalue(r, c, null, "m"); - if(value == null){ - value = luckysheet.getcellvalue(r, c); - } - } - - if(value == null || value.toString().length == 0){ - nullCellRender(r, c, start_r, start_c, end_r, end_c); - - //sparklines渲染 - var borderfix = luckysheet.menuButton.borderfix(luckysheet.flowdata, r, c); - var cellsize = [ - devicePixelRatio * (start_c + offsetLeft + borderfix[0]), - devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), - devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), - devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) - ]; - sparklinesRender(r, c, cellsize[0], cellsize[1], "luckysheetTableContent", luckysheetTableContent); - } - else{ - if((r + "_" + c) in dynamicArray_compute){//动态数组公式 - value = dynamicArray_compute[r + "_" + c].v; - } - - cellRender(r, c, start_r, start_c, end_r, end_c, value); - } - } - } - - //合并单元格再处理 - for(var m = 0; m < mcArr.length; m++){ - var item = mcArr[m]; - var r = item.r, - c = item.c, - start_r = item.start_r, - start_c = item.start_c, - end_r = item.end_r, - end_c = item.end_c; - var firstcolumlen = item.firstcolumlen; - - var cell = luckysheet.flowdata[r][c]; - var value = null, er = r, ec = c, end_ec = end_c; - - var margeMaindata = cell["mc"]; - value = luckysheet.getcellvalue(margeMaindata.r, margeMaindata.c, null, "m"); - - if(value == null){ - value = luckysheet.getcellvalue(margeMaindata.r, margeMaindata.c); - } - - r = margeMaindata.r; - c = margeMaindata.c; - - er += margeMaindata.rs; - ec += margeMaindata.rc; - - if (c == 0) { - start_c = -scrollWidth; - } - else { - start_c = visibledatacolumn[c - 1] - scrollWidth; - } - - if (r == 0) { - start_r = -scrollHeight - 1; - } - else { - start_r = visibledatarow[r - 1] - scrollHeight - 1; - } - - end_ec = visibledatacolumn[ec] - scrollWidth; - - if(value == null || value.toString().length == 0){ - nullCellRender(r, c, start_r, start_c, end_r, end_c); - - //sparklines渲染 - var borderfix = luckysheet.menuButton.borderfix(luckysheet.flowdata, r, c); - var cellsize = [ - devicePixelRatio * (start_c + offsetLeft + borderfix[0]), - devicePixelRatio * (start_r + offsetTop + 0.5 + borderfix[1]), - devicePixelRatio * (end_c - start_c - 3 + borderfix[2]), - devicePixelRatio * (end_r - start_r - 3 - 0.5 + borderfix[3]) - ]; - sparklinesRender(r, c, cellsize[0], cellsize[1], "luckysheetTableContent", luckysheetTableContent); - } - else{ - if((r + "_" + c) in dynamicArray_compute){//动态数组公式 - value = dynamicArray_compute[r + "_" + c].v; - } - - cellRender(r, c, start_r, start_c, end_r, end_c, value, "offline"); - } - } - - //边框单独渲染 - if(config["borderInfo"] != null && config["borderInfo"].length > 0){ - //边框渲染 - var borderLeftRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ - var linetype = style; - - var m_st = devicePixelRatio * (start_c - 2 + 0.5 + offsetLeft); - var m_ed = devicePixelRatio * (start_r + offsetTop); - var line_st = devicePixelRatio * (start_c - 2 + 0.5 + offsetLeft); - var line_ed = devicePixelRatio * (end_r - 2 + offsetTop); - - luckysheet.menuButton.setLineDash(canvas, linetype, "v", m_st, m_ed, line_st, line_ed); - - canvas.strokeStyle = color; - - canvas.stroke(); - canvas.closePath(); - } - - var borderRightRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ - var linetype = style; - - var m_st = devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft); - var m_ed = devicePixelRatio * (start_r + offsetTop); - var line_st = devicePixelRatio * (end_c - 2 + 0.5 + offsetLeft); - var line_ed = devicePixelRatio * (end_r - 2 + offsetTop); - - luckysheet.menuButton.setLineDash(canvas, linetype, "v", m_st, m_ed, line_st, line_ed); - - canvas.strokeStyle = color; - - canvas.stroke(); - canvas.closePath(); - } - - var borderBottomRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ - var linetype = style; - - var m_st = devicePixelRatio * (start_c - 2 + offsetLeft); - var m_ed = devicePixelRatio * (end_r - 2 + 0.5 + offsetTop); - var line_st = devicePixelRatio * (end_c + offsetLeft - 2); - var line_ed = devicePixelRatio * (end_r - 2 + 0.5 + offsetTop); - - luckysheet.menuButton.setLineDash(canvas, linetype, "h", m_st, m_ed, line_st, line_ed); - - canvas.strokeStyle = color; - - canvas.stroke(); - canvas.closePath(); - } - - var borderTopRender = function(style, color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, canvas){ - var linetype = style; - - var m_st = devicePixelRatio * (start_c - 2 + offsetLeft); - var m_ed = devicePixelRatio * (start_r - 1 + 0.5 + offsetTop); - var line_st = devicePixelRatio * (end_c + offsetLeft - 2); - var line_ed = devicePixelRatio * (start_r - 1 + 0.5 + offsetTop); - - luckysheet.menuButton.setLineDash(canvas, linetype, "h", m_st, m_ed, line_st, line_ed); - - canvas.strokeStyle = color; - - canvas.stroke(); - canvas.closePath(); - } - - var borderInfoCompute = luckysheet.getBorderInfoCompute(); - - for(x in borderInfoCompute){ - var bd_r = x.split("_")[0], bd_c = x.split("_")[1]; - - if(borderOffset[bd_r + "_" + bd_c]){ - var start_r = borderOffset[bd_r + "_" + bd_c].start_r; - var start_c = borderOffset[bd_r + "_" + bd_c].start_c; - var end_r = borderOffset[bd_r + "_" + bd_c].end_r; - var end_c = borderOffset[bd_r + "_" + bd_c].end_c; - - var borderLeft = borderInfoCompute[x].l; - if(borderLeft != null){ - borderLeftRender(borderLeft.style, borderLeft.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); - } - - var borderRight = borderInfoCompute[x].r; - if(borderRight != null){ - borderRightRender(borderRight.style, borderRight.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); - } - - var borderTop = borderInfoCompute[x].t; - if(borderTop != null){ - borderTopRender(borderTop.style, borderTop.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); - } - - var borderBottom = borderInfoCompute[x].b; - if(borderBottom != null){ - borderBottomRender(borderBottom.style, borderBottom.color, start_r, start_c, end_r, end_c, offsetLeft, offsetTop, luckysheetTableContent); - } - } - } - } - - //渲染表格时有尾列时,清除右边灰色区域,防止表格有值溢出 - if(dataset_col_ed == visibledatacolumn.length - 1){ - luckysheetTableContent.clearRect( - (fill_col_ed - scrollWidth + offsetLeft - 1) * devicePixelRatio, - (offsetTop - 1) * devicePixelRatio, - (ch_width - visibledatacolumn[dataset_col_ed]) * devicePixelRatio, - (fill_row_ed - scrollHeight) * devicePixelRatio - ); - } - - if(ctx != null){ - ctx.drawImage( - luckysheetTableElement, - 0, - 0, - drawWidth, - drawHeight, - -drawWidth/2 + offsetLeft, - -drawHeight/2 + offsetTop, - drawWidth, - drawHeight - ); - } - } - luckysheet.luckysheetDrawMain = luckysheetDrawMain; - - //备份luckysheetDrawMain - function luckysheetDrawMain_back(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop, columnOffsetCell, rowOffsetCell, mycanvas) { - if (scrollWidth == null) { - scrollWidth = $("#luckysheet-cell-main").scrollLeft(); - } - if (scrollHeight == null) { - scrollHeight = $("#luckysheet-cell-main").scrollTop(); - } - - if (drawWidth == null) { - drawWidth = luckysheetTableContentHW[0]; - } - if (drawHeight == null) { - drawHeight = luckysheetTableContentHW[1]; - } - - if (offsetLeft == null) { - offsetLeft = rowHeaderWidth; - } - if (offsetTop == null) { - offsetTop = columeHeaderHeight; - } - - if (columnOffsetCell == null) { - columnOffsetCell = 0; - } - if (rowOffsetCell == null) { - rowOffsetCell = 0; - } - - var luckysheetTableContent = null; - if(mycanvas==null){ - luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - } - else { - if(luckysheet.getObjType(mycanvas) == "object"){ - try{ - luckysheetTableContent = mycanvas.get(0).getContext("2d"); - } - catch(err){ - luckysheetTableContent = mycanvas; - } - } - else{ - luckysheetTableContent = $("#" + mycanvas).get(0).getContext("2d"); - } - } - - //luckysheetTableContentHW = [$("#luckysheet-grid-window-1").width() - 13, $("#luckysheet-grid-window-1").height() - 13]; - //var luckysheetTableContent = $("#"+ mycanvas).get(0).getContext("2d"); - - luckysheetTableContent.clearRect(offsetLeft*devicePixelRatio, offsetTop*devicePixelRatio, drawWidth*devicePixelRatio, drawHeight*devicePixelRatio); - - //离屏canvas - var offlinecanvas = $("#luckysheetTableContentF").get(0).getContext("2d"); - //offlinecanvas.clearRect(0, 0, luckysheetTableContentHW[0], luckysheetTableContentHW[1]); - offlinecanvas.fillStyle="#ffffff"; - offlinecanvas.fillRect(0, 0, luckysheetTableContentHW[0] * devicePixelRatio, luckysheetTableContentHW[1] * devicePixelRatio); - - - offlinecanvas.font = luckysheetdefaultstyle.font; - offlinecanvas.textBaseline = "top"; - offlinecanvas.fillStyle = luckysheetdefaultstyle.fillStyle; - - var dataset_row_st, dataset_row_ed, dataset_col_st, dataset_col_ed; - - dataset_row_st = luckysheet_searcharray(visibledatarow, scrollHeight); - dataset_row_ed = luckysheet_searcharray(visibledatarow, scrollHeight + drawHeight); - - if (dataset_row_st == -1) { - dataset_row_st = 0; - } - - dataset_row_st += rowOffsetCell; - - if (dataset_row_ed == -1) { - dataset_row_ed = visibledatarow.length - 1; - } - - dataset_row_ed += rowOffsetCell; - - if (dataset_row_ed >= visibledatarow.length) { - dataset_row_ed = visibledatarow.length - 1; - } - - dataset_col_st = luckysheet_searcharray(visibledatacolumn, scrollWidth); - dataset_col_ed = luckysheet_searcharray(visibledatacolumn, scrollWidth + drawWidth); - - if (dataset_col_st == -1) { - dataset_col_st = 0; - } - - dataset_col_st += columnOffsetCell; - - if (dataset_col_ed == -1) { - dataset_col_ed = visibledatacolumn.length - 1; - } - - dataset_col_ed += columnOffsetCell; - - if (dataset_col_ed >= visibledatacolumn.length) { - dataset_col_ed = visibledatacolumn.length - 1; - } - - - var fill_row_st, fill_row_ed, fill_col_st, fill_col_ed; - if(dataset_row_st==0){ - fill_row_st = 0; - } - else{ - fill_row_st = visibledatarow[dataset_row_st-1]; - } - - fill_row_ed = visibledatarow[dataset_row_ed]; - - if(dataset_col_st==0){ - fill_col_st = 0; - } - else{ - fill_col_st = visibledatacolumn[dataset_col_st-1]; - } - - fill_col_ed = visibledatacolumn[dataset_col_ed]; - - luckysheetTableContent.fillStyle="#ffffff"; - luckysheetTableContent.fillRect((offsetLeft - 1) * devicePixelRatio, (offsetTop - 1) * devicePixelRatio, (fill_col_ed - fill_col_st) * devicePixelRatio, (fill_row_ed - fill_row_st) * devicePixelRatio); - - var end_r, start_r, end_c, start_c, flow_index = 0, flow_cols_index = 0, rowfix = 0, colfix = 0, colLineState = true; - - // $("#luckysheet-cell-main").scrollLeft(visibledatarow[dataset_row_st]); - // $("#luckysheet-cell-main").scrollTop(visibledatacolumn[dataset_col_st]); - var cellupdate = []; - var mergeCache = {}; - for (var r = dataset_row_st; r <= dataset_row_ed; r++) { - - if (r == 0) { - start_r = -scrollHeight - 1; - } - else { - start_r = visibledatarow[r - 1] - scrollHeight - 1; - } - end_r = visibledatarow[r] - scrollHeight; - - - //行 - //luckysheetTableContent.beginPath(); - //luckysheetTableContent.moveTo(0, end_r + columeHeaderHeight); - //luckysheetTableContent.lineTo(rowHeaderWidth, end_r + columeHeaderHeight); - //luckysheetTableContent.lineWidth = 1; - //luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - //luckysheetTableContent.closePath(); - //luckysheetTableContent.stroke(); - - - - for (var c = dataset_col_st; c <= dataset_col_ed; c++) { - - if (c == 0) { - start_c = -scrollWidth; - } - else { - start_c = visibledatacolumn[c - 1] - scrollWidth; - } - end_c = visibledatacolumn[c] - scrollWidth; - - if(c==dataset_col_ed){ - if (!luckysheetcurrentisPivotTable && end_r <= drawHeight && start_r >= -1) { - //行 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio*(offsetLeft - 1), devicePixelRatio*(end_r + offsetTop - 2 + 0.5)); - luckysheetTableContent.lineTo(devicePixelRatio*(end_c + offsetLeft-2), devicePixelRatio*(end_r + offsetTop - 2 + 0.5)); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - //luckysheetTableContent.beginPath(); - //luckysheetTableContent.moveTo(end_c - 2 + offsetLeft, 0.5 + offsetTop); - //luckysheetTableContent.lineTo(end_c - 2 + offsetLeft, rh_height + offsetTop); - //luckysheetTableContent.lineWidth = 1; - //luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - //luckysheetTableContent.closePath(); - //luckysheetTableContent.stroke(); - } - } - - if (r == dataset_row_st) { - //var abc = luckysheet.luckysheetchatatABC(c); - //var textMetrics = luckysheetTableContent.measureText(abc); - //luckysheetTableContent.fillText(abc, Math.round(start_c + offsetLeft + (end_c - start_c - textMetrics.width) / 2), Math.round(offsetTop / 2 - 2)); - - //luckysheetTableContent.clearRect(start_c + offsetLeft - 1, offsetTop-1, end_c - start_c - 1, 1); - - // luckysheetTableContent.clearRect(start_c + offsetLeft - 1, offsetTop+drawHeight, end_c - start_c - 1, 1); - - if (!luckysheetcurrentisPivotTable && end_c <= drawWidth + 18 && start_c >= -1) { - //列 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio*(end_c + offsetLeft - 2 + 0.5), devicePixelRatio*(offsetTop - 1)); - luckysheetTableContent.lineTo(devicePixelRatio*(end_c + offsetLeft - 2 + 0.5), devicePixelRatio*(fill_row_ed - fill_row_st + offsetTop-2)); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - //luckysheetTableContent.beginPath(); - //luckysheetTableContent.moveTo(0.5 + offsetLeft, end_r + offsetTop); - //luckysheetTableContent.lineTo(ch_width + offsetLeft, end_r + offsetTop); - //luckysheetTableContent.lineWidth = devicePixelRatio; - //luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - //luckysheetTableContent.closePath(); - //luckysheetTableContent.stroke(); - } - } - - if (!!luckysheetcurrentisPivotTable && luckysheet.pivotTable.drawPivotTable) { - if ((c == 0 || c == 5) && r <= 11) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), devicePixelRatio*(start_r + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), devicePixelRatio*(end_r - 2 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - //luckysheetTableContent.clearRect(end_c - 2 + offsetLeft, offsetTop, 2, offsetTop); - } - - if ((r == 2 || r == 11) && c <= 5) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio*(start_c - 1 + offsetLeft), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio*(end_c + offsetLeft-2), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - if (r == 6 && c == 3) { - luckysheetTableContent.fillText("数据透视表", devicePixelRatio*(start_c + 4 + offsetLeft), devicePixelRatio*(start_r + (end_r - start_r) / 2 - 1 + offsetTop)); - } - } - else if (!!luckysheetcurrentisPivotTable) { - if (c < luckysheet.pivotTable.pivotTableBoundary[1] && r < luckysheet.pivotTable.pivotTableBoundary[0]) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), devicePixelRatio*(start_r + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), devicePixelRatio*(end_r - 2 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - //luckysheetTableContent.clearRect(end_c + offsetLeft - 2, 0, 2, offsetTop); - - - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(devicePixelRatio*(start_c - 1 + offsetLeft), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineTo(devicePixelRatio*(end_c + offsetLeft-2), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - } - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - - } - else { - //&& start_r >= -2 && start_c >= -2 - //&& end_r <= drawHeight && end_c <= drawWidth + 18 - if (luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null && start_r >= -1 && start_c >= -1 ) { - - var value = luckysheet.flowdata[r][c]; - - var firstcolumlen = defaultcollen; - if (config["columlen"] != null && config["columlen"][c] != null) { - firstcolumlen = config["columlen"][c]; - } - - if(luckysheet.getObjType(value) == "object" && ("mc" in value)){ - - //console.log(value); - if("rs" in value["mc"]){ - var key = "r"+ r + "c" + c; - mergeCache[key] = cellupdate.length; - } - else{ - var key = "r"+ value["mc"].r + "c" + value["mc"].c; - var margeMain = cellupdate[mergeCache[key]]; - - if(margeMain==null){ - mergeCache[key] = cellupdate.length; - cellupdate.push({"r":r, "c":c,"start_c":start_c, "start_r":start_r, "end_r":end_r, "end_c":end_c, "firstcolumlen":firstcolumlen, startlist:[]}); - } - else{ - if(margeMain.c==c){ - margeMain.end_r += (end_r-start_r-1); - margeMain.startlist.push(start_r); - } - - if(margeMain.r==r){ - margeMain.end_c += (end_c-start_c); - margeMain.firstcolumlen += firstcolumlen; - } - - - var margeMaindata = luckysheet.flowdata[margeMain.r][margeMain.c]; - if((margeMain.c + margeMaindata.mc.cs-1)==c && (margeMain.r + margeMaindata.mc.rs-1)==r){ - //margeMain.end_r -= 10; - //margeMain.end_c -= 1; - } - } - - continue; - - } - } - cellupdate.push({"r":r, "c":c,"start_c":start_c, "start_r":start_r, "end_r":end_r, "end_c":end_c, "firstcolumlen":firstcolumlen, startlist:[]}); - } - - //luckysheetTableContent.fillText("111", start_c + 4 + offsetLeft, start_r + (end_r - start_r) / 2 - 1 + offsetTop); - - } - - - - - //if (r == dataset_row_ed) { - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(end_c + rowHeaderWidth, -0.5); - // luckysheetTableContent.lineTo(end_c + rowHeaderWidth, columeHeaderHeight+rh_height); - // luckysheetTableContent.lineWidth = 1; - // luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - // luckysheetTableContent.closePath(); - // luckysheetTableContent.stroke(); - // console.log("end_c, rh_height", dataset_col_st, dataset_col_ed, dataset_row_st, dataset_row_ed, r_set, c_set, rowfix, $("#luckysheetsheettable_" + luckysheet.currentSheetIndex + "_" + r_set + "_" + c_set + ""), end_c, h, r,c); - //} - - } - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - - } - else { - //luckysheetTableContent.clearRect(offsetLeft-1, start_r - 1 + offsetTop, 1, end_r - start_r - 1); - - //luckysheetTableContent.clearRect(start_c + offsetLeft - 1, offsetTop+drawHeight - 1, end_c - start_c - 1, 1); - - //var textMetrics = luckysheetTableContent.measureText(r + 1); - //luckysheetTableContent.fillText(r + 1, (offsetLeft - textMetrics.width) / 2, start_r + (end_r - start_r) / 2 - 2 + offsetTop); - } - - - } - - - - //console.log(cellupdate) - for(var cud=0;cud firstcolumlen) { - // var v = "", value_array = value.toString().split(""); - // var mid = Math.floor(value_array.length/2), posState = true, i=1, pos = mid; - // while (pos>=0 && pos firstcolumlen) { - // break; - // } - - // if(posState){ - // pos = mid + i; - // } - // else{ - // pos = mid - i++; - // } - // posState = !posState; - // } - // value = v; - // } - - //textMetrics = offlinecanvas.measureText(value).width; - - horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft)*devicePixelRatio - (textMetrics)/2; - // if(horizonAlignPos firstcolumlen) { - // var v = "", value_array = value.toString().split(""); - // for (var i = value_array.length-1; i >=0; i--) { - // v = value_array[i] + v; - // var measureW = offlinecanvas.measureText(v).width; - // //console.log(v,measureW , firstcolumlen); - // if (measureW+fontsize > firstcolumlen) { - // break; - // } - // } - // value = v; - // } - - //textMetrics = offlinecanvas.measureText(value).width; - - horizonAlignPos = (end_c + offsetLeft - 8)*devicePixelRatio - (textMetrics); - // if(horizonAlignPos firstcolumlen) { - // var v = "", value_array = value.toString().split(""); - // for (var i = 0; i < value_array.length; i++) { - // v += value_array[i]; - // var measureW = offlinecanvas.measureText(v).width; - // //console.log(v,measureW , firstcolumlen); - // if (measureW > firstcolumlen) { - // break; - // } - // } - // value = v; - // } - } - - - var verticalAlign = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "vt"); - var verticalFixed = luckysheet.browser.luckysheetrefreshfixed(); - var verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed)*devicePixelRatio - oneLineTextHeight; - if(verticalAlign=="0"){ - verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed)*devicePixelRatio - oneLineTextHeight/2; - // if(verticalAlignPos (end_c - start_c)){ - var strValue = value.toString(); - var cellWidth = end_c-start_c-8; - var strArr = []; - for(var strI = 1; strI <= strValue.length; strI++){ - var strV = strValue.substring(strArr.join("").length,strI); - var strtextMetrics = offlinecanvas.measureText(strV).width; - if(strtextMetrics > cellWidth){ - strArr.push(strValue.substring(strArr.join("").length,strI - 1)); - strI = strI - 2; - }else if(strtextMetrics <= cellWidth && strI == strValue.length){ - strArr.push(strV); - } - } - for(var iFill = 0; iFill < strArr.length; iFill++){ - //水平对齐计算 - var strWidth = offlinecanvas.measureText(strArr[iFill]).width; - if(horizonAlign == "0"){ - horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft)*devicePixelRatio - (strWidth)/2; - }else if(horizonAlign == "2"){ - horizonAlignPos = (end_c + offsetLeft - 8)*devicePixelRatio - (strWidth); - }else{ - horizonAlignPos = (start_c + 4 + offsetLeft)*devicePixelRatio; - } - //垂直对齐计算 - if(verticalAlign == "0"){ - verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed)*devicePixelRatio - oneLineTextHeight*strArr.length/2; - }else if(verticalAlign == "1"){ - verticalAlignPos = (start_r + offsetTop + verticalFixed)*devicePixelRatio; - }else{ - verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed)*devicePixelRatio - oneLineTextHeight*strArr.length; - } - offlinecanvas.fillText(strArr[iFill], horizonAlignPos, (verticalAlignPos+iFill*oneLineTextHeight)); - } - } - else if(!!luckysheet.flowdata[r][c].tr && luckysheet.flowdata[r][c].tr != "0"){ - //单元格旋转属性 - var tr = luckysheet.flowdata[r][c].tr; - if(tr == "1" || tr == "2"){ - //旋转重新计算水平、垂直方向坐标 - var textW = 0.707 * (textMetrics + oneLineTextHeight); - var textH = 0.707 * (textMetrics + oneLineTextHeight); - - var hAP = (start_c + 4 + offsetLeft)*devicePixelRatio; - if(horizonAlign=="0"){ - hAP = (start_c + (end_c - start_c) / 2 + offsetLeft)*devicePixelRatio - (textW)/2; - } - else if(horizonAlign=="2"){ - hAP = (end_c + offsetLeft - 8)*devicePixelRatio - (textW); - } - - var vAP = (end_r + offsetTop - 2 + verticalFixed)*devicePixelRatio - textH; - if(verticalAlign=="0"){ - vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed)*devicePixelRatio - textH/2; - } - else if(verticalAlign=="1"){ - vAP = (start_r + offsetTop + verticalFixed)*devicePixelRatio; - } - //向下倾斜(45 旋转) - if(tr == "1"){ - offlinecanvas.save(); - offlinecanvas.translate(hAP, vAP); - offlinecanvas.rotate(45*Math.PI/180); - offlinecanvas.translate(-hAP, -vAP); - offlinecanvas.fillText(value==null?"":value, hAP + (0.707*0.707*oneLineTextHeight), vAP - (0.707*0.707*oneLineTextHeight)); - offlinecanvas.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !!value){ - offlinecanvas.beginPath(); - offlinecanvas.moveTo(hAP + oneLineTextHeight/2, vAP + oneLineTextHeight/2); - offlinecanvas.lineTo(hAP + textW - oneLineTextHeight/2, vAP + textH - oneLineTextHeight/2); - offlinecanvas.closePath(); - offlinecanvas.stroke(); - } - } - //向上倾斜(-45 旋转) - if(tr == "2"){ - offlinecanvas.save(); - offlinecanvas.translate(hAP + textW, vAP); - offlinecanvas.rotate(-45*Math.PI/180); - offlinecanvas.translate(-(hAP + textW), -vAP); - offlinecanvas.fillText(value==null?"":value, hAP - (0.707*0.707*oneLineTextHeight), vAP - (0.707*0.707*oneLineTextHeight)); - offlinecanvas.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !!value){ - offlinecanvas.beginPath(); - offlinecanvas.moveTo(hAP + oneLineTextHeight/2, vAP + textH - oneLineTextHeight/2); - offlinecanvas.lineTo(hAP + textW - oneLineTextHeight/2, vAP + oneLineTextHeight/2); - offlinecanvas.closePath(); - offlinecanvas.stroke(); - } - } - } - else if(tr == "3"){ - if(!!value){ - value = value.toString(); - if(value.length > 1){ - var vArr = value.split(""); - } - else{ - var vArr = []; - vArr.push(value); - } - - var textW = offlinecanvas.measureText(vArr[0]).width; - var textH = vArr.length * oneLineTextHeight; - for(var i = 0; i < vArr.length; i++){ - var vWidth = offlinecanvas.measureText(vArr[i]).width; - //水平对齐计算 - if(horizonAlign == "0"){ - horizonAlignPos = (start_c + (end_c - start_c) / 2 + offsetLeft)*devicePixelRatio - (vWidth)/2; - }else if(horizonAlign == "2"){ - horizonAlignPos = (end_c + offsetLeft - 8)*devicePixelRatio - (vWidth); - }else{ - horizonAlignPos = (start_c + 4 + offsetLeft)*devicePixelRatio; - } - //垂直对齐计算 - if(verticalAlign == "0"){ - verticalAlignPos = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed)*devicePixelRatio - oneLineTextHeight*vArr.length/2; - }else if(verticalAlign == "1"){ - verticalAlignPos = (start_r + offsetTop + verticalFixed)*devicePixelRatio; - }else{ - verticalAlignPos = (end_r + offsetTop - 2 + verticalFixed)*devicePixelRatio - oneLineTextHeight*vArr.length; - } - offlinecanvas.fillText(vArr[i], horizonAlignPos, (verticalAlignPos+i*oneLineTextHeight)); - } - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !!value){ - offlinecanvas.beginPath(); - offlinecanvas.moveTo(horizonAlignPos + textW/2, verticalAlignPos); - offlinecanvas.lineTo(horizonAlignPos + textW/2, verticalAlignPos + textH); - offlinecanvas.closePath(); - offlinecanvas.stroke(); - } - } - } - else if(tr == "4" || tr == "5"){ - //旋转重新计算水平、垂直方向坐标 - var textW = oneLineTextHeight; - var textH = textMetrics; - - var hAP = (start_c + 4 + offsetLeft)*devicePixelRatio; - if(horizonAlign=="0"){ - hAP = (start_c + (end_c - start_c) / 2 + offsetLeft)*devicePixelRatio - (textW)/2; - } - else if(horizonAlign=="2"){ - hAP = (end_c + offsetLeft - 8)*devicePixelRatio - (textW); - } - - var vAP = (end_r + offsetTop - 2 + verticalFixed)*devicePixelRatio - textH; - if(verticalAlign=="0"){ - vAP = (start_r + (end_r - start_r) / 2 + offsetTop + verticalFixed)*devicePixelRatio - textH/2; - } - else if(verticalAlign=="1"){ - vAP = (start_r + offsetTop + verticalFixed)*devicePixelRatio; - } - //向下90(90 旋转) - if(tr == "4"){ - offlinecanvas.save(); - offlinecanvas.translate(hAP, vAP); - offlinecanvas.rotate(90*Math.PI/180); - offlinecanvas.translate(-hAP, -vAP); - offlinecanvas.fillText(value==null?"":value, hAP, vAP - textW); - offlinecanvas.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !!value){ - offlinecanvas.beginPath(); - offlinecanvas.moveTo(hAP + textW/2, vAP); - offlinecanvas.lineTo(hAP + textW/2, vAP + textH); - offlinecanvas.closePath(); - offlinecanvas.stroke(); - } - } - //向上90(-90 旋转) - if(tr == "5"){ - offlinecanvas.save(); - offlinecanvas.translate(hAP + textH, vAP); - offlinecanvas.rotate(-90*Math.PI/180); - offlinecanvas.translate(-(hAP + textH), -vAP); - offlinecanvas.fillText(value==null?"":value, hAP, vAP - textH); - offlinecanvas.restore(); - - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !!value){ - offlinecanvas.beginPath(); - offlinecanvas.moveTo(hAP + textW/2, vAP); - offlinecanvas.lineTo(hAP + textW/2, vAP + textH); - offlinecanvas.closePath(); - offlinecanvas.stroke(); - } - } - } - } - else{ - //是否有删除线 - var cl = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "cl"); - if(cl == "1" && !!value){ - luckysheetTableContent.strokeStyle = "#000000"; - - offlinecanvas.beginPath(); - offlinecanvas.moveTo(horizonAlignPos, verticalAlignPos + oneLineTextHeight/2); - offlinecanvas.lineTo(horizonAlignPos + textMetrics, verticalAlignPos + oneLineTextHeight/2); - offlinecanvas.closePath(); - offlinecanvas.stroke(); - - offlinecanvas.textBaseline = "middle"; - offlinecanvas.fillText(value==null?"":value, horizonAlignPos, verticalAlignPos + oneLineTextHeight/2); - } - else{ - offlinecanvas.textBaseline = "top"; - offlinecanvas.fillText(value==null?"":value, horizonAlignPos, verticalAlignPos); - } - } - - offlinecanvas.font = luckysheetdefaultstyle.font; - - //var imgData= offlinecanvas.getImageData(cellsize[0], cellsize[1], cellsize[2], cellsize[3]); - - //console.log(cellsize[0], cellsize[1], cellsize[2], cellsize[3], horizonAlignPos, verticalAlignPos); - - // luckysheetTableContent.imageSmoothingEnabled = false; - // luckysheetTableContent.mozImageSmoothingEnabled = false; - // luckysheetTableContent.webkitImageSmoothingEnabled = false; - // luckysheetTableContent.msImageSmoothingEnabled = false; - // luckysheetTableContent.oImageSmoothingEnabled = false; - - - luckysheetTableContent.drawImage($("#luckysheetTableContentF").get(0), cellsize[0], cellsize[1], cellsize[2], cellsize[3], cellsize[0], cellsize[1], cellsize[2], cellsize[3]); - - - // luckysheetTableContent.imageSmoothingEnabled = true; - // luckysheetTableContent.mozImageSmoothingEnabled = true; - // luckysheetTableContent.webkitImageSmoothingEnabled = true; - // luckysheetTableContent.msImageSmoothingEnabled = true; - // luckysheetTableContent.oImageSmoothingEnabled = true; - - //luckysheetTableContent.drawImage($("#luckysheetTableContentF").get(0), start_c - 1 + offsetLeft+borderfix[0], start_r + offsetTop+borderfix[1], end_c - start_c -2+borderfix[2], end_r - start_r-3+borderfix[3], start_c - 1 + offsetLeft+borderfix[0], start_r + offsetTop+borderfix[1], end_c - start_c -2+borderfix[2], end_r - start_r-3+borderfix[3]); - - // luckysheetTableContent.fillStyle= "#fff"; - // var clearNextCellLen = defaultcollen; - // if (config["columlen"] != null && config["columlen"][ec +1] != null) { - // clearNextCellLen = config["columlen"][ec+1]; - // } - // luckysheetTableContent.fillRect(end_ec - 3 + offsetLeft, start_r + offsetTop, clearNextCellLen, end_r - 2 -start_r-1); - - - - - var bs = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bs"); - var bc = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bc"); - var bs_t = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bs_t"); - var bc_t = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bc_t"); - var bs_b = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bs_b"); - var bc_b = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bc_b"); - var bs_l = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bs_l"); - var bc_l = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bc_l"); - var bs_r = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bs_r"); - var bc_r = luckysheet.menuButton.checkstatus(luckysheet.flowdata, r, c , "bc_r"); - - //左边框 - //console.log(r, c , value, bs_l, bc_l); - if(bs_l!="none" || bs!="none"){ - var linetype = bs_l=="none" ?bs:bs_l; - - luckysheet.menuButton.setLineDash(luckysheetTableContent, linetype, "v", devicePixelRatio*(start_c - 2+ 0.5 + offsetLeft), devicePixelRatio*(start_r + offsetTop), devicePixelRatio*(start_c - 2+ 0.5 + offsetLeft), devicePixelRatio*(end_r - 2 + offsetTop)); - - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(start_c - 2 + offsetLeft, start_r + offsetTop); - // luckysheetTableContent.lineTo(start_c - 2 + offsetLeft, end_r - 2 + offsetTop); - // luckysheetTableContent.lineWidth = 1; - - - luckysheetTableContent.strokeStyle = bs_l=="none" ?bc:bc_l; - - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - } - // else{ - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(devicePixelRatio*(start_c - 2+ 0.5 + offsetLeft), devicePixelRatio*(start_r + offsetTop)); - // luckysheetTableContent.lineTo(devicePixelRatio*(start_c - 2+ 0.5 + offsetLeft), devicePixelRatio*(end_r - 2 + offsetTop)); - // luckysheetTableContent.lineWidth = devicePixelRatio; - - // if (!!luckysheetcurrentisPivotTable && !luckysheet.pivotTable.drawPivotTable) { - // luckysheetTableContent.strokeStyle = "#000000"; - // } - // else{ - // luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - // } - - - // luckysheetTableContent.stroke(); - // luckysheetTableContent.closePath(); - // } - - // //右边框 - if(bs_r!="none" || bs!="none"){ - //console.log(11112222); - var linetype = bs_r=="none" ?bs:bs_r; - - luckysheet.menuButton.setLineDash(luckysheetTableContent, linetype, "v", devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), devicePixelRatio*(start_r + offsetTop), devicePixelRatio*(end_c - 2 + 0.5 + offsetLeft), devicePixelRatio*(end_r - 2 + offsetTop)); - - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(end_c - 2 + offsetLeft, start_r + offsetTop); - // luckysheetTableContent.lineTo(end_c - 2 + offsetLeft, end_r - 2 + offsetTop); - // luckysheetTableContent.lineWidth = devicePixelRatio; - - luckysheetTableContent.strokeStyle = bs_r=="none" ?bc:bc_r; - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - } - // else { - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(end_c - 2 + offsetLeft, start_r + offsetTop); - // luckysheetTableContent.lineTo(end_c - 2 + offsetLeft, end_r - 2 + offsetTop); - // luckysheetTableContent.lineWidth = devicePixelRatio; - - // luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - // luckysheetTableContent.stroke(); - // luckysheetTableContent.closePath(); - // } - - //下边框 - if(bs_b!="none" || bs!="none"){ - //console.log(11112222); - var linetype = bs_b=="none" ?bs:bs_b; - - luckysheet.menuButton.setLineDash(luckysheetTableContent, linetype, "h", devicePixelRatio*(start_c - 2 + offsetLeft), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop), devicePixelRatio*(end_c + offsetLeft-2), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(start_c - 2 + offsetLeft, end_r - 2 + offsetTop); - // luckysheetTableContent.lineTo(end_c + offsetLeft-2, end_r - 2 + offsetTop); - // luckysheetTableContent.lineWidth = devicePixelRatio; - - luckysheetTableContent.strokeStyle = bs_b=="none" ?bc:bc_b; - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - } - // else{ - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(devicePixelRatio*(start_c - 2 + offsetLeft), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - // luckysheetTableContent.lineTo(devicePixelRatio*(end_c + offsetLeft-2), devicePixelRatio*(end_r - 2 + 0.5 + offsetTop)); - // luckysheetTableContent.lineWidth = devicePixelRatio; - - // if (!!luckysheetcurrentisPivotTable && !luckysheet.pivotTable.drawPivotTable) { - // luckysheetTableContent.strokeStyle = "#000000"; - // } - // else{ - // luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - // } - - // luckysheetTableContent.stroke(); - // luckysheetTableContent.closePath(); - // } - - //上边框 - if(bs_t!="none" || bs!="none"){ - //console.log(11112222); - var linetype = bs_t=="none" ?bs:bs_t; - - luckysheet.menuButton.setLineDash(luckysheetTableContent, linetype, "h", devicePixelRatio*(start_c - 2 + offsetLeft), devicePixelRatio*(start_r - 1 + 0.5 + offsetTop), devicePixelRatio*(end_c + offsetLeft-2), devicePixelRatio*(start_r - 1 + 0.5 + offsetTop)); - - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(start_c - 2 + offsetLeft, start_r - 1 + offsetTop); - // luckysheetTableContent.lineTo(end_c + offsetLeft-2, start_r - 1 + offsetTop); - // luckysheetTableContent.lineWidth = devicePixelRatio; - - luckysheetTableContent.strokeStyle = bs_t=="none" ?bc:bc_t; - luckysheetTableContent.stroke(); - luckysheetTableContent.closePath(); - } - - //补全缺失的上边框 - // var startlist = item.startlist; - // //console.log(startlist); - // for(var i = 0;i (ch_width + offsetLeft) ? (ch_width + offsetLeft - 2) : drawWidth - 2 + offsetLeft, offsetTop, drawWidth, drawHeight); - } - - function luckysheetDrawgrid_c(scrollWidth, scrollHeight, drawWidth, drawHeight, offsetLeft, offsetTop) { - if (scrollWidth == null) { - scrollWidth = $("#luckysheet-cell-main").scrollLeft(); - } - if (scrollHeight == null) { - scrollHeight = $("#luckysheet-cell-main").scrollTop(); - } - - if (drawWidth == null) { - drawWidth = luckysheetTableContentHW[0]; - } - if (drawHeight == null) { - drawHeight = luckysheetTableContentHW[1]; - } - - if (offsetLeft == null) { - offsetLeft = 0; - } - if (offsetTop == null) { - offsetTop = 0; - } - - //luckysheetTableContentHW = [$("#luckysheet-grid-window-1").width() - 13, $("#luckysheet-grid-window-1").height() - 13]; - var luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - luckysheetTableContent.clearRect(offsetLeft, offsetTop, drawWidth, drawHeight); - - - luckysheetTableContent.font = luckysheetdefaultstyle.font; - luckysheetTableContent.textBaseline = luckysheetdefaultstyle.textBaseline; - luckysheetTableContent.fillStyle = luckysheetdefaultstyle.fillStyle; - - var dataset_row_st, dataset_row_ed, dataset_col_st, dataset_col_ed; - dataset_row_st = luckysheet_searcharray(visibledatarow, scrollHeight); - dataset_row_ed = luckysheet_searcharray(visibledatarow, scrollHeight + drawHeight); - if (dataset_row_st == -1) { - dataset_row_st = 0; - } - if (dataset_row_ed == -1) { - dataset_row_ed = visibledatarow.length - 1; - } - dataset_col_st = luckysheet_searcharray(visibledatacolumn, scrollWidth); - dataset_col_ed = luckysheet_searcharray(visibledatacolumn, scrollWidth + drawWidth); - if (dataset_col_st == -1) { - dataset_col_st = 0; - } - if (dataset_col_ed == -1) { - dataset_col_ed = visibledatacolumn.length - 1; - } - //console.log(dataset_row_st, dataset_row_ed, dataset_col_st, dataset_col_ed); - var end_r, start_r, end_c, start_c, flow_index = 0, flow_cols_index = 0, rowfix = 0, colfix = 0, colLineState = true; - - // $("#luckysheet-cell-main").scrollLeft(visibledatarow[dataset_row_st]); - // $("#luckysheet-cell-main").scrollTop(visibledatacolumn[dataset_col_st]); - - for (var r = dataset_row_st; r <= dataset_row_ed; r++) { - - if (r == 0) { - start_r = -scrollHeight - 1; - } - else { - start_r = visibledatarow[r - 1] - scrollHeight - 1; - } - end_r = visibledatarow[r] - scrollHeight; - - - //行 - //luckysheetTableContent.beginPath(); - //luckysheetTableContent.moveTo(0, end_r + columeHeaderHeight); - //luckysheetTableContent.lineTo(rowHeaderWidth, end_r + columeHeaderHeight); - //luckysheetTableContent.lineWidth = devicePixelRatio; - //luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - //luckysheetTableContent.closePath(); - //luckysheetTableContent.stroke(); - - - - for (var c = dataset_col_st; c <= dataset_col_ed; c++) { - - if (c == 0) { - start_c = -scrollWidth; - } - else { - start_c = visibledatacolumn[c - 1] - scrollWidth; - } - end_c = visibledatacolumn[c] - scrollWidth; - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - - } - else { - //&& start_r >= -2 && start_c >= -2 - if (luckysheet.flowdata[r] != null && luckysheet.flowdata[r][c] != null) { - var textMetrics = luckysheetTableContent.measureText(luckysheet.flowdata[r][c]); - luckysheetTableContent.clearRect(start_c + rowHeaderWidth - 1 + offsetLeft, start_r + columeHeaderHeight + offsetTop, end_c - start_c - 1, end_r - start_r); - luckysheetTableContent.fillText(luckysheet.flowdata[r][c], start_c + 4 + rowHeaderWidth + offsetLeft, columeHeaderHeight + start_r + (end_r - start_r) / 2 - 1 + offsetTop); - - } - } - - if (r == dataset_row_ed) { - luckysheetTableContent.clearRect(start_c + rowHeaderWidth - 1, 0, end_c - start_c - 1, columeHeaderHeight - 2); - - if (!luckysheetcurrentisPivotTable) { - //列 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(end_c + rowHeaderWidth - 2 + offsetLeft, 0.5 + offsetTop); - luckysheetTableContent.lineTo(end_c + rowHeaderWidth - 2 + offsetLeft, columeHeaderHeight + rh_height + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - var abc = luckysheet.luckysheetchatatABC(c); - var textMetrics = luckysheetTableContent.measureText(abc); - luckysheetTableContent.fillText(abc, Math.round(start_c + rowHeaderWidth + (end_c - start_c - textMetrics.width) / 2), Math.round(columeHeaderHeight / 2 - 2)); - //console.log(abc, Math.round(start_c + (end_c - start_c) / 2), Math.round(columeHeaderHeight / 2 - 2)); - } - - if (!!luckysheetcurrentisPivotTable && luckysheet.pivotTable.drawPivotTable) { - if ((c == 0 || c == 5) && r <= 11) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(end_c + rowHeaderWidth - 2 + offsetLeft, columeHeaderHeight + start_r + offsetTop); - luckysheetTableContent.lineTo(end_c + rowHeaderWidth - 2 + offsetLeft, columeHeaderHeight + end_r - 2 + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - luckysheetTableContent.clearRect(end_c + rowHeaderWidth - 2 + offsetLeft, offsetTop, 2, columeHeaderHeight); - } - - if ((r == 2 || r == 11) && c <= 5) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(rowHeaderWidth - 1 + start_c + offsetLeft, end_r + columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineTo(rowHeaderWidth + end_c + offsetLeft, end_r + columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - if (r == 6 && c == 3) { - luckysheetTableContent.fillText("数据透视表", start_c + 4 + rowHeaderWidth + offsetLeft, columeHeaderHeight + start_r + (end_r - start_r) / 2 - 1 + offsetTop); - } - } - else if (!!luckysheetcurrentisPivotTable) { - if (c < luckysheet.pivotTable.pivotTableBoundary[1] && r < luckysheet.pivotTable.pivotTableBoundary[0]) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(end_c + rowHeaderWidth - 2 + offsetLeft, columeHeaderHeight + start_r + offsetTop); - luckysheetTableContent.lineTo(end_c + rowHeaderWidth - 2 + offsetLeft, columeHeaderHeight + end_r - 2 + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - luckysheetTableContent.clearRect(end_c + rowHeaderWidth - 2, 0, 2, columeHeaderHeight); - - - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(rowHeaderWidth - 1 + start_c + offsetLeft, end_r + columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineTo(rowHeaderWidth + end_c + offsetLeft, end_r + columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = "#000000"; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - } - - - //if (r == dataset_row_ed) { - // luckysheetTableContent.beginPath(); - // luckysheetTableContent.moveTo(end_c + rowHeaderWidth, -0.5); - // luckysheetTableContent.lineTo(end_c + rowHeaderWidth, columeHeaderHeight+rh_height); - // luckysheetTableContent.lineWidth = devicePixelRatio; - // luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - // luckysheetTableContent.closePath(); - // luckysheetTableContent.stroke(); - // console.log("end_c, rh_height", dataset_col_st, dataset_col_ed, dataset_row_st, dataset_row_ed, r_set, c_set, rowfix, $("#luckysheetsheettable_" + luckysheet.currentSheetIndex + "_" + r_set + "_" + c_set + ""), end_c, h, r,c); - //} - - } - - if (config["rowhidden"] != null && config["rowhidden"][r] != null) { - - } - else { - luckysheetTableContent.clearRect(offsetLeft, start_r + columeHeaderHeight - 1 + offsetTop, rowHeaderWidth - 2, end_r - start_r - 1); - var textMetrics = luckysheetTableContent.measureText(r + 1); - luckysheetTableContent.fillText(r + 1, offsetLeft + (rowHeaderWidth - textMetrics.width) / 2, columeHeaderHeight + start_r + (end_r - start_r) / 2 - 2 + offsetTop); - //console.log((rowHeaderWidth - textMetrics.width) / 2, rowHeaderWidth, textMetrics); - } - - - if (!luckysheetcurrentisPivotTable) { - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(-0.5 + offsetLeft, end_r + columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineTo(rowHeaderWidth + ch_width + offsetLeft, end_r + columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - } - - } - - //竖线 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(rowHeaderWidth - 2 + offsetLeft, -0.5 + offsetTop); - luckysheetTableContent.lineTo(rowHeaderWidth - 2 + offsetLeft, columeHeaderHeight + rh_height + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - //横线 - luckysheetTableContent.beginPath(); - luckysheetTableContent.moveTo(-0.5 + offsetLeft, columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineTo(rowHeaderWidth + ch_width + offsetLeft, columeHeaderHeight - 2 + offsetTop); - luckysheetTableContent.lineWidth = devicePixelRatio; - luckysheetTableContent.strokeStyle = luckysheetdefaultstyle.strokeStyle; - luckysheetTableContent.closePath(); - luckysheetTableContent.stroke(); - - luckysheetTableContent.clearRect(offsetLeft, offsetTop, rowHeaderWidth - 2, columeHeaderHeight - 2); - - - luckysheetTableContent.clearRect(drawWidth > (ch_width + rowHeaderWidth) ? (ch_width + rowHeaderWidth - 2) : drawWidth - 2 + offsetLeft, offsetTop, drawWidth, drawHeight); - } - - luckysheet.luckysheetcreatedom = function (colwidth, rowheight, data, menu, title) { - if(!luckysheetConfigsetting.pointEdit){ - //最少30行 - if(rowheight < 30){ - rowheight = 30; - } - - //最少22列 - if(colwidth < 22){ - colwidth = 22; - } - } - - var gh = gridHTML; - gh = luckysheet.replaceHtml(gh, { "logotitle": title });//设置title - gh = luckysheet.replaceHtml(gh, { "menu": menuToolBar });//设置需要显示的菜单 - - if (data.length == 0) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, rowheight, colwidth); - } - else if (data.length < rowheight && data[0].length < colwidth) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, rowheight - data.length, colwidth - data[0].length); - } - else if (data.length < rowheight) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, rowheight - data.length, 0); - } - else if (data[0].length < colwidth) { - luckysheet.flowdata = luckysheet.datagridgrowth(data, 0, colwidth - data[0].length); - } - else { - luckysheet.flowdata = data; - } - - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - - var flowHTML = flow; - if(config == null){ - config = {}; - } - - //列宽重置 - visibledatacolumn = []; - ch_width = 0; - for (var i = 0; i < colwidth; i++) { - var firstcolumlen = defaultcollen; - if (config["columlen"] != null && config["columlen"][i] != null) { - firstcolumlen = config["columlen"][i]; - } - else { - if (data[0] != null && data[0][i] != null) { - firstcolumlen = Math.ceil(luckysheet.getByteLen(data[0][i].v) * 11.5); - if (firstcolumlen > 300) { - firstcolumlen = 300; - } - else if (firstcolumlen < defaultcollen) { - firstcolumlen = defaultcollen; - } - - if (firstcolumlen != defaultcollen) { - if (config["columlen"] == null) { - config["columlen"] = {}; - } - config["columlen"][i] = firstcolumlen; - } - } - } - ch_width += firstcolumlen + 1; - visibledatacolumn.push(ch_width); //列的临时长度分布 - } - - //行高重置 - visibledatarow = []; - rh_height = 0; - for (var i = 0; i < rowheight; i++) { - var rowlen = defaultrowlen; - if (config["rowlen"] != null && config["rowlen"][i] != null) { - rowlen = config["rowlen"][i]; - } - - if (config["rowhidden"] != null && config["rowhidden"][i] != null) { - rowlen = config["rowhidden"][i]; - visibledatarow.push(rh_height); - continue; - } - else { - rh_height += rowlen + 1; - } - visibledatarow.push(rh_height); //行的临时长度分布 - } - - if(!luckysheetConfigsetting.pointEdit){ - //非编辑器表格编辑状态 - rh_height += 110; - ch_width += 120; - - var addControll = '(在底部添加)'; - var backControll = ' '; - // var pageControll = ' 共'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页,每页'+ luckysheetConfigsetting.pageInfo.pageSize +'条 '; - var pageControll = ' 共'+ luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页 '; - var pageControll2 = ' 共'+ luckysheetConfigsetting.total +'条,'+ luckysheetConfigsetting.pageInfo.totalPage +'页,当前已显示'+ (luckysheetConfigsetting.pageInfo.currentPage) +'页'; - - var bottomControll = ""; - if(luckysheetConfigsetting.enableAddRow){ - bottomControll += addControll; - } - - if(luckysheetConfigsetting.enablePage){ - if(parseInt(luckysheetConfigsetting.pageInfo.totalPage) == 1){ - bottomControll += pageControll2; - } - else{ - bottomControll += pageControll; - } - } - - bottomControll += backControll; - - var flowstr = luckysheet.replaceHtml('
'+ bottomControll +'
', { "height": rh_height, "width": ch_width - 1 }); - } - - var colsheader = luckysheet.replaceHtml(columnHeaderHTML, { "width": ch_width, "index": 0, "column": "" }); - - flowHTML = luckysheet.replaceHtml(flowHTML, { "width": ch_width, "flow": flowstr, "index": 0 }); - - gh = luckysheet.replaceHtml(gh, { "flow": flowHTML, "rowHeader": "
", "columnHeader": colsheader, "functionButton": luckysheetConfigsetting.functionButton });//设置需要显示的菜单 - - $("#" + container).append(gh); - - $("#luckysheet-scrollbar-x div").width(ch_width); - $("#luckysheet-scrollbar-y div").height(rh_height - 30); - - //新建行菜单 - $("body").append(maskHTML); - $("body").append(colsmenuHTML); - $("body").append(rightclickHTML); - $("body").append(inputHTML); - $("body").append(luckysheet.replaceHtml(filtermenuHTML, { "menuid": "filter" })); - $("body").append(luckysheet.replaceHtml(filtersubmenuHTML, { "menuid": "filter" })); - $("body").append(sheetconfigHTML); - - //批注 - luckysheet.postil.buildAllPs(luckysheet.flowdata); - } - - function jfexecStroke(refreshcanvas, i) { - refreshcanvas[i++].stroke(); - if (i < refreshcanvas.length) { - setTimeout(function () { - jfexecStroke(refreshcanvas, i); - }, 1000); - } - } - - //sparkline设置 - (function(){ - - var createClass = function (/* [baseclass, [mixin, ...]], definition */) { - var Class, args; - Class = function () { - this.init.apply(this, arguments); - }; - if (arguments.length > 1) { - if (arguments[0]) { - Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]); - Class._super = arguments[0].prototype; - } else { - Class.prototype = arguments[arguments.length - 1]; - } - if (arguments.length > 2) { - args = Array.prototype.slice.call(arguments, 1, -1); - args.unshift(Class.prototype); - $.extend.apply($, args); - } - } else { - Class.prototype = arguments[0]; - } - Class.prototype.cls = Class; - return Class; - }; - - /** - * Wraps a format string for tooltips - * {{x}} - * {{x.2} - * {{x:months}} - */ - var SPFormat = createClass({ - fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g, - precre: /(\w+)\.(\d+)/, - - init: function (format, fclass) { - this.format = format; - this.fclass = fclass; - }, - - render: function (fieldset, lookups, options) { - var self = this, - fields = fieldset, - match, token, lookupkey, fieldvalue, prec; - return this.format.replace(this.fre, function () { - var lookup; - token = arguments[1]; - lookupkey = arguments[3]; - match = self.precre.exec(token); - if (match) { - prec = match[2]; - token = match[1]; - } else { - prec = false; - } - fieldvalue = fields[token]; - if (fieldvalue === undefined) { - return ''; - } - if (lookupkey && lookups && lookups[lookupkey]) { - lookup = lookups[lookupkey]; - if (lookup.get) { // RangeMap - return lookups[lookupkey].get(fieldvalue) || fieldvalue; - } else { - return lookups[lookupkey][fieldvalue] || fieldvalue; - } - } - if (isNumber(fieldvalue)) { - if (options.get('numberFormatter')) { - fieldvalue = options.get('numberFormatter')(fieldvalue); - } else { - fieldvalue = formatNumber(fieldvalue, prec, - options.get('numberDigitGroupCount'), - options.get('numberDigitGroupSep'), - options.get('numberDecimalMark')); - } - } - return fieldvalue; - }); - } - }); - - // convience method to avoid needing the new operator - $.spformat = function(format, fclass) { - return new SPFormat(format, fclass); - }; - - var clipval = function (val, min, max) { - if (val < min) { - return min; - } - if (val > max) { - return max; - } - return val; - }; - - var quartile = function (values, q) { - var vl; - if (q === 2) { - vl = Math.floor(values.length / 2); - return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2; - } else { - if (values.length % 2 ) { // odd - vl = (values.length * q + q) / 4; - return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1]; - } else { //even - vl = (values.length * q + 2) / 4; - return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1]; - - } - } - }; - - var normalizeValue = function (val) { - var nf; - switch (val) { - case 'undefined': - val = undefined; - break; - case 'null': - val = null; - break; - case 'true': - val = true; - break; - case 'false': - val = false; - break; - default: - nf = parseFloat(val); - if (val == nf) { - val = nf; - } - } - return val; - }; - - var normalizeValues = function (vals) { - var i, result = []; - for (i = vals.length; i--;) { - result[i] = normalizeValue(vals[i]); - } - return result; - }; - - - var all = function (val, arr, ignoreNull) { - var i; - for (i = arr.length; i--; ) { - if (ignoreNull && arr[i] === null) continue; - if (arr[i] !== val) { - return false; - } - } - return true; - }; - - // sums the numeric values in an array, ignoring other values - var sum = function (vals) { - var total = 0, i; - for (i = vals.length; i--;) { - total += typeof vals[i] === 'number' ? vals[i] : 0; - } - return total; - }; - - var remove = function (vals, filter) { - var i, vl, result = []; - for (i = 0, vl = vals.length; i < vl; i++) { - if (vals[i] !== filter) { - result.push(vals[i]); - } - } - return result; - }; - - var isNumber = function (num) { - return !isNaN(parseFloat(num)) && isFinite(num); - }; - - var formatNumber = function (num, prec, groupsize, groupsep, decsep) { - var p, i; - num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split(''); - p = (p = $.inArray('.', num)) < 0 ? num.length : p; - if (p < num.length) { - num[p] = decsep; - } - for (i = p - groupsize; i > 0; i -= groupsize) { - num.splice(i, 0, groupsep); - } - return num.join(''); - }; - - - var RangeMap = createClass({ - init: function (map) { - var key, range, rangelist = []; - for (key in map) { - if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) { - range = key.split(':'); - range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]); - range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]); - range[2] = map[key]; - rangelist.push(range); - } - } - this.map = map; - this.rangelist = rangelist || false; - }, - - get: function (value) { - var rangelist = this.rangelist, - i, range, result; - if ((result = this.map[value]) !== undefined) { - return result; - } - if (rangelist) { - for (i = rangelist.length; i--;) { - range = rangelist[i]; - if (range[0] <= value && range[1] >= value) { - return range[2]; - } - } - } - return undefined; - } - }); - - // Convenience function - $.range_map = function(map) { - return new RangeMap(map); - }; - - luckysheet.sparkline = { - defaultOption:{ - // Settings common to most/all chart types - common: { - type: 'line', - lineColor: '#2ec7c9', - fillColor: '#CCF3F4', - defaultPixelsPerValue: 3, - width: 'auto', - height: 'auto', - composite: false, - tagValuesAttribute: 'values', - tagOptionsPrefix: 'spark', - enableTagOptions: false, - enableHighlight: true, - highlightLighten: 1.4, - tooltipSkipNull: true, - tooltipPrefix: '', - tooltipSuffix: '', - disableHiddenCheck: false, - numberFormatter: false, - numberDigitGroupCount: 3, - numberDigitGroupSep: ',', - numberDecimalMark: '.', - disableTooltips: true, - disableInteraction: true, - offsetX:0, - offsetY:0 - }, - // Defaults for line charts - //=LINESPL - line: { - spotColor: 0, - highlightSpotColor: '#5f5', - highlightLineColor: '#f22', - spotRadius: 1.5, - minSpotColor: 0, - maxSpotColor: 0, - lineWidth: 1, - normalRangeMin: undefined, - normalRangeMax: undefined, - normalRangeColor: '#ccc', - drawNormalOnTop: true, - chartRangeMin: undefined, - chartRangeMax: undefined, - chartRangeMinX: undefined, - chartRangeMaxX: undefined, - // tooltipFormat: new SPFormat(' {{prefix}}{{y}}{{suffix}}') - }, - // Defaults for bar charts - bar: { - barColor: '#fc5c5c', - negBarColor: '#97b552', - stackedBarColor: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], - zeroColor: undefined, - nullColor: undefined, - zeroAxis: true, - barWidth: 4, - barSpacing: 1, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false, - colorMap: undefined, - // tooltipFormat: new SPFormat(' {{prefix}}{{value}}{{suffix}}') - }, - column: { - barColor: '#fc5c5c', - negBarColor: '#97b552', - stackedBarColor: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], - zeroColor: undefined, - nullColor: undefined, - zeroAxis: true, - barWidth: 4, - barSpacing: 1, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false, - colorMap: undefined, - // tooltipFormat: new SPFormat(' {{prefix}}{{value}}{{suffix}}') - }, - // Defaults for tristate charts - tristate: { - barWidth: 4, - barSpacing: 1, - posBarColor: '#fc5c5c', - negBarColor: '#97b552', - zeroBarColor: '#999', - colorMap: {}, - // tooltipFormat: new SPFormat(' {{value:map}}'), - // tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } } - }, - // Defaults for discrete charts - discrete: { - lineHeight: 'auto', - thresholdColor: "#fc5c5c", - thresholdValue: 0, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false, - // tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}') - }, - // Defaults for bullet charts - bullet: { - targetColor: '#f33', - targetWidth: 3, // width of the target bar in pixels - performanceColor: '#33f', - rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff','#6D87FF','#5876FF','#4465FF','#2F54FF','#1A43FF','#0532FF'], - base: undefined, // set this to a number to change the base start number - // tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'), - // tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} } - }, - // Defaults for pie charts - pie: { - offset: 0, - sliceColors: ["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], - borderWidth: 0, - borderColor: '#000', - // tooltipFormat: new SPFormat(' {{value}} ({{percent.1}}%)') - }, - // Defaults for box plots - box: { - raw: false, - boxLineColor: '#000', - boxFillColor: '#cdf', - whiskerColor: '#000', - outlierLineColor: '#5E5E5E', - outlierFillColor: '#fff', - medianColor: '#f00', - showOutliers: true, - outlierIQR: 1.5, - spotRadius: 1.5, - target: undefined, - targetColor: '#4a2', - chartRangeMax: undefined, - chartRangeMin: undefined, - // tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'), - // tooltipFormatFieldlistKey: 'field', - // tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median', - // uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier', - // lw: 'Left Whisker', rw: 'Right Whisker'} } - } - }, - line:{ - type: 'line', - init: function (el, values, options, width, height) { - //line._super.init.call(this, el, values, options, width, height); - this.vertices = []; - this.regionMap = []; - this.xvalues = []; - this.yvalues = []; - this.yminmax = []; - this.hightlightSpotId = null; - this.lastShapeId = null; - //this.initTarget(); - }, - getRegion: function (el, x, y) { - var i, - regionMap = this.regionMap; // maps regions to value positions - for (i = regionMap.length; i--;) { - if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) { - return regionMap[i][2]; - } - } - return undefined; - }, - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.yvalues[currentRegion] === null, - x: this.xvalues[currentRegion], - y: this.yvalues[currentRegion], - color: this.options.get('lineColor'), - fillColor: this.options.get('fillColor'), - offset: currentRegion - }; - }, - renderHighlight: function () { - var currentRegion = this.currentRegion, - target = this.target, - vertex = this.vertices[currentRegion], - options = this.options, - spotRadius = options.get('spotRadius'), - highlightSpotColor = options.get('highlightSpotColor'), - highlightLineColor = options.get('highlightLineColor'), - highlightSpot, highlightLine; - - if (!vertex) { - return; - } - if (spotRadius && highlightSpotColor) { - highlightSpot = target.drawCircle(vertex[0], vertex[1], - spotRadius, undefined, highlightSpotColor); - this.highlightSpotId = highlightSpot.id; - target.insertAfterShape(this.lastShapeId, highlightSpot); - } - if (highlightLineColor) { - highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0], - this.canvasTop + this.canvasHeight, highlightLineColor); - this.highlightLineId = highlightLine.id; - target.insertAfterShape(this.lastShapeId, highlightLine); - } - }, - removeHighlight: function () { - var target = this.target; - if (this.highlightSpotId) { - target.removeShapeId(this.highlightSpotId); - this.highlightSpotId = null; - } - if (this.highlightLineId) { - target.removeShapeId(this.highlightLineId); - this.highlightLineId = null; - } - }, - scanValues: function () { - var values = this.values, - valcount = values.length, - xvalues = this.xvalues, - yvalues = this.yvalues, - yminmax = this.yminmax, - i, val, isStr, isArray, sp; - for (i = 0; i < valcount; i++) { - val = values[i]; - isStr = typeof(values[i]) === 'string'; - isArray = typeof(values[i]) === 'object' && values[i] instanceof Array; - sp = isStr && values[i].split(':'); - if (isStr && sp.length === 2) { // x:y - xvalues.push(Number(sp[0])); - yvalues.push(Number(sp[1])); - yminmax.push(Number(sp[1])); - } else if (isArray) { - xvalues.push(val[0]); - yvalues.push(val[1]); - yminmax.push(val[1]); - } else { - xvalues.push(i); - if (values[i] === null || values[i] === 'null') { - yvalues.push(null); - } else { - yvalues.push(Number(val)); - yminmax.push(Number(val)); - } - } - } - if (this.options.get('xvalues')) { - xvalues = this.options.get('xvalues'); - } - - this.maxy = this.maxyorg = Math.max.apply(Math, yminmax); - this.miny = this.minyorg = Math.min.apply(Math, yminmax); - - this.maxx = Math.max.apply(Math, xvalues); - this.minx = Math.min.apply(Math, xvalues); - - this.xvalues = xvalues; - this.yvalues = yvalues; - this.yminmax = yminmax; - - }, - processRangeOptions: function () { - var options = this.options, - normalRangeMin = options.get('normalRangeMin'), - normalRangeMax = options.get('normalRangeMax'); - - if (normalRangeMin !== undefined) { - if (normalRangeMin < this.miny) { - this.miny = normalRangeMin; - } - if (normalRangeMax > this.maxy) { - this.maxy = normalRangeMax; - } - } - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) { - this.miny = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) { - this.maxy = options.get('chartRangeMax'); - } - if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) { - this.minx = options.get('chartRangeMinX'); - } - if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) { - this.maxx = options.get('chartRangeMaxX'); - } - - }, - drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) { - var normalRangeMin = this.options.get('normalRangeMin'), - normalRangeMax = this.options.get('normalRangeMax'), - ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))), - height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey); - //(x1, y1, x2, y2, lineColor, lineWidth) - if(height==0 && normalRangeMin==normalRangeMax){ - height=1; - } - this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append(); - }, - render: function (el,userValues) { - this.vertices = []; - this.regionMap = []; - this.xvalues = []; - this.yvalues = []; - this.yminmax = []; - this.hightlightSpotId = null; - this.lastShapeId = null; - - this.values = userValues; - - var options = this.options, - target = this.target, - - canvasWidth = el.mergedOptions.width, - canvasHeight = el.mergedOptions.height, - - vertices = this.vertices, - spotRadius = options.get('spotRadius'), - regionMap = this.regionMap, - rangex, rangey, yvallast, - canvasTop, canvasLeft, - vertex, path, paths, x, y, xnext, xpos, xposnext, - last, next, yvalcount, lineShapes, fillShapes, plen, - valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i; - - // if (!line._super.render.call(this)) { - // return; - // } - - this.scanValues(); - this.processRangeOptions(); - - xvalues = this.xvalues; - yvalues = this.yvalues; - - if (!this.yminmax.length || this.yvalues.length < 2) { - // empty or all null valuess - return; - } - - canvasTop = canvasLeft = 0; - - rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx; - rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny; - yvallast = this.yvalues.length - 1; - - if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) { - spotRadius = 0; - } - if (spotRadius) { - // adjust the canvas size as required so that spots will fit - hlSpotsEnabled = options.get('highlightSpotColor') && !options.get('disableInteraction'); - if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) { - canvasHeight -= Math.ceil(spotRadius); - } - if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) { - canvasHeight -= Math.ceil(spotRadius); - canvasTop += Math.ceil(spotRadius); - } - if (hlSpotsEnabled || - ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) { - canvasLeft += Math.ceil(spotRadius); - canvasWidth -= Math.ceil(spotRadius); - } - if (hlSpotsEnabled || options.get('spotColor') || - (options.get('minSpotColor') || options.get('maxSpotColor') && - (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) { - canvasWidth -= Math.ceil(spotRadius); - } - } - - - canvasHeight--; - - if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) { - this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey); - } - - path = []; - paths = [path]; - last = next = null; - yvalcount = yvalues.length; - for (i = 0; i < yvalcount; i++) { - x = xvalues[i]; - xnext = xvalues[i + 1]; - y = yvalues[i]; - xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)); - xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth; - next = xpos + ((xposnext - xpos) / 2); - regionMap[i] = [last || 0, next, i]; - last = next; - if (y === null) { - if (i) { - if (yvalues[i - 1] !== null) { - path = []; - paths.push(path); - } - vertices.push(null); - } - } else { - if (y < this.miny) { - y = this.miny; - } - if (y > this.maxy) { - y = this.maxy; - } - if (!path.length) { - // previous value was null - path.push([xpos, canvasTop + canvasHeight]); - } - vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))]; - path.push(vertex); - vertices.push(vertex); - } - } - - lineShapes = []; - fillShapes = []; - plen = paths.length; - for (i = 0; i < plen; i++) { - path = paths[i]; - if (path.length) { - if (options.get('fillColor')) { - path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]); - fillShapes.push(path.slice(0)); - path.pop(); - } - // if there's only a single point in this path, then we want to display it - // as a vertical line which means we keep path[0] as is - if (path.length > 2) { - // else we want the first value - path[0] = [path[0][0], path[1][1]]; - } - lineShapes.push(path); - } - } - - // draw the fill first, then optionally the normal range, then the line on top of that - plen = fillShapes.length; - for (i = 0; i < plen; i++) { - target.drawShape(fillShapes[i], - options.get('fillColor'), options.get('fillColor')).append(); - } - - - - plen = lineShapes.length; - for (i = 0; i < plen; i++) { - target.drawShape(lineShapes[i], options.get('lineColor'), undefined, - options.get('lineWidth')).append(); - } - - if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) { - this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey); - } - - if (spotRadius && options.get('valueSpots')) { - valueSpots = options.get('valueSpots'); - if (valueSpots.get === undefined) { - valueSpots = new RangeMap(valueSpots); - } - for (i = 0; i < yvalcount; i++) { - color = valueSpots.get(yvalues[i]); - if (color) { - target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))), - spotRadius, undefined, - color).append(); - } - } - - } - if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) { - target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))), - spotRadius, undefined, - options.get('spotColor')).append(); - } - if (this.maxy !== this.minyorg) { - if (spotRadius && options.get('minSpotColor')) { - x = xvalues[$.inArray(this.minyorg, yvalues)]; - target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))), - spotRadius, undefined, - options.get('minSpotColor')).append(); - } - if (spotRadius && options.get('maxSpotColor')) { - x = xvalues[$.inArray(this.maxyorg, yvalues)]; - target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))), - spotRadius, undefined, - options.get('maxSpotColor')).append(); - } - } - - // this.lastShapeId = target.getLastShapeId(); - // this.canvasTop = canvasTop; - // target.render(); - - } - }, - bar:{ - type: 'bar', - - init: function (el, values) { - var options = this.options; - var width = el.mergedOptions.height; - var height = el.mergedOptions.width; - - this.canvasWidth = el.mergedOptions.height; - this.canvasHeight = el.mergedOptions.width; - - var barWidth = parseInt(options.get('barWidth'), 10), - barSpacing = parseInt(options.get('barSpacing'), 10), - chartRangeMin = options.get('chartRangeMin'), - chartRangeMax = options.get('chartRangeMax'), - chartRangeClip = options.get('chartRangeClip'), - stackMin = Infinity, - stackMax = -Infinity, - isStackString, groupMin, groupMax, stackRanges, - numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax, - stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf; - //bar._super.init.call(this, el, values, options, width, height); - - this.values = values; - - // scan values to determine whether to stack bars - for (i = 0, vlen = values.length; i < vlen; i++) { - val = values[i]; - isStackString = typeof(val) === 'string' && val.indexOf(':') > -1; - if (isStackString || $.isArray(val)) { - stacked = true; - if (isStackString) { - val = values[i] = normalizeValues(val.split(':')); - } - val = remove(val, null); // min/max will treat null as zero - groupMin = Math.min.apply(Math, val); - groupMax = Math.max.apply(Math, val); - if (groupMin < stackMin) { - stackMin = groupMin; - } - if (groupMax > stackMax) { - stackMax = groupMax; - } - } - } - - this.stacked = stacked; - this.regionShapes = {}; - this.barWidth = Math.floor(width/values.length)-barSpacing; - this.barSpacing = barSpacing; - this.totalBarWidth = this.barWidth + barSpacing; - //this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); - this.width = width; - //this.initTarget(); - - if (chartRangeClip) { - clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin; - clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax; - } - - numValues = []; - stackRanges = stacked ? [] : numValues; - var stackTotals = []; - var stackRangesNeg = []; - for (i = 0, vlen = values.length; i < vlen; i++) { - if (stacked) { - vlist = values[i]; - values[i] = svals = []; - stackTotals[i] = 0; - stackRanges[i] = stackRangesNeg[i] = 0; - for (j = 0, slen = vlist.length; j < slen; j++) { - val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j]; - if (val !== null) { - if (val > 0) { - stackTotals[i] += val; - } - if (stackMin < 0 && stackMax > 0) { - if (val < 0) { - stackRangesNeg[i] += Math.abs(val); - } else { - stackRanges[i] += val; - } - } else { - stackRanges[i] += Math.abs(val); - // stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin)); - } - numValues.push(val); - } - } - } else { - val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i]; - val = values[i] = normalizeValue(val); - if (val !== null) { - numValues.push(val); - } - } - } - this.max = max = Math.max.apply(Math, numValues); - this.min = min = Math.min.apply(Math, numValues); - this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max; - this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min; - - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) { - min = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) { - max = options.get('chartRangeMax'); - } - - this.zeroAxis = zeroAxis = options.get('zeroAxis', true); - if (min <= 0 && max >= 0 && zeroAxis) { - xaxisOffset = 0; - } else if (zeroAxis == false) { - xaxisOffset = min; - } else if (min > 0) { - xaxisOffset = 0; - } else { - xaxisOffset = max; - } - this.xaxisOffset = xaxisOffset; - - range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - xaxisOffset; - - // as we plot zero/min values a single pixel line, we add a pixel to all other - // values - Reduce the effective canvas size to suit - this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1; - this.isNeg = false; - if (min < xaxisOffset) { - // yMaxCalc = (stacked && max >= 0) ? stackMax : max; - // yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight; - yoffset = Math.floor(this.canvasHeight/2); - this.isNeg = true; - if (yoffset !== Math.ceil(yoffset)) { - this.canvasHeightEf -= 2; - yoffset = Math.ceil(yoffset); - } - } else { - yoffset = 0; - } - this.yoffset = yoffset; - - if ($.isArray(options.get('colorMap'))) { - this.colorMapByIndex = options.get('colorMap'); - this.colorMapByValue = null; - } else { - this.colorMapByIndex = null; - this.colorMapByValue = options.get('colorMap'); - if (this.colorMapByValue && this.colorMapByValue.get === undefined) { - this.colorMapByValue = new RangeMap(this.colorMapByValue); - } - } - - this.range = range; - }, - - getRegion: function (el, x, y) { - var result = Math.floor(x / this.totalBarWidth); - return (result < 0 || result >= this.values.length) ? undefined : result; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion, - values = ensureArray(this.values[currentRegion]), - result = [], - value, i; - for (i = values.length; i--;) { - value = values[i]; - result.push({ - isNull: value === null, - value: value, - color: this.calcColor(i, value, currentRegion), - offset: currentRegion - }); - } - return result; - }, - - calcColor: function (stacknum, value, valuenum) { - var colorMapByIndex = this.colorMapByIndex, - colorMapByValue = this.colorMapByValue, - options = this.options, - color, newColor; - if (this.stacked) { - color = options.get('stackedBarColor'); - } else { - color = (value < 0) ? options.get('negBarColor') : options.get('barColor'); - } - if (value === 0 && options.get('zeroColor') !== undefined) { - color = options.get('zeroColor'); - } - if (colorMapByValue && (newColor = colorMapByValue.get(value))) { - color = newColor; - } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { - color = colorMapByIndex[valuenum]; - } - return $.isArray(color) ? color[stacknum % color.length] : color; - }, - - /** - * Render bar(s) for a region - */ - renderRegion: function (valuenum, highlight) { - var vals = this.values[valuenum], - options = this.options, - xaxisOffset = this.xaxisOffset, - result = [], - range = this.range, - stacked = this.stacked, - target = this.target, - x = valuenum * this.totalBarWidth, - canvasHeightEf = this.canvasHeightEf, - yoffset = this.yoffset, - y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin; - - vals = $.isArray(vals) ? vals : [vals]; - valcount = vals.length; - val = vals[0]; - isNull = all(null, vals); - allMin = all(xaxisOffset, vals, true); - - if (isNull) { - if (options.get('nullColor')) { - color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options); - y = (yoffset > 0) ? yoffset - 1 : yoffset; - return target.drawRect(y, x, 0, this.barWidth - 1, color, color); - } else { - return undefined; - } - } - yoffsetNeg = yoffset; - if(this.isNeg){ - canvasHeightEf = Math.floor(canvasHeightEf/2); - } - for (i = 0; i < valcount; i++) { - val = vals[i]; - - if (stacked && val === xaxisOffset) { - if (!allMin || minPlotted) { - continue; - } - minPlotted = true; - } - - if (range > 0) { - height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))); - } else { - height = canvasHeightEf; - } - - if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) { - y = yoffsetNeg - height; - yoffsetNeg += height; - } else { - if(stacked){ - y = yoffset; - yoffset += height; - } - else{ - y = yoffset; - yoffset -= height; - } - - } - color = this.calcColor(i, val, valuenum); - if (highlight) { - color = this.calcHighlightColor(color, options); - } - result.push(target.drawRect(y, x, height - 1, this.barWidth - 1,color, color)); - } - if (result.length === 1) { - return result[0]; - } - return result; - } - }, - column:{ - type: 'column', - - init: function (el, values) { - var options = this.options; - var width = el.mergedOptions.width; - var height = el.mergedOptions.height; - - this.canvasWidth = el.mergedOptions.width; - this.canvasHeight = el.mergedOptions.height; - - var barWidth = parseInt(options.get('barWidth'), 10), - barSpacing = parseInt(options.get('barSpacing'), 10), - chartRangeMin = options.get('chartRangeMin'), - chartRangeMax = options.get('chartRangeMax'), - chartRangeClip = options.get('chartRangeClip'), - stackMin = Infinity, - stackMax = -Infinity, - isStackString, groupMin, groupMax, stackRanges, - numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax, - stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf; - //bar._super.init.call(this, el, values, options, width, height); - - this.values = values; - - // scan values to determine whether to stack bars - for (i = 0, vlen = values.length; i < vlen; i++) { - val = values[i]; - isStackString = typeof(val) === 'string' && val.indexOf(':') > -1; - if (isStackString || $.isArray(val)) { - stacked = true; - if (isStackString) { - val = values[i] = normalizeValues(val.split(':')); - } - val = remove(val, null); // min/max will treat null as zero - groupMin = Math.min.apply(Math, val); - groupMax = Math.max.apply(Math, val); - if (groupMin < stackMin) { - stackMin = groupMin; - } - if (groupMax > stackMax) { - stackMax = groupMax; - } - } - } - - this.stacked = stacked; - this.regionShapes = {}; - this.barWidth = Math.floor(width/values.length)-barSpacing; - this.barSpacing = barSpacing; - this.totalBarWidth = this.barWidth + barSpacing; - //this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); - this.width = width; - //this.initTarget(); - - if (chartRangeClip) { - clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin; - clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax; - } - - numValues = []; - stackRanges = stacked ? [] : numValues; - var stackTotals = []; - var stackRangesNeg = []; - for (i = 0, vlen = values.length; i < vlen; i++) { - if (stacked) { - vlist = values[i]; - values[i] = svals = []; - stackTotals[i] = 0; - stackRanges[i] = stackRangesNeg[i] = 0; - for (j = 0, slen = vlist.length; j < slen; j++) { - val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j]; - if (val !== null) { - if (val > 0) { - stackTotals[i] += val; - } - if (stackMin < 0 && stackMax > 0) { - if (val < 0) { - stackRangesNeg[i] += Math.abs(val); - } else { - stackRanges[i] += val; - } - } else { - stackRanges[i] += Math.abs(val); - // stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin)); - } - numValues.push(val); - } - } - } else { - val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i]; - val = values[i] = normalizeValue(val); - if (val !== null) { - numValues.push(val); - } - } - } - this.max = max = Math.max.apply(Math, numValues); - this.min = min = Math.min.apply(Math, numValues); - this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max; - this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min; - - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) { - min = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) { - max = options.get('chartRangeMax'); - } - - this.zeroAxis = zeroAxis = options.get('zeroAxis', true); - if (min <= 0 && max >= 0 && zeroAxis) { - xaxisOffset = 0; - } else if (zeroAxis == false) { - xaxisOffset = min; - } else if (min > 0) { - xaxisOffset = 0; - } else { - xaxisOffset = max; - } - this.xaxisOffset = xaxisOffset; - - range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - xaxisOffset; - - // as we plot zero/min values a single pixel line, we add a pixel to all other - // values - Reduce the effective canvas size to suit - this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1; - this.isNeg = false; - if (min < xaxisOffset) { - // yMaxCalc = (stacked && max >= 0) ? stackMax : max; - // yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight; - yoffset = Math.floor(this.canvasHeight/2); - this.isNeg = true; - if (yoffset !== Math.ceil(yoffset)) { - this.canvasHeightEf -= 2; - yoffset = Math.ceil(yoffset); - } - } else { - yoffset = this.canvasHeight; - } - this.yoffset = yoffset; - - if ($.isArray(options.get('colorMap'))) { - this.colorMapByIndex = options.get('colorMap'); - this.colorMapByValue = null; - } else { - this.colorMapByIndex = null; - this.colorMapByValue = options.get('colorMap'); - if (this.colorMapByValue && this.colorMapByValue.get === undefined) { - this.colorMapByValue = new RangeMap(this.colorMapByValue); - } - } - - this.range = range; - }, - - getRegion: function (el, x, y) { - var result = Math.floor(x / this.totalBarWidth); - return (result < 0 || result >= this.values.length) ? undefined : result; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion, - values = ensureArray(this.values[currentRegion]), - result = [], - value, i; - for (i = values.length; i--;) { - value = values[i]; - result.push({ - isNull: value === null, - value: value, - color: this.calcColor(i, value, currentRegion), - offset: currentRegion - }); - } - return result; - }, - - calcColor: function (stacknum, value, valuenum) { - var colorMapByIndex = this.colorMapByIndex, - colorMapByValue = this.colorMapByValue, - options = this.options, - color, newColor; - if (this.stacked) { - color = options.get('stackedBarColor'); - } else { - color = (value < 0) ? options.get('negBarColor') : options.get('barColor'); - } - if (value === 0 && options.get('zeroColor') !== undefined) { - color = options.get('zeroColor'); - } - if (colorMapByValue && (newColor = colorMapByValue.get(value))) { - color = newColor; - } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { - color = colorMapByIndex[valuenum]; - } - return $.isArray(color) ? color[stacknum % color.length] : color; - }, - - /** - * Render bar(s) for a region - */ - renderRegion: function (valuenum, highlight) { - var vals = this.values[valuenum], - options = this.options, - xaxisOffset = this.xaxisOffset, - result = [], - range = this.range, - stacked = this.stacked, - target = this.target, - x = valuenum * this.totalBarWidth, - canvasHeightEf = this.canvasHeightEf, - yoffset = this.yoffset, - y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin; - - vals = $.isArray(vals) ? vals : [vals]; - valcount = vals.length; - val = vals[0]; - isNull = all(null, vals); - allMin = all(xaxisOffset, vals, true); - - if (isNull) { - if (options.get('nullColor')) { - color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options); - y = (yoffset > 0) ? yoffset - 1 : yoffset; - return target.drawRect(x, y, this.barWidth - 1, 0, color, color); - } else { - return undefined; - } - } - yoffsetNeg = yoffset; - if(this.isNeg){ - canvasHeightEf = Math.floor(canvasHeightEf/2); - } - for (i = 0; i < valcount; i++) { - val = vals[i]; - - if (stacked && val === xaxisOffset) { - if (!allMin || minPlotted) { - continue; - } - minPlotted = true; - } - - if (range > 0) { - height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))); - } else { - height = canvasHeightEf; - } - - if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) { - y = yoffsetNeg; - yoffsetNeg += height; - } else { - y = yoffset - height; - yoffset -= height; - } - color = this.calcColor(i, val, valuenum); - if (highlight) { - color = this.calcHighlightColor(color, options); - } - result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color)); - } - if (result.length === 1) { - return result[0]; - } - return result; - } - }, - tristate:{ - type: 'tristate', - init: function(el, values) { - var options = this.options; - var width = el.mergedOptions.width; - var height = el.mergedOptions.height; - - this.canvasWidth = el.mergedOptions.width; - this.canvasHeight = el.mergedOptions.height; - - var barWidth = parseInt(options.get('barWidth'), 10), - barSpacing = parseInt(options.get('barSpacing'), 10); - //tristate._super.init.call(this, el, values, options, width, height); - - this.regionShapes = {}; - this.barWidth = barWidth; - this.barSpacing = barSpacing; - this.totalBarWidth = barWidth + barSpacing; - this.values = $.map(values, Number); - this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); - - if ($.isArray(options.get('colorMap'))) { - this.colorMapByIndex = options.get('colorMap'); - this.colorMapByValue = null; - } else { - this.colorMapByIndex = null; - this.colorMapByValue = options.get('colorMap'); - if (this.colorMapByValue && this.colorMapByValue.get === undefined) { - this.colorMapByValue = new RangeMap(this.colorMapByValue); - } - } - //this.initTarget(); - }, - - getRegion: function (el, x, y) { - return Math.floor(x / this.totalBarWidth); - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.values[currentRegion] === undefined, - value: this.values[currentRegion], - color: this.calcColor(this.values[currentRegion], currentRegion), - offset: currentRegion - }; - }, - - calcColor: function (value, valuenum) { - var values = this.values, - options = this.options, - colorMapByIndex = this.colorMapByIndex, - colorMapByValue = this.colorMapByValue, - color, newColor; - - if (colorMapByValue && (newColor = colorMapByValue.get(value))) { - color = newColor; - } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { - color = colorMapByIndex[valuenum]; - } else if (values[valuenum] < 0) { - color = options.get('negBarColor'); - } else if (values[valuenum] > 0) { - color = options.get('posBarColor'); - } else { - color = options.get('zeroBarColor'); - } - return color; - }, - - renderRegion: function (valuenum, highlight) { - var values = this.values, - options = this.options, - target = this.target, - canvasHeight, height, halfHeight, - x, y, color; - - canvasHeight = this.canvasHeight; - halfHeight = Math.round(canvasHeight / 2); - - x = valuenum * this.totalBarWidth; - if (values[valuenum] < 0) { - y = halfHeight; - height = halfHeight - 1; - } else if (values[valuenum] > 0) { - y = 0; - height = halfHeight - 1; - } else { - y = halfHeight - 1; - height = 2; - } - color = this.calcColor(values[valuenum], valuenum); - if (color === null) { - return; - } - if (highlight) { - color = this.calcHighlightColor(color, options); - } - return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color); - } - }, - discrete:{ - type: 'discrete', - - init: function(el, values) { - var options = this.options; - var width = el.mergedOptions.width; - var height = el.mergedOptions.height; - - this.canvasWidth = el.mergedOptions.width; - this.canvasHeight = el.mergedOptions.height; - - this.regionShapes = {}; - this.values = values = $.map(values, Number); - this.min = Math.min.apply(Math, values); - this.max = Math.max.apply(Math, values); - this.range = this.max - this.min; - this.width = width; - this.interval = Math.floor(width / values.length); - this.itemWidth = width / values.length; - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) { - this.min = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) { - this.max = options.get('chartRangeMax'); - } - //this.initTarget(); - if (this.target) { - this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight'); - } - }, - - getRegion: function (el, x, y) { - return Math.floor(x / this.itemWidth); - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.values[currentRegion] === undefined, - value: this.values[currentRegion], - offset: currentRegion - }; - }, - - renderRegion: function (valuenum, highlight) { - var values = this.values, - options = this.options, - min = this.min, - max = this.max, - range = this.range, - interval = this.interval, - target = this.target, - canvasHeight = this.canvasHeight, - lineHeight = this.lineHeight, - pheight = canvasHeight - lineHeight, - ytop, val, color, x; - - val = clipval(values[valuenum], min, max); - x = valuenum * interval; - ytop = Math.round(pheight - pheight * ((val - min) / range)); - color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor'); - if (highlight) { - color = this.calcHighlightColor(color, options); - } - //return target.drawLine(x, ytop, x, ytop + lineHeight, color); - - return this.target.drawRect(x, ytop, interval<=2?1:interval-2, lineHeight, color, color); - } - }, - bullet:{ - type: 'bullet', - init: function(el, values) { - - var options = this.options; - var width = el.mergedOptions.width; - var height = el.mergedOptions.height; - - this.canvasWidth = el.mergedOptions.width; - this.canvasHeight = el.mergedOptions.height; - - var min, max, vals; - //bullet._super.init.call(this, el, values, options, width, height); - - // values: target, performance, range1, range2, range3 - this.values = values = normalizeValues(values); - // target or performance could be null - vals = values.slice(); - vals[0] = vals[0] === null ? vals[2] : vals[0]; - vals[1] = values[1] === null ? vals[2] : vals[1]; - min = Math.min.apply(Math, values); - max = Math.max.apply(Math, values); - if (options.get('base') === undefined) { - min = min < 0 ? min : 0; - } else { - min = options.get('base'); - } - this.min = min; - this.max = max; - this.range = max - min; - this.shapes = {}; - this.valueShapes = {}; - this.regiondata = {}; - this.width = width; - //this.target = this.$el.simpledraw(width, height, options.get('composite')); - if (!values.length) { - this.disabled = true; - } - //this.initTarget(); - }, - - getRegion: function (el, x, y) { - var shapeid = this.target.getShapeAt(el, x, y); - return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - fieldkey: currentRegion.substr(0, 1), - value: this.values[currentRegion.substr(1)], - region: currentRegion - }; - }, - - changeHighlight: function (highlight) { - var currentRegion = this.currentRegion, - shapeid = this.valueShapes[currentRegion], - shape; - delete this.shapes[shapeid]; - switch (currentRegion.substr(0, 1)) { - case 'r': - shape = this.renderRange(currentRegion.substr(1), highlight); - break; - case 'p': - shape = this.renderPerformance(highlight); - break; - case 't': - shape = this.renderTarget(highlight); - break; - } - this.valueShapes[currentRegion] = shape.id; - this.shapes[shape.id] = currentRegion; - this.target.replaceWithShape(shapeid, shape); - }, - - renderRange: function (rn, highlight) { - var rangeval = this.values[rn], - rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)), - color = this.options.get('rangeColors')[rn - 2]; - if (highlight) { - color = this.calcHighlightColor(color, this.options); - } - return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color); - }, - - renderPerformance: function (highlight) { - var perfval = this.values[1], - perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)), - color = this.options.get('performanceColor'); - if (highlight) { - color = this.calcHighlightColor(color, this.options); - } - return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1, - Math.round(this.canvasHeight * 0.4) - 1, color, color); - }, - - renderTarget: function (highlight) { - var targetval = this.values[0], - x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)), - targettop = Math.round(this.canvasHeight * 0.10), - targetheight = this.canvasHeight - (targettop * 2), - color = this.options.get('targetColor'); - if (highlight) { - color = this.calcHighlightColor(color, this.options); - } - return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color); - }, - - render: function (el,userValues) { - this.init(el,userValues); - var vlen = this.values.length, - target = this.target, - i, shape; - // if (!bullet._super.render.call(this)) { - // return; - // } - for (i = 2; i < vlen; i++) { - shape = this.renderRange(i).append(); - this.shapes[shape.id] = 'r' + i; - this.valueShapes['r' + i] = shape.id; - } - if (this.values[1] !== null) { - shape = this.renderPerformance().append(); - this.shapes[shape.id] = 'p1'; - this.valueShapes.p1 = shape.id; - } - if (this.values[0] !== null) { - shape = this.renderTarget().append(); - this.shapes[shape.id] = 't0'; - this.valueShapes.t0 = shape.id; - } - //target.render(); - } - }, - pie:{ - type: 'pie', - - init: function(el, values) { - - var options = this.options; - var width = el.mergedOptions.width; - var height = el.mergedOptions.height; - - this.canvasWidth = el.mergedOptions.width; - this.canvasHeight = el.mergedOptions.height; - - var total = 0, i; - - //pie._super.init.call(this, el, values, options, width, height); - - this.shapes = {}; // map shape ids to value offsets - this.valueShapes = {}; // maps value offsets to shape ids - this.values = values = $.map(values, Number); - - if (options.get('width') === 'auto') { - this.width = this.height; - } - - if (values.length > 0) { - for (i = values.length; i--;) { - total += values[i]; - } - } - this.total = total; - //this.initTarget(); - this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2); - }, - - getRegion: function (el, x, y) { - var shapeid = this.target.getShapeAt(el, x, y); - return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.values[currentRegion] === undefined, - value: this.values[currentRegion], - percent: this.values[currentRegion] / this.total * 100, - color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length], - offset: currentRegion - }; - }, - - changeHighlight: function (highlight) { - var currentRegion = this.currentRegion, - newslice = this.renderSlice(currentRegion, highlight), - shapeid = this.valueShapes[currentRegion]; - delete this.shapes[shapeid]; - this.target.replaceWithShape(shapeid, newslice); - this.valueShapes[currentRegion] = newslice.id; - this.shapes[newslice.id] = currentRegion; - }, - - renderSlice: function (valuenum, highlight) { - var target = this.target, - options = this.options, - radius = this.radius, - borderWidth = options.get('borderWidth'), - offset = options.get('offset'), - circle = 2 * Math.PI, - values = this.values, - total = this.total, - next = offset ? (2*Math.PI)*(offset/360) : 0, - start, end, i, vlen, color; - - vlen = values.length; - for (i = 0; i < vlen; i++) { - start = next; - end = next; - if (total > 0) { // avoid divide by zero - end = next + (circle * (values[i] / total)); - } - if (valuenum === i) { - color = options.get('sliceColors')[i % options.get('sliceColors').length]; - if (highlight) { - color = this.calcHighlightColor(color, options); - } - - return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color); - } - next = end; - } - }, - - render: function (el,userValues) { - this.init(el,userValues); - var target = this.target, - values = this.values, - options = this.options, - radius = this.radius, - borderWidth = options.get('borderWidth'), - shape, i; - - // if (!pie._super.render.call(this)) { - // return; - // } - if (borderWidth) { - target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)), - options.get('borderColor'), undefined, borderWidth).append(); - } - for (i = values.length; i--;) { - if (values[i]) { // don't render zero values - shape = this.renderSlice(i).append(); - this.valueShapes[i] = shape.id; // store just the shapeid - this.shapes[shape.id] = i; - } - } - //target.render(); - } - }, - box:{ - type: 'box', - - init: function(el, values) { - - var options = this.options; - var width = el.mergedOptions.width; - var height = el.mergedOptions.height; - - this.canvasWidth = el.mergedOptions.width; - this.canvasHeight = el.mergedOptions.height; - - //box._super.init.call(this, el, values, options, width, height); - this.values = $.map(values, Number); - this.width = options.get('width') === 'auto' ? '4.0em' : width; - //this.initTarget(); - if (!this.values.length) { - this.disabled = 1; - } - }, - - /** - * Simulate a single region - */ - getRegion: function () { - return 1; - }, - - getCurrentRegionFields: function () { - var result = [ - { field: 'lq', value: this.quartiles[0] }, - { field: 'med', value: this.quartiles[1] }, - { field: 'uq', value: this.quartiles[2] } - ]; - if (this.loutlier !== undefined) { - result.push({ field: 'lo', value: this.loutlier}); - } - if (this.routlier !== undefined) { - result.push({ field: 'ro', value: this.routlier}); - } - if (this.lwhisker !== undefined) { - result.push({ field: 'lw', value: this.lwhisker}); - } - if (this.rwhisker !== undefined) { - result.push({ field: 'rw', value: this.rwhisker}); - } - return result; - }, - - render: function (el,userValues) { - this.init(el,userValues); - - var target = this.target, - values = this.values, - vlen = values.length, - options = this.options, - canvasWidth = this.canvasWidth, - canvasHeight = this.canvasHeight, - minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'), - maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'), - canvasLeft = 0, - lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i, - size, unitSize; - - // if (!box._super.render.call(this)) { - // return; - // } - - if (options.get('raw')) { - if (options.get('showOutliers') && values.length > 5) { - loutlier = values[0]; - lwhisker = values[1]; - q1 = values[2]; - q2 = values[3]; - q3 = values[4]; - rwhisker = values[5]; - routlier = values[6]; - } else { - lwhisker = values[0]; - q1 = values[1]; - q2 = values[2]; - q3 = values[3]; - rwhisker = values[4]; - } - } else { - values.sort(function (a, b) { return a - b; }); - q1 = quartile(values, 1); - q2 = quartile(values, 2); - q3 = quartile(values, 3); - iqr = q3 - q1; - if (options.get('showOutliers')) { - lwhisker = rwhisker = undefined; - for (i = 0; i < vlen; i++) { - if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) { - lwhisker = values[i]; - } - if (values[i] < q3 + (iqr * options.get('outlierIQR'))) { - rwhisker = values[i]; - } - } - loutlier = values[0]; - routlier = values[vlen - 1]; - } else { - lwhisker = values[0]; - rwhisker = values[vlen - 1]; - } - } - this.quartiles = [q1, q2, q3]; - this.lwhisker = lwhisker; - this.rwhisker = rwhisker; - this.loutlier = loutlier; - this.routlier = routlier; - - unitSize = canvasWidth / (maxValue - minValue + 1); - if (options.get('showOutliers')) { - canvasLeft = Math.ceil(options.get('spotRadius')); - canvasWidth -= 2 * Math.ceil(options.get('spotRadius')); - unitSize = canvasWidth / (maxValue - minValue + 1); - if (loutlier < lwhisker) { - target.drawCircle((loutlier - minValue) * unitSize + canvasLeft, - canvasHeight / 2, - options.get('spotRadius'), - options.get('outlierLineColor'), - options.get('outlierFillColor')).append(); - } - if (routlier > rwhisker) { - target.drawCircle((routlier - minValue) * unitSize + canvasLeft, - canvasHeight / 2, - options.get('spotRadius'), - options.get('outlierLineColor'), - options.get('outlierFillColor')).append(); - } - } - - // box - target.drawRect( - Math.round((q1 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight * 0.1), - Math.round((q3 - q1) * unitSize), - Math.round(canvasHeight * 0.8), - options.get('boxLineColor'), - options.get('boxFillColor')).append(); - // left whisker - target.drawLine( - Math.round((lwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - Math.round((q1 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - options.get('lineColor')).append(); - target.drawLine( - Math.round((lwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 4), - Math.round((lwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight - canvasHeight / 4), - options.get('whiskerColor')).append(); - // right whisker - target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - Math.round((q3 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - options.get('lineColor')).append(); - target.drawLine( - Math.round((rwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 4), - Math.round((rwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight - canvasHeight / 4), - options.get('whiskerColor')).append(); - // median line - target.drawLine( - Math.round((q2 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight * 0.1), - Math.round((q2 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight * 0.9), - options.get('medianColor')).append(); - if (options.get('target')) { - size = Math.ceil(options.get('spotRadius')); - target.drawLine( - Math.round((options.get('target') - minValue) * unitSize + canvasLeft), - Math.round((canvasHeight / 2) - size), - Math.round((options.get('target') - minValue) * unitSize + canvasLeft), - Math.round((canvasHeight / 2) + size), - options.get('targetColor')).append(); - target.drawLine( - Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size), - Math.round(canvasHeight / 2), - Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size), - Math.round(canvasHeight / 2), - options.get('targetColor')).append(); - } - //target.render(); - } - }, - shapeCount:0, - shapes:{}, - shapeseq:[], - lastShapeId:null, - mergedOptions:null, - init:function(userValues, userOptions){ - var extendedOptions, defaults, base; - var userOptions = userOptions || {}; - var _this = this; - defaults = this.defaultOption; - base = defaults.common; - extendedOptions = defaults[userOptions.type || base.type]; - - _this.shapeCount = 0; - _this.shapes = {}; - _this.shapeseq = []; - _this.lastShapeId = null; - - _this.mergedOptions = $.extend({}, base, extendedOptions, userOptions); - _this.mergedOptions.width = devicePixelRatio * _this.mergedOptions.width; - _this.mergedOptions.height = devicePixelRatio * _this.mergedOptions.height; - _this[_this.mergedOptions.type].render(_this, userValues); - - return { shapes:_this.shapes, shapeseq:_this.shapeseq, offsetX:_this.mergedOptions.offsetX, offsetY:_this.mergedOptions.offsetY, pixelWidth:_this.mergedOptions.width, pixelHeight:_this.mergedOptions.height}; - - }, - _getContext: function (lineColor, fillColor, lineWidth) { - if(this.ctx != null){ - var context = this.ctx; - } - else{ - var context = $("#" + this._canvasID ).get(0).getContext('2d'); - } - - if (lineColor !== undefined) { - context.strokeStyle = lineColor; - } - context.lineWidth = lineWidth === undefined ? 1 : lineWidth; - if (fillColor !== undefined) { - context.fillStyle = fillColor; - } - return context; - }, - - reset: function () { - var context = this._getContext(); - context.clearRect(0, 0, this.pixelWidth, this.pixelHeight); - this.shapes = {}; - this.shapeseq = []; - this.currentTargetShapeId = undefined; - }, - - _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) { - var context = this._getContext(lineColor, fillColor, lineWidth), - i, plen; - context.beginPath(); - context.moveTo(path[0][0] + 0.5 + this.offsetX, path[0][1] + 0.5 + this.offsetY); - - for (i = 1, plen = path.length; i < plen; i++) { - context.lineTo(path[i][0] + 0.5 + this.offsetX, path[i][1] + 0.5 + this.offsetY); // the 0.5 offset gives us crisp pixel-width lines - } - if (lineColor !== undefined) { - context.stroke(); - } - if (fillColor !== undefined) { - context.fill(); - } - if (this.targetX !== undefined && this.targetY !== undefined && - context.isPointInPath(this.targetX + this.offsetX, this.targetY + this.offsetY)) { - this.currentTargetShapeId = shapeid; - } - }, - - _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) { - var context = this._getContext(lineColor, fillColor, lineWidth); - context.beginPath(); - x+=this.offsetX; - y+=this.offsetY; - context.arc(x, y, radius, 0, 2 * Math.PI, false); - if (this.targetX !== undefined && this.targetY !== undefined && - context.isPointInPath(this.targetX+this.offsetX, this.targetY+this.offsetY)) { - this.currentTargetShapeId = shapeid; - } - if (lineColor !== undefined) { - context.stroke(); - } - if (fillColor !== undefined) { - context.fill(); - } - }, - - _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) { - var context = this._getContext(lineColor, fillColor); - x+=this.offsetX; - y+=this.offsetY; - context.beginPath(); - context.moveTo(x, y); - context.arc(x, y, radius, startAngle, endAngle, false); - context.lineTo(x, y); - context.closePath(); - if (lineColor !== undefined) { - context.stroke(); - } - if (fillColor) { - context.fill(); - } - if (this.targetX !== undefined && this.targetY !== undefined && - context.isPointInPath(this.targetX+this.offsetX, this.targetY+this.offsetY)) { - this.currentTargetShapeId = shapeid; - } - }, - - _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) { - // x+=this.offsetX; - // y+=this.offsetY; - return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor); - }, - - appendShape: function (shape) { - this.shapes[shape.id] = shape; - this.shapeseq.push(shape.id); - this.lastShapeId = shape.id; - return shape.id; - }, - - replaceWithShape: function (shapeid, shape) { - var shapeseq = this.shapeseq, - i; - this.shapes[shape.id] = shape; - for (i = shapeseq.length; i--;) { - if (shapeseq[i] == shapeid) { - shapeseq[i] = shape.id; - } - } - delete this.shapes[shapeid]; - }, - - replaceWithShapes: function (shapeids, shapes) { - var shapeseq = this.shapeseq, - shapemap = {}, - sid, i, first; - - for (i = shapeids.length; i--;) { - shapemap[shapeids[i]] = true; - } - for (i = shapeseq.length; i--;) { - sid = shapeseq[i]; - if (shapemap[sid]) { - shapeseq.splice(i, 1); - delete this.shapes[sid]; - first = i; - } - } - for (i = shapes.length; i--;) { - shapeseq.splice(first, 0, shapes[i].id); - this.shapes[shapes[i].id] = shapes[i]; - } - - }, - - insertAfterShape: function (shapeid, shape) { - var shapeseq = this.shapeseq, - i; - for (i = shapeseq.length; i--;) { - if (shapeseq[i] === shapeid) { - shapeseq.splice(i + 1, 0, shape.id); - this.shapes[shape.id] = shape; - return; - } - } - }, - - removeShapeId: function (shapeid) { - var shapeseq = this.shapeseq, - i; - for (i = shapeseq.length; i--;) { - if (shapeseq[i] === shapeid) { - shapeseq.splice(i, 1); - break; - } - } - delete this.shapes[shapeid]; - }, - - getShapeAt: function (el, x, y) { - this.targetX = x; - this.targetY = y; - this.render(); - return this.currentTargetShapeId; - }, - _canvasID:"luckysheetTableContent", - render: function (shapeseq, shapes, offsetX, offsetY, pixelWidth, pixelHeight,canvasid,ctx) { - if(canvasid==null){ - canvasid = "luckysheetTableContent"; - } - this._canvasID = canvasid; - - if(ctx != null){ - this.ctx = ctx; - } - - var shapeCount = shapeseq.length, - context = this._getContext(), - shapeid, shape, i; - this.offsetX = offsetX; - this.offsetY = offsetY; - this.pixelWidth = pixelWidth; - this.pixelHeight = pixelHeight; - //context.clearRect(this.offsetX, this.offsetY, this.pixelWidth, this.pixelHeight); - - // qkSparkSetting.currentSparkVlaue = { - // shapeseq : shapeseq, - // shapes:shapes, - // shapeCount:shapeCount, - // el:this - // } - - for (i = 0; i < shapeCount; i++) { - shapeid = shapeseq[i]; - shape = shapes[shapeid]; - this['_draw' + shape.type].apply(this, shape.args); - } - // if (!this.interact) { - // // not interactive so no need to keep the shapes array - // this.shapes = {}; - // this.shapeseq = []; - // } - }, - drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) { - return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth); - }, - - drawShape: function (path, lineColor, fillColor, lineWidth) { - return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]); - }, - - drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) { - return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]); - }, - - drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) { - return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]); - }, - - drawRect: function (x, y, width, height, lineColor, fillColor) { - return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]); - }, - _genShape: function (shapetype, shapeargs) { - var id = this.shapeCount++; - shapeargs.unshift(id); - // return new VShape(this, id, shapetype, shapeargs); - // this.target = target; - // this.id = id; - // this.type = type; - // this.args = args; - var shape = { id:id, type:shapetype, args:shapeargs }; - this.shapes[id] = shape; - this.shapeseq.push(id); - this.lastShapeId = id; - return { - append:function(){ - return shape; - }, - get:function(){ - return id; - } - }; - } - - } - - var barHighlightMixin = { - changeHighlight: function (highlight) { - var currentRegion = this.currentRegion, - target = this.target, - shapeids = this.regionShapes[currentRegion], - newShapes; - // will be null if the region value was null - if (shapeids) { - newShapes = this.renderRegion(currentRegion, highlight); - if ($.isArray(newShapes) || $.isArray(shapeids)) { - target.replaceWithShapes(shapeids, newShapes); - this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) { - return newShape.id; - }); - } else { - target.replaceWithShape(shapeids, newShapes); - this.regionShapes[currentRegion] = newShapes.id; - } - } - }, - render: function (el,userValues) { - this.init(el, userValues); - var values = this.values, - target = this.target, - regionShapes = this.regionShapes, - shapes, ids, i, j; - - // if (!this.cls._super.render.call(this)) { - // return; - // } - for (i = values.length; i--;) { - shapes = this.renderRegion(i); - if (shapes) { - if ($.isArray(shapes)) { - ids = []; - for (j = shapes.length; j--;) { - shapes[j].append(); - ids.push(shapes[j].id); - } - regionShapes[i] = ids; - } else { - shapes.append(); - regionShapes[i] = shapes.id; // store just the shapeid - } - } else { - // null value - regionShapes[i] = null; - } - } - //target.render(); - } - }; - - var _luckysheetSparkLineOptions = { - get:function(type){ - return luckysheet.sparkline.mergedOptions[type]; - } - } - - var _luckysheetSparkLineTarget = { - drawLine:function(x1, y1, x2, y2, lineColor, lineWidth){ - return luckysheet.sparkline.drawLine(x1, y1, x2, y2, lineColor, lineWidth); - }, - - drawShape:function(path, lineColor, fillColor, lineWidth){ - return luckysheet.sparkline.drawShape(path, lineColor, fillColor, lineWidth); - }, - - drawCircle:function(x, y, radius, lineColor, fillColor, lineWidth){ - return luckysheet.sparkline.drawCircle(x, y, radius, lineColor, fillColor, lineWidth); - }, - - drawPieSlice:function(x, y, radius, startAngle, endAngle, lineColor, fillColor){ - return luckysheet.sparkline.drawPieSlice(x, y, radius, startAngle, endAngle, lineColor, fillColor); - }, - - drawRect:function(x, y, width, height, lineColor, fillColor){ - return luckysheet.sparkline.drawRect(x, y, width, height, lineColor, fillColor); - } - } - - // luckysheet.sparkline.line.options = _luckysheetSparkLineOptions; - // luckysheet.sparkline.line.target = _luckysheetSparkLineTarget; - - // luckysheet.sparkline.bar.options = _luckysheetSparkLineOptions; - // luckysheet.sparkline.bar.target = _luckysheetSparkLineTarget; - - for(item in luckysheet.sparkline){ - if(item in {"line":null, "bar":null, "column":null, "tristate":null, "discrete":null, "bullet":null, "pie":null, "box":null}){ - luckysheet.sparkline[item].options = _luckysheetSparkLineOptions; - luckysheet.sparkline[item].target = _luckysheetSparkLineTarget; - } - - if(item in {"bar":null, "column":null, "tristate":null, "discrete":null}){ - luckysheet.sparkline[item].changeHighlight = barHighlightMixin.changeHighlight; - luckysheet.sparkline[item].render = barHighlightMixin.render; - } - } - - // setTimeout(function(){ - // var temp1 = luckysheet.sparkline.init([ 1, 3, 5, 8, 10, 15, 18 ], { height:20,width:100,offsetX:100,offsetY:50, type:'box', raw: true, showOutliers:true, target: 6 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([20,50,80], { height:60,width:60,offsetX:100,offsetY:150, type: 'pie' }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([10,12,12,9,7], { height:20,width:100,offsetX:100,offsetY:250, type: 'bullet' }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([4,6,7,7,4,3,2,1,4,4,5,6,7,6,6,2,4,5], { height:20,width:100,offsetX:100,offsetY:350, type: 'discrete', thresholdValue: 4 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([1,2,0,5,-1,-2,1,-4,0,0,1,1], { type: 'tristate',height:20,width:100,offsetX:300,offsetY:150, colorMap: {'-2': '#fa7', '2': '#44f'} }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([10,5,3], { type: 'bar',height:30,width:20,offsetX:300,offsetY:250 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([4,1,5,7,9,9,8,7,6,6,4,7,8,4,3,2,2,5,6,7], { height:50,width:90,normalRangeMin:6,normalRangeMax:6,normalRangeColor:"#000" });luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,300*devicePixelRatio,50*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init([10,8,3,-5,5,8,-9], { type: 'bar',height:40,width:60,offsetX:300,offsetY:350 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init(["0:2:12","2:6:10","7:2:5","4:10:8","10:1:4"], { type: 'bar',height:40,width:60,offsetX:500,offsetY:50 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init(["0:2","2:4","4:2","4:1"], { type: 'bar',height:40,width:60,offsetX:500,offsetY:150 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // var temp1 = luckysheet.sparkline.init(["0:2","2:4","4:2","4:1"], { type: 'column',height:40,width:60,offsetX:500,offsetY:250 }) ; luckysheet.sparkline.render(temp1.shapeseq,temp1.shapes,temp1.offsetX*devicePixelRatio,temp1.offsetY*devicePixelRatio,temp1.pixelWidth,temp1.pixelHeight); - - // },3000); - - })(); - - window.luckysheet = luckysheet; - window.luckysheetConfigsetting = luckysheetConfigsetting; - return luckysheet; -})(); \ No newline at end of file diff --git a/src/luckysheet-function.js b/src/luckysheet-function.js deleted file mode 100644 index 2710ec83e..000000000 --- a/src/luckysheet-function.js +++ /dev/null @@ -1,43053 +0,0 @@ -(function(luckysheet) { - // console.log = function(){}; - window.luckysheet_compareWith = function(){ - //函数功能:比较或运算 第一个参数和第三个参数,返回比较结果的布尔值或者运算值 - //luckysheet.formula.operatorjson; 存储运算符和比较符 - var sp = arguments[1]; //操作符 - - //参数一 - var data_fp = arguments[0]; - var fp; - if(luckysheet.getObjType(data_fp) == "object" && data_fp.startCell != null){ //参数是选区 - if(sp == "&"){ - fp = luckysheet.func_methods.getCellDataDyadicArr(data_fp, "text"); - } - else{ - fp = luckysheet.func_methods.getCellDataDyadicArr(data_fp, "number"); - } - - if(fp.length == 1 && fp[0].length == 1){ - fp = fp[0][0]; - } - } - else{ - fp = data_fp; - } - - //参数二 - var data_tp = arguments[2]; - var tp; - if(luckysheet.getObjType(data_tp) == "object" && data_tp.startCell != null){ //参数是选区 - if(sp == "&"){ - tp = luckysheet.func_methods.getCellDataDyadicArr(data_tp, "text"); - } - else{ - tp = luckysheet.func_methods.getCellDataDyadicArr(data_tp, "number"); - } - - if(tp.length == 1 && tp[0].length == 1){ - tp = tp[0][0]; - } - } - else{ - tp = data_tp; - } - - if(luckysheet.func_methods.valueIsError(fp)){ - return fp; - } - - if(luckysheet.func_methods.valueIsError(tp)){ - return tp; - } - - //参数是不规则二维数组 时 return #VALUE! 错误 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(fp[0]) == "array" && !luckysheet.func_methods.isDyadicArr(fp)){ - return luckysheet.formula.error.v; - } - - if(luckysheet.getObjType(tp) == "array" && luckysheet.getObjType(tp[0]) == "array" && !luckysheet.func_methods.isDyadicArr(tp)){ - return luckysheet.formula.error.v; - } - - if(sp == "<>"){ - sp = "!="; - } - - if(sp == "="){ - sp = "=="; - } - - if(sp == "-" && fp == null){ - fp = 0; - } - - //计算result - function booleanOperation(a, operator, b){ - if(luckysheet.func_methods.isRealNum(a)){ - a = parseFloat(a); - } - - if(luckysheet.func_methods.isRealNum(b)){ - b = parseFloat(b); - } - - if(operator == "=="){ - if(a == b){ - return true; - } - else{ - return false; - } - } - else if(operator == "!="){ - if(a != b){ - return true; - } - else{ - return false; - } - } - else if(operator == ">="){ - if(a >= b){ - return true; - } - else{ - return false; - } - } - else if(operator == "<="){ - if(a <= b){ - return true; - } - else{ - return false; - } - } - else if(operator == ">"){ - if(a > b){ - return true; - } - else{ - return false; - } - } - else if(operator == "<"){ - if(a < b){ - return true; - } - else{ - return false; - } - } - } - - //布尔值对应数字(true = 1, false = 1) - function booleanToNum(v){ - if(v == null){ - return v; - } - - if(v.toString().toLowerCase() == "true"){ - return 1; - } - - if(v.toString().toLowerCase() == "false"){ - return 0; - } - - return v; - } - - if(sp == "*"){ //乘 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array" && luckysheet.getObjType(tp[0]) == "array"){ - //二维数组相乘(m*n 与 m*n 等于 m*n;m*p 与 p*n 等于 m*n;其它错误) - if(fp.length == tp.length && fp[0].length == tp[0].length){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - var value = parseFloat(fp[m][n]) * parseFloat(tp[m][n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(fp[0].length == tp.length){ - var rowlen = fp.length; - var collen = tp[0].length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - var value = 0; - - for(var p = 0; p < fp[0].length; p++){ - fp[m][p] = booleanToNum(fp[m][p]); - tp[p][n] = booleanToNum(tp[p][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][p]) && luckysheet.func_methods.isRealNum(tp[p][n])){ - value += parseFloat(fp[m][p]) * parseFloat(tp[p][n]); - } - else{ - value += luckysheet.formula.error.v; - } - } - - if(value.toString() == "NaN"){ - value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(fp.length == tp[0].length){ - var rowlen = tp.length; - var collen = fp[0].length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - var value = 0; - - for(var p = 0; p < tp[0].length; p++){ - fp[p][n] = booleanToNum(fp[p][n]); - tp[m][p] = booleanToNum(tp[m][p]); - - if(luckysheet.func_methods.isRealNum(tp[m][p]) && luckysheet.func_methods.isRealNum(fp[p][n])){ - value += parseFloat(tp[m][p]) * parseFloat(fp[p][n]); - } - else{ - value += luckysheet.formula.error.v; - } - } - - if(value.toString() == "NaN"){ - value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - return luckysheet.formula.error.na; - } - } - else if(luckysheet.getObjType(fp[0]) == "array"){ - //二维数组与一维数组相乘(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) - if(fp[0].length == tp.length){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = parseFloat(fp[m][n]) * parseFloat(tp[n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(fp[0].length == 1){ - var rowlen = fp.length; - var collen = tp.length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - fp[m][0] = booleanToNum(fp[m][0]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[m][0]) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = parseFloat(fp[m][0]) * parseFloat(tp[n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - return luckysheet.formula.error.na; - } - } - else if(luckysheet.getObjType(tp[0]) == "array"){ - //二维数组与一维数组相乘(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) - if(tp[0].length == fp.length){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - var value = parseFloat(fp[n]) * parseFloat(tp[m][n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(tp[0].length == 1){ - var rowlen = tp.length; - var collen = fp.length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - fp[n] = booleanToNum(fp[n]); - tp[m][0] = booleanToNum(tp[m][0]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[m][0])){ - var value = parseFloat(fp[n]) * parseFloat(tp[m][0]); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - return luckysheet.formula.error.na; - } - } - else{ - //一维数组与一维数组相乘时,数组大小不一样是错误 - if(fp.length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = parseFloat(fp[n]) * parseFloat(tp[n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(fp) == "array"){ - tp = booleanToNum(tp); - - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array"){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp)){ - var value = parseFloat(fp[m][n]) * parseFloat(tp); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp)){ - var value = parseFloat(fp[n]) * parseFloat(tp); - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(tp) == "array"){ - fp = booleanToNum(fp); - - var result = []; - - if(luckysheet.getObjType(tp[0]) == "array"){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[m][n])){ - var value = parseFloat(fp) * parseFloat(tp[m][n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < tp.length; n++){ - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = parseFloat(fp) * parseFloat(tp[n]); - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else{ - fp = booleanToNum(fp); - tp = booleanToNum(tp); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp)){ - var result = parseFloat(fp) * parseFloat(tp); - } - else{ - var result = luckysheet.formula.error.v; - } - - return result; - } - } - else if(sp == "/"){ //除 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array" && luckysheet.getObjType(tp[0]) == "array"){ - //二维数组相除(m*n 与 m*n 等于 m*n;m*p 与 p*n 等于 m*n;其它错误) - if(fp.length == tp.length && fp[0].length == tp[0].length){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - if(parseFloat(tp[m][n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[m][n]) / parseFloat(tp[m][n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(fp[0].length == tp.length){ - var tp_inverse = luckysheet.matrix_methods.inverse(tp); - - var rowlen = fp.length; - var collen = tp_inverse[0].length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - var value = 0; - - for(var p = 0; p < fp[0].length; p++){ - fp[m][p] = booleanToNum(fp[m][p]); - tp_inverse[p][n] = booleanToNum(tp_inverse[p][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][p]) && luckysheet.func_methods.isRealNum(tp_inverse[p][n])){ - value += parseFloat(fp[m][p]) * parseFloat(tp_inverse[p][n]); - } - else{ - value += luckysheet.formula.error.v; - } - } - - if(value.toString() == "NaN"){ - value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - return luckysheet.formula.error.na; - } - } - else if(luckysheet.getObjType(fp[0]) == "array"){ - //二维数组与一维数组相除(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) - if(fp[0].length == tp.length){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[n])){ - if(parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[m][n]) / parseFloat(tp[n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(fp[0].length == 1){ - var rowlen = fp.length; - var collen = tp.length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - fp[m][0] = booleanToNum(fp[m][0]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[m][0]) && luckysheet.func_methods.isRealNum(tp[n])){ - if(parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[m][0]) / parseFloat(tp[n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - return luckysheet.formula.error.na; - } - } - else if(luckysheet.getObjType(tp[0]) == "array"){ - //二维数组与一维数组相除(m*n 与 n 等于 m*n;m*1 与 n 等于 m*n;其它错误) - if(tp[0].length == fp.length){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - if(parseFloat(tp[m][n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[n]) / parseFloat(tp[m][n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(tp[0].length == 1){ - var rowlen = tp.length; - var collen = fp.length; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - fp[n] = booleanToNum(fp[n]); - tp[m][0] = booleanToNum(tp[m][0]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[m][0])){ - if(parseFloat(tp[m][0]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[n]) / parseFloat(tp[m][0]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - return luckysheet.formula.error.na; - } - } - else{ - //一维数组与一维数组相除时,数组大小不一样是错误 - if(fp.length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[n])){ - if(parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[n]) / parseFloat(tp[n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(fp) == "array"){ - tp = booleanToNum(tp); - - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array"){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp)){ - if(parseFloat(tp) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[m][n]) / parseFloat(tp); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp)){ - if(parseFloat(tp) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp[n]) / parseFloat(tp); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(tp) == "array"){ - fp = booleanToNum(fp); - - var result = []; - - if(luckysheet.getObjType(tp[0]) == "array"){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[m][n])){ - if(parseFloat(tp[m][n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp) / parseFloat(tp[m][n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < tp.length; n++){ - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[n])){ - if(parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = parseFloat(fp) / parseFloat(tp[n]); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else{ - fp = booleanToNum(fp); - tp = booleanToNum(tp); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp)){ - if(parseFloat(tp) == 0){ - var result = luckysheet.formula.error.d; - } - else{ - var result = parseFloat(fp) / parseFloat(tp); - } - } - else{ - var result = luckysheet.formula.error.v; - } - - return result; - } - } - else if(sp == "+" || sp == "-" || sp == "%"){ //加 减 取余 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array" && luckysheet.getObjType(tp[0]) == "array"){ - if(fp.length != tp.length && fp[0].length != tp[0].length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - if(sp == "%" && parseFloat(tp[m][n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp[m][n]) + sp + parseFloat(tp[m][n])); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(fp[0]) == "array"){ - if(fp[0].length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[n])){ - if(sp == "%" && parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp[m][n]) + sp + parseFloat(tp[n])); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(tp[0]) == "array"){ - if(tp[0].length != fp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - if(sp == "%" && parseFloat(tp[m][n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp[n]) + sp + parseFloat(tp[m][n])); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - if(fp.length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[n])){ - if(sp == "%" && parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp[n]) + sp + parseFloat(tp[n])); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(fp) == "array"){ - tp = booleanToNum(tp); - - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array"){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp)){ - if(sp == "%" && parseFloat(tp) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp[m][n]) + sp + parseFloat(tp)); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp)){ - if(sp == "%" && parseFloat(tp) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp[n]) + sp + parseFloat(tp)); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(tp) == "array"){ - fp = booleanToNum(fp); - - var result = []; - - if(luckysheet.getObjType(tp[0]) == "array"){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[m][n])){ - if(sp == "%" && parseFloat(tp[m][n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp) + sp + parseFloat(tp[m][n])); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < tp.length; n++){ - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[n])){ - if(sp == "%" && parseFloat(tp[n]) == 0){ - var value = luckysheet.formula.error.d; - } - else{ - var value = eval(parseFloat(fp) + sp + parseFloat(tp[n])); - } - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else{ - fp = booleanToNum(fp); - tp = booleanToNum(tp); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp)){ - if(sp == "%" && parseFloat(tp) == 0){ - var result = luckysheet.formula.error.d; - } - else{ - var result = eval(parseFloat(fp) + sp + parseFloat(tp)); - } - } - else{ - var result = luckysheet.formula.error.v; - } - - return result; - } - } - else if(sp == "==" || sp == "!=" || sp == ">=" || sp == "<=" || sp == ">" || sp == "<"){ //比较运算符 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array" && luckysheet.getObjType(tp[0]) == "array"){ - if(fp.length != tp.length && fp[0].length != tp[0].length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - var value = booleanOperation(fp[m][n], sp, tp[m][n]); - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(fp[0]) == "array"){ - if(fp[0].length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - var value = booleanOperation(fp[m][n], sp, tp[n]); - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(tp[0]) == "array"){ - if(tp[0].length != fp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - var value = booleanOperation(fp[n], sp, tp[m][n]); - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - if(fp.length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var n = 0; n < fp.length; n++){ - var value = booleanOperation(fp[n], sp, tp[n]); - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(fp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array"){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - var value = booleanOperation(fp[m][n], sp, tp); - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < fp.length; n++){ - var value = booleanOperation(fp[n], sp, tp); - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(tp[0]) == "array"){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - var value = booleanOperation(fp, sp, tp[m][n]); - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < tp.length; n++){ - var value = booleanOperation(fp, sp, tp[n]); - result.push(value); - } - } - - return result; - } - else{ - return booleanOperation(fp, sp, tp); - } - } - else if(sp == "&"){ //连接符 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array" && luckysheet.getObjType(tp[0]) == "array"){ - if(fp.length != tp.length && fp[0].length != tp[0].length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - rowArr.push(fp[m][n] + "" + tp[m][n]); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(fp[0]) == "array"){ - if(fp[0].length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - rowArr.push(fp[m][n] + "" + tp[n]); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(tp[0]) == "array"){ - if(tp[0].length != fp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - rowArr.push(fp[n] + "" + tp[m][n]); - } - - result.push(rowArr); - } - } - else{ - if(fp.length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var n = 0; n < fp.length; n++){ - result.push(fp[n] + "" + tp[n]); - } - } - - return result; - } - else if(luckysheet.getObjType(fp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array"){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - rowArr.push(fp[m][n] + "" + tp); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < fp.length; n++){ - result.push(fp[n] + "" + tp); - } - } - - return result; - } - else if(luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(tp[0]) == "array"){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - rowArr.push(fp + "" + tp[m][n]); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < tp.length; n++){ - result.push(fp + "" + tp[n]); - } - } - - return result; - } - else{ - return fp + "" + tp; - } - } - else if(sp == "^"){ //幂 - if(luckysheet.getObjType(fp) == "array" && luckysheet.getObjType(tp) == "array"){ - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array" && luckysheet.getObjType(tp[0]) == "array"){ - if(fp.length != tp.length && fp[0].length != tp[0].length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - var value = Math.pow(parseFloat(fp[m][n]), parseFloat(tp[m][n])); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(fp[0]) == "array"){ - if(fp[0].length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = Math.pow(parseFloat(fp[m][n]), parseFloat(tp[n])); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else if(luckysheet.getObjType(tp[0]) == "array"){ - if(tp[0].length != fp.length){ - return luckysheet.formula.error.na; - } - - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[m][n])){ - var value = Math.pow(parseFloat(fp[n]), parseFloat(tp[m][n])); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - if(fp.length != tp.length){ - return luckysheet.formula.error.na; - } - - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = Math.pow(parseFloat(fp[n]), parseFloat(tp[n])); - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(fp) == "array"){ - tp = booleanToNum(tp); - - var result = []; - - if(luckysheet.getObjType(fp[0]) == "array"){ - for(var m = 0; m < fp.length; m++){ - var rowArr = []; - - for(var n = 0; n < fp[m].length; n++){ - fp[m][n] = booleanToNum(fp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp[m][n]) && luckysheet.func_methods.isRealNum(tp)){ - var value = Math.pow(parseFloat(fp[m][n]), parseFloat(tp)); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < fp.length; n++){ - fp[n] = booleanToNum(fp[n]); - - if(luckysheet.func_methods.isRealNum(fp[n]) && luckysheet.func_methods.isRealNum(tp)){ - var value = Math.pow(parseFloat(fp[n]), parseFloat(tp)); - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else if(luckysheet.getObjType(tp) == "array"){ - fp = booleanToNum(fp); - - var result = []; - - if(luckysheet.getObjType(tp[0]) == "array"){ - for(var m = 0; m < tp.length; m++){ - var rowArr = []; - - for(var n = 0; n < tp[m].length; n++){ - tp[m][n] = booleanToNum(tp[m][n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[m][n])){ - var value = Math.pow(parseFloat(fp), parseFloat(tp[m][n])); - } - else{ - var value = luckysheet.formula.error.v; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - } - else{ - for(var n = 0; n < tp.length; n++){ - tp[n] = booleanToNum(tp[n]); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp[n])){ - var value = Math.pow(parseFloat(fp), parseFloat(tp[n])); - } - else{ - var value = luckysheet.formula.error.v; - } - - result.push(value); - } - } - - return result; - } - else{ - fp = booleanToNum(fp); - tp = booleanToNum(tp); - - if(luckysheet.func_methods.isRealNum(fp) && luckysheet.func_methods.isRealNum(tp)){ - var result = Math.pow(parseFloat(fp), parseFloat(tp)); - } - else{ - var result = luckysheet.formula.error.v; - } - - return result; - } - } - }; - - window.luckysheet_getarraydata = function(){ - var fp = arguments[0]; - - fp = fp.replace("{", "").replace("}", "").replace(/\"/g, ''); - - var arr = []; - - if(fp.indexOf(";") > -1){ - arr = fp.split(";"); - - for(var i = 0; i < arr.length; i++){ - arr[i] = arr[i].split(","); - } - } - else{ - arr = fp.split(","); - } - - return arr; - }; - - window.luckysheet_getcelldata = function(txt) { - if (window.luckysheet_getcelldata_cache == null) { - window.luckysheet_getcelldata_cache = {}; - } - - if (txt in window.luckysheet_getcelldata_cache) { - return window.luckysheet_getcelldata_cache[txt]; - } - - var luckysheetfile = luckysheet.getluckysheetfile(); - var val = txt.split("!"); - var sheettxt = "", - rangetxt = "", - sheetIndex = -1, - sheetdata = null; - - if (val.length > 1) { - sheettxt = val[0]; - rangetxt = val[1]; - - for (var i in luckysheetfile) { - if (sheettxt == luckysheetfile[i].name) { - sheetIndex = luckysheetfile[i].index; - sheetdata = luckysheetfile[i].data; - break; - } - } - - if (sheetIndex == -1) { - sheetIndex = 0; - } - } - else { - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - sheettxt = luckysheetfile[index].name; - sheetIndex = luckysheetfile[index].index; - sheetdata = luckysheet.flowdata; - rangetxt = val[0]; - - if (luckysheet.formula.execFunctionGroupData != null) { - sheetdata = luckysheet.formula.execFunctionGroupData; - } - } - - if (rangetxt.indexOf(":") == -1) { - var row = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; - var col = luckysheet.luckysheetABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); - if (!isNaN(row) && !isNaN(col)) { - var ret = luckysheet.getdatabyselectionD(sheetdata, { - "row": [row, row], - "column": [col, col] - })[0][0]; - - /* - if (ret instanceof Object) { - if(luckysheet.datecontroll.isdatetime(ret.m)){ //如果是时间格式,则获取m - ret = ret.m; - }else{ - ret = ret.v; - } - - } - */ // 获取对象,包含格式(ct)用于后续计算 - /*if (ret instanceof Object) { - ret = ret.v; //时间格式亦获取v - }*/ - - - //return ret; - - //runze.liu New - //范围的长宽 - var rowl = 1; - var coll = 1; - var retAll= {"sheetName":sheettxt,"startCell":rangetxt,"rowl":rowl,"coll":coll,"data":ret}; - window.luckysheet_getcelldata_cache[txt] = retAll; - return retAll; - //runze.liu - } - else { - return []; - } - } - else { - rangetxt = rangetxt.split(":"); - var row = [], col = []; - //console.log(rangetxt[0].replace(/[^0-9]/, ""), rangetxt[1].replace(/[^0-9]/, ""), rangetxt); - row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; - row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; - - if (isNaN(row[0])) { - row[0] = 0; - } - - if (isNaN(row[1])) { - row[1] = sheetdata.length - 1; - } - - if (row[0] > row[1]) { - luckysheet.tooltip.info("选择失败", "输入范围错误!"); - return []; - } - - col[0] = luckysheet.luckysheetABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); - col[1] = luckysheet.luckysheetABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); - - if (isNaN(col[0])) { - col[0] = 0; - } - - if (isNaN(col[1])) { - col[1] = sheetdata[0].length - 1; - } - - if (col[0] > col[1]) { - luckysheet.tooltip.info("选择失败", "输入范围错误!"); - return []; - } - //if (!isNaN(row)) { - // return luckysheet.getdatabyselectionD(sheetdata, { "row": [row, row], "column": [0, sheetdata[0].length - 1] }); - //} - //else if (!isNaN(col)) { - // return luckysheet.getdatabyselectionD(sheetdata, { "row": [0, sheetdata.length - 1], "column": [col, col] }); - //} - //console.log("sheetData::",sheetdata); - var ret = luckysheet.getdatabyselectionD(sheetdata, { - "row": row, - "column": col - }); - - //return ret; - - //runze.liu New - //范围的长宽 - var rowl = row[1] - row[0] + 1; - var coll = col[1] - col[0] + 1; - var retAll= {"sheetName":sheettxt,"startCell":rangetxt[0],"rowl":rowl,"coll":coll,"data":ret}; - window.luckysheet_getcelldata_cache[txt] = retAll; - //console.log("所有的:"+retAll.sheetName,retAll.startCell,retAll.rowl,retAll.coll,retAll.data); - return retAll; - //runze.liu - } - }; - //解析单个取得的值,有字符串,数字,引用单元格或者函数 - window.luckysheet_parseData = function(value) { - if(typeof value === "object" ){ - if(value == null){ - return ""; - } - else if(Array.isArray(value)){ //函数返回的带期望格式的数组,可提取格式 - var v = luckysheet.mask.genarate(value[0]); - return v[2]; - } - else{ //getcelldat引用单元格对象,带有格式 - if(Array.isArray(value.data)){ //单元格区域 - return luckysheet.formula.error.v; - } - else{ //单个单元格 - if(value.data.v === undefined){ - return ""; - } - else{ - return value.data.v; - } - } - } - } - else if(!luckysheet.formula.isCompareOperator(value).flag){ - var v = luckysheet.mask.genarate(value); - return v[2]; - } - else if(typeof value === "string" || typeof value === "number"){ - return value; - } - - return luckysheet.formula.error.v; - }; - window.luckysheet_getValue = function(){ - //解析获取函数参数,无格式,且可包含带操作符的">5" - //数据类型:1.手动输入或函数返回的字符串,普通字符串或数字直接取值,特殊格式需转化 如:"2019-1-1"(特殊格式转化为数字)、">5"或数字 - //2.引用单元格对象,取得二维数组或单个的v 如:A1 - //3.函数返回的带期望格式的数组,取得第一个参数,转化为数字 如:["2019-1-1",true] - var args = arguments[0]; - for(var i = 0;i -1){ - return [true, "成功"]; - } - else{ - if(type.indexOf("range") > -1 && (luckysheet.getObjType(data) == "object" || luckysheet.getObjType(data) == "array")){ - return [true, "成功"]; - } - - if(type.indexOf("number") > -1 && (luckysheet.func_methods.isRealNum(data) || luckysheet.getObjType(data) == "boolean")){ - return [true, "成功"]; - } - - if(type.indexOf("string") > -1 && luckysheet.getObjType(data) == "string"){ - return [true, "成功"]; - } - - if(type.indexOf("date") > -1 && luckysheet.datecontroll.isdatetime(data)){ - return [true, "成功"]; - } - - return [false, "参数类型错误"]; - } - }, - getPureValueByData:function(data){ - if(data.length == 0){ - return []; - } - - var output = []; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - for(var r = 0; r < data.length; r++){ - var row = []; - - for(var c = 0; c < data[0].length; c++){ - var cell = data[r][c]; - - if(luckysheet.getObjType(cell) == "object"){ - row.push(cell.v); - } - else{ - row.push(cell); - } - } - - output.push(row); - } - } - else{ - for(var i = 0; i < data.length; i++){ - var cell = data[i]; - - if(luckysheet.getObjType(cell) == "object"){ - output.push(cell.v); - } - else{ - output.push(cell); - } - } - } - } - else { - var cell = data; - - if(luckysheet.getObjType(cell) == "object"){ - output.push(cell.v); - } - else{ - output.push(cell); - } - } - - return output; - }, - //sparklines添加 - readCellDataToOneArray:function(rangeValue){ - if(rangeValue == null){ - return []; - } - - if(luckysheet.getObjType(rangeValue) != "object"){ - return [rangeValue]; - } - - var dataformat = []; - - var data = []; - - if(rangeValue != null && rangeValue.data != null){ - data = rangeValue.data; - } - else if(rangeValue != null && !luckysheet.func_methods.isRealNull(rangeValue.v)){ - return [rangeValue.v]; - } - else{ - return []; - } - - //适配excel的动态数组格式,{1,2,3,4,5}或者{{1,2,3},{4,5,6},{7,8,9}} - if(luckysheet.getObjType(data) == "array"){ - data = luckysheet.formula.getPureValueByData(data); - } - else if(luckysheet.getObjType(data) == "object"){ - data = data.v; - - return [data]; - } - else{ - if(/\{.*?\}/.test(data)){ - data = data.replace(/\{/g, "[").replace(/\}/g, "]"); - } - - data = eval('('+ data +')'); - } - - //把二维数组转换为一维数组,sparklines要求数据格式为一维数组 - //var dataformat = []; - if(luckysheet.getObjType(data[0]) == "array"){ - for(var i = 0; i < data.length; i++){ - dataformat = dataformat.concat(data[i]); - } - } - else{ - dataformat = data; - } - - return dataformat; - }, - //sparklines添加 - //获得函数里某个参数的值,使用此函数需要在函数中执行luckysheet_getValue方法 - getValueByFuncData:function(value, arg){ - if(value == null){ - return null; - } - - var _this = this; - - if(luckysheet.getObjType(value) == "array"){ - if(arg == "avg"){ - return window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, value); - } - else if(arg == "sum"){ - return window.luckysheet_function.SUM.f.apply(window.luckysheet_function.SUM, value); - } - else{ - if(luckysheet.getObjType(value[0]) == "object"){ - return luckysheet.mask.getValueByFormat(value[0]); - } - else{ - return value[0]; - } - } - } - else if(luckysheet.getObjType(value) == "object"){ - return luckysheet.mask.getValueByFormat(value); - } - else{ - return value; - } - }, - //sparklines添加 - sparklinesColorMap:function(arguments, len){ - var colorLists = null; - - if(len == null){ - len = 5; - } - - var index = 0; - - if(arguments.length > len){ - for(var i = len; i < arguments.length; i++){ - var colorMap = arguments[i]; - var colorListArray = luckysheet.formula.readCellDataToOneArray(colorMap); - - for(var a = 0; a < colorListArray.length; a++){ - var ca = colorListArray[a]; - - if(ca.indexOf(":") > -1){ - if(!colorLists){ - colorLists = {}; - } - - var calist = ca.split(":"); - - if(calist.length == 2){ - colorLists[calist[0]] = calist[1]; - } - else if(calist.length > 1){ - colorLists[calist[0] + ":" + calist[1]] = calist[2]; - } - } - else{ - if(!colorLists){ - colorLists = []; - } - - colorLists.push(ca); - } - } - - index++; - } - } - - return colorLists; - }, - //sparklines添加 - colorList:["#2ec7c9", "#fc5c5c", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"], - classlist: { - "province": { - 11: "北京", - 12: "天津", - 13: "河北", - 14: "山西", - 15: "内蒙古", - 21: "辽宁", - 22: "吉林", - 23: "黑龙江", - 31: "上海", - 32: "江苏", - 33: "浙江", - 34: "安徽", - 35: "福建", - 36: "江西", - 37: "山东", - 41: "河南", - 42: "湖北", - 43: "湖南", - 44: "广东", - 45: "广西", - 46: "海南", - 50: "重庆", - 51: "四川", - 52: "贵州", - 53: "云南", - 54: "西藏", - 61: "陕西", - 62: "甘肃", - 63: "青海", - 64: "宁夏", - 65: "新疆", - 71: "台湾", - 81: "香港", - 82: "澳门", - 91: "国外" - } - }, - oldvalue: null, - dontupdate: function() { - luckysheetCellUpdate = []; - $("#luckysheet-functionbox-cell, #luckysheet-rich-text-editor").html(this.oldvalue); - //luckysheet.formula.rangestart = false; - this.cancelNormalSelected(); - if (luckysheet.formula.rangetosheet != luckysheet.currentSheetIndex) { - luckysheet.sheetmanage.changeSheetExec(luckysheet.formula.rangetosheet); - } - //luckysheetMoveHighlightCell("down", 0); - }, - fucntionboxshow: function(r, c) { - var d = luckysheet.flowdata; - var value = ""; - - if (d[r] != null && d[r][c] != null && d[r][c].v != null) { - var cell = d[r][c]; - if(cell.f!=null){ - value = luckysheet.getcellvalue(r, c, d, "f"); - } - else{ - value = luckysheet.mask.valueShowEs(r, c, d); - } - } - - this.oldvalue = value; - $("#luckysheet-functionbox-cell").html(value); - }, - //获得某个单元格或区域的偏移一定距离后的单元格( Sheet1!B6:C8 格式) - cellOffset:function(range,rows,cols,height,width){// 参数:range or cell , rows,cols,height,width - var startCell = range.startCell; - var rowl = range.rowl; - var coll = range.coll; - var startCellRow = parseInt(startCell.replace(/[^0-9]/g, "")); - var startCellCol = luckysheet.luckysheetABCatNum(startCell.replace(/[^A-Za-z]/g, "")); - - var row = [],col = [],offsetRange; - row[0] = startCellRow + rows; - col[0] = startCellCol + cols; - - row[1] = row[0] + height - 1; - col[1] = col[0] + width - 1; - - col[0] = luckysheet.luckysheetchatatABC(col[0]); - col[1] = luckysheet.luckysheetchatatABC(col[1]); - - var cellF = col[0] + row[0]; - var cellL = col[1] + row[1]; - if(cellF == cellL){ - offsetRange = range.sheetName + "!"+ cellF; - }else{ - offsetRange = range.sheetName + "!"+ cellF + ":" + cellL; - } - return offsetRange; - }, - parseDatetoNum:function(date){ //函数中获取到时间格式或者数字形式统一转化为数字进行运算 - if(typeof(date) == "object" && typeof date.v == "number"){ - date = date.v; - }else if(luckysheet.isdatatype(date) == "num"){ - date = parseFloat(date); - }else if(luckysheet.isdatatype(date) == "date"){ - date = luckysheet.mask.genarate(date)[2]; - }else{ - return luckysheet.formula.error.v; - } - return date; - }, - //获取一维数组 - getRangeArray:function(range){ - var rangeNow = []; - var fmt = "General"; - if(range.length == 1){ //一行 - for(var c = 0;c < range[0].length;c++){ - if(range[0][c] != null && range[0][c].v){ - rangeNow.push(range[0][c].v); - var f = range[0][c].ct.fa; - fmt = (fmt == "General") ? f : fmt; - }else{ - //若单元格为null或为空,此处推入null(待考虑是否使用"null") - rangeNow.push(null); - } - - } - }else if(range[0].length == 1){ //一列 - - for(var r = 0;r < range.length;r++){ - if(range[r][0] != null && range[r][0].v){ - rangeNow.push(range[r][0].v); - var f = range[r][0].ct.fa; - fmt = (fmt == "General") ? f : fmt; - }else{ - rangeNow.push(null); - } - - } - }else{ - for(var r = 0;r < range.length;r++){ - for(var c = 0;c < range[r].length;c++){ - if(range[r][c] != null && range[r][c].v){ - rangeNow.push(range[r][c].v); - var f = range[r][c].ct.fa; - fmt = (fmt == "General") ? f : fmt; - }else{ - rangeNow.push(null); - } - } - } - } - range = rangeNow; - return [range,fmt]; - }, - //获取二维数组:qksheet格式[[{v,m,ct}] ==> [1] - getRangeArrayTwo:function(range){ - var data = $.extend(true, [], range); - if(data.length == 1){ //一行 - for(var c = 0;c < data[0].length;c++){ - if(data[0][c] instanceof Object){ - if(data[0][c] != null && data[0][c] instanceof Object && !!data[0][c].m){ - data[0][c] = data[0][c].m; - }else{ - if(data[0][c] != null && data[0][c] instanceof Object && !!data[0][c].v){ - data[0][c] = data[0][c].v; - }else{ - data[0][c] = null; - } - - } - } - - - } - }else if(data[0].length == 1){ //一列 - - for(var r = 0;r < data.length;r++){ - if(data[r][0] instanceof Object){ - if(data[r][0] != null && data[r][0] instanceof Object && !!data[r][0].m){ - data[r][0] = data[r][0].m; - }else{ - if(data[r][0] != null && data[r][0] instanceof Object && !!data[r][0].v){ - data[r][0] = data[r][0].v; - }else{ - data[r][0] = null; - } - } - } - - - } - }else{ - for(var r = 0;r < data.length;r++){ - for(var c = 0;c < data[r].length;c++){ - if(data[r][c] instanceof Object){ - if(data[r][c] != null && data[r][c] instanceof Object && !!data[r][c].m){ - data[r][c] = data[r][c].m; - }else{ - if(data[r][c] != null && data[r][c] instanceof Object && !!data[r][c].v){ - data[r][c] = data[r][c].v; - }else{ - data[r][c] = null; - } - } - } - - } - } - } - return data; - }, - isWildcard:function(a, b){ //正则匹配通配符: * ? ~* ~?,a目标参数,b通配符 - a = a.toString(); - b = b.toString(); - - if(luckysheet.formula.isCompareOperator(b).flag){ - b = luckysheet.formula.isCompareOperator(b).num; - } - var str = ""; - for(var i = 0;i < b.length;i++){ - var v = b.charAt(i); - - if(v == "*" ){ - str += ".*"; - } - else if(v == "?"){ - str += "."; - } - else if(v == "~"){ - if(b.charAt(i+1) == "*"){ - str += "\\*"; - i++; - } - else if(b.charAt(i+1) == "?"){ - str += "\\?"; - i++; - } - else{ - str += "~"; - } - } - else{ - str += v; - } - } - - var reg = new RegExp("^" + str + "$","g"); - return !!a.match(reg); - }, - isCompareOperator:function(str){ //判断前一个或者两个字符是否是比较运算符 - str = str.toString(); - var ope = ""; //存放比较运算符 - var num = ""; //截取比较运算符之后的数字用于实际比较 - var strOne = str.substr(0,1); - var strTwo = str.substr(1,1); - var flag = false; - var ret; - - if(strOne == ">"){ - if(strTwo == "="){ - ope = str.substr(0,2); - num = str.substr(2); - flag = true; - }else if(strTwo != "="){ - ope = str.substr(0,1); - num = str.substr(1); - flag = true; - } - }else if(strOne == "<"){ - if(strTwo == "=" || strTwo == ">"){ - ope = str.substr(0,2); - num = str.substr(2); - flag = true; - }else if(strTwo != "=" && strTwo != ">"){ - ope = str.substr(0,1); - num = str.substr(1); - flag = true; - } - }else if(strOne == "=" && strTwo != "="){ - ope = str.substr(0,1); - num = str.substr(1); - flag = true; - } - ret = {"flag":flag,"ope":ope,"num":num}; - //console.log("字符串:",flag,ope,num); - return ret; - }, - acompareb:function(a, b){ //a 与 b比较,b可为含比较符,通配符 - var bFirst; - var flag = false; - - // if(luckysheet.isdatatype(b) == "num"){ - if(luckysheet.func_methods.isRealNum(b)){ - flag = luckysheet_compareWith(a,"==",b); - } - else if(typeof(b) == "string"){ //条件输入字符串,如:">233" - if(b.indexOf("*") != -1 || b.indexOf("?") != -1){ // 正则匹配:输入通配符:"黑*","白?",以及"白?黑*~*" - //通配符函数 - return luckysheet.formula.isWildcard(a,b); - } - else if(luckysheet.formula.isCompareOperator(b).flag){ //"黑糖" - var ope = luckysheet.formula.isCompareOperator(b).ope; - var num = luckysheet.formula.isCompareOperator(b).num; - flag = luckysheet_compareWith(a,ope,num); - } - else{ - flag = luckysheet_compareWith(a,"==",b); - } - } - return flag; - }, - compareParams:function(fp,sp,sym){ //比较两个字符串或者数字的大小,支持比较对象,暂不支持数组 - var flag = false; - //判断a和b的数据类型 - var classNameA=toString.call(fp), - classNameB=toString.call(sp); - if(sym == ">"){ - if(fp > sp){flag = true;} - } - else if(sym == ">="){ - if(fp >= sp){flag = true;} - } - else if(sym == "<"){ - if(fp < sp){flag = true;} - } - else if(sym == "<="){ - if(fp <= sp){flag = true;} - } - else if(sym == "="){ - if(fp == sp){flag = true;} - }else if(sym == "<>"){ - if(fp != sp){flag = true;} - } - - //对象类型比较相等 - if(classNameA == '[object Object]' && classNameB == '[object Object]'){ - //获取a和b的属性长度 - var propsA = Object.getOwnPropertyNames(fp), - propsB = Object.getOwnPropertyNames(sp); - if(propsA.length != propsB.length){ - return false; - } - for(var i=0;i 1) { - sheettxt = val[0]; - rangetxt = val[1]; - - for (var i in luckysheetfile) { - if (sheettxt == luckysheetfile[i].name) { - sheetIndex = luckysheetfile[i].index; - sheetdata = luckysheetfile[i].data; - break; - } - } - } - else { - var index = luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex); - sheettxt = luckysheetfile[index].name; - sheetIndex = luckysheetfile[index].index; - sheetdata = luckysheet.flowdata; - rangetxt = val[0]; - } - - if (rangetxt.indexOf(":") == -1) { - var row = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; - var col = luckysheet.luckysheetABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); - if (!isNaN(row) && !isNaN(col)) { - return { - "row": [row, row], - "column": [col, col], - "sheetIndex": sheetIndex - }; - } - //else if (!isNaN(row)) { - // return { "row": [row, row], "column": [0, sheetdata[0].length - 1], "sheetIndex": sheetIndex }; - //} - //else if (!isNaN(col)) { - // return { "row": [0, sheetdata.length - 1], "column": [col, col], "sheetIndex": sheetIndex }; - //} - else { - return null; - } - } else { - rangetxt = rangetxt.split(":"); - var row = [],col = []; - //console.log(rangetxt[0].replace(/[^0-9]/, ""), rangetxt[1].replace(/[^0-9]/, ""), rangetxt); - row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; - row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; - if (isNaN(row[0])) { - row[0] = 0; - } - if (isNaN(row[1])) { - row[1] = sheetdata.length - 1; - } - if (row[0] > row[1]) { - return null; - } - col[0] = luckysheet.luckysheetABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); - col[1] = luckysheet.luckysheetABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); - if (isNaN(col[0])) { - col[0] = 0; - } - if (isNaN(col[1])) { - col[1] = sheetdata[0].length - 1; - } - if (col[0] > col[1]) { - return null; - } - return { - "row": row, - "column": col, - "sheetIndex": sheetIndex - }; - } - }, - rangeHightlightHTML: '
', - createRangeHightlight: function() { - var $span = $("#luckysheet-rich-text-editor").find("span.luckysheet-formula-functionrange-cell"); - $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); - - $span.each(function() { - var rangeindex = $(this).attr("rangeindex"), - range = $(this).text(); - $("#luckysheet-formula-functionrange").append(luckysheet.replaceHtml(luckysheet.formula.rangeHightlightHTML, { - "id": rangeindex - })); - var cellrange = luckysheet.formula.getcellrange(range); - var rangeid = "luckysheet-formula-functionrange-highlight-" + rangeindex; - - if (cellrange == null) {} else if (cellrange.sheetIndex == luckysheet.currentSheetIndex || (cellrange.sheetIndex == -1 && luckysheet.formula.rangetosheet == luckysheet.currentSheetIndex)) { - $("#" + rangeid).data("range", cellrange).find(".luckysheet-copy").css({ - "background": luckysheet.jfcolor[rangeindex] - }).end().find(".luckysheet-highlight").css({ - "background": luckysheet.jfcolor[rangeindex] - }).end().find(".luckysheet-selection-copy-hc").css({ - "background": luckysheet.jfcolor[rangeindex] - }); - luckysheet.seletedHighlistByindex(rangeid, cellrange.row[0], cellrange.row[1], cellrange.column[0], cellrange.column[1]); - } - }); - - $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").show(); - }, - searchHTML: '
', - helpHTML: '
SUM ( A2:A100, 101 )
示例
SUM ( A2:A100, 101 )
摘要
${detail}
${param}
', - getrangeseleciton: function() { - var currSelection = window.getSelection(); - var anchor = $(currSelection.anchorNode); - var anchorOffset = currSelection.anchorOffset; - //console.log(anchor,anchorOffset, anchor.is("#luckysheet-functionbox-cell"), anchor.attr("id")); - if (anchor.parent().is("span") && anchorOffset != 0) { - var txt = $.trim(anchor.text()), - lasttxt = ""; - if (txt.length == 0 && anchor.parent().prev().length > 0) { - var ahr = anchor.parent().prev(); - txt = $.trim(ahr.text()); - lasttxt = txt.substr(txt.length - 1, 1); - return ahr; - } else { - lasttxt = txt.substr(anchorOffset - 1, 1); - return anchor.parent(); - } - } else if (anchor.is("#luckysheet-rich-text-editor") || anchor.is("#luckysheet-functionbox-cell")) { - var txt = $.trim(anchor.find("span").last().text()),lasttxt; - if (txt.length == 0 && anchor.find("span").length > 1) { - var ahr = anchor.find("span"); - txt = $.trim(ahr.eq(ahr.length - 2).text()); - return ahr; - } else { - return anchor.find("span").last(); - } - } else if (anchor.parent().is("#luckysheet-rich-text-editor") || anchor.parent().is("#luckysheet-functionbox-cell") || anchorOffset == 0) { - if (anchorOffset == 0) { - anchor = anchor.parent(); - } - if (anchor.prev().length > 0) { - var txt = $.trim(anchor.prev().text()); - var lasttxt = txt.substr(txt.length - 1, 1); - return anchor.prev(); - } - } - return null; - }, - searchFunctionPosition: function($menu, $editor, x, y, isparam) { - var winH = $(window).height(), - winW = $(window).width(); - var menuW = $menu.outerWidth(), - menuH = $menu.outerHeight(); - if (isparam == null) { - isparam = false; - } - var top = y, - left = x; - if (x + menuW > winW) { - left = x - menuW + $editor.outerWidth(); - } else { - left = x; - } - if (y + menuH > winH) { - top = y - menuH; - } else { - top = y + $editor.outerHeight(); - if (!isparam) { - $menu.html($menu.find(".luckysheet-formula-search-item").get().reverse()); - } - } - if (top < 0) { - top = 0; - } - if (left < 0) { - left = 0; - } - $menu.css({ - "top": top, - "left": left - }).show(); - }, - searchFunctionCell: null, - searchFunction: function($editer) { - //$editer.closest(".luckysheet-formula-text-color") - var $cell = this.getrangeseleciton(); - this.searchFunctionCell = $cell; - if ($cell == null || $editer == null) { - return; - } - var searchtxt = $cell.text().toUpperCase(); - var reg = /^[a-zA-Z]|[a-zA-Z_]+$/; - //console.log(searchtxt, !reg.test(searchtxt), $editer); - if (!reg.test(searchtxt)) { - return; - } - var result = { - "f": [], - "s": [], - "t": [] - }, - result_i = 0; - for (var i = 0; i < luckysheet.functionlist.length; i++) { - var item = luckysheet.functionlist[i], - n = item.n; - //console.log(n, searchtxt); - if (n == searchtxt) { - result.f.unshift(item); - result_i++; - } else if (n.substr(0, searchtxt.length) == searchtxt) { - result.s.unshift(item); - result_i++; - } else if (n.indexOf(searchtxt) > -1) { - result.t.unshift(item); - result_i++; - } - if (result_i >= 10) { - break; - } - } - //console.log(result, result_i); - var list = result.t.concat(result.s.concat(result.f)); - if (list.length <= 0) { - return; - } - var listHTML = this.searchFunctionHTML(list); - $("#luckysheet-formula-search-c").html(listHTML).show(); - $("#luckysheet-formula-help-c").hide(); - var $c = $editer.parent(), - offset = $c.offset(); - this.searchFunctionPosition($("#luckysheet-formula-search-c"), $c, offset.left, offset.top); - }, - searchFunctionEnter: function($obj) { - var functxt = $obj.data("func"); - luckysheet.formula.searchFunctionCell.text(functxt).after('('); - luckysheet.formula.setCaretPosition(luckysheet.formula.searchFunctionCell.next().get(0), 0, 1); - $("#luckysheet-formula-search-c").hide(); - this.helpFunctionExe(luckysheet.formula.searchFunctionCell.closest("div"), luckysheet.formula.searchFunctionCell.next()); - }, - searchFunctionHTML: function(list) { - if ($("#luckysheet-formula-search-c").length == 0) { - $("body").append(this.searchHTML); - $("#luckysheet-formula-search-c").on("mouseover", ".luckysheet-formula-search-item", function() { - $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active"); - $(this).addClass("luckysheet-formula-search-item-active"); - }).on("mouseout", ".luckysheet-formula-search-item", function() {}).on("click", ".luckysheet-formula-search-item", function() { - if (luckysheet.formula.searchFunctionCell == null) { - return; - } - luckysheet.formula.searchFunctionEnter($(this)); - }); - } - var itemHTML = '
${n}
${a}
'; - var retHTML = ""; - for (var i = 0; i < list.length; i++) { - var item = list[i]; - if (i == list.length - 1) { - retHTML += luckysheet.replaceHtml(itemHTML, { - "class": "luckysheet-formula-search-item-active", - "n": item.n, - "a": item.a - }); - } else { - retHTML += luckysheet.replaceHtml(itemHTML, { - "class": "", - "n": item.n, - "a": item.a - }); - } - } - return retHTML; - }, - functionlistPosition: {}, - helpFunction: function($editer, funcname, paramIndex) { - - var $func = luckysheet.functionlist[this.functionlistPosition[$.trim(funcname).toUpperCase()]]; - //console.log(); - if ($func == null) { - return; - } - $("#luckysheet-formula-help-c .luckysheet-arguments-help-function-name").html($func.n); - $("#luckysheet-formula-help-c .luckysheet-arguments-help-parameter-content").html($func.d); - var helpformula = '${name} ( ${param} )'; - //luckysheet-arguments-help-parameter-active - var helpformulaItem = '${param}'; - var helpformulaArg = '
${param}
${content}
'; - //"n": "AVERAGE", - //"t": "1", - //"d": "返回数据集的算术平均值,对文本忽略不计。", - //"a": "返回数据集的算术平均值", - //"p": [{ "name": "数值1", "example": "A2:A100", "detail": "计算平均值时用到的第一个数值或范围。", "require": "m", "repeat": "n", "type": "rangenumber" }, - // { "name": "数值2", "example": "B2:B100", "detail": "计算平均值时用到的其他数值或范围。", "require": "o", "repeat": "y", "type": "rangenumber" } - //] - var fht = "", - ahf = "", - fhcp = ""; - for (var i = 0; i < $func.p.length; i++) { - var paramitem = $func.p[i]; - var name = paramitem.name, - nameli = paramitem.name; - if (paramitem.repeat == "y") { - name += ", ..."; - nameli += '...-可重复'; - } - if (paramitem.require == "o") { - name = "[" + name + "]"; - nameli += '-[可选]'; - } - fht += '' + name + ', '; - ahf += '' + paramitem.example + ', '; - fhcp += luckysheet.replaceHtml(helpformulaArg, { - "param": nameli, - "content": paramitem.detail - }); - } - fht = fht.substr(0, fht.length - 2); - ahf = ahf.substr(0, ahf.length - 2); - $("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder").html(fht); //介绍 - $("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder").html(ahf); //示例 - $("#luckysheet-formula-help-c .luckysheet-formula-help-content-param").html(fhcp); //参数 - if(paramIndex==null){ - $("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight", "bold"); - } - else{ - $("#luckysheet-formula-help-c .luckysheet-formula-help-title-formula .luckysheet-arguments-help-function-name").css("font-weight", "normal"); - var index = paramIndex >= $func.p.length ? $func.p.length - 1 : paramIndex; - $("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"); - $("#luckysheet-formula-help-c .luckysheet-formula-help-title .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(index).addClass("luckysheet-arguments-help-parameter-active"); - $("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").removeClass("luckysheet-arguments-help-parameter-active"); - $("#luckysheet-formula-help-c .luckysheet-arguments-help-formula .luckysheet-arguments-parameter-holder .luckysheet-arguments-help-parameter").eq(index).addClass("luckysheet-arguments-help-parameter-active"); - $("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").removeClass("luckysheet-arguments-help-parameter-active"); - $("#luckysheet-formula-help-c .luckysheet-formula-help-content-param .luckysheet-arguments-help-section").eq(index).addClass("luckysheet-arguments-help-parameter-active"); - } - var $c = $editer.parent(), - offset = $c.offset(); - this.searchFunctionPosition($("#luckysheet-formula-help-c"), $c, offset.left, offset.top, true); - }, - helpFunctionExe: function($editer, currSelection) { - if ($("#luckysheet-formula-help-c").length == 0) { - $("body").after(this.helpHTML); - $("#luckysheet-formula-help-c .luckysheet-formula-help-close").click(function() { - $("#luckysheet-formula-help-c").hide(); - }); - $("#luckysheet-formula-help-c .luckysheet-formula-help-collapse").click(function() { - var $content = $("#luckysheet-formula-help-c .luckysheet-formula-help-content"); - $content.slideToggle(100, function() { - var $c = luckysheet.formula.rangeResizeTo.parent(), - offset = $c.offset(); - luckysheet.formula.searchFunctionPosition($("#luckysheet-formula-help-c"), $c, offset.left, offset.top, true); - }); - if ($content.is(":hidden")) { - $(this).html(''); - } else { - $(this).html(''); - } - }); - for (var i = 0; i < luckysheet.functionlist.length; i++) { - this.functionlistPosition[luckysheet.functionlist[i].n] = i; - } - } - - if(!currSelection){ - return; - } - - var $prev = currSelection, - funcLen = $editer.length, - $span = $editer.find("span"), - currentIndex = currSelection.index(),i = currentIndex; - if ($prev == null) { - return; - } - // while ($prev.text() != "(" && $prev.text() != "=" && $prev.length > 0) { - // // if (i > 0 && this.iscelldata($prev.text())) { - // // paramindex++; - // // } - // if (i > 0 && $prev.attr("rangeindex") != null) { - // paramindex++; - // } - // $prev = $prev.prev(); - // i++; - // } - - var funcName = null, paramindex= null; - if($span.eq(i).is(".luckysheet-formula-text-func")){ - funcName = $span.eq(i).text(); - } - else{ - var $cur = null, exceptIndex = [-1, -1]; - while (--i > 0) { - $cur = $span.eq(i); - if($cur.is(".luckysheet-formula-text-func") || $.trim($cur.text()).toUpperCase() in this.functionlistPosition){ - funcName = $cur.text(); - paramindex = null; - var endstate = true; - for(var a=i;a<=currentIndex;a++){ - if(!paramindex){ - paramindex = 0; - } - if(a>=exceptIndex[0] && a<=exceptIndex[1]){ - continue; - } - $cur = $span.eq(a); - if($cur.is(".luckysheet-formula-text-rpar")){ - exceptIndex = [i , a]; - funcName = null; - endstate = false; - break; - } - - if($cur.is(".luckysheet-formula-text-comma")){ - paramindex++; - } - } - - if(endstate){ - break; - } - } - } - } - - if(funcName==null){ - return; - } - - this.helpFunction($editer, funcName, paramindex); - }, - rangeHightlightselected: function($editer, kcode) { - var currSelection = this.getrangeseleciton(); - $("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(); - $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight .luckysheet-selection-copy-hc").css("opacity", "0.03"); - $("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(); - this.helpFunctionExe($editer, currSelection); - if ($(currSelection).closest(".luckysheet-formula-functionrange-cell").length == 0) { - this.searchFunction($editer); - return; - } - var $anchorOffset = $(currSelection).closest(".luckysheet-formula-functionrange-cell"); - //if (luckysheet.formula.israngeseleciton(true)) { - // var searchHTML = this.searchFunction($(currSelection)); - // $("#luckysheet-formula-search-c").html(searchHTML); - //} - var rangeindex = $anchorOffset.attr("rangeindex"); - var rangeid = "luckysheet-formula-functionrange-highlight-" + rangeindex; - $("#" + rangeid).find(".luckysheet-selection-copy-hc").css({ - "opacity": "0.13" - }); - }, - updatecell: function(r, c) { - var $input = $("#luckysheet-rich-text-editor"), - value = $input.text(); - - if (luckysheet.formula.rangetosheet != luckysheet.currentSheetIndex) { - luckysheet.sheetmanage.changeSheetExec(luckysheet.formula.rangetosheet); - } - - var curv = luckysheet.flowdata[r][c]; - - if(luckysheet.func_methods.isRealNull(value)){ - if(curv == null || luckysheet.func_methods.isRealNull(curv.v)){ - this.cancelNormalSelected(); - return; - } - } - else{ - if (luckysheet.getObjType(curv) == "object" && (value == curv.f || value == curv.v || value == curv.m)) { - this.cancelNormalSelected(); - return; - } - else if (value == curv) { - this.cancelNormalSelected(); - return; - } - } - - if (value.slice(0, 1) == "=" && value.length > 1) { - - } - else if(luckysheet.getObjType(curv) == "object" && curv.ct != null && curv.ct.fa != null && curv.ct.fa != "@" && !luckysheet.func_methods.isRealNull(value)){ - delete curv.m;//更新时间m处理 , 会实际删除单元格数据的参数(flowdata时已删除) - if(curv.f != null){ //如果原来是公式,而更新的数据不是公式,则把公式删除 - delete curv.f; - delete curv.spl; //删除单元格的sparklines的配置串 - } - } - - window.luckysheet_getcelldata_cache = null; - - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - - if (luckysheet.getObjType(curv) == "object") { - if(luckysheet.getObjType(value) == "string" && value.slice(0, 1) == "=" && value.length > 1){ - var v = this.execfunction(value, r, c, true); - - curv = this.execFunctionGroupData[r][c]; - curv.f = v[2]; - - //打进单元格的sparklines的配置串, 报错需要单独处理。 - if(v.length == 4 && v[3].type == "sparklines"){ - delete curv.m; - delete curv.v; - - var curCalv = v[3].data; - - if(luckysheet.getObjType(curCalv) == "array" && luckysheet.getObjType(curCalv[0]) != "object"){ - curv.v = curCalv[0]; - } - else{ - curv.spl = v[3].data; - } - } - } - else{ - this.delFunctionGroup(r, c); - this.execFunctionGroup(r, c, value); - - curv = this.execFunctionGroupData[r][c]; - - delete curv.f; - delete curv.spl; - } - - value = curv; - } - else { - if(luckysheet.getObjType(value) == "string" && value.slice(0, 1) == "=" && value.length > 1){ - var v = this.execfunction(value, r, c, true); - - value = { - "v": v[1], - "f": v[2] - }; - - //打进单元格的sparklines的配置串, 报错需要单独处理。 - if(v.length == 4 && v[3].type == "sparklines"){ - var curCalv = v[3].data; - - if(luckysheet.getObjType(curCalv) == "array" && luckysheet.getObjType(curCalv[0]) != "object"){ - value.v = curCalv[0]; - } - else{ - value.spl = v[3].data; - } - } - } - else{ - this.delFunctionGroup(r, c); - this.execFunctionGroup(r, c, value); - } - } - - luckysheet.setcellvalue(r, c, d, value); - this.cancelNormalSelected(); - - var RowlChange = false; - if(d[r][c].tb == "2" && d[r][c].v != null){//自动换行 - var cfg = $.extend(true, {}, luckysheet.getluckysheetfile()[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]["config"]); - if(cfg["rowlen"] == null){ - cfg["rowlen"] = {}; - } - - var defaultrowlen = 19; - - var offlinecanvas = $("#luckysheetTableContentF").get(0).getContext("2d"); - var fontset = luckysheet.luckysheetfontformat(d[r][c]); - offlinecanvas.font = fontset; - - var currentRowLen = defaultrowlen; - if(cfg["rowlen"][r] != null){ - currentRowLen = cfg["rowlen"][r]; - } - - var strValue = luckysheet.getcellvalue(r,c,d).toString(); - var tbWidth = offlinecanvas.measureText(strValue).width; - var cellWidth = luckysheet.colLocationByIndex(c)[1] - luckysheet.colLocationByIndex(c)[0] - 8; - - if(tbWidth > cellWidth){ - var strArr = [];//文本截断数组 - - for(var strI = 1; strI <= strValue.length; strI++){ - var strV = strValue.substring(strArr.join("").length,strI); - var strtextMetrics = offlinecanvas.measureText(strV).width; - if(strtextMetrics > cellWidth){ - strArr.push(strValue.substring(strArr.join("").length, strI - 1)); - strI = strI - 2; - } - else if(strtextMetrics <= cellWidth && strI == strValue.length){ - strArr.push(strV); - } - } - - var oneLineTextHeight = luckysheet.menuButton.getTextSize("田", fontset)[1]; - currentRowLen = oneLineTextHeight * strArr.length; - } - - if(currentRowLen != defaultrowlen){ - cfg["rowlen"][r] = currentRowLen; - RowlChange = true; - } - } - - if(RowlChange){ - luckysheet.jfrefreshgrid(d, [{"row": [r, r], "column": [c, c]}], cfg, null, RowlChange); - } - else{ - luckysheet.jfrefreshgrid(d, [{"row": [r, r], "column": [c, c]}]); - } - - luckysheetCellUpdate = []; - this.execFunctionGroupData = null; //销毁 - }, - cancelNormalSelected: function() { - this.canceFunctionrangeSelected(); - $("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove(); - $("#luckysheet-input-box").removeAttr("style"); - $("#luckysheet-input-box-index").hide(); - $("#luckysheet-wa-functionbox-cancel, #luckysheet-wa-functionbox-confirm").removeClass("luckysheet-wa-calculate-active"); - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - }, - canceFunctionrangeSelected: function() { - $("#luckysheet-formula-functionrange-select").hide(); - $("#luckysheet-row-count-show, #luckysheet-column-count-show").hide(); - // $("#luckysheet-cols-h-selected, #luckysheet-rows-h-selected").hide(); - $("#luckysheet-formula-search-c, #luckysheet-formula-help-c").hide(); - }, - iscellformat: function(txt) { - var re_abc = /[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][123456789]/; - }, - iscelldata: function(txt) { //判断是否为单元格格式 - var val = txt.split("!"), - rangetxt; - if (val.length > 1) { - rangetxt = val[1]; - } else { - rangetxt = val[0]; - } - - // var reg_cell = /^[a-zA-Z]+[0-9]+$/g; //增加正则判断单元格为字母+数字的格式:如 A1:B3 - var reg_cell = /^(([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+))$/g; //增加正则判断单元格为字母+数字的格式:如 A1:B3 - // var reg_cellRange = /^(([a-zA-Z]+[0-9]+)|([a-zA-Z]+))$/g;//增加正则判断单元格为字母+数字或字母的格式:如 A1:B3,A:A - var reg_cellRange = /^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+))))$/g;//增加正则判断单元格为字母+数字或字母的格式:如 A1:B3,A:A - if (rangetxt.indexOf(":") == -1) { - var row = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; - var col = luckysheet.luckysheetABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); - - if (!isNaN(row) && !isNaN(col) && rangetxt.toString().match(reg_cell)) { - return true; - } else if (!isNaN(row)) { - return false; - } else if (!isNaN(col)) { - return false; - } else { - return false; - } - } - else { - // reg_cellRange = /^(([a-zA-Z]+[0-9]+)|([a-zA-Z]+)|([0-9]+))$/g; - reg_cellRange = /^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+)))|((([0-9]+)|([$][0-9]+s))))$/g; - - rangetxt = rangetxt.split(":"); - var row = [],col = []; - //console.log(rangetxt[0].replace(/[^0-9]/, ""), rangetxt[1].replace(/[^0-9]/, ""), rangetxt); - row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; - row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; - if (row[0] > row[1]) { - return false; - } - col[0] = luckysheet.luckysheetABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); - col[1] = luckysheet.luckysheetABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); - if (col[0] > col[1]) { - return false; - } - if(rangetxt[0].toString().match(reg_cellRange) && rangetxt[1].toString().match(reg_cellRange)){ - return true; - }else{ - return false; - } - } - }, - operator: '==|!=|<>|<=|>=|=|+|-|>|<|/|*|%|&|^', - operatorjson: null, - functionCopy: function(txt, mode, step) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - - luckysheet.formula.operatorjson = op; - } - - if (mode == null) { - mode = "down"; - } - - if (step == null) { - step = 1; - } - - if (txt.substr(0, 1) == "=") { - txt = txt.substr(1); - } - - var funcstack = txt.split(""); - //var i=0;i 0) { - function_str += str + "("; - } - else { - function_str += "("; - } - - str = ""; - } - else if (s == ")" && matchConfig.dquote == 0) { - matchConfig.bracket -= 1; - //if (matchConfig.bracket == 0) { - function_str += luckysheet.formula.functionCopy(str, mode, step) + ")"; - str = ""; - //} - } - //else if (s == "'" && matchConfig.dquote == 0) { - // if (matchConfig.squote > 0) { - // function_str += str + "'"; - // matchConfig.squote -= 1; - // str = ""; - // } - // else { - // matchConfig.squote += 1; - // str += "'"; - // } - //} - else if (s == '"' && matchConfig.squote == 0) { - if (matchConfig.dquote > 0) { - function_str += str + '"'; - matchConfig.dquote -= 1; - str = ""; - } - else { - matchConfig.dquote += 1; - str += '"'; - } - } - else if (s == ',' && matchConfig.dquote == 0) { - //matchConfig.comma += 1; - function_str += luckysheet.formula.functionCopy(str, mode, step) + ','; - str = ""; - } - else if (s == '&' && matchConfig.dquote == 0) { - if (str.length > 0) { - function_str += luckysheet.formula.functionCopy(str, mode, step) + "&"; - str = ""; - } - else { - function_str += "&"; - } - } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0) { - var s_next = ""; - - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - - var p = i-1, s_pre = null;; - if(p>=0){ - do { - s_pre = funcstack[p--]; - } - while (p>=0 && s_pre ==" ") - } - - if ((s + s_next) in luckysheet.formula.operatorjson) { - if (str.length > 0) { - function_str += luckysheet.formula.functionCopy(str, mode, step) + s + s_next; - str = ""; - } - else { - function_str += s + s_next; - } - - i++; - } - else if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in luckysheet.formula.operatorjson ) ){ - str += s; - } - else { - if (str.length > 0) { - function_str += luckysheet.formula.functionCopy(str, mode, step) + s; - str = ""; - } - else { - function_str += s; - } - } - } - else { - str += s; - } - - if (i == funcstack.length - 1) { - //function_str += str; - if (luckysheet.formula.iscelldata($.trim(str))) { - if (mode == "down") { - function_str += luckysheet.formula.downparam($.trim(str), step); - } - else if (mode == "up") { - function_str += luckysheet.formula.upparam($.trim(str), step); - } - else if (mode == "left") { - function_str += luckysheet.formula.leftparam($.trim(str), step); - } - else if (mode == "right") { - function_str += luckysheet.formula.rightparam($.trim(str), step); - } - } - else { - function_str += $.trim(str); - } - } - - i++; - } - - return function_str; - }, - isfreezonFuc: function(txt) { - var row = txt.replace(/[^0-9]/g, ""); - var col = txt.replace(/[^A-Za-z]/g, ""); - var row$ = txt.substr(txt.indexOf(row) - 1, 1); - var col$ = txt.substr(txt.indexOf(col) - 1, 1); - var ret = [false, false]; - if (row$ == "$") { - ret[0] = true; - } - if (col$ == "$") { - ret[1] = true; - } - return ret; - }, - setfreezonFuceExe: function(rangetxt) { - var row = parseInt(rangetxt.replace(/[^0-9]/g, "")); - var col = luckysheet.luckysheetABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); - var freezonFuc = this.isfreezonFuc(rangetxt); - var $row = "$", - $col = "$"; - if (!isNaN(row) && !isNaN(col)) { - return $col + luckysheet.luckysheetchatatABC(col) + $row + (row); - } else if (!isNaN(row)) { - return $row + (row); - } else if (!isNaN(col)) { - return $col + luckysheet.luckysheetchatatABC(col); - } else { - return txt; - } - }, - setfreezonFuc: function(event) { - var obj = this.getrangeseleciton(); - if (!this.iscelldata(obj.text())) { - return; - } - var txt = obj.text(), - pos = window.getSelection().anchorOffset; - var val = txt.split("!"), - rangetxt, prefix = ""; - if (val.length > 1) { - rangetxt = val[1]; - prefix = val[0] + "!"; - } else { - rangetxt = val[0]; - } - var newtxt = "", - newpos = ""; - var rangetxtIndex = rangetxt.indexOf(":"); - if (rangetxtIndex == -1) { - //return [this.setfreezonFuceExe(rangetxt), rangetxt.length]; - newtxt = prefix + this.setfreezonFuceExe(rangetxt); - newpos = newtxt.length; - } else { - rangetxt = rangetxt.split(":"); - if (pos > rangetxtIndex) { - var ret = prefix + rangetxt[0] + ":" + this.setfreezonFuceExe(rangetxt[1]); - //return [ret, ret.length]; - newtxt = ret; - newpos = ret.length; - } else { - var firsttxt = prefix + this.setfreezonFuceExe(rangetxt[0]); - var ret = firsttxt + ":" + rangetxt[1]; - //return [ret, firsttxt.length]; - newtxt = ret; - newpos = firsttxt.length; - } - } - obj.text(prefix + newtxt); - this.setCaretPosition(obj.get(0), 0, newpos); - }, - updateparam: function(orient, txt, step) { - var val = txt.split("!"), - rangetxt, prefix = ""; - - if (val.length > 1) { - rangetxt = val[1]; - prefix = val[0] + "!"; - } - else { - rangetxt = val[0]; - } - - if (rangetxt.indexOf(":") == -1) { - var row = parseInt(rangetxt.replace(/[^0-9]/g, "")); - var col = luckysheet.luckysheetABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); - var freezonFuc = this.isfreezonFuc(rangetxt); - var $row = freezonFuc[0] ? "$" : "", - $col = freezonFuc[1] ? "$" : ""; - - if (orient == "u" && !freezonFuc[0]) { - row -= step; - } - else if (orient == "r" && !freezonFuc[1]) { - col += step; - } - else if (orient == "l" && !freezonFuc[1]) { - col -= step; - } - else if (!freezonFuc[0]) { - row += step; - } - - console.log(prefix + $col + luckysheet.luckysheetchatatABC(col) + $row + (row)); - - if(row[0] < 0 || col[0] < 0){ - return luckysheet.formula.error.r; - } - - if (!isNaN(row) && !isNaN(col)) { - return prefix + $col + luckysheet.luckysheetchatatABC(col) + $row + (row); - } - else if (!isNaN(row)) { - return prefix + $row + (row); - } - else if (!isNaN(col)) { - return prefix + $col + luckysheet.luckysheetchatatABC(col); - } - else { - return txt; - } - } - else { - rangetxt = rangetxt.split(":"); - var row = [],col = []; - //console.log(rangetxt[0].replace(/[^0-9]/, ""), rangetxt[1].replace(/[^0-9]/, ""), rangetxt); - row[0] = parseInt(rangetxt[0].replace(/[^0-9]/g, "")); - row[1] = parseInt(rangetxt[1].replace(/[^0-9]/g, "")); - var freezonFuc0 = this.isfreezonFuc(rangetxt[0]); - if (row[0] > row[1]) { - return txt; - } - var freezonFuc1 = this.isfreezonFuc(rangetxt[1]); - col[0] = luckysheet.luckysheetABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); - col[1] = luckysheet.luckysheetABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); - if (col[0] > col[1]) { - return txt; - } - var $row0 = freezonFuc0[0] ? "$" : "", - $col0 = freezonFuc0[1] ? "$" : ""; - var $row1 = freezonFuc1[0] ? "$" : "", - $col1 = freezonFuc1[1] ? "$" : ""; - - if (orient == "u") { - if (!freezonFuc0[0]) { - row[0] -= step; - } - - if (!freezonFuc1[0]) { - row[1] -= step; - } - } - else if (orient == "r") { - if (!freezonFuc0[1]) { - col[0] += step; - } - - if (!freezonFuc1[1]) { - col[1] += step; - } - } - else if (orient == "l") { - //col[0] -= step; - //col[1] -= step; - if (!freezonFuc0[1]) { - col[0] -= step; - } - - if (!freezonFuc1[1]) { - col[1] -= step; - } - } - else { - //row[0] += step; - //row[1] += step; - if (!freezonFuc0[0]) { - row[0] += step; - } - - if (!freezonFuc1[0]) { - row[1] += step; - } - } - - if(row[0] < 0 || col[0] < 0){ - return luckysheet.formula.error.r; - } - - if (isNaN(col[0]) && isNaN(col[1])) { - return prefix + $row0 + (row[0]) + ":" + $row1 + (row[1]); - } - else if (isNaN(row[0]) && isNaN(row[1])) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(col[0]) + ":" + $col1 + luckysheet.luckysheetchatatABC(col[1]); - } - else { - return prefix + $col0 + luckysheet.luckysheetchatatABC(col[0]) + $row0 + (row[0]) + ":" + $col1 + luckysheet.luckysheetchatatABC(col[1]) + $row1 + (row[1]); - } - } - }, - downparam: function(txt, step) { - return this.updateparam("d", txt, step); - }, - upparam: function(txt, step) { - return this.updateparam("u", txt, step); - }, - leftparam: function(txt, step) { - return this.updateparam("l", txt, step); - }, - rightparam: function(txt, step) { - return this.updateparam("r", txt, step); - }, - functionStrChange: function(txt, type, rc, orient, stindex, step) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - - luckysheet.formula.operatorjson = op; - } - - if (txt.substr(0, 1) == "=") { - txt = txt.substr(1); - } - - var funcstack = txt.split(""); - var i = 0, - str = "", - function_str = "", - ispassby = true; - - var matchConfig = { - "bracket": 0, //括号 - "comma": 0, //逗号 - "squote": 0, //单引号 - "dquote": 0 //双引号 - }; - - while (i < funcstack.length) { - var s = funcstack[i]; - - if (s == "(" && matchConfig.dquote == 0) { - matchConfig.bracket += 1; - - if (str.length > 0) { - function_str += str + "("; - } - else { - function_str += "("; - } - - str = ""; - } - else if (s == ")" && matchConfig.dquote == 0) { - matchConfig.bracket -= 1; - //if (matchConfig.bracket == 0) { - function_str += luckysheet.formula.functionStrChange(str, type, rc, orient, stindex, step) + ")"; - str = ""; - //} - } - //else if (s == "'" && matchConfig.dquote == 0) { - // if (matchConfig.squote > 0) { - // function_str += str + "'"; - // matchConfig.squote -= 1; - // str = ""; - // } - // else { - // matchConfig.squote += 1; - // str += "'"; - // } - //} - else if (s == '"' && matchConfig.squote == 0) { - if (matchConfig.dquote > 0) { - function_str += str + '"'; - matchConfig.dquote -= 1; - str = ""; - } - else { - matchConfig.dquote += 1; - str += '"'; - } - } - else if (s == ',' && matchConfig.dquote == 0) { - function_str += luckysheet.formula.functionStrChange(str, type, rc, orient, stindex, step) + ','; - str = ""; - } - else if (s == '&' && matchConfig.dquote == 0) { - if (str.length > 0) { - function_str += luckysheet.formula.functionStrChange(str, type, rc, orient, stindex, step) + "&"; - str = ""; - } - else { - function_str += "&"; - } - } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0) { - var s_next = ""; - - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - - var p = i-1, s_pre = null;; - if(p>=0){ - do { - s_pre = funcstack[p--]; - } - while (p>=0 && s_pre ==" ") - } - - if ((s + s_next) in luckysheet.formula.operatorjson) { - if (str.length > 0) { - function_str += luckysheet.formula.functionStrChange(str, type, rc, orient, stindex, step) + s + s_next; - str = ""; - } - else { - function_str += s + s_next; - } - - i++; - } - else if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in luckysheet.formula.operatorjson ) ){ - str += s; - } - else { - if (str.length > 0) { - function_str += luckysheet.formula.functionStrChange(str, type, rc, orient, stindex, step) + s; - str = ""; - } - else { - function_str += s; - } - } - } - else { - str += s; - } - - if (i == funcstack.length - 1) { - if (luckysheet.formula.iscelldata($.trim(str))) { - function_str += luckysheet.formula.functionStrChange_range($.trim(str), type, rc, orient, stindex, step); - } - else { - function_str += $.trim(str); - } - } - - i++; - } - - return function_str; - }, - functionStrChange_range: function(txt, type, rc, orient, stindex, step){ - var val = txt.split("!"), - rangetxt, prefix = ""; - - if (val.length > 1) { - rangetxt = val[1]; - prefix = val[0] + "!"; - } - else { - rangetxt = val[0]; - } - - var r1, r2, c1, c2; - var $row0, $row1, $col0, $col1; - if (rangetxt.indexOf(":") == -1) { - r1 = r2 = parseInt(rangetxt.replace(/[^0-9]/g, "")) - 1; - c1 = c2 = luckysheet.luckysheetABCatNum(rangetxt.replace(/[^A-Za-z]/g, "")); - - var freezonFuc = this.isfreezonFuc(rangetxt); - - $row0 = $row1 = freezonFuc[0] ? "$" : "", - $col0 = $col1 = freezonFuc[1] ? "$" : ""; - } - else { - rangetxt = rangetxt.split(":"); - - r1 = parseInt(rangetxt[0].replace(/[^0-9]/g, "")) - 1; - r2 = parseInt(rangetxt[1].replace(/[^0-9]/g, "")) - 1; - if (r1 > r2) { - return txt; - } - - c1 = luckysheet.luckysheetABCatNum(rangetxt[0].replace(/[^A-Za-z]/g, "")); - c2 = luckysheet.luckysheetABCatNum(rangetxt[1].replace(/[^A-Za-z]/g, "")); - if (c1 > c2) { - return txt; - } - - var freezonFuc0 = this.isfreezonFuc(rangetxt[0]); - $row0 = freezonFuc0[0] ? "$" : ""; - $col0 = freezonFuc0[1] ? "$" : ""; - - var freezonFuc1 = this.isfreezonFuc(rangetxt[1]); - $row1 = freezonFuc1[0] ? "$" : ""; - $col1 = freezonFuc1[1] ? "$" : ""; - } - - if(type == "del"){ - if(rc == "row"){ - if(r1 >= stindex && r2 <= stindex + step - 1){ - return luckysheet.formula.error.r; - } - - if(r1 > stindex + step - 1){ - r1 -= step; - } - else if(r1 >= stindex){ - r1 = stindex; - } - - if(r2 > stindex + step - 1){ - r2 -= step; - } - else if(r2 >= stindex){ - r2 = stindex - 1; - } - - if(r1 < 0){ - r1 = 0; - } - - if(r2 < r1){ - r2 = r1; - } - } - else if(rc == "col"){ - if(c1 >= stindex && c2 <= stindex + step - 1){ - return luckysheet.formula.error.r; - } - - if(c1 > stindex + step - 1){ - c1 -= step; - } - else if(c1 >= stindex){ - c1 = stindex; - } - - if(c2 > stindex + step - 1){ - c2 -= step; - } - else if(c2 >= stindex){ - c2 = stindex - 1; - } - - if(c1 < 0){ - c1 = 0; - } - - if(c2 < c1){ - c2 = c1; - } - } - - if(r1 == r2 && c1 == c2){ - if (!isNaN(r1) && !isNaN(c1)) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1) + $row0 + (r1 + 1); - } - else if (!isNaN(r1)) { - return prefix + $row0 + (r1 + 1); - } - else if (!isNaN(c1)) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1); - } - else { - return txt; - } - } - else{ - if (isNaN(c1) && isNaN(c2)) { - return prefix + $row0 + (r1 + 1) + ":" + $row1 + (r2 + 1); - } - else if (isNaN(r1) && isNaN(r2)) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1) + ":" + $col1 + luckysheet.luckysheetchatatABC(c2); - } - else { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1) + $row0 + (r1 + 1) + ":" + $col1 + luckysheet.luckysheetchatatABC(c2) + $row1 + (r2 + 1); - } - } - } - else if(type == "add"){ - if(rc == "row"){ - if(orient == "lefttop"){ - if(r1 >= stindex){ - r1 += step; - } - - if(r2 >= stindex){ - r2 += step; - } - } - else if(orient == "rightbottom"){ - if(r1 > stindex){ - r1 += step; - } - - if(r2 > stindex){ - r2 += step; - } - } - } - else if(rc == "col"){ - if(orient == "lefttop"){ - if(c1 >= stindex){ - c1 += step; - } - - if(c2 >= stindex){ - c2 += step; - } - } - else if(orient == "rightbottom"){ - if(c1 > stindex){ - c1 += step; - } - - if(c2 > stindex){ - c2 += step; - } - } - } - - if(r1 == r2 && c1 == c2){ - if (!isNaN(r1) && !isNaN(c1)) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1) + $row0 + (r1 + 1); - } - else if (!isNaN(r1)) { - return prefix + $row0 + (r1 + 1); - } - else if (!isNaN(c1)) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1); - } - else { - return txt; - } - } - else{ - if (isNaN(c1) && isNaN(c2)) { - return prefix + $row0 + (r1 + 1) + ":" + $row1 + (r2 + 1); - } - else if (isNaN(r1) && isNaN(r2)) { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1) + ":" + $col1 + luckysheet.luckysheetchatatABC(c2); - } - else { - return prefix + $col0 + luckysheet.luckysheetchatatABC(c1) + $row0 + (r1 + 1) + ":" + $col1 + luckysheet.luckysheetchatatABC(c2) + $row1 + (r2 + 1); - } - } - } - }, - israngeseleciton: function(istooltip) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - - luckysheet.formula.operatorjson = op; - } - - if (istooltip == null) { - istooltip = false; - } - - var currSelection = window.getSelection(); - var anchor = $(currSelection.anchorNode); - var anchorOffset = currSelection.anchorOffset; - - if (anchor.parent().is("span") && anchorOffset != 0) { - var txt = $.trim(anchor.text()), - lasttxt = ""; - - if (txt.length == 0 && anchor.parent().prev().length > 0) { - var ahr = anchor.parent().prev(); - txt = $.trim(ahr.text()); - lasttxt = txt.substr(txt.length - 1, 1); - this.rangeSetValueTo = ahr; - } - else { - lasttxt = txt.substr(anchorOffset - 1, 1); - this.rangeSetValueTo = anchor.parent(); - } - - if ((istooltip && (lasttxt == "(" || lasttxt == ",")) || (!istooltip && (lasttxt == "(" || lasttxt == "," || lasttxt == "=" || lasttxt in luckysheet.formula.operatorjson || lasttxt == "&"))) { - return true; - } - } - else if (anchor.is("#luckysheet-rich-text-editor") || anchor.is("#luckysheet-functionbox-cell")) { - var txt = $.trim(anchor.find("span").last().text()), - lasttxt; - - this.rangeSetValueTo = anchor.find("span").last(); - - if (txt.length == 0 && anchor.find("span").length > 1) { - var ahr = anchor.find("span"); - txt = $.trim(ahr.eq(ahr.length - 2).text()); - this.rangeSetValueTo = ahr; - } - - lasttxt = txt.substr(txt.length - 1, 1); - - if ((istooltip && (lasttxt == "(" || lasttxt == ",")) || (!istooltip && (lasttxt == "(" || lasttxt == "," || lasttxt == "=" || lasttxt in luckysheet.formula.operatorjson || lasttxt == "&"))) { - return true; - } - } - else if (anchor.parent().is("#luckysheet-rich-text-editor") || anchor.parent().is("#luckysheet-functionbox-cell") || anchorOffset == 0) { - if (anchorOffset == 0) { - anchor = anchor.parent(); - } - - if (anchor.prev().length > 0) { - var txt = $.trim(anchor.prev().text()); - var lasttxt = txt.substr(txt.length - 1, 1); - - this.rangeSetValueTo = anchor.prev(); - - if ((istooltip && (lasttxt == "(" || lasttxt == ",")) || (!istooltip && (lasttxt == "(" || lasttxt == "," || lasttxt == "=" || lasttxt in luckysheet.formula.operatorjson || lasttxt == "&"))) { - return true; - } - } - } - - return false; - }, - rangechangeindex: null, - rangestart: false, - rangetosheet: null, - rangeSetValueTo: null, - func_selectedrange: {}, //函数选区范围 - rangeSetValue: function(selected, obj) { - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, selected, this.rangetosheet); - var $editor; - - if (luckysheet.formula.rangestart || luckysheet.formula.rangedrag_column_start || luckysheet.formula.rangedrag_row_start) { - if($("#luckysheet-search-formula-parm").is(":visible")||$("#luckysheet-search-formula-parm-select").is(":visible")){ - //公式参数框选取范围 - $editor=$("#luckysheet-rich-text-editor"); - $("#luckysheet-search-formula-parm-select-input").val(range); - $("#luckysheet-search-formula-parm .parmBox").eq(luckysheet.formula.data_parm_index).find(".txt input").val(range); - //参数对应值显示 - var txtdata=window.luckysheet_getcelldata(range).data; - if(txtdata instanceof Array){ - //参数为多个单元格选区 - var txtArr=[]; - for(var i=0;i' + range + ''; - var $t = $(function_str).insertAfter(this.rangeSetValueTo); - this.rangechangeindex = this.functionHTMLIndex; - $editor = $(this.rangeSetValueTo).closest("div"); - - luckysheet.formula.setCaretPosition($editor.find("span[rangeindex='" + luckysheet.formula.rangechangeindex + "']").get(0), 0, range.length); - - this.functionHTMLIndex++; - } - - if ($editor.attr("id") == "luckysheet-rich-text-editor") { - $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); - } else { - $("#luckysheet-rich-text-editor").html($("#luckysheet-functionbox-cell").html()); - } - }, - rangedrag: function(event) { - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - // var x = mouse[0] + $("#luckysheet-scrollbar-x").scrollLeft(); - // var y = mouse[1] + $("#luckysheet-scrollbar-y").scrollTop(); - - // console.log($("#luckysheet-cell-main").scrollTop(), $("#luckysheet-scrollbar-y").scrollTop()); - - var rowLocation = luckysheet.rowLocation(y), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - - var colLocation = luckysheet.colLocation(x), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - - var top = 0, - height = 0, - rowseleted = []; - - if (this.func_selectedrange.top > row_pre) { - top = row_pre; - height = this.func_selectedrange.top + this.func_selectedrange.height - row_pre; - rowseleted = [row_index, this.func_selectedrange.row[1]]; - } - else if (this.func_selectedrange.top == row_pre) { - top = row_pre; - height = this.func_selectedrange.top + this.func_selectedrange.height - row_pre; - rowseleted = [row_index, this.func_selectedrange.row[0]]; - } - else { - top = this.func_selectedrange.top; - height = row - this.func_selectedrange.top - 1; - rowseleted = [this.func_selectedrange.row[0], row_index]; - } - - var left = 0, - width = 0, - columnseleted = []; - - if (this.func_selectedrange.left > col_pre) { - left = col_pre; - width = this.func_selectedrange.left + this.func_selectedrange.width - col_pre; - columnseleted = [col_index, this.func_selectedrange.column[1]]; - } - else if (this.func_selectedrange.left == col_pre) { - left = col_pre; - width = this.func_selectedrange.left + this.func_selectedrange.width - col_pre; - columnseleted = [col_index, this.func_selectedrange.column[0]]; - } - else { - left = this.func_selectedrange.left; - width = col - this.func_selectedrange.left - 1; - columnseleted = [this.func_selectedrange.column[0], col_index]; - } - - rowseleted[0] = luckysheet.freezen.changeFreezenIndex(rowseleted[0], "h"); - rowseleted[1] = luckysheet.freezen.changeFreezenIndex(rowseleted[1], "h"); - columnseleted[0] = luckysheet.freezen.changeFreezenIndex(columnseleted[0], "v"); - columnseleted[1] = luckysheet.freezen.changeFreezenIndex(columnseleted[1], "v"); - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, rowseleted, this.func_selectedrange, top , height, left , width); - if(changeparam != null){ - columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - this.func_selectedrange["row"] = rowseleted; - this.func_selectedrange["column"] = columnseleted; - - this.func_selectedrange["left_move"] = left; - this.func_selectedrange["width_move"] = width; - this.func_selectedrange["top_move"] = top; - this.func_selectedrange["height_move"] = height; - - luckysheet.luckysheet_count_show(left, top, width, height, rowseleted, columnseleted); - - $("#luckysheet-formula-functionrange-select").css({ - "left": left, - "width": width, - "top": top, - "height": height - }).show(); - - if($("#luckysheet-ifFormulaGenerator-multiRange-dialog").is(":visible")){ - //if公式生成器 选择范围 - var range = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, { "row": rowseleted, "column": columnseleted }, luckysheet.currentSheetIndex); - $("#luckysheet-ifFormulaGenerator-multiRange-dialog input").val(range); - } - else{ - this.rangeSetValue({ - "row": rowseleted, - "column": columnseleted - }); - } - - setTimeout(function() { - luckysheetautoadjustmousedown = 1; - }, 1); - - luckysheet.freezen.scrollFreezen(rowseleted, columnseleted); - }, - rangedrag_column_start: false, - rangedrag_row_start: false, - rangedrag_column: function(event) { - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - // var x = mouse[0] + $("#luckysheet-scrollbar-x").scrollLeft(); - // var y = mouse[1] + $("#luckysheet-scrollbar-y").scrollTop(); - - var visibledatarow = luckysheet.getvisibledatarow(); - //var rowLocation = luckysheet.rowLocation(y), row = rowLocation[1], row_pre = rowLocation[0], row_index = rowLocation[2]; - var row_index = visibledatarow.length - 1, - row = visibledatarow[row_index], - row_pre = 0; - - var colLocation = luckysheet.colLocation(x), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - - var left = 0, - width = 0, - columnseleted = []; - - if (this.func_selectedrange.left > col_pre) { - left = col_pre; - width = this.func_selectedrange.left + this.func_selectedrange.width - col_pre; - columnseleted = [col_index, this.func_selectedrange.column[1]]; - } - else if (this.func_selectedrange.left == col_pre) { - left = col_pre; - width = this.func_selectedrange.left + this.func_selectedrange.width - col_pre; - columnseleted = [col_index, this.func_selectedrange.column[0]]; - } - else { - left = this.func_selectedrange.left; - width = col - this.func_selectedrange.left - 1; - columnseleted = [this.func_selectedrange.column[0], col_index]; - } - - //rowseleted[0] = luckysheet.freezen.changeFreezenIndex(rowseleted[0], "h"); - //rowseleted[1] = luckysheet.freezen.changeFreezenIndex(rowseleted[1], "h"); - columnseleted[0] = luckysheet.freezen.changeFreezenIndex(columnseleted[0], "v"); - columnseleted[1] = luckysheet.freezen.changeFreezenIndex(columnseleted[1], "v"); - - var changeparam = luckysheet.menuButton.mergeMoveMain(columnseleted, [0, row_index], this.func_selectedrange, row_pre , row - row_pre - 1, left , width); - if(changeparam != null){ - columnseleted = changeparam[0]; - // rowseleted= changeparam[1]; - // top = changeparam[2]; - // height = changeparam[3]; - left = changeparam[4]; - width = changeparam[5]; - } - - this.func_selectedrange["column"] = columnseleted; - - this.func_selectedrange["left_move"] = left; - this.func_selectedrange["width_move"] = width; - - luckysheet.luckysheet_count_show(left, row_pre, width, row - row_pre - 1, [0, row_index], columnseleted); - - this.rangeSetValue({ - "row": [null, null], - "column": columnseleted - }); - - $("#luckysheet-formula-functionrange-select").css({ - "left": left, - "width": width, - "top": row_pre, - "height": row - row_pre - 1 - }).show(); - - setTimeout(function() { - luckysheetautoadjustmousedown = 1; - }, 1); - luckysheet.freezen.scrollFreezen([0, row_index], columnseleted); - }, - rangedrag_row: function(event) { - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - - var x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); - var y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); - // var x = mouse[0] + $("#luckysheet-scrollbar-x").scrollLeft(); - // var y = mouse[1] + $("#luckysheet-scrollbar-y").scrollTop(); - - var rowLocation = luckysheet.rowLocation(y), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - - var visibledatacolumn = luckysheet.getvisibledatacolumn(); - //var colLocation = luckysheet.colLocation(x), col = colLocation[1], col_pre = colLocation[0], col_index = colLocation[2]; - var col_index = visibledatacolumn.length - 1, - col = visibledatacolumn[col_index], - col_pre = 0; - - var top = 0, - height = 0, - rowseleted = []; - - if (this.func_selectedrange.top > row_pre) { - top = row_pre; - height = this.func_selectedrange.top + this.func_selectedrange.height - row_pre; - rowseleted = [row_index, this.func_selectedrange.row[1]]; - } - else if (this.func_selectedrange.top == row_pre) { - top = row_pre; - height = this.func_selectedrange.top + this.func_selectedrange.height - row_pre; - rowseleted = [row_index, this.func_selectedrange.row[0]]; - } - else { - top = this.func_selectedrange.top; - height = row - this.func_selectedrange.top - 1; - rowseleted = [this.func_selectedrange.row[0], row_index]; - } - - rowseleted[0] = luckysheet.freezen.changeFreezenIndex(rowseleted[0], "h"); - rowseleted[1] = luckysheet.freezen.changeFreezenIndex(rowseleted[1], "h"); - // columnseleted[0] = luckysheet.freezen.changeFreezenIndex(columnseleted[0], "v"); - // columnseleted[1] = luckysheet.freezen.changeFreezenIndex(columnseleted[1], "v"); - - var changeparam = luckysheet.menuButton.mergeMoveMain([0, col_index], rowseleted, this.func_selectedrange, top, height, col_pre, col - col_pre - 1); - if(changeparam != null){ - // columnseleted = changeparam[0]; - rowseleted= changeparam[1]; - top = changeparam[2]; - height = changeparam[3]; - // left = changeparam[4]; - // width = changeparam[5]; - } - - this.func_selectedrange["row"] = rowseleted; - - this.func_selectedrange["top_move"] = top; - this.func_selectedrange["height_move"] = height; - - luckysheet.luckysheet_count_show(col_pre, top, col - col_pre - 1, height, rowseleted, [0, col_index]); - - this.rangeSetValue({ - "row": rowseleted, - "column": [null, null] - }); - - $("#luckysheet-formula-functionrange-select").css({ - "left": col_pre, - "width": col - col_pre - 1, - "top": top, - "height": height - }).show(); - - setTimeout(function() { - luckysheetautoadjustmousedown = 1; - }, 1); - - luckysheet.freezen.scrollFreezen(rowseleted, [0, col_index]); - }, - rangedragged: function() {}, - rangeResizeObj: null, - rangeResize: null, - rangeResizeIndex: null, - rangeResizexy: null, - rangeResizeWinH: null, - rangeResizeWinW: null, - rangeResizeTo: null, - rangeResizeDraging: function(event, luckysheetCurrentChartResizeObj, luckysheetCurrentChartResizeXy, luckysheetCurrentChartResize, luckysheetCurrentChartResizeWinW, luckysheetCurrentChartResizeWinH, ch_width, rh_height) { - var scrollTop = $("#luckysheet-scrollbar-y").scrollTop(), - scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(); - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - var rowLocation = luckysheet.rowLocation(y), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - if (x < 0 || y < 0) { - return false; - } - var myh = luckysheetCurrentChartResizeObj.height(), - myw = luckysheetCurrentChartResizeObj.width(); - var topchange = row_pre - luckysheetCurrentChartResizeXy[1], - leftchange = col_pre - luckysheetCurrentChartResizeXy[0]; - var top = luckysheetCurrentChartResizeXy[5], - height = luckysheetCurrentChartResizeXy[3], - left = luckysheetCurrentChartResizeXy[4], - width = luckysheetCurrentChartResizeXy[2]; - if (luckysheetCurrentChartResize == "lt" || luckysheetCurrentChartResize == "lb") { - if (luckysheetCurrentChartResizeXy[0] + luckysheetCurrentChartResizeXy[2] < col_pre) { - return; - } - left = col_pre; - width = luckysheetCurrentChartResizeXy[2] - leftchange; - if (left > luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[4] - col + col_pre) { - left = luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[4] - col + col_pre; - width = luckysheetCurrentChartResizeXy[2] - (luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[4] - col + col_pre - luckysheetCurrentChartResizeXy[0]); - } else if (left <= 0) { - left = 0; - width = luckysheetCurrentChartResizeXy[2] + luckysheetCurrentChartResizeXy[0]; - } - } - if (luckysheetCurrentChartResize == "rt" || luckysheetCurrentChartResize == "rb") { - if (luckysheetCurrentChartResizeXy[6] - luckysheetCurrentChartResizeXy[2] > col) { - return; - } - width = luckysheetCurrentChartResizeXy[2] + col - luckysheetCurrentChartResizeXy[6]; - if (width < col - col_pre - 1) { - width = col - col_pre - 1; - } else if (width >= ch_width - left) { - width = ch_width - left; - } - } - if (luckysheetCurrentChartResize == "lt" || luckysheetCurrentChartResize == "rt") { - if (luckysheetCurrentChartResizeXy[1] + luckysheetCurrentChartResizeXy[3] < row_pre) { - return; - } - top = row_pre; - height = luckysheetCurrentChartResizeXy[3] - topchange; - if (top > luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[5] - row + row_pre) { - top = luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[5] - row + row_pre; - height = luckysheetCurrentChartResizeXy[3] - (luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[5] - row + row_pre - luckysheetCurrentChartResizeXy[1]); - } else if (top <= 0) { - top = 0; - height = luckysheetCurrentChartResizeXy[3] + luckysheetCurrentChartResizeXy[1]; - } - } - if (luckysheetCurrentChartResize == "lb" || luckysheetCurrentChartResize == "rb") { - if (luckysheetCurrentChartResizeXy[7] - luckysheetCurrentChartResizeXy[3] > row) { - return; - } - height = luckysheetCurrentChartResizeXy[3] + row - luckysheetCurrentChartResizeXy[7]; - if (height < row - row_pre - 1) { - height = row - row_pre - 1; - } else if (height >= rh_height - top) { - height = rh_height - top; - } - } - var rangeindex = luckysheet.formula.rangeResizeIndex; - var selected = { - "top": top, - "left": left, - "height": height, - "width": width - }; - var range = this.getSelectedFromRange(selected); - var rangetxt = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, range, this.rangetosheet); - var $span = luckysheet.formula.rangeResizeTo.find("span[rangeindex='" + rangeindex + "']").html(rangetxt); - luckysheet.luckysheetRangeLast(luckysheet.formula.rangeResizeTo[0]); - luckysheetCurrentChartResizeObj.css(selected).data("range", range); - }, - getSelectedFromRange: function(obj) { - var row_st = obj.top + 2, - row_ed = obj.top + obj.height - 2; - var col_st = obj.left + 2, - col_ed = obj.left + obj.width - 2; - var ret = { - "row": [], - "column": [] - }; - var rowLocation = luckysheet.rowLocation(row_st), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(col_st), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - ret.row[0] = row_index; - ret.column[0] = col_index; - var rowLocation = luckysheet.rowLocation(row_ed),row = rowLocation[1],row_pre = rowLocation[0],row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(col_ed),col = colLocation[1],col_pre = colLocation[0], col_index = colLocation[2]; - ret.row[1] = row_index; - ret.column[1] = col_index; - return ret; - }, - rangeResizeDragged: function(event, luckysheetCurrentChartResizeObj, luckysheetCurrentChartResizeXy, luckysheetCurrentChartResize, luckysheetCurrentChartResizeWinW, luckysheetCurrentChartResizeWinH) { - luckysheet.formula.rangeResize = null; - $("#luckysheet-formula-functionrange-highlight-" + luckysheet.formula.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.03); - }, - rangeMovexy: null, - rangeMove: false, - rangeMoveObj: null, - rangeMoveIndex: null, - rangeMoveRangedata: null, - rangeMoveDraging: function(event, luckysheet_cell_selected_move_index, luckysheet_select_save, obj, sheetBarHeight, statisticBarHeight) { - var mouse = luckysheet.mouseposition(event.pageX, event.pageY); - var scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(); - var scrollTop = $("#luckysheet-scrollbar-y").scrollTop(); - var x = mouse[0] + scrollLeft; - var y = mouse[1] + scrollTop; - var winH = $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, - winW = $(window).width() + scrollLeft; - var rowLocation = luckysheet.rowLocation(y), - row = rowLocation[1], - row_pre = rowLocation[0], - row_index = rowLocation[2]; - var colLocation = luckysheet.colLocation(x), - col = colLocation[1], - col_pre = colLocation[0], - col_index = colLocation[2]; - var row_index_original = luckysheet_cell_selected_move_index[0], - col_index_original = luckysheet_cell_selected_move_index[1]; - var row_s = luckysheet_select_save["row"][0] - row_index_original + row_index, - row_e = luckysheet_select_save["row"][1] - row_index_original + row_index; - var col_s = luckysheet_select_save["column"][0] - col_index_original + col_index, - col_e = luckysheet_select_save["column"][1] - col_index_original + col_index; - //console.log(row_index_original, row_index,col_index_original,col_index); - if (row_s < 0 || y < 0) { - row_s = 0; - row_e = luckysheet_select_save["row"][1] - luckysheet_select_save["row"][0]; - } - if (col_s < 0 || x < 0) { - col_s = 0; - col_e = luckysheet_select_save["column"][1] - luckysheet_select_save["column"][0]; - } - //console.log(row_s, row_e,col_s,col_e, x, y); - var visibledatarow = luckysheet.getvisibledatarow(); - if (row_e >= visibledatarow[visibledatarow.length - 1] || y > winH) { - row_s = visibledatarow.length - 1 - luckysheet_select_save["row"][1] + luckysheet_select_save["row"][0]; - row_e = visibledatarow.length - 1; - } - var visibledatacolumn = luckysheet.getvisibledatacolumn(); - if (col_e >= visibledatacolumn[visibledatacolumn.length - 1] || x > winW) { - col_s = visibledatacolumn.length - 1 - luckysheet_select_save["column"][1] + luckysheet_select_save["column"][0]; - col_e = visibledatacolumn.length - 1; - } - //console.log(row_s, row_e,visibledatarow.length,luckysheet_select_save["row"][1] - luckysheet_select_save["row"][0]); - var col_pre = col_s - 1 == -1 ? 0 : visibledatacolumn[col_s - 1], - col = visibledatacolumn[col_e]; - var row_pre = row_s - 1 == -1 ? 0 : visibledatarow[row_s - 1], - row = visibledatarow[row_e]; - var rangeindex = luckysheet.formula.rangeMoveIndex; - var selected = { - "left": col_pre, - "width": col - col_pre - 2, - "top": row_pre, - "height": row - row_pre - 2, - "display": "block" - }; - var range = this.getSelectedFromRange(selected); - var rangetxt = luckysheet.sheetmanage.getRangetxt(luckysheet.currentSheetIndex, range, this.rangetosheet); - var $span = luckysheet.formula.rangeResizeTo.find("span[rangeindex='" + rangeindex + "']").html(rangetxt); - luckysheet.luckysheetRangeLast(luckysheet.formula.rangeResizeTo[0]); - luckysheet.formula.rangeMoveRangedata = range; - obj.css(selected); - }, - rangeMoveDragged: function(obj) { - luckysheet.formula.rangeMove = false; - $("#luckysheet-formula-functionrange-highlight-" + luckysheet.formula.rangeMoveIndex).data("range", luckysheet.formula.rangeMoveRangedata).find(".luckysheet-selection-copy-hc").css("opacity", 0.03); - }, - functionHTMLIndex: 0, - functionRangeIndex: null, - findrangeindex: function(v, vp) { - var re = //g; - var v_a = v.replace(re, ""), - vp_a = vp.replace(re, ""); - v_a = v_a.split(''); - vp_a = vp_a.split(''); - v_a.pop(); - vp_a.pop(); - var pfri = luckysheet.formula.functionRangeIndex; - var i = 0; - var spanlen = vp_a.length > v_a.length ? v_a.length : vp_a.length; - - var vplen = vp_a.length, vlen = v_a.length; - //不增加元素输入 - if(vplen == vlen){ - var i = pfri[0]; - var p = vp_a[i], n = v_a[i]; - if(p==null){ - if(vp_a.length<=i){ - pfri = [vp_a.length-1, vp_a.length-1]; - } - else if(v_a.length<=i){ - pfri = [v_a.length-1, v_a.length-1]; - } - return pfri; - } - else if(p.length == n.length){ - //pfri[1] = pfri[1] - 1; - // if(pfri[1]<0){ - // pfri[1] = 0; - // } - if(vp_a[i+1]!=null && v_a[i+1]!=null && vp_a[i+1].length n.length){ - //pfri[1] = pfri[1] - 1; - if(p!=null && v_a[i+1]!=null && v_a[i+1].substr(0,1) =='"' && (p.indexOf("{") >-1 || p.indexOf("}") >-1)){ - pfri[0] = pfri[0] + 1; - pfri[1] = 1; - } - return pfri; - } - else if(p.length < n.length){ - //pfri[1] = pfri[1]; - if(pfri[1]>n.length){ - pfri[1] = n.length; - } - return pfri; - } - } - //减少元素输入 - else if(vplen > vlen){ - - var i = pfri[0]; - var p = vp_a[i], n = v_a[i]; - if(n==null){ - if(v_a[i-1].indexOf("{")>-1){ - pfri[0] = pfri[0] -1; - var start = v_a[i-1].search("{"); - pfri[1] = pfri[1] + start; - } - else{ - pfri[0] = 0; - pfri[1] = 0; - } - - } - else if(p.length == n.length){ - if(v_a[i+1]!=null && (v_a[i+1].substr(0,1)=='"' || v_a[i+1].substr(0,1)=='{' || v_a[i+1].substr(0,1)=='}')){ - pfri[0] = pfri[0] + 1; - pfri[1] = 1; - } - else if(p!=null && p.length>2 && p.substr(0,1)=='"' && p.substr(p.length-1,1)=='"' ){ - //pfri[1] = n.length-1; - } - else if(v_a[i]!=null && v_a[i]=='")'){ - pfri[1] = 1; - } - else if(v_a[i]!=null && v_a[i]=='"}'){ - pfri[1] = 1; - } - else if(v_a[i]!=null && v_a[i]=='{)'){ - pfri[1] = 1; - } - else{ - pfri[1] = n.length; - } - - // if(pfri[1]==0){ - // pfri[1] = 1; - // } - return pfri; - } - else if(p.length > n.length){ - if(v_a[i+1]!=null && (v_a[i+1].substr(0,1)=='"' || v_a[i+1].substr(0,1)=='{' || v_a[i+1].substr(0,1)=='}')){ - pfri[0] = pfri[0] + 1; - pfri[1] = 1; - } - return pfri; - } - else if(p.length < n.length){ - return pfri; - } - - // if(pfri[0]>=v_a.length-1){ - // pfri[0] = v_a.length-1; - // if(pfri[0]<0){ - // pfri[0] = 0; - // } - // } - // else{ - // if(v_a[pfri[0]+1]!=null && v_a[pfri[0]+1].substr(0,1)=='"'){ - // pfri[0] = pfri[0] + 1; - // } - // else if(v_a[pfri[0]]!=null && v_a[pfri[0]].substr(v_a[pfri[0]].length-1,1)=='"'){ - // pfri[0] = pfri[0] + 1; - // } - // else{ - // pfri[0] = pfri[0]; - // } - // } - - // var i = pfri[0]; - // if(v_a[i]==null){ - // pfri[1] = 0; - // } - // else{ - // if(v_a[pfri[0]].length>1 && vp_a[pfri[0]+1]==","){ - // if(vp_a[pfri[0]]=='""'){ - // pfri[1] = 1; - // } - // else{ - // if(vp_a[pfri[0]].substr(vp_a[pfri[0]].length-1,1)=='"'){ - // pfri[1] = vp_a[pfri[0]].length-1; - // } - // else{ - // pfri[1] = vp_a[pfri[0]].length; - // } - - // } - - // } - // else{ - // if(v_a[pfri[0]+1]!=null && v_a[pfri[0]+1].substr(0,1)=='"'){ - // pfri[1] = 1; - // } - // else if(v_a[pfri[0]]!=null && v_a[pfri[0]].substr(v_a[pfri[0]].length-1,1)=='"'){ - // pfri[1] = 1; - // } - // else{ - // pfri[1] = v_a[i].length; - // } - // } - - // } - return pfri; - } - //增加元素输入 - else if(vplen < vlen){ - var i = pfri[0]; - var p = vp_a[i], n = v_a[i]; - if(p==null){ - pfri[0] = v_a.length-1; - if(n!=null){ - pfri[1] = n.length; - } - else{ - pfri[1] = 1; - } - } - else if(p.length == n.length){ - if(vp_a[i+1]!=null && (vp_a[i+1].substr(0,1)=='"' || vp_a[i+1].substr(0,1)=='{' || vp_a[i+1].substr(0,1)=='}') ){ - pfri[1] = n.length; - } - else if(v_a[i+1]!=null && v_a[i+1].substr(0,1)=='"' && ( v_a[i+1].substr(0,1)=='{' || v_a[i+1].substr(0,1)=='}') ){ - pfri[0] = pfri[0] + 1; - pfri[1] = 1; - } - // else if(n!=null && n.length>2 && n.substr(0,1)=='"' && n.substr(n.length-1,1)=='"'){ - // pfri[1] = n.length; - // } - else if(n!=null && n.substr(0,1)=='"' && n.substr(n.length-1,1)=='"' && p.substr(0,1)=='"' && p.substr(p.length-1,1)==')'){ - pfri[1] = n.length; - } - else if(n!=null && n.substr(0,1)=='{' && n.substr(n.length-1,1)=='}' && p.substr(0,1)=='{' && p.substr(p.length-1,1)==')'){ - pfri[1] = n.length; - } - // else if(p!=null && (p.indexOf("{") >-1 || p.indexOf("}") >-1)){ - - // } - else{ - pfri[0] = pfri[0] + vlen - vplen; - if(v_a.length>vp_a.length){ - pfri[1] = v_a[i+1].length; - } - else{ - pfri[1] = 1; - } - - // pfri[0] = pfri[0] + vlen - vplen - p.length + 1; - // pfri[1] = p.length; - } - return pfri; - } - else if(p.length > n.length){ - if(p!=null && p.substr(0,1)=='"'){ - pfri[1] = n.length; - } - else if(v_a[i+1]!=null && /{.*?}/.test(v_a[i+1])){ - pfri[0] = pfri[0] + 1; - pfri[1] = v_a[i+1].length; - } - else if(p!=null && v_a[i+1].substr(0,1) =='"' && (p.indexOf("{") >-1 || p.indexOf("}") >-1)){ - pfri[0] = pfri[0] + 1; - pfri[1] = 1; - } - else if(p!=null && (p.indexOf("{") >-1 || p.indexOf("}") >-1)){ - - } - else{ - pfri[0] = pfri[0] + vlen - vplen - 1; - pfri[1] = v_a[i-1].length; - } - return pfri; - } - else if(p.length < n.length){ - return pfri; - } - - // if(pfri[0]>=v_a.length-1 || vplen==0){ - // pfri[0] = v_a.length-1; - // pfri[1] = 1; - // } - // else{ - // if(v_a[pfri[0]+1]!=null && v_a[pfri[0]+1].substr(0,1)=='"'){ - // pfri[0] = pfri[0] + 1; - // pfri[1] = 1; - // } - // else if(v_a[pfri[0]]!=null && v_a[pfri[0]].substr(v_a[pfri[0]].length-1,1)=='"'){ - // pfri[0] = pfri[0]; - // pfri[1] = v_a[pfri[0]].length; - // } - // else if(vp_a[pfri[0]+1]!=null && vp_a[pfri[0]+1].substr(0,1)=='"'){ - // pfri[0] = pfri[0]; - // pfri[1] = 1; - // } - // else{ - // var cutfix = 0; - // //处理在sum之间输入N个','产生2个span的情况 - // if(vp_a[pfri[0]].length>1 && v_a[pfri[0]+1]=="," && v_a[pfri[0]+2]!=null && !(v_a[pfri[0]+2] in {"(":0, ")":0}) ){ - // cutfix = 1; - // } - - // pfri[0] = pfri[0] + vlen - vplen - cutfix; - // pfri[1] = 1; - // } - - // } - - return pfri; - } - return null; - - while (i < spanlen) { - var p = vp_a[i], - n = v_a[i]; - //console.log(p, n, i, p.length, n.length); - if (p.length == n.length) { - //return [i, luckysheet.formula.functionRangeIndex[1]]; - var p_a = p.split(""); - var n_a = n.split(""); - var s = 0; - //console.log(p_a, n_a, JSON.stringify(pfri)); - while (s < n_a.length) { - var pp = p_a[s], - nn = n_a[s]; - //console.log(111111,nn,pp,i, s, JSON.stringify(pfri)); - if (pp != nn) { - return [i, s + 1]; - } - // else if (pp == nn && pfri != null && pfri[0] == i && pfri[1] == s + 1) { - // return [i, s + 1]; - // } - // else if (pp == nn && pfri != null && pfri[0] == i && pfri[1] == s + 2 && nn==",") { - // return [i+1, s + 1]; - // } - s++; - } - } else if (p.length > n.length) { - var p_a = p.split(""); - var n_a = n.split(""); - var s = 0; - while (s < n_a.length) { - var pp = p_a[s], - nn = n_a[s]; - //console.log(222222,nn,pp,i, s, JSON.stringify(pfri)); - if (pp != nn) { - return [i, s]; - } - // else if (pp == nn && pfri != null && pfri[0] == i && pfri[1] == s) { - // return [i, s]; - // } - s++; - } - return [i, n_a.length]; - } else if (p.length < n.length) { - var p_a = p.split(""); - var n_a = n.split(""); - var s = 0; - while (s < p_a.length) { - var pp = p_a[s], - nn = n_a[s]; - //console.log(33333,nn,pp,i, s, JSON.stringify(pfri)); - if (pp != nn) { - return [i, s + 1]; - } - // else if (pp == nn && pfri != null && pfri[0] == i && pfri[1] == s + 1) { - // return [i, s + 1]; - // } - s++; - } - return [i, n_a.length]; - } - i++; - } - return null; - }, - setCaretPosition: function(textDom, children, pos) { - try{ - var el = textDom; - var range = document.createRange(); - var sel = window.getSelection(); - //console.log(el.childNodes[children], pos); - range.setStart(el.childNodes[children], pos); - range.collapse(true); - sel.removeAllRanges(); - sel.addRange(range); - el.focus(); - //if (textDom.setSelectionRange) { - // // IE Support - // textDom.focus(); - // textDom.setSelectionRange(pos, pos); - //} else if (textDom.createTextRange) { - // // Firefox support - // var range = textDom.createTextRange(); - // range.collapse(true); - // range.moveEnd('character', pos); - // range.moveStart('character', pos); - // range.select(); - //} - } - catch(err) { - luckysheet.luckysheetRangeLast(luckysheet.formula.rangeResizeTo[0]); - } - }, - functionRange: function(obj, v, vp) { - // console.log(v, vp); - if (window.getSelection) { //ie11 10 9 ff safari - var currSelection = window.getSelection(); - var fri = luckysheet.formula.findrangeindex(v, vp); - //luckysheet.formula.functionRangeIndex = fri; - //console.log(fri); - if (fri == null) { - //luckysheet.formula.functionRangeIndex = currSelection.rangeCount; - currSelection.selectAllChildren(obj.get(0)); - currSelection.collapseToEnd(); - } else { - //obj = obj.find("span")[fri[0]]; - //currSelection.selectAllChildren(obj); - //currSelection.collapse(obj, fri[1]); - this.setCaretPosition(obj.find("span").get(fri[0]), 0, fri[1]); - } - //currSelection.collapse(obj,luckysheet.formula.functionRangeIndex); - } else if (document.selection) { //ie10 9 8 7 6 5 - //var range = document.selection.createRange();//创建选择对象 - //var range = document.body.createTextRange(); - luckysheet.formula.functionRangeIndex.moveToElementText(obj); //range定位到obj - luckysheet.formula.functionRangeIndex.collapse(false); //光标移至最后 - luckysheet.formula.functionRangeIndex.select(); - } - }, - functionInputHanddler: function($to, $input, kcode) { - if(luckysheet.luckysheetConfigsetting.editMode){//此模式下禁用公式栏 - return; - } - - var $functionbox = $to, - $editer = $input; - var value1 = $editer.html(), - value1txt = $editer.text(); - setTimeout(function() { - var value = $editer.text(), - valuetxt = value; - if (value.length > 0 && value.substr(0, 1) == "=" && (kcode != 229 || value.length == 1)) { - value = luckysheet.formula.functionHTMLGenerate(value); - value1 = luckysheet.formula.functionHTMLGenerate(value1txt); - - if (window.getSelection) { // all browsers, except IE before version 9 - var currSelection = window.getSelection(); - if($(currSelection.anchorNode).is("div")){ - var editorlen = $("#luckysheet-rich-text-editor span").length; - luckysheet.formula.functionRangeIndex = [editorlen-1, $("#luckysheet-rich-text-editor").find("span").eq(editorlen-1).text().length]; - } - else{ - luckysheet.formula.functionRangeIndex = [$(currSelection.anchorNode).parent().index(), currSelection.anchorOffset]; - } - } - else { // Internet Explorer before version 9 - var textRange = document.selection.createRange(); - luckysheet.formula.functionRangeIndex = textRange; - } - - $editer.html(value); - luckysheet.formula.functionRange($editer, value, value1); - - // if (luckysheet.formula.functionRangeIndex != null) { - // luckysheet.formula.functionRange($("#luckysheet-functionbox-cell"), value, value1); - // } - // else{ - // luckysheetRangeLast($("#luckysheet-functionbox-cell")[0]); - // } - luckysheet.formula.canceFunctionrangeSelected(); - luckysheet.formula.createRangeHightlight(); - } - luckysheet.formula.rangestart = false; - luckysheet.formula.rangedrag_column_start = false; - luckysheet.formula.rangedrag_row_start = false; - - $functionbox.html(value); - luckysheet.formula.rangeHightlightselected($editer, kcode); - }, 1); - }, - functionHTMLGenerate: function(txt) { - if (txt.length == 0 || txt.substr(0, 1) != "=") { - return txt; - } - this.functionHTMLIndex = 0; - return '=' + this.functionHTML(txt); - }, - functionHTML: function(txt) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - luckysheet.formula.operatorjson = op; - } - if (txt.substr(0, 1) == "=") { - txt = txt.substr(1); - } - var funcstack = txt.split(""); - //var i=0;i 0) { - function_str += '' + str + '('; - } else { - function_str += '('; - } - str = ""; - } else if (s == ")" && matchConfig.dquote == 0 && matchConfig.braces == 0) { - matchConfig.bracket -= 1; - //if (matchConfig.bracket == 0) { - function_str += luckysheet.formula.functionHTML(str) + ')'; - str = ""; - } - // else if (s == "'" && matchConfig.dquote == 0) { - // if (matchConfig.squote > 0) { - // function_str += str + "'"; - // if(str.length>0){ - // function_str += '' + str + "'"; - // } - // else{ - // function_str += "'"; - // } - // matchConfig.squote -= 1; - // str = ""; - // } - // else { - // matchConfig.squote += 1; - // str += "'"; - // } - // } - else if(s=="{" && matchConfig.dquote == 0){ - str += '{'; - matchConfig.braces += 1; - } - else if(s=="}" && matchConfig.dquote == 0){ - str += '}'; - matchConfig.braces -= 1; - } - else if (s == '"' && matchConfig.squote == 0) { - if (matchConfig.dquote > 0) { - if (str.length > 0) { - function_str += str + '"'; - } else { - function_str += '"'; - } - matchConfig.dquote -= 1; - str = ""; - } else { - matchConfig.dquote += 1; - if (str.length > 0) { - function_str += luckysheet.formula.functionHTML(str) + '"'; - } else { - function_str += '"'; - } - //if (i == funcstack.length - 1) { - // function_str += ""; - //} - str = ""; - } - } else if (s == ',' && matchConfig.dquote == 0 && matchConfig.braces == 0) { - //matchConfig.comma += 1; - function_str += luckysheet.formula.functionHTML(str) + ','; - str = ""; - } else if (s == '&' && matchConfig.dquote == 0 && matchConfig.braces == 0) { - if (str.length > 0) { - function_str += luckysheet.formula.functionHTML(str) + '' + '&' + '';; - str = ""; - } else { - function_str += '' + '&' + ''; - } - } - // else if (s == " " && matchConfig.dquote == 0){ - // if(str.indexOf("") == -1 && str.length>0){ - // function_str += str + ''; - // } - // str = " "; - // if((i+1) < funcstack.length){ - // while((i+1)"; - // } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0 && matchConfig.braces == 0) { - var s_next = ""; - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - - var p = i-1, s_pre = null;; - if(p>=0){ - do { - s_pre = funcstack[p--]; - } - while (p>=0 && s_pre ==" ") - } - - if ((s + s_next) in luckysheet.formula.operatorjson) { - if (str.length > 0) { - function_str += luckysheet.formula.functionHTML(str) + '' + s + s_next + ''; - str = ""; - } else { - function_str += '' + s + s_next + ''; - } - i++; - } - else if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in luckysheet.formula.operatorjson ) ){ - str += s; - } - else { - if (str.length > 0) { - function_str += luckysheet.formula.functionHTML(str) + '' + s + ''; - str = ""; - } else { - function_str += '' + s + ''; - } - } - } else { - str += s; - } - if (i == funcstack.length - 1) { - //function_str += str; - if (luckysheet.formula.iscelldata($.trim(str))) { - function_str += '' + str + ''; - this.functionHTMLIndex++; - } else if (matchConfig.dquote > 0) { - function_str += str + ''; - } else if (str.indexOf("") == -1 && str.length > 0) { - var regx = /{.*?}/; - if(regx.test($.trim(str))){ - var arraytxt = regx.exec(str)[0]; - var arraystart = str.search(regx); - var alltxt = ""; - if(arraystart>0){ - alltxt += '' + str.substr(0, arraystart) + ''; - - } - - alltxt += '' + arraytxt + ''; - - if(arraystart+arraytxt.length'; - } - - function_str += alltxt; - } - else{ - function_str += '' + str + ''; - } - // if(!isNaN(str)){ - // function_str += '' + str + ''; - // } - // else{ - // function_str += '' + str + ''; - // } - } - } - //console.log(i, str, function_str, s); - i++; - } - //console.log(function_str); - return function_str; - }, - getfunctionParam: function(txt) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - luckysheet.formula.operatorjson = op; - } - if (txt.substr(0, 1) == "=") { - txt = txt.substr(1); - } - var funcstack = txt.split(""); - //var i=0;i 0 && bracket.length==0) { - fn = str.toUpperCase(); - bracket.push(1); - str = ""; - } - else if(bracket.length==0) { - - //function_str += "("; - bracket.push(0); - str = ""; - } - else{ - bracket.push(0); - str += s; - } - - } else if (s == ")" && matchConfig.dquote == 0) { - var bt = bracket.pop(); - if(bracket.length==0){ - //function_str += luckysheet.formula.functionParser(str) + ")"; - param.push(str); - str = ""; - } - else{ - str += s; - } - } - else if (s == '"') { - str += '"'; - if (matchConfig.dquote > 0) { - matchConfig.dquote -= 1; - str = ""; - } else { - matchConfig.dquote += 1; - } - } else if (s == ',' && matchConfig.dquote == 0) { - if(bracket.length<=1){ - //function_str += luckysheet.formula.functionParser(str) + ","; - param.push(str); - str = ""; - } - else{ - str += ","; - } - - } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0) { - var s_next = ""; - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - - var p = i-1, s_pre = null;; - if(p>=0){ - do { - s_pre = funcstack[p--]; - } - while (p>=0 && s_pre ==" ") - } - - if(!(/[^0-9]/.test(s_next)) && s=="-" && (s_pre=="(" || s_pre == null || s_pre == "," || s_pre == " " || s_pre in luckysheet.formula.operatorjson ) ){ - if (matchConfig.dquote == 0) { - str += $.trim(s); - } else { - str += s; - } - } - else{ - function_str= ""; - str = ""; - } - - } else { - if (matchConfig.dquote == 0) { - str += $.trim(s); - } else { - str += s; - } - } - i++; - } - // console.log({"fn":fn, "param":param}); - return {"fn":fn, "param":param}; - }, - functionParser1: function(txt) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - luckysheet.formula.operatorjson = op; - } - if (txt.substr(0, 1) == "=") { - txt = txt.substr(1); - } - var funcstack = txt.split(""); - //var i=0;i 0) { - function_str += "luckysheet_function." + str.toUpperCase() + ".f("; - } else { - function_str += "("; - } - str = ""; - } else if (s == ")" && matchConfig.dquote == 0) { - matchConfig.bracket -= 1; - //console.log(function_str, "#####",str); - function_str += luckysheet.formula.functionParser(str); - console.log(matchConfig.compare); - if(matchConfig.compare == 1){ - function_str += '))'; - matchConfig.compare = 0; - } - else{ - function_str += ')'; - } - //console.log(function_str, "#####",str); - str = ""; - } - //else if (s == "'" && matchConfig.dquote==0) { - // if(matchConfig.squote>0){ - // function_str += str + "'"; - // matchConfig.squote -= 1; - // str = ""; - // } - // else{ - // matchConfig.squote += 1; - // str += "'"; - // } - //} - else if (s == '"' && matchConfig.squote == 0) { - if (matchConfig.dquote > 0) { - function_str += str + '"'; - matchConfig.dquote -= 1; - str = ""; - } else { - matchConfig.dquote += 1; - str += '"'; - } - } else if (s == ',' && matchConfig.dquote == 0) { - //matchConfig.comma += 1; - //console.log(function_str, "#####",str); - function_str += luckysheet.formula.functionParser(str); - if(matchConfig.compare == 1){ - function_str += '),'; - matchConfig.compare = 0; - } - else{ - function_str += ','; - } - //console.log(function_str, "#####",str); - str = ""; - } - // else if (s == '&' && matchConfig.dquote == 0) { - // if (str.length > 0) { - // function_str += luckysheet.formula.functionParser(str) + "+"; - // str = ""; - // } else { - // function_str += "+"; - // } - // } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0) { - var s_next = ""; - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - if ((s + s_next) in luckysheet.formula.operatorjson) { - if (str.length > 0) { - matchConfig.compare = 1; - function_str += "luckysheet_compareWith(" + luckysheet.formula.functionParser(str) + ",'" + s + s_next + "', "; - str = ""; - } else { - function_str += s + s_next; - } - i++; - } else { - if (str.length > 0) { - matchConfig.compare = 1; - function_str += "luckysheet_compareWith(" + luckysheet.formula.functionParser(str) + ",'" + s + "', "; - str = ""; - } else { - function_str += s; - } - } - } else { - str += s; - } - if (i == funcstack.length - 1) { - //function_str += str; - if (luckysheet.formula.iscelldata($.trim(str))) { - function_str += "luckysheet_getcelldata('" + $.trim(str) + "')"; - } else { - function_str += $.trim(str); - } - } - //console.log(i, str, function_str, s); - i++; - } - console.log(function_str); - return function_str; - }, - calPostfixExpression: function(cal){ - if(cal.length == 0){ - return ""; - } - - var stack = []; - for(var i = cal.length - 1; i >= 0; i--){ - var c = cal[i]; - if(c in luckysheet.formula.operatorjson){ - var s2 = stack.pop(); - var s1 = stack.pop(); - - var str = "luckysheet_compareWith(" + s1 + ",'" + c + "', " + s2 + ")"; - - stack.push(str); - } - else{ - stack.push(c); - } - } - - if(stack.length > 0){ - return stack[0]; - } - else{ - return ""; - } - }, - checkBracketNum: function(fp){ - var bra_l = fp.match(/\(/g), - bra_r = fp.match(/\)/g), - //bra_tl_txt = fp.match(/".*?\(.*?"/g), - //bra_tr_txt = fp.match(/".*?\).*?"/g); - - /*new runze*/ - bra_tl_txt = fp.match(/(['"])(?:(?!\1).)*?\1/g); - bra_tr_txt = fp.match(/(['"])(?:(?!\1).)*?\1/g); - - - var bra_l_len = 0, bra_r_len = 0; - if (bra_l != null) { - bra_l_len += bra_l.length; - } - if (bra_r != null) { - bra_r_len += bra_r.length; - } - - var bra_tl_len = 0, bra_tr_len = 0; - if(bra_tl_txt!=null){ - for(var i=0;i 0 && bracket.length == 0) { - function_str += "luckysheet_function." + str.toUpperCase() + ".f("; - bracket.push(1); - str = ""; - } - else if(bracket.length == 0) { - function_str += "("; - bracket.push(0); - str = ""; - } - else{ - bracket.push(0); - str += s; - } - } - else if (s == ")" && matchConfig.dquote == 0 && matchConfig.braces == 0) { - var bt = bracket.pop(); - - if(bracket.length == 0){ - function_str += luckysheet.formula.functionParser(str) + ")"; - str = ""; - } - else{ - str += s; - } - } - else if(s == "{" && matchConfig.dquote == 0){ - str += '{'; - matchConfig.braces += 1; - } - else if(s == "}" && matchConfig.dquote == 0){ - str += '}'; - matchConfig.braces -= 1; - } - else if (s == '"') { - str += '"'; - - if (matchConfig.dquote > 0) { - matchConfig.dquote -= 1; - } - else { - matchConfig.dquote += 1; - } - } - else if (s == ',' && matchConfig.dquote == 0 && matchConfig.braces == 0) { - if(bracket.length <= 1){ - function_str += luckysheet.formula.functionParser(str) + ","; - str = ""; - } - else{ - str += ","; - } - } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0 && matchConfig.braces == 0) { - var s_next = ""; - var op = luckysheet.formula.operatorPriority; - - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - - if ((s + s_next) in luckysheet.formula.operatorjson) { - if(bracket.length == 0){ - if($.trim(str).length > 0){ - cal2.unshift(luckysheet.formula.functionParser($.trim(str))); - } - else if($.trim(function_str).length > 0){ - cal2.unshift($.trim(function_str)); - } - - if(cal1[0] in luckysheet.formula.operatorjson){ - var stackCeilPri = op[cal1[0]]; - - while(cal1.length > 0 && stackCeilPri != null){ - cal2.unshift(cal1.shift()); - stackCeilPri = op[cal1[0]]; - } - } - - cal1.unshift(s+s_next); - - function_str= ""; - str = ""; - } - else { - str += s + s_next; - } - - i++; - } - else { - if(bracket.length == 0){ - if($.trim(str).length > 0){ - cal2.unshift(luckysheet.formula.functionParser($.trim(str))); - } - else if($.trim(function_str).length > 0){ - cal2.unshift($.trim(function_str)); - } - - if(cal1[0] in luckysheet.formula.operatorjson){ - var stackCeilPri = op[cal1[0]]; - stackCeilPri = stackCeilPri == null ? 1000 : stackCeilPri; - - var sPri = op[s]; - sPri = sPri == null ? 1000 : sPri; - - while(cal1.length > 0 && sPri >= stackCeilPri){ - cal2.unshift(cal1.shift()); - - stackCeilPri = op[cal1[0]]; - stackCeilPri = stackCeilPri == null ? 1000 : stackCeilPri; - } - } - - cal1.unshift(s); - - function_str= ""; - str = ""; - } - else{ - str += s; - } - } - } - else { - if (matchConfig.dquote == 0) { - str += $.trim(s); - } - else { - str += s; - } - } - - if (i == funcstack.length - 1) { - var endstr = ""; - - if (luckysheet.formula.iscelldata($.trim(str))) { - endstr = "luckysheet_getcelldata('" + $.trim(str) + "')"; - } - else { - str = $.trim(str); - - var regx = /{.*?}/; - if(regx.test(str) && str.substr(0, 1) != '"' && str.substr(str.length - 1, 1) != '"'){ - var arraytxt = regx.exec(str)[0]; - var arraystart = str.search(regx); - var alltxt = ""; - - if(arraystart > 0){ - endstr += str.substr(0, arraystart); - - } - - endstr += "luckysheet_getarraydata('" + arraytxt + "')"; - - if(arraystart + arraytxt.length < str.length){ - endstr += str.substr(arraystart + arraytxt.length, str.length); - } - } - else{ - endstr = str; - } - } - - if(endstr.length > 0){ - cal2.unshift(endstr); - } - - if(cal1.length > 0){ - if(function_str.length > 0){ - cal2.unshift(function_str); - function_str = ""; - } - - while(cal1.length > 0){ - cal2.unshift(cal1.shift()); - } - } - - if(cal2.length > 0){ - function_str = luckysheet.formula.calPostfixExpression(cal2); - } - else{ - function_str += endstr; - } - } - - i++; - } - - return function_str; - }, - addFunctionGroup: function(r, c, func, index) { - if (index == null) { - index = luckysheet.currentSheetIndex; - } - var luckysheetfile = luckysheet.getluckysheetfile(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - if (file.calcChain == null) { - file.calcChain = []; - } - var cc = { - "r": r, - "c": c, - "index": index, - "func": func - }; - file.calcChain.push(cc); - luckysheet.server.saveParam("fc", index, JSON.stringify(cc), { - "op": "add", - "pos": file.calcChain.length - 1 - }); - luckysheet.setluckysheetfile(luckysheetfile); - }, - getFunctionGroup: function(index) { - if (index == null) { - index = luckysheet.currentSheetIndex; - } - var luckysheetfile = luckysheet.getluckysheetfile(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - if (file.calcChain == null) { - return []; - } - return file.calcChain; - }, - updateFunctionGroup: function(r, c, func, index) { - if (index == null) { - index = luckysheet.currentSheetIndex; - } - var luckysheetfile = luckysheet.getluckysheetfile(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - var calcChain = file.calcChain; - if (calcChain != null) { - for (var i = 0; i < calcChain.length; i++) { - var calc = calcChain[i]; - if (calc.r == r && calc.c == c && calc.index == index) { - calcChain[i].func = func; - luckysheet.server.saveParam("fc", index, JSON.stringify(calc), { - "op": "update", - "pos": i - }); - break; - } - } - } - luckysheet.setluckysheetfile(luckysheetfile); - }, - insertUpdateFunctionGroup: function(r, c, func, index) { - if (index == null) { - index = luckysheet.currentSheetIndex; - } - if (func == null) { - this.delFunctionGroup(r, c, index); - return; - } - var luckysheetfile = luckysheet.getluckysheetfile(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - var calcChain = file.calcChain; - if (calcChain == null) { - calcChain = []; - } - for (var i = 0; i < calcChain.length; i++) { - var calc = calcChain[i]; - if (calc.r == r && calc.c == c && calc.index == index) { - calc.func = func; - luckysheet.server.saveParam("fc", index, JSON.stringify(calc), { - "op": "update", - "pos": i - }); - return; - } - } - var cc = { - "r": r, - "c": c, - "index": index, - "func": func - }; - calcChain.push(cc); - file.calcChain = calcChain; - luckysheet.server.saveParam("fc", index, JSON.stringify(cc), { - "op": "add", - "pos": file.calcChain.length - 1 - }); - luckysheet.setluckysheetfile(luckysheetfile); - }, - isFunctionRangeSave: false, - isFunctionRange: function(txt, r, c) { - if (luckysheet.formula.operatorjson == null) { - var arr = luckysheet.formula.operator.split("|"), - op = {}; - - for (var i = 0; i < arr.length; i++) { - op[arr[i].toString()] = 1; - } - - luckysheet.formula.operatorjson = op; - } - - if (txt.substr(0, 1) == "=") { - txt = txt.substr(1); - } - - var funcstack = txt.split(""); - //var i=0;i 0) { - function_str += "luckysheet_function." + str.toUpperCase() + ".f("; - } - else { - function_str += "("; - } - str = ""; - } - else if (s == ")" && matchConfig.dquote == 0) { - matchConfig.bracket -= 1; - //if (matchConfig.bracket == 0) { - function_str += luckysheet.formula.isFunctionRange(str, r, c) + ")"; - str = ""; - //} - } - else if (s == ',' && matchConfig.dquote == 0) { - //matchConfig.comma += 1; - function_str += luckysheet.formula.isFunctionRange(str, r, c) + ','; - str = ""; - } - else if (s in luckysheet.formula.operatorjson && matchConfig.dquote == 0) { - var s_next = ""; - - if ((i + 1) < funcstack.length) { - s_next = funcstack[i + 1]; - } - - if ((s + s_next) in luckysheet.formula.operatorjson) { - if (str.length > 0) { - function_str += luckysheet.formula.isFunctionRange(str, r, c) + s + s_next; - str = ""; - } - else { - function_str += s + s_next; - } - i++; - } - else { - if (str.length > 0) { - function_str += luckysheet.formula.isFunctionRange(str, r, c) + s; - str = ""; - } else { - function_str += s; - } - } - } - else { - str += s; - } - - if (i == funcstack.length - 1) { - //function_str += str; - if (luckysheet.formula.iscelldata($.trim(str))) { - //function_str += "luckysheet_getcelldata('" + $.trim(str) + "')"; - if (r != null && c != null) { - var range = this.getcellrange($.trim(str)); - var row = range.row, - col = range.column; - - if((r + "_" + c) in dynamicArray_compute){ - var isd_range = false; - - for(var d_r = row[0]; d_r <= row[1]; d_r++){ - for(var d_c = col[0]; d_c <= col[1]; d_c++){ - if((d_r + "_" + d_c) in dynamicArray_compute && dynamicArray_compute[d_r + "_" + d_c].r == r && dynamicArray_compute[d_r + "_" + d_c].c == c){ - isd_range = true; - } - } - } - - if (isd_range) { - this.isFunctionRangeSave = this.isFunctionRangeSave || true; - } - else { - this.isFunctionRangeSave = this.isFunctionRangeSave || false; - } - } - else{ - if (r >= row[0] && r <= row[1] && c >= col[0] && c <= col[1]) { - this.isFunctionRangeSave = this.isFunctionRangeSave || true; - } - else { - this.isFunctionRangeSave = this.isFunctionRangeSave || false; - } - } - } - else { - var sheetlen = $.trim(str).split("!"); - if (sheetlen.length > 1) { - this.isFunctionRangeSave = this.isFunctionRangeSave || true; - } else { - this.isFunctionRangeSave = this.isFunctionRangeSave || false; - } - } - } - //else { - // function_str += $.trim(str); - //} - } - i++; - } - - return function_str; - }, - execvertex: {}, - execFunctionGroupData: null, - execFunctionExist: null, - execFunctionGroup: function(origin_r, origin_c, value, index, data) { - if (data == null) { - data = luckysheet.flowdata; - } - - this.execFunctionGroupData = $.extend(true, [], data); - - if (value != null) { - //此处setcellvalue 中this.execFunctionGroupData会保存想要更新的值,本函数结尾不要设为null,以备后续函数使用 - luckysheet.setcellvalue(origin_r, origin_c, this.execFunctionGroupData, value); - } - - if (index == null) { - index = luckysheet.currentSheetIndex; - } - - //{ "r": r, "c": c, "index": index, "func": func} - var group = this.getFunctionGroup(index), - vertex1 = {}, - stack = [], - count = 0; - - this.execvertex = {}; - if (this.execFunctionExist == null) { - var luckysheetfile = luckysheet.getluckysheetfile(); - - for (var i = 0; i < group.length; i++) { - var item = group[i]; - - var cell = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(item["index"])].data[item.r][item.c]; - - if(cell != null && cell.f != null && cell.f == item.func[2]){ - if(!(item instanceof Object)){ - item = eval('('+ item +')'); - } - - item.color = "w"; - item.parent = null; - item.chidren = {}; - item.times = 0; - - vertex1["r" + item.r.toString() + "c" + item.c.toString()] = item; - this.isFunctionRangeSave = false; - - if (origin_r != null && origin_c != null) { - this.isFunctionRange(item.func[2], origin_r, origin_c); - } - else { - this.isFunctionRange(item.func[2]); - } - - if (this.isFunctionRangeSave) { - stack.push(item); - this.execvertex["r" + item.r.toString() + "c" + item.c.toString()] = item; - count++; - } - //var v = luckysheet.formula.execfunction(f); - //value = { "v": v[1], "f": v[2] }; - //data[item.r][item.c] = value; - } - } - } - else { - for (var x = 0; x < this.execFunctionExist.length; x++) { - var cell = this.execFunctionExist[x]; - - if ("r" + cell.r.toString() + "c" + cell.c.toString() in vertex1) { - continue; - } - - for (var i = 0; i < group.length; i++) { - var item = group[i]; - - item.color = "w"; - item.parent = null; - item.chidren = {}; - item.times = 0; - - vertex1["r" + item.r.toString() + "c" + item.c.toString()] = item; - this.isFunctionRangeSave = false; - this.isFunctionRange(item.func[2], cell.r, cell.c); - - if (this.isFunctionRangeSave) { - stack.push(item); - this.execvertex["r" + item.r.toString() + "c" + item.c.toString()] = item; - count++; - } - } - } - } - - var x = 0, - x1 = 0; - - while (stack.length > 0) { - var u = stack.shift(); - - for (var name in vertex1) { - if (u.r == vertex1[name].r && u.c == vertex1[name].c) { - continue; - } - - this.isFunctionRangeSave = false; - //this.isFunctionRange(u.func[2], vertex1[name].r, vertex1[name].c); - this.isFunctionRange(vertex1[name].func[2], u.r, u.c); - - if (this.isFunctionRangeSave) { - var v = vertex1[name]; - - if (!(name in this.execvertex)) { - stack.push(v); - this.execvertex[name] = v; - } - - count++; - this.execvertex[name].chidren["r" + u.r.toString() + "c" + u.c.toString()] = 1; - } - } - } - - this.groupValuesRefreshData = []; - var i = 0; - - while (i < count) { - for (var name in this.execvertex) { - var u = this.execvertex[name]; - if (u.color == "w") { - this.functionDFS(u); - } - else if (u.color == "b") { - i++; - } - } - } - //保留this.execFunctionGroupData用于传输更新结果 - //this.execFunctionGroupData = null; - this.execFunctionExist = null; - }, - //深度优先算法,处理多级调用函数 - functionDFS: function(u) { - u.color = "g"; - u.times += 1; - - for (var chd in u.chidren) { - var v = this.execvertex[chd]; - if (v.color == "w") { - v.parent = "r" + u.r.toString() + "c" + u.c.toString(); - this.functionDFS(v); - } - } - - u.color = "b"; - window.luckysheet_getcelldata_cache = null; - - var v = luckysheet.formula.execfunction(u.func[2], u.r, u.c); - - var value = this.execFunctionGroupData[u.r][u.c]; - if(value == null){ - value = {}; - } - - value.v = v[1]; - value.f = v[2]; - - if(value.spl != null){ - window.luckysheetCurrentRow = u.r; - window.luckysheetCurrentColumn = u.c; - window.luckysheetCurrentFunction = this.execFunctionGroupData[u.r][u.c].f; - - var fp = $.trim(luckysheet.formula.functionParser(this.execFunctionGroupData[u.r][u.c].f)); - var sparklines = eval(fp); - value.spl = sparklines; - } - - this.groupValuesRefreshData.push({ - "r": u.r, - "c": u.c, - "v": value, - "i": luckysheet.currentSheetIndex - }); - - this.execFunctionGroupData[u.r][u.c] = value; - }, - groupValuesRefreshData: [], - groupValuesRefresh: function() { - if(this.groupValuesRefreshData.length > 0){ - for (var i = 0; i < this.groupValuesRefreshData.length; i++) { - var item = this.groupValuesRefreshData[i]; - - if(item.i != luckysheet.currentSheetIndex){ - continue; - } - - luckysheet.setcellvalue(item.r, item.c, luckysheet.flowdata, item.v); - luckysheet.server.saveParam("v", luckysheet.currentSheetIndex, item.v, { - "r": item.r, - "c": item.c - }); - } - - luckysheet.editor.webWorkerFlowDataCache(luckysheet.flowdata);//worker存数据 - } - }, - delFunctionGroup: function(r, c, index) { - if (index == null) { - index = luckysheet.currentSheetIndex; - } - - var luckysheetfile = luckysheet.getluckysheetfile(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(index)]; - - var calcChain = file.calcChain; - if (calcChain != null) { - for (var i = 0; i < calcChain.length; i++) { - var calc = calcChain[i]; - if (calc.r == r && calc.c == c && calc.index == index) { - calcChain.splice(i, 1); - luckysheet.server.saveParam("fc", index, null, { - "op": "del", - "pos": i - }); - break; - } - } - } - - luckysheet.setluckysheetfile(luckysheetfile); - }, - execfunction1: function(txt, r, c, isrefresh) { - var fp = $.trim(this.functionParser(txt)); - var funcf = fp.match(/luckysheet_function/g), - funcg = fp.match(/luckysheet_getcelldata/g), - funcc = fp.match(/luckysheet_compareWith/g), - funclen = 0; - - if (isrefresh == null) { - isrefresh = false; - } - - if (funcf != null) { - funclen += funcf.length; - } - - if (funcg != null) { - funclen += funcg.length; - } - - if (funcc != null) { - funclen += funcc.length; - } - - var quota1 = fp.match(/\(/g), - quota2 = fp.match(/\)/g), - quotalen = 0; - - if (quota1 != null) { - quotalen += quota1.length; - } - - if (quota2 != null) { - quotalen += quota2.length; - } - //var funclen = fp.match(/luckysheet_function/g).length + fp.match(/luckysheet_getcelldata/g).length; - //var quotalen = fp.match(/\(/g).length + fp.match(/\)/g).length; - //if(fp.substr(0, 16)=="luckysheet_function." && (fp.substr(fp.length-1, 1)!=")" || funclen!=quotalen/2 ) ){ - //console.log("fp.substr(0, 18)",fp.substr(0, 18)); - if ((fp.substr(0, 16) == "luckysheet_function." || fp.substr(0, 18) == "luckysheet_compareWith") && funclen != quotalen / 2) { - fp += ")"; - if(fp.substr(0, 16) == "luckysheet_function."){ - txt += ")"; - } - this.functionHTMLIndex = 0; - $("#luckysheet-functionbox-cell").html('=' + this.functionHTML(txt)); - } - - if (!this.testFunction(txt, fp)) { - luckysheet.tooltip.info("提示", "公式存在错误"); - return [false, this.error.n, txt]; - } - - var result = null; - window.luckysheetCurrentRow = r; - window.luckysheetCurrentColumn = c; - window.luckysheetCurrentFunction = txt; - - try { - result = eval(fp); - } - catch (e) { - var err = e; - //err错误提示处理 - console.log(e); - err = luckysheet.formula.errorInfo(err); - result = [luckysheet.formula.error.n, err]; - } - - if (result instanceof Array) { - result = result[0]; - //错误处理 - } - else if(result instanceof Object){ - result = result.data; - if (result instanceof Array) { - result = result[0]; - } - } - - window.luckysheetCurrentRow = null; - window.luckysheetCurrentColumn = null; - window.luckysheetCurrentFunction = null; - - if (fp.substr(0, 19) == "luckysheet_getcelldata(") { - if (result instanceof Array) { - result = result.join(","); - } - else if (result instanceof Object) { - result = result.v; - } - } - - if (r != null && c != null) { - //luckysheet.flowdata[r][c] = result; - if (isrefresh) { - this.execFunctionGroup(r, c, result); - } - this.insertUpdateFunctionGroup(r, c, [true, result, txt]); - } - - return [true, result, txt]; - }, - execfunction: function(txt, r, c, isrefresh, notInsertFunc) { - if(txt.indexOf(this.error.r) > -1){ - return [false, this.error.r, txt]; - } - - if (!this.checkBracketNum(txt)) { - txt += ")"; - } - - var fp = $.trim(this.functionParser(txt)); - - if ((fp.substr(0, 16) == "luckysheet_function." || fp.substr(0, 18) == "luckysheet_compareWith") ) { - this.functionHTMLIndex = 0; - // $("#luckysheet-functionbox-cell").html('=' + this.functionHTML(txt)); - } - - if (!this.testFunction(txt, fp) || fp == "") { - luckysheet.tooltip.info("提示", "公式存在错误"); - return [false, this.error.n, txt]; - } - - var result = null; - window.luckysheetCurrentRow = r; - window.luckysheetCurrentColumn = c; - window.luckysheetCurrentFunction = txt; - - var sparklines = null; - - try { - if(fp.indexOf("luckysheet_getcelldata") > -1){ - var funcg = fp.split("luckysheet_getcelldata('"); - - for(var i = 1; i < funcg.length; i++){ - var funcgStr = funcg[i].split("')")[0]; - var funcgRange = luckysheet.formula.getcellrange(funcgStr); - - if(funcgRange.row[0] < 0 || funcgRange.column[0] < 0){ - return [true, luckysheet.formula.error.r, txt]; - } - - if(funcgRange.sheetIndex == luckysheet.currentSheetIndex && r >= funcgRange.row[0] && r <= funcgRange.row[1] && c >= funcgRange.column[0] && c <= funcgRange.column[1]){ - if(luckysheet.luckysheetConfigsetting.editMode){ - alert("公式不可引用其本身的单元格"); - } - else{ - luckysheet.tooltip.info("公式不可引用其本身的单元格,会导致计算结果不准确", ""); - - } - - return [false, 0, txt]; - } - } - } - - result = eval(fp); - - //加入sparklines的参数项目 - if(fp.indexOf("SPLINES") > -1){ - sparklines = result; - result = ""; - } - } - catch (e) { - var err = e; - //err错误提示处理 - console.log(e); - err = luckysheet.formula.errorInfo(err); - result = [luckysheet.formula.error.n, err]; - } - - //公式结果是对象,则表示只是选区。如果是单个单元格,则返回其值;如果是多个单元格,则返回 #VALUE!。 - if(luckysheet.getObjType(result) == "object" && result.startCell != null){ - if(luckysheet.getObjType(result.data) == "array"){ - result = luckysheet.formula.error.v; - } - else{ - if(result.data == null || luckysheet.func_methods.isRealNull(result.data.v)){ - result = 0; - } - else{ - result = result.data.v; - } - } - } - - //公式结果是数组,分错误值 和 动态数组 两种情况 - if(luckysheet.getObjType(result) == "array"){ - var isErr = false; - - if(luckysheet.getObjType(result[0]) != "array" && result.length == 2){ - isErr = luckysheet.func_methods.valueIsError(result[0]); - } - - if(!isErr){ - if(luckysheet.getObjType(result[0]) == "array" && result.length == 1 && result[0].length == 1){ - result = result[0][0]; - } - else{ - var luckysheetfile = luckysheet.getluckysheetfile(); - var file = luckysheetfile[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - var dynamicArray = file["dynamicArray"] == null ? [] : file["dynamicArray"]; - dynamicArray.push({"r": r, "c": c, "f": txt, "data": result}); - - file["dynamicArray"] = dynamicArray; - luckysheet.setluckysheetfile(luckysheetfile); - - result = ""; - } - } - else{ - result = result[0]; - } - } - - window.luckysheetCurrentRow = null; - window.luckysheetCurrentColumn = null; - window.luckysheetCurrentFunction = null; - - if (r != null && c != null) { - if (isrefresh) { - this.execFunctionGroup(r, c, result); - } - - if(!notInsertFunc){ - this.insertUpdateFunctionGroup(r, c, [true, result, txt]); - } - } - - if(!!sparklines){ - return [true, result, txt, {type:"sparklines", data:sparklines}]; - } - - return [true, result, txt]; - }, - testFunction: function(txt, fp) { - if (txt.substr(0, 1) == "=") { - return true; - } - else { - return false; - } - }, - functionResizeData: {}, - functionResizeStatus: false, - functionResizeTimeout: null, - data_parm_index: 0 //选择公式后参数索引标记 - } - - //{"0":"数学","1":"统计","2":"查找","3":"Luckysheet内置","4":"数据挖掘","5":"数据源","6":"日期","7":"过滤器","8":"财务","9":"工程计算","10":"逻辑","11":"运算符","12":"文本","13":"转换工具","14":"数组"} - luckysheet.functionlist = [ - { - 'n': 'SUMIF', - 't': 0, - 'd': '对范围中符合指定条件的值求和。', - 'a': '对范围中符合指定条件的值求和。', - 'm': [2, 3], - 'p': [{ - 'name': '范围', - 'detail': '要根据条件进行检测的范围。', - 'example': 'A1:A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '条件', - 'detail': '要应用于范围的模式或测试条件。\n\n如果范围包含的是要检测的文本,则条件必须为字符串。条件可以包含通配符,包括用于匹配单个字符的?或用于匹配零个或连续多个字符的*。要匹配问号星号本身,请在该字符前面加上波浪号(~)前缀(即~?和~*)。字符串条件必须用引号括起来。函数会检查范围中的每个单元格与条件是否相等或匹配(如果使用了通配符)。\n\n如果范围包含的是要检测的数字,则条件可以是字符串也可以是数字。如果给定的条件是一个数字,则检查范围中的每个单元格是否等于条件。另外,条件也可能是包含数字的字符串(也将对其进行相等检测),或者带有以下前缀的数字:=(检查是否相等)、>(检查范围单元格的值是否大于条件值)或<(检查范围单元格的值是否小于条件值)', - 'example': '">20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '求和范围', - 'detail': '要求和的范围(如果与范围不同)。', - 'example': 'B1:B10', - 'require': 'o', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'TAN', - 't': 0, - 'd': '返回已知角度的正切值。', - 'a': '返回已知角度的正切值。', - 'm': [1, 1], - 'p': [{ - 'name': '角度', - 'detail': '要求其正切值的角度,以弧度表示。', - 'example': '45*PI()/180', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TANH', - 't': 0, - 'd': '返回给定实数的双曲正切值。', - 'a': '返回给定实数的双曲正切值。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其双曲正切值的实数。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CEILING', - 't': 0, - 'd': '将数值向上取整为最接近的指定因数的倍数。', - 'a': '将数值向上取整为最接近的指定因数的倍数。', - 'm': [2, 2], - 'p': [{ - 'name': '值', - 'detail': '要向上舍入的数值。', - 'example': '23.25', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '因数', - 'detail': '要将值舍入到此数的整数倍。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ATAN', - 't': 0, - 'd': '返回数值的反正切值,以弧度表示。', - 'a': '返回数值的反正切值', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其反正切值的数值。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ASINH', - 't': 0, - 'd': '返回数值的反双曲正弦值。', - 'a': '返回数值的反双曲正弦值。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其反双曲正弦值的数值。', - 'example': '0.9', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ABS', - 't': 0, - 'd': '返回数值的绝对值。', - 'a': '返回数值的绝对值。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要返回其绝对值的数。', - 'example': '-2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ACOS', - 't': 0, - 'd': '返回数值的反余弦值,以弧度表示。', - 'a': '返回数值的反余弦值', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其反余弦值的数值。必须介于-1和1之间,包括两端值。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ACOSH', - 't': 0, - 'd': '返回数值的反双曲余弦值。', - 'a': '返回数值的反双曲余弦值。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其反双曲余弦值的数值。必须大于等于1。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MULTINOMIAL', - 't': 0, - 'd': '返回参数和的阶乘除以各参数阶乘的乘积后得到的值。', - 'a': '返回参数和的阶乘除以各参数阶乘的乘积后得到的值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '用于计算的第一项数值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2', - 'detail': '用于计算的其他数值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'ATANH', - 't': 0, - 'd': '返回数值的反双曲正切值。', - 'a': '返回数值的反双曲正切值。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其反双曲正切值的数值。必须介于-1和1之间(不包括-1和1)。', - 'example': '0.9', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ATAN2', - 't': 0, - 'd': '以弧度为单位返回 x 轴与从原点 (0,0) 到指定坐标点 (`x`,`y`) 之间连线的夹角。', - 'a': '以弧度为单位返回 x 轴与从原点 (0,0) 到指定坐标点 (`x`,`y`) 之间连线的夹角。', - 'm': [2, 2], - 'p': [{ - 'name': 'x', - 'detail': '要计算其与x轴夹角大小的线段的终点x坐标。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'y', - 'detail': '要计算其与x轴夹角大小的线段的终点y坐标。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUNTBLANK', - 't': 1, - 'd': '返回给定范围内的空单元格数。', - 'a': '返回给定范围内的空单元格数。', - 'm': [1, 1], - 'p': [{ - 'name': '范围', - 'detail': '要统计空白单元格数量的范围。', - 'example': 'A2:C100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'COSH', - 't': 0, - 'd': '返回给定实数的双曲余弦值。', - 'a': '返回给定实数的双曲余弦值。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其双曲余弦值的实数值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'INT', - 't': 0, - 'd': '将数值向下取整为小于或等于该数的最接近的整数。', - 'a': '将数值向下取整为小于或等于该数的最接近的整数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要向下取整为最接近的整数的数值。', - 'example': '99.44', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ISEVEN', - 't': 0, - 'd': '检查所提供的数值是否为偶数。', - 'a': '检查所提供的数值是否为偶数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要验证其是否为偶数的数值。\n\n如果值为偶数或指向包含偶数的单元格的引用,ISEVEN将返回TRUE,否则返回FALSE。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ISODD', - 't': 0, - 'd': '检查所提供的数值是否为奇数。', - 'a': '检查所提供的数值是否为奇数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要验证其是否为奇数的数值。\n\n如果值为奇数或指向包含奇数的单元格,ISODD将返回TRUE,否则返回FALSE。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'LCM', - 't': 0, - 'd': '返回一个或多个整数的最小公倍数。', - 'a': '返回一个或多个整数的最小公倍数。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '要在求最小公倍数数的计算中检查其因数的第一项数值或范围。', - 'example': 'A2:A5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2', - 'detail': '[可选] - 在求最小公倍数时要考虑其因数的其他数值或范围。', - 'example': '3', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'LN', - 't': 0, - 'd': '返回数值以 e(欧拉数)为底的对数。', - 'a': '返回数值以 e(欧拉数)为底的对数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要以 e 为底数计算其对数的值。\n\n值必须为正数。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'LOG', - 't': 0, - 'd': '根据指定底数返回数字的对数。', - 'a': '根据指定底数返回数字的对数。', - 'm': [1, 2], - 'p': [{ - 'name': '值', - 'detail': '想要计算其对数的正实数。', - 'example': '128', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '底数', - 'detail': '[可选] - 对数的底数。', - 'example': '2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'LOG10', - 't': 0, - 'd': '返回数值以10为底的对数。', - 'a': '返回数值以10为底的对数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其以10为底的对数的数值。\n\n值必须为正值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MOD', - 't': 0, - 'd': '返回两数相除的余数, 结果的符号与除数相同。', - 'a': '返回两数相除的余数。', - 'm': [2, 2], - 'p': [{ - 'name': '被除数', - 'detail': '要将其相除以得到余数的数值。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '除数', - 'detail': '用于除其他数的数值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MROUND', - 't': 0, - 'd': '将数值取整为另一整数最接近的整数倍。', - 'a': '将数值取整为另一整数最接近的整数倍。', - 'm': [2, 2], - 'p': [{ - 'name': '值', - 'detail': '要取整为另一整数最接近的整数倍的数值。', - 'example': '21', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '因数', - 'detail': '值将取此因数的整数倍。', - 'example': '14', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ODD', - 't': 0, - 'd': '将数值向上取整为最接近的奇整数。', - 'a': '将数值向上取整为最接近的奇整数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要向上取整的数值,取整值为大于此值的最接近的奇数。\n\n如果值为负数,则将其取整为绝对值大于该值的相邻负奇数。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUMSQ', - 't': 0, - 'd': '返回一组数值和/或单元格的平方总和。', - 'a': '返回一组数值和/或单元格的平方总和。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '要将其平方相加的第一个数值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 要将其平方与值1的平方相加的其他数值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'COMBIN', - 't': 0, - 'd': '给定集合中的对象总数和要选择的对象数量,返回共有多少种不同选择方式。', - 'a': '给定集合中的对象总数和要选择的对象数量', - 'm': [2, 2], - 'p': [{ - 'name': 'n', - 'detail': '要从中进行选择的对象集合的大小。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'k', - 'detail': '要选择的对象数量。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUM', - 't': 0, - 'd': '返回一组数值和/或单元格的总和。', - 'a': '返回一组数值和/或单元格的总和。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '要相加的第一个数值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2', - 'detail': '[可选] - 要相加的其他数值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'SUBTOTAL', - 't': 0, - 'd': '使用指定的汇总函数,返回一系列纵向单元格的分类汇总。', - 'a': '使用指定的汇总函数', - 'm': [2, 256], - 'p': [{ - 'name': '函数代码', - 'detail': '用于计算分类汇总的函数。\n\n1代表AVERAGE\n\n2代表COUNT\n\n3代表COUNTA\n\n4代表MAX\n\n5代表MIN\n\n6代表PRODUCT\n\n7代表STDEV\n\n8代表STDEVP\n\n9代表SUM\n\n10代表VAR\n\n11代表VARP\n\n通过在这些2位代码前附加10(对于1位代码)或1(对于2位代码),可以将隐藏值忽略。例如,102代表忽略隐藏单元格的COUNT,而110则代表忽略隐藏值的VAR。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '范围1', - 'detail': '要计算分类汇总的第一个范围。', - 'example': 'A2:A5', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '范围2', - 'detail': '[可选] - 要计算分类汇总的其他范围。', - 'example': 'B2:B8', - 'require': 'o', - 'repeat': 'y', - 'type': 'range' - }] - }, { - 'n': 'ASIN', - 't': 0, - 'd': '返回数值的反正弦值,以弧度表示。', - 'a': '返回数值的反正弦值', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其反正弦值的数值。必须介于-1和1之间,包括两端值。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUNTIF', - 't': 1, - 'd': '返回范围内满足某个条件的单元格的数量。', - 'a': '返回范围内满足某个条件的单元格的数量。', - 'm': [2, 2], - 'p': [{ - 'name': '范围', - 'detail': '要根据条件进行检测的范围。', - 'example': 'A1:A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '条件', - 'detail': '要应用于范围的模式或测试条件。\n\n如果范围包含的是要检测的文本,则条件必须为字符串。条件可以包含通配符,包括用于匹配单个字符的?或用于匹配零个或连续多个字符的*。要匹配问号星号本身,请在该字符前面加上波浪号(~)前缀(即~?和~*)。字符串条件必须用引号括起来。函数会检查范围中的每个单元格与条件是否相等或匹配(如果使用了通配符)。\n\n如果范围包含的是要检测的数字,则条件可以是字符串也可以是数字。如果给定的条件是一个数字,则检查范围中的每个单元格是否等于条件。另外,条件也可能是包含数字的字符串(也将对其进行相等检测),或者带有以下前缀的数字:=、>、>=、<或<=,这些条件将分别用于检查范围中的单元格是否等于、大于、大于等于、小于、小于等于条件值。', - 'example': '">20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'RADIANS', - 't': 0, - 'd': '将以度表示的角度值转换为弧度。', - 'a': '将以度表示的角度值转换为弧度。', - 'm': [1, 1], - 'p': [{ - 'name': '角度', - 'detail': '要从度转换为弧度的角度。', - 'example': '180', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'RAND', - 't': 0, - 'd': '返回一个介于0和1之间(包括0但不包括1)的随机数。', - 'a': '返回一个介于0和1之间(包括0但不包括1)的随机数。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'COUNTUNIQUE', - 't': 0, - 'd': '计算一列指定值和范围中不重复数值的个数。', - 'a': '计算一列指定值和范围中不重复数值的个数。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '要检查其是否唯一的第一个值或范围。', - 'example': 'A1:C100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2', - 'detail': '[可选] - 要检查是否唯一的其他值或范围。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'DEGREES', - 't': 0, - 'd': '将以弧度表示的角度值转换为度。', - 'a': '将以弧度表示的角度值转换为度。', - 'm': [1, 1], - 'p': [{ - 'name': '角度', - 'detail': '要从弧度转换为度的角度。', - 'example': 'PI()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ERFC', - 't': 9, - 'd': '返回数值的互补高斯误差函数。', - 'a': '返回数值的互补高斯误差函数。', - 'm': [1, 1], - 'p': [{ - 'name': 'z', - 'detail': '要为其计算互补高斯误差函数的数值。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'EVEN', - 't': 0, - 'd': '将数值向上取整为最接近的偶整数。', - 'a': '将数值向上取整为最接近的偶整数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要向上取整的数值,取整值为大于此值的最接近的偶数。\n\n如果值为负数,则将其取整为绝对值大于该值的相邻负偶数。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'EXP', - 't': 0, - 'd': '返回欧拉数 e (~2.718) 的指定次幂。', - 'a': '返回欧拉数 e (~2.718) 的指定次幂。', - 'm': [1, 1], - 'p': [{ - 'name': '指数', - 'detail': '指定e的自乘幂次值。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FACT', - 't': 0, - 'd': '返回数值的阶乘。', - 'a': '返回数值的阶乘。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算并返回其阶乘的数字或对数字(所在单元格)的引用。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FACTDOUBLE', - 't': 0, - 'd': '返回数值的“双阶乘”。', - 'a': '返回数值的“双阶乘”。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算并返回其双阶乘的数字或对数字(所在单元格)的引用。', - 'example': '6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PI', - 't': 0, - 'd': '返回带有14位小数的 PI 值。', - 'a': '返回带有14位小数的 PI 值。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'FLOOR', - 't': 0, - 'd': '将数值向下取整为指定因数的最接近的整数倍。', - 'a': '将数值向下取整为指定因数的最接近的整数倍。', - 'm': [2, 2], - 'p': [{ - 'name': '值', - 'detail': '要向下舍入为因数的最接近整数倍的数值。', - 'example': '23.25', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '因数', - 'detail': '要将值舍入到此数的整数倍。\n\n因数不得为0。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'GCD', - 't': 0, - 'd': '返回一个或多个整数的最大公约数。', - 'a': '返回一个或多个整数的最大公约数。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '要在查找最大公约数的计算中检查其因数的第一项数值或范围。', - 'example': 'A2:A5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2', - 'detail': '[可选] - 在求最大公约数时要考虑其因数的其他数值或范围。', - 'example': '96', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'RANDBETWEEN', - 't': 0, - 'd': '返回介于两个整数之间(包括这两个整数)的随机数。', - 'a': '返回介于两个整数之间(包括这两个整数)的随机数。', - 'm': [2, 2], - 'p': [{ - 'name': '下界', - 'detail': '随机值范围的下界。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '上界', - 'detail': '随机值范围的上界。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ROUND', - 't': 0, - 'd': '将数字四舍五入到指定的位数。', - 'a': '将数字四舍五入到指定的位数。', - 'm': [2, 2], - 'p': [{ - 'name': '值', - 'detail': '要四舍五入的数字。', - 'example': '99.44', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '位数', - 'detail': '要进行四舍五入运算的位数。\n\n位数可以取负值,在这种情况下会将值的小数点左侧部分舍入到指定的位数。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ROUNDDOWN', - 't': 0, - 'd': '朝着零的方向将数字进行向下舍入。', - 'a': '朝着零的方向将数字进行向下舍入。', - 'm': [2, 2], - 'p': [{ - 'name': '值', - 'detail': '需要向下舍入的任意实数。', - 'example': '99.44', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '位数', - 'detail': '要通过舍入达到的小数位数。\n\n位数可以取负值,在这种情况下会将值的小数点左侧部分舍入到指定的位数。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ROUNDUP', - 't': 0, - 'd': '朝着远离 0(零)的方向将数字进行向上舍入。', - 'a': '朝着远离 0(零)的方向将数字进行向上舍入。', - 'm': [2, 2], - 'p': [{ - 'name': '值', - 'detail': '要将其舍入为位数位数字的值,始终向上舍入。', - 'example': '99.44', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '位数', - 'detail': '要通过舍入达到的小数位数。\n\n位数可以取负值,在这种情况下会将值的小数点左侧部分舍入到指定的位数。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SERIESSUM', - 't': 0, - 'd': '给定参数 x、n、m 和 a,返回幂级数的和 a1xn + a2x(n+m) + ... + aix(n+(i-1)m),其中 i 为范围 a 中的项数。', - 'a': '给定参数 x、n、m 和 a', - 'm': [4, 4], - 'p': [{ - 'name': 'x', - 'detail': '幂级数的输入值。随相应的近似类型而变,有可能为角度、指数或其他一些值。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'n', - 'detail': '在幂级数中x的初始自乘幂次。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'm', - 'detail': 'x的幂次中的附加增量。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'a', - 'detail': '包含幂级数系数的数组或范围。', - 'example': '{FACT(0)', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SIGN', - 't': 0, - 'd': '给定输入数值,如果为负返回-1;如果为正返回1;如果为零则返回0。', - 'a': '给定输入数值', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要返回其符号的数值。', - 'example': '-42', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SIN', - 't': 0, - 'd': '给定角度(以弧度表示),返回其正弦值。', - 'a': '给定角度(以弧度表示)', - 'm': [1, 1], - 'p': [{ - 'name': '角度', - 'detail': '要返回其正弦值的角度,以弧度表示。', - 'example': 'PI()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SINH', - 't': 0, - 'd': '返回给定实数的双曲正弦值。', - 'a': '返回给定实数的双曲正弦值。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其双曲正弦值的实数值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SQRT', - 't': 0, - 'd': '返回一个正数的正平方根。', - 'a': '返回一个正数的正平方根。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要计算其正平方根的数值。\n\n值必须为正数;如果为负,SQRT 将返回 #NUM! 错误。', - 'example': '9', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SQRTPI', - 't': 0, - 'd': '返回 PI 与给定正数乘积的正平方根。', - 'a': '返回 PI 与给定正数乘积的正平方根。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '要将其与 PI 相乘并返回该乘积的平方根的数值\n\n值必须为正数;如果为负数,SQRTPI 将返回 #NUM! 错误。', - 'example': '9', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'GAMMALN', - 't': 1, - 'd': '返回指定伽玛函数的以 e(欧拉数)为底的对数。', - 'a': '返回指定伽玛函数的以 e(欧拉数)为底的对数。', - 'm': [1, 1], - 'p': [{ - 'name': '值', - 'detail': '伽玛函数的输入值。返回的将是伽玛 (值) 的自然对数。\n\n值必须为正数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COS', - 't': 0, - 'd': '返回给定角度的余弦值(角度以弧度表示)。', - 'a': '返回给定角度的余弦值(角度以弧度表示)。', - 'm': [1, 1], - 'p': [{ - 'name': '角度', - 'detail': '要取其余弦值的角度,以弧度表示。', - 'example': 'PI()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TRUNC', - 't': 0, - 'd': '截除指定有效位之外的部分,取数据的指定有效位。', - 'a': '截除指定有效位之外的部分', - 'm': [1, 2], - 'p': [{ - 'name': '值', - 'detail': '要截取的数据。', - 'example': '3.141592654', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '位数', - 'detail': '[可选 - 默认值为0] - 小数点右侧要保留的有效位数。\n\n如果位数大于值中的有效位数,则将“值”原样返回。\n\n位数可以取负值,在这种情况下会将小数点左侧指定位数的值更改为零。小数点右侧的所有位数都会被舍弃。如果值的所有位都被更改为零,则TRUNC会返回0。', - 'example': '2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'QUOTIENT', - 't': 0, - 'd': '返回以一个数除以另一个数所得的结果,不包含余数。', - 'a': '返回以一个数除以另一个数所得的结果', - 'm': [2, 2], - 'p': [{ - 'name': '被除数', - 'detail': '要被除的数值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '除数', - 'detail': '用于除其他数的数值。\n\n除数不得为0。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'POWER', - 't': 0, - 'd': '返回数值的指定次幂。', - 'a': '返回数值的指定次幂。', - 'm': [2, 2], - 'p': [{ - 'name': '底数', - 'detail': '要计算其指数次幂的数值。\n\n如果底数为负,则指数必须为整数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '指数', - 'detail': '指定底数的自乘幂次值。', - 'example': '0.5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUMIFS', - 't': 0, - 'd': '根据多项条件返回范围之和。', - 'a': '根据多项条件返回范围之和。', - 'm': [3, 257], - 'p': [{ - 'name': '求和范围', - 'detail': '要对其求和的范围。', - 'example': 'A1:A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '条件范围1', - 'detail': '要在哪个范围内检查条件1。', - 'example': ' B1:B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '条件1', - 'detail': '要应用于条件范围1的模式或测试条件。', - 'example': ' ">20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '条件范围2, 条件2...', - 'detail': '[ 可选 ] - 要检查的其他范围和条件。', - 'example': ' C1:C10', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'COUNTIFS', - 't': 1, - 'd': '根据多项条件返回范围中的单元格数量。', - 'a': '根据多项条件返回范围中的单元格数量。', - 'm': [2, 256], - 'p': [{ - 'name': '条件范围1', - 'detail': '要在哪个范围内检查条件1。', - 'example': 'A1:A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '条件1', - 'detail': '要应用于条件范围1的模式或测试条件。', - 'example': ' ">20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '条件范围2, 条件2...', - 'detail': '[ 可选 ] - 要检查的其他范围和条件,可重复。', - 'example': ' B1:B10', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'PRODUCT', - 't': 0, - 'd': '返回将一组数相乘所得的结果。', - 'a': '返回将一组数相乘所得的结果。', - 'm': [1, 255], - 'p': [{ - 'name': '乘数1', - 'detail': '用于计算乘积的第一个数值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '乘数2 ... 乘数30', - 'detail': '[可选] - 要相乘的其他数值。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'HARMEAN', - 't': 1, - 'd': '计算数据集的调和平均值。', - 'a': '计算数据集的调和平均值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他数值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'HYPGEOMDIST', - 't': 1, - 'd': '返回超几何分布。 如果已知样本量、总体成功次数和总体大小,则 HYPGEOM.DIST 返回样本取得已知成功次数的概率。', - 'a': '返回超几何分布。', - 'm': [5, 5], - 'p': [{ - 'name': 'Sample_s', - 'detail': '样本中成功的次数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'Number_sample', - 'detail': '样本量。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'Population_s', - 'detail': '总体中成功的次数。', - 'example': '20', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'Number_pop', - 'detail': '总体大小。', - 'example': '40', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '决定函数形式的逻辑值。\n\n如果 cumulative 为 TRUE(),则 HYPGEOM.DIST 返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', - 'example': 'TRUE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'INTERCEPT', - 't': 1, - 'd': '计算数据集的线性回归方程直线与 Y 轴的相交点 (x=0) 的 y 值。', - 'a': '计算数据集的线性回归方程直线与 Y 轴的相交点 (x=0) 的 y 值。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'KURT', - 't': 1, - 'd': '计算数据集的峭度,该指标指示数据集(分布)的形态,尤其是该形态的陡峭程度。', - 'a': '计算数据集的峭度', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '数据集中的第一个值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'LARGE', - 't': 1, - 'd': '返回数据集中第 n 个最大元素,n 由用户指定。', - 'a': '返回数据集中第 n 个最大元素', - 'm': [2, 2], - 'p': [{ - 'name': '数据', - 'detail': '包含相关数据集的数组或范围。', - 'example': 'A2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'n', - 'detail': '要返回的元素的排行位置(从大到小顺序)。\n\n例如,将n设为4将使LARGE返回数据中排名第4的最大元素。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'STDEVA', - 't': 1, - 'd': '基于样本计算标准偏差,将文本取值为0。', - 'a': '基于样本计算标准偏差', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2,…', - 'detail': '[可选] - 样本中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'STDEVP', - 't': 1, - 'd': '基于样本总体计算标准偏差。', - 'a': '基于样本总体计算标准偏差。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '数据集中的第一个值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'GEOMEAN', - 't': 1, - 'd': '计算数据集的几何平均值。', - 'a': '计算数据集的几何平均值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他数值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'RANK_EQ', - 't': 1, - 'd': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回其中的最高排名。', - 'a': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回其中的最高排名。', - 'm': [2, 3], - 'p': [{ - 'name': 'number', - 'detail': '要确定其排名的值。', - 'example': 'A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'ref', - 'detail': '包含相关数据集的数组或范围。', - 'example': 'A1:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'order', - 'detail': '[可选 - 默认为按降序 (FALSE()) ] - 要按升序还是按降序考虑“data”中的值。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'RANK_AVG', - 't': 1, - 'd': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回这些项排名的平均值。', - 'a': '返回指定值在数据集中的排名。如果相同的值在数据集中存在多项,则返回这些项排名的平均值。', - 'm': [2, 3], - 'p': [{ - 'name': 'number', - 'detail': '要确定其排名的值。', - 'example': 'A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'ref', - 'detail': '包含相关数据集的数组或范围。', - 'example': 'A1:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'order', - 'detail': '[可选 - 默认为按降序 (FALSE()) ] - 要按升序还是按降序考虑“data”中的值。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'PERCENTRANK_EXC', - 't': 1, - 'd': '以百分数形式返回指定值在给定数据集中的百分比排名(介于0和1之间,不包括两端值)。', - 'a': '以百分数形式返回指定值在给定数据集中的百分比排名(介于0和1之间,不包括两端值)。', - 'm': [2, 3], - 'p': [{ - 'name': 'data', - 'detail': '包含相关数据集的数组或范围。', - 'example': 'A1:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'x', - 'detail': '要确定其百分比排位的值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'significance', - 'detail': '[可选 - 默认值为 3] - 要在计算中使用的有效位数。', - 'example': '4', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PERCENTRANK_INC', - 't': 1, - 'd': '以百分比形式返回指定值在给定数据集中的百分比排名(介于0和1之间,包括两端值)。', - 'a': '以百分比形式返回指定值在给定数据集中的百分比排名(介于0和1之间,包括两端值)。', - 'm': [2, 3], - 'p': [{ - 'name': 'data', - 'detail': '包含相关数据集的数组或范围。', - 'example': 'A1:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'x', - 'detail': '要确定其百分比排位的值。', - 'example': ' A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'significance', - 'detail': '[可选 - 默认值为 3] - 要在计算中使用的有效位数。', - 'example': '4', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FORECAST', - 't': 1, - 'd': '基于数据集的线性回归,计算指定 x 的预期 y 值。', - 'a': '基于数据集的线性回归', - 'm': [3, 3], - 'p': [{ - 'name': 'x', - 'detail': 'x轴上用于预测的值。', - 'example': 'A1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FISHERINV', - 't': 1, - 'd': '返回指定数值的 Fisher 逆变换。', - 'a': '返回指定数值的 Fisher 逆变换。', - 'm': [1, 1], - 'p': [{ - 'name': 'y', - 'detail': '要计算其Fisher逆变换的数值。', - 'example': '0.962', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FISHER', - 't': 1, - 'd': '返回指定数值的 Fisher 变换。', - 'a': '返回指定数值的 Fisher 变换。', - 'm': [1, 1], - 'p': [{ - 'name': 'x', - 'detail': '要计算其Fisher变换的数值。', - 'example': '0.962', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MODE_SNGL', - 't': 1, - 'd': '返回数据集中出现次数最多的值。', - 'a': '返回数据集中出现次数最多的值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算模式时要检查的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 在计算模式时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'WEIBULL_DIST', - 't': 1, - 'd': '给定形状和尺度,返回韦伯分布函数(或韦伯累积分布函数)的值。', - 'a': '给定形状和尺度', - 'm': [4, 4], - 'p': [{ - 'name': 'x', - 'detail': 'WEIBULL 分布函数的输入值。', - 'example': '2.4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'alpha', - 'detail': 'Weibull 分布函数的形状参数。\n\nalpha 值必须大于 0。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'beta', - 'detail': 'Weibull 分布函数的尺度参数。\n\nbeta 值必须大于 0。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': 'TRUE() 表示使用累积分布函数,FALSE() 则表示使用概率密度函数。', - 'example': 'TRUE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'COUNT', - 't': 1, - 'd': '返回数据集中数值的个数。', - 'a': '返回数据集中数值的个数。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计数时要检查的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 在计数时要检查的其他值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'COUNTA', - 't': 1, - 'd': '返回数据集中值的数量。', - 'a': '返回数据集中值的数量。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计数时要检查的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 在计数时要检查的其他值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'AVEDEV', - 't': 1, - 'd': '计算数据与数据集均值之间的偏差大小的平均值。', - 'a': '计算数据与数据集均值之间的偏差大小的平均值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 样本中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'AVERAGE', - 't': 1, - 'd': '返回数据集的算术平均值,对文本忽略不计。', - 'a': '返回数据集的算术平均值', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算平均值时用到的第一个数值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 在计算平均值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'AVERAGEA', - 't': 1, - 'd': '返回数据集的算术平均值。', - 'a': '返回数据集的算术平均值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算平均值时用到的第一个数值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 在计算平均值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'BINOM_DIST', - 't': 1, - 'd': '返回一元二项式分布的概率。', - 'a': '返回一元二项式分布的概率。', - 'm': [4, 4], - 'p': [{ - 'name': 'number_s', - 'detail': '试验的成功次数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'trials', - 'detail': '独立检验的次数。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'probability_s', - 'detail': '任一给定检验的成功概率。', - 'example': '0.005', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '是否使用二项式累积分布。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'BINOM_INV', - 't': 1, - 'd': '计算累积二项式分布大于或等于指定条件的最小值。', - 'a': '计算累积二项式分布大于或等于指定条件的最小值。', - 'm': [3, 3], - 'p': [{ - 'name': 'trials', - 'detail': '贝努利试验次数。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'probability_s', - 'detail': '任一次给定检验的成功概率。', - 'example': '0.005', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'alpha', - 'detail': '期望的临界概率。', - 'example': '0.8', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CONFIDENCE_NORM', - 't': 1, - 'd': '计算正态分布的置信区间的一半宽度。', - 'a': '计算正态分布的置信区间的一半宽度。', - 'm': [3, 3], - 'p': [{ - 'name': 'alpha', - 'detail': '用来计算置信水平的显著性水平。\n\n置信水平等于 100*(1 - alpha)%,亦即,如果 alpha 为 0.05,则置信水平为 95%。', - 'example': '0.05', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'standard_dev', - 'detail': '数据区域的总体标准偏差。', - 'example': '1.6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'size', - 'detail': '样本总量的大小。', - 'example': '250', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CORREL', - 't': 1, - 'd': '计算给定数据集的皮尔逊积矩相关系数 r。', - 'a': '计算给定数据集的皮尔逊积矩相关系数 r。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COVARIANCE_P', - 't': 1, - 'd': '计算数据集的总体协方差。', - 'a': '计算数据集的总体协方差。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COVARIANCE_S', - 't': 1, - 'd': '计算数据集的样本协方差。', - 'a': '计算数据集的样本协方差。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DEVSQ', - 't': 1, - 'd': '基于样本计算其偏差的平方和。', - 'a': '基于样本计算其偏差的平方和。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 样本中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'EXPON_DIST', - 't': 1, - 'd': '返回带有指定 Lambda 和指定值的指数分布函数的值。', - 'a': '返回带有指定 Lambda 和指定值的指数分布函数的值。', - 'm': [3, 3], - 'p': [{ - 'name': 'x', - 'detail': '指数分布函数的输入值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'lambda', - 'detail': '用于指定指数分布函数的 lambda 值。', - 'example': '0.5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '是否使用指数累积分布。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'AVERAGEIF', - 't': 1, - 'd': '根据条件返回范围的平均值。', - 'a': '根据条件返回范围的平均值。', - 'm': [2, 3], - 'p': [{ - 'name': 'criteria_range', - 'detail': '要对其检查 criterion 的范围。', - 'example': 'A1:A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criterion', - 'detail': '要应用于 criteria_range 的模式或测试条件。\n\n等于:"文本" 或 1 或 "=文本" 或 "=1"\n\n大于:">1"\n\n大于等于:">=1"\n\n小于:"<1"\n\n小于等于:"<=1"\n\n不等于:"<>1"或"<>文本"', - 'example': '">20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'average_range', - 'detail': '[可选] - 要计算平均值的范围。如果未提供此参数,则改用 criteria_range 来计算平均值。', - 'example': 'B1:B10', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'AVERAGEIFS', - 't': 1, - 'd': '根据多项条件返回范围的平均值。', - 'a': '根据多项条件返回范围的平均值。', - 'm': [2, 255], - 'p': [{ - 'name': 'average_range', - 'detail': '要计算平均值的范围。', - 'example': 'A1:A10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria_range1', - 'detail': '要对其检查 criterion1 的范围。', - 'example': ' B1:B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criterion1', - 'detail': '要应用于 criteria_range1 的模式或测试条件。', - 'example': ' ">20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria_range2, criterion2, ...', - 'detail': '[可选] - 要检查的其他范围和条件。', - 'example': ' C1:C10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'PERMUT', - 't': 1, - 'd': '返回可从数字对象中选择的给定数目对象的排列数。', - 'a': '返回可从数字对象中选择的给定数目对象的排列数。', - 'm': [2, 2], - 'p': [{ - 'name': 'number', - 'detail': '表示对象个数的整数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'number_chosen', - 'detail': '表示每个排列中对象个数的整数。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TRIMMEAN', - 't': 1, - 'd': '在排除数据集高低两端的部分数据之后计算所得的均值。', - 'a': '在排除数据集高低两端的部分数据之后计算所得的均值。', - 'm': [2, 2], - 'p': [{ - 'name': '数据', - 'detail': '包含相关数据集的数组或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': '排除比例', - 'detail': '要从数据集的极值部分排除的数据占数据集的比例。\n\n排除比例必须大于等于0且小于1。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PERCENTILE_EXC', - 't': 1, - 'd': '返回数组的 K 百分点值,K 介于 0 到 1 之间,不含 0 与 1。', - 'a': '返回数组的 K 百分点值,K 介于 0 到 1 之间,不含 0 与 1。', - 'm': [2, 2], - 'p': [{ - 'name': 'array', - 'detail': '定义相对位置的数组或数据区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'k', - 'detail': '0 到 1 之间的百分点值,不包含 0 和 1。', - 'example': '0.25', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PERCENTILE_INC', - 't': 1, - 'd': '返回数组的 K 百分点值,K 介于 0 到 1 之间,包含 0 与 1。', - 'a': '返回数组的 K 百分点值,K 介于 0 到 1 之间,包含 0 与 1。', - 'm': [2, 2], - 'p': [{ - 'name': 'array', - 'detail': '定义相对位置的数组或数据区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'k', - 'detail': '0 到 1 之间的百分点值,包含 0 和 1。', - 'example': '0.25', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PEARSON', - 't': 1, - 'd': '返回皮尔生(Pearson)乘积矩相关系数 r。', - 'a': '返回皮尔生(Pearson)乘积矩相关系数 r。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'NORM_S_INV', - 't': 1, - 'd': '返回标准正态累积分布函数的反函数值。 该分布的平均值为 0,标准偏差为 1。', - 'a': '返回标准正态累积分布函数的反函数值。 该分布的平均值为 0,标准偏差为 1。', - 'm': [1, 1], - 'p': [{ - 'name': 'probability', - 'detail': '对应于正态分布的概率。', - 'example': '0.75', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'NORM_S_DIST', - 't': 1, - 'd': '返回标准正态分布函数(该分布的平均值为 0,标准偏差为 1)。', - 'a': '返回标准正态分布函数(该分布的平均值为 0,标准偏差为 1)。', - 'm': [2, 2], - 'p': [{ - 'name': 'z', - 'detail': '需要计算其分布的数值。', - 'example': '2.4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'NORM_INV', - 't': 1, - 'd': '返回指定平均值和标准偏差的正态累积分布函数的反函数值。', - 'a': '返回指定平均值和标准偏差的正态累积分布函数的反函数值。', - 'm': [3, 3], - 'p': [{ - 'name': 'probability', - 'detail': '对应于正态分布的概率。', - 'example': '0.75', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'mean', - 'detail': '分布的算术平均值。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'standard_dev', - 'detail': '分布的标准偏差。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'NORM_DIST', - 't': 1, - 'd': '返回指定平均值和标准偏差的正态分布函数。', - 'a': '返回指定平均值和标准偏差的正态分布函数。', - 'm': [4, 4], - 'p': [{ - 'name': 'x', - 'detail': '需要计算其分布的数值。', - 'example': '2.4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'mean', - 'detail': '分布的算术平均值。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'standard_dev', - 'detail': '分布的标准偏差。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'NEGBINOM_DIST', - 't': 1, - 'd': '返回负二项式分布。', - 'a': '返回负二项式分布。', - 'm': [4, 4], - 'p': [{ - 'name': 'number_f', - 'detail': '要模拟的失败次数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'number_s', - 'detail': '要模拟的成功次数。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'probability_s', - 'detail': '任一次给定检验的成功概率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'MINA', - 't': 1, - 'd': '返回数据集中的最小数值。', - 'a': '返回数据集中的最小数值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算最小值时所用的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2', - 'detail': '[可选] - 在计算最小值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'MIN', - 't': 1, - 'd': '返回数值数据集中的最小值。', - 'a': '返回数值数据集中的最小值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算最小值时所用的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2', - 'detail': '[可选] - 在计算最小值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'MEDIAN', - 't': 1, - 'd': '返回数值数据集中的中值。', - 'a': '返回数值数据集中的中值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算中值时所用的第一个数值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2', - 'detail': '[可选] - 在计算中值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'MAXA', - 't': 1, - 'd': '返回数据集中的最大数值。', - 'a': '返回数据集中的最大数值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算最大值时所用的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 在计算最大值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'MAX', - 't': 1, - 'd': '返回数值数据集中的最大值。', - 'a': '返回数值数据集中的最大值。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '计算最大值时所用的第一个值或范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2', - 'detail': '[可选] - 在计算最大值时要考虑的其他数值或范围。', - 'example': 'B2:B100', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'LOGNORM_INV', - 't': 1, - 'd': '返回 x 的对数累积分布函数的反函数值。', - 'a': '返回 x 的对数累积分布函数的反函数值。', - 'm': [3, 3], - 'p': [{ - 'name': 'probability', - 'detail': '与对数分布相关的概率,介于 0 与 1 之间(不含 0 与 1)。', - 'example': '0.4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'mean', - 'detail': 'ln(x) 的平均值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'standard_dev', - 'detail': 'ln(x) 的标准偏差,正数。', - 'example': '6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'LOGNORM_DIST', - 't': 1, - 'd': '返回 x 的对数分布函数。', - 'a': '返回 x 的对数分布函数。', - 'm': [4, 4], - 'p': [{ - 'name': 'x', - 'detail': '用来计算函数的值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'mean', - 'detail': 'ln(x) 的平均值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'standard_dev', - 'detail': 'ln(x) 的标准偏差,正数。', - 'example': '6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '决定函数形式的逻辑值。\n\n如果为 TRUE(),则返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'Z_TEST', - 't': 1, - 'd': '返回 z 检验的单尾 P 值。', - 'a': '返回 z 检验的单尾 P 值。', - 'm': [2, 3], - 'p': [{ - 'name': 'array', - 'detail': '用来检验 x 的数组或数据区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'x', - 'detail': '要测试的值。', - 'example': 'B2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'sigma', - 'detail': '[可选] - 总体(已知)标准偏差。 如果省略,则使用样本标准偏差。', - 'example': '3', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PROB', - 't': 1, - 'd': '返回区域中的数值落在指定区间内的概率。', - 'a': '返回区域中的数值落在指定区间内的概率。', - 'm': [3, 4], - 'p': [{ - 'name': 'x_range', - 'detail': '具有各自相应概率值的 x 数值区域。', - 'example': 'A3:A6', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'prob_range', - 'detail': '与 x_range 中的值相关联的一组概率值。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'lower_limit', - 'detail': '要计算其概率的数值下界。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'upper_limit', - 'detail': '[可选 - 默认值为下界] - 要计算其概率的可选数值上界。\n\n如果省略上界,PROB则计算随机选取相应值的次数恰好等于下界的概率。', - 'example': '4', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'QUARTILE_EXC', - 't': 1, - 'd': '基于 0 到 1 之间(不包括 0 和 1)的百分点值返回数据集的四分位数。', - 'a': '基于 0 到 1 之间(不包括 0 和 1)的百分点值返回数据集的四分位数。', - 'm': [2, 2], - 'p': [{ - 'name': 'array', - 'detail': '要求得四分位数值的数组或数字型单元格区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'quart', - 'detail': '要返回第几个四分位值。\n\n1返回数据中最靠近第一个四分位值的值(25%标记)。\n\n2返回数据中最接近中值的值(50%标记)。\n\n3返回数据中最接近第三个四分位值的值(75%标记)。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'QUARTILE_INC', - 't': 1, - 'd': '根据 0 到 1 之间的百分点值(包含 0 和 1)返回数据集的四分位数。', - 'a': '根据 0 到 1 之间的百分点值(包含 0 和 1)返回数据集的四分位数。', - 'm': [2, 2], - 'p': [{ - 'name': 'array', - 'detail': '要求得四分位数值的数组或数字型单元格区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'quart', - 'detail': '要返回第几个四分位值。\n\n0返回数据中的最小值(0%标记)。\n\n1返回数据中最靠近第一个四分位值的值(25%标记)。\n\n2返回数据中最接近中值的值(50%标记)。\n\n3返回数据中最接近第三个四分位值的值(75%标记)。\n\n4返回数据中的最大值(100%标记)。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'POISSON_DIST', - 't': 1, - 'd': '返回泊松分布。', - 'a': '返回泊松分布。', - 'm': [3, 3], - 'p': [{ - 'name': 'x', - 'detail': '事件数。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'mean', - 'detail': '期望值。非负数', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '一逻辑值,确定所返回的概率分布的形式。\n\n如果为 TRUE(),则返回发生的随机事件数在零(含零)和 x(含 x)之间的累积泊松概率;\n\n如果为 FALSE(),则返回发生的事件数正好是 x 的泊松概率密度函数。', - 'example': 'FALSE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'RSQ', - 't': 1, - 'd': '返回皮尔生(Pearson)乘积矩相关系数 r 的平方。', - 'a': '返回皮尔生(Pearson)乘积矩相关系数 r 的平方。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'T_DIST', - 't': 1, - 'd': '返回学生的左尾 t 分布。', - 'a': '返回学生的左尾 t 分布。', - 'm': [3, 3], - 'p': [{ - 'name': 'x', - 'detail': 'T-分布函数的输入。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom', - 'detail': '自由度数值。', - 'example': '30', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'tails', - 'detail': '决定函数形式的逻辑值。\n\n如果 cumulative 为 TRUE(),则 HYPGEOM.DIST 返回累积分布函数;\n\n如果为 FALSE(),则返回概率密度函数。', - 'example': 'TRUE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'T_DIST_2T', - 't': 1, - 'd': '返回学生的双尾 t 分布。', - 'a': '返回学生的双尾 t 分布。', - 'm': [2, 2], - 'p': [{ - 'name': 'x', - 'detail': 'T-分布函数的输入。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom', - 'detail': '自由度数值。', - 'example': '30', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'T_DIST_RT', - 't': 1, - 'd': '返回学生的右尾 t 分布。', - 'a': '返回学生的右尾 t 分布。', - 'm': [2, 2], - 'p': [{ - 'name': 'x', - 'detail': 'T-分布函数的输入。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom', - 'detail': '自由度数值。', - 'example': '30', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'T_INV', - 't': 1, - 'd': '返回学生的 t 分布的左尾反函数。', - 'a': '返回学生的 t 分布的左尾反函数。', - 'm': [2, 2], - 'p': [{ - 'name': 'probability', - 'detail': '与学生的 t 分布相关的概率。\n\n必须大于 0 且小于 1。', - 'example': '0.35', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'deg_freedom', - 'detail': '自由度数值。\n\n如果所提供的参数不是整数,将截取其整数部分。\n\n必须大于等于 1。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'T_INV_2T', - 't': 1, - 'd': '返回学生 t 分布的双尾反函数。', - 'a': '返回学生 t 分布的双尾反函数。', - 'm': [2, 2], - 'p': [{ - 'name': 'probability', - 'detail': '与学生的 t 分布相关的概率。\n\n必须大于 0 且小于1。', - 'example': '0.35', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'deg_freedom', - 'detail': '自由度数值。\n\n如果所提供的参数不是整数,将截取其整数部分。\n\n必须大于等于 1。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'T_TEST', - 't': 1, - 'd': '返回与t-检验相关的概率。用于判断两个样本是否可能是出自平均值相同的两个样本总体。', - 'a': '返回与t-检验相关的概率。用于判断两个样本是否可能是出自平均值相同的两个样本总体。', - 'm': [4, 4], - 'p': [{ - 'name': 'array1', - 'detail': '将用于 t 检验的第一个数据样本或第一组单元格。', - 'example': 'A1:A4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'array2', - 'detail': '将用于 t 检验的第二个数据样本或第二组单元格。', - 'example': 'B1:B4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'tails', - 'detail': '指定分布的尾数。\n\n如果为 1:使用单尾分布。\n\n如果为 2:使用双尾分布。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '指定 t 检验的类型。\n\n如果为 1:执行配对检验。\n\n如果为 2:执行双样本等方差(同方差)检验。\n\n如果为3:执行双样本不等方差(异方差)检验。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'F_DIST', - 't': 1, - 'd': '给定输入值 x,计算两个数据集的左尾 F 概率分布(差异程度)。此分布也称为 Fisher-Snedecor 分布或 Snedecor F 分布。', - 'a': '给定输入值 x', - 'm': [4, 4], - 'p': [{ - 'name': 'x', - 'detail': '用来计算函数的值。', - 'example': '15.35', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom1', - 'detail': '分子自由度。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom2', - 'detail': '分母自由度。', - 'example': '6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cumulative', - 'detail': '用于确定函数形式的逻辑值。默认值为 FALSE。\n\n如果为 TRUE():F.DIST 将返回累积分布函数值。\n\n如果为 FALSE():F.DIST 将返回概率密度函数值。', - 'example': 'TRUE()', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'F_DIST_RT', - 't': 1, - 'd': '给定输入x,计算两个数据集的右尾F概率分布(差异程度)。 此分布也称为Fisher-Snedecor分布或Snedecor F分布。', - 'a': '给定输入x', - 'm': [3, 3], - 'p': [{ - 'name': 'x', - 'detail': '用来计算函数的值。', - 'example': '15.35', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom1', - 'detail': '分子自由度。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'degrees_freedom2', - 'detail': '分母自由度。', - 'example': '6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'VAR_P', - 't': 1, - 'd': '基于样本总体计算方差。', - 'a': '基于样本总体计算方差。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '数据集中的第一个值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, …', - 'detail': '[可选] - 数据集中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'VAR_S', - 't': 1, - 'd': '基于样本计算方差。', - 'a': '基于样本计算方差。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, …', - 'detail': '[可选] - 样本中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'VARA', - 't': 1, - 'd': '基于样本计算方差,将文本取值为0。', - 'a': '基于样本计算方差', - 'm': [1, 255], - 'p': [{ - 'name': 'value1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value2, ...', - 'detail': '[可选] - 样本中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'VARPA', - 't': 1, - 'd': '基于样本总体计算方差,将文本取值为0。', - 'a': '基于样本总体计算方差', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '样本中的第一项值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他数值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'STEYX', - 't': 1, - 'd': '返回通过线性回归法预测每个 x 的 y 值时所产生的标准误差。', - 'a': '返回通过线性回归法预测每个 x 的 y 值时所产生的标准误差。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'STANDARDIZE', - 't': 1, - 'd': '给定分布的均值和标准偏差,计算一个随机变量正态化的相应值。', - 'a': '给定分布的均值和标准偏差,计算一个随机变量正态化的相应值。', - 'm': [3, 3], - 'p': [{ - 'name': 'x', - 'detail': '要正态化的随机变量值。', - 'example': '96', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'mean', - 'detail': '分布的均值。', - 'example': '80', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'standard_dev', - 'detail': '分布的标准偏差。', - 'example': '6.7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SMALL', - 't': 1, - 'd': '返回数据集中的第 k 个最小值。', - 'a': '返回数据集中的第 k 个最小值。', - 'm': [2, 2], - 'p': [{ - 'name': 'array', - 'detail': '需要找到第 k 个最小值的数组或数值数据区域。', - 'example': 'A2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'k', - 'detail': '要返回的数据在数组或数据区域里的位置(从小到大)。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SLOPE', - 't': 1, - 'd': '计算通过数据集的线性回归得到的直线的斜率。', - 'a': '计算通过数据集的线性回归得到的直线的斜率。', - 'm': [2, 2], - 'p': [{ - 'name': '数据_y', - 'detail': '代表因变量数据数组或矩阵的范围。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '数据_x', - 'detail': '代表自变量数据数组或矩阵的范围。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SKEW', - 't': 1, - 'd': '返回分布的偏斜度。 偏斜度表明分布相对于平均值的不对称程度。 正偏斜度表明分布的不对称尾部趋向于更多正值。 负偏斜度表明分布的不对称尾部趋向于更多负值。', - 'a': '返回分布的偏斜度。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '数据集中的第一个值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'SKEW_P', - 't': 1, - 'd': '返回基于样本总体的分布不对称度:表明分布相对于平均值的不对称程度。', - 'a': '返回基于样本总体的分布不对称度:表明分布相对于平均值的不对称程度。', - 'm': [1, 255], - 'p': [{ - 'name': '值1', - 'detail': '数据集中的第一个值或范围。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '值2, ...', - 'detail': '[可选] - 数据集中包含的其他值或范围。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'VLOOKUP', - 't': 2, - 'd': '纵向查找。在范围的第一列中自上而下搜索某个键值,并返回所找到的行中指定单元格的值。', - 'a': '纵向查找。在范围的第一列中自上而下搜索某个键值', - 'm': [3, 4], - 'p': [{ - 'name': '搜索键值', - 'detail': '要搜索的值,如 42、"Cats" 或 I24。', - 'example': '10003', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '范围', - 'detail': '要进行搜索的范围。VLOOKUP 将在该范围的第一列中搜索搜索键值中指定的键值。', - 'example': 'A2:B26', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '索引', - 'detail': '要返回的值的列索引,范围中的第一列编号为 1。\n\n如果索引不是介于 1 和范围中的列数之间,将返回 #VALUE! 。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '已排序', - 'detail': '[默认值为 TRUE() ] - 指示要搜索的列(指定范围的第一列)是否已排序。大多数情况下,建议设为 FALSE()。\n\n建议将已排序设为 FALSE。如果设为 FALSE,将返回完全匹配项。如果存在多个匹配值,将返回找到的第一个值对应的单元格的内容,如果找不到匹配值,则返回 #N/A。\n\n如果将已排序设为 TRUE 或省略,将返回(小于或等于搜索键值的)最接近的匹配项。如果搜索的列中所有的值均大于搜索键值,则返回 #N/A。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'HLOOKUP', - 't': 2, - 'd': '横向查找。在范围的第一行中搜索某个键值,并返回所找到的列中指定单元格的值。', - 'a': '横向查找。在范围的第一行中搜索某个键值', - 'm': [3, 4], - 'p': [{ - 'name': '搜索键值', - 'detail': '要搜索的值。例如,42、"Cats"或I24。', - 'example': '10003', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '范围', - 'detail': '要进行搜索的范围。将在该范围的第一行中搜索在搜索键值中指定的键值。', - 'example': 'A2:Z6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '索引', - 'detail': '要返回的值的行索引,范围中的第一行编号为1。\n\n如果索引不是介于1和范围中的行数之间,将返回#VALUE!。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '已排序', - 'detail': '[可选 - 默认值为TRUE()] - 指示要搜索的行(指定范围的第一行)是否已排序。\n\n如果将已排序设为TRUE或省略,将返回最接近的匹配值(小于或等于搜索键值)。如果在搜索的行中所有的值均大于搜索键值,则返回#N/A。\n\n如果将已排序设为TRUE或将其省略,而范围的首行并非处于已排序状态,则返回值可能会是错误的。\n\n如果将已排序设为FALSE,则仅返回完全匹配。如果存在多个匹配值,将返回与找到的第一个值对应的单元格的内容,如果找不到匹配值则返回#N/A。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LOOKUP', - 't': 2, - 'd': '在行或列中查找相应键,并将相应单元格的值返回到与搜索行或列所在位置相同的结果范围中。', - 'a': '在行或列中查找相应键', - 'm': [2, 3], - 'p': [{ - 'name': '搜索键值', - 'detail': '要在行或列中搜索的值。例如,42、"Cats" 或 I24。', - 'example': '10003', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '搜索范围 | 搜索结果数组', - 'detail': '使用 LOOKUP 的一种方法是给定单行或单列形式的搜索范围进行搜索查找,这种方式要用到另一个参数结果范围。另一种方式是将这两个参数合并为一个搜索结果数组,其中第一行或第一列用于搜索,并将返回值放在该数组的最后一行或最后一列中。', - 'example': 'A1:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '结果范围', - 'detail': '[ 可选 ] - 用于存放返回结果的范围。返回值对应于在搜索范围中找到搜索键值的位置。此范围必须仅为单行或单列,而如果您使用的是搜索结果数组方式,则不应提供此参数。', - 'example': 'B1:B100', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ADDRESS', - 't': 2, - 'd': '返回字符串形式的单元格引用。', - 'a': '返回字符串形式的单元格引用。', - 'm': [2, 5], - 'p': [{ - 'name': 'row_num', - 'detail': '一个数值,指定要在单元格引用中使用的行号。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'column_num', - 'detail': '一个数值,指定要在单元格引用中使用的列号(而非名称)。A列的编号为1。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'abs_num', - 'detail': '[可选 - 默认值为1] - 一个数值,指定要返回的引用类型。\n\n1 表示行列均采用绝对值(例如$A$1);\n\n2 表示采用绝对行号,相对列标(例如A$1);\n\n3 表示采用相对行号,绝对列标(例如$A1);\n\n4 表示行列均采用相对值(例如A1)。', - 'example': '4', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'A1', - 'detail': '[可选 - 默认值为TRUE()] - 一个布尔值,指示采用A1标记形式(TRUE)还是R1C1标记形式(FALSE)。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'sheet_text', - 'detail': '[可选 - 默认缺省] - 用于指定地址所指向的工作表名称。', - 'example': '"Sheet2"', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'INDIRECT', - 't': 2, - 'd': '返回以字符串指定的单元格引用。', - 'a': '返回以字符串指定的单元格引用。', - 'm': [1, 2], - 'p': [{ - 'name': 'ref_text', - 'detail': '以带引号的字符串形式提供的单元格引用。', - 'example': '"Sheet2!"&B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'A1', - 'detail': '[可选 - 默认值为TRUE()] - 一个布尔值,指示采用A1标记形式(TRUE)还是R1C1标记形式(FALSE)。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ROW', - 't': 2, - 'd': '返回指定单元格的行号', - 'a': '返回指定单元格的行号', - 'm': [0, 1], - 'p': [{ - 'name': 'reference', - 'detail': '[可选 - 默认为此公式所在的单元格] - 要返回其行号的单元格。\n\n如果单元格引用指向的范围其宽度大于一个单元格,而此公式不是用作数组公式的,这时会仅返回单元格引用中首行的编号值。', - 'example': 'A9', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ROWS', - 't': 2, - 'd': '返回指定数组或范围中的行数。', - 'a': '返回指定数组或范围中的行数。', - 'm': [1, 1], - 'p': [{ - 'name': 'array', - 'detail': '要返回其行数的范围。', - 'example': 'A9:A62', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COLUMN', - 't': 2, - 'd': '按照 `A=1` 的规则返回指定单元格的列号。', - 'a': '按照 `A=1` 的规则返回指定单元格的列号。', - 'm': [0, 1], - 'p': [{ - 'name': 'reference', - 'detail': '[可选 - 默认为包含此公式的单元格] - 要返回其列号的单元格。A列对应的编号为1。\n\n如果单元格引用是宽度超过一个单元格的范围,而此公式不是作为数组公式来使用的,因此将返回单元格引用中的第一列的位置。', - 'example': 'A9', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'COLUMNS', - 't': 2, - 'd': '返回指定数组或范围中的列数。', - 'a': '返回指定数组或范围中的列数。', - 'm': [1, 1], - 'p': [{ - 'name': 'array', - 'detail': '要返回其列数的范围。', - 'example': 'A9:W62', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'OFFSET', - 't': 2, - 'd': '给定某范围的起始单元格引用以及该范围涵盖的行列数量,返回该范围的引用。', - 'a': '给定某范围的起始单元格引用以及该范围涵盖的行列数量,返回该范围的引用。', - 'm': [3, 5], - 'p': [{ - 'name': 'reference', - 'detail': '用于计算行列偏移量的起点。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'rows', - 'detail': '要偏移的行数。\n\n行偏移量必须是整数,但也可以是负数。如果提供的参数带有小数,小数部分将被截去。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'cols', - 'detail': '要偏移的列数。\n\n列偏移量必须是整数,但也可以是负数。如果提供的参数带有小数,小数部分将被截去。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'height', - 'detail': '[可选] - 要从偏移目标开始返回的范围的高度。', - 'example': '2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'width', - 'detail': '[可选] - 要从偏移目标开始返回的范围的宽度。', - 'example': '2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MATCH', - 't': 2, - 'd': '在单元格中搜索指定项,然后返回该项在单元格区域中的相对位置。', - 'a': '在单元格中搜索指定项,然后返回该项在单元格区域中的相对位置。', - 'm': [2, 3], - 'p': [{ - 'name': 'lookup_value', - 'detail': '要在 lookup_array 中匹配的值。', - 'example': '"Sunday"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'lookup_array', - 'detail': '要搜索的单元格区域。\n\n如果所用的范围的高度和宽度均大于1,MATCH将返回#N/A!。', - 'example': 'A2:A9', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'match_type', - 'detail': '[可选 - 默认值为1] - 要采用的搜索方式。\n\n1为默认类型,此时MATCH会假设范围已按升序排序,并返回小于等于搜索键值的最大值。\n\n0表示完全匹配,在范围未排序的情况下需要使用此方式。\n\n-1让MATCH假设范围是按降序排序的,并返回大于等于搜索键值的最小值。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'INDEX', - 't': 2, - 'd': '返回表格或中的元素值,此元素由行号和列号的索引值给定。', - 'a': '返回表格或中的元素值,此元素由行号和列号的索引值给定。', - 'm': [3, 3], - 'p': [{ - 'name': 'array', - 'detail': '单元格区域或数组常量。', - 'example': 'A1:C20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'row_num', - 'detail': '选择数组中的某行,函数从该行返回数值。', - 'example': '5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'column_num', - 'detail': '选择数组中的某列,函数从该列返回数值。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'GETPIVOTDATA', - 't': 2, - 'd': '从与指定行和列标题对应的数据透视表中提取汇总值。', - 'a': '从与指定行和列标题对应的数据透视表中提取汇总值。', - 'm': [2, 254], - 'p': [{ - 'name': 'data_field', - 'detail': '您想从数据透视表中获取其数据的值名称。\n值名称必须括在引号中或是指向包含相关文本的任何单元格的引用。\n如果有多个值字段,则必须使用数据透视表中显示的确切名称(如“销售总额”)。', - 'example': '"SUM of number of units"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'pivot_table', - 'detail': '目标数据透视表中的任何单元格的引用(推荐位于顶角的单元格)。', - 'example': "'Pivot table'!A1", - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'field1', - 'detail': '[可选] - 源数据集(不是数据透视表)中列的名称。', - 'example': '"division"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }, { - 'name': 'item1', - 'detail': '[可选] - 数据透视表中显示的与您要检索的字段名称 1 相对应的行或列的名称。', - 'example': '"east"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'CHOOSE', - 't': 2, - 'd': '基于索引返回选项列表中的元素。', - 'a': '基于索引返回选项列表中的元素。', - 'm': [2, 255], - 'p': [{ - 'name': 'index_num', - 'detail': '指定要返回哪一项。\n\n如果索引为零、负值或大于提供的选择数量,将返回#VALUE!错误。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value1', - 'detail': '一项可能的返回值。必须提供。可以是单元格引用或单独的值。', - 'example': '"A"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '[可选] - 其他可以选择的值。选择', - 'example': '"B"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'HYPERLINK', - 't': 2, - 'd': '在单元格内创建一个超链接。', - 'a': '在单元格内创建一个超链接。', - 'p': [{ - 'name': '网址', - 'detail': '以引号括住的链接位置的完整网址,或对包含这种网址的单元格的引用。\n\n仅允许某些链接类型。其中包括:http://、https://、mailto:、aim:、ftp://、gopher://、telnet://和news://,明确禁用使用其他协议。如果指定的是其他协议,将会在单元格中显示链接标签,但该标签不会以链接形式呈现。\n\n如果未指定协议,则假设使用http://,并将其作为网址的前缀。', - 'example': '"http://www.google.com/"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '链接标签', - 'detail': '[可选 - 默认为网址] - 要在单元格中作为链接显示的文本(用引号括起来的),或者指向包含这种标签的单元格的引用。\n\n如果链接标签是指向某个空单元格的引用,如果网址有效,就将其作为链接显示,否则作为纯文本显示。\n\n如果链接标签为空字符串常量(""),所在单元格显示的内容将为空白,但通过点击该单元格或转入该单元格仍然可以访问链接。', - 'example': '"Google"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TIME', - 't': 6, - 'd': '将给定的小时、分钟和秒转换为时间。', - 'a': '将给定的小时、分钟和秒转换为时间。', - 'm': [3, 3], - 'p': [{ - 'name': '小时', - 'detail': '0(零)到 32767 之间的数字,代表小时。\n\n任何大于 23 的值都会除以 24,余数将作为小时值。', - 'example': '11', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '分钟', - 'detail': '0(零)到 32767 之间的数字,代表分钟。\n\n任何大于 59 的值将转换为小时和分钟。', - 'example': '40', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': '秒', - 'detail': '0(零)到 32767 之间的数字,代表秒。\n\n任何大于 59 的值将转换为小时、分钟和秒。', - 'example': '59', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TIMEVALUE', - 't': 6, - 'd': '按一天24小时返回该时间的分数表示。', - 'a': '按一天24小时返回该时间的分数表示。', - 'm': [1, 1], - 'p': [{ - 'name': 'time_text', - 'detail': '用于表示时间的字符串。', - 'example': '"2:15 PM"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'EOMONTH', - 't': 6, - 'd': '返回某个月份最后一天的序列号,该月份在另一个日期之前或之后的数个月(月数由参数指定)。', - 'a': '返回某个月份最后一天的序列号', - 'm': [2, 2], - 'p': [{ - 'name': 'start_date', - 'detail': '用于计算结果的参照日期。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'months', - 'detail': '用于计算的起始日期之前(负)或之后(正)的月数。返回的是计算所得月份的最后那天。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'EDATE', - 't': 6, - 'd': '返回表示某个日期的序列号,该日期在另一个日期的数月之前/之后。', - 'a': '返回表示某个日期的序列号', - 'm': [2, 2], - 'p': [{ - 'name': 'start_date', - 'detail': '用于计算结果的参照日期。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'months', - 'detail': '用于计算的起始日期之前(负)或之后(正)的月数。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SECOND', - 't': 6, - 'd': '返回时间值的秒数。 秒数是 0(零)到 59 范围内的整数。', - 'a': '返回时间值的秒数。 秒数是 0(零)到 59 范围内的整数。', - 'm': [1, 1], - 'p': [{ - 'name': '时间', - 'detail': '用于计算秒钟部分的时间。必须为以下值之一:指向包含日期/时间值的单元格的引用、返回日期/时间的函数或者数字。', - 'example': 'TIME(11', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'MINUTE', - 't': 6, - 'd': '以数字格式返回特定时间的分钟部分。', - 'a': '以数字格式返回特定时间的分钟部分。', - 'm': [1, 1], - 'p': [{ - 'name': '时间', - 'detail': '用于计算分钟部分的时间。必须为以下值之一:指向包含日期/时间值的单元格的引用、返回日期/时间的函数或者数字。', - 'example': 'TIME(11', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'HOUR', - 't': 6, - 'd': '以数字格式返回特定时间的小时部分。', - 'a': '以数字格式返回特定时间的小时部分。', - 'm': [1, 1], - 'p': [{ - 'name': '时间', - 'detail': '用于计算小时部分的时间。必须为以下值之一:指向包含日期/时间值的单元格的引用、返回日期/时间的函数或者数字。', - 'example': 'TIME(11', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'NOW', - 't': 6, - 'd': '以日期值格式返回当前日期和时间。', - 'a': '以日期值格式返回当前日期和时间。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'NETWORKDAYS', - 't': 6, - 'd': '返回所提供的两个日期之间的净工作日天数。', - 'a': '返回所提供的两个日期之间的净工作日天数。', - 'm': [2, 3], - 'p': [{ - 'name': 'start_date', - 'detail': '用于计算净工作日天数的时间段开始日期。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'end_date', - 'detail': '用于计算净工作日天数的时间段结束日期。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'holidays', - 'detail': '[可选] - 一个范围或数组常量,其中包含作为节假日的日期序号。\n\n在节假日数组中提供的值必须是日期序号值(例如由N所返回的值)或日期值(例如由DATE、DATEVALUE或TO_DATE返回的值)。由范围指定的值应该是标准的日期值或日期序数值。', - 'example': '16)', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'NETWORKDAYS_INTL', - 't': 6, - 'd': '返回给定的两个日期之间的净工作日天数(排除指定的周末和节假日)。', - 'a': '返回给定的两个日期之间的净工作日天数(排除指定的周末和节假日)。', - 'm': [2, 4], - 'p': [{ - 'name': 'start_date', - 'detail': '用于计算净工作日天数的时间段开始日期。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'end_date', - 'detail': '用于计算净工作日天数的时间段结束日期。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'weekend', - 'detail': '[可选 - 默认值为1] - 用于表示哪些天为周末的数字或字符串。\n字符串方式:可以使用由0和1组成的字符串来指定周末,串中的第一个数字字符代表周一,最后一个则代表周日。零表示这一天是工作日,1表示这一天为周末。例如,“0000011”表示将周六和周日作为周末。\n数字方式:这种方式不使用上述字符串形式,而是使用一个数字。1 =周六/周日为周末,2 =周日/周一为周末,依此类推则7 =周五/周六。11 =周日为唯一周末,12 =周一为唯一周末,依此类推则17 =周六为唯一周末。', - 'example': '16)', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'holidays', - 'detail': '[ 可选 ] - 这是一个范围或数组常量,其中包含作为节假日的日期。\n在节假日数组内提供的值必须为日期序数值(例如N的返回值)或日期值(例如DATE、DATEVALUE或TO_DATE的返回值)。由范围指定的值应该是标准的日期值或日期序数值。', - 'example': 'DATE(1969', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISOWEEKNUM', - 't': 6, - 'd': '返回给定日期在全年中的 ISO 周数。', - 'a': '返回给定日期在全年中的 ISO 周数。', - 'm': [1, 1], - 'p': [{ - 'name': 'date', - 'detail': '用于日期和时间计算的日期-时间代码。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'WEEKNUM', - 't': 6, - 'd': '返回特定日期的周数。', - 'a': '返回特定日期的周数。', - 'm': [1, 2], - 'p': [{ - 'name': 'serial_number', - 'detail': '要确定其位于第几周的日期,必须是对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'return_type', - 'detail': '[可选 - 默认值为 1 ] - 代表一周起始日的数字,系统也使用该数字来确定一年的第一周(1=周日,2=周一)。', - 'example': '7', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'WEEKDAY', - 't': 6, - 'd': '返回一个数字,对应于给定日期所在的星期几。', - 'a': '返回一个数字,对应于给定日期所在的星期几。', - 'm': [1, 2], - 'p': [{ - 'name': 'serial_number', - 'detail': '要为其确定星期几的日期。必须是对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'return_type', - 'detail': '[可选 - 默认值为 1] - 以数字指示使用哪种编号顺序来表示星期几。默认情况下,按星期日 (= 1) 开始计算。\n\n如果类型为 1,则星期值将从星期日开始算起,并且星期日的值为 1,因此星期六的值就是 7。\n\n如果类型为 2,则星期值将从星期一开始算起,并且星期一的值为 1,因此星期日的值就是 7。\n\n如果类型为 3,则星期值将从星期一算起,并且星期一的值为 0,因此星期日的值就是 6。', - 'example': '7', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DAY', - 't': 6, - 'd': '以数字格式返回特定日期所在的当月几号。', - 'a': '以数字格式返回特定日期所在的当月几号。', - 'm': [1, 1], - 'p': [{ - 'name': 'serial_number', - 'detail': '要从中提取具体几号的日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'DAYS', - 't': 6, - 'd': '返回两个日期之间的天数。', - 'a': '返回两个日期之间的天数。', - 'm': [2, 2], - 'p': [{ - 'name': 'end_date', - 'detail': '计算中要使用的结束日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': '2011-3-15', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'start_date', - 'detail': '计算中要使用的开始日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': '2011-2-1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'DAYS360', - 't': 6, - 'd': '按照每年360天,返回两个日期之间的差(用于计算利息)。', - 'a': '按照每年360天,返回两个日期之间的差(用于计算利息)。', - 'm': [2, 3], - 'p': [{ - 'name': 'start_date', - 'detail': '计算中要使用的开始日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'end_date', - 'detail': '计算中要使用的结束日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'method', - 'detail': '[可选 - 默认为FALSE()] - 指示要使用哪种天数计算方法。\n\nFALSE - 采用美国 (NASD) 方法时,如果起始日期为某月的最后一天,为便于计算,会将起始日期的当月几号更改为30。此外,如果结束日期是所在月份的最后一天,而且起始日期在其所在月的30号之前,则将结束日期更改为结束日期之后那个月的第一天,否则将结束日期更改为该月的30号。\n\nTRUE - 采用欧洲方法时,会将所有日期在31号的起始日期或结束日期更改为当月的30号。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'DATE', - 't': 6, - 'd': '将提供的年、月、日转换为日期。', - 'a': '将提供的年、月、日转换为日期。', - 'm': [3, 3], - 'p': [{ - 'name': 'year', - 'detail': '日期的年份部分,包含一到四位数字。\n\n介于 0(零)到 1899 之间,会将该值与 1900 相加来计算年份;\n\n介于 1900 到 9999 之间,将使用该数值作为年份;\n\n小于 0 或大于等于 10000,返回 错误值 #NUM!。', - 'example': '1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'month', - 'detail': '日期的月份部分,一个正整数或负整数。\n\n如果 month 大于 12,则 month 会将该月份数与指定年中的第一个月相加。\n\n如果 month 小于 1,month 则从指定年份的一月份开始递减该月份数,然后再加上 1 个月。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'day', - 'detail': '日期的日部分,一个正整数或负整数。\n\n如果 day 大于月中指定的天数,则 day 会将天数与该月中的第一天相加。\n\n如果 day 小于 1,则 day 从指定月份的第一天开始递减该天数,然后再加上 1 天。', - 'example': '20', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DATEVALUE', - 't': 6, - 'd': '将提供的日期字符串转换为日期的序列号。', - 'a': '将提供的日期字符串转换为日期的序列号。', - 'm': [1, 1], - 'p': [{ - 'name': 'date_text', - 'detail': '表示日期的字符串。', - 'example': '"1969-7-20"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'DATEDIF', - 't': 6, - 'd': '计算两个日期之间的天数、月数或年数。', - 'a': '计算两个日期之间的天数、月数或年数。', - 'm': [3, 3], - 'p': [{ - 'name': '起始日期', - 'detail': '计算中要使用的开始日期。必须是对包含DATE值的单元格的引用、返回DATE类型的函数或数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '结束日期', - 'detail': '计算中要使用的结束日期。必须是对包含DATE值的单元格的引用、返回DATE类型的函数或数字。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '单位', - 'detail': '时间单位的缩写文字。例如 "M" 代表月。有效值包括:"Y"、"M"、"D"、"MD"、"YM" 和 "YD"。\n\n"Y":返回起始日期和结束日期之间的整年数。\n\n"M":返回起始日期和结束日期之间的整月数。\n\n"D":返回起始日期和结束日期之间的天数。\n\n"MD":返回起始日期和结束日期之间的天数(不计整月数)。\n\n"YM":返回起始日期和结束日期之间的整月数(不计整年数)。\n\n"YD":返回起始日期和结束日期之间的天数(假设起始日期和结束日期的间隔不超过一年)。', - 'example': '16)', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'WORKDAY', - 't': 6, - 'd': '指定工作日天数,计算结束日期。', - 'a': '指定工作日天数,计算结束日期。', - 'm': [2, 3], - 'p': [{ - 'name': 'start_date', - 'detail': '计算的开始日期。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'days', - 'detail': 'start_date 之前或之后不含周末及节假日的天数。\n\n为正值将生成未来日期;\n\n为负值生成过去日期。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'holidays', - 'detail': '[可选] - 一个范围或数组常量,其中包含作为节假日的日期序号。\n\n在节假日数组中提供的值必须是日期序号值(例如由N所返回的值)或日期值(例如由DATE、DATEVALUE或TO_DATE返回的值)。由范围指定的值应该是标准的日期值或日期序数值。', - 'example': '16)', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'WORKDAY_INTL', - 't': 6, - 'd': '返回指定的若干个工作日之前或之后的日期的序列号(使用自定义周末参数)。 ', - 'a': '返回指定的若干个工作日之前或之后的日期的序列号(使用自定义周末参数)。 ', - 'm': [2, 4], - 'p': [{ - 'name': 'start_date', - 'detail': '开始日期(将被截尾取整)。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'days', - 'detail': 'start_date 之前或之后的工作日的天数。\n\n正值表示未来日期;\n\n负值表示过去日期;\n\n零值表示开始日期。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'weekend', - 'detail': '[可选 - 默认值为1] - 用于表示哪些天为周末的数字或字符串。\n字符串方式:可以使用由0和1组成的字符串来指定周末,串中的第一个数字字符代表周一,最后一个则代表周日。零表示这一天是工作日,1表示这一天为周末。例如,“0000011”表示将周六和周日作为周末。\n数字方式:这种方式不使用上述字符串形式,而是使用一个数字。1 =周六/周日为周末,2 =周日/周一为周末,依此类推则7 =周五/周六。11 =周日为唯一周末,12 =周一为唯一周末,依此类推则17 =周六为唯一周末。', - 'example': '16)', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'holidays', - 'detail': '[ 可选 ] - 这是一个范围或数组常量,其中包含作为节假日的日期。\n在节假日数组内提供的值必须为日期序数值(例如N的返回值)或日期值(例如DATE、DATEVALUE或TO_DATE的返回值)。由范围指定的值应该是标准的日期值或日期序数值。', - 'example': 'DATE(1969', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'YEAR', - 't': 6, - 'd': '返回对应于某个日期的年份。 Year 作为 1900 - 9999 之间的整数返回。', - 'a': '返回对应于某个日期的年份。 Year 作为 1900 - 9999 之间的整数返回。', - 'm': [1, 1], - 'p': [{ - 'name': 'serial_number', - 'detail': '用于计算年份的日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'YEARFRAC', - 't': 6, - 'd': '返回 start_date 和 end_date 之间的天数占全年天数的百分比。', - 'a': '返回 start_date 和 end_date 之间的天数占全年天数的百分比。', - 'm': [2, 3], - 'p': [{ - 'name': 'start_date', - 'detail': '计算中要使用的开始日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'end_date', - 'detail': '计算中要使用的结束日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': '7', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 要使用的日计数基准类型。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '16)', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TODAY', - 't': 6, - 'd': '以日期值格式返回当前日期。', - 'a': '以日期值格式返回当前日期。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'MONTH', - 't': 6, - 'd': '返回日期(以序列数表示)中的月份。 月份是介于 1(一月)到 12(十二月)之间的整数。', - 'a': '返回日期(以序列数表示)中的月份。 月份是介于 1(一月)到 12(十二月)之间的整数。', - 'm': [1, 1], - 'p': [{ - 'name': 'serial_number', - 'detail': '要从中提取月份的日期。必须是以下一种:对包含日期的单元格的引用、返回日期类型的函数或者数字。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'EFFECT', - 't': 8, - 'd': '根据名义利率及每年的复利计息期数来计算实际年利率。', - 'a': '根据名义利率及每年的复利计息期数来计算实际年利率。', - 'm': [2, 2], - 'p': [{ - 'name': 'nominal_rate', - 'detail': '每年的名义利率。', - 'example': '0.99', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'npery', - 'detail': '每年的复利计算期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DOLLAR', - 't': 12, - 'd': '将数字格式设置为与语言区域相对应的货币格式。', - 'a': '将数字格式设置为与语言区域相对应的货币格式。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要设置格式的值。', - 'example': '1.2351', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'decimals', - 'detail': '[可选 - 默认值为 2] - 要显示的小数位数。\n\n如果这是负数,则将数字四舍五入到小数点左侧。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DOLLARDE', - 't': 8, - 'd': '将以整数部分和分数部分转换为以小数部分表示的金额数字', - 'a': '将以整数部分和分数部分转换为以小数部分表示的金额数字', - 'm': [2, 2], - 'p': [{ - 'name': 'fractional_dollar', - 'detail': '以整数部份和分数部分表示的数字,用小数点隔开。', - 'example': '100.10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fraction', - 'detail': '用作分数中的分母的整数。', - 'example': '32', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DOLLARFR', - 't': 8, - 'd': '将小数转换为分数表示的金额数字。', - 'a': '将小数转换为分数表示的金额数字。', - 'm': [2, 2], - 'p': [{ - 'name': 'decimal_dollar', - 'detail': '小数。', - 'example': '100.125', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fraction', - 'detail': '用作分数中的分母的整数。', - 'example': '32', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DB', - 't': 8, - 'd': '使用固定余额递减法,返回指定期间内某项固定资产的折旧值。', - 'a': '使用固定余额递减法,返回指定期间内某项固定资产的折旧值。', - 'm': [4, 5], - 'p': [{ - 'name': 'cost', - 'detail': '资产原值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'salvage', - 'detail': '折旧末尾时的值(有时也称为资产残值)。', - 'example': '50', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'life', - 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'period', - 'detail': '在使用期限内要计算折旧的折旧期。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'month', - 'detail': '[可选 - 默认值为12] - 折旧第一年中的月数。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DDB', - 't': 8, - 'd': '用双倍余额递减法,返回指定期间内某项固定资产的折旧值。', - 'a': '用双倍余额递减法,返回指定期间内某项固定资产的折旧值。', - 'm': [4, 5], - 'p': [{ - 'name': 'cost', - 'detail': '资产原值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'salvage', - 'detail': '折旧末尾时的值(有时也称为资产残值)。', - 'example': '50', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'life', - 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'period', - 'detail': '在使用期限内要计算折旧的折旧期。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'factor', - 'detail': '[可选 - 默认值为2] - 折旧的递减系数。', - 'example': '2.25', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'RATE', - 't': 8, - 'd': '返回年金每期的利率。', - 'a': '返回年金每期的利率。', - 'm': [3, 6], - 'p': [{ - 'name': 'nper', - 'detail': '年金的付款总期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pmt', - 'detail': '每期的付款金额,在年金周期内不能更改。', - 'example': '-100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '现值即一系列未来付款当前值的总和。', - 'example': '400', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fv', - 'detail': '[可选 - 默认值为0] - 未来值,或在最后一次付款后希望得到的现金余额。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'guess', - 'detail': '[可选 - 默认值为0.1] - 预期利率。', - 'example': '0.1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CUMPRINC', - 't': 8, - 'd': '基于等额分期付款和固定利率,计算投资在多个付款期内的累计本金偿还额。', - 'a': '基于等额分期付款和固定利率,计算投资在多个付款期内的累计本金偿还额。', - 'm': [6, 6], - 'p': [{ - 'name': 'rate', - 'detail': '利率。', - 'example': '0.12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '总付款期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '年金的现值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'start_period', - 'detail': '开始累计计算的付款期序号。\n\n首期必须大于等于1。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'end_period', - 'detail': '结束累计计算的付款期序号。\n\n末期必须大于首期。', - 'example': '5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUPNUM', - 't': 8, - 'd': '返回在结算日和到期日之间的付息次数,向上舍入到最近的整数。', - 'a': '返回在结算日和到期日之间的付息次数,向上舍入到最近的整数。', - 'm': [3, 4], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。到期日是有价证券有效期截止时的日期。', - 'example': '02', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SYD', - 't': 8, - 'd': '返回在指定期间内资产按年限总和折旧法计算的折旧。', - 'a': '返回在指定期间内资产按年限总和折旧法计算的折旧。', - 'm': [4, 4], - 'p': [{ - 'name': 'cost', - 'detail': '资产原值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'salvage', - 'detail': '折旧末尾时的值(有时也称为资产残值)。', - 'example': '50', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'life', - 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'period', - 'detail': '在使用期限内要计算折旧的折旧期。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TBILLEQ', - 't': 8, - 'd': '基于贴现率计算美国政府短期债券的等效年化收益率。', - 'a': '基于贴现率计算美国政府短期债券的等效年化收益率。', - 'm': [3, 3], - 'p': [{ - 'name': 'settlement', - 'detail': '债券的结算日期,此日期为债券发行后交付给买家的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '债券的到期或结束日期,届时可将其以面值或票面价值赎回。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'discount', - 'detail': '债券购买时的贴现率。', - 'example': '2)', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TBILLYIELD', - 't': 8, - 'd': '基于价格计算美国政府短期债券的收益率。', - 'a': '基于价格计算美国政府短期债券的收益率。', - 'm': [3, 3], - 'p': [{ - 'name': 'settlement', - 'detail': '债券的结算日期,此日期为债券发行后交付给买家的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '债券的到期或结束日期,届时可将其以面值或票面价值赎回。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'pr', - 'detail': '债券的购买价格。', - 'example': '95', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TBILLPRICE', - 't': 8, - 'd': '基于贴现率计算美国政府短期债券的价格。', - 'a': '基于贴现率计算美国政府短期债券的价格。', - 'm': [3, 3], - 'p': [{ - 'name': 'settlement', - 'detail': '债券的结算日期,此日期为债券发行后交付给买家的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '债券的到期或结束日期,届时可将其以面值或票面价值赎回。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'discount', - 'detail': '债券购买时的贴现率。', - 'example': '0.09', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PV', - 't': 8, - 'd': '基于等额分期付款和固定利率,计算年金投资的现值。', - 'a': '基于等额分期付款和固定利率,计算年金投资的现值。', - 'm': [3, 5], - 'p': [{ - 'name': 'rate', - 'detail': '各期利率。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '年金的付款总期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pmt', - 'detail': '每期的付款金额,在年金周期内不能更改。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fv', - 'detail': '[可选] - 未来值,或在最后一次付款后希望得到的现金余额。', - 'example': 'D2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ACCRINT', - 't': 8, - 'd': '返回定期付息证券的应计利息。', - 'a': '返回定期付息证券的应计利息。', - 'm': [6, 8], - 'p': [{ - 'name': 'issue', - 'detail': '有价证券的发行日。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'first_interest', - 'detail': '有价证券的首次计息日。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'rate', - 'detail': '有价证券的年息票利率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'par', - 'detail': '证券的票面值。', - 'example': '10000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示““欧洲30/360”方法” - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'calc_method', - 'detail': '[可选 - 默认为TRUE()] - 一个逻辑值,指定当结算日期晚于首次计息日期时用于计算总应计利息的方法。\n\n如果值为 TRUE,则返回从发行日到结算日的总应计利息。\n\n如果值为 FALSE,则返回从首次计息日到结算日的应计利息。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ACCRINTM', - 't': 8, - 'd': '返回在到期日支付利息的有价证券的应计利息。', - 'a': '返回在到期日支付利息的有价证券的应计利息。', - 'm': [4, 5], - 'p': [{ - 'name': 'issue', - 'detail': '有价证券的发行日。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'settlement', - 'detail': '有价证券的到期日。', - 'example': 'DATE(1969', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'rate', - 'detail': '有价证券的年息票利率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'par', - 'detail': '证券的票面值。', - 'example': '1000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUPDAYBS', - 't': 8, - 'd': '返回从付息期开始到结算日的天数。', - 'a': '返回从付息期开始到结算日的天数。', - 'm': [3, 4], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUPDAYS', - 't': 8, - 'd': '返回结算日所在的付息期的天数。', - 'a': '返回结算日所在的付息期的天数。', - 'm': [3, 4], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUPDAYSNC', - 't': 8, - 'd': '返回从结算日到下一票息支付日之间的天数。', - 'a': '返回从结算日到下一票息支付日之间的天数。', - 'm': [3, 4], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUPNCD', - 't': 8, - 'd': '计算结算日之后的下一票息或利息派发日期。', - 'a': '计算结算日之后的下一票息或利息派发日期。', - 'm': [3, 4], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '01)', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': 'DATE(2019', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COUPPCD', - 't': 8, - 'd': '计算结算日之前的最后一个票息或利息支付日。', - 'a': '计算结算日之前的最后一个票息或利息支付日。', - 'm': [3, 4], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '01)', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': 'DATE(2019', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FV', - 't': 8, - 'd': '基于等额分期付款和固定利率,计算年金投资的未来价值。', - 'a': '基于等额分期付款和固定利率,计算年金投资的未来价值。', - 'm': [3, 5], - 'p': [{ - 'name': 'rate', - 'detail': '各期利率。', - 'example': '0.12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '年金的付款总期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pmt', - 'detail': '各期所应支付的金额,在整个年金期间保持不变。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '[可选 - 默认值为 0 ] - 现值,或一系列未来付款的当前值的累积和。', - 'example': '400', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为 0 ] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FVSCHEDULE', - 't': 8, - 'd': '返回应用一系列复利率计算的初始本金的未来值。', - 'a': '返回应用一系列复利率计算的初始本金的未来值。', - 'm': [2, 2], - 'p': [{ - 'name': 'principal', - 'detail': '现值。', - 'example': '10000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'schedule', - 'detail': '用于计算本金复利的一组利率。\n\n利率表必须是范围或数组,其中包含要用于计算复利的一组利率。这些利率值应该以十进制小数形式表示,或者使用UNARY_PERCENT以百分比形式表示,即表示为0.09或UNARY_PERCENT(9),而不要表示为9。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'YIELD', - 't': 8, - 'd': '返回定期支付利息的债券的收益率。', - 'a': '返回定期支付利息的债券的收益率。', - 'm': [6, 7], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'rate', - 'detail': '有价证券的年息票利率。', - 'example': '0.057', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pr', - 'detail': '有价证券的价格。', - 'example': '95', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'redemption', - 'detail': '有价证券的清偿价值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'YIELDDISC', - 't': 8, - 'd': '基于价格计算折价发行的(不带息)债券的年收益率。', - 'a': '基于价格计算折价发行的(不带息)债券的年收益率。', - 'm': [4, 5], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'pr', - 'detail': '有价证券的价格。', - 'example': '95', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'redemption', - 'detail': '有价证券的清偿价值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'NOMINAL', - 't': 8, - 'd': '基于给定的实际利率和年复利期数,返回名义年利率。', - 'a': '基于给定的实际利率和年复利期数,返回名义年利率。', - 'm': [2, 2], - 'p': [{ - 'name': 'effect_rate', - 'detail': '每年的实际利率。', - 'example': '0.85', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'npery', - 'detail': '每年的复利期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'XIRR', - 't': 8, - 'd': '返回一组不一定定期发生的现金流的内部收益率。', - 'a': '返回一组不一定定期发生的现金流的内部收益率。', - 'm': [2, 3], - 'p': [{ - 'name': 'values', - 'detail': '其中含有投资相关收益或支出的数组或范围。\n\n现金流数额中必须至少包含一项负的和一项正的现金流金额才能计算回报率。', - 'example': 'B2:B25', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'dates', - 'detail': '与现金流数额参数中的现金流对应的日期数组或范围。', - 'example': 'C2:C25', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'guess', - 'detail': '[可选 - 默认值为0.1] - 对内部回报率的估算值。', - 'example': '250', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MIRR', - 't': 8, - 'd': '返回一系列定期现金流的修改后内部收益率。', - 'a': '返回一系列定期现金流的修改后内部收益率。', - 'm': [3, 3], - 'p': [{ - 'name': 'values', - 'detail': '其中含有投资相关收益或支出的数组或范围。\n\n现金流数额中必须至少包含一项负的和一项正的现金流金额才能计算回报率。', - 'example': 'A2:A25', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'finance_rate', - 'detail': '现金流中使用的资金支付的利率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'reinvest_rate', - 'detail': '将现金流再投资的收益率。', - 'example': '0.12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'IRR', - 't': 8, - 'd': '返回由值中的数字表示的一系列现金流的内部收益率。 ', - 'a': '返回由值中的数字表示的一系列现金流的内部收益率。 ', - 'm': [1, 2], - 'p': [{ - 'name': 'values', - 'detail': '其中含有投资相关收益或支出的数组或范围。\n\n现金流数额中必须至少包含一项负的和一项正的现金流金额才能计算回报率。', - 'example': 'A2:A25', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'guess', - 'detail': '[可选 - 默认为 0.1] - 内部收益率的估值。', - 'example': '200', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'NPV', - 't': 8, - 'd': '使用贴现率和一系列未来支出(负值)和收益(正值)来计算一项投资的净现值。', - 'a': '使用贴现率和一系列未来支出(负值)和收益(正值)来计算一项投资的净现值。', - 'm': [2, 255], - 'p': [{ - 'name': 'rate', - 'detail': '某一期间的贴现率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value1', - 'detail': '第一笔支出(负值)和收益(正值)。', - 'example': '200', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2, ...', - 'detail': '[可选] - 其他支出(负值)和收益(正值)。', - 'example': '250', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'XNPV', - 't': 8, - 'd': '返回一组现金流的净现值,这些现金流不一定定期发生。', - 'a': '返回一组现金流的净现值,这些现金流不一定定期发生。', - 'm': [3, 3], - 'p': [{ - 'name': 'rate', - 'detail': '应用于现金流的贴现率。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'values', - 'detail': '与 dates 中的支付时间相对应的一系列现金流。', - 'example': 'B2:B25', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'dates', - 'detail': '与现金流支付相对应的支付日期表。', - 'example': 'C2:C25', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'CUMIPMT', - 't': 8, - 'd': '基于等额分期付款和固定利率,计算投资在一系列付款期内的累计利息。', - 'a': '基于等额分期付款和固定利率,计算投资在一系列付款期内的累计利息。', - 'm': [6, 6], - 'p': [{ - 'name': 'rate', - 'detail': '利息率。', - 'example': '0.12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '总付款期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '现值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'start_period', - 'detail': '开始累计计算的付款期序号。\n\n首期必须大于等于1。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'end_period', - 'detail': '结束累计计算的付款期序号。\n\n末期必须大于首期。', - 'example': '5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '0', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PMT', - 't': 8, - 'd': '用于根据固定付款额和固定利率计算贷款的付款额。', - 'a': '用于根据固定付款额和固定利率计算贷款的付款额。', - 'm': [3, 5], - 'p': [{ - 'name': 'rate', - 'detail': '贷款利率。', - 'example': '0.08', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '该项贷款的付款总数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '现值,或一系列未来付款额现在所值的总额,也叫本金。', - 'example': ' 100000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fv', - 'detail': '[可选 - 默认值为 0] - 未来值,或在最后一次付款后希望得到的现金余额。', - 'example': 'D2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为 0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'IPMT', - 't': 8, - 'd': '基于固定利率及等额分期付款方式,返回给定期数内对投资的利息偿还额。', - 'a': '基于固定利率及等额分期付款方式,返回给定期数内对投资的利息偿还额。', - 'm': [4, 6], - 'p': [{ - 'name': 'rate', - 'detail': '各期利率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'per', - 'detail': '用于计算其利息数额的期数,必须在 1 到 nper 之间。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '年金的付款总期数。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '现值,或一系列未来付款的当前值的累积和。', - 'example': '80000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fv', - 'detail': '[可选 - 默认值为 0] - 未来值,或在最后一次付款后希望得到的现金余额。', - 'example': 'E2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为 0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PPMT', - 't': 8, - 'd': '返回根据定期固定付款和固定利率而定的投资在已知期间内的本金偿付额。', - 'a': '返回根据定期固定付款和固定利率而定的投资在已知期间内的本金偿付额。', - 'm': [4, 6], - 'p': [{ - 'name': 'rate', - 'detail': '各期利率。', - 'example': '0.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'per', - 'detail': '指定期数,该值必须在 1 到 nper 范围内。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'nper', - 'detail': '年金的付款总期数。', - 'example': '3*12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '现值即一系列未来付款当前值的总和。', - 'example': '100000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fv', - 'detail': '[可选 - 默认值为 0] - 未来值,或在最后一次付款后希望得到的现金余额。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为 0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'INTRATE', - 't': 8, - 'd': '返回完全投资型证券的利率。', - 'a': '返回完全投资型证券的利率。', - 'm': [4, 5], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'investment', - 'detail': '有价证券的投资额。', - 'example': '100000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'redemption', - 'detail': '有价证券到期时的兑换值。', - 'example': '101200', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PRICE', - 't': 8, - 'd': '返回定期付息的面值 ¥100 的有价证券的价格。', - 'a': '返回定期付息的面值 ¥100 的有价证券的价格。', - 'm': [6, 7], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'rate', - 'detail': '有价证券的年息票利率。', - 'example': '0.057', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'yld', - 'detail': '有价证券的年收益率。', - 'example': '0.065', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'redemption', - 'detail': '面值 ¥100 的有价证券的清偿价值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PRICEDISC', - 't': 8, - 'd': '返回折价发行的面值 ¥100 的有价证券的价格。', - 'a': '返回折价发行的面值 ¥100 的有价证券的价格。', - 'm': [4, 5], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'discount', - 'detail': '有价证券的贴现率。', - 'example': '0.0525', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'redemption', - 'detail': '面值 ¥100 的有价证券的清偿价值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'PRICEMAT', - 't': 8, - 'd': '返回到期付息的面值 ¥100 的有价证券的价格。', - 'a': '返回到期付息的面值 ¥100 的有价证券的价格。', - 'm': [5, 6], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'issue', - 'detail': '有价证券的发行日。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'rate', - 'detail': '有价证券在发行日的利率。', - 'example': '0.061', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'yld', - 'detail': '有价证券的年收益率。', - 'example': '0.061', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'RECEIVED', - 't': 8, - 'd': '返回一次性付息的有价证券到期收回的金额。', - 'a': '返回一次性付息的有价证券到期收回的金额。', - 'm': [4, 5], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'investment', - 'detail': '有价证券的投资额。', - 'example': '10000000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'discount', - 'detail': '有价证券的贴现率。', - 'example': '0.0575', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '12', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DISC', - 't': 8, - 'd': '返回有价证券的贴现率。', - 'a': '返回有价证券的贴现率。', - 'm': [4, 5], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'pr', - 'detail': '有价证券的价格(按面值为 ¥100 计算)。', - 'example': '97.975', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'redemption', - 'detail': '面值 ¥100 的有价证券的清偿价值。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '12', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'NPER', - 't': 8, - 'd': '基于固定利率及等额分期付款方式,返回某项投资的总期数。', - 'a': '基于固定利率及等额分期付款方式,返回某项投资的总期数。', - 'm': [3, 5], - 'p': [{ - 'name': 'rate', - 'detail': '各期利率。', - 'example': '0.12', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pmt', - 'detail': '各期所应支付的金额,在整个年金期间保持不变。', - 'example': '500', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'pv', - 'detail': '现值,或一系列未来付款的当前值的累积和。', - 'example': '40000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'fv', - 'detail': '[可选 - 默认值为0] - 未来值,或在最后一次付款后希望得到的现金余额。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'type', - 'detail': '[可选 - 默认值为0] - 指定各期的付款时间是在期初还是期末。\n\n0 表示期末;\n\n1 表示期初。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SLN', - 't': 8, - 'd': '返回一个期间内的资产的直线折旧。', - 'a': '返回一个期间内的资产的直线折旧。', - 'm': [3, 3], - 'p': [{ - 'name': 'cost', - 'detail': '资产原值。', - 'example': '300000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'salvage', - 'detail': '折旧末尾时的值(有时也称为资产残值)。', - 'example': '75000', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'life', - 'detail': '资产的折旧期数(有时也称作资产的使用寿命)。', - 'example': '10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DURATION', - 't': 8, - 'd': '返回假设面值 ¥100 的定期付息有价证券的修正期限。', - 'a': '返回假设面值 ¥100 的定期付息有价证券的修正期限。', - 'm': [5, 6], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'coupon', - 'detail': '有价证券的年息票利率。', - 'example': '0.08', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'yld', - 'detail': '有价证券的年收益率。', - 'example': '0.09', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MDURATION', - 't': 8, - 'd': '返回假设面值 ¥100 的有价证券的 Macauley 修正期限。', - 'a': '返回假设面值 ¥100 的有价证券的 Macauley 修正期限。', - 'm': [5, 6], - 'p': [{ - 'name': 'settlement', - 'detail': '有价证券的结算日。 有价证券结算日是在发行日之后,有价证券卖给购买者的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'maturity', - 'detail': '有价证券的到期日。 到期日是有价证券有效期截止时的日期。', - 'example': 'DATE(2010', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'coupon', - 'detail': '有价证券的年息票利率。', - 'example': '0.08', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'yld', - 'detail': '有价证券的年收益率。', - 'example': '0.09', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'frequency', - 'detail': '年付息次数。\n\n如果按年支付,frequency = 1;\n\n按半年期支付,frequency = 2;\n\n按季支付,frequency = 4。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'basis', - 'detail': '[可选 - 默认为0] - 指示要使用哪种天数计算方法。\n\n0表示“美国(NASD) 30/360”方法 - 此方法按照美国全国证券交易商协会标准,假设每月30天、每年360天,并对所输入的月末日期进行具体调整。\n\n1表示“实际/实际”方法 - 此方法计算基于指定日期之间的实际天数和所涉及的年份中的实际天数进行计算。此方法用于美国长期债券,也是在非财经用途方面使用最多的方法。\n\n2表示“实际/360”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为360天。\n\n3表示“实际/365”方法 - 此方法基于指定日期之间的实际天数进行计算,但假定每年为365天。\n\n4表示“欧洲30/360”方法 - 类似于0,此方法基于每月30天、每年360天进行计算,但按照欧洲金融惯例对月末日期进行调整。', - 'example': '0', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'BIN2DEC', - 't': 9, - 'd': '将二进制数转换为十进制数。', - 'a': '将二进制数转换为十进制数。', - 'm': [1, 1], - 'p': [{ - 'name': 'number', - 'detail': '要转换为十进制数的带符号的10位二进制数值(以字符串形式提供)。\n\n带符号的二进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n对于此函数,最大的正数输入值为0111111111,最小的负数输入值为1000000000。\n\n如果所提供的带符号的二进制数是有效的二进制数,会自动将其转换为相应的字符串输入。例如,BIN2DEC(100)和BIN2DEC("100")得出的结果相同,均为4。', - 'example': '101', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'BIN2HEX', - 't': 9, - 'd': '将二进制数转换为十六进制数。', - 'a': '将二进制数转换为十六进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的十六进制数的带符号的10位二进制数值(以字符串形式提供)。\n\n带符号的二进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n对于此函数,最大的正数输入值为0111111111,最小的负数输入值为1000000000。\n\n如果所提供的带符号的二进制数是有效的二进制数,会自动将其转换为相应的字符串输入。例如,BIN2HEX(11111)和BIN2HEX("11111")得出 的结果相同,均为1F。', - 'example': '101', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。例如,BIN2HEX("11111",8)所得的结果值为0000001F。\n\n如果带符号的二进制数的最高位为1,则忽略此值;即当提供的带符号的二进制数大于等于1000000000时忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'BIN2OCT', - 't': 9, - 'd': '将二进制数转换为八进制数。', - 'a': '将二进制数转换为八进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的八进制数的带符号的10位二进制数值(以字符串形式提供)。\n\n带符号的二进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n对于此函数,最大的正数输入值为0111111111,最小的负数输入值为1000000000。\n\n如果所提供的带符号的二进制数是有效的二进制数,会自动将其转换为相应的字符串输入。例如,BIN2OCT(11111)和BIN2OCT("11111")得出的结果相同,均为37。', - 'example': '101', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。例如,BIN2OCT("11111")得到的结果值为00000037。\n\n如果带符号的二进制数的最高位为1,则忽略此值;即当提供的带符号的二进制数大于等于1000000000时忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DEC2BIN', - 't': 9, - 'd': '将十进制数转换为二进制数。', - 'a': '将十进制数转换为二进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的二进制数的十进制数值(以字符串形式提供)。\n\n对于此函数,最大的正数输入值为511,最小的负数输入值为-512。\n\n如果所提供的十进制数是有效的十进制数,会自动将其转换为相应的字符串输入。例如,DEC2BIN(199)和DEC2BIN("199")得出的结果相同,均为11000111。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果十进制数为负数,则忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DEC2HEX', - 't': 9, - 'd': '将十进制数转换为十六进制数。', - 'a': '将十进制数转换为十六进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的十六进制数的十进制数值(以字符串形式提供)。\n\n此函数可接受的最大正数值为549755813887,最小负数值为-549755814888。\n\n如果所提供的十进制数是有效的十进制数,会自动将其转换为相应的字符串输入。例如,DEC2HEX(100)和DEC2HEX("100")得出的结果相同,均为64。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果十进制数为负数,则忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DEC2OCT', - 't': 9, - 'd': '将十进制数转换为八进制数。', - 'a': '将十进制数转换为八进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的八进制数的十进制数值(以字符串形式提供)。\n\n此函数可接受的最大正数值为536870911,最小负数值为-53687092。\n\n如果所提供的十进制数是有效的十进制数,会自动将其转换为相应的字符串输入。例如,DEC2OCT(199)和DEC2OCT("199")得出的结果相同,均为307。', - 'example': '100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果十进制数为负数,则忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'HEX2BIN', - 't': 9, - 'd': '将十六进制数转换为二进制数。', - 'a': '将十六进制数转换为二进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的二进制数的带符号的40位十六进制数值(以字符串形式提供)。\n\n带符号的十六进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为1FF,最小负数值为FFFFFFFE00。\n\n如果所提供的带符号的十六进制数是有效的十六进制数,函数会自动将其转换为相应的字符串输入。例如,HEX2BIN(199)和HEX2BIN("199")得出的结果相同,均为110011001。', - 'example': '"f3"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的十六进制数的最高位为1,则忽略此值;即当提供的带符号的十六进制数大于等于8000000000时忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'HEX2DEC', - 't': 9, - 'd': '将十六进制数转换为十进制数。', - 'a': '将十六进制数转换为十进制数。', - 'm': [1, 1], - 'p': [{ - 'name': 'number', - 'detail': '要转换为十进制数的带符号的40位十六进制数值(以字符串形式提供)。\n\n带符号的十六进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为7fffffffff,最小负数值为8000000000。\n\n如果所提供的带符号的十六进制数是有效的十六进制数,函数会自动将其转换为相应的字符串输入。例如,HEX2DEC(199)和HEX2DEC("199")得出的结果相同,均为409。', - 'example': '"f3"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'HEX2OCT', - 't': 9, - 'd': '将十六进制数转换为八进制数。', - 'a': '将十六进制数转换为八进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的八进制数的带符号的40位十六进制数值(以字符串形式提供)。\n\n带符号的十六进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为1FFFFFFF,最小负数值为FFE0000000。\n\n如果所提供的带符号的十六进制数是有效的十六进制数,函数会自动将其转换为相应的字符串输入。例如,HEX2OCT(199)和HEX2OCT("199")得出的结果相同,均为631。', - 'example': '"f3"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的十六进制数的最高位为1,则忽略此值;即当给定的带符号的十六进制数大于等于8000000000时忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'OCT2BIN', - 't': 9, - 'd': '将八进制数转换为二进制数。', - 'a': '将八进制数转换为二进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的二进制数的带符号的30位八进制数值(以字符串形式提供)。\n\n带符号的八进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为777,最小负数值为7777777000。\n\n如果所提供的带符号的八进制数是有效的八进制数,函数会自动将其转换为相应的字符串输入。例如,OCT2BIN(177)和OCT2BIN("177")得出的结果相同,均为1111111。', - 'example': '37', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的八进制数的最高位为1,则忽略此值;即当给定的带符号的八进制数大于等于4000000000时忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'OCT2DEC', - 't': 9, - 'd': '将八进制数转换为十进制数。', - 'a': '将八进制数转换为十进制数。', - 'm': [1, 1], - 'p': [{ - 'name': 'number', - 'detail': '要转换为十进制数的带符号的30位八进制数值(以字符串形式提供)。\n\n带符号的ba进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为3777777777,最小负数值为4000000000。\n\n如果所提供的带符号的八进制数是有效的八进制数,函数会自动将其转换为相应的字符串输入。例如,OCT2DEC(177)和OCT2DEC("177")得出的结果相同,均为127。', - 'example': '37', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'OCT2HEX', - 't': 9, - 'd': '将八进制数转换为十六进制数。', - 'a': '将八进制数转换为十六进制数。', - 'm': [1, 2], - 'p': [{ - 'name': 'number', - 'detail': '要转换为带符号的十六进制数的带符号的30位八进制数值(以字符串形式提供)。\n\n带符号的ba进制数的最高位是符号位;也就是说,负数是以二的补码形式表示的。\n\n此函数可接受的最大正数值为3777777777,最小负数值为4000000000。\n\n如果所提供的带符号的八进制数是有效的八进制数,函数会自动将其转换为相应的字符串输入。例如,OCT2HEX(177)和OCT2HEX("177")得出的结果相同,均为7F。', - 'example': '37', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'places', - 'detail': '[ 可选 ] - 结果中要确保的有效位数。\n\n如果设置的有效位数大于结果中的有效位数,则在结果的左侧填充0,使总有效位数达到有效位数。\n\n如果带符号的八进制数的最高位为1,则忽略此值;即当给定的带符号的八进制数大于等于4000000000时忽略此值。', - 'example': '8', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'COMPLEX', - 't': 9, - 'd': '将实系数及虚系数转换为 x+yi 或 x+yj 形式的复数。', - 'a': '将实系数及虚系数转换为 x+yi 或 x+yj 形式的复数。', - 'm': [2, 3], - 'p': [{ - 'name': 'real_num', - 'detail': '复数的实系数。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'i_num', - 'detail': '复数的虚系数。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'suffix', - 'detail': '[可选 - 默认为 "i"] - 复数中虚系数的后缀。', - 'example': '"j"', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangestring' - }] - }, { - 'n': 'IMREAL', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的实系数。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的实系数。', - 'm': [1, 1], - 'p': [{ - 'name': 'inumber', - 'detail': '需要计算其实系数的复数。', - 'example': '"4+5i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'IMAGINARY', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的虚系数。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的虚系数。', - 'm': [1, 1], - 'p': [{ - 'name': 'inumber', - 'detail': '需要计算其虚系数的复数。', - 'example': '"4+5i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'IMCONJUGATE', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的共轭复数。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的共轭复数。', - 'm': [1, 1], - 'p': [{ - 'name': 'inumber', - 'detail': '需要计算其共轭数的复数。', - 'example': '"3+4i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'IMABS', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的复数的绝对值(模)。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的复数的绝对值(模)。', - 'm': [1, 1], - 'p': [{ - 'name': 'inumber', - 'detail': '要计算其绝对值的复数。', - 'example': '"3+4i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'DELTA', - 't': 9, - 'd': '检验两个值是否相等。 如果 number1=number2,则返回 1;否则返回 0。', - 'a': '检验两个值是否相等。 如果 number1=number2,则返回 1;否则返回 0。', - 'm': [1, 2], - 'p': [{ - 'name': 'number1', - 'detail': '第一个数字。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'number2', - 'detail': '[可选 - 默认为 0] - 第二个数字。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'IMSUM', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的和。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的和。', - 'm': [1, 255], - 'p': [{ - 'name': 'inumber1', - 'detail': '要相加的第一个复数', - 'example': '"3+4i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'inumber2, …', - 'detail': '[可选] - 要与值1 相加的其他复数', - 'example': '"5-3i"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'IMSUB', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的差。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的差。', - 'm': [2, 2], - 'p': [{ - 'name': 'inumber1', - 'detail': '从(复)数中减去 inumber2。', - 'example': '"6+5i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'inumber2', - 'detail': '从 inumber1 中减(复)数。', - 'example': '"2+3i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'IMPRODUCT', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的乘积。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的 1 至 255 个复数的乘积。', - 'm': [1, 255], - 'p': [{ - 'name': 'inumber1', - 'detail': '用于计算乘积的第一个复数', - 'example': '"3+4i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'inumber2, …', - 'detail': '[可选] - 要相乘的其他复数。', - 'example': '"5-3i"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'IMDIV', - 't': 9, - 'd': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的商。', - 'a': '返回以 x+yi 或 x+yj 文本格式表示的两个复数的商。', - 'm': [2, 2], - 'p': [{ - 'name': 'inumber1', - 'detail': '复数分子或被除数。', - 'example': '"11+16i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'inumber2', - 'detail': '复数分母或除数。', - 'example': '"3+2i"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'NOT', - 't': 10, - 'd': '返回某个逻辑值的相反值 - “NOT(TRUE())”将返回 FALSE;“NOT(FALSE())”将返回 TRUE。', - 'a': '返回某个逻辑值的相反值 - “NOT(TRUE())”将返回 FALSE;“NOT(FALSE())”将返回 TRUE。', - 'm': [1, 1], - 'p': [{ - 'name': 'logical', - 'detail': '计算结果为 TRUE 或 FALSE 的任何值或表达式。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TRUE', - 't': 10, - 'd': '返回逻辑值 TRUE。', - 'a': '返回逻辑值 TRUE。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'FALSE', - 't': 10, - 'd': '返回逻辑值 FALSE。', - 'a': '返回逻辑值 FALSE。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'AND', - 't': 10, - 'd': '所有参数的计算结果为 TRUE 时,返回 TRUE;只要有一个参数的计算结果为 FALSE,即返回 FALSE。', - 'a': '所有参数的计算结果为 TRUE 时,返回 TRUE;只要有一个参数的计算结果为 FALSE,即返回 FALSE。', - 'm': [1, 255], - 'p': [{ - 'name': 'logical1', - 'detail': '要测试的第一个条件,其计算结果可以为 TRUE 或 FALSE。', - 'example': 'A2 = "foo"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'logical2,...', - 'detail': '[可选] - 要测试的其他条件,其计算结果可以为 TRUE 或 FALSE,最多可包含 255 个条件。', - 'example': 'A3 = "bar"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'IFERROR', - 't': 10, - 'd': '如果第一个参数不是错误值,就返回第一个参数;否则,返回第二个参数。', - 'a': '如果第一个参数不是错误值', - 'm': [2, 2], - 'p': [{ - 'name': 'value', - 'detail': '检查是否存在错误的参数。', - 'example': 'A1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value_if_error', - 'detail': '公式的计算结果错误时返回的值。 计算以下错误类型:#N/A、#VALUE!、#REF!、#DIV/0!、#NUM!、#NAME? 或 #NULL!。', - 'example': '"Error in cell A1"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'IF', - 't': 10, - 'd': '当逻辑表达式的值为 TRUE 时返回一个值,而当其为 FALSE 时返回另一个值。', - 'a': '当逻辑表达式的值为 TRUE 时返回一个值,而当其为 FALSE 时返回另一个值。', - 'm': [2, 3], - 'p': [{ - 'name': 'logical_test', - 'detail': '一个表达式或对包含表达式的单元格的引用,该表达式代表某种逻辑值(即TRUE或FALSE)。', - 'example': 'A2 = "foo"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value_if_true', - 'detail': '当逻辑表达式为TRUE时的返回值。', - 'example': '"A2 is foo"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value_if_false', - 'detail': '[可选 - 默认为空白] - 当逻辑表达式等于FALSE时的函数返回值。', - 'example': '"A2 was false"', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'OR', - 't': 10, - 'd': '只要有一个参数的计算结果为 TRUE 时,返回 TRUE;所有参数的计算结果为 FALSE,即返回 FALSE。', - 'a': '只要有一个参数的计算结果为 TRUE 时,返回 TRUE;所有参数的计算结果为 FALSE,即返回 FALSE。', - 'm': [1, 255], - 'p': [{ - 'name': 'logical1', - 'detail': '要测试的第一个条件,其计算结果可以为 TRUE 或 FALSE。', - 'example': 'A2 = "foo"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': '逻辑表达式2', - 'detail': '[可选] - 其他表达式或对包含表达式的单元格的引用,这些表达式代表某种逻辑值(即TRUE或FALSE)或者可以强制转换为逻辑值。', - 'example': ' A3 = "bar"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'NE', - 't': 11, - 'd': '如果指定的值不相等,则返回“TRUE”;否则返回“FALSE”。相当于“<>”运算符。', - 'a': '如果指定的值不相等,则返回“TRUE”;否则返回“FALSE”。相当于“<>”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '第一个值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '要检查是否与 value1 不相等的值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'EQ', - 't': 11, - 'd': '如果指定的值相等,则返回“TRUE”;否则返回“FALSE”。相当于“=”运算符。', - 'a': '如果指定的值相等,则返回“TRUE”;否则返回“FALSE”。相当于“=”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '第一个值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '要检查是否与 value1 相等的值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'GT', - 't': 11, - 'd': '如果第一个参数严格大于第二个,则返回 TRUE;否则返回 FALSE。相当于“>”运算符。', - 'a': '如果第一个参数严格大于第二个,则返回 TRUE;否则返回 FALSE。相当于“>”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '要测试其是否大于 value2 的值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '第二个值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'GTE', - 't': 11, - 'd': '如果第一个参数大于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“>=”运算符。', - 'a': '如果第一个参数大于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“>=”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '要测试其是否大于等于 value2 的值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '第二个值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LT', - 't': 11, - 'd': '如果第一个参数严格小于第二个,则返回 TRUE;否则返回 FALSE。相当于“<”运算符。', - 'a': '如果第一个参数严格小于第二个,则返回 TRUE;否则返回 FALSE。相当于“<”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '要测试其是否小于 value2 的值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '第二个值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LTE', - 't': 11, - 'd': '如果第一个参数小于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“<=”运算符。', - 'a': '如果第一个参数小于或等于第二个,则返回 TRUE;否则返回 FALSE。相当于“<=”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '要测试其是否小于等于 value2 的值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '第二个值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ADD', - 't': 11, - 'd': '返回两个数值之和。相当于 `+` 运算符。', - 'a': '返回两个数值之和。相当于 `+` 运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '第一个加数。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value2', - 'detail': '第二个加数。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MINUS', - 't': 11, - 'd': '返回两个数值之差。相当于“-”运算符。', - 'a': '返回两个数值之差。相当于“-”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '被减数,即要对其计减的数值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value2', - 'detail': '减数,即要从 value1 中减除的数值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MULTIPLY', - 't': 11, - 'd': '返回两个数的乘积。相当于“*”运算符。', - 'a': '返回两个数的乘积。相当于“*”运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '第一个乘数。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value2', - 'detail': '第二个乘数。', - 'example': 'B2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DIVIDE', - 't': 11, - 'd': '返回两个参数相除所得的结果。相当于 `/` 运算符。', - 'a': '返回两个参数相除所得的结果。相当于 `/` 运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': '要被除的数值。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'value2', - 'detail': '用于除其他数的数值。\n\n除数不得为0。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CONCAT', - 't': 11, - 'd': '返回两个值的串联。相当于 `&` 运算符。', - 'a': '返回两个值的串联。相当于 `&` 运算符。', - 'm': [2, 2], - 'p': [{ - 'name': 'value1', - 'detail': 'value2 将附于其后的值。', - 'example': '"de"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'value2', - 'detail': '要附于 value1 之后的值。', - 'example': '"mystify"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'UNARY_PERCENT', - 't': 11, - 'd': '返回按百分比解释的数值。例如,“UNARY_PERCENT(100)”等于1。', - 'a': '返回按百分比解释的数值。例如,“UNARY_PERCENT(100)”等于1。', - 'm': [1, 1], - 'p': [{ - 'name': 'number', - 'detail': '要作为百分比解释的数值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CONCATENATE', - 't': 12, - 'd': '将两个或多个文本字符串联接为一个字符串。', - 'a': '将两个或多个文本字符串联接为一个字符串。', - 'm': [1, 255], - 'p': [{ - 'name': 'text1', - 'detail': '初始字符串。', - 'example': '"Super"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'text2 ...', - 'detail': '[可选] - 要按顺序连接在一起的其他字符串。', - 'example': '"calla"', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'CODE', - 't': 12, - 'd': '返回所提供的字符串中首字符的 Unicode 映射值。', - 'a': '返回所提供的字符串中首字符的 Unicode 映射值。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要返回其首字符的Unicode映射值的字符串。', - 'example': '"a"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'CHAR', - 't': 12, - 'd': '按照当前 Unicode 编码表,将数字转换为对应的字符。', - 'a': '按照当前 Unicode 编码表,将数字转换为对应的字符。', - 'm': [1, 1], - 'p': [{ - 'name': 'number', - 'detail': '介于 1 到 255 之间的数字。', - 'example': '97', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'ARABIC', - 't': 12, - 'd': '将罗马数字转换为阿拉伯数字。', - 'a': '将罗马数字转换为阿拉伯数字。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要转换格式的罗马数字', - 'example': '"XIV"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ROMAN', - 't': 12, - 'd': '将数字格式设置为罗马数字形式。', - 'a': '将数字格式设置为罗马数字形式。', - 'm': [1, 1], - 'p': [{ - 'name': 'number', - 'detail': '要设置格式的数字,介于1到3999之间(包括这两个数字)。', - 'example': '499', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'REGEXEXTRACT', - 't': 12, - 'd': '按照正则表达式提取匹配的子串。', - 'a': '按照正则表达式提取匹配的子串。', - 'm': [2, 2], - 'p': [{ - 'name': 'text', - 'detail': '输入文本。', - 'example': '"Needle in a haystack"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'regular_expression', - 'detail': '此函数将返回文本中符合此表达式的第一个子串。', - 'example': '".e{2}dle"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'REGEXMATCH', - 't': 12, - 'd': '判断一段文本是否与正则表达式相匹配。', - 'a': '判断一段文本是否与正则表达式相匹配。', - 'm': [2, 2], - 'p': [{ - 'name': 'text', - 'detail': '要用正则表达式测试的文本。', - 'example': '"Spreadsheets"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'regular_expression', - 'detail': '用来测试文本的正则表达式。', - 'example': '"S.r"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'REGEXREPLACE', - 't': 12, - 'd': '使用正则表达式将文本字符串中的一部分替换为其他文本字符串。', - 'a': '使用正则表达式将文本字符串中的一部分替换为其他文本字符串。', - 'm': [3, 3], - 'p': [{ - 'name': 'text', - 'detail': '要对其局部进行替换操作的文本。', - 'example': '"Spreadsheets"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'regular_expression', - 'detail': '正则表达式。 text 中所有匹配的实例都将被替换。', - 'example': '"S.*d"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'replacement', - 'detail': '要插入到原有文本中的文本。', - 'example': '"Bed"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'T', - 't': 12, - 'd': '返回文本格式的字符串参数。', - 'a': '返回文本格式的字符串参数。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为文本的参数。\n\n如果值为文本,T将返回值本身。\n\n如果值为指向包含文本的单元格的引用,T将返回值中的内容。\n\n如果值为错误值或包含错误值的单元格,T将返回该错误值。\n\n对于所有其他情况,T将返回空串。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'FIXED', - 't': 12, - 'd': '以固定的小数位数设置数字的格式。', - 'a': '以固定的小数位数设置数字的格式。', - 'm': [1, 3], - 'p': [{ - 'name': 'number', - 'detail': '要进行舍入并转换为文本的数字。', - 'example': '3.141592653', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'decimals', - 'detail': '[可选 - 默认值为2] - 结果中要显示的小数位数。\n\n如果数值的有效位数小于小数位数,将以零填充。如果数值的有效位数大于小数位数,则将其舍入到所需的小数位数而不是将其截断。', - 'example': '2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'no_commas', - 'detail': '[可选 - 默认值为FALSE()] - 一个逻辑值,如果为 TRUE(),则会禁止 FIXED 在返回的文本中包含逗号。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'FIND', - 't': 12, - 'd': '返回字符串在文本中首次出现的位置(区分大小写)。', - 'a': '返回字符串在文本中首次出现的位置(区分大小写)。', - 'm': [2, 3], - 'p': [{ - 'name': 'find_text', - 'detail': '要在要搜索的文本中查找的字符串。', - 'example': '"n"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'within_text', - 'detail': '要在其中搜索搜索字符串的首次出现位置的文本。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'start_num', - 'detail': '[可选 - 默认值为1] - 要在要搜索的文本中开始搜索的字符位置。', - 'example': '14', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'FINDB', - 't': 12, - 'd': '返回某个字符串在文本中首次出现的位置(每个双字节字符占两个位置)。', - 'a': '返回某个字符串在文本中首次出现的位置(每个双字节字符占两个位置)。', - 'm': [2, 3], - 'p': [{ - 'name': 'find_text', - 'detail': '要在要搜索的文本中查找的字符串。', - 'example': '"新"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'within_text', - 'detail': '要在其中搜索搜索字符串的首次出现位置的文本。', - 'example': '"农历新年"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'start_num', - 'detail': '[可选 - 默认值为 1] - 要在要搜索的文本中开始搜索的字符位置。', - 'example': '2', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'JOIN', - 't': 12, - 'd': '将一个或多个使用指定定界符的一维数组的元素连接到一起。', - 'a': '将一个或多个使用指定定界符的一维数组的元素连接到一起。', - 'm': [2, 255], - 'p': [{ - 'name': 'separator', - 'detail': '置于相互连接的值之间的字符或字符串。\n\n定界符可以为空,例如JOIN(,{1,2,3})。', - 'example': '" and-a "', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'array1', - 'detail': '要使用定界符连接的一个或多个值。', - 'example': '{1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'array2, ...', - 'detail': '[可选] - 要使用定界符连接的其他值或数组。', - 'example': '2', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangeall' - }] - }, { - 'n': 'LEFT', - 't': 12, - 'd': '从文本字符串的第一个字符开始返回指定个数的字符。', - 'a': '从文本字符串的第一个字符开始返回指定个数的字符。', - 'm': [1, 2], - 'p': [{ - 'name': 'text', - 'detail': '包含要提取的字符的文本字符串。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'num_chars', - 'detail': '[可选 - 默认值为1] - 指定要由 LEFT 提取的字符的数量。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'RIGHT', - 't': 12, - 'd': '根据所指定的字符数返回文本字符串中最后一个或多个字符。', - 'a': '根据所指定的字符数返回文本字符串中最后一个或多个字符。', - 'm': [1, 2], - 'p': [{ - 'name': 'text', - 'detail': '包含要提取的字符的文本字符串。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'num_chars', - 'detail': '[可选 - 默认值为1] - 指定要由 RIGHT 提取的字符的数量。', - 'example': '2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MID', - 't': 12, - 'd': '返回文本字符串中从指定位置开始的特定数目的字符。', - 'a': '返回文本字符串中从指定位置开始的特定数目的字符。', - 'm': [3, 3], - 'p': [{ - 'name': 'text', - 'detail': '包含要提取的字符的文本字符串。', - 'example': '"get this"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'start_num', - 'detail': '要从字符串中开始提取的位置。字符串中第一个字符的索引为1。', - 'example': '5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'num_chars', - 'detail': '指定要由 MID 提取的字符的数量。\n\n如果提取的字符数尚不足提取长度个字符时就到达了字符串尾部,则MID返回从开始位置到字符串尾部的字符。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'LEN', - 't': 12, - 'd': '返回给定字符串的长度。', - 'a': '返回给定字符串的长度。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要返回其长度的字符串。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LENB', - 't': 12, - 'd': '返回文本中所包含的字符数。与双字节字符集(DBCS)一起使用。', - 'a': '返回文本中所包含的字符数。与双字节字符集(DBCS)一起使用。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要返回其字节数的字符串。(一个汉字为两个字节数)', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LOWER', - 't': 12, - 'd': '将指定字符串中的字母转换为小写。', - 'a': '将指定字符串中的字母转换为小写。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要转换为小写的字符串。', - 'example': '"LOREM IPSUM"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'UPPER', - 't': 12, - 'd': '将指定字符串中的字母转换为大写。', - 'a': '将指定字符串中的字母转换为大写。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要转换为大写的字符串。', - 'example': '"lorem ipsum"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'EXACT', - 't': 12, - 'd': '比较两个字符串是否相同。', - 'a': '比较两个字符串是否相同。', - 'm': [2, 2], - 'p': [{ - 'name': 'text1', - 'detail': '要比较的第一个字符串。', - 'example': 'A1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'text2', - 'detail': '要比较的第二个字符串。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'REPLACE', - 't': 12, - 'd': '将文本字符串的一部分替换为其他文本字符串。', - 'a': '将文本字符串的一部分替换为其他文本字符串。', - 'm': [4, 4], - 'p': [{ - 'name': 'old_text', - 'detail': '要对其局部进行替换操作的文本。', - 'example': '"Spreadsheets"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'start_num', - 'detail': '开始进行替换操作的位置(文本开头位置为 1)。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'num_chars', - 'detail': '要在文本中替换的字符个数。', - 'example': '6', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'new_text', - 'detail': '要插入到原有文本中的文本。', - 'example': '"Bed"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'REPT', - 't': 12, - 'd': '返回指定文本的多次重复。', - 'a': '返回指定文本的多次重复。', - 'm': [2, 2], - 'p': [{ - 'name': 'text', - 'detail': '要重复的字符或字符串。', - 'example': '"ha"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'number_times', - 'detail': '要重复的文本要在返回值中出现的次数。\n\n最大重复次数为100。即使重复次数大于100,REPT也仅将相应文本重复100次。', - 'example': '4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SEARCH', - 't': 12, - 'd': '返回字符串在文本中首次出现的位置(不区分大小写)。', - 'a': '返回字符串在文本中首次出现的位置(不区分大小写)。', - 'm': [2, 3], - 'p': [{ - 'name': 'find_text', - 'detail': '要在要搜索的文本中查找的字符串。', - 'example': '"n"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'within_text', - 'detail': '要在其中搜索搜索字符串的首次出现位置的文本。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'start_num', - 'detail': '[ 可选 - 默认值为1 ] - 要在要搜索的文本中开始搜索的字符位置。', - 'example': '14', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUBSTITUTE', - 't': 12, - 'd': '在文本字符串中用 new_text 替换 old_text。', - 'a': '在文本字符串中用 new_text 替换 old_text。', - 'm': [3, 4], - 'p': [{ - 'name': 'text', - 'detail': '需要替换其中字符的文本,或对含有文本(需要替换其中字符)的单元格的引用。', - 'example': '"search for it"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'old_text', - 'detail': '需要替换的文本。', - 'example': '"search for"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'new_text', - 'detail': '用于替换 old_text 的文本。', - 'example': '"Google"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'instance_num', - 'detail': '[ 可选 ] - 指定要用 new_text 替换 old_text 的事件。 如果指定了 instance_num,则只有满足要求的 old_text 被替换。 否则,文本中出现的所有 old_text 都会更改为 new_text。', - 'example': '3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'CLEAN', - 't': 12, - 'd': '移除文本中的不可打印 ASCII 字符后将其返回。', - 'a': '移除文本中的不可打印 ASCII 字符后将其返回。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要移除其中不可打印字符的文本。', - 'example': '"AF"&CHAR(31)', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TEXT', - 't': 12, - 'd': '按照指定格式将数字转换为文本。', - 'a': '按照指定格式将数字转换为文本。', - 'm': [2, 2], - 'p': [{ - 'name': 'value', - 'detail': '要设置格式的数字、日期或时间。', - 'example': '1.23', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'format_text', - 'detail': '以括号括起来的模式串,将按该模式设置数字的格式。\n\n0表示在数值位数少于格式指定的位数时必定以零填充。例如,TEXT(12.3,"000.00")将返回012.30。当数值的小数位数超过模式指定的小数位数时,四舍五入为指定的小数位数。例如,TEXT(12.305,"00.00")将返回12.31。\n\n#类似于0,但并不是在小数点的两侧都以零填充。例如,TEXT(12.3,"###.##")将返回12.3。', - 'example': '"$0.00"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TRIM', - 't': 12, - 'd': '删除指定字符串前后的空格。', - 'a': '删除指定字符串前后的空格。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要修剪的字符串或指向包含该字符串的单元格的引用。', - 'example': '" lorem ipsum"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'VALUE', - 't': 12, - 'd': '将可识别的任何日期、时间或数字格式的字符串转换为数字。', - 'a': '将可识别的任何日期、时间或数字格式的字符串转换为数字。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '包含要转换的值的字符串。', - 'example': '"123"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'PROPER', - 't': 12, - 'd': '将指定字符串中每个单词的首字母转为大写。', - 'a': '将指定字符串中每个单词的首字母转为大写。', - 'm': [1, 1], - 'p': [{ - 'name': 'text', - 'detail': '要转换的文本,其中每个单词的首字母都将转为大写,所有其他字母则转为小写。', - 'example': '"united states"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'CONVERT', - 't': 13, - 'd': '将数字从一种度量系统转换为另一种度量系统。', - 'a': '将数字从一种度量系统转换为另一种度量系统。', - 'm': [3, 3], - 'p': [{ - 'name': 'number', - 'detail': '是以 from_unit 为单位的需要进行转换的数值。', - 'example': '5.1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'from_unit', - 'detail': '是数值的单位。', - 'example': '"g"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'to_unit', - 'detail': '是结果的单位。', - 'example': '"kg"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'SUMX2MY2', - 't': 14, - 'd': '返回两数组中对应数值的平方差之和。', - 'a': '返回两数组中对应数值的平方差之和。', - 'm': [2, 2], - 'p': [{ - 'name': 'array_x', - 'detail': '第一个数组或数值区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'array_y', - 'detail': '第二个数组或数值区域。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUMX2PY2', - 't': 14, - 'd': '返回两数组中对应数值的平方和之和。', - 'a': '返回两数组中对应数值的平方和之和。', - 'm': [2, 2], - 'p': [{ - 'name': 'array_x', - 'detail': '第一个数组或数值区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'array_y', - 'detail': '第二个数组或数值区域。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUMXMY2', - 't': 14, - 'd': '返回两数组中对应数值之差的平方和。', - 'a': '返回两数组中对应数值之差的平方和。', - 'm': [2, 2], - 'p': [{ - 'name': 'array_x', - 'detail': '第一个数组或数值区域。', - 'example': 'A2:A100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'array_y', - 'detail': '第二个数组或数值区域。', - 'example': 'B2:B100', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TRANSPOSE', - 't': 14, - 'd': '将数组或单元格范围的行列转置。', - 'a': '将数组或单元格范围的行列转置。', - 'm': [1, 1], - 'p': [{ - 'name': 'array', - 'detail': '要将其行列互换的数组或范围。', - 'example': '{1,2}', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'TREND', - 't': 14, - 'd': '返回线性趋势值。', - 'a': '返回线性趋势值。', - 'm': [1, 4], - 'p': [{ - 'name': 'known_y', - 'detail': '关系表达式 y = mx + b 中已知的 y 值集合。\n\n如果 known_y 为二维数组或范围,则 known_x 的维数必须与之相同,或者省略此参数。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', - 'example': 'B2:B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'known_x', - 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = mx + b 中已知的可选 x 值集合。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', - 'example': 'A2:A10', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'new_x', - 'detail': '[可选 - 默认与 known_x 相同] - 需要函数 TREND 返回对应 y 值的新 x 值。', - 'example': 'A11:A13', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'const', - 'detail': '[可选 - 默认值为TRUE()] - 一个逻辑值,用于指定是否将常量 b 强制设为 0。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 0(零),m 将被调整以使 y = mx。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'FREQUENCY', - 't': 14, - 'd': '计算数值在某个区域内的出现频率,然后返回一个垂直数组。', - 'a': '计算数值在某个区域内的出现频率,然后返回一个垂直数组。', - 'm': [2, 2], - 'p': [{ - 'name': 'data_array', - 'detail': '要对其频率进行计数的一组数值或对这组数值的引用。', - 'example': 'A2:A40', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'bins_array', - 'detail': '要将 data_array 中的值插入到的间隔数组或对间隔的引用。\n\n为清晰起见,应将类别排序,但如果未排序,FREQUENCY会在内部对这些指定的值进行排序并返回正确结果。', - 'example': 'B2:B5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'GROWTH', - 't': 14, - 'd': '使用现有数据计算预测的指数等比。', - 'a': '使用现有数据计算预测的指数等比。', - 'm': [1, 4], - 'p': [{ - 'name': 'known_y', - 'detail': '关系表达式 y = b*m^x 中已知的 y 值集合。\n\n如果已知数据_y为二维数组或范围,则已知数据_x的维数必须与之相同,或者省略此参数。\n\n如果已知数据_y为一维数组或范围,已知数据_x则可代表二维数组或范围中的多个自变量。也就是说,如果已知数据_y为单行,则将已知数据_x中的每行解释为各自独立的值,类似情况也适用于已知数据_y为单列的情况。', - 'example': 'B2:B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'known_x', - 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = b*m^x 中已知的可选 x 值集合。\n\n如果已知数据_y为一维数组或范围,已知数据_x则可代表二维数组或范围中的多个自变量。也就是说,如果已知数据_y为单行,则将已知数据_x中的每行解释为各自独立的值,类似情况也适用于已知数据_y为单列的情况。', - 'example': 'A2:A10', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'new_x', - 'detail': '[可选 - 默认与 known_x 相同] - 需要函数 GROWTH 返回对应 y 值的新 x 值。', - 'example': 'A11:A13', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'const', - 'detail': '[可选 - 默认值为TRUE()] -一个逻辑值,用于指定是否将常量 b 强制设为 1。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 1,m 将被调整以使 y = m^x。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LINEST', - 't': 14, - 'd': '可通过使用最小二乘法计算与现有数据最佳拟合的直线,来计算某直线的统计值,然后返回描述此直线的数组。', - 'a': '可通过使用最小二乘法计算与现有数据最佳拟合的直线,来计算某直线的统计值,然后返回描述此直线的数组。', - 'm': [1, 4], - 'p': [{ - 'name': 'known_y', - 'detail': '关系表达式 y = mx + b 中已知的 y 值集合。\n\n如果 known_y 为二维数组或范围,则 known_x 的维数必须与之相同,或者省略此参数。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', - 'example': 'B2:B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'known_x', - 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = mx + b 中已知的可选 x 值集合。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', - 'example': 'A2:A10', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'const', - 'detail': '[可选 - 默认值为TRUE()] - 一个逻辑值,用于指定是否将常量 b 强制设为 0。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 0(零),m 将被调整以使 y = mx。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'stats', - 'detail': '[可选 - 默认值为FALSE()] - 一个逻辑值,用于指定是否返回附加回归统计值。\n\n如果详细为TRUE,除了对应于每个自变量的一组线性系数和y截距之外,LINEST还返回以下信息:\n\n每项系数和截距的标准误差、\n\n限定系数(介于0和1之间,1表示完全相关)、\n\n因变量值的标准误差、\n\nF统计或F观测值,指示所观测到的因变量和自变量变量之间的关系是随机的还是线性的、\n\n自由度,用于在参照表中查找F统计值以估算可信度、\n\n回归平方和,以及\n\n残差平方和。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'LOGEST', - 't': 14, - 'd': '在回归分析中,计算最符合数据的指数回归拟合曲线,并返回描述该曲线的数值数组。', - 'a': '在回归分析中,计算最符合数据的指数回归拟合曲线,并返回描述该曲线的数值数组。', - 'm': [1, 4], - 'p': [{ - 'name': 'known_y', - 'detail': '关系表达式 y = mx + b 中已知的 y 值集合。\n\n如果 known_y 为二维数组或范围,则 known_x 的维数必须与之相同,或者省略此参数。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', - 'example': 'B2:B10', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'known_x', - 'detail': '[可选 - 默认该数组为{1,2,3,...},其大小与 known_y 相同] - 关系表达式 y = mx + b 中已知的可选 x 值集合。\n\n如果 known_y 为一维数组或范围,known_x 则可代表二维数组或范围中的多个自变量。也就是说,如果 known_y 为单行,则将 known_x 中的每行解释为各自独立的值,类似情况也适用于 known_y 为单列的情况。', - 'example': 'A2:A10', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'const', - 'detail': '[可选 - 默认值为TRUE()] - 一个逻辑值,用于指定是否将常量 b 强制设为 0。\n\nTRUE() 表示 b 将按正常计算;\n\nFALSE() 表示 b 将被设为 0(零),m 将被调整以使 y = mx。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'stats', - 'detail': '[可选 - 默认值为FALSE()] - 一个逻辑值,用于指定是否返回附加回归统计值。\n\n如果详细为TRUE,则除了为每个自变量和系数 b 返回一组指数值之外,LOGEST 还将返回以下数据:\n\n每项指数和系数的标准误差、\n\n限定系数(介于 0 和 1 之间,1 表示完全相关)、\n\n因变量值的标准误差、\n\nF 统计或 F 观测值,指示所观测到的因变量和自变量之间的关系是随机的还是指数的、\n\n自由度 - 用于在参照表中查找 F 统计值以估算可信度、\n\n回归平方和,以及\n\n残差平方和。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'MDETERM', - 't': 14, - 'd': '返回一个数组的矩阵行列式的值。', - 'a': '返回一个数组的矩阵行列式的值。', - 'm': [1, 1], - 'p': [{ - 'name': 'array', - 'detail': '行数和列数相等的数值数组。', - 'example': 'A1:D4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MINVERSE', - 't': 14, - 'd': '返回数组中存储的矩阵的逆矩阵。', - 'a': '返回数组中存储的矩阵的逆矩阵。', - 'm': [1, 1], - 'p': [{ - 'name': 'array', - 'detail': '行数和列数相等的数值数组。', - 'example': 'A1:D4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'MMULT', - 't': 14, - 'd': '返回两个数组的矩阵乘积。结果矩阵的行数与 array1 的行数相同,矩阵的列数与 array2 的列数相同。', - 'a': '返回两个数组的矩阵乘积。结果矩阵的行数与 array1 的行数相同,矩阵的列数与 array2 的列数相同。', - 'm': [2, 2], - 'p': [{ - 'name': 'array1', - 'detail': '要进行矩阵乘法运算的第一个矩阵数组。\n\narray1 列数必须与 array2 的行数相同', - 'example': 'A1:B3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'array2', - 'detail': '要进行矩阵乘法运算的第二个矩阵数组。\n\narray2 的行数必须与 array1 列数相同', - 'example': 'C1:F2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SUMPRODUCT', - 't': 14, - 'd': '在给定的几组数组中,将数组间对应的元素相乘,并返回乘积之和。', - 'a': '在给定的几组数组中,将数组间对应的元素相乘,并返回乘积之和。', - 'm': [1, 255], - 'p': [{ - 'name': 'array1', - 'detail': '其相应元素需要进行相乘并求和的第一个数组参数。', - 'example': 'A2:C5', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }, { - 'name': 'array2', - 'detail': '[可选] - 其相应元素需要进行相乘并求和的其它数组参数。', - 'example': 'D2:F5', - 'require': 'o', - 'repeat': 'y', - 'type': 'rangenumber' - }] - }, { - 'n': 'ISFORMULA', - 't': 15, - 'd': '检查公式是否位于引用的单元格中。', - 'a': '检查公式是否位于引用的单元格中。', - 'm': [1, 1], - 'p': [{ - 'name': 'cell', - 'detail': '要检查是否存在公式的单元格。\n\n如果 cell 为包含公式的单元格,则 ISFORMULA 将返回 TRUE。如果 cell 为相应单元格范围,则当该范围内的首个单元格包含公式时,系统会返回 TRUE。如果是任何其他值,系统都将返回 FALSE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'CELL', - 't': 15, - 'd': '返回有关单元格的格式、位置或内容的信息。', - 'a': '返回有关单元格的格式、位置或内容的信息。', - 'm': [2, 2], - 'p': [{ - 'name': 'info_type', - 'detail': '一个文本值,指定要返回的单元格信息的类型。', - 'example': '"type"', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'reference', - 'detail': '需要其相关信息的单元格。', - 'example': 'C2', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'NA', - 't': 15, - 'd': '返回错误值 #N/A。', - 'a': '返回错误值 #N/A。', - 'm': [0, 0], - 'p': [] - }, { - 'n': 'ERROR_TYPE', - 't': 15, - 'd': '返回与其他单元格中的错误值相对应的数字。', - 'a': '返回与其他单元格中的错误值相对应的数字。', - 'm': [1, 1], - 'p': [{ - 'name': 'error_val', - 'detail': '用于查找错误号的单元格,虽然您也可以直接提供错误值。', - 'example': 'A3', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISBLANK', - 't': 15, - 'd': '检查所引用的单元格是否为空。', - 'a': '检查所引用的单元格是否为空。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '对要检查其是否为空的单元格的引用。\n\n如果是空单元格,则 TRUE;否则返回 FALSE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'ISERR', - 't': 15, - 'd': '检查某个值是否为 #N/A 以外的错误值。', - 'a': '检查某个值是否为 #N/A 以外的错误值。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要验证其是否为#N/A以外的错误类型的值。\n\n如果值是除#N/A之外的任何错误(包括#DIV/0!、#NAME?、#NULL!、#NUM!、#VALUE!和#REF!),ISERR将返回TRUE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISERROR', - 't': 15, - 'd': '检查某个值是否为错误值。', - 'a': '检查某个值是否为错误值。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要验证其是否为错误类型的值。\n\n只要值是某种错误值(包括#DIV/0!、#N/A、#NAME?、#NULL!、#NUM!、#VALUE!和#REF!),ISERROR就会返回TRUE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISLOGICAL', - 't': 15, - 'd': '检查某个值是 TRUE 还是 FALSE。', - 'a': '检查某个值是 TRUE 还是 FALSE。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要验证其为逻辑TRUE还是逻辑FALSE的值。\n\n*如果值为TRUE或FALSE,或为指向值为TRUE或FALSE的单元格的引用,ISLOGICAL将返回TRUE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISNA', - 't': 15, - 'd': '检查某个值是否为错误值 #N/A。', - 'a': '检查某个值是否为错误值 #N/A。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要与错误值#N/A进行比较的值。\n\n*如果值为#N/A或指向包含#N/A的单元格的引用,则ISNA将返回TRUE,否则返回FALSE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISNONTEXT', - 't': 15, - 'd': '检查某个值是否为非文本。', - 'a': '检查某个值是否为非文本。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要检查的文本。\n\n*如果参数为文本值或指向包含文本的单元格的引用,ISNONTEXT将返回FALSE,否则返回TRUE。\n\n当值为指向空单元格的引用时,ISNONTEXT会返回TRUE。\n\n当值为空字符串时,ISNONTEXT将返回FALSE,因为空串被视作文本。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISNUMBER', - 't': 15, - 'd': '检查某个值是否为数字。', - 'a': '检查某个值是否为数字。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要验证其是否为数字的值。\n\n*如果参数为数字或指向内容为数字值的单元格的引用,ISNUMBER将返回TRUE,否则返回FALSE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'ISREF', - 't': 15, - 'd': '检查某个值是否为有效的单元格引用。', - 'a': '检查某个值是否为有效的单元格引用。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要验证其是否为单元格引用的值。\n\n*如果参数是有效的单元格引用,ISREF将返回TRUE,否则返回FALSE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'ISTEXT', - 't': 15, - 'd': '检查某个值是否为文本。', - 'a': '检查某个值是否为文本。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要验证其是否为文本的值。\n\n如果参数为文本值或指向包含文本值的单元格的引用,ISTEXT将返回TRUE,否则返回FALSE。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TYPE', - 't': 15, - 'd': '返回数值的类型。', - 'a': '返回数值的类型。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要确定其类型的数据。\n\n数字 返回 1;\n\n文本 返回 2;\n\n逻辑值 返回 4;\n\n错误值 返回 16;\n\n数组 返回 64;', - 'example': 'C4', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'N', - 't': 15, - 'd': '返回转化为数值后的值。', - 'a': '返回转化为数值后的值。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为数字的参数。\n\n如果值为数字,则返回该数字。\n\n如果值为日期,则返回该日期的序列号。\n\n如果值为TRUE,则返回1。\n\n如果值为FALSE,则返回0。\n\n如果值为错误值,则返回错误值。\n\n如果值为其他值,则返回0。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TO_DATE', - 't': 16, - 'd': '将指定的数字转换为日期。', - 'a': '将指定的数字转换为日期。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为日期的参数或其单元格引用。\n\n如果值为数字或指向内容为数值的单元格的引用,TO_DATE会将值转换为相应的日期并返回,值代表从十二月30日到对应的日期之间的天数,\n\n负值表示对应的日期在十二月30日之前,而小数值则代表一天中从午夜算起的时间。\n如果值不是数字或指向内容为数值的单元格的引用,则TO_DATE将在不做任何修改的情况下返回值。', - 'example': '25405', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TO_PURE_NUMBER', - 't': 16, - 'd': '将给定的日期/时间、百分比、货币金额或其他格式的数值转换为不带格式的纯数字。', - 'a': '将给定的日期/时间、百分比、货币金额或其他格式的数值转换为不带格式的纯数字。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为纯数字的参数或其单元格引用。\n\n如果值为数字或指向包含数值的单元格的引用,TO_PURE_NUMBER将以不带任何格式与解释的形式返回值。\n\n如果值不是数字或指向内容为数值的单元格的引用,则TO_PERCENT将在不做任何修改的情况下返回值。', - 'example': '50%', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TO_TEXT', - 't': 16, - 'd': '将给定的数字值转换为文本格式。', - 'a': '将给定的数字值转换为文本格式。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为文本的参数或其单元格引用。\n\n如果值为数字或指向包含数值的单元格的引用,TO_TEXT将返回字符串形式的值,并保持现有格式。即原为货币的仍为货币,原为十进制数的仍为十进制数,原为百分比的仍为百分比,原为日期的仍为日期。\n\n如果值不是数字或指向内容为数值的单元格的引用,则TO_TEXT将在不做任何修改的情况下返回值。', - 'example': '24', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'TO_DOLLARS', - 't': 16, - 'd': '将指定的数字转换为美元金额。', - 'a': '将指定的数字转换为美元金额。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为美元金额的参数或其单元格引用。\n\n如果值不是数字或指向内容为数值的单元格的引用,则 TO_DOLLARS 将在不做任何修改的情况下返回值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'TO_PERCENT', - 't': 16, - 'd': '将指定的数字转换为百分比。', - 'a': '将指定的数字转换为百分比。', - 'm': [1, 1], - 'p': [{ - 'name': 'value', - 'detail': '要转换为百分比的参数或其单元格引用。\n\n如果值为数字或指向包含数值的单元格的引用,TO_PERCENT会以1 = 100%为标准,将值转换为百分比。\n\n如果值不是数字或指向内容为数值的单元格的引用,则TO_PERCENT将在不做任何修改的情况下返回值。', - 'example': 'A2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'DGET', - 't': 17, - 'd': '使用 SQL 式查询,从列表或数据库的列中提取符合指定条件的单个值。', - 'a': '使用 SQL 式查询,从列表或数据库的列中提取符合指定条件的单个值。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DMAX', - 't': 17, - 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最大数字。', - 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最大数字。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DMIN', - 't': 17, - 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最小数字。', - 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的最小数字。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DAVERAGE', - 't': 17, - 'd': '使用 SQL 式查询,对列表或数据库中满足指定条件的记录字段(列)中的数值求平均值。', - 'a': '使用 SQL 式查询,对列表或数据库中满足指定条件的记录字段(列)中的数值求平均值。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DCOUNT', - 't': 17, - 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中包含数字的单元格的个数。', - 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中包含数字的单元格的个数。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DCOUNTA', - 't': 17, - 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的非空单元格的个数。', - 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的非空单元格的个数。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DPRODUCT', - 't': 17, - 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数值的乘积。', - 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数值的乘积。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DSTDEV', - 't': 17, - 'd': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体标准偏差。', - 'a': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体标准偏差。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DSTDEVP', - 't': 17, - 'd': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为样本总体计算出的总体标准偏差。', - 'a': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为样本总体计算出的总体标准偏差。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DSUM', - 't': 17, - 'd': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数字之和。', - 'a': '使用 SQL 式查询,返回列表或数据库中满足指定条件的记录字段(列)中的数字之和。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DVAR', - 't': 17, - 'd': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体方差。', - 'a': '使用 SQL 式查询,返回利用列表或数据库中满足指定条件的记录字段(列)中的数字作为一个样本估算出的总体方差。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - 'n': 'DVARP', - 't': 17, - 'd': '使用 SQL 式查询,通过使用列表或数据库中满足指定条件的记录字段(列)中的数字计算样本总体的样本总体方差。', - 'a': '使用 SQL 式查询,通过使用列表或数据库中满足指定条件的记录字段(列)中的数字计算样本总体的样本总体方差。', - 'm': [3, 3], - 'p': [{ - 'name': 'database', - 'detail': '构成列表或数据库的单元格区域,列表的第一行包含每一列的标签。', - 'example': 'A2:F20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }, { - 'name': 'field', - 'detail': '指定 database 中的哪一列包含要提取和用于计算的值。\n\nfield 可以是与 database 第一行中某个列标题对应的文本标签,也可以是指定相关列的数字索引,第一列的索引值为 1。', - 'example': 'G2', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangeall' - }, { - 'name': 'criteria', - 'detail': '包含所指定条件的单元格区域。计算之前将使用这些条件来过滤 database 中的值。', - 'example': 'A22:D23', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - }] - }, { - "n": "AGE_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出年龄。支持15为或18位身份证", - "a": "根据身份证号得到年龄。", - "m": [1, 2], - "p": [{ - "name": "身份证号", - "example": "A1", - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "截止日期", - "example": '"2017-10-01"', - "detail": "年龄计算的截止日期或范围,默认为当日。", - "require": "o", - "repeat": "n", - "type": "rangedatetime" - }] - }, - // SEX_BY_IDCARD - { - "n": "SEX_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出性别。支持15为或18位身份证", - "a": "根据身份证号得到性别。", - "m": [1, 1], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - // BIRTHDAY_BY_IDCARD - { - "n": "BIRTHDAY_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出生日。支持15为或18位身份证", - "a": "根据身份证号得到生日。", - "m": [1, 2], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "生日格式", - "example": '0', - "detail": "日期类型,默认0:[1900/01/01], 1:[1900-01-01], 2:[1900年1月1日]", - "require": "o", - "repeat": "n", - "type": "rangeall" - }] - }, - // PROVINCE_BY_IDCARD - { - "n": "PROVINCE_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出籍贯的省份。支持15为或18位身份证", - "a": "根据身份证号得到籍贯的省份。", - "m": [1, 1], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - // CITY_BY_IDCARD - { - "n": "CITY_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出籍贯的城市。支持15为或18位身份证", - "a": "根据身份证号得到籍贯的城市。", - "m": [1, 1], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - // STAR_BY_IDCARD - { - "n": "STAR_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出星座。支持15为或18位身份证", - "a": "根据身份证号得到星座。", - "m": [1, 1], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - // ANIMAL_BY_IDCARD - { - "n": "ANIMAL_BY_IDCARD", - "t": "3", - "d": "根据中国身份证号计算出生肖(鼠、牛、虎、兔...)。支持15为或18位身份证", - "a": "根据身份证号得到生肖。", - "m": [1, 1], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - // ISIDCARD - { - "n": "ISIDCARD", - "t": "3", - "d": "验证身份证的格式是否正确。支持15为或18位身份证", - "a": "验证身份证格式正确性。", - "m": [1, 1], - "p": [{ - "name": "身份证号", - "example": '"31033519900101XXXX"', - "detail": "15位或者18位的身份证号或范围。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - // DM_TEXT_CUTWORD - { - "n": "DM_TEXT_CUTWORD", - "t": "4", - "d": "文本分词。把一连串文字拆分为一系列单独词语", - "a": "中文文本分词。", - "m": [1, 2], - "p": [{ - "name": "文本", - "example": '"我来到北京清华大学"', - "detail": "任意需要分词的文本。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "分词模式", - "example": '0', - "detail": "默认为0[精确模式], 1[全模式], 2[搜索引擎模式]。", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DM_TEXT_TFIDF - { - "n": "DM_TEXT_TFIDF", - "t": "4", - "d": "采用tf-idf算法进行关键词提取。从一连串文字中识别关键词", - "a": "tf-idf关键词识别。", - "m": [1, 3], - "p": [{ - "name": "文本", - "example": '"我来到北京清华大学"', - "detail": "任意需要分词的文本。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "关键词个数", - "example": '20', - "detail": "算法返回的关键词个数,默认20", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }, { - "name": "语料库", - "example": '1', - "detail": "选择特定领域的语料库,默认0[通用], 1[金融], 2[医疗]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DM_TEXT_TEXTRANK - { - "n": "DM_TEXT_TEXTRANK", - "t": "4", - "d": "采用TextRank算法进行关键词提取。从一连串文字中识别关键词", - "a": "TextRank关键词识别。", - "m": [1, 3], - "p": [{ - "name": "文本", - "example": '"我来到北京清华大学"', - "detail": "任意需要分词的文本。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "关键词个数", - "example": '20', - "detail": "算法返回的关键词个数,默认20", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }, { - "name": "语料库", - "example": '1', - "detail": "选择特定领域的语料库,默认0[通用], 1[金融], 2[医疗]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DATA_CN_STOCK_CLOSE - { - "n": "DATA_CN_STOCK_CLOSE", - "t": "5", - "d": "根据股票代码和日期,返回A股对应股票收盘价。", - "a": "返回A股对应股票收盘价。", - "m": [1, 3], - "p": [{ - "name": "股票代码", - "example": '"000001"', - "detail": "6位股票代码,必填项。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "日期", - "example": '2015-01-08', - "detail": "股票的交易日,默认为最新交易日", - "require": "o", - "repeat": "n", - "type": "rangedate" - }, { - "name": "复权除权", - "example": '0', - "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DATA_CN_STOCK_OPEN - { - "n": "DATA_CN_STOCK_OPEN", - "t": "5", - "d": "根据股票代码和日期,返回A股对应股票开盘价。", - "a": "返回A股对应股票开盘价。", - "m": [1, 3], - "p": [{ - "name": "股票代码", - "example": '"000001"', - "detail": "6位股票代码,必填项。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "日期", - "example": '2015-01-08', - "detail": "股票的交易日,默认为最新交易日", - "require": "o", - "repeat": "n", - "type": "rangedate" - }, { - "name": "复权除权", - "example": '0', - "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DATA_CN_STOCK_MAX - { - "n": "DATA_CN_STOCK_MAX", - "t": "5", - "d": "根据股票代码和日期,返回A股对应股票最高价。", - "a": "返回A股对应股票最高价。", - "m": [1, 3], - "p": [{ - "name": "股票代码", - "example": '"000001"', - "detail": "6位股票代码,必填项。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "日期", - "example": '2015-01-08', - "detail": "股票的交易日,默认为最新交易日", - "require": "o", - "repeat": "n", - "type": "rangedate" - }, { - "name": "复权除权", - "example": '0', - "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DATA_CN_STOCK_MIN - { - "n": "DATA_CN_STOCK_MIN", - "t": "5", - "d": "根据股票代码和日期,返回A股对应股票最低价。", - "a": "返回A股对应股票最低价。", - "m": [1, 3], - "p": [{ - "name": "股票代码", - "example": '"000001"', - "detail": "6位股票代码,必填项。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "日期", - "example": '2015-01-08', - "detail": "股票的交易日,默认为最新交易日", - "require": "o", - "repeat": "n", - "type": "rangedate" - }, { - "name": "复权除权", - "example": '0', - "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DATA_CN_STOCK_VOLUMN - { - "n": "DATA_CN_STOCK_VOLUMN", - "t": "5", - "d": "根据股票代码和日期,返回A股对应股票成交量。", - "a": "返回A股对应股票成交量。", - "m": [1, 3], - "p": [{ - "name": "股票代码", - "example": '"000001"', - "detail": "6位股票代码,必填项。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "日期", - "example": '2015-01-08', - "detail": "股票的交易日,默认为最新交易日", - "require": "o", - "repeat": "n", - "type": "rangedate" - }, { - "name": "复权除权", - "example": '0', - "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // DATA_CN_STOCK_AMOUNT - { - "n": "DATA_CN_STOCK_AMOUNT", - "t": "5", - "d": "根据股票代码和日期,返回A股对应股票成交额。", - "a": "返回A股对应股票成交额。", - "m": [1, 3], - "p": [{ - "name": "股票代码", - "example": '"000001"', - "detail": "6位股票代码,必填项。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, { - "name": "日期", - "example": '2015-01-08', - "detail": "股票的交易日,默认为最新交易日", - "require": "o", - "repeat": "n", - "type": "rangedate" - }, { - "name": "复权除权", - "example": '0', - "detail": "选择股票的除权复权类型,默认0[前复权], 1[原始价格], 2[后复权]", - "require": "o", - "repeat": "n", - "type": "rangenumber" - }] - }, - // ISDATE - { - "n": "ISDATE", - "t": "6", - "d": "验证日期的格式是否正确。支持多种日期格式", - "a": "验证日期格式正确性。", - "m": [1, 1], - "p": [{ - "name": "日期", - "example": '"1990-01-01"', - "detail": "日期值,例如1990/01/01, 1990年1月1日等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }] - }, - //sparklines函数,线图 - { - "n": "LINESPLINES", - "t": "3", - "d": "生成嵌入在单元格内的折线图sparklines,用于描述数据的连续走势", - "a": "生成单元格折线图", - "m": [1, 8], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //lineColor - { - "name": "线条颜色", - "example": '#2ec7c9', - "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#2ec7c9", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - // { - // "name": "填充颜色", - // "example": '#CCF3F4', - // "detail": "形成面积图,同线条颜色配置,默认0不显示", - // "require": "o", - // "repeat": "n", - // "type": "rangeall" - // }, - //lineWidth - { - "name": "线条粗细", - "example": '1', - "detail": "折线图线段粗细,默认为1px", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //normalRangeMin和normalRangeMax设为相同的值,min、max、avg、median需要计算 - { - "name": "辅助线", - "example": 'avg', - "detail": "一条横线,可以是min、max、avg、median、范围或自定义数值,默认0无", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //normalRangeColor - { - "name": "辅助线颜色", - "example": '#000', - "detail": "辅助线的颜色设置,同线条颜色配置,默认#000", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //maxSpotColor - { - "name": "最大值标识", - "example": '#fc5c5c', - "detail": "标识线图最大值,同线条颜色配置,默认0不显示", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //minSpotColor - { - "name": "最小值标识", - "example": '#fc5c5c', - "detail": "标识线图最大值,同线条颜色配置,默认0不显示", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //spotRadius - { - "name": "标识大小", - "example": '1.5', - "detail": "最大值和最小值的标识大小设置,默认为1.5", - "require": "o", - "repeat": "n", - "type": "rangeall" - }] - }, - //sparklines面积图 - { - "n": "AREASPLINES", - "t": "3", - "d": "生成嵌入在单元格内的面积图sparklines,一般用于描述数据的连续累积值走势", - "a": "生成单元格面积图", - "m": [1, 5], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //lineColor - { - "name": "线条颜色", - "example": '#2ec7c9', - "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#2ec7c9", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //fillColor - { - "name": "填充颜色", - "example": '#CCF3F4', - "detail": "形成面积图,同线条颜色配置,默认0不显示", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //lineWidth - { - "name": "线条粗细", - "example": '1', - "detail": "折线图线段粗细,默认为1px", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //normalRangeMin和normalRangeMax设为相同的值,min、max、avg、median需要计算 - { - "name": "辅助线", - "example": 'avg', - "detail": "一条横线,可以是min、max、avg、median、范围或自定义数值,默认0无", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //normalRangeColor - { - "name": "辅助线颜色", - "example": '#000', - "detail": "辅助线的颜色设置,同线条颜色配置,默认#000", - "require": "o", - "repeat": "n", - "type": "rangeall" - } - // //maxSpotColor - // { - // "name": "最大值标识", - // "example": '#fc5c5c', - // "detail": "标识线图最大值,同线条颜色配置,默认0不显示", - // "require": "o", - // "repeat": "n", - // "type": "rangeall" - // }, - // //minSpotColor - // { - // "name": "最小值标识", - // "example": '#fc5c5c', - // "detail": "标识线图最大值,同线条颜色配置,默认0不显示", - // "require": "o", - // "repeat": "n", - // "type": "rangeall" - // }, - // //spotRadius - // { - // "name": "标识大小", - // "example": '1.5', - // "detail": "最大值和最小值的标识大小设置,默认为1.5", - // "require": "o", - // "repeat": "n", - // "type": "rangeall" - // } - ] - }, - //sparklines柱状图 - { - "n": "COLUMNSPLINES", - "t": "3", - "d": "生成嵌入在单元格内的垂直柱状图sparklines,一般用于描述离散数据之间的大小情况", - "a": "生成单元格垂直柱状图", - "m": [1, 6], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //barSpacing - { - "name": "柱条间隔", - "example": '1', - "detail": "柱条之间的间隔距离,默认为1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //barColor - { - "name": "柱条颜色", - "example": '#fc5c5c', - "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#fc5c5c", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //negBarColor - { - "name": "负向柱条颜色", - "example": '#97b552', - "detail": "负向柱条颜色设置,代表负值的颜色,同柱条颜色配置,默认#97b552", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //chartRangeMax - { - "name": "最大值", - "example": '100', - "detail": "柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //colorMap - { - "name": "色板", - "example": '#97b552', - "detail": "调色板可以单独设置每个柱条的颜色,可设置多个,支持两种格式:1颜色例如#000,代表第一个柱的颜色是黑色;2数值范围:颜色,例如-2:#000表示数值为-2的柱为黑色,0:5:#000表示数值0-5的柱为黑色,默认为空", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines累积柱状图 - { - "n": "STACKCOLUMNSPLINES", - "t": "3", - "d": "生成嵌入在单元格内的累积垂直柱状图sparklines,一般用于描述离散数据多个维度的数值大小", - "a": "生成单元格累积垂直柱状图", - "m": [1, 5], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //stackconfig - { - "name": "按列堆积", - "example": '1', - "detail": "如果需要按行堆积则本项设为false或0,默认为是1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //barSpacing - { - "name": "柱条间隔", - "example": '1', - "detail": "柱条之间的间隔距离,默认为1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //chartRangeMax - { - "name": "最大值", - "example": '100', - "detail": "累积柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //stackedBarColor - { - "name": "累积色板", - "example": '#97b552', - "detail": "调色板可以单独设置每个维度的柱条颜色,可设置为A1:A10等范围,默认为#2ec7c9, #fc5c5c, #5ab1ef, #ffb980...", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines条形图 - { - "n": "BARSPLINES", - "t": "3", - "d": "生成嵌入在单元格内的横向条形图sparklines,一般用于描述离散数据之间的大小情况", - "a": "生成单元格横向条形图", - "m": [1, 6], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //barSpacing - { - "name": "柱条间隔", - "example": '1', - "detail": "柱条之间的间隔距离,默认为1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //barColor - { - "name": "柱条颜色", - "example": '#fc5c5c', - "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#fc5c5c", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //negBarColor - { - "name": "负向柱条颜色", - "example": '#97b552', - "detail": "负向柱条颜色设置,代表负值的颜色,同柱条颜色配置,默认#97b552", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //chartRangeMax - { - "name": "最大值", - "example": '100', - "detail": "柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //colorMap - { - "name": "色板", - "example": '#97b552', - "detail": "调色板可以单独设置每个柱条的颜色,可设置多个,支持两种格式:1颜色例如#000,代表第一个柱的颜色是黑色;2数值范围:颜色,例如-2:#000表示数值为-2的柱为黑色,0:5:#000表示数值0-5的柱为黑色,默认为空", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines累积条形图 - { - "n": "STACKBARSPLINES", - "t": "3", - "d": "生成嵌入在单元格内的累积横向条形图sparklines,一般用于描述离散数据多个维度的数值大小", - "a": "生成单元格累积横向条形图", - "m": [1, 5], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //stackconfig - { - "name": "按列堆积", - "example": '1', - "detail": "如果需要按行堆积则本项设为false或0,默认为是1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //barSpacing - { - "name": "柱条间隔", - "example": '1', - "detail": "柱条之间的间隔距离,默认为1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //chartRangeMax - { - "name": "最大值", - "example": '100', - "detail": "累积柱图最大值,用于规范柱图长度,默认为自动计算false、auto、null", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //stackedBarColor - { - "name": "累积色板", - "example": '#97b552', - "detail": "调色板可以单独设置每个维度的柱条颜色,可设置为A1:A10等范围,默认为#2ec7c9, #fc5c5c, #5ab1ef, #ffb980...", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines离散图 - { - "n": "DISCRETESPLINES", - "t": "3", - "d": "生成嵌入在单元格内的离散图sparklines,一般用于描述离散数据走势", - "a": "生成单元格离散图", - "m": [1, 4], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //thresholdValue - { - "name": "分割阈值", - "example": '1', - "detail": "离散图柱形颜色的区分,例如:该值为0,则大于0为蓝色,小于0为红色,默认为0", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //lineColor - { - "name": "阈值以上颜色", - "example": '#2ec7c9', - "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#2ec7c9", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //thresholdColor - { - "name": "阈值以下颜色", - "example": '#fc5c5c', - "detail": "阈值以下柱条颜色设置,同阈值以上颜色,默认#fc5c5c", - "require": "o", - "repeat": "n", - "type": "rangeall" - } - ] - }, - //sparklines三态图 - { - "n": "TRISTATESPLINES", - "t": "3", - "d": "生成嵌入在单元格内的三态图sparklines,一般用于描述三种态势的走势例如胜负平", - "a": "生成单元格离散图", - "m": [1, 6], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //barSpacing - { - "name": "柱条间隔", - "example": '1', - "detail": "柱条之间的间隔距离,默认为1", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //posBarColor - { - "name": "柱条颜色", - "example": '#fc5c5c', - "detail": "线图的线条颜色,可以是否个范围A1、色表索引数值或者具体颜色值,设置为0或false则不显示,支持regx、rgb、rgba等。默认#fc5c5c", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //negBarColor - { - "name": "负向柱条颜色", - "example": '#97b552', - "detail": "负向柱条颜色设置,代表负值的颜色,同柱条颜色配置,默认#97b552", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //zeroBarColor - { - "name": "零值柱条颜色", - "example": '#999', - "detail": "零值柱条颜色设置,代表0值颜色,同柱条颜色配置,默认#999", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //colorMap - { - "name": "色板", - "example": '#97b552', - "detail": "调色板可以单独设置每个柱条的颜色,可设置多个,支持两种格式:1颜色例如#000,代表第一个柱的颜色是黑色;2数值范围:颜色,例如-2:#000表示数值为-2的柱为黑色,0-5:#000表示数值0-5的柱为黑色,默认为空", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines饼图 - { - "n": "PIESPLINES", - "t": "3", - "d": "生成嵌入在单元格内的饼图sparklines,一般用于描述数据占比", - "a": "生成单元格饼图", - "m": [1, 5], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //offset - { - "name": "旋转角度", - "example": '0', - "detail": "饼图的旋转角度,默认为0", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //borderWidth - { - "name": "饼图边框", - "example": '0', - "detail": "饼图边框大小,默认为无0", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //borderColor - { - "name": "边框颜色", - "example": '#000', - "detail": "饼图边框颜色,默认为#000", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //sliceColors - { - "name": "饼图色板", - "example": '#97b552', - "detail": "调色板可以设置切片的颜色,可设置为A1:A10等范围,默认为#2ec7c9, #fc5c5c, #5ab1ef, #ffb980...", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines箱线图 - { - "n": "BOXSPLINES", - "t": "3", - "d": "生成嵌入在单元格内的箱线图sparklines,一般用于描述数据集的统计分布", - "a": "生成单元格箱线图", - "m": [1, 4], - "p": [ - //data - { - "name": "数据范围", - "example": 'A1:A20', - "detail": "数据范围,数值才能被有效计算,例如A1:A20, {1,2,3,4,5}等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //outlierIQR,如果为0或false则showOutliers设为false,否则为true - { - "name": "离群点比例", - "example": '1.5', - "detail": "离群点的阈值范围,如果为0或false则不显示,默认为1.5倍", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //target - { - "name": "目标点值", - "example": '10', - "detail": "箱线图上的目标值设置,默认为false不显示", - "require": "o", - "repeat": "n", - "type": "rangeall" - }, - //spotRadius - { - "name": "数据点大小", - "example": '1.5', - "detail": "目标点和利群点的半径大小设置,默认为1.5", - "require": "o", - "repeat": "n", - "type": "rangeall" - } - ] - }, - //sparklines子弹图 - { - "n": "BULLETSPLINES", - "t": "3", - "d": "生成嵌入在单元格内的子弹图sparklines,一般用于描述任务达成率", - "a": "生成单元格子弹图", - "m": [2, 3], - "p": [ - //目标data1 - { - "name": "目标", - "example": '10', - "detail": "达成的目标值,数值才能被有效计算,例如A1, 100等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //目前达成data2 - { - "name": "实际完成", - "example": '8', - "detail": "目前完成值,数值才能被有效计算,例如A1, 100等。", - "require": "m", - "repeat": "n", - "type": "rangeall" - }, - //对比值datax - { - "name": "对比值", - "example": '12', - "detail": "对比值,例如超额、最低、获奖底线等,数值才能被有效计算,例如A1, 100等。可以设置最多9个对比值", - "require": "o", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //sparklines组合图,支持多个类型的图画在同一个单元格 - { - "n": "COMPOSESPLINES", - "t": "3", - "d": "支持多个类型的图画在同一个单元格,每个参数代表一个sparklines图", - "a": "组合sparklines图到一个单元格", - "m": [1, 1], - "p": [ - //data - { - "name": "图设置", - "example": 'PIESPLINES(A1:A20)', - "detail": "sparklines图设置,例如A1:A20, 一个完成的饼图、线图设置等。", - "require": "m", - "repeat": "y", - "type": "rangeall" - } - ] - }, - //动态数组公式 - { - 'n': 'SORT', - 't': '14', - 'd': '返回数组中元素的排序数组。返回的数组与提供的数组参数形状相同。', - 'a': '返回数组中元素的排序数组。返回的数组与提供的数组参数形状相同。', - 'm': [1, 4], - 'p': [{ - 'name': 'array', - 'detail': '要排序的范围或数组。', - 'example': 'A2:A17', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'sort_index', - 'detail': '[可选] - 表示要排序的行或列的数字。(默认row1/col1)', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'sort_order', - 'detail': '[可选] - 表示所需排序顺序的数字;1表示升序(默认),-1表示降序。', - 'example': '-1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'by_col', - 'detail': '[可选] - 表示所需排序方向的逻辑值;按行排序为FALSE()(默认),按列排序为TRUE()。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'FILTER', - 't': '14', - 'd': '基于一个布尔(真/假)数组过滤一个数组。', - 'a': '基于一个布尔(真/假)数组过滤一个数组。', - 'm': [2, 3], - 'p': [{ - 'name': 'array', - 'detail': '要筛选的数组或范围。', - 'example': 'A5:D20', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - },{ - 'name': 'include', - 'detail': '布尔数组,其高度或宽度与数组相同', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'range' - },{ - 'name': 'if_empty', - 'detail': '[可选] - 如果包含数组中的所有值都为空(filter不返回任何值),则返回的值。', - 'example': '""', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'UNIQUE', - 't': '14', - 'd': '返回列表或区域中的唯一值的列表。', - 'a': '返回列表或区域中的唯一值的列表。', - 'm': [1, 3], - 'p': [{ - 'name': 'array', - 'detail': '从其返回唯一值的数组或区域。', - 'example': 'A2:B26', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'by_col', - 'detail': '[可选] - 逻辑值,指示如何比较;按行 = FALSE() 或省略;按列 = TRUE()。', - 'example': 'TRUE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - },{ - 'name': 'occurs_once', - 'detail': '[可选] - 逻辑值,仅返回唯一值中出现一次 = TRUE();包括所有唯一值 = FALSE() 或省略。', - 'example': 'FALSE()', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangeall' - }] - }, { - 'n': 'RANDARRAY', - 't': '14', - 'd': '返回 0 到 1 之间的随机数字数组。', - 'a': '返回 0 到 1 之间的随机数字数组。', - 'm': [0, 2], - 'p': [{ - 'name': 'rows', - 'detail': '[可选] - 要返回的行数。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'cols', - 'detail': '[可选] - 要返回的列数。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, { - 'n': 'SEQUENCE', - 't': '14', - 'd': '生成数字序列的列表。', - 'a': '生成数字序列的列表。', - 'm': [1, 4], - 'p': [{ - 'name': 'rows', - 'detail': '要返回的行数。', - 'example': '1', - 'require': 'm', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'cols', - 'detail': '[可选] - 要返回的列数。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'start', - 'detail': '[可选] - 序列中的第一个数字。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - },{ - 'name': 'step', - 'detail': '[可选] - 序列中每个序列值的增量。', - 'example': '1', - 'require': 'o', - 'repeat': 'n', - 'type': 'rangenumber' - }] - }, - ]; - - luckysheet.functionImplementation = { - "SUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - if(luckysheet.getObjType(data) == "boolean"){ - if(data.toString().toLowerCase() == "true"){ - dataArr.push(1); - } - else if(data.toString().toLowerCase() == "false"){ - dataArr.push(0); - } - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - dataArr.push(data); - } - } - } - - var sum = 0; - - if(dataArr.length > 0){ - for(var i = 0; i < dataArr.length; i++){ - if(luckysheet.func_methods.valueIsError(dataArr[i])){ - return dataArr[i]; - } - - if(!luckysheet.func_methods.isRealNum(dataArr[i])){ - continue; - } - - sum += parseFloat(dataArr[i]); - } - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AVERAGE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else{ - dataArr = dataArr.concat(data); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - dataArr.push(data); - } - } - - var sum = 0, count = 0; - - for(var i = 0; i < dataArr.length; i++){ - if(luckysheet.func_methods.valueIsError(dataArr[i])){ - return dataArr[i]; - } - else if(!luckysheet.func_methods.isRealNum(dataArr[i])){ - return luckysheet.formula.error.v; - } - - sum += parseFloat(dataArr[i]); - count++; - } - - if(count == 0){ - return luckysheet.formula.error.d; - } - - return sum / count; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUNT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else{ - dataArr = dataArr.concat(data); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - if(luckysheet.getObjType(data) == "boolean"){ - if(data.toString().toLowerCase() == "true"){ - dataArr.push(1); - } - else if(data.toString().toLowerCase() == "false"){ - dataArr.push(0); - } - } - else{ - dataArr.push(data); - } - } - } - - var count = 0; - - for(var i = 0; i < dataArr.length; i++){ - if(luckysheet.func_methods.isRealNum(dataArr[i])){ - count++; - } - } - - return count; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUNTA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data)); - } - else{ - dataArr = dataArr.concat(data); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - dataArr.push(data); - } - } - - return dataArr.length; - } - catch (err) { - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MAX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else{ - dataArr = dataArr.concat(data); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - dataArr.push(data); - } - } - - var max = null; - - for(var i = 0; i < dataArr.length; i++){ - if(luckysheet.func_methods.valueIsError(dataArr[i])){ - return dataArr[i]; - } - - if(!luckysheet.func_methods.isRealNum(dataArr[i])){ - continue; - } - - if(max == null || parseFloat(dataArr[i]) > max){ - max = parseFloat(dataArr[i]); - } - } - - return max == null ? 0 : max; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else{ - dataArr = dataArr.concat(data); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - dataArr.push(data); - } - } - - var min = null; - - for(var i = 0; i < dataArr.length; i++){ - if(luckysheet.func_methods.valueIsError(dataArr[i])){ - return dataArr[i]; - } - - if(!luckysheet.func_methods.isRealNum(dataArr[i])){ - continue; - } - - if(min == null || parseFloat(dataArr[i]) < min){ - min = parseFloat(dataArr[i]); - } - } - - return min == null ? 0 : min; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AGE_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - var birthday = window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(UUserCard); - if(luckysheet.func_methods.valueIsError(birthday)){ - return birthday; - } - - birthday = moment(birthday); - - var cuurentdate = moment(); - if(arguments.length == 2){ - cuurentdate = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(cuurentdate)){ - return cuurentdate; - } - - cuurentdate = moment(cuurentdate); - } - - var age = cuurentdate.diff(birthday, "years"); - - if(age < 0 || age.toString() == "NaN"){ - return luckysheet.formula.error.v; - } - - return age; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SEX_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) { - return "男"; - } - else { - return "女"; - } - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BIRTHDAY_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - var birthday = ""; - if (UUserCard.length == 15) { - var year = "19" + UUserCard.substring(6, 8) + "/" + UUserCard.substring(8, 10) + "/" + UUserCard.substring(10, 12); - birthday = year; - } - else if (UUserCard.length == 18) { - var year = UUserCard.substring(6, 10) + "/" + UUserCard.substring(10, 12) + "/" + UUserCard.substring(12, 14); - birthday = year; - } - - //生日格式 - var datetype = 0; - if (arguments[1] != null) { - datetype = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(datetype)){ - return datetype; - } - } - - if(!luckysheet.func_methods.isRealNum(datetype)){ - return luckysheet.formula.error.v; - } - - datetype = parseInt(datetype); - - if(datetype < 0 || datetype > 2){ - return luckysheet.formula.error.v; - } - - if(parseInt(datetype) == 0){ - return birthday; - } - else if(parseInt(datetype) == 1){ - return moment(birthday).format("YYYY-MM-DD"); - } - else if(parseInt(datetype) == 2){ - return moment(birthday).format("YYYY年M月D日"); - } - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PROVINCE_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - var native = "未知"; - var provinceArray = luckysheet.formula.classlist.province; - - if (UUserCard.substring(0, 2) in provinceArray) { - native = provinceArray[UUserCard.substring(0, 2)]; - } - - return native; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CITY_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - var dataNum = cityData.length, - native = "未知"; - - for (var i = 0; i < dataNum; i++) { - if (UUserCard.substring(0, 6) == cityData[i].code) { - native = cityData[i].title; - break; - } - } - - return native; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STAR_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - var birthday = window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(UUserCard); - if(luckysheet.func_methods.valueIsError(birthday)){ - return birthday; - } - - birthday = new Date(birthday); - - var month = birthday.getMonth(), - day = birthday.getDate(); - - var d = new Date(1999, month, day, 0, 0, 0); - var arr = []; - arr.push(["魔羯座", new Date(1999, 0, 1, 0, 0, 0)]); - arr.push(["水瓶座", new Date(1999, 0, 20, 0, 0, 0)]); - arr.push(["双鱼座", new Date(1999, 1, 19, 0, 0, 0)]); - arr.push(["白羊座", new Date(1999, 2, 21, 0, 0, 0)]); - arr.push(["金牛座", new Date(1999, 3, 21, 0, 0, 0)]); - arr.push(["双子座", new Date(1999, 4, 21, 0, 0, 0)]); - arr.push(["巨蟹座", new Date(1999, 5, 22, 0, 0, 0)]); - arr.push(["狮子座", new Date(1999, 6, 23, 0, 0, 0)]); - arr.push(["处女座", new Date(1999, 7, 23, 0, 0, 0)]); - arr.push(["天秤座", new Date(1999, 8, 23, 0, 0, 0)]); - arr.push(["天蝎座", new Date(1999, 9, 23, 0, 0, 0)]); - arr.push(["射手座", new Date(1999, 10, 22, 0, 0, 0)]); - arr.push(["魔羯座", new Date(1999, 11, 22, 0, 0, 0)]); - //console.log(birthday, arr, i); - for (var i = arr.length - 1; i >= 0; i--) { - if (d >= arr[i][1]) { - return arr[i][0]; - } - } - - return "未找到匹配星座信息"; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ANIMAL_BY_IDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //身份证号 - var UUserCard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(UUserCard)){ - return UUserCard; - } - - if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) { - return luckysheet.formula.error.v; - } - - var birthday = window.luckysheet_function.BIRTHDAY_BY_IDCARD.f(UUserCard); - if(luckysheet.func_methods.valueIsError(birthday)){ - return birthday; - } - - birthday = new Date(birthday); - - var list = new Array("猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗"); - var index = (parseInt(birthday.getFullYear()) + 9) % 12; - - if (index != null && !isNaN(index)) { - return list[index]; - } - else { - return "未找到匹配生肖信息"; - } - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISIDCARD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var idcard = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(idcard)){ - return idcard; - } - - var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; - - if(reg.test(idcard)){ - return true - } - else{ - return false; - } - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DM_TEXT_CUTWORD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //任意需要分词的文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - //分词模式 - var datetype = 0; - if (arguments[1] != null) { - datetype = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(datetype)){ - return datetype; - } - } - - if(!luckysheet.func_methods.isRealNum(datetype)){ - return luckysheet.formula.error.v; - } - - datetype = parseInt(datetype); - - if(datetype != 0 && datetype != 1 && datetype != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/cutword", { - "text": text, - "type": datetype - }, function(data) { - var d = [].concat(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DM_TEXT_TFIDF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //任意需要分词的文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - //关键词个数 - var count = 20; - if (arguments[1] != null) { - count = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(count)){ - return count; - } - } - - if(!luckysheet.func_methods.isRealNum(count)){ - return luckysheet.formula.error.v; - } - - count = parseInt(count); - - //语料库 - var set = 0; - if (arguments[2] != null) { - set = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(set)){ - return set; - } - } - - if(!luckysheet.func_methods.isRealNum(set)){ - return luckysheet.formula.error.v; - } - - set = parseInt(set); - - if(count < 0){ - return luckysheet.formula.error.v; - } - - if(set != 0 && set != 1 && set != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/tfidf", { - "text": text, - "count": count, - "set": set - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DM_TEXT_TEXTRANK": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //任意需要分词的文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - //关键词个数 - var count = 20; - if (arguments[1] != null) { - count = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(count)){ - return count; - } - } - - if(!luckysheet.func_methods.isRealNum(count)){ - return luckysheet.formula.error.v; - } - - count = parseInt(count); - - //语料库 - var set = 0; - if (arguments[2] != null) { - set = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(set)){ - return set; - } - } - - if(!luckysheet.func_methods.isRealNum(set)){ - return luckysheet.formula.error.v; - } - - set = parseInt(set); - - if(count < 0){ - return luckysheet.formula.error.v; - } - - if(set != 0 && set != 1 && set != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/tfidf", { - "text": text, - "count": count, - "set": set - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATA_CN_STOCK_CLOSE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //股票代码 - var stockcode = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(stockcode)){ - return stockcode; - } - - //日期 - var date = null; - - if(arguments[1] != null){ - var data_date = arguments[1]; - - if(luckysheet.getObjType(data_date) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(data_date) == "object" && data_date.startCell != null){ - if(data_date.data != null && luckysheet.getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ - date = luckysheet.mask.update("yyyy-mm-dd", data_date.data.v); - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - date = data_date; - } - - if(!luckysheet.datecontroll.isdatetime(date)){ - return [luckysheet.formula.error.v, "日期错误"]; - } - - date = moment(date).format("YYYY-MM-DD"); - } - - //复权除权 - var price = 0; - if (arguments[2] != null) { - price = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(price)){ - return price; - } - } - - if(!luckysheet.func_methods.isRealNum(price)){ - return luckysheet.formula.error.v; - } - - price = parseInt(price); - - if(price != 0 && price != 1 && price != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/getstockinfo", { - "stockCode": stockcode, - "date": date, - "price": price, - type: "0" - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - var v = luckysheet.numFormat(data); - if (v == null) { - v = data; - } - luckysheet.formula.execFunctionGroup(cell_r, cell_c, v); - d[cell_r][cell_c] = { - "v": v, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATA_CN_STOCK_OPEN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //股票代码 - var stockcode = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(stockcode)){ - return stockcode; - } - - //日期 - var date = null; - - if(arguments[1] != null){ - var data_date = arguments[1]; - - if(luckysheet.getObjType(data_date) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(data_date) == "object" && data_date.startCell != null){ - if(data_date.data != null && luckysheet.getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ - date = luckysheet.mask.update("yyyy-mm-dd", data_date.data.v); - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - date = data_date; - } - - if(!luckysheet.datecontroll.isdatetime(date)){ - return [luckysheet.formula.error.v, "日期错误"]; - } - - date = moment(date).format("YYYY-MM-DD"); - } - - //复权除权 - var price = 0; - if (arguments[2] != null) { - price = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(price)){ - return price; - } - } - - if(!luckysheet.func_methods.isRealNum(price)){ - return luckysheet.formula.error.v; - } - - price = parseInt(price); - - if(price != 0 && price != 1 && price != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/getstockinfo", { - "stockCode": stockcode, - "date": date, - "price": price, - type: "1" - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATA_CN_STOCK_MAX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //股票代码 - var stockcode = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(stockcode)){ - return stockcode; - } - - //日期 - var date = null; - - if(arguments[1] != null){ - var data_date = arguments[1]; - - if(luckysheet.getObjType(data_date) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(data_date) == "object" && data_date.startCell != null){ - if(data_date.data != null && luckysheet.getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ - date = luckysheet.mask.update("yyyy-mm-dd", data_date.data.v); - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - date = data_date; - } - - if(!luckysheet.datecontroll.isdatetime(date)){ - return [luckysheet.formula.error.v, "日期错误"]; - } - - date = moment(date).format("YYYY-MM-DD"); - } - - //复权除权 - var price = 0; - if (arguments[2] != null) { - price = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(price)){ - return price; - } - } - - if(!luckysheet.func_methods.isRealNum(price)){ - return luckysheet.formula.error.v; - } - - price = parseInt(price); - - if(price != 0 && price != 1 && price != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/getstockinfo", { - "stockCode": stockcode, - "date": date, - "price": price, - type: "2" - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATA_CN_STOCK_MIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //股票代码 - var stockcode = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(stockcode)){ - return stockcode; - } - - //日期 - var date = null; - - if(arguments[1] != null){ - var data_date = arguments[1]; - - if(luckysheet.getObjType(data_date) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(data_date) == "object" && data_date.startCell != null){ - if(data_date.data != null && luckysheet.getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ - date = luckysheet.mask.update("yyyy-mm-dd", data_date.data.v); - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - date = data_date; - } - - if(!luckysheet.datecontroll.isdatetime(date)){ - return [luckysheet.formula.error.v, "日期错误"]; - } - - date = moment(date).format("YYYY-MM-DD"); - } - - //复权除权 - var price = 0; - if (arguments[2] != null) { - price = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(price)){ - return price; - } - } - - if(!luckysheet.func_methods.isRealNum(price)){ - return luckysheet.formula.error.v; - } - - price = parseInt(price); - - if(price != 0 && price != 1 && price != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/getstockinfo", { - "stockCode": stockcode, - "date": date, - "price": price, - type: "3" - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATA_CN_STOCK_VOLUMN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //股票代码 - var stockcode = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(stockcode)){ - return stockcode; - } - - //日期 - var date = null; - - if(arguments[1] != null){ - var data_date = arguments[1]; - - if(luckysheet.getObjType(data_date) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(data_date) == "object" && data_date.startCell != null){ - if(data_date.data != null && luckysheet.getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ - date = luckysheet.mask.update("yyyy-mm-dd", data_date.data.v); - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - date = data_date; - } - - if(!luckysheet.datecontroll.isdatetime(date)){ - return [luckysheet.formula.error.v, "日期错误"]; - } - - date = moment(date).format("YYYY-MM-DD"); - } - - //复权除权 - var price = 0; - if (arguments[2] != null) { - price = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(price)){ - return price; - } - } - - if(!luckysheet.func_methods.isRealNum(price)){ - return luckysheet.formula.error.v; - } - - price = parseInt(price); - - if(price != 0 && price != 1 && price != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/getstockinfo", { - "stockCode": stockcode, - "date": date, - "price": price, - type: "4" - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATA_CN_STOCK_AMOUNT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - - //股票代码 - var stockcode = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(stockcode)){ - return stockcode; - } - - //日期 - var date = null; - - if(arguments[1] != null){ - var data_date = arguments[1]; - - if(luckysheet.getObjType(data_date) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(data_date) == "object" && data_date.startCell != null){ - if(data_date.data != null && luckysheet.getObjType(data_date.data) != "array" && data_date.data.ct != null && data_date.data.ct.t == "d"){ - date = luckysheet.mask.update("yyyy-mm-dd", data_date.data.v); - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - date = data_date; - } - - if(!luckysheet.datecontroll.isdatetime(date)){ - return [luckysheet.formula.error.v, "日期错误"]; - } - - date = moment(date).format("YYYY-MM-DD"); - } - - //复权除权 - var price = 0; - if (arguments[2] != null) { - price = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(price)){ - return price; - } - } - - if(!luckysheet.func_methods.isRealNum(price)){ - return luckysheet.formula.error.v; - } - - price = parseInt(price); - - if(price != 0 && price != 1 && price != 2){ - return luckysheet.formula.error.v; - } - - //luckysheet.jfrefreshcell({ "v": "load...", "f": cell_fp }, cell_r, cell_c); - $.post("/dataqk/tu/api/getstockinfo", { - "stockCode": stockcode, - "date": date, - "price": price, - type: "5" - }, function(data) { - var d = luckysheet.editor.deepCopyFlowData(luckysheet.flowdata); - luckysheet.formula.execFunctionGroup(cell_r, cell_c, data); - d[cell_r][cell_c] = { - "v": data, - "f": cell_fp - }; - luckysheet.jfrefreshgrid(d, [{"row": [cell_r, cell_r], "column": [cell_c, cell_c]}]); - }); - - return "loading..."; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISDATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //日期 - var date = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(date)){ - return date; - } - - return luckysheet.datecontroll.isdatetime(date); - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMIF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //=SUMIF(A2:A5,">1600000",B2:B5) - //=SUMIF(A2:A5,">1600000") - //=SUMIF(A2:A5,3000000,B2:B5) - //找出range中匹配的字符串 - var sum = 0; - - var rangeData = arguments[0].data; - var rangeRow = arguments[0].rowl; - var rangeCol = arguments[0].coll; - - var criteria = luckysheet_parseData(arguments[1]); - - rangeData = luckysheet.formula.getRangeArray(rangeData)[0]; - - //如果有第三个参数 - if(arguments[2]){ - var sumRangeData = []; - //根据选择的目标的区域确定实际目标区域 - //初始位置 - var sumRangeStart = arguments[2].startCell; - var sumRangeRow = arguments[2].rowl; - var sumRangeCol = arguments[2].coll; - var sumRangeSheet = arguments[2].sheetName; - - if(rangeRow == sumRangeRow && rangeCol == sumRangeCol){ - sumRangeData = arguments[2].data; - } - else{ - var row=[],col=[]; - var sumRangeEnd = ""; - var realSumRange = ""; - //console.log("开始位置!!!",sumRangeStart,typeof(sumRangeStart)); - row[0] = parseInt(sumRangeStart.replace(/[^0-9]/g,"")) - 1; - col[0] = luckysheet.luckysheetABCatNum(sumRangeStart.replace(/[^A-Za-z]/g,"")); - - //根据第一个范围的长宽确定目标范围的末尾位置 - row[1] = row[0] + rangeRow - 1; - col[1] = col[0] + rangeCol - 1; - - //console.log(row[0],col[0],row[1],col[1]); - //末尾位置转化为sheet格式:如 F4 - var real_ABC = luckysheet.luckysheetchatatABC(col[1]); - var real_Num = row[1] + 1; - sumRangeEnd = real_ABC + real_Num; - //console.log("合成新的末尾位置:" + sumRangeEnd); - - realSumRange = sumRangeSheet + "!" +sumRangeStart + ":" + sumRangeEnd; - sumRangeData = luckysheet_getcelldata(realSumRange).data; - //console.log("最终的目标范围:",sumRangeData); - } - - sumRangeData = luckysheet.formula.getRangeArray(sumRangeData)[0]; - - //循环遍历查找匹配项 - for(var i = 0; i < rangeData.length;i++){ - var v = rangeData[i]; - - if(!!v && luckysheet.formula.acompareb(v, criteria)){ - if(!luckysheet.func_methods.isRealNum(sumRangeData[i])){ - continue; - } - - sum += parseFloat(sumRangeData[i]); - } - } - } - else{ - //循环遍历查找匹配项 - for(var i = 0; i < rangeData.length;i++){ - var v = rangeData[i]; - - if(!!v && luckysheet.formula.acompareb(v, criteria)){ - if(!luckysheet.func_methods.isRealNum(v)){ - continue; - } - - sum += parseFloat(v); - } - } - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.tan(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TANH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - var e2 = Math.exp(2 * number); - - return (e2 - 1) / (e2 + 1); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CEILING": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //number - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //significance - var significance = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(significance)){ - return significance; - } - - if(!luckysheet.func_methods.isRealNum(significance)){ - return luckysheet.formula.error.v; - } - - significance = parseFloat(significance); - - if(significance == 0){ - return 0; - } - - if(number > 0 && significance < 0){ - return luckysheet.formula.error.nm; - } - - return Math.ceil(number / significance) * significance; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ATAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.atan(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ASINH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.log(number + Math.sqrt(number * number + 1)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ABS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.abs(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ACOS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number < -1 || number > 1){ - return luckysheet.formula.error.nm; - } - - return Math.acos(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ACOSH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number < 1){ - return luckysheet.formula.error.nm; - } - - return Math.log(number + Math.sqrt(number * number - 1)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MULTINOMIAL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - dataArr.push(data); - } - } - - var sum = 0, divisor = 1; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number < 0){ - return luckysheet.formula.error.nm; - } - - sum += number; - divisor *= luckysheet.func_methods.factorial(number); - } - - return luckysheet.func_methods.factorial(sum) / divisor; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ATANH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number <= -1 || number >= 1){ - return luckysheet.formula.error.nm; - } - - return Math.log((1 + number) / (1 - number)) / 2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ATAN2": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要计算其与x轴夹角大小的线段的终点x坐标 - var number_x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number_x)){ - return number_x; - } - - if(!luckysheet.func_methods.isRealNum(number_x)){ - return luckysheet.formula.error.v; - } - - number_x = parseFloat(number_x); - - //要计算其与x轴夹角大小的线段的终点y坐标 - var number_y = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number_y)){ - return number_y; - } - - if(!luckysheet.func_methods.isRealNum(number_y)){ - return luckysheet.formula.error.v; - } - - number_y = parseFloat(number_y); - - if(number_x == 0 && number_y == 0){ - return luckysheet.formula.error.d; - } - - return Math.atan2(number_y, number_x); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUNTBLANK": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var data = arguments[0]; - var sum = 0; - - if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - if(data.data == null){ - return 1; - } - - if(luckysheet.getObjType(data.data) == "array"){ - for(var r = 0; r < data.data.length; r++){ - for(var c = 0; c < data.data[r].length; c++){ - if(data.data[r][c] == null || luckysheet.func_methods.isRealNull(data.data[r][c].v)){ - sum++; - } - } - } - } - else{ - if(luckysheet.func_methods.isRealNull(data.data.v)){ - sum++; - } - } - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COSH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return (Math.exp(number) + Math.exp(-number)) / 2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "INT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var data = arguments[0]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - if(!luckysheet.func_methods.isRealNum(data[0][0])){ - return luckysheet.formula.error.v; - } - - return Math.floor(parseFloat(data[0][0])); - } - else{ - if(!luckysheet.func_methods.isRealNum(data[0])){ - return luckysheet.formula.error.v; - } - - return Math.floor(parseFloat(data[0])); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - if(data.coll > 1){ - return luckysheet.formula.error.v; - } - - if(data.rowl > 1){ - var cellrange = luckysheet.formula.getcellrange(data.startCell); - var str = cellrange.row[0]; - - if(window.luckysheetCurrentRow < str || window.luckysheetCurrentRow > str + data.rowl - 1){ - return luckysheet.formula.error.v; - } - - var cell = data.data[window.luckysheetCurrentRow - str][0]; - } - else{ - var cell = data.data; - } - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - return 0; - } - - if(!luckysheet.func_methods.isRealNum(cell.v)){ - return luckysheet.formula.error.v; - } - - return Math.floor(parseFloat(cell.v)); - } - else{ - if(luckysheet.getObjType(data) == "boolean"){ - if(data.toString().toLowerCase() == "true"){ - return 1; - } - - if(data.toString().toLowerCase() == "false"){ - return 0; - } - } - - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - return Math.floor(parseFloat(data)); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISEVEN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - return Math.abs(number) & 1 ? false : true; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISODD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - return Math.abs(number) & 1 ? true : false; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LCM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var o = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - o = o.concat(luckysheet.func_methods.getDataArr(data)); - } - else{ - o = o.concat(data); - } - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - o = o.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - o.push(data); - } - } - - for(var y = 0; y < o.length; y++){ - var number = o[y]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - if(number < 0){ - return luckysheet.formula.error.nm; - } - - o[y] = number; - } - - for (var i, j, n, d, r = 1; (n = o.pop()) !== undefined;) { - if(n == 0){ - r = 0; - } - - while (n > 1) { - if (n % 2) { - for (i = 3, j = Math.floor(Math.sqrt(n)); i <= j && n % i; i += 2) { - //empty - } - - d = (i <= j) ? i : n; - } - else { - d = 2; - } - - for (n /= d, r *= d, i = o.length; i; (o[--i] % d) === 0 && (o[i] /= d) === 1 && o.splice(i, 1)) { - //empty - } - } - } - - if(r >= Math.pow(2, 53)){ - return luckysheet.formula.error.nm; - } - - return r; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number <= 0){ - return luckysheet.formula.error.nm; - } - - return Math.log(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOG": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number <= 0){ - return luckysheet.formula.error.nm; - } - - if(arguments.length == 2){ - var base = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(base)){ - return base; - } - - if(!luckysheet.func_methods.isRealNum(base)){ - return luckysheet.formula.error.v; - } - - base = parseFloat(base); - - if(base <= 0){ - return luckysheet.formula.error.nm; - } - } - else{ - var base = 10; - } - - return Math.log(number) / Math.log(base); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOG10": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number <= 0){ - return luckysheet.formula.error.nm; - } - - return Math.log(number) / Math.log(10); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MOD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //被除数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //除数 - var divisor = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(divisor)){ - return divisor; - } - - if(!luckysheet.func_methods.isRealNum(divisor)){ - return luckysheet.formula.error.v; - } - - divisor = parseFloat(divisor); - - if(divisor == 0){ - return luckysheet.formula.error.d; - } - - //计算结果 - var modulus = Math.abs(number % divisor); - return (divisor > 0) ? modulus : -modulus; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MROUND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要舍入的值 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //要舍入到的倍数 - var multiple = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(multiple)){ - return multiple; - } - - if(!luckysheet.func_methods.isRealNum(multiple)){ - return luckysheet.formula.error.v; - } - - multiple = parseFloat(multiple); - - if (number * multiple < 0){ - return luckysheet.formula.error.nm; - } - - //计算结果 - return Math.round(number / multiple) * multiple; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ODD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - var temp = Math.ceil(Math.abs(number)); - temp = (temp & 1) ? temp : temp + 1; - return (number >= 0) ? temp : -temp; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMSQ": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - dataArr.push(data); - } - } - - var sum = 0; - - if(dataArr.length > 0){ - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - sum += number * number; - } - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COMBIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //项目的数量 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - //每一组合中项目的数量 - var number_chosen = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number_chosen)){ - return number_chosen; - } - - if(!luckysheet.func_methods.isRealNum(number_chosen)){ - return luckysheet.formula.error.v; - } - - number_chosen = parseInt(number_chosen); - - if (number < 0 || number_chosen < 0 || number < number_chosen){ - return luckysheet.formula.error.nm; - } - - //计算结果 - return luckysheet.func_methods.factorial(number) / (luckysheet.func_methods.factorial(number_chosen) * luckysheet.func_methods.factorial(number - number_chosen)) - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUBTOTAL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 1-11 或 101-111,用于指定要为分类汇总使用的函数 - var data_function_num = arguments[0]; - var function_num; - - if(luckysheet.getObjType(data_function_num) == "array"){ - if(luckysheet.getObjType(data_function_num[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_function_num)){ - return luckysheet.formula.error.v; - } - - function_num = []; - - for(var i = 0; i < data_function_num.length; i++){ - var rowArr = []; - - for(var j = 0; j < data_function_num[i].length; j++){ - rowArr.push(data_function_num[i][j]); - } - - function_num.push(rowArr); - } - } - else{ - function_num = []; - - for(var i = 0; i < data_function_num.length; i++){ - function_num.push(data_function_num[i]); - } - } - } - else if(luckysheet.getObjType(data_function_num) == "object" && data_function_num.startCell != null){ - function_num = luckysheet.func_methods.getFirstValue(data_function_num); - } - else{ - function_num = data_function_num; - } - - var arr = Array.prototype.slice.apply(arguments); - arr.shift(); - - //计算结果 - if(luckysheet.getObjType(function_num) == "array"){ - var result = []; - - if(luckysheet.getObjType(function_num[0]) == "array"){ - for(var i = 0; i < function_num.length; i++){ - var rowArr = []; - - for(var j = 0; j < function_num[i].length; j++){ - var value = function_num[i][j]; - - if(luckysheet.func_methods.valueIsError(value)){ - rowArr.push(value); - } - else if(!luckysheet.func_methods.isRealNum(value)){ - rowArr.push(luckysheet.formula.error.v); - } - else{ - value = parseInt(value); - - if(value < 1 || value > 111 || (value > 11 && value < 101)){ - rowArr.push(luckysheet.formula.error.v); - } - else{ - rowArr.push(compute(value)); - } - } - } - - result.push(rowArr); - } - } - else{ - for(var i = 0; i < function_num.length; i++){ - var value = function_num[i]; - - if(luckysheet.func_methods.valueIsError(value)){ - result.push(value); - } - else if(!luckysheet.func_methods.isRealNum(value)){ - result.push(luckysheet.formula.error.v); - } - else{ - value = parseInt(value); - - if(value < 1 || value > 111 || (value > 11 && value < 101)){ - result.push(luckysheet.formula.error.v); - } - else{ - result.push(compute(value)); - } - } - } - } - - return result; - } - else{ - if(luckysheet.func_methods.valueIsError(function_num)){ - return function_num; - } - - if(!luckysheet.func_methods.isRealNum(function_num)){ - return luckysheet.formula.error.v; - } - - function_num = parseInt(function_num); - - if(function_num < 1 || function_num > 111 || (function_num > 11 && function_num < 101)){ - return luckysheet.formula.error.v; - } - - return compute(function_num); - } - - function compute(function_num){ - switch(function_num){ - case 1: //AVERAGE - case 101: - return window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, arr); - break; - case 2: //COUNT - case 102: - return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT, arr); - break; - case 3: //COUNTA - case 103: - return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA, arr); - break; - case 4: //MAX - case 104: - return window.luckysheet_function.MAX.f.apply(window.luckysheet_function.MAX, arr); - break; - case 5: //MIN - case 105: - return window.luckysheet_function.MIN.f.apply(window.luckysheet_function.MIN, arr); - break; - case 6: //PRODUCT - case 106: - return window.luckysheet_function.PRODUCT.f.apply(window.luckysheet_function.PRODUCT, arr); - break; - case 7: //STDEV - case 107: - return window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA, arr); - break; - case 8: //STDEVP - case 108: - return window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP, arr); - break; - case 9: //SUM - case 109: - return window.luckysheet_function.SUM.f.apply(window.luckysheet_function.SUM, arr); - break; - case 10: //VAR - case 110: - return window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S, arr); - break; - case 11: //VARP - case 111: - return window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P, arr); - break; - } - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ASIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number < -1 || number > 1){ - return luckysheet.formula.error.nm; - } - - return Math.asin(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUNTIF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //范围 - var data_range = arguments[0]; - var range; - - if(luckysheet.getObjType(data_range) == "object" && data_range.startCell != null){ - range = data_range.data; - } - else{ - return luckysheet.formula.error.v; - } - - //条件 - var data_criteria = arguments[1]; - var criteria; - - if(luckysheet.getObjType(data_criteria) == "array"){ - criteria = []; - - if(luckysheet.getObjType(data_criteria[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_criteria)){ - return luckysheet.formula.error.v; - } - - for(var i = 0; i < data_criteria.length; i++){ - var rowArr = []; - - for(var j = 0; j < data_criteria[i].length; j++){ - rowArr.push(data_criteria[i][j]); - } - - criteria.push(rowArr); - } - } - else{ - for(var i = 0; i < data_criteria.length; i++){ - criteria.push(data_criteria[i]); - } - } - } - else if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.rowl > 1 || data_criteria.coll > 1){ - return 0; - } - - criteria = data_criteria.data; - } - else{ - criteria = data_criteria; - } - - //计算 - if(luckysheet.getObjType(criteria) == "array"){ - var result = []; - - if(luckysheet.getObjType(criteria[0]) == "array"){ - for(var i = 0; i < criteria.length; i++){ - var rowArr = []; - - for(var j = 0; j < criteria[i].length; j++){ - rowArr.push(getCriteriaResult(range, criteria[i][j])); - } - - result.push(rowArr); - } - } - else{ - for(var i = 0; i < criteria.length; i++){ - result.push(getCriteriaResult(range, criteria[i])); - } - } - - return result; - } - else{ - return getCriteriaResult(range, criteria); - } - - function getCriteriaResult(range, criter){ - if (!/[<>=!*?]/.test(criter)) { - criter = '=="' + criter + '"'; - } - - criter = criter.replace("<>", "!="); - - var matches = 0; - - if(luckysheet.getObjType(range) == "array"){ - for (var i = 0; i < range.length; i++) { - for(var j = 0; j < range[i].length; j++){ - if(range[i][j] != null && !luckysheet.func_methods.isRealNull(range[i][j].v)){ - var value = range[i][j].v; - - if(criter.indexOf("*") > -1 || criter.indexOf("?") > -1){ - if(luckysheet.formula.isWildcard(value, criter)){ - matches++; - } - } - else{ - if (typeof value !== 'string') { - if (eval(value + criter)) { - matches++; - } - } - else { - if (eval('"' + value + '"' + criter)) { - matches++; - } - } - } - } - } - } - } - else{ - if(range != null && !luckysheet.func_methods.isRealNull(range.v)){ - var value = range.v; - - if(criter.indexOf("*") > -1 || criter.indexOf("?") > -1){ - if(luckysheet.formula.isWildcard(value, criter)){ - matches++; - } - } - else{ - if (typeof value !== 'string') { - if (eval(value + criter)) { - matches++; - } - } - else { - if (eval('"' + value + '"' + criter)) { - matches++; - } - } - } - } - } - - return matches; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RADIANS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return number * Math.PI / 180; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RAND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - try { - return Math.floor(Math.random() * 1000000000) / 1000000000; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUNTUNIQUE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - dataArr.push(data); - } - } - - return window.luckysheet_function.UNIQUE.f(dataArr); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DEGREES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return number * 180 / Math.PI; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ERFC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return jStat.erfc(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EVEN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - var temp = Math.ceil(Math.abs(number)); - temp = (temp & 1) ? temp + 1 : temp; - return (number > 0) ? temp : -temp; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EXP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.exp(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FACT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - if(luckysheet.getObjType(number) == "boolean"){ - if(number.toString().toLowerCase() == "true"){ - number = 1; - } - else if(number.toString().toLowerCase() == "false"){ - number = 0; - } - } - else{ - return luckysheet.formula.error.v; - } - } - - number = parseInt(number); - - if(number < 0){ - return luckysheet.formula.error.nm; - } - - return luckysheet.func_methods.factorial(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FACTDOUBLE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - if(luckysheet.getObjType(number) == "boolean"){ - if(number.toString().toLowerCase() == "true"){ - number = 1; - } - else if(number.toString().toLowerCase() == "false"){ - number = 0; - } - } - else{ - return luckysheet.formula.error.v; - } - } - - number = parseInt(number); - - if(number < 0){ - return luckysheet.formula.error.nm; - } - - return luckysheet.func_methods.factorialDouble(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PI": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - try { - return Math.PI; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FLOOR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //number - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //significance - var significance = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(significance)){ - return significance; - } - - if(!luckysheet.func_methods.isRealNum(significance)){ - return luckysheet.formula.error.v; - } - - significance = parseFloat(significance); - - if(significance == 0){ - return luckysheet.formula.error.d; - } - - if(number > 0 && significance < 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var precision = -Math.floor(Math.log(Math.abs(significance)) / Math.log(10)); - - if (number >= 0) { - return (Math.floor(number / significance) * significance) * Math.pow(10, precision) / Math.pow(10, precision); - } - else { - return -((Math.ceil(Math.abs(number) / significance) * significance) * Math.pow(10, precision)) / Math.pow(10, precision); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GCD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", false)); - } - else{ - dataArr.push(data); - } - } - - if(!luckysheet.func_methods.isRealNum(dataArr[0])){ - return luckysheet.formula.error.v; - } - - var x = parseInt(dataArr[0]); - - if(x < 0 || x >= Math.pow(2, 53)){ - return luckysheet.formula.error.nm; - } - - for (var i = 1; i < dataArr.length; i++) { - var y = dataArr[i]; - - if(!luckysheet.func_methods.isRealNum(y)){ - return luckysheet.formula.error.v; - } - - y = parseInt(y); - - if(y < 0 || y >= Math.pow(2, 53)){ - return luckysheet.formula.error.nm; - } - - while (x && y) { - if (x > y) { - x %= y; - } - else { - y %= x; - } - } - - x += y; - } - - return x; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RANDBETWEEN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //下界 - var bottom = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(bottom)){ - return bottom; - } - - if(!luckysheet.func_methods.isRealNum(bottom)){ - return luckysheet.formula.error.v; - } - - bottom = parseInt(bottom); - - //上界 - var top = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(top)){ - return top; - } - - if(!luckysheet.func_methods.isRealNum(top)){ - return luckysheet.formula.error.v; - } - - top = parseInt(top); - - if(bottom > top){ - return luckysheet.formula.error.nm; - } - - //计算 - return bottom + Math.ceil((top - bottom + 1) * Math.random()) - 1; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ROUND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //四舍五入的数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //位数 - var digits = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(digits)){ - return digits; - } - - if(!luckysheet.func_methods.isRealNum(digits)){ - return luckysheet.formula.error.v; - } - - digits = parseInt(digits); - - //计算 - var sign = (number > 0) ? 1 : -1; - return sign * (Math.round(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ROUNDDOWN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //四舍五入的数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //位数 - var digits = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(digits)){ - return digits; - } - - if(!luckysheet.func_methods.isRealNum(digits)){ - return luckysheet.formula.error.v; - } - - digits = parseInt(digits); - - //计算 - var sign = (number > 0) ? 1 : -1; - return sign * (Math.floor(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ROUNDUP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //四舍五入的数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //位数 - var digits = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(digits)){ - return digits; - } - - if(!luckysheet.func_methods.isRealNum(digits)){ - return luckysheet.formula.error.v; - } - - digits = parseInt(digits); - - //计算 - var sign = (number > 0) ? 1 : -1; - return sign * (Math.ceil(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SERIESSUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //幂级数的输入值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //x 的首项乘幂 - var n = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(n)){ - return n; - } - - if(!luckysheet.func_methods.isRealNum(n)){ - return luckysheet.formula.error.v; - } - - n = parseFloat(n); - - //级数中每一项的乘幂 n 的步长增加值 - var m = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(m)){ - return m; - } - - if(!luckysheet.func_methods.isRealNum(m)){ - return luckysheet.formula.error.v; - } - - m = parseFloat(m); - - //与 x 的每个连续乘幂相乘的一组系数 - var data_coefficients = arguments[3]; - var coefficients = []; - - if(luckysheet.getObjType(data_coefficients) == "array"){ - if(luckysheet.getObjType(data_coefficients[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_coefficients)){ - return luckysheet.formula.error.v; - } - - coefficients = coefficients.concat(luckysheet.func_methods.getDataArr(data_coefficients, false)); - } - else if(luckysheet.getObjType(data_coefficients) == "object" && data_coefficients.startCell != null){ - coefficients = coefficients.concat(luckysheet.func_methods.getCellDataArr(data_coefficients, "number", false)); - } - else{ - coefficients.push(data_coefficients); - } - - //计算 - if(!luckysheet.func_methods.isRealNum(coefficients[0])){ - return luckysheet.formula.error.v; - } - - var result = parseFloat(coefficients[0]) * Math.pow(x, n); - - for (var i = 1; i < coefficients.length; i++) { - var number = coefficients[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - result += number * Math.pow(x, n + i * m); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SIGN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number > 0){ - return 1; - } - else if(number == 0){ - return 0; - } - else if(number < 0){ - return -1; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.sin(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SINH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return (Math.exp(number) - Math.exp(-number)) / 2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SQRT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number < 0){ - return luckysheet.formula.error.nm; - } - - return Math.sqrt(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SQRTPI": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number < 0){ - return luckysheet.formula.error.nm; - } - - return Math.sqrt(number * Math.PI); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GAMMALN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number <= 0){ - return luckysheet.formula.error.nm; - } - - return jStat.gammaln(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - return Math.cos(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TRUNC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要截取的数据 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //位数 - if(arguments.length == 2){ - var digits = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(digits)){ - return digits; - } - - if(!luckysheet.func_methods.isRealNum(digits)){ - return luckysheet.formula.error.v; - } - - digits = parseInt(digits); - } - else{ - var digits = 0; - } - - //计算 - var sign = (number > 0) ? 1 : -1; - return sign * (Math.floor(Math.abs(number) * Math.pow(10, digits))) / Math.pow(10, digits); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "QUOTIENT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //被除数 - var numerator = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(numerator)){ - return numerator; - } - - if(!luckysheet.func_methods.isRealNum(numerator)){ - return luckysheet.formula.error.v; - } - - numerator = parseFloat(numerator); - - //除数 - var denominator = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(denominator)){ - return denominator; - } - - if(!luckysheet.func_methods.isRealNum(denominator)){ - return luckysheet.formula.error.v; - } - - denominator = parseFloat(denominator); - - if(denominator == 0){ - return luckysheet.formula.error.d; - } - - //计算 - return parseInt(numerator / denominator, 10); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "POWER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //底数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //指数 - var power = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(power)){ - return power; - } - - if(!luckysheet.func_methods.isRealNum(power)){ - return luckysheet.formula.error.v; - } - - power = parseFloat(power); - - if(number == 0 && power == 0){ - return luckysheet.formula.error.nm; - } - - if(number < 0 && power.toString().indexOf(".") > -1){ - return luckysheet.formula.error.nm; - } - - return Math.pow(number, power); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMIFS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var sum = 0; - var args = arguments; - luckysheet_getValue(args); - var rangeData = luckysheet.formula.getRangeArray(args[0])[0]; - var results = new Array(rangeData.length); - - for(var i = 0;i < results.length; i++){ - results[i] = true; - } - - for(var i = 1; i < args.length; i += 2){ - var range = luckysheet.formula.getRangeArray(args[i])[0]; - var criteria = args[i+1]; - for(var j = 0; j < range.length; j++){ - var v = range[j]; - results[j] = results[j] && (!!v) && luckysheet.formula.acompareb(v,criteria); - } - } - - for(var i = 0; i < rangeData.length; i++){ - if(results[i]){ - sum += parseFloat(rangeData[i]); - } - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUNTIFS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var args = arguments; - luckysheet_getValue(args); - var results = new Array(luckysheet.formula.getRangeArray(args[0])[0].length); - for(var i = 0;i < results.length; i++){ - results[i] = true; - } - for(var i = 0; i < args.length; i += 2){ - var range = luckysheet.formula.getRangeArray(args[i])[0]; - var criteria = args[i+1]; - for(var j = 0; j < range.length; j++){ - var v = range[j]; - results[j] = results[j] && (!!v) && luckysheet.formula.acompareb(v,criteria); - } - } - var result = 0; - for(var i = 0; i < results.length; i++){ - if(results[i]){ - result++; - } - } - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PRODUCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - dataArr.push(data); - } - } - - var result = 1; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - result *= number; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HARMEAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - dataArr.push(data); - } - } - - var den = 0, len = 0; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - if(number <= 0){ - return luckysheet.formula.error.nm; - } - - den += 1 / number; - len++; - } - - return len / den; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HYPGEOMDIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //样本中成功的次数 - var sample_s = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(sample_s)){ - return sample_s; - } - - if(!luckysheet.func_methods.isRealNum(sample_s)){ - return luckysheet.formula.error.v; - } - - sample_s = parseInt(sample_s); - - //样本量 - var number_sample = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number_sample)){ - return number_sample; - } - - if(!luckysheet.func_methods.isRealNum(number_sample)){ - return luckysheet.formula.error.v; - } - - number_sample = parseInt(number_sample); - - //总体中成功的次数 - var population_s = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(population_s)){ - return population_s; - } - - if(!luckysheet.func_methods.isRealNum(population_s)){ - return luckysheet.formula.error.v; - } - - population_s = parseInt(population_s); - - //总体大小 - var number_pop = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(number_pop)){ - return number_pop; - } - - if(!luckysheet.func_methods.isRealNum(number_pop)){ - return luckysheet.formula.error.v; - } - - number_pop = parseInt(number_pop); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[4]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(sample_s < 0 || sample_s > Math.min(number_sample, population_s) || sample_s < Math.max(0, number_sample - number_pop + population_s)){ - return luckysheet.formula.error.nm; - } - - if(number_sample <= 0 || number_sample > number_pop){ - return luckysheet.formula.error.nm; - } - - if(population_s <= 0 || population_s > number_pop){ - return luckysheet.formula.error.nm; - } - - if(number_pop <= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - function pdf(x, n, M, N) { - var a = luckysheet.func_methods.factorial(M) / (luckysheet.func_methods.factorial(x) * luckysheet.func_methods.factorial(M - x)); - var b = luckysheet.func_methods.factorial(N - M) / (luckysheet.func_methods.factorial(n - x) * luckysheet.func_methods.factorial(N - M - n + x)); - var c = luckysheet.func_methods.factorial(N) / (luckysheet.func_methods.factorial(n) * luckysheet.func_methods.factorial(N - n)); - - return a * b / c; - } - - function cdf(x, n, M, N) { - var sum = 0; - - for (var i = 0; i <= x; i++) { - sum += pdf(i, n, M, N); - } - - return sum; - } - - return (cumulative) ? cdf(sample_s, number_sample, population_s, number_pop) : pdf(sample_s, number_sample, population_s, number_pop); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "INTERCEPT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //x轴上用于预测的值 - var x = 0; - - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[0]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - known_y.push(data_known_y); - } - - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[1]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - known_x.push(data_known_x); - } - - if(known_y.length != known_x.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_y = [], data_x = []; - - for(var i = 0; i < known_y.length; i++){ - var num_y = known_y[i]; - var num_x = known_x[i]; - - if(luckysheet.func_methods.isRealNum(num_y) && luckysheet.func_methods.isRealNum(num_x)){ - data_y.push(parseFloat(num_y)); - data_x.push(parseFloat(num_x)); - } - } - - if(luckysheet.func_methods.variance_s(data_x) == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var xmean = jStat.mean(data_x); - var ymean = jStat.mean(data_y); - - var n = data_x.length; - var num = 0; - var den = 0; - - for (var i = 0; i < n; i++) { - num += (data_x[i] - xmean) * (data_y[i] - ymean); - den += Math.pow(data_x[i] - xmean, 2); - } - - var b = num / den; - var a = ymean - b * xmean; - - return a + b * x; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "KURT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - dataArr.push(data); - } - } - - //剔除不是数值类型的值 - var dataArr_n = []; - - for(var j = 0; j < dataArr.length; j++){ - var number = dataArr[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - dataArr_n.push(number); - } - - if(dataArr_n.length < 4 || luckysheet.func_methods.standardDeviation_s(dataArr_n) == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var mean = jStat.mean(dataArr_n); - var n = dataArr_n.length; - - var sigma = 0; - - for (var i = 0; i < n; i++) { - sigma += Math.pow(dataArr_n[i] - mean, 4); - } - - sigma = sigma / Math.pow(jStat.stdev(dataArr_n, true), 4); - - return ((n * (n + 1)) / ((n - 1) * (n - 2) * (n - 3))) * sigma - 3 * (n - 1) * (n - 1) / ((n - 2) * (n - 3)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LARGE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数组或范围 - var dataArr = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(arguments[0], true)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", true)); - } - else{ - dataArr.push(arguments[0]); - } - - var dataArr_n = []; - - for(var j = 0; j < dataArr.length; j++){ - var number = dataArr[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number) - - dataArr_n.push(number); - } - - //要返回的元素的排行位置 - var n; - - if(luckysheet.getObjType(arguments[1]) == "array"){ - if(luckysheet.getObjType(arguments[1][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[1])){ - return luckysheet.formula.error.v; - } - - n = luckysheet.func_methods.getDataArr(arguments[1]); - } - else if(luckysheet.getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ - if(arguments[1].rowl > 1 || arguments[1].coll > 1){ - return luckysheet.formula.error.v; - } - - var cell = arguments[1].data; - - if(cell == null || luckysheet.func_methods.isRealNull(cell.v)){ - var n = 0; - } - else{ - var n = cell.v; - } - } - else{ - n = arguments[1]; - } - - //计算 - if(luckysheet.getObjType(n) == "array"){ - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - var result = []; - - for(var i = 0; i < n.length; i++){ - if(!luckysheet.func_methods.isRealNum(n[i])){ - result.push(luckysheet.formula.error.v); - continue; - } - - n[i] = Math.ceil(parseFloat(n[i])); - - if(n[i] <= 0 || n[i] > dataArr_n.length){ - result.push(luckysheet.formula.error.nm); - continue; - } - - result.push(dataArr.sort(function(a, b) { return b - a; })[n[i] - 1]); - } - - return result; - } - else{ - if(!luckysheet.func_methods.isRealNum(n)){ - return luckysheet.formula.error.v; - } - - n = Math.ceil(parseFloat(n)); - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(n <= 0 || n > dataArr_n.length){ - return luckysheet.formula.error.nm; - } - - return dataArr.sort(function(a, b) { - return b - a; - })[n - 1]; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STDEVA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", false)); - } - else{ - dataArr.push(data); - } - } - - //不是数值类型的值转化成数字(true为1,false和文本为0) - var dataArr_n = []; - - for(var j = 0; j < dataArr.length; j++){ - var number = dataArr[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - if(number.toString().toLowerCase() == "true"){ - number = 1; - } - else{ - number = 0; - } - } - else{ - number = parseFloat(number); - } - - dataArr_n.push(number); - } - - if(dataArr_n.length == 0){ - return 0; - } - - if(dataArr_n.length == 1){ - return luckysheet.formula.error.d; - } - - return luckysheet.func_methods.standardDeviation_s(dataArr_n); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STDEVP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - dataArr.push(data); - } - } - - //剔除不是数值类型的值 - var dataArr_n = []; - - for(var j = 0; j < dataArr.length; j++){ - var number = dataArr[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - dataArr_n.push(number); - } - - if(dataArr_n.length == 0){ - return 0; - } - - if(dataArr_n.length == 1){ - return luckysheet.formula.error.d; - } - - return luckysheet.func_methods.standardDeviation(dataArr_n); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GEOMEAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", true)); - } - else{ - if(luckysheet.getObjType(data) == "boolean"){ - if(data.toString().toLowerCase() == "true"){ - dataArr.push(1); - } - else if(data.toString().toLowerCase() == "false"){ - dataArr.push(0); - } - } - else if(luckysheet.func_methods.isRealNum(data)){ - dataArr.push(data); - } - else{ - return luckysheet.formula.error.v; - } - } - } - - //剔除不是数值类型的值 - var dataArr_n = []; - - for(var j = 0; j < dataArr.length; j++){ - var number = dataArr[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - continue; - } - - number = parseFloat(number); - - if(number <= 0){ - return luckysheet.formula.error.nm; - } - - dataArr_n.push(number); - } - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - return jStat.geomean(dataArr_n); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RANK_EQ": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要确定其排名的值 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //包含相关数据集的数组或范围 - var data_ref = arguments[1]; - var ref = []; - - if(luckysheet.getObjType(data_ref) == "array"){ - if(luckysheet.getObjType(data_ref[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_ref)){ - return luckysheet.formula.error.v; - } - - ref = ref.concat(luckysheet.func_methods.getDataArr(data_ref, true)); - } - else if(luckysheet.getObjType(data_ref) == "object" && data_ref.startCell != null){ - ref = ref.concat(luckysheet.func_methods.getCellDataArr(data_ref, "number", true)); - } - else{ - ref.push(data_ref); - } - - var ref_n = []; - - for(var j = 0; j < ref.length; j++){ - var num = ref[j]; - - if(!luckysheet.func_methods.isRealNum(num)){ - return luckysheet.formula.error.v; - } - - num = parseFloat(num); - - ref_n.push(num); - } - - //要按升序还是按降序考虑“data”中的值 - if(arguments.length == 3){ - var order = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(order)){ - return order; - } - } - else{ - var order = false; - } - - //计算 - var sort = (order) ? function(a, b) { - return a - b; - } : function(a, b) { - return b - a; - }; - - ref_n = ref_n.sort(sort); - - var index = ref_n.indexOf(number); - - if(index == -1){ - return luckysheet.formula.error.na; - } - else{ - return index + 1; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RANK_AVG": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要确定其排名的值 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //包含相关数据集的数组或范围 - var data_ref = arguments[1]; - var ref = []; - - if(luckysheet.getObjType(data_ref) == "array"){ - if(luckysheet.getObjType(data_ref[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_ref)){ - return luckysheet.formula.error.v; - } - - ref = ref.concat(luckysheet.func_methods.getDataArr(data_ref, true)); - } - else if(luckysheet.getObjType(data_ref) == "object" && data_ref.startCell != null){ - ref = ref.concat(luckysheet.func_methods.getCellDataArr(data_ref, "number", true)); - } - else{ - ref.push(data_ref); - } - - var ref_n = []; - - for(var j = 0; j < ref.length; j++){ - var num = ref[j]; - - if(!luckysheet.func_methods.isRealNum(num)){ - return luckysheet.formula.error.v; - } - - num = parseFloat(num); - - ref_n.push(num); - } - - //要按升序还是按降序考虑“data”中的值 - if(arguments.length == 3){ - var order = luckysheet.func_methods.getFirstValue(arguments[2]); - - if(luckysheet.func_methods.valueIsError(order)){ - return order; - } - - if(luckysheet.getObjType(order) == "boolean"){ - - } - else if(luckysheet.getObjType(order) == "string" && (order.toLowerCase() == "true" || order.toLowerCase() == "false")){ - if(order.toLowerCase() == "true"){ - order = true; - } - - if(order.toLowerCase() == "false"){ - order = false; - } - } - else if(luckysheet.func_methods.isRealNum(order)){ - order = parseFloat(order); - - order = order == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - var order = false; - } - - //计算 - var sort = (order) ? function(a, b) { - return a - b; - } : function(a, b) { - return b - a; - }; - - ref_n = ref_n.sort(sort); - - var count = 0; - for (var i = 0; i < ref_n.length; i++) { - if (ref_n[i] == number) { - count++; - } - } - - return (count > 1) ? (2 * ref_n.indexOf(number) + count + 1) / 2 : ref_n.indexOf(number) + 1; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PERCENTRANK_EXC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //包含相关数据集的数组或范围 - var data_ref = arguments[0]; - var ref = []; - - if(luckysheet.getObjType(data_ref) == "array"){ - if(luckysheet.getObjType(data_ref[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_ref)){ - return luckysheet.formula.error.v; - } - - ref = ref.concat(luckysheet.func_methods.getDataArr(data_ref, true)); - } - else if(luckysheet.getObjType(data_ref) == "object" && data_ref.startCell != null){ - ref = ref.concat(luckysheet.func_methods.getCellDataArr(data_ref, "number", true)); - } - else{ - ref.push(data_ref); - } - - var ref_n = []; - - for(var j = 0; j < ref.length; j++){ - var number = ref[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - ref_n.push(number); - } - - //要确定其百分比排位的值 - var x = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //要在计算中使用的有效位数 - if(arguments.length == 3){ - var significance = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(significance)){ - return significance; - } - - if(!luckysheet.func_methods.isRealNum(significance)){ - return luckysheet.formula.error.v; - } - - significance = parseInt(significance); - } - else{ - var significance = 3; - } - - if(ref_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(significance < 1){ - return luckysheet.formula.error.nm; - } - - //计算 - if(ref_n.length == 1 && ref_n[0] == x){ - return 1; - } - - ref_n = ref_n.sort(function(a, b) { - return a - b; - }); - var uniques = window.luckysheet_function.UNIQUE.f(ref_n)[0]; - - var n = ref_n.length; - var m = uniques.length; - - var power = Math.pow(10, significance); - var result = 0; - var match = false; - var i = 0; - - while (!match && i < m) { - if (x === uniques[i]) { - result = (ref_n.indexOf(uniques[i]) + 1) / (n + 1); - match = true; - } - else if (x >= uniques[i] && (x < uniques[i + 1] || i === m - 1)) { - result = (ref_n.lastIndexOf(uniques[i]) + 1 + (x - uniques[i]) / (uniques[i + 1] - uniques[i])) / (n + 1); - match = true; - } - - i++; - } - - if(isNaN(result)){ - return luckysheet.formula.error.na; - } - else{ - return Math.floor(result * power) / power; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PERCENTRANK_INC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //包含相关数据集的数组或范围 - var data_ref = arguments[0]; - var ref = []; - - if(luckysheet.getObjType(data_ref) == "array"){ - if(luckysheet.getObjType(data_ref[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_ref)){ - return luckysheet.formula.error.v; - } - - ref = ref.concat(luckysheet.func_methods.getDataArr(data_ref, true)); - } - else if(luckysheet.getObjType(data_ref) == "object" && data_ref.startCell != null){ - ref = ref.concat(luckysheet.func_methods.getCellDataArr(data_ref, "number", true)); - } - else{ - ref.push(data_ref); - } - - var ref_n = []; - - for(var j = 0; j < ref.length; j++){ - var number = ref[j]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - ref_n.push(number); - } - - //要确定其百分比排位的值 - var x = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //要在计算中使用的有效位数 - if(arguments.length == 3){ - var significance = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(significance)){ - return significance; - } - - if(!luckysheet.func_methods.isRealNum(significance)){ - return luckysheet.formula.error.v; - } - - significance = parseInt(significance); - } - else{ - var significance = 3; - } - - if(ref_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(significance < 1){ - return luckysheet.formula.error.nm; - } - - //计算 - if(ref_n.length == 1 && ref_n[0] == x){ - return 1; - } - - ref_n = ref_n.sort(function(a, b) { - return a - b; - }); - var uniques = window.luckysheet_function.UNIQUE.f(ref_n)[0]; - - var n = ref_n.length; - var m = uniques.length; - - var power = Math.pow(10, significance); - var result = 0; - var match = false; - var i = 0; - - while (!match && i < m) { - if (x === uniques[i]) { - result = ref_n.indexOf(uniques[i]) / (n - 1); - match = true; - } - else if (x >= uniques[i] && (x < uniques[i + 1] || i === m - 1)) { - result = (ref_n.lastIndexOf(uniques[i]) + (x - uniques[i]) / (uniques[i + 1] - uniques[i])) / (n - 1); - match = true; - } - - i++; - } - - if(isNaN(result)){ - return luckysheet.formula.error.na; - } - else{ - return Math.floor(result * power) / power; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FORECAST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //x轴上用于预测的值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[1]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - known_y.push(data_known_y); - } - - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[2]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - known_x.push(data_known_x); - } - - if(known_y.length != known_x.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_y = [], data_x = []; - - for(var i = 0; i < known_y.length; i++){ - var num_y = known_y[i]; - var num_x = known_x[i]; - - if(luckysheet.func_methods.isRealNum(num_y) && luckysheet.func_methods.isRealNum(num_x)){ - data_y.push(parseFloat(num_y)); - data_x.push(parseFloat(num_x)); - } - } - - if(luckysheet.func_methods.variance_s(data_x) == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var xmean = jStat.mean(data_x); - var ymean = jStat.mean(data_y); - - var n = data_x.length; - var num = 0; - var den = 0; - - for (var i = 0; i < n; i++) { - num += (data_x[i] - xmean) * (data_y[i] - ymean); - den += Math.pow(data_x[i] - xmean, 2); - } - - var b = num / den; - var a = ymean - b * xmean; - - return a + b * x; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FISHERINV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var y = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(y)){ - return y; - } - - if(!luckysheet.func_methods.isRealNum(y)){ - return luckysheet.formula.error.v; - } - - y = parseFloat(y); - - var e2y = Math.exp(2 * y); - - return (e2y - 1) / (e2y + 1); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FISHER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - if(x <= -1 || x >= 1){ - return luckysheet.formula.error.nm; - } - - return Math.log((1 + x) / (1 - x)) / 2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MODE_SNGL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - var count = {}; - var maxItems = []; - var max = 0; - var currentItem; - - for (var i = 0; i < dataArr_n.length; i++) { - currentItem = dataArr_n[i]; - count[currentItem] = count[currentItem] ? count[currentItem] + 1 : 1; - - if (count[currentItem] > max) { - max = count[currentItem]; - maxItems = []; - } - - if (count[currentItem] == max) { - maxItems[maxItems.length] = currentItem; - } - } - - if(max <= 1){ - return luckysheet.formula.error.na; - } - - var resultIndex = dataArr_n.indexOf(maxItems[0]); - - for(var j = 0; j < maxItems.length; j++){ - var index = dataArr_n.indexOf(maxItems[j]); - - if(index < resultIndex){ - resultIndex = index; - } - } - - return dataArr_n[resultIndex]; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "WEIBULL_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //WEIBULL 分布函数的输入值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //Weibull 分布函数的形状参数 - var alpha = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(alpha)){ - return alpha; - } - - if(!luckysheet.func_methods.isRealNum(alpha)){ - return luckysheet.formula.error.v; - } - - alpha = parseFloat(alpha); - - //Weibull 分布函数的尺度参数 - var beta = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(beta)){ - return beta; - } - - if(!luckysheet.func_methods.isRealNum(beta)){ - return luckysheet.formula.error.v; - } - - beta = parseFloat(beta); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(x < 0 || alpha <= 0 || beta <= 0){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? 1 - Math.exp(-Math.pow(x / beta, alpha)) : Math.pow(x, alpha - 1) * Math.exp(-Math.pow(x / beta, alpha)) * alpha / Math.pow(beta, alpha); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AVEDEV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - return jStat.sum(jStat(dataArr_n).subtract(jStat.mean(dataArr_n)).abs()[0]) / dataArr_n.length; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AVERAGEA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(number.toString.toLowerCase() == "true"){ - dataArr.push(1); - } - else if(number.toString.toLowerCase() == "false"){ - dataArr.push(0); - } - else if(luckysheet.func_methods.isRealNum(data)){ - dataArr.push(data); - } - else{ - return luckysheet.formula.error.v; - } - } - } - - var sum = 0, - count = 0; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - sum += parseFloat(number); - } - else{ - if(number.toString().toLowerCase() == "true"){ - sum += 1; - } - else{ - sum += 0; - } - } - - count++; - } - - if(count == 0){ - return luckysheet.formula.error.d; - } - - return sum / count; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BINOM_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //试验的成功次数 - var number_s = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number_s)){ - return number_s; - } - - if(!luckysheet.func_methods.isRealNum(number_s)){ - return luckysheet.formula.error.v; - } - - number_s = parseInt(number_s); - - //独立检验的次数 - var trials = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(trials)){ - return trials; - } - - if(!luckysheet.func_methods.isRealNum(trials)){ - return luckysheet.formula.error.v; - } - - trials = parseInt(trials); - - //任一给定检验的成功概率 - var probability_s = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(probability_s)){ - return probability_s; - } - - if(!luckysheet.func_methods.isRealNum(probability_s)){ - return luckysheet.formula.error.v; - } - - probability_s = parseFloat(probability_s); - - //是否使用二项式累积分布 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(number_s < 0 || number_s > trials){ - return luckysheet.formula.error.nm; - } - - if(probability_s < 0 || probability_s > 1){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.binomial.cdf(number_s, trials, probability_s) : jStat.binomial.pdf(number_s, trials, probability_s); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BINOM_INV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //贝努利试验次数 - var trials = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(trials)){ - return trials; - } - - if(!luckysheet.func_methods.isRealNum(trials)){ - return luckysheet.formula.error.v; - } - - trials = parseInt(trials); - - //任一次给定检验的成功概率 - var probability_s = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(probability_s)){ - return probability_s; - } - - if(!luckysheet.func_methods.isRealNum(probability_s)){ - return luckysheet.formula.error.v; - } - - probability_s = parseFloat(probability_s); - - //期望的临界概率 - var alpha = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(alpha)){ - return alpha; - } - - if(!luckysheet.func_methods.isRealNum(alpha)){ - return luckysheet.formula.error.v; - } - - alpha = parseFloat(alpha); - - if(trials < 0){ - return luckysheet.formula.error.nm; - } - - if(probability_s < 0 || probability_s > 1){ - return luckysheet.formula.error.nm; - } - - if(alpha < 0 || alpha > 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var x = 0; - while (x <= trials) { - if (jStat.binomial.cdf(x, trials, probability_s) >= alpha) { - return x; - } - - x++; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CONFIDENCE_NORM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //置信水平 - var alpha = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(alpha)){ - return alpha; - } - - if(!luckysheet.func_methods.isRealNum(alpha)){ - return luckysheet.formula.error.v; - } - - alpha = parseFloat(alpha); - - //数据区域的总体标准偏差 - var standard_dev = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(standard_dev)){ - return standard_dev; - } - - if(!luckysheet.func_methods.isRealNum(standard_dev)){ - return luckysheet.formula.error.v; - } - - standard_dev = parseFloat(standard_dev); - - //样本总量的大小 - var size = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(size)){ - return size; - } - - if(!luckysheet.func_methods.isRealNum(size)){ - return luckysheet.formula.error.v; - } - - size = parseInt(size); - - if(alpha <= 0 || alpha >= 1){ - return luckysheet.formula.error.nm; - } - - if(standard_dev <= 0){ - return luckysheet.formula.error.nm; - } - - if(size < 1){ - return luckysheet.formula.error.nm; - } - - return jStat.normalci(1, alpha, standard_dev, size)[1] - 1; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CORREL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[0]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - known_y.push(data_known_y); - } - - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[1]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - known_x.push(data_known_x); - } - - if(known_y.length != known_x.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_y = [], data_x = []; - - for(var i = 0; i < known_y.length; i++){ - var num_y = known_y[i]; - var num_x = known_x[i]; - - if(luckysheet.func_methods.isRealNum(num_y) && luckysheet.func_methods.isRealNum(num_x)){ - data_y.push(parseFloat(num_y)); - data_x.push(parseFloat(num_x)); - } - } - - if(data_y.length == 0 || data_x.length == 0 || luckysheet.func_methods.standardDeviation(data_y) == 0 || luckysheet.func_methods.standardDeviation(data_x) == 0){ - return luckysheet.formula.error.d; - } - - return jStat.corrcoeff(data_y, data_x); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COVARIANCE_P": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[0]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - known_x.push(data_known_x); - } - - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[1]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - known_y.push(data_known_y); - } - - if(known_x.length != known_y.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_x = [], data_y = []; - - for(var i = 0; i < known_x.length; i++){ - var num_x = known_x[i]; - var num_y = known_y[i]; - - if(luckysheet.func_methods.isRealNum(num_x) && luckysheet.func_methods.isRealNum(num_y)){ - data_x.push(parseFloat(num_x)); - data_y.push(parseFloat(num_y)); - } - } - - if(data_x.length == 0 || data_y.length == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var mean1 = jStat.mean(data_x); - var mean2 = jStat.mean(data_y); - - var result = 0; - - for (var i = 0; i < data_x.length; i++) { - result += (data_x[i] - mean1) * (data_y[i] - mean2); - } - - result = result / data_x.length; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COVARIANCE_S": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[0]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - known_x.push(data_known_x); - } - - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[1]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - known_y.push(data_known_y); - } - - if(known_x.length != known_y.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_x = [], data_y = []; - - for(var i = 0; i < known_x.length; i++){ - var num_x = known_x[i]; - var num_y = known_y[i]; - - if(luckysheet.func_methods.isRealNum(num_x) && luckysheet.func_methods.isRealNum(num_y)){ - data_x.push(parseFloat(num_x)); - data_y.push(parseFloat(num_y)); - } - } - - if(data_x.length == 0 || data_y.length == 0){ - return luckysheet.formula.error.d; - } - - return jStat.covariance(data_x, data_y); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DEVSQ": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - if(luckysheet.getObjType(data) == "boolean"){ - if(data.toString().toLowerCase() == "true"){ - dataArr.push(1); - } - else if(data.toString().toLowerCase() == "false"){ - dataArr.push(0); - } - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - dataArr.push(data); - } - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - var mean = jStat.mean(dataArr_n); - var result = 0; - - for (var i = 0; i < dataArr_n.length; i++) { - result += Math.pow((dataArr_n[i] - mean), 2); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EXPON_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //指数分布函数的输入值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //用于指定指数分布函数的 lambda 值 - var lambda = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(lambda)){ - return lambda; - } - - if(!luckysheet.func_methods.isRealNum(lambda)){ - return luckysheet.formula.error.v; - } - - lambda = parseFloat(lambda); - - //是否使用指数累积分布 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(x < 0){ - return luckysheet.formula.error.nm; - } - - if(lambda < 0){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.exponential.cdf(x, lambda) : jStat.exponential.pdf(x, lambda); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AVERAGEIF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var sum = 0; - var count = 0; - - var rangeData = arguments[0].data; - var rangeRow = arguments[0].rowl; - var rangeCol = arguments[0].coll; - var criteria = luckysheet_parseData(arguments[1]); - var sumRangeData = []; - - //如果有第三个参数 - if(arguments[2]){ - //根据选择的目标的区域确定实际目标区域 - //初始位置 - var sumRangeStart = arguments[2].startCell; - var sumRangeRow = arguments[2].rowl; - var sumRangeCol = arguments[2].coll; - var sumRangeSheet = arguments[2].sheetName; - - if(rangeRow == sumRangeRow && rangeCol == sumRangeCol){ - sumRangeData = arguments[2].data; - } - else{ - var row=[],col=[]; - var sumRangeEnd = ""; - var realSumRange = ""; - //console.log("开始位置!!!",sumRangeStart,typeof(sumRangeStart)); - row[0] = parseInt(sumRangeStart.replace(/[^0-9]/g,"")) - 1; - col[0] = luckysheet.luckysheetABCatNum(sumRangeStart.replace(/[^A-Za-z]/g,"")); - - //根据第一个范围的长宽确定目标范围的末尾位置 - row[1] = row[0] + rangeRow - 1; - col[1] = col[0] + rangeCol - 1; - - //console.log(row[0],col[0],row[1],col[1]); - //末尾位置转化为sheet格式:如 F4 - var real_ABC = luckysheet.luckysheetchatatABC(col[1]); - var real_Num = row[1] + 1; - sumRangeEnd = real_ABC + real_Num; - //console.log("合成新的末尾位置:" + sumRangeEnd); - - realSumRange = sumRangeSheet + "!" +sumRangeStart + ":" + sumRangeEnd; - sumRangeData = luckysheet_getcelldata(realSumRange).data; - //console.log("最终的目标范围:",sumRangeData); - } - - sumRangeData = luckysheet.formula.getRangeArray(sumRangeData)[0]; - } - rangeData = luckysheet.formula.getRangeArray(rangeData)[0]; - - //循环遍历查找匹配项 - for(var i = 0; i < rangeData.length;i++){ - var v = rangeData[i]; - if(!!v && luckysheet.formula.acompareb(v, criteria)){ - var vnow = sumRangeData[i] || v; - - if(!luckysheet.func_methods.isRealNum(vnow)){ - continue; - } - - sum += parseFloat(vnow); - count++; - } - } - - if(sum == 0 || count == 0){ - return luckysheet.formula.error.d; - } - else{ - return luckysheet.numFormat(sum / count); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AVERAGEIFS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var sum = 0; - var count = 0; - var args = arguments; - luckysheet_getValue(args); - var rangeData = luckysheet.formula.getRangeArray(args[0])[0]; - var results = new Array(rangeData.length); - for(var i = 0;i < results.length; i++){ - results[i] = true; - } - for(var i = 1; i < args.length; i += 2){ - var range = luckysheet.formula.getRangeArray(args[i])[0]; - var criteria = args[i+1]; - for(var j = 0; j < range.length; j++){ - var v = range[j]; - results[j] = results[j] && (!!v) && luckysheet.formula.acompareb(v,criteria); - } - } - for(var i = 0; i < rangeData.length; i++){ - if(results[i] && luckysheet.func_methods.isRealNum(rangeData[i])){ - sum += parseFloat(rangeData[i]); - count ++; - } - } - - if(sum == 0 || count == 0){ - return luckysheet.formula.error.d; - } - else{ - return luckysheet.numFormat(sum / count); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PERMUT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //表示对象个数的整数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - //表示每个排列中对象个数的整数 - var number_chosen = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number_chosen)){ - return number_chosen; - } - - if(!luckysheet.func_methods.isRealNum(number_chosen)){ - return luckysheet.formula.error.v; - } - - number_chosen = parseInt(number_chosen); - - if(number <= 0 || number_chosen < 0){ - return luckysheet.formula.error.nm; - } - - if(number < number_chosen){ - return luckysheet.formula.error.nm; - } - - return luckysheet.func_methods.factorial(number) / luckysheet.func_methods.factorial(number - number_chosen); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TRIMMEAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //包含相关数据集的数组或范围 - var data_dataArr = arguments[0]; - var dataArr = []; - - if(luckysheet.getObjType(data_dataArr) == "array"){ - if(luckysheet.getObjType(data_dataArr[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_dataArr)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data_dataArr, false)); - } - else if(luckysheet.getObjType(data_dataArr) == "object" && data_dataArr.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data_dataArr, "number", false)); - } - else{ - dataArr.push(data_dataArr); - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - //排除比例 - var percent = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(percent)){ - return percent; - } - - if(!luckysheet.func_methods.isRealNum(percent)){ - return luckysheet.formula.error.v; - } - - percent = parseFloat(percent); - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(percent < 0 || percent > 1){ - return luckysheet.formula.error.nm; - } - - //计算 - function rest(array, idx) { - idx = idx || 1; - if (!array || typeof array.slice !== 'function') { - return array; - } - return array.slice(idx); - }; - - function initial(array, idx) { - idx = idx || 1; - if (!array || typeof array.slice !== 'function') { - return array; - } - return array.slice(0, array.length - idx); - }; - - dataArr_n.sort(function(a, b) { - return a - b; - }) - - var trim = window.luckysheet_function.FLOOR.f(dataArr_n.length * percent, 2) / 2; - - var result = rest(dataArr_n, trim); - result = initial(result, trim); - result = jStat.mean(result); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PERCENTILE_EXC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //定义相对位置的数组或数据区域 - var data_dataArr = arguments[0]; - var dataArr = []; - - if(luckysheet.getObjType(data_dataArr) == "array"){ - if(luckysheet.getObjType(data_dataArr[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_dataArr)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data_dataArr, false)); - } - else if(luckysheet.getObjType(data_dataArr) == "object" && data_dataArr.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data_dataArr, "number", false)); - } - else{ - dataArr.push(data_dataArr); - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - //0 到 1 之间的百分点值,不包含 0 和 1 - var k = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(k)){ - return k; - } - - if(!luckysheet.func_methods.isRealNum(k)){ - return luckysheet.formula.error.v; - } - - k = parseFloat(k); - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(k <= 0 || k >= 1){ - return luckysheet.formula.error.nm; - } - - //计算 - dataArr_n = dataArr_n.sort(function(a, b) { - return a - b; - }); - - var n = dataArr_n.length; - - if (k < 1 / (n + 1) || k > 1 - 1 / (n + 1)) { - return luckysheet.formula.error.nm; - } - - var l = k * (n + 1) - 1; - var fl = Math.floor(l); - - return (l === fl) ? dataArr_n[l] : dataArr_n[fl] + (l - fl) * (dataArr_n[fl + 1] - dataArr_n[fl]); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PERCENTILE_INC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //定义相对位置的数组或数据区域 - var data_dataArr = arguments[0]; - var dataArr = []; - - if(luckysheet.getObjType(data_dataArr) == "array"){ - if(luckysheet.getObjType(data_dataArr[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_dataArr)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data_dataArr, false)); - } - else if(luckysheet.getObjType(data_dataArr) == "object" && data_dataArr.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data_dataArr, "number", false)); - } - else{ - dataArr.push(data_dataArr); - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - //0 到 1 之间的百分点值,不包含 0 和 1 - var k = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(k)){ - return k; - } - - if(!luckysheet.func_methods.isRealNum(k)){ - return luckysheet.formula.error.v; - } - - k = parseFloat(k); - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(k < 0 || k > 1){ - return luckysheet.formula.error.nm; - } - - //计算 - dataArr_n = dataArr_n.sort(function(a, b) { - return a - b; - }); - - var n = dataArr_n.length; - - var l = k * (n - 1); - var fl = Math.floor(l); - - return (l === fl) ? dataArr_n[l] : dataArr_n[fl] + (l - fl) * (dataArr_n[fl + 1] - dataArr_n[fl]); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PEARSON": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[0]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - known_x.push(data_known_x); - } - - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[1]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - known_y.push(data_known_y); - } - - if(known_x.length != known_y.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_x = [], data_y = []; - - for(var i = 0; i < known_x.length; i++){ - var num_x = known_x[i]; - var num_y = known_y[i]; - - if(luckysheet.func_methods.isRealNum(num_x) && luckysheet.func_methods.isRealNum(num_y)){ - data_x.push(parseFloat(num_x)); - data_y.push(parseFloat(num_y)); - } - } - - if(data_y.length == 0 || data_x.length == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var xmean = jStat.mean(data_x); - var ymean = jStat.mean(data_y); - - var n = data_x.length; - var num = 0; - var den1 = 0; - var den2 = 0; - - for (var i = 0; i < n; i++) { - num += (data_x[i] - xmean) * (data_y[i] - ymean); - den1 += Math.pow(data_x[i] - xmean, 2); - den2 += Math.pow(data_y[i] - ymean, 2); - } - - return num / Math.sqrt(den1 * den2); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NORM_S_INV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //对应于正态分布的概率 - var probability = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(probability)){ - return probability; - } - - if(!luckysheet.func_methods.isRealNum(probability)){ - return luckysheet.formula.error.v; - } - - probability = parseFloat(probability); - - if(probability <= 0 || probability >= 1){ - return luckysheet.formula.error.nm; - } - - return jStat.normal.inv(probability, 0, 1); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NORM_S_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //需要计算其分布的数值 - var z = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(z)){ - return z; - } - - if(!luckysheet.func_methods.isRealNum(z)){ - return luckysheet.formula.error.v; - } - - z = parseFloat(z); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[1]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - return (cumulative) ? jStat.normal.cdf(z, 0, 1) : jStat.normal.pdf(z, 0, 1); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NORM_INV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //对应于正态分布的概率 - var probability = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(probability)){ - return probability; - } - - if(!luckysheet.func_methods.isRealNum(probability)){ - if(luckysheet.getObjType(probability) == "boolean"){ - if(probability.toString().toLowerCase() == "true"){ - probability = 1; - } - else if(probability.toString().toLowerCase() == "false"){ - probability = 0; - } - } - else{ - return luckysheet.formula.error.v; - } - } - - probability = parseFloat(probability); - - //分布的算术平均值 - var mean = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(mean)){ - return mean; - } - - if(!luckysheet.func_methods.isRealNum(mean)){ - if(luckysheet.getObjType(mean) == "boolean"){ - if(mean.toString().toLowerCase() == "true"){ - mean = 1; - } - else if(mean.toString().toLowerCase() == "false"){ - mean = 0; - } - } - else{ - return luckysheet.formula.error.v; - } - } - - mean = parseFloat(mean); - - //分布的标准偏差 - var standard_dev = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(standard_dev)){ - return standard_dev; - } - - if(!luckysheet.func_methods.isRealNum(standard_dev)){ - if(luckysheet.getObjType(standard_dev) == "boolean"){ - if(standard_dev.toString().toLowerCase() == "true"){ - standard_dev = 1; - } - else if(standard_dev.toString().toLowerCase() == "false"){ - standard_dev = 0; - } - } - else{ - return luckysheet.formula.error.v; - } - } - - standard_dev = parseFloat(standard_dev); - - if(probability <= 0 || probability >= 1){ - return luckysheet.formula.error.nm; - } - - if(standard_dev <= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - return jStat.normal.inv(probability, mean, standard_dev); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NORM_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //需要计算其分布的数值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - if(luckysheet.getObjType(x) == "boolean"){ - if(x.toString().toLowerCase() == "true"){ - x = 1; - } - else if(x.toString().toLowerCase() == "false"){ - x = 0; - } - } - else{ - return luckysheet.formula.error.v; - } - } - - x = parseFloat(x); - - //分布的算术平均值 - var mean = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(mean)){ - return mean; - } - - if(!luckysheet.func_methods.isRealNum(mean)){ - return luckysheet.formula.error.v; - } - - mean = parseFloat(mean); - - //分布的标准偏差 - var standard_dev = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(standard_dev)){ - return standard_dev; - } - - if(!luckysheet.func_methods.isRealNum(standard_dev)){ - return luckysheet.formula.error.v; - } - - standard_dev = parseFloat(standard_dev); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(standard_dev <= 0){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.normal.cdf(x, mean, standard_dev) : jStat.normal.pdf(x, mean, standard_dev); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NEGBINOM_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要模拟的失败次数 - var number_f = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number_f)){ - return number_f; - } - - if(!luckysheet.func_methods.isRealNum(number_f)){ - return luckysheet.formula.error.v; - } - - number_f = parseInt(number_f); - - //要模拟的成功次数 - var number_s = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number_s)){ - return number_s; - } - - if(!luckysheet.func_methods.isRealNum(number_s)){ - return luckysheet.formula.error.v; - } - - number_s = parseInt(number_s); - - //任一次给定检验的成功概率 - var probability_s = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(probability_s)){ - return probability_s; - } - - if(!luckysheet.func_methods.isRealNum(probability_s)){ - return luckysheet.formula.error.v; - } - - probability_s = parseFloat(probability_s); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(probability_s < 0 || probability_s > 1){ - return luckysheet.formula.error.nm; - } - - if(number_f < 0 || number_s < 1){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.negbin.cdf(number_f, number_s, probability_s) : jStat.negbin.pdf(number_f, number_s, probability_s); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MINA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(number.toString.toLowerCase() == "true"){ - dataArr.push(1); - } - else if(number.toString.toLowerCase() == "false"){ - dataArr.push(0); - } - else if(luckysheet.func_methods.isRealNum(data)){ - dataArr.push(data); - } - else{ - return luckysheet.formula.error.v; - } - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - else{ - if(number.toString().toLowerCase() == "true"){ - dataArr_n.push(1); - } - else{ - dataArr_n.push(0); - } - } - } - - return (dataArr_n.length === 0) ? 0 : Math.min.apply(Math, dataArr_n); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MEDIAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - return jStat.median(dataArr_n); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MAXA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(number.toString.toLowerCase() == "true"){ - dataArr.push(1); - } - else if(number.toString.toLowerCase() == "false"){ - dataArr.push(0); - } - else if(luckysheet.func_methods.isRealNum(data)){ - dataArr.push(data); - } - else{ - return luckysheet.formula.error.v; - } - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - else{ - if(number.toString().toLowerCase() == "true"){ - dataArr_n.push(1); - } - else{ - dataArr_n.push(0); - } - } - } - - return (dataArr_n.length === 0) ? 0 : Math.max.apply(Math, dataArr_n); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOGNORM_INV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //与对数分布相关的概率 - var probability = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(probability)){ - return probability; - } - - if(!luckysheet.func_methods.isRealNum(probability)){ - return luckysheet.formula.error.v; - } - - probability = parseFloat(probability); - - //ln(x) 的平均值 - var mean = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(mean)){ - return mean; - } - - if(!luckysheet.func_methods.isRealNum(mean)){ - return luckysheet.formula.error.v; - } - - mean = parseFloat(mean); - - //ln(x) 的标准偏差 - var standard_dev = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(standard_dev)){ - return standard_dev; - } - - if(!luckysheet.func_methods.isRealNum(standard_dev)){ - return luckysheet.formula.error.v; - } - - standard_dev = parseFloat(standard_dev); - - if(probability <= 0 || probability >= 1){ - return luckysheet.formula.error.nm; - } - - if(standard_dev <= 0){ - return luckysheet.formula.error.nm; - } - - return jStat.lognormal.inv(probability, mean, standard_dev); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOGNORM_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //与对数分布相关的概率 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //ln(x) 的平均值 - var mean = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(mean)){ - return mean; - } - - if(!luckysheet.func_methods.isRealNum(mean)){ - return luckysheet.formula.error.v; - } - - mean = parseFloat(mean); - - //ln(x) 的标准偏差 - var standard_dev = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(standard_dev)){ - return standard_dev; - } - - if(!luckysheet.func_methods.isRealNum(standard_dev)){ - return luckysheet.formula.error.v; - } - - standard_dev = parseFloat(standard_dev); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(x <= 0 || standard_dev <= 0){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.lognormal.cdf(x, mean, standard_dev) : jStat.lognormal.pdf(x, mean, standard_dev); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "Z_TEST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用来检验 x 的数组或数据区域 - var dataArr = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(arguments[0], true)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", true)); - } - else{ - dataArr.push(arguments[0]); - } - - var dataArr_n = []; - - for(var j = 0; j < dataArr.length; j++){ - var number = dataArr[j]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - //要测试的值 - var x = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.na; - } - - //总体(已知)标准偏差。 如果省略,则使用样本标准偏差 - var sigma = luckysheet.func_methods.standardDeviation_s(dataArr_n); - if(arguments.length == 3){ - sigma = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(sigma)){ - return sigma; - } - - if(!luckysheet.func_methods.isRealNum(sigma)){ - return luckysheet.formula.error.v; - } - - sigma = parseFloat(sigma); - } - - //计算 - var n = dataArr_n.length; - var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); - - return 1 - window.luckysheet_function.NORM_S_DIST.f((mean - x) / (sigma / Math.sqrt(n)), "true"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PROB": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //x_range - var data_x_range = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - data_x_range = data_x_range.concat(luckysheet.func_methods.getDataArr(arguments[0], false)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - data_x_range = data_x_range.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", false)); - } - else{ - data_x_range.push(arguments[0]); - } - - //prob_range - var data_prob_range = []; - - if(luckysheet.getObjType(arguments[1]) == "array"){ - if(luckysheet.getObjType(arguments[1][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[1])){ - return luckysheet.formula.error.v; - } - - data_prob_range = data_prob_range.concat(luckysheet.func_methods.getDataArr(arguments[1], false)); - } - else if(luckysheet.getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ - data_prob_range = data_prob_range.concat(luckysheet.func_methods.getCellDataArr(arguments[1], "text", false)); - } - else{ - data_prob_range.push(arguments[1]); - } - - if(data_x_range.length != data_prob_range.length){ - return luckysheet.formula.error.na; - } - - //data_x_range 和 data_prob_range 只取数值 - var x_range = [], prob_range = [], prob_range_sum = 0; - - for(var i = 0; i < data_x_range.length; i++){ - var num_x_range = data_x_range[i]; - var num_prob_range = data_prob_range[i]; - - if(luckysheet.func_methods.isRealNum(num_x_range) && luckysheet.func_methods.isRealNum(num_prob_range)){ - x_range.push(parseFloat(num_x_range)); - prob_range.push(parseFloat(num_prob_range)); - - prob_range_sum += parseFloat(num_prob_range); - - if(parseFloat(num_prob_range) <= 0 || parseFloat(num_prob_range) > 1){ - return luckysheet.formula.error.nm; - } - } - } - - if(prob_range_sum != 1){ - return luckysheet.formula.error.nm; - } - - //要计算其概率的数值下界 - var lower_limit = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(lower_limit)){ - return lower_limit; - } - - if(!luckysheet.func_methods.isRealNum(lower_limit)){ - return luckysheet.formula.error.v; - } - - lower_limit = parseFloat(lower_limit); - - //要计算其概率的数值上界 - var upper_limit = lower_limit; - if(arguments.length == 4){ - upper_limit = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(upper_limit)){ - return upper_limit; - } - - if(!luckysheet.func_methods.isRealNum(upper_limit)){ - return luckysheet.formula.error.v; - } - - upper_limit = parseFloat(upper_limit); - } - - //计算 - var result = 0; - - for (var i = 0; i < x_range.length; i++) { - if (x_range[i] >= lower_limit && x_range[i] <= upper_limit) { - result += prob_range[i]; - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "QUARTILE_EXC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要求得四分位数值的数组或数字型单元格区域 - var data_array = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - data_array = data_array.concat(luckysheet.func_methods.getDataArr(arguments[0], true)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - data_array = data_array.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[0])){ - return luckysheet.formula.error.v; - } - - data_array.push(arguments[0]); - } - - var array = []; - - for(var i = 0; i < data_array.length; i++){ - var number = data_array[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - array.push(parseFloat(number)); - } - } - - //要返回第几个四分位值 - var quart = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(quart)){ - return quart; - } - - if(!luckysheet.func_methods.isRealNum(quart)){ - return luckysheet.formula.error.v; - } - - quart = parseInt(quart); - - if(array.length == 0){ - return luckysheet.formula.error.nm; - } - - if(quart <= 0 || quart >= 4){ - return luckysheet.formula.error.nm; - } - - //计算 - switch (quart) { - case 1: - return window.luckysheet_function.PERCENTILE_EXC.f(array, 0.25); - case 2: - return window.luckysheet_function.PERCENTILE_EXC.f(array, 0.5); - case 3: - return window.luckysheet_function.PERCENTILE_EXC.f(array, 0.75); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "QUARTILE_INC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要求得四分位数值的数组或数字型单元格区域 - var data_array = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - data_array = data_array.concat(luckysheet.func_methods.getDataArr(arguments[0], true)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - data_array = data_array.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[0])){ - return luckysheet.formula.error.v; - } - - data_array.push(arguments[0]); - } - - var array = []; - - for(var i = 0; i < data_array.length; i++){ - var number = data_array[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - array.push(parseFloat(number)); - } - } - - //要返回第几个四分位值 - var quart = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(quart)){ - return quart; - } - - if(!luckysheet.func_methods.isRealNum(quart)){ - return luckysheet.formula.error.v; - } - - quart = parseInt(quart); - - if(array.length == 0){ - return luckysheet.formula.error.nm; - } - - if(quart < 0 || quart > 4){ - return luckysheet.formula.error.nm; - } - - //计算 - switch (quart) { - case 0: - return Math.min.apply(Math, array); - case 1: - return window.luckysheet_function.PERCENTILE_INC.f(array, 0.25); - case 2: - return window.luckysheet_function.PERCENTILE_INC.f(array, 0.5); - case 3: - return window.luckysheet_function.PERCENTILE_INC.f(array, 0.75); - case 4: - return Math.max.apply(Math, array); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "POISSON_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //事件数 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseInt(x); - - //期望值 - var mean = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(mean)){ - return mean; - } - - if(!luckysheet.func_methods.isRealNum(mean)){ - return luckysheet.formula.error.v; - } - - mean = parseFloat(mean); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(x < 0 || mean < 0){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.poisson.cdf(x, mean) : jStat.poisson.pdf(x, mean); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RSQ": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表因变量数据数组或矩阵的范围 - var data_known_y = arguments[0]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(data_known_y, false)); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(data_known_y, "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y.push(data_known_y); - } - - //代表自变量数据数组或矩阵的范围 - var data_known_x = arguments[1]; - var known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(data_known_x, false)); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(data_known_x, "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x.push(data_known_x); - } - - if(known_y.length != known_x.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_y = [], data_x = []; - - for(var i = 0; i < known_y.length; i++){ - var num_y = known_y[i]; - var num_x = known_x[i]; - - if(luckysheet.func_methods.isRealNum(num_y) && luckysheet.func_methods.isRealNum(num_x)){ - data_y.push(parseFloat(num_y)); - data_x.push(parseFloat(num_x)); - } - } - - if(data_y.length == 0 || data_x.length == 0){ - return luckysheet.formula.error.d; - } - - return Math.pow(window.luckysheet_function.PEARSON.f(data_y, data_x), 2); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //T-分布函数的输入 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //自由度数值 - var degrees_freedom = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(degrees_freedom)){ - return degrees_freedom; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom)){ - return luckysheet.formula.error.v; - } - - degrees_freedom = parseInt(degrees_freedom); - - //决定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(degrees_freedom < 1){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.studentt.cdf(x, degrees_freedom) : jStat.studentt.pdf(x, degrees_freedom); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T_DIST_2T": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //T-分布函数的输入 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //自由度数值 - var degrees_freedom = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(degrees_freedom)){ - return degrees_freedom; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom)){ - return luckysheet.formula.error.v; - } - - degrees_freedom = parseInt(degrees_freedom); - - if(x < 0 || degrees_freedom < 1){ - return luckysheet.formula.error.nm; - } - - return (1 - jStat.studentt.cdf(x , degrees_freedom)) * 2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T_DIST_RT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //T-分布函数的输入 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //自由度数值 - var degrees_freedom = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(degrees_freedom)){ - return degrees_freedom; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom)){ - return luckysheet.formula.error.v; - } - - degrees_freedom = parseInt(degrees_freedom); - - if(degrees_freedom < 1){ - return luckysheet.formula.error.nm; - } - - return 1 - jStat.studentt.cdf(x , degrees_freedom); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T_INV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //与学生的 t 分布相关的概率 - var probability = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(probability)){ - return probability; - } - - if(!luckysheet.func_methods.isRealNum(probability)){ - return luckysheet.formula.error.v; - } - - probability = parseFloat(probability); - - //自由度数值 - var deg_freedom = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(deg_freedom)){ - return deg_freedom; - } - - if(!luckysheet.func_methods.isRealNum(deg_freedom)){ - return luckysheet.formula.error.v; - } - - deg_freedom = parseInt(deg_freedom); - - if(probability <= 0 || probability > 1){ - return luckysheet.formula.error.nm; - } - - if(deg_freedom < 1){ - return luckysheet.formula.error.nm; - } - - return jStat.studentt.inv(probability, deg_freedom); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T_INV_2T": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //与学生的 t 分布相关的概率 - var probability = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(probability)){ - return probability; - } - - if(!luckysheet.func_methods.isRealNum(probability)){ - return luckysheet.formula.error.v; - } - - probability = parseFloat(probability); - - //自由度数值 - var deg_freedom = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(deg_freedom)){ - return deg_freedom; - } - - if(!luckysheet.func_methods.isRealNum(deg_freedom)){ - return luckysheet.formula.error.v; - } - - deg_freedom = parseInt(deg_freedom); - - if(probability <= 0 || probability > 1){ - return luckysheet.formula.error.nm; - } - - if(deg_freedom < 1){ - return luckysheet.formula.error.nm; - } - - return Math.abs(jStat.studentt.inv(probability / 2, deg_freedom)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T_TEST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //第一个数据集 - var known_x = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(arguments[0], false)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[0])){ - return luckysheet.formula.error.v; - } - - known_x.push(arguments[0]); - } - - // var data_x = []; - var data_x = known_x; - - //第二个数据集 - var known_y = []; - - if(luckysheet.getObjType(arguments[1]) == "array"){ - if(luckysheet.getObjType(arguments[1][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[1])){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(arguments[1], false)); - } - else if(luckysheet.getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(arguments[1], "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[1])){ - return luckysheet.formula.error.v; - } - - known_y.push(arguments[1]); - } - - // var data_y = []; - var data_y = known_y; - - //指定分布的尾数 - var tails = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(tails)){ - return tails; - } - - if(!luckysheet.func_methods.isRealNum(tails)){ - return luckysheet.formula.error.v; - } - - tails = parseInt(tails); - - //指定 t 检验的类型 - var type = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseInt(type); - - if([1,2].indexOf(tails) == -1){ - return luckysheet.formula.error.nm; - } - - if([1,2,3].indexOf(type) == -1){ - return luckysheet.formula.error.nm; - } - - //计算 - var t = null, df = null; - if(type == 1){ - var diff_arr = []; - - for (i = 0; i < data_x.length; i++) { - diff_arr.push(data_x[i] - data_y[i]); - } - - var diff_mean = Math.abs(jStat.mean(diff_arr)); - var diff_sd = luckysheet.func_methods.standardDeviation_s(diff_arr); - - t = diff_mean / (diff_sd / Math.sqrt(data_x.length)); - df = data_x.length - 1; - } - else{ - var mean_x = jStat.mean(data_x); - var mean_y = jStat.mean(data_y); - - var s_x = luckysheet.func_methods.variance_s(data_x); - var s_y = luckysheet.func_methods.variance_s(data_y); - - t = Math.abs(mean_x - mean_y) / Math.sqrt(s_x / data_x.length + s_y / data_y.length); - - switch(type){ - case 2: - df = data_x.length + data_y.length - 2; - break; - case 3: - df = Math.pow(s_x / data_x.length + s_y / data_y.length, 2) / (Math.pow(s_x / data_x.length, 2) / (data_x.length - 1) + Math.pow(s_y / data_y.length, 2) / (data_y.length - 1)); - break; - } - } - - if(tails == 1){ - var result = window.luckysheet_function.T_DIST_RT.f(t, df); - } - else if(tails == 2){ - var result = window.luckysheet_function.T_DIST_2T.f(t, df); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "F_DIST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用来计算函数的值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //分子自由度 - var degrees_freedom1 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(degrees_freedom1)){ - return degrees_freedom1; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom1)){ - return luckysheet.formula.error.v; - } - - degrees_freedom1 = parseInt(degrees_freedom1); - - //分母自由度 - var degrees_freedom2 = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(degrees_freedom2)){ - return degrees_freedom2; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom2)){ - return luckysheet.formula.error.v; - } - - degrees_freedom2 = parseInt(degrees_freedom2); - - //用于确定函数形式的逻辑值 - var cumulative = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(cumulative)){ - return cumulative; - } - - if(x < 0){ - return luckysheet.formula.error.nm; - } - - if(degrees_freedom1 < 1){ - return luckysheet.formula.error.nm; - } - - if(degrees_freedom2 < 1){ - return luckysheet.formula.error.nm; - } - - return (cumulative) ? jStat.centralF.cdf(x, degrees_freedom1, degrees_freedom2) : jStat.centralF.pdf(x, degrees_freedom1, degrees_freedom2); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "F_DIST_RT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用来计算函数的值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //分子自由度 - var degrees_freedom1 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(degrees_freedom1)){ - return degrees_freedom1; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom1)){ - return luckysheet.formula.error.v; - } - - degrees_freedom1 = parseInt(degrees_freedom1); - - //分母自由度 - var degrees_freedom2 = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(degrees_freedom2)){ - return degrees_freedom2; - } - - if(!luckysheet.func_methods.isRealNum(degrees_freedom2)){ - return luckysheet.formula.error.v; - } - - degrees_freedom2 = parseInt(degrees_freedom2); - - if(x < 0){ - return luckysheet.formula.error.nm; - } - - if(degrees_freedom1 < 1){ - return luckysheet.formula.error.nm; - } - - if(degrees_freedom2 < 1){ - return luckysheet.formula.error.nm; - } - - return 1 - jStat.centralF.cdf(x, degrees_freedom1, degrees_freedom2); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "VAR_P": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.d; - } - - var n = dataArr_n.length; - var sigma = 0; - var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); - for (var i = 0; i < n; i++) { - sigma += Math.pow(dataArr_n[i] - mean, 2); - } - - return sigma / n; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "VAR_S": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.d; - } - - var n = dataArr_n.length; - var sigma = 0; - var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); - for (var i = 0; i < n; i++) { - sigma += Math.pow(dataArr_n[i] - mean, 2); - } - - return sigma / (n - 1); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "VARA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(number.toString.toLowerCase() == "true"){ - dataArr.push(1); - } - else if(number.toString.toLowerCase() == "false"){ - dataArr.push(0); - } - else if(luckysheet.func_methods.isRealNum(data)){ - dataArr.push(data); - } - else{ - return luckysheet.formula.error.v; - } - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - else{ - if(number.toString().toLowerCase() == "true"){ - dataArr_n.push(1); - } - else{ - dataArr_n.push(0); - } - } - } - - var n = dataArr_n.length; - var sigma = 0; - var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); - for (var i = 0; i < n; i++) { - sigma += Math.pow(dataArr_n[i] - mean, 2); - } - - return sigma / (n - 1); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "VARPA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(number.toString.toLowerCase() == "true"){ - dataArr.push(1); - } - else if(number.toString.toLowerCase() == "false"){ - dataArr.push(0); - } - else if(luckysheet.func_methods.isRealNum(data)){ - dataArr.push(data); - } - else{ - return luckysheet.formula.error.v; - } - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - else{ - if(number.toString().toLowerCase() == "true"){ - dataArr_n.push(1); - } - else{ - dataArr_n.push(0); - } - } - } - - var n = dataArr_n.length; - var sigma = 0; - var mean = window.luckysheet_function.AVERAGE.f.apply(window.luckysheet_function.AVERAGE, dataArr_n); - for (var i = 0; i < n; i++) { - sigma += Math.pow(dataArr_n[i] - mean, 2); - } - - return sigma / n; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STEYX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表因变量数据数组或矩阵的范围 - var known_y = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(arguments[0], false)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[0])){ - return luckysheet.formula.error.v; - } - - known_y.push(arguments[0]); - } - - //代表自变量数据数组或矩阵的范围 - var known_x = []; - - if(luckysheet.getObjType(arguments[1]) == "array"){ - if(luckysheet.getObjType(arguments[1][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[1])){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(arguments[1], false)); - } - else if(luckysheet.getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(arguments[1], "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[1])){ - return luckysheet.formula.error.v; - } - - known_x.push(arguments[1]); - } - - if(known_y.length != known_x.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_y = [], data_x = []; - - for(var i = 0; i < known_y.length; i++){ - var num_y = known_y[i]; - var num_x = known_x[i]; - - if(luckysheet.func_methods.isRealNum(num_y) && luckysheet.func_methods.isRealNum(num_x)){ - data_y.push(parseFloat(num_y)); - data_x.push(parseFloat(num_x)); - } - } - - if(data_y.length < 3 || data_x.length < 3){ - return luckysheet.formula.error.d; - } - - //计算 - var xmean = jStat.mean(data_x); - var ymean = jStat.mean(data_y); - - var n = data_x.length; - var lft = 0; - var num = 0; - var den = 0; - - for (var i = 0; i < n; i++) { - lft += Math.pow(data_y[i] - ymean, 2); - num += (data_x[i] - xmean) * (data_y[i] - ymean); - den += Math.pow(data_x[i] - xmean, 2); - } - - return Math.sqrt((lft - num * num / den) / (n - 2)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STANDARDIZE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要正态化的随机变量值 - var x = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - if(!luckysheet.func_methods.isRealNum(x)){ - return luckysheet.formula.error.v; - } - - x = parseFloat(x); - - //分布的均值 - var mean = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(mean)){ - return mean; - } - - if(!luckysheet.func_methods.isRealNum(mean)){ - return luckysheet.formula.error.v; - } - - mean = parseFloat(mean); - - //分布的标准偏差 - var standard_dev = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(standard_dev)){ - return standard_dev; - } - - if(!luckysheet.func_methods.isRealNum(standard_dev)){ - return luckysheet.formula.error.v; - } - - standard_dev = parseFloat(standard_dev); - - if(standard_dev <= 0){ - return luckysheet.formula.error.nm; - } - - return (x - mean) / standard_dev; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SMALL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要正态化的随机变量值 - var dataArr = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(arguments[0], true)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[0])){ - return luckysheet.formula.error.v; - } - - dataArr.push(arguments[0]); - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - //要返回的数据在数组或数据区域里的位置(从小到大) - var k = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(k)){ - return k; - } - - if(!luckysheet.func_methods.isRealNum(k)){ - return luckysheet.formula.error.v; - } - - k = parseInt(k); - - if(dataArr_n.length == 0){ - return luckysheet.formula.error.nm; - } - - if(k <= 0 || k > dataArr_n.length){ - return luckysheet.formula.error.nm; - } - - //计算 - - return dataArr_n.sort(function(a, b) { - return a - b; - })[k - 1]; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SLOPE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //代表因变量数据数组或矩阵的范围 - var known_y = []; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[0])){ - return luckysheet.formula.error.v; - } - - known_y = known_y.concat(luckysheet.func_methods.getDataArr(arguments[0], false)); - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - known_y = known_y.concat(luckysheet.func_methods.getCellDataArr(arguments[0], "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[0])){ - return luckysheet.formula.error.v; - } - - known_y.push(arguments[0]); - } - - //代表自变量数据数组或矩阵的范围 - var known_x = []; - - if(luckysheet.getObjType(arguments[1]) == "array"){ - if(luckysheet.getObjType(arguments[1][0]) == "array" && !luckysheet.func_methods.isDyadicArr(arguments[1])){ - return luckysheet.formula.error.v; - } - - known_x = known_x.concat(luckysheet.func_methods.getDataArr(arguments[1], false)); - } - else if(luckysheet.getObjType(arguments[1]) == "object" && arguments[1].startCell != null){ - known_x = known_x.concat(luckysheet.func_methods.getCellDataArr(arguments[1], "text", false)); - } - else{ - if(!luckysheet.func_methods.isRealNum(arguments[1])){ - return luckysheet.formula.error.v; - } - - known_x.push(arguments[1]); - } - - if(known_y.length != known_x.length){ - return luckysheet.formula.error.na; - } - - //known_y 和 known_x 只取数值 - var data_y = [], data_x = []; - - for(var i = 0; i < known_y.length; i++){ - var num_y = known_y[i]; - var num_x = known_x[i]; - - if(luckysheet.func_methods.isRealNum(num_y) && luckysheet.func_methods.isRealNum(num_x)){ - data_y.push(parseFloat(num_y)); - data_x.push(parseFloat(num_x)); - } - } - - if(data_y.length < 3 || data_x.length < 3){ - return luckysheet.formula.error.d; - } - - //计算 - var xmean = jStat.mean(data_x); - var ymean = jStat.mean(data_y); - - var n = data_x.length; - var num = 0; - var den = 0; - - for (var i = 0; i < n; i++) { - num += (data_x[i] - xmean) * (data_y[i] - ymean); - den += Math.pow(data_x[i] - xmean, 2); - } - - return num / den; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SKEW": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - if(dataArr_n.length < 3 || luckysheet.func_methods.standardDeviation_s(dataArr_n) == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var mean = jStat.mean(dataArr_n); - var n = dataArr_n.length; - var sigma = 0; - for (var i = 0; i < n; i++) { - sigma += Math.pow(dataArr_n[i] - mean, 3); - } - - return n * sigma / ((n - 1) * (n - 2) * Math.pow(jStat.stdev(dataArr_n, true), 3)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SKEW_P": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var dataArr = []; - - for (var i = 0; i < arguments.length; i++) { - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data)){ - return luckysheet.formula.error.v; - } - - dataArr.push(data); - } - } - - var dataArr_n = []; - - for(var i = 0; i < dataArr.length; i++){ - var number = dataArr[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - dataArr_n.push(parseFloat(number)); - } - } - - if(dataArr_n.length < 3 || luckysheet.func_methods.standardDeviation_s(dataArr_n) == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var mean = jStat.mean(dataArr_n); - var n = dataArr_n.length; - var m2 = 0; - var m3 = 0; - - for (var i = 0; i < n; i++) { - m3 += Math.pow(dataArr_n[i] - mean, 3); - m2 += Math.pow(dataArr_n[i] - mean, 2); - } - - m3 = m3 / n; - m2 = m2 / n; - - return m3 / Math.pow(m2, 3 / 2); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ADDRESS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //行号 - var row_num = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(row_num)){ - return row_num; - } - - if(!luckysheet.func_methods.isRealNum(row_num)){ - return luckysheet.formula.error.v; - } - - row_num = parseInt(row_num); - - //列标 - var column_num = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(column_num)){ - return column_num; - } - - if(!luckysheet.func_methods.isRealNum(column_num)){ - return luckysheet.formula.error.v; - } - - column_num = parseInt(column_num); - - //引用类型 - var abs_num = 1; - if(arguments.length >= 3){ - abs_num = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(abs_num)){ - return abs_num; - } - - if(!luckysheet.func_methods.isRealNum(abs_num)){ - return luckysheet.formula.error.v; - } - - abs_num = parseInt(abs_num); - } - - //A1标记形式 -- R1C1标记形式 - var A1 = true; - if(arguments.length >= 4){ - A1 = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(A1)){ - return A1; - } - } - - if(row_num <= 0 || column_num <= 0){ - return luckysheet.formula.error.v; - } - - if([1,2,3,4].indexOf(abs_num) == -1){ - return luckysheet.formula.error.v; - } - - //计算 - var str; - if(A1){ - column_num = luckysheet.luckysheetchatatABC(column_num - 1); - - switch(abs_num){ - case 1: - str = "$" + column_num + "$" + row_num; - break; - case 2: - str = column_num + "$" + row_num; - break; - case 3: - str = "$" + column_num + row_num; - break; - case 4: - str = column_num + row_num; - break; - } - } - else{ - switch(abs_num){ - case 1: - str = "R" + row_num + "C" + column_num; - break; - case 2: - str = "R" + row_num + "C[" + column_num + "]"; - break; - case 3: - str = "R[" + row_num + "]" + "C" + column_num; - break; - case 4: - str = "R[" + row_num + "]" + "C[" + column_num + "]"; - break; - } - } - - if(arguments.length == 5){ - //工作表名称 - var sheet_text = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(sheet_text)){ - return sheet_text; - } - - return sheet_text + "!" + str; - } - else{ - return str; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "INDIRECT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //以带引号的字符串形式提供的单元格引用 - var ref_text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(ref_text)){ - return ref_text; - } - - //A1标记形式 -- R1C1标记形式 - var A1 = true; - if(arguments.length == 2){ - A1 = luckysheet.func_methods.getCellBoolen(arguments[1]); - - if(luckysheet.func_methods.valueIsError(A1)){ - return A1; - } - } - - //计算 - if(A1){ - var reg = /^(([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+))$/g; - - if(reg.test(ref_text)){ - var row = parseInt(ref_text.replace(/[^0-9]/g, "")) - 1; - var col = luckysheet.luckysheetABCatNum(ref_text.replace(/[^A-Za-z]/g, "")); - - if(row < 0 || row >= luckysheet.flowdata.length || col < 0 || col >= luckysheet.flowdata[0].length){ - return luckysheet.formula.error.r; - } - - if(luckysheet.flowdata[row][col] == null || luckysheet.func_methods.isRealNull(luckysheet.flowdata[row][col].v)){ - return 0; - } - - return luckysheet.flowdata[row][col].v; - } - else{ - return luckysheet.formula.error.r; - } - } - else{ - var reg = /^[R][0-9]+[C][0-9]+$/g; - - if(reg.test(ref_text)){ - var row = parseInt(ref_text.split("R")[1].split("C")[0]); - var col = parseInt(ref_text.split("R")[1].split("C")[1]); - - if(row < 0 || row >= luckysheet.flowdata.length || col < 0 || col >= luckysheet.flowdata[0].length){ - return luckysheet.formula.error.r; - } - - if(luckysheet.flowdata[row][col] == null || luckysheet.func_methods.isRealNull(luckysheet.flowdata[row][col].v)){ - return 0; - } - - return luckysheet.flowdata[row][col].v; - } - else{ - return luckysheet.formula.error.r; - } - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ROW": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - if(arguments.length == 1){ - //要返回其行号的单元格 - var reference; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - reference = arguments[0].startCell; - } - else{ - reference = arguments[0]; - } - - if(luckysheet.formula.iscelldata(reference)){ - var cellrange = luckysheet.formula.getcellrange(reference); - - return cellrange["row"][0] + 1; - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - return window.luckysheetCurrentRow + 1; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ROWS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要返回其行数的范围 - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array"){ - return arguments[0].length; - } - else{ - return 1; - } - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - return arguments[0].rowl; - } - else{ - return 1; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COLUMN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - if(arguments.length == 1){ - //要返回其列号的单元格 - var reference; - - if(luckysheet.getObjType(arguments[0]) == "array"){ - return luckysheet.formula.error.v; - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - reference = arguments[0].startCell; - } - else{ - reference = arguments[0]; - } - - if(luckysheet.formula.iscelldata(reference)){ - var cellrange = luckysheet.formula.getcellrange(reference); - - return cellrange["column"][0] + 1; - } - else{ - return luckysheet.formula.error.v; - } - } - else{ - return window.luckysheetCurrentColumn + 1; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COLUMNS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //返回指定数组或范围中的列数 - if(luckysheet.getObjType(arguments[0]) == "array"){ - if(luckysheet.getObjType(arguments[0][0]) == "array"){ - return arguments[0][0].length; - } - else{ - return arguments[0].length; - } - } - else if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - return arguments[0].coll; - } - else{ - return 1; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "OFFSET": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用于计算行列偏移量的起点 - if(!(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null)){ - return luckysheet.formula.error.v; - } - - var reference = arguments[0].startCell; - - //要偏移的行数 - var rows = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(rows)){ - return rows; - } - - if(!luckysheet.func_methods.isRealNum(rows)){ - return luckysheet.formula.error.v; - } - - rows = parseInt(rows); - - //要偏移的列数 - var cols = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(cols)){ - return cols; - } - - if(!luckysheet.func_methods.isRealNum(cols)){ - return luckysheet.formula.error.v; - } - - cols = parseInt(cols); - - //要从偏移目标开始返回的范围的高度 - var height = arguments[0].rowl; - if(arguments.length >= 4){ - height = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(height)){ - return height; - } - - if(!luckysheet.func_methods.isRealNum(height)){ - return luckysheet.formula.error.v; - } - - height = parseInt(height); - } - - //要从偏移目标开始返回的范围的宽度 - var width = arguments[0].coll; - if(arguments.length == 5){ - width = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(width)){ - return width; - } - - if(!luckysheet.func_methods.isRealNum(width)){ - return luckysheet.formula.error.v; - } - - width = parseInt(width); - } - - if(height < 1 || width < 1){ - return luckysheet.formula.error.r; - } - - //计算 - var cellrange = luckysheet.formula.getcellrange(reference); - var cellRow0 = cellrange["row"][0]; - var cellCol0 = cellrange["column"][0]; - - cellRow0 += rows; - cellCol0 += cols; - - var cellRow1 = cellRow0 + height - 1; - var cellCol1 = cellCol0 + width - 1; - - if(cellRow0 < 0 || cellRow1 >= luckysheet.flowdata.length || cellCol0 < 0 || cellCol1 >= luckysheet.flowdata[0].length){ - return luckysheet.formula.error.r; - } - - var result = []; - - for(var r = cellRow0; r <= cellRow1; r++){ - var rowArr = []; - - for(var c = cellCol0; c <= cellCol1; c++){ - if(luckysheet.flowdata[r][c] != null && !luckysheet.func_methods.isRealNull(luckysheet.flowdata[r][c].v)){ - rowArr.push(luckysheet.flowdata[r][c].v); - } - else{ - rowArr.push(0); - } - } - - result.push(rowArr); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MATCH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //lookup_value - var lookup_value = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(lookup_value)){ - return lookup_value; - } - - //lookup_array - var data_lookup_array = arguments[1]; - var lookup_array = []; - - if(luckysheet.getObjType(data_lookup_array) == "array"){ - if(luckysheet.getObjType(data_lookup_array[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_lookup_array)){ - return luckysheet.formula.error.v; - } - - return luckysheet.formula.error.na; - } - else{ - for(var i = 0; i < data_lookup_array.length; i++){ - lookup_array.push(data_lookup_array[i]); - } - } - } - else if(luckysheet.getObjType(data_lookup_array) == "object" && data_lookup_array.startCell != null){ - if(data_lookup_array.rowl > 1 && data_lookup_array.coll > 1){ - return luckysheet.formula.error.na; - } - - if(data_lookup_array.data != null){ - if(luckysheet.getObjType(data_lookup_array.data) == "array"){ - for(var i = 0; i < data_lookup_array.data.length; i++){ - for(var j = 0; j < data_lookup_array.data[i].length; j++){ - if(data_lookup_array.data[i][j] != null && !luckysheet.func_methods.isRealNull(data_lookup_array.data[i][j].v)){ - lookup_array.push(data_lookup_array.data[i][j].v); - } - } - } - } - else{ - lookup_array.push(data_lookup_array.data.v); - } - } - } - - //match_type - var match_type = 1; - if(arguments.length == 3){ - match_type = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(match_type)){ - return match_type; - } - - if(!luckysheet.func_methods.isRealNum(match_type)){ - return luckysheet.formula.error.v; - } - - match_type = Math.ceil(parseFloat(match_type)); - } - - if([-1,0,1].indexOf(match_type) == -1){ - return luckysheet.formula.error.na; - } - - //计算 - var index; - var indexValue; - - for (var idx = 0; idx < lookup_array.length; idx++) { - if (match_type === 1) { - if (lookup_array[idx] === lookup_value) { - return idx + 1; - } - else if (lookup_array[idx] < lookup_value) { - if (!indexValue) { - index = idx + 1; - indexValue = lookup_array[idx]; - } - else if (lookup_array[idx] > indexValue) { - index = idx + 1; - indexValue = lookup_array[idx]; - } - } - } - else if (match_type === 0) { - if (typeof lookup_value === 'string') { - lookup_value = lookup_value.replace(/\?/g, '.'); - if (lookup_array[idx].toLowerCase().match(lookup_value.toLowerCase())) { - return idx + 1; - } - } - else { - if (lookup_array[idx] === lookup_value) { - return idx + 1; - } - } - } - else if (match_type === -1) { - if (lookup_array[idx] === lookup_value) { - return idx + 1; - } - else if (lookup_array[idx] > lookup_value) { - if (!indexValue) { - index = idx + 1; - indexValue = lookup_array[idx]; - } - else if (lookup_array[idx] < indexValue) { - index = idx + 1; - indexValue = lookup_array[idx]; - } - } - } - } - - return index ? index : luckysheet.formula.error.na; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "VLOOKUP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //lookup_value - var lookup_value = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(lookup_value)){ - return lookup_value; - } - - if(lookup_value.toString().replace(/\s/g, "") == ""){ - return luckysheet.formula.error.na; - } - - //table_array - var data_table_array = arguments[1]; - var table_array = []; - - if(luckysheet.getObjType(data_table_array) == "array"){ - if(luckysheet.getObjType(data_table_array[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_table_array)){ - return luckysheet.formula.error.v; - } - - for(var i = 0; i < data_table_array.length; i++){ - var rowArr = []; - - for(var j = 0; j < data_table_array[i].length; j++){ - rowArr.push(data_table_array[i][j]); - } - - table_array.push(rowArr); - } - } - else{ - var rowArr = []; - - for(var i = 0; i < data_table_array.length; i++){ - rowArr.push(data_table_array[i]); - } - - table_array.push(rowArr); - } - } - else if(luckysheet.getObjType(data_table_array) == "object" && data_table_array.startCell != null){ - table_array = luckysheet.func_methods.getCellDataDyadicArr(data_table_array, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //col_index_num - var col_index_num = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(col_index_num)){ - return col_index_num; - } - - if(!luckysheet.func_methods.isRealNum(col_index_num)){ - return luckysheet.formula.error.v; - } - - col_index_num = parseInt(col_index_num); - - //range_lookup - var range_lookup = true; - if(arguments.length == 4){ - range_lookup = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(range_lookup)){ - return range_lookup; - } - } - - //判断 - if(col_index_num < 1){ - return luckysheet.formula.error.v; - } - else if(col_index_num > table_array[0].length){ - return luckysheet.formula.error.r; - } - - //计算 - if(range_lookup){ - table_array = luckysheet.orderbydata(table_array, 0, true); - - for(var r = 0; r < table_array.length; r++){ - var v = table_array[r][0]; - - var result; - - if (luckysheet.datecontroll.isdatetime(lookup_value) && luckysheet.datecontroll.isdatetime(v)) { - result = luckysheet.datecontroll.diff(lookup_value, v); - } - else if (luckysheet.func_methods.isRealNum(lookup_value) && luckysheet.func_methods.isRealNum(v)) { - result = numeral(lookup_value).value() - numeral(v).value(); - } - else if (!luckysheet.func_methods.isRealNum(lookup_value) && !luckysheet.func_methods.isRealNum(v)) { - result = lookup_value.localeCompare(v, "zh"); - } - else if (!luckysheet.func_methods.isRealNum(lookup_value)) { - result = 1; - } - else if (!luckysheet.func_methods.isRealNum(v)) { - result = -1; - } - - if(result < 0){ - if(r == 0){ - return luckysheet.formula.error.na; - } - else{ - return table_array[r - 1][col_index_num - 1]; - } - } - else{ - if(r == table_array.length - 1){ - return table_array[r][col_index_num - 1]; - } - } - } - } - else{ - var index = null; - - for(var r = 0; r < table_array.length; r++){ - if(lookup_value.toString() == table_array[r][0].toString()){ - index = r; - break; - } - } - - if(index == null){ - return luckysheet.formula.error.na; - } - - return table_array[index][col_index_num - 1]; - } - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HLOOKUP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var searchkey = arguments[0]; - - if(typeof(searchkey) == "object"){ - searchkey = arguments[0].data; - - if (luckysheet.getObjType(searchkey) == "array") { - searchkey = searchkey[r]; - - if (luckysheet.getObjType(searchkey) == "array") { - searchkey = searchkey[c]; - } - } - else{ - searchkey = searchkey.v; - } - } - var range = arguments[1].data; - var index = arguments[2]; - var isaccurate = false; - if (arguments.length > 3) { - isaccurate = !!arguments[3]; - } - if (index > range.rowl) { - return [luckysheet.formula.error.v, "索引超过了范围的长度," + range[0].length]; - } - if (index < 1) { - return [luckysheet.formula.error.v, "索引必须大于1"]; - } - - var result = luckysheet.formula.error.na; - for(var c = 0;c < range[0].length;c++){ - var matchv = luckysheet.getcellvalue(0, c, range); - var showv = luckysheet.getcellvalue(index - 1, c, range); - - if (isaccurate) { - if (matchv.indexOf(searchkey) > -1) { - result = showv; - } - } else { - if (luckysheet.formula.acompareb(matchv,searchkey)) { - result = showv; - return result; - } - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOOKUP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //完成矢量形式(数组形式不推荐,未做) - //=LOOKUP(4.19, A2:A6, B2:B6) - //=LOOKUP(0, A2:A6, B2:B6) - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var searchkey = arguments[0]; - - if(typeof(searchkey) == "object"){ - searchkey = arguments[0].data; - - if (luckysheet.getObjType(searchkey) == "array") { - searchkey = searchkey[r]; - - if (luckysheet.getObjType(searchkey) == "array") { - searchkey = searchkey[c]; - } - } - else{ - searchkey = searchkey.v; - } - } - - //必须为一维数组 - var range = arguments[1].data; - var range2; - var result = luckysheet.formula.error.na; - - function sortNum(a,b){ //用于排序 - return b - a; - } - - //获得两个范围的数组 - range= luckysheet.formula.getRangeArray(range)[0]; - if(arguments[2]){ - range2 = arguments[2].data; - range2 = luckysheet.formula.getRangeArray(range2)[0]; - } - - if(typeof(searchkey) == "string"){ //字符串直接判断是否相等 - - for (var i = 0; i < range.length; i++) { - var matchv = range[i]; - var showv; - if(arguments[2]){ - showv = range2[i]; - if(matchv == searchkey) { - result = showv; - } - }else{ - if (luckysheet.formula.acompareb(matchv,searchkey)) { - result = matchv; - } - } - } - }else if(luckysheet.isdatatype(searchkey) == "num"){ //数字判断1.是否相等2.不等,去找接近值 - var rangeNow = []; - - for (var i = 0; i < range.length; i++) { - var matchv = range[i]; - var showv; - - if(arguments[2]){ - showv = range2[i]; - if(matchv == searchkey) { - result = showv; - return result; - }else if(matchv != searchkey && luckysheet.isdatatype(matchv) == "num"){ - rangeNow.push(matchv); - } - }else{ - if (matchv == searchkey) { - result = matchv; - return result; - }else if(matchv != searchkey && luckysheet.isdatatype(matchv) == "num"){ - rangeNow.push(matchv); - } - } - - } - if(rangeNow.length != 0){ - rangeNow.push(searchkey); - rangeNow.sort(sortNum); - - var index = rangeNow.indexOf(searchkey); - if(index == (rangeNow.length -1)){ - return [luckysheet.formula.error.na, "找不到对应参数"]; - }else{ - var mat = rangeNow[index + 1]; - if(arguments[2]){ - var i = range.indexOf(mat);//改成数组 - result = range2[i]; - }else{ - result = mat; - } - - } - } - - } - - return result; - - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "INDEX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格区域或数组常量 - var data_array = arguments[0]; - var array = []; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - array = luckysheet.func_methods.getDataDyadicArr(data_array); - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - array = luckysheet.func_methods.getCellDataDyadicArr(data_array, "number"); - } - - var rowlen = array.length, collen = array[0].length; - - //选择数组中的某行,函数从该行返回数值 - var row_num = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(row_num)){ - return row_num; - } - - if(!luckysheet.func_methods.isRealNum(row_num)){ - return luckysheet.formula.error.v; - } - - row_num = parseInt(row_num); - - //选择数组中的某列,函数从该列返回数值 - var column_num = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(column_num)){ - return column_num; - } - - if(!luckysheet.func_methods.isRealNum(column_num)){ - return luckysheet.formula.error.v; - } - - column_num = parseInt(column_num); - - if(row_num <= 0 || column_num <= 0){ - return luckysheet.formula.error.v; - } - - if(row_num > rowlen || column_num > collen){ - return luckysheet.formula.error.r; - } - - //计算 - return array[row_num - 1][column_num - 1]; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GETPIVOTDATA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return luckysheet.formula.error.v; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CHOOSE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //指定要返回哪一项 - var index_num = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(index_num)){ - return index_num; - } - - if(!luckysheet.func_methods.isRealNum(index_num)){ - return luckysheet.formula.error.v; - } - - index_num = parseInt(index_num); - - if(index_num < 1 || index_num > arguments.length - 1){ - return luckysheet.formula.error.v; - } - - var data_result = arguments[index_num]; - - if(luckysheet.getObjType(data_result) == "array"){ - if(luckysheet.getObjType(data_result[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_result)){ - return luckysheet.formula.error.v; - } - - return data_result; - } - else if(luckysheet.getObjType(data_result) == "object" && data_result.startCell != null){ - if(data_result.data == null){ - return 0; - } - - if(luckysheet.getObjType(data_result.data) == "array"){ - var result = luckysheet.func_methods.getCellDataDyadicArr(data_result.data, "number"); - - return result; - } - else{ - if(luckysheet.func_methods.isRealNull(data_result.data.v)){ - return 0; - } - - return data_result.data.v; - } - } - else{ - return data_result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HYPERLINK": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return luckysheet.formula.error.v; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TIME": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //时 - var hour = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(hour)){ - return hour; - } - - if(!luckysheet.func_methods.isRealNum(hour)){ - return luckysheet.formula.error.v; - } - - hour = parseInt(hour); - - //分 - var minute = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(minute)){ - return minute; - } - - if(!luckysheet.func_methods.isRealNum(minute)){ - return luckysheet.formula.error.v; - } - - minute = parseInt(minute); - - //秒 - var second = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(second)){ - return second; - } - - if(!luckysheet.func_methods.isRealNum(second)){ - return luckysheet.formula.error.v; - } - - second = parseInt(second); - - if(hour < 0 || hour > 32767){ - return luckysheet.formula.error.nm; - } - else if(hour > 24){ - hour = hour % 24; - } - - if(minute < 0 || minute > 32767){ - return luckysheet.formula.error.nm; - } - - if(second < 0 || second > 32767){ - return luckysheet.formula.error.nm; - } - - //计算 - var time = moment().set({'hour': hour, 'minute': minute, 'second': second}); - - return moment(time).format("h:mm:ss a"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TIMEVALUE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用于表示时间的字符串 - var time_text = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(time_text)){ - return time_text; - } - - //计算 - if(!moment(time_text).isValid()){ - return luckysheet.formula.error.v; - } - - return (3600 * moment(time_text).get('hour') + 60 * moment(time_text).get('minute') + moment(time_text).get('second')) / 86400; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EOMONTH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用于计算结果的参照日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - //月数 - var months = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(months)){ - return months; - } - - if(!luckysheet.func_methods.isRealNum(months)){ - return luckysheet.formula.error.v; - } - - months = parseInt(months); - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - var date = moment(start_date).add(months + 1, 'months').set('date', 1).subtract(1, 'days'); - var mask = luckysheet.mask.genarate(moment(date).format("YYYY-MM-DD H:mm:ss")); - - var result = mask[2]; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EDATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用于计算结果的参照日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - //月数 - var months = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(months)){ - return months; - } - - if(!luckysheet.func_methods.isRealNum(months)){ - return luckysheet.formula.error.v; - } - - months = parseInt(months); - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - var date = moment(start_date).add(months, 'months'); - var mask = luckysheet.mask.genarate(moment(date).format("YYYY-MM-DD h:mm:ss")); - - var result = mask[2]; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SECOND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //时间值 - var time_text = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(time_text)){ - return time_text; - } - - if(!moment(time_text).isValid()){ - return luckysheet.formula.error.v; - } - - var result = moment(time_text).seconds(); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MINUTE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //时间值 - var time_text = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(time_text)){ - return time_text; - } - - if(!moment(time_text).isValid()){ - return luckysheet.formula.error.v; - } - - var result = moment(time_text).minutes(); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HOUR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //时间值 - var time_text = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(time_text)){ - return time_text; - } - - if(!moment(time_text).isValid()){ - return luckysheet.formula.error.v; - } - - var result = moment(time_text).hours(); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NOW": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return moment().format("YYYY-M-D HH:mm"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NETWORKDAYS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - if(arguments.length == 3){ - var result = window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0], arguments[1], 1, arguments[2]); - } - else{ - var result = window.luckysheet_function.NETWORKDAYS_INTL.f(arguments[0], arguments[1], 1); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NETWORKDAYS_INTL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var WEEKEND_TYPES = [ - [], - [6, 0], - [0, 1], - [1, 2], - [2, 3], - [3, 4], - [4, 5], - [5, 6], - undefined, - undefined, - undefined, - [0, 0], - [1, 1], - [2, 2], - [3, 3], - [4, 4], - [5, 5], - [6, 6] - ]; - - //用于计算净工作日天数的时间段开始日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //用于计算净工作日天数的时间段结束日期 - var end_date = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(end_date)){ - return end_date; - } - - if(!moment(end_date).isValid()){ - return luckysheet.formula.error.v; - } - - //用于表示哪些天为周末的数字或字符串 - var weekend = WEEKEND_TYPES[1]; - if(arguments.length >= 3){ - weekend = arguments[2]; - - if(typeof weekend == "string" && weekend.length == "7" && /^[0-1]{7}$/g.test(weekend)){ - - } - else{ - weekend = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(weekend)){ - return weekend; - } - - if(!luckysheet.func_methods.isRealNum(weekend)){ - return luckysheet.formula.error.v; - } - - weekend = parseInt(weekend); - - if(weekend < 1 || (weekend > 7 && weekend < 11) || weekend > 17){ - return luckysheet.formula.error.nm; - } - - weekend = WEEKEND_TYPES[weekend]; - } - } - - //这是一个范围或数组常量,其中包含作为节假日的日期 - var holidays = []; - if(arguments.length == 4){ - holidays = luckysheet.func_methods.getCellrangeDate(arguments[3]); - if(luckysheet.func_methods.valueIsError(holidays)){ - return holidays; - } - } - - for (var i = 0; i < holidays.length; i++) { - if(!moment(holidays[i]).isValid()){ - return luckysheet.formula.error.v; - } - } - - //计算 - var days = moment(end_date).diff(moment(start_date), 'days') + 1; - var total = days; - var day = moment(start_date); - - for (i = 0; i < days; i++) { - var d = moment(day).weekday(); - var dec = false; - - if(luckysheet.getObjType(weekend) == "array"){ - if (d === weekend[0] || d === weekend[1]) { - dec = true; - } - } - else{ - if(d == 0){ - d = 7; - } - - if(weekend.charAt(d - 1) == "0"){ - dec = true; - } - } - - for (var j = 0; j < holidays.length; j++) { - if(moment(day).diff(moment(holidays[j]), 'days') === 0){ - dec = true; - break; - } - } - - if (dec) { - total--; - } - - day = moment(day).add(1, 'days'); - } - - return total; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISOWEEKNUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用于日期和时间计算的日期 - var date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(date)){ - return date; - } - - if(!moment(date).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - return moment(date).isoWeeks(); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "WEEKNUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var WEEK_STARTS = [ - undefined, - 7, - 1, - undefined, - undefined, - undefined, - undefined, - undefined, - undefined, - undefined, - undefined, - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ]; - - //用于计算净工作日天数的时间段开始日期 - var serial_number = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(serial_number)){ - return serial_number; - } - - if(!moment(serial_number).isValid()){ - return luckysheet.formula.error.v; - } - - //用于表示哪些天为周末的数字或字符串 - var return_type = 1; - if(arguments.length == 2){ - return_type = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(return_type)){ - return return_type; - } - - if(!luckysheet.func_methods.isRealNum(return_type)){ - return luckysheet.formula.error.v; - } - - return_type = parseInt(return_type); - } - - if(return_type == 21){ - return window.luckysheet_function.ISOWEEKNUM.f(arguments[0]); - } - - if([1,2,11,12,13,14,15,16,17].indexOf(return_type) == -1){ - return luckysheet.formula.error.nm; - } - - //计算 - var week_start = WEEK_STARTS[return_type]; - var inc = moment(serial_number).isoWeekday() >= week_start ? 1 : 0; - var result = moment(serial_number).isoWeeks() + inc; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "WEEKDAY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var WEEK_TYPES = [ - [], - [1, 2, 3, 4, 5, 6, 7], - [7, 1, 2, 3, 4, 5, 6], - [6, 0, 1, 2, 3, 4, 5], - [], - [], - [], - [], - [], - [], - [], - [7, 1, 2, 3, 4, 5, 6], - [6, 7, 1, 2, 3, 4, 5], - [5, 6, 7, 1, 2, 3, 4], - [4, 5, 6, 7, 1, 2, 3], - [3, 4, 5, 6, 7, 1, 2], - [2, 3, 4, 5, 6, 7, 1], - [1, 2, 3, 4, 5, 6, 7] - ]; - - //用于计算净工作日天数的时间段开始日期 - var serial_number = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(serial_number)){ - return serial_number; - } - - if(!moment(serial_number).isValid()){ - return luckysheet.formula.error.v; - } - - //以数字指示使用哪种编号顺序来表示星期几 - var return_type = 1; - if(arguments.length == 2){ - return_type = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(return_type)){ - return return_type; - } - - if(!luckysheet.func_methods.isRealNum(return_type)){ - return luckysheet.formula.error.v; - } - - return_type = parseInt(return_type); - } - - if([1,2,3,11,12,13,14,15,16,17].indexOf(return_type) == -1){ - return luckysheet.formula.error.nm; - } - - //计算 - var result = WEEK_TYPES[return_type][moment(serial_number).day()]; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DAY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //用于计算净工作日天数的时间段开始日期 - var serial_number = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(serial_number)){ - return serial_number; - } - - if(!moment(serial_number).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - return moment(serial_number).date(); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DAYS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结束日期 - var end_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(end_date)){ - return end_date; - } - - if(!moment(end_date).isValid()){ - return luckysheet.formula.error.v; - } - - //开始日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - var result = moment(end_date).diff(moment(start_date), 'days'); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DAYS360": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //开始日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //结束日期 - var end_date = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(end_date)){ - return end_date; - } - - if(!moment(end_date).isValid()){ - return luckysheet.formula.error.v; - } - - //天数计算方法 - var method = false; - if(arguments.length == 3){ - method = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(method)){ - return method; - } - } - - //计算 - var sm = moment(start_date).month(); - var em = moment(end_date).month(); - var sd, ed; - - if (method) { - sd = moment(start_date).date() === 31 ? 30 : moment(start_date).date(); - ed = moment(end_date).date() === 31 ? 30 : moment(end_date).date(); - } - else { - var smd = moment().set({ 'year': moment(start_date).year(), 'month': sm + 1, 'date': 0 }).date(); - var emd = moment().set({ 'year': moment(end_date).year(), 'month': em + 1, 'date': 0 }).date(); - sd = moment(start_date).date() === smd ? 30 : moment(start_date).date(); - - if (moment(end_date).date() === emd) { - if (sd < 30) { - em++; - ed = 1; - } - else { - ed = 30; - } - } - else { - ed = moment(end_date).date(); - } - } - - var result = 360 * moment(end_date).diff(moment(start_date), 'years') + 30 * (em - sm) + (ed - sd); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //年 - var year = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(year)){ - return year; - } - - if(!luckysheet.func_methods.isRealNum(year)){ - return luckysheet.formula.error.v; - } - - year = parseInt(year); - - //月 - var month = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(month)){ - return month; - } - - if(!luckysheet.func_methods.isRealNum(month)){ - return luckysheet.formula.error.v; - } - - month = parseInt(month); - - //日 - var day = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(day)){ - return day; - } - - if(!luckysheet.func_methods.isRealNum(day)){ - return luckysheet.formula.error.v; - } - - day = parseInt(day); - - if(year < 0 || year >= 10000){ - return luckysheet.formula.error.nm; - } - else if(year >= 0 && year <= 1899){ - year = year + 1900; - } - - var date = moment().set({ 'year': year, 'month': month - 1, "date": day }); - - if(moment(date).year() < 1900){ - return luckysheet.formula.error.nm; - } - - return moment(date).format("YYYY-MM-DD"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATEVALUE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //开始日期 - var date_text = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(date_text)){ - return date_text; - } - - if(!moment(date_text).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - date_text = moment(date_text).format("YYYY-MM-DD"); - var result = luckysheet.mask.genarate(date_text)[2]; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DATEDIF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - luckysheet_getValue(arguments); - for (var i = 0; i < arguments.length-1; i++){ - arguments[i] = moment.fromOADate(arguments[i]).format("l"); - if(!luckysheet.datecontroll.isdatetime(arguments[i])){ - return luckysheet.formula.error.v; - } - } - - var startDate = moment(arguments[0]); - var endDate = moment(arguments[1]); - var unit = arguments[2]; - var result = luckysheet.formula.error.v; - if(luckysheet_function.DAYS.f(endDate,startDate) < 0){ - return luckysheet.formula.error.v; - } - - switch(unit){ - case "Y":case "y": - result = endDate.diff(startDate,"years",false); - break; - case "M":case "m": - result = endDate.diff(startDate,"months",false); - break; - case "D":case "d": - result = endDate.diff(startDate,"days",false); - break; - case "MD":case "md": - result = endDate.format('DD') - startDate.format('DD'); - break; - case "YM":case "ym": - var startM = parseInt(startDate.format('M')); //注意字符串转化为数字 - var endM = parseInt(endDate.format('M')); - result = (startM <= endM) ? endM - startM : endM + 12 - startM; - break; - case "YD":case "yd": - var startM = luckysheet.mask.genarate(startDate.format('MM-DD'))[2]; - var endM = luckysheet.mask.genarate(endDate.format('MM-DD'))[2]; - - result = (startM <= endM) ? endM - startM : endM + 365 - startM; - break; - default: - result = luckysheet.formula.error.v; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "WORKDAY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - if(arguments.length == 3){ - var result = window.luckysheet_function.WORKDAY_INTL.f(arguments[0], arguments[1], 1, arguments[2]); - } - else{ - var result = window.luckysheet_function.WORKDAY_INTL.f(arguments[0], arguments[1], 1); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "WORKDAY_INTL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var WEEKEND_TYPES = [ - [], - [6, 0], - [0, 1], - [1, 2], - [2, 3], - [3, 4], - [4, 5], - [5, 6], - undefined, - undefined, - undefined, - [0, 0], - [1, 1], - [2, 2], - [3, 3], - [4, 4], - [5, 5], - [6, 6] - ]; - - //计算的开始日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //工作日的天数 - var days = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(days)){ - return days; - } - - if(!luckysheet.func_methods.isRealNum(days)){ - return luckysheet.formula.error.v; - } - - days = parseInt(days); - - //用于表示哪些天为周末的数字或字符串 - var weekend = WEEKEND_TYPES[1]; - if(arguments.length >= 3){ - weekend = arguments[2]; - - if(typeof weekend == "string" && weekend.length == "7" && /^[0-1]{7}$/g.test(weekend)){ - - } - else{ - weekend = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(weekend)){ - return weekend; - } - - if(!luckysheet.func_methods.isRealNum(weekend)){ - return luckysheet.formula.error.v; - } - - weekend = parseInt(weekend); - - if(weekend < 1 || (weekend > 7 && weekend < 11) || weekend > 17){ - return luckysheet.formula.error.nm; - } - - weekend = WEEKEND_TYPES[weekend]; - } - } - - //这是一个范围或数组常量,其中包含作为节假日的日期 - var holidays = []; - if(arguments.length == 4){ - holidays = luckysheet.func_methods.getCellrangeDate(arguments[3]); - if(luckysheet.func_methods.valueIsError(holidays)){ - return holidays; - } - } - - for (var i = 0; i < holidays.length; i++) { - if(!moment(holidays[i]).isValid()){ - return luckysheet.formula.error.v; - } - } - - //计算 - var d = 0; - - while (d < days) { - start_date = moment(start_date).add(1, 'days'); - var day = moment(start_date).weekday(); - - if(luckysheet.getObjType(weekend)){ - if (day === weekend[0] || day === weekend[1]) { - continue; - } - } - else{ - if(day == 0){ - day = 7; - } - - if(weekend.charAt(day - 1) == "0"){ - continue; - } - } - - for (var j = 0; j < holidays.length; j++) { - if(moment(start_date).diff(moment(holidays[j]), 'days') === 0){ - d--; - break; - } - } - - d++; - } - - return moment(start_date).format("YYYY-MM-DD"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "YEAR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //开始日期 - var serial_number = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(serial_number)){ - return serial_number; - } - - if(!moment(serial_number).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - return moment(serial_number).year(); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "YEARFRAC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //开始日期 - var start_date = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(start_date)){ - return start_date; - } - - if(!moment(start_date).isValid()){ - return luckysheet.formula.error.v; - } - - //结束日期 - var end_date = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(end_date)){ - return end_date; - } - - if(!moment(end_date).isValid()){ - return luckysheet.formula.error.v; - } - - //日计数基准类型 - var basis = 0; - if(arguments.length == 3){ - basis = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(start_date).date(); - var sm = moment(start_date).month() + 1; - var sy = moment(start_date).year(); - var ed = moment(end_date).date(); - var em = moment(end_date).month() + 1; - var ey = moment(end_date).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(start_date, end_date) || (em === 1 && ed === 29)) { - ylength = 366; - } - - return moment(end_date).diff(moment(start_date), 'days') / ylength; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = moment(end_date).diff(moment(start_date), 'days') / average; - - break; - case 2: // Actual/360 - result = moment(end_date).diff(moment(start_date), 'days') / 360; - - break; - case 3: // Actual/365 - result = moment(end_date).diff(moment(start_date), 'days') / 365; - - break; - case 4: // European 30/360 - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TODAY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return moment().format("YYYY-MM-DD"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MONTH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //开始日期 - var serial_number = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(serial_number)){ - return serial_number; - } - - if(!moment(serial_number).isValid()){ - return luckysheet.formula.error.v; - } - - //计算 - return moment(serial_number).month() + 1; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EFFECT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //每年的名义利率 - var nominal_rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(nominal_rate)){ - return nominal_rate; - } - - if(!luckysheet.func_methods.isRealNum(nominal_rate)){ - return luckysheet.formula.error.v; - } - - nominal_rate = parseFloat(nominal_rate); - - //每年的复利计算期数 - var npery = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(npery)){ - return npery; - } - - if(!luckysheet.func_methods.isRealNum(npery)){ - return luckysheet.formula.error.v; - } - - npery = parseInt(npery); - - if(nominal_rate <= 0 || npery < 1){ - return luckysheet.formula.error.nm; - } - - return Math.pow(1 + nominal_rate / npery, npery) - 1; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DOLLAR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要设置格式的值 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //显示的小数位数 - var decimals = 2; - if(arguments.length == 2){ - decimals = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(decimals)){ - return decimals; - } - - if(!luckysheet.func_methods.isRealNum(decimals)){ - return luckysheet.formula.error.v; - } - - decimals = parseInt(decimals); - } - - if(decimals > 9){ - decimals = 9; - } - - var foucsStatus = "0."; - for(var i = 1; i <= decimals; i++){ - foucsStatus += "0"; - } - - //计算 - var sign = (number > 0) ? 1 : -1; - - return sign * (Math.floor(Math.abs(number) * Math.pow(10, decimals))) / Math.pow(10, decimals); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DOLLARDE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //分数 - var fractional_dollar = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(fractional_dollar)){ - return fractional_dollar; - } - - if(!luckysheet.func_methods.isRealNum(fractional_dollar)){ - return luckysheet.formula.error.v; - } - - fractional_dollar = parseFloat(fractional_dollar); - - //用作分数中的分母的整数 - var fraction = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(fraction)){ - return fraction; - } - - if(!luckysheet.func_methods.isRealNum(fraction)){ - return luckysheet.formula.error.v; - } - - fraction = parseInt(fraction); - - if(fraction < 0){ - return luckysheet.formula.error.nm; - } - else if(fraction == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var result = parseInt(fractional_dollar, 10); - - result += (fractional_dollar % 1) * Math.pow(10, Math.ceil(Math.log(fraction) / Math.LN10)) / fraction; - - var power = Math.pow(10, Math.ceil(Math.log(fraction) / Math.LN2) + 1); - result = Math.round(result * power) / power; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DOLLARFR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //小数 - var decimal_dollar = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(decimal_dollar)){ - return decimal_dollar; - } - - if(!luckysheet.func_methods.isRealNum(decimal_dollar)){ - return luckysheet.formula.error.v; - } - - decimal_dollar = parseFloat(decimal_dollar); - - //用作分数中的分母的整数 - var fraction = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(fraction)){ - return fraction; - } - - if(!luckysheet.func_methods.isRealNum(fraction)){ - return luckysheet.formula.error.v; - } - - fraction = parseInt(fraction); - - if(fraction < 0){ - return luckysheet.formula.error.nm; - } - else if(fraction == 0){ - return luckysheet.formula.error.d; - } - - //计算 - var result = parseInt(decimal_dollar, 10); - - result += (decimal_dollar % 1) * Math.pow(10, -Math.ceil(Math.log(fraction) / Math.LN10)) * fraction; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DB": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //资产原值 - var cost = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(cost)){ - return cost; - } - - if(!luckysheet.func_methods.isRealNum(cost)){ - return luckysheet.formula.error.v; - } - - cost = parseFloat(cost); - - //资产残值 - var salvage = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(salvage)){ - return salvage; - } - - if(!luckysheet.func_methods.isRealNum(salvage)){ - return luckysheet.formula.error.v; - } - - salvage = parseFloat(salvage); - - //资产的折旧期数 - var life = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(life)){ - return life; - } - - if(!luckysheet.func_methods.isRealNum(life)){ - return luckysheet.formula.error.v; - } - - life = parseFloat(life); - - //在使用期限内要计算折旧的折旧期 - var period = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(period)){ - return period; - } - - if(!luckysheet.func_methods.isRealNum(period)){ - return luckysheet.formula.error.v; - } - - period = parseInt(period); - - //折旧第一年中的月数 - var month = 12; - if(arguments.length == 5){ - month = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(month)){ - return month; - } - - if(!luckysheet.func_methods.isRealNum(month)){ - return luckysheet.formula.error.v; - } - - month = parseInt(month); - } - - if(cost < 0 || salvage < 0 || life < 0 || period < 0){ - return luckysheet.formula.error.nm; - } - - if(month < 1 || month > 12){ - return luckysheet.formula.error.nm; - } - - if(period > life){ - return luckysheet.formula.error.nm; - } - - if(salvage >= cost){ - return 0; - } - - //计算 - var rate = (1 - Math.pow(salvage / cost, 1 / life)).toFixed(3); - - var initial = cost * rate * month / 12; - - var total = initial; - var current = 0; - var ceiling = (period === life) ? life - 1 : period; - - for (var i = 2; i <= ceiling; i++) { - current = (cost - total) * rate; - total += current; - } - - if (period === 1) { - var result = initial; - } - else if (period === life) { - var result = (cost - total) * rate; - } - else { - var result = current; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DDB": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //资产原值 - var cost = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(cost)){ - return cost; - } - - if(!luckysheet.func_methods.isRealNum(cost)){ - return luckysheet.formula.error.v; - } - - cost = parseFloat(cost); - - //资产残值 - var salvage = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(salvage)){ - return salvage; - } - - if(!luckysheet.func_methods.isRealNum(salvage)){ - return luckysheet.formula.error.v; - } - - salvage = parseFloat(salvage); - - //资产的折旧期数 - var life = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(life)){ - return life; - } - - if(!luckysheet.func_methods.isRealNum(life)){ - return luckysheet.formula.error.v; - } - - life = parseFloat(life); - - //在使用期限内要计算折旧的折旧期 - var period = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(period)){ - return period; - } - - if(!luckysheet.func_methods.isRealNum(period)){ - return luckysheet.formula.error.v; - } - - period = parseInt(period); - - //折旧的递减系数 - var factor = 2; - if(arguments.length == 5){ - factor = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(factor)){ - return factor; - } - - if(!luckysheet.func_methods.isRealNum(factor)){ - return luckysheet.formula.error.v; - } - - factor = parseFloat(factor); - } - - if(cost < 0 || salvage < 0 || life < 0 || period < 0 || factor <= 0){ - return luckysheet.formula.error.nm; - } - - if(period > life){ - return luckysheet.formula.error.nm; - } - - if(salvage >= cost){ - return 0; - } - - //计算 - var total = 0; - var current = 0; - - for (var i = 1; i <= period; i++) { - current = Math.min((cost - total) * (factor / life), (cost - salvage - total)); - total += current; - } - - return current; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //年金的付款总期数。 - var nper = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //每期的付款金额 - var pmt = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(pmt)){ - return pmt; - } - - if(!luckysheet.func_methods.isRealNum(pmt)){ - return luckysheet.formula.error.v; - } - - pmt = parseFloat(pmt); - - //现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //最后一次付款后希望得到的现金余额 - var fv = 0; - if(arguments.length >= 4){ - fv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(fv)){ - return fv; - } - - if(!luckysheet.func_methods.isRealNum(fv)){ - return luckysheet.formula.error.v; - } - - fv = parseFloat(fv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length >= 5){ - type = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - //预期利率 - var guess = 0.1; - if(arguments.length == 6){ - guess = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(guess)){ - return guess; - } - - if(!luckysheet.func_methods.isRealNum(guess)){ - return luckysheet.formula.error.v; - } - - guess = parseFloat(guess); - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var epsMax = 1e-6; - - var iterMax = 100; - var iter = 0; - var close = false; - var rate = guess; - - while (iter < iterMax && !close) { - var t1 = Math.pow(rate + 1, nper); - var t2 = Math.pow(rate + 1, nper - 1); - - var f1 = fv + t1 * pv + pmt * (t1 - 1) * (rate * type + 1) / rate; - var f2 = nper * t2 * pv - pmt * (t1 - 1) *(rate * type + 1) / Math.pow(rate,2); - var f3 = nper * pmt * t2 * (rate * type + 1) / rate + pmt * (t1 - 1) * type / rate; - - var newRate = rate - f1 / (f2 + f3); - - if (Math.abs(newRate - rate) < epsMax) close = true; - - iter++ - rate = newRate; - } - - if (!close) return luckysheet.formula.error.nm; - - return rate; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CUMPRINC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //总付款期数 - var nper = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //年金的现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //首期 - var start_period = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(start_period)){ - return start_period; - } - - if(!luckysheet.func_methods.isRealNum(start_period)){ - return luckysheet.formula.error.v; - } - - start_period = parseInt(start_period); - - //末期 - var end_period = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(end_period)){ - return end_period; - } - - if(!luckysheet.func_methods.isRealNum(end_period)){ - return luckysheet.formula.error.v; - } - - end_period = parseInt(end_period); - - //指定各期的付款时间是在期初还是期末 - var type = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - - if(rate <= 0 || nper <= 0 || pv <= 0){ - return luckysheet.formula.error.nm; - } - - if(start_period < 1 || end_period < 1 || start_period > end_period){ - return luckysheet.formula.error.nm; - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var payment = window.luckysheet_function.PMT.f(rate, nper, pv, 0, type); - var principal = 0; - - if (start_period === 1) { - if (type === 0) { - principal = payment + pv * rate; - } - else { - principal = payment; - } - start_period++; - } - - for (var i = start_period; i <= end_period; i++) { - if (type > 0) { - principal += payment - (window.luckysheet_function.FV.f(rate, i - 2, payment, pv, 1) - payment) * rate; - } - else { - principal += payment - window.luckysheet_function.FV.f(rate, i - 1, payment, pv, 0) * rate; - } - } - - return principal; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUPNUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 4){ - var basis = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(maturity).date(); - var em = moment(maturity).month() + 1; - var ey = moment(maturity).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / (360 / frequency); - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { - ylength = 366; - } - - return moment(maturity).diff(moment(settlement), 'days') / (ylength / frequency); - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = moment(maturity).diff(moment(settlement), 'days') / (average / frequency); - - break; - case 2: // Actual/360 - result = moment(maturity).diff(moment(settlement), 'days') / (360 / frequency); - - break; - case 3: // Actual/365 - result = moment(maturity).diff(moment(settlement), 'days') / (365 / frequency); - - break; - case 4: // European 30/360 - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / (360 / frequency); - - break; - } - - return Math.round(result); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SYD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //资产原值 - var cost = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(cost)){ - return cost; - } - - if(!luckysheet.func_methods.isRealNum(cost)){ - return luckysheet.formula.error.v; - } - - cost = parseFloat(cost); - - //资产残值 - var salvage = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(salvage)){ - return salvage; - } - - if(!luckysheet.func_methods.isRealNum(salvage)){ - return luckysheet.formula.error.v; - } - - salvage = parseFloat(salvage); - - //资产的折旧期数 - var life = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(life)){ - return life; - } - - if(!luckysheet.func_methods.isRealNum(life)){ - return luckysheet.formula.error.v; - } - - life = parseFloat(life); - - //在使用期限内要计算折旧的折旧期 - var period = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(period)){ - return period; - } - - if(!luckysheet.func_methods.isRealNum(period)){ - return luckysheet.formula.error.v; - } - - period = parseInt(period); - - if(life == 0){ - return luckysheet.formula.error.nm; - } - - if(period < 1 || period > life){ - return luckysheet.formula.error.nm; - } - - return ((cost - salvage) * (life - period + 1) * 2) / (life * (life + 1)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TBILLEQ": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //债券购买时的贴现率 - var discount = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(discount)){ - return discount; - } - - if(!luckysheet.func_methods.isRealNum(discount)){ - return luckysheet.formula.error.v; - } - - discount = parseFloat(discount); - - if(discount <= 0){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) > 0){ - return luckysheet.formula.error.nm; - } - - if(moment(maturity) - moment(settlement) > 365 * 24 * 60 * 60 * 1000){ - return luckysheet.formula.error.nm; - } - - return (365 * discount) / (360 - discount * moment(maturity).diff(moment(settlement), 'days')); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TBILLYIELD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的价格 - var pr = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pr)){ - return pr; - } - - if(!luckysheet.func_methods.isRealNum(pr)){ - return luckysheet.formula.error.v; - } - - pr = parseFloat(pr); - - if(pr <= 0){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - if(moment(maturity) - moment(settlement) > 365 * 24 * 60 * 60 * 1000){ - return luckysheet.formula.error.nm; - } - - return ((100 - pr) / pr) * (360 / moment(maturity).diff(moment(settlement), 'days')); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TBILLPRICE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的价格 - var discount = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(discount)){ - return discount; - } - - if(!luckysheet.func_methods.isRealNum(discount)){ - return luckysheet.formula.error.v; - } - - discount = parseFloat(discount); - - if(discount <= 0){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) > 0){ - return luckysheet.formula.error.nm; - } - - if(moment(maturity) - moment(settlement) > 365 * 24 * 60 * 60 * 1000){ - return luckysheet.formula.error.nm; - } - - return 100 * (1 - discount * moment(maturity).diff(moment(settlement), 'days') / 360); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //总付款期数 - var nper = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //每期的付款金额 - var pmt = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pmt)){ - return pmt; - } - - if(!luckysheet.func_methods.isRealNum(pmt)){ - return luckysheet.formula.error.v; - } - - pmt = parseFloat(pmt); - - //最后一次付款后希望得到的现金余额 - var fv = 0; - if(arguments.length >= 4){ - fv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(fv)){ - return fv; - } - - if(!luckysheet.func_methods.isRealNum(fv)){ - return luckysheet.formula.error.v; - } - - fv = parseFloat(fv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length >= 5){ - type = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - if (rate === 0) { - var result = -pmt * nper - fv; - } - else { - var result = (((1 - Math.pow(1 + rate, nper)) / rate) * pmt * (1 + rate * type) - fv) / Math.pow(1 + rate, nper); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ACCRINT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //有价证券的发行日 - var issue = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(issue)){ - return issue; - } - - if(!moment(issue).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的首次计息日 - var first_interest = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(first_interest)){ - return first_interest; - } - - if(!moment(first_interest).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[2]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的年息票利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //证券的票面值 - var par = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(par)){ - return par; - } - - if(!luckysheet.func_methods.isRealNum(par)){ - return luckysheet.formula.error.v; - } - - par = parseFloat(par); - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length >= 7){ - basis = luckysheet.func_methods.getFirstValue(arguments[6]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - //当结算日期晚于首次计息日期时用于计算总应计利息的方法 - var calc_method = true; - if(arguments.length == 8){ - calc_method = luckysheet.func_methods.getCellBoolen(arguments[7]); - - if(luckysheet.func_methods.valueIsError(calc_method)){ - return calc_method; - } - } - - if(rate <= 0 || par <= 0){ - return luckysheet.formula.error.nm; - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(issue) - moment(settlement) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var result; - if(moment(settlement) - moment(first_interest) >= 0 && !calc_method){ - var sd = moment(first_interest).date(); - var sm = moment(first_interest).month() + 1; - var sy = moment(first_interest).year(); - var ed = moment(settlement).date(); - var em = moment(settlement).month() + 1; - var ey = moment(settlement).year(); - - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(first_interest, settlement) || (em === 1 && ed === 29)) { - ylength = 366; - } - - return moment(settlement).diff(moment(first_interest), 'days') / ylength; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = moment(settlement).diff(moment(first_interest), 'days') / average; - - break; - case 2: // Actual/360 - result = moment(settlement).diff(moment(first_interest), 'days') / 360; - - break; - case 3: // Actual/365 - result = moment(settlement).diff(moment(first_interest), 'days') / 365; - - break; - case 4: // European 30/360 - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - } - } - else{ - var sd = moment(issue).date(); - var sm = moment(issue).month() + 1; - var sy = moment(issue).year(); - var ed = moment(settlement).date(); - var em = moment(settlement).month() + 1; - var ey = moment(settlement).year(); - - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(issue, settlement) || (em === 1 && ed === 29)) { - ylength = 366; - } - - return moment(settlement).diff(moment(issue), 'days') / ylength; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = moment(settlement).diff(moment(issue), 'days') / average; - - break; - case 2: // Actual/360 - result = moment(settlement).diff(moment(issue), 'days') / 360; - - break; - case 3: // Actual/365 - result = moment(settlement).diff(moment(issue), 'days') / 365; - - break; - case 4: // European 30/360 - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - } - } - - return par * rate * result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ACCRINTM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //有价证券的发行日 - var issue = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(issue)){ - return issue; - } - - if(!moment(issue).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的到期日 - var settlement = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的年息票利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //证券的票面值 - var par = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(par)){ - return par; - } - - if(!luckysheet.func_methods.isRealNum(par)){ - return luckysheet.formula.error.v; - } - - par = parseFloat(par); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 5){ - basis = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(rate <= 0 || par <= 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(issue) - moment(settlement) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(issue).date(); - var sm = moment(issue).month() + 1; - var sy = moment(issue).year(); - var ed = moment(settlement).date(); - var em = moment(settlement).month() + 1; - var ey = moment(settlement).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(issue, settlement) || (em === 1 && ed === 29)) { - ylength = 366; - } - - return moment(settlement).diff(moment(issue), 'days') / ylength; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = moment(settlement).diff(moment(issue), 'days') / average; - - break; - case 2: // Actual/360 - result = moment(settlement).diff(moment(issue), 'days') / 360; - - break; - case 3: // Actual/365 - result = moment(settlement).diff(moment(issue), 'days') / 365; - - break; - case 4: // European 30/360 - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - } - - return par * rate * result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUPDAYBS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 4){ - basis = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var interest; //结算日之前的上一个付息日 - - var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; - - for(var i = 1; i <= maxCount; i++){ - var di = moment(maturity).subtract((12 / frequency) * i, 'months'); - - if(di <= moment(settlement)){ - interest = di; - break; - } - } - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - var sd = moment(interest).date(); - var sm = moment(interest).month() + 1; - var sy = moment(interest).year(); - var ed = moment(settlement).date(); - var em = moment(settlement).month() + 1; - var ey = moment(settlement).year(); - - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); - - break; - case 1: // Actual/actual - case 2: // Actual/360 - case 3: // Actual/365 - result = moment(settlement).diff(moment(interest), 'days'); - - break; - case 4: // European 30/360 - var sd = moment(interest).date(); - var sm = moment(interest).month() + 1; - var sy = moment(interest).year(); - var ed = moment(settlement).date(); - var em = moment(settlement).month() + 1; - var ey = moment(settlement).year(); - - result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); - - break; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUPDAYS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 4){ - basis = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - result = 360 / frequency; - - break; - case 1: // Actual/actual - var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; - - for(var i = 1; i <= maxCount; i++){ - var d1 = moment(maturity).subtract((12 / frequency) * i, 'months'); - if(d1 <= moment(settlement)){ - var d2 = moment(maturity).subtract((12 / frequency) * (i - 1), 'months'); - result = moment(d2).diff(moment(d1), 'days'); - break; - } - } - - break; - case 2: // Actual/360 - result = 360 / frequency; - - break; - case 3: // Actual/365 - result = 365 / frequency; - - break; - case 4: // European 30/360 - result = 360 / frequency; - - break; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUPDAYSNC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 4){ - basis = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var interest; //结算日之后的下一个付息日 - - var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; - - for(var i = 1; i <= maxCount; i++){ - var di = moment(maturity).subtract((12 / frequency) * i, 'months'); - - if(di <= moment(settlement)){ - interest = moment(maturity).subtract((12 / frequency) * (i - 1), 'months'); - break; - } - } - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(interest).date(); - var em = moment(interest).month() + 1; - var ey = moment(interest).year(); - - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); - - break; - case 1: // Actual/actual - case 2: // Actual/360 - case 3: // Actual/365 - result = moment(interest).diff(moment(settlement), 'days'); - - break; - case 4: // European 30/360 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(interest).date(); - var em = moment(interest).month() + 1; - var ey = moment(interest).year(); - - result = (ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360); - - break; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUPNCD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 4){ - basis = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var interest; //结算日之后的下一个付息日 - - var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; - - for(var i = 1; i <= maxCount; i++){ - var di = moment(maturity).subtract((12 / frequency) * i, 'months'); - - if(di <= moment(settlement)){ - interest = moment(maturity).subtract((12 / frequency) * (i - 1), 'months'); - break; - } - } - - return moment(interest).format("YYYY-MM-DD"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COUPPCD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 4){ - basis = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var interest; //结算日之前的上一个付息日 - - var maxCount = Math.ceil(moment(maturity).diff(moment(settlement), 'months') / (12 / frequency)) + 1; - - for(var i = 1; i <= maxCount; i++){ - var di = moment(maturity).subtract((12 / frequency) * i, 'months'); - - if(di <= moment(settlement)){ - interest = di; - break; - } - } - - return moment(interest).format("YYYY-MM-DD"); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //总付款期数 - var nper = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //每期的付款金额 - var pmt = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pmt)){ - return pmt; - } - - if(!luckysheet.func_methods.isRealNum(pmt)){ - return luckysheet.formula.error.v; - } - - pmt = parseFloat(pmt); - - //现值,或一系列未来付款的当前值的累积和 - var pv = 0; - if(arguments.length >= 4){ - pv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length >= 5){ - type = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var result; - if (rate === 0) { - result = pv + pmt * nper; - } - else { - var term = Math.pow(1 + rate, nper); - if (type === 1) { - result = pv * term + pmt * (1 + rate) * (term - 1) / rate; - } - else { - result = pv * term + pmt * (term - 1) / rate; - } - } - - return -result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FVSCHEDULE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //现值 - var principal = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(principal)){ - return principal; - } - - if(!luckysheet.func_methods.isRealNum(principal)){ - return luckysheet.formula.error.v; - } - - principal = parseFloat(principal); - - //一组利率 - var data_schedule = arguments[1]; - var schedule = []; - - if(luckysheet.getObjType(data_schedule) == "array"){ - if(luckysheet.getObjType(data_schedule[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_schedule)){ - return luckysheet.formula.error.v; - } - - schedule = schedule.concat(luckysheet.func_methods.getDataArr(data_schedule, false)); - } - else if(luckysheet.getObjType(data_schedule) == "object" && data_schedule.startCell != null){ - schedule = schedule.concat(luckysheet.func_methods.getCellDataArr(data_schedule, "number", false)); - } - else{ - schedule.push(data_schedule); - } - - var schedule_n = []; - - for(var i = 0; i < schedule.length; i++){ - var number = schedule[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - schedule_n.push(parseFloat(number)); - } - - //计算 - var n = schedule_n.length; - var future = principal; - - for (var i = 0; i < n; i++) { - future *= 1 + schedule_n[i]; - } - - return future; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "YIELD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的年息票利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //有价证券的价格 - var pr = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(pr)){ - return pr; - } - - if(!luckysheet.func_methods.isRealNum(pr)){ - return luckysheet.formula.error.v; - } - - pr = parseFloat(pr); - - //有价证券的清偿价值 - var redemption = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(redemption)){ - return redemption; - } - - if(!luckysheet.func_methods.isRealNum(redemption)){ - return luckysheet.formula.error.v; - } - - redemption = parseFloat(redemption); - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 7){ - basis = luckysheet.func_methods.getFirstValue(arguments[6]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(rate < 0){ - return luckysheet.formula.error.nm; - } - - if(pr <= 0 || redemption <= 0){ - return luckysheet.formula.error.nm; - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var num = window.luckysheet_function.COUPNUM.f(settlement, maturity, frequency, basis); - - if(num > 1){ - var a = 1; - var b = 0; - var yld = a; - - for(var i = 1; i <= 100; i++){ - var price = window.luckysheet_function.PRICE.f(settlement, maturity, rate, yld, redemption, frequency, basis); - - if(Math.abs(price - pr) < 0.000001){ - break; - } - - if(price > pr){ - b = yld; - } - else{ - a = yld; - } - - yld = (a + b) / 2; - } - - var result = yld; - } - else{ - var DSR = window.luckysheet_function.COUPDAYSNC.f(settlement, maturity, frequency, basis); - var E = window.luckysheet_function.COUPDAYS.f(settlement, maturity, frequency, basis); - var A = window.luckysheet_function.COUPDAYBS.f(settlement, maturity, frequency, basis); - - var T1 = redemption / 100 + rate / frequency; - var T2 = pr / 100 + (A / E) * (rate / frequency); - var T3 = frequency * E / DSR; - - var result = ((T1 - T2) / T2) * T3; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "YIELDDISC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的价格 - var pr = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pr)){ - return pr; - } - - if(!luckysheet.func_methods.isRealNum(pr)){ - return luckysheet.formula.error.v; - } - - pr = parseFloat(pr); - - //有价证券的清偿价值 - var redemption = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(redemption)){ - return redemption; - } - - if(!luckysheet.func_methods.isRealNum(redemption)){ - return luckysheet.formula.error.v; - } - - redemption = parseFloat(redemption); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 5){ - basis = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(pr <= 0 || redemption <= 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - var yearfrac = window.luckysheet_function.YEARFRAC.f(settlement, maturity, basis); - - return (redemption / pr - 1) / yearfrac; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NOMINAL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //每年的实际利率 - var effect_rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(effect_rate)){ - return effect_rate; - } - - if(!luckysheet.func_methods.isRealNum(effect_rate)){ - return luckysheet.formula.error.v; - } - - effect_rate = parseFloat(effect_rate); - - //每年的复利期数 - var npery = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(npery)){ - return npery; - } - - if(!luckysheet.func_methods.isRealNum(npery)){ - return luckysheet.formula.error.v; - } - - npery = parseInt(npery); - - if(effect_rate <= 0 || npery < 1){ - return luckysheet.formula.error.nm; - } - - return (Math.pow(effect_rate + 1, 1 / npery) - 1) * npery; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "XIRR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //投资相关收益或支出的数组或范围 - var data_values = arguments[0]; - var values = []; - - if(luckysheet.getObjType(data_values) == "array"){ - if(luckysheet.getObjType(data_values[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_values)){ - return luckysheet.formula.error.v; - } - - values = values.concat(luckysheet.func_methods.getDataArr(data_values, false)); - } - else if(luckysheet.getObjType(data_values) == "object" && data_values.startCell != null){ - values = values.concat(luckysheet.func_methods.getCellDataArr(data_values, "number", false)); - } - else{ - values.push(data_values); - } - - var values_n = []; - - for(var i = 0; i < values.length; i++){ - var number = values[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - values_n.push(parseFloat(number)); - } - - //与现金流数额参数中的现金流对应的日期数组或范围 - var dates = luckysheet.func_methods.getCellrangeDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(dates)){ - return dates; - } - - for(var i = 0; i < dates.length; i++){ - if(!moment(dates[i]).isValid()){ - return luckysheet.formula.error.v; - } - } - - //对内部回报率的估算值 - var guess = 0.1; - if(arguments.length == 3){ - guess = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(guess)){ - return guess; - } - - if(!luckysheet.func_methods.isRealNum(guess)){ - return luckysheet.formula.error.v; - } - - guess = parseFloat(guess); - } - - var positive = false; - var negative = false; - for (var i = 0; i < values_n.length; i++) { - if (values_n[i] > 0) { - positive = true; - } - - if (values_n[i] < 0) { - negative = true; - } - - if(positive && negative){ - break; - } - } - - if(!positive || !negative){ - return luckysheet.formula.error.nm; - } - - if(values_n.length != dates.length){ - return luckysheet.formula.error.nm; - } - - //计算 - var irrResult = function(values, dates, rate) { - var r = rate + 1; - var result = values[0]; - - for (var i = 1; i < values.length; i++) { - result += values[i] / Math.pow(r, window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365); - } - - return result; - }; - - var irrResultDeriv = function(values, dates, rate) { - var r = rate + 1; - var result = 0; - - for (var i = 1; i < values.length; i++) { - var frac = window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365; - result -= frac * values[i] / Math.pow(r, frac + 1); - } - - return result; - }; - - var resultRate = guess; - var epsMax = 1e-10; - - var newRate, epsRate, resultValue; - var contLoop = true; - - do { - resultValue = irrResult(values_n, dates, resultRate); - newRate = resultRate - resultValue / irrResultDeriv(values_n, dates, resultRate); - epsRate = Math.abs(newRate - resultRate); - resultRate = newRate; - contLoop = (epsRate > epsMax) && (Math.abs(resultValue) > epsMax); - } - while (contLoop); - - return resultRate; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MIRR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //投资相关收益或支出的数组或范围 - var data_values = arguments[0]; - var values = []; - - if(luckysheet.getObjType(data_values) == "array"){ - if(luckysheet.getObjType(data_values[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_values)){ - return luckysheet.formula.error.v; - } - - values = values.concat(luckysheet.func_methods.getDataArr(data_values, false)); - } - else if(luckysheet.getObjType(data_values) == "object" && data_values.startCell != null){ - values = values.concat(luckysheet.func_methods.getCellDataArr(data_values, "number", false)); - } - else{ - values.push(data_values); - } - - var values_n = []; - - for(var i = 0; i < values.length; i++){ - var number = values[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - values_n.push(parseFloat(number)); - } - - //现金流中使用的资金支付的利率 - var finance_rate = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(finance_rate)){ - return finance_rate; - } - - if(!luckysheet.func_methods.isRealNum(finance_rate)){ - return luckysheet.formula.error.v; - } - - finance_rate = parseFloat(finance_rate); - - //将现金流再投资的收益率 - var reinvest_rate = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(reinvest_rate)){ - return reinvest_rate; - } - - if(!luckysheet.func_methods.isRealNum(reinvest_rate)){ - return luckysheet.formula.error.v; - } - - reinvest_rate = parseFloat(reinvest_rate); - - //计算 - var n = values_n.length; - var payments = []; - var incomes = []; - - for (var i = 0; i < n; i++) { - if (values_n[i] < 0) { - payments.push(values_n[i]); - } - else { - incomes.push(values_n[i]); - } - } - - if(payments.length == 0 || incomes.length == 0){ - return luckysheet.formula.error.d; - } - - var num = -window.luckysheet_function.NPV.f(reinvest_rate, incomes) * Math.pow(1 + reinvest_rate, n - 1); - var den = window.luckysheet_function.NPV.f(finance_rate, payments) * (1 + finance_rate); - - return Math.pow(num / den, 1 / (n - 1)) - 1; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IRR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //投资相关收益或支出的数组或范围 - var data_values = arguments[0]; - var values = []; - - if(luckysheet.getObjType(data_values) == "array"){ - if(luckysheet.getObjType(data_values[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_values)){ - return luckysheet.formula.error.v; - } - - values = values.concat(luckysheet.func_methods.getDataArr(data_values, false)); - } - else if(luckysheet.getObjType(data_values) == "object" && data_values.startCell != null){ - values = values.concat(luckysheet.func_methods.getCellDataArr(data_values, "number", false)); - } - else{ - values.push(data_values); - } - - var values_n = []; - - for(var i = 0; i < values.length; i++){ - var number = values[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - values_n.push(parseFloat(number)); - } - - //对内部回报率的估算值 - var guess = 0.1; - if(arguments.length == 2){ - guess = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(guess)){ - return guess; - } - - if(!luckysheet.func_methods.isRealNum(guess)){ - return luckysheet.formula.error.v; - } - - guess = parseFloat(guess); - } - - var dates = []; - var positive = false; - var negative = false; - - for (var i = 0; i < values.length; i++) { - dates[i] = (i === 0) ? 0 : dates[i - 1] + 365; - - if (values[i] > 0) { - positive = true; - } - - if (values[i] < 0) { - negative = true; - } - } - - if(!positive || !negative){ - return luckysheet.formula.error.nm; - } - - //计算 - var irrResult = function(values, dates, rate) { - var r = rate + 1; - var result = values[0]; - - for (var i = 1; i < values.length; i++) { - // result += values[i] / Math.pow(r, window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365); - result += values[i] / Math.pow(r, (dates[i] - dates[0]) / 365); - } - - return result; - }; - - var irrResultDeriv = function(values, dates, rate) { - var r = rate + 1; - var result = 0; - - for (var i = 1; i < values.length; i++) { - // var frac = window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365; - var frac = (dates[i] - dates[0]) / 365; - result -= frac * values[i] / Math.pow(r, frac + 1); - } - - return result; - }; - - var resultRate = guess; - var epsMax = 1e-10; - - var newRate, epsRate, resultValue; - var contLoop = true; - - do { - resultValue = irrResult(values_n, dates, resultRate); - newRate = resultRate - resultValue / irrResultDeriv(values_n, dates, resultRate); - epsRate = Math.abs(newRate - resultRate); - resultRate = newRate; - contLoop = (epsRate > epsMax) && (Math.abs(resultValue) > epsMax); - } - while (contLoop); - - return resultRate; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NPV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //某一期间的贴现率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //支出(负值)和收益(正值) - var values = []; - - for(var i = 1; i < arguments.length; i++){ - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - values = values.concat(luckysheet.func_methods.getDataArr(data, true)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - values = values.concat(luckysheet.func_methods.getCellDataArr(data, "number", true)); - } - else{ - values.push(data); - } - } - - var values_n = []; - - for(var i = 0; i < values.length; i++){ - var number = values[i]; - - if(luckysheet.func_methods.isRealNum(number)){ - values_n.push(parseFloat(number)); - } - } - - //计算 - var result = 0; - - if(values_n.length > 0){ - for(var i = 0; i < values_n.length; i++){ - result += values_n[i] / Math.pow(1 + rate, i + 1); - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "XNPV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //应用于现金流的贴现率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //与 dates 中的支付时间相对应的一系列现金流 - var data_values = arguments[1]; - var values = []; - - if(luckysheet.getObjType(data_values) == "array"){ - if(luckysheet.getObjType(data_values[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_values)){ - return luckysheet.formula.error.v; - } - - values = values.concat(luckysheet.func_methods.getDataArr(data_values, false)); - } - else if(luckysheet.getObjType(data_values) == "object" && data_values.startCell != null){ - values = values.concat(luckysheet.func_methods.getCellDataArr(data_values, "number", false)); - } - else{ - values.push(data_values); - } - - var values_n = []; - - for(var i = 0; i < values.length; i++){ - var number = values[i]; - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - values_n.push(parseFloat(number)); - } - - //与现金流支付相对应的支付日期表 - var dates = luckysheet.func_methods.getCellrangeDate(arguments[2]); - if(luckysheet.func_methods.valueIsError(dates)){ - return dates; - } - - for(var i = 0; i < dates.length; i++){ - if(!moment(dates[i]).isValid()){ - return luckysheet.formula.error.v; - } - } - - if(values_n.length != dates.length){ - return luckysheet.formula.error.nm; - } - - //计算 - var result = 0; - for (var i = 0; i < values_n.length; i++) { - result += values_n[i] / Math.pow(1 + rate, window.luckysheet_function.DAYS.f(dates[i], dates[0]) / 365); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CUMIPMT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //总付款期数 - var nper = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //年金的现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //首期 - var start_period = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(start_period)){ - return start_period; - } - - if(!luckysheet.func_methods.isRealNum(start_period)){ - return luckysheet.formula.error.v; - } - - start_period = parseInt(start_period); - - //末期 - var end_period = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(end_period)){ - return end_period; - } - - if(!luckysheet.func_methods.isRealNum(end_period)){ - return luckysheet.formula.error.v; - } - - end_period = parseInt(end_period); - - //指定各期的付款时间是在期初还是期末 - var type = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - - if(rate <= 0 || nper <= 0 || pv <= 0){ - return luckysheet.formula.error.nm; - } - - if(start_period < 1 || end_period < 1 || start_period > end_period){ - return luckysheet.formula.error.nm; - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var payment = window.luckysheet_function.PMT.f(rate, nper, pv, 0, type); - var interest = 0; - - if (start_period === 1) { - if (type === 0) { - interest = -pv; - start_period++; - } - } - - for (var i = start_period; i <= end_period; i++) { - if (type === 1) { - interest += window.luckysheet_function.FV.f(rate, i - 2, payment, pv, 1) - payment; - } - else { - interest += window.luckysheet_function.FV.f(rate, i - 1, payment, pv, 0); - } - } - - interest *= rate; - - return interest; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PMT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //贷款利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //该项贷款的付款总数 - var nper = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //最后一次付款后希望得到的现金余额 - var fv = 0; - if(arguments.length >= 4){ - fv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(fv)){ - return fv; - } - - if(!luckysheet.func_methods.isRealNum(fv)){ - return luckysheet.formula.error.v; - } - - fv = parseFloat(fv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length == 5){ - type = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var result; - - if (rate === 0) { - result = (pv + fv) / nper; - } - else { - var term = Math.pow(1 + rate, nper); - - if (type === 1) { - result = (fv * rate / (term - 1) + pv * rate / (1 - 1 / term)) / (1 + rate); - } - else { - result = fv * rate / (term - 1) + pv * rate / (1 - 1 / term); - } - } - - return -result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IPMT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //用于计算其利息数额的期数 - var per = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(per)){ - return per; - } - - if(!luckysheet.func_methods.isRealNum(per)){ - return luckysheet.formula.error.v; - } - - per = parseFloat(per); - - //总付款期数 - var nper = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //最后一次付款后希望得到的现金余额 - var fv = 0; - if(arguments.length >= 5){ - fv = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(fv)){ - return fv; - } - - if(!luckysheet.func_methods.isRealNum(fv)){ - return luckysheet.formula.error.v; - } - - fv = parseFloat(fv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length >= 6){ - type = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - if(per < 1 || per > nper){ - return luckysheet.formula.error.nm; - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var payment = window.luckysheet_function.PMT.f(rate, nper, pv, fv, type); - var interest; - - if (per === 1) { - if (type === 1) { - interest = 0; - } - else { - interest = -pv; - } - } - else { - if (type === 1) { - interest = window.luckysheet_function.FV.f(rate, per - 2, payment, pv, 1) - payment; - } - else { - interest = window.luckysheet_function.FV.f(rate, per - 1, payment, pv, 0); - } - } - - var result = interest * rate; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PPMT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //用于计算其利息数额的期数 - var per = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(per)){ - return per; - } - - if(!luckysheet.func_methods.isRealNum(per)){ - return luckysheet.formula.error.v; - } - - per = parseFloat(per); - - //总付款期数 - var nper = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(nper)){ - return nper; - } - - if(!luckysheet.func_methods.isRealNum(nper)){ - return luckysheet.formula.error.v; - } - - nper = parseFloat(nper); - - //现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //最后一次付款后希望得到的现金余额 - var fv = 0; - if(arguments.length >= 5){ - fv = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(fv)){ - return fv; - } - - if(!luckysheet.func_methods.isRealNum(fv)){ - return luckysheet.formula.error.v; - } - - fv = parseFloat(fv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length >= 6){ - type = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - if(per < 1 || per > nper){ - return luckysheet.formula.error.nm; - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var payment = window.luckysheet_function.PMT.f(rate, nper, pv, fv, type); - var payment2 = window.luckysheet_function.IPMT.f(rate, per, nper, pv, fv, type); - - return payment - payment2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "INTRATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的投资额 - var investment = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(investment)){ - return investment; - } - - if(!luckysheet.func_methods.isRealNum(investment)){ - return luckysheet.formula.error.v; - } - - investment = parseFloat(investment); - - //有价证券到期时的兑换值 - var redemption = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(redemption)){ - return redemption; - } - - if(!luckysheet.func_methods.isRealNum(redemption)){ - return luckysheet.formula.error.v; - } - - redemption = parseFloat(redemption); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 5){ - basis = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(investment <= 0 || redemption <= 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(maturity).date(); - var em = moment(maturity).month() + 1; - var ey = moment(maturity).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = 360 / ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { - ylength = 366; - } - - result = ylength / moment(maturity).diff(moment(settlement), 'days'); - result = ((redemption - investment) / investment) * result; - - return result; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = average / moment(maturity).diff(moment(settlement), 'days'); - - break; - case 2: // Actual/360 - result = 360 / moment(maturity).diff(moment(settlement), 'days'); - - break; - case 3: // Actual/365 - result = 365 / moment(maturity).diff(moment(settlement), 'days'); - - break; - case 4: // European 30/360 - result = 360 / ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - - break; - } - - result = ((redemption - investment) / investment) * result; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PRICE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的年息票利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //有价证券的年收益率 - var yld = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(yld)){ - return yld; - } - - if(!luckysheet.func_methods.isRealNum(yld)){ - return luckysheet.formula.error.v; - } - - yld = parseFloat(yld); - - //有价证券的清偿价值 - var redemption = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(redemption)){ - return redemption; - } - - if(!luckysheet.func_methods.isRealNum(redemption)){ - return luckysheet.formula.error.v; - } - - redemption = parseFloat(redemption); - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 7){ - basis = luckysheet.func_methods.getFirstValue(arguments[6]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(rate < 0 || yld < 0){ - return luckysheet.formula.error.nm; - } - - if(redemption <= 0){ - return luckysheet.formula.error.nm; - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var DSC = window.luckysheet_function.COUPDAYSNC.f(settlement, maturity, frequency, basis); - var E = window.luckysheet_function.COUPDAYS.f(settlement, maturity, frequency, basis); - var A = window.luckysheet_function.COUPDAYBS.f(settlement, maturity, frequency, basis); - var num = window.luckysheet_function.COUPNUM.f(settlement, maturity, frequency, basis); - - if(num > 1){ - var T1 = redemption / Math.pow(1 + yld / frequency, num - 1 + DSC / E); - - var T2 = 0; - for(var i = 1; i <= num; i++){ - T2 += (100 * rate / frequency) / Math.pow(1 + yld / frequency, i - 1 + DSC / E); - } - - var T3 = 100 * (rate / frequency) * (A / E); - - var result = T1 + T2 - T3; - } - else{ - var DSR = E - A; - var T1 = 100 * (rate / frequency) + redemption; - var T2 = (yld / frequency) * (DSR / E) + 1; - var T3 = 100 * (rate / frequency) * (A / E); - - var result = T1 / T2 - T3; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PRICEDISC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的贴现率 - var discount = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(discount)){ - return discount; - } - - if(!luckysheet.func_methods.isRealNum(discount)){ - return luckysheet.formula.error.v; - } - - discount = parseFloat(discount); - - //有价证券的清偿价值 - var redemption = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(redemption)){ - return redemption; - } - - if(!luckysheet.func_methods.isRealNum(redemption)){ - return luckysheet.formula.error.v; - } - - redemption = parseFloat(redemption); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 5){ - basis = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(discount <= 0 || redemption <= 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(maturity).date(); - var em = moment(maturity).month() + 1; - var ey = moment(maturity).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if (sd === 31 && ed === 31) { - sd = 30; - ed = 30; - } - else if (sd === 31) { - sd = 30; - } - else if (sd === 30 && ed === 31) { - ed = 30; - } - - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { - ylength = 366; - } - - result = moment(maturity).diff(moment(settlement), 'days') / ylength; - result = redemption - discount * redemption * result; - - return result; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - result = moment(maturity).diff(moment(settlement), 'days') / average; - - break; - case 2: // Actual/360 - result = moment(maturity).diff(moment(settlement), 'days') / 360; - - break; - case 3: // Actual/365 - result = moment(maturity).diff(moment(settlement), 'days') / 365; - - break; - case 4: // European 30/360 - result = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)) / 360; - - break; - } - - result = redemption - discount * redemption * result; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PRICEMAT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //发行日 - var issue = luckysheet.func_methods.getCellDate(arguments[2]); - if(luckysheet.func_methods.valueIsError(issue)){ - return issue; - } - - if(!moment(issue).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券在发行日的利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //有价证券的年收益率 - var yld = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(yld)){ - return yld; - } - - if(!luckysheet.func_methods.isRealNum(yld)){ - return luckysheet.formula.error.v; - } - - yld = parseFloat(yld); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 6){ - basis = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(rate < 0 || yld < 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(maturity).date(); - var em = moment(maturity).month() + 1; - var ey = moment(maturity).year(); - var td = moment(issue).date(); - var tm = moment(issue).month() + 1; - var ty = moment(issue).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if(sd == 31){ - sd = 30; - } - - if(ed == 31){ - ed = 30; - } - - if(td == 31){ - td = 30; - } - - var B = 360; - var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - var DIM = ((ed + em * 30 + ey * 360) - (td + tm * 30 + ty * 360)); - var A = ((sd + sm * 30 + sy * 360) - (td + tm * 30 + ty * 360)); - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { - ylength = 366; - } - - var B = ylength; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - var DIM = moment(settlement).diff(moment(issue), 'days'); - var A = moment(maturity).diff(moment(issue), 'days'); - - result = (100 + (DIM / B * rate * 100)) / (1 + DSM / B * yld) - (A / B * rate * 100); - - return result; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - var B = average; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - var DIM = moment(settlement).diff(moment(issue), 'days'); - var A = moment(maturity).diff(moment(issue), 'days'); - - break; - case 2: // Actual/360 - var B = 360; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - var DIM = moment(settlement).diff(moment(issue), 'days'); - var A = moment(maturity).diff(moment(issue), 'days'); - - break; - case 3: // Actual/365 - var B = 365; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - var DIM = moment(settlement).diff(moment(issue), 'days'); - var A = moment(maturity).diff(moment(issue), 'days'); - - break; - case 4: // European 30/360 - var B = 360; - var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - var DIM = ((ed + em * 30 + ey * 360) - (td + tm * 30 + ty * 360)); - var A = ((sd + sm * 30 + sy * 360) - (td + tm * 30 + ty * 360)); - - break; - } - - result = (100 + (DIM / B * rate * 100)) / (1 + (DSM / B * yld)) - (A / B * rate * 100); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RECEIVED": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的投资额 - var investment = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(investment)){ - return investment; - } - - if(!luckysheet.func_methods.isRealNum(investment)){ - return luckysheet.formula.error.v; - } - - investment = parseFloat(investment); - - //有价证券的贴现率 - var discount = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(discount)){ - return discount; - } - - if(!luckysheet.func_methods.isRealNum(discount)){ - return luckysheet.formula.error.v; - } - - discount = parseFloat(discount); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 5){ - basis = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseFloat(basis); - } - - if(investment <= 0 || discount <= 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(maturity).date(); - var em = moment(maturity).month() + 1; - var ey = moment(maturity).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if(sd == 31){ - sd = 30; - } - - if(ed == 31){ - ed = 30; - } - - var B = 360; - var DIM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { - ylength = 366; - } - - var B = ylength; - var DIM = moment(maturity).diff(moment(settlement), 'days'); - - result = investment / (1 - discount * DIM / B); - - return result; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, 'date': 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - var B = average; - var DIM = moment(maturity).diff(moment(settlement), 'days'); - - break; - case 2: // Actual/360 - var B = 360; - var DIM = moment(maturity).diff(moment(settlement), 'days'); - - break; - case 3: // Actual/365 - var B = 365; - var DIM = moment(maturity).diff(moment(settlement), 'days'); - - break; - case 4: // European 30/360 - var B = 360; - var DIM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - - break; - } - - result = investment / (1 - discount * DIM / B); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DISC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的价格 - var pr = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pr)){ - return pr; - } - - if(!luckysheet.func_methods.isRealNum(pr)){ - return luckysheet.formula.error.v; - } - - pr = parseFloat(pr); - - //有价证券的清偿价值 - var redemption = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(redemption)){ - return redemption; - } - - if(!luckysheet.func_methods.isRealNum(redemption)){ - return luckysheet.formula.error.v; - } - - redemption = parseFloat(redemption); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 5){ - basis = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseFloat(basis); - } - - if(pr <= 0 || redemption <= 0){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - //计算 - var sd = moment(settlement).date(); - var sm = moment(settlement).month() + 1; - var sy = moment(settlement).year(); - var ed = moment(maturity).date(); - var em = moment(maturity).month() + 1; - var ey = moment(maturity).year(); - - var result; - switch (basis) { - case 0: // US (NASD) 30/360 - if(sd == 31){ - sd = 30; - } - - if(ed == 31){ - ed = 30; - } - - var B = 360; - var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - - break; - case 1: // Actual/actual - var ylength = 365; - if (sy === ey || ((sy + 1) === ey) && ((sm > em) || ((sm === em) && (sd >= ed)))) { - if ((sy === ey && luckysheet.func_methods.isLeapYear(sy)) || luckysheet.func_methods.feb29Between(settlement, maturity) || (em === 1 && ed === 29)) { - ylength = 366; - } - - var B = ylength; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - - result = ((redemption - pr) / redemption) * (B / DSM); - - return result; - } - - var years = (ey - sy) + 1; - var days = (moment().set({ 'year': ey + 1, 'month': 0, 'date': 1 }) - moment().set({ 'year': sy, 'month': 0, "date": 1 })) / 1000 / 60 / 60 / 24; - var average = days / years; - - var B = average; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - - break; - case 2: // Actual/360 - var B = 360; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - - break; - case 3: // Actual/365 - var B = 365; - var DSM = moment(maturity).diff(moment(settlement), 'days'); - - break; - case 4: // European 30/360 - var B = 360; - var DSM = ((ed + em * 30 + ey * 360) - (sd + sm * 30 + sy * 360)); - - break; - } - - result = ((redemption - pr) / redemption) * (B / DSM); - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NPER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //利率 - var rate = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rate)){ - return rate; - } - - if(!luckysheet.func_methods.isRealNum(rate)){ - return luckysheet.formula.error.v; - } - - rate = parseFloat(rate); - - //各期所应支付的金额 - var pmt = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(pmt)){ - return pmt; - } - - if(!luckysheet.func_methods.isRealNum(pmt)){ - return luckysheet.formula.error.v; - } - - pmt = parseFloat(pmt); - - //现值 - var pv = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(pv)){ - return pv; - } - - if(!luckysheet.func_methods.isRealNum(pv)){ - return luckysheet.formula.error.v; - } - - pv = parseFloat(pv); - - //最后一次付款后希望得到的现金余额 - var fv = 0; - if(arguments.length >= 4){ - fv = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(fv)){ - return fv; - } - - if(!luckysheet.func_methods.isRealNum(fv)){ - return luckysheet.formula.error.v; - } - - fv = parseFloat(fv); - } - - //指定各期的付款时间是在期初还是期末 - var type = 0; - if(arguments.length >= 5){ - type = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(type)){ - return type; - } - - if(!luckysheet.func_methods.isRealNum(type)){ - return luckysheet.formula.error.v; - } - - type = parseFloat(type); - } - - if(type != 0 && type != 1){ - return luckysheet.formula.error.nm; - } - - //计算 - var num = pmt * (1 + rate * type) - fv * rate; - var den = (pv * rate + pmt * (1 + rate * type)); - - return Math.log(num / den) / Math.log(1 + rate); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SLN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //资产原值 - var cost = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(cost)){ - return cost; - } - - if(!luckysheet.func_methods.isRealNum(cost)){ - return luckysheet.formula.error.v; - } - - cost = parseFloat(cost); - - //资产残值 - var salvage = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(salvage)){ - return salvage; - } - - if(!luckysheet.func_methods.isRealNum(salvage)){ - return luckysheet.formula.error.v; - } - - salvage = parseFloat(salvage); - - //资产的折旧期数 - var life = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(life)){ - return life; - } - - if(!luckysheet.func_methods.isRealNum(life)){ - return luckysheet.formula.error.v; - } - - life = parseFloat(life); - - if(life == 0){ - return luckysheet.formula.error.d; - } - - return (cost - salvage) / life; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DURATION": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的年息票利率 - var coupon = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(coupon)){ - return coupon; - } - - if(!luckysheet.func_methods.isRealNum(coupon)){ - return luckysheet.formula.error.v; - } - - coupon = parseFloat(coupon); - - //有价证券的年收益率 - var yld = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(yld)){ - return yld; - } - - if(!luckysheet.func_methods.isRealNum(yld)){ - return luckysheet.formula.error.v; - } - - yld = parseFloat(yld); - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 6){ - basis = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(coupon < 0 || yld < 0){ - return luckysheet.formula.error.nm; - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - var nper = window.luckysheet_function.COUPNUM.f(settlement, maturity, frequency, basis); - - var sum1 = 0; - var sum2 = 0; - for(var i = 1; i <= nper; i++){ - sum1 += 100 * (coupon / frequency) * i / Math.pow(1 + (yld / frequency), i); - sum2 += 100 * (coupon / frequency) / Math.pow(1 + (yld / frequency), i); - } - - var result = (sum1 + 100 * nper / Math.pow(1 + (yld / frequency), nper)) / (sum2 + 100 / Math.pow(1 + (yld / frequency), nper)); - result = result / frequency; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MDURATION": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //结算日 - var settlement = luckysheet.func_methods.getCellDate(arguments[0]); - if(luckysheet.func_methods.valueIsError(settlement)){ - return settlement; - } - - if(!moment(settlement).isValid()){ - return luckysheet.formula.error.v; - } - - //到期日 - var maturity = luckysheet.func_methods.getCellDate(arguments[1]); - if(luckysheet.func_methods.valueIsError(maturity)){ - return maturity; - } - - if(!moment(maturity).isValid()){ - return luckysheet.formula.error.v; - } - - //有价证券的年息票利率 - var coupon = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(coupon)){ - return coupon; - } - - if(!luckysheet.func_methods.isRealNum(coupon)){ - return luckysheet.formula.error.v; - } - - coupon = parseFloat(coupon); - - //有价证券的年收益率 - var yld = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(yld)){ - return yld; - } - - if(!luckysheet.func_methods.isRealNum(yld)){ - return luckysheet.formula.error.v; - } - - yld = parseFloat(yld); - - //年付息次数 - var frequency = luckysheet.func_methods.getFirstValue(arguments[4]); - if(luckysheet.func_methods.valueIsError(frequency)){ - return frequency; - } - - if(!luckysheet.func_methods.isRealNum(frequency)){ - return luckysheet.formula.error.v; - } - - frequency = parseInt(frequency); - - //日计数基准类型 - var basis = 0; - if(arguments.length == 6){ - basis = luckysheet.func_methods.getFirstValue(arguments[5]); - if(luckysheet.func_methods.valueIsError(basis)){ - return basis; - } - - if(!luckysheet.func_methods.isRealNum(basis)){ - return luckysheet.formula.error.v; - } - - basis = parseInt(basis); - } - - if(coupon < 0 || yld < 0){ - return luckysheet.formula.error.nm; - } - - if(frequency != 1 && frequency != 2 && frequency != 4){ - return luckysheet.formula.error.nm; - } - - if(basis < 0 || basis > 4){ - return luckysheet.formula.error.nm; - } - - if(moment(settlement) - moment(maturity) >= 0){ - return luckysheet.formula.error.nm; - } - - var duration = window.luckysheet_function.DURATION.f(settlement, maturity, coupon, yld, frequency, basis); - - return duration / (1 + yld / frequency); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BIN2DEC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //二进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!/^[01]{1,10}$/g.test(number)){ - return luckysheet.formula.error.nm; - } - - //计算 - var result = parseInt(number, 2); - var stringified = number.toString(); - - if (stringified.length === 10 && stringified.substring(0, 1) === '1') { - return parseInt(stringified.substring(1), 2) - 512; - } - else { - return result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BIN2HEX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //二进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if(!/^[01]{1,10}$/g.test(number)){ - return luckysheet.formula.error.nm; - } - - //计算 - var result = parseInt(number, 2).toString(16).toUpperCase(); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BIN2OCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //二进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if(!/^[01]{1,10}$/g.test(number)){ - return luckysheet.formula.error.nm; - } - - //计算 - var stringified = number.toString(); - if (stringified.length === 10 && stringified.substring(0, 1) === '1') { - return (1073741312 + parseInt(stringified.substring(1), 2)).toString(8); - } - - var result = parseInt(number, 2).toString(8); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DEC2BIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //十进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^-?[0-9]{1,3}$/.test(number) || number < -512 || number > 511) { - return luckysheet.formula.error.nm; - } - - //计算 - if (number < 0) { - return '1' + new Array(9 - (512 + number).toString(2).length).join('0') + (512 + number).toString(2); - } - - var result = parseInt(number, 10).toString(2); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DEC2HEX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //十进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^-?[0-9]{1,12}$/.test(number) || number < -549755813888 || number > 549755813887) { - return luckysheet.formula.error.nm; - } - - //计算 - if (number < 0) { - return (1099511627776 + number).toString(16).toUpperCase(); - } - - var result = parseInt(number, 10).toString(16).toUpperCase(); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DEC2OCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //十进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^-?[0-9]{1,9}$/.test(number) || number < -536870912 || number > 536870911) { - return luckysheet.formula.error.nm; - } - - //计算 - if (number < 0) { - return (1073741824 + number).toString(8); - } - - var result = parseInt(number, 10).toString(8); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HEX2BIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //十六进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) { - return luckysheet.formula.error.nm; - } - - //计算 - var negative = (number.length === 10 && number.substring(0, 1).toLowerCase() === 'f') ? true : false; - - var decimal = (negative) ? parseInt(number, 16) - 1099511627776 : parseInt(number, 16); - - if (decimal < -512 || decimal > 511) { - return luckysheet.formula.error.nm; - } - - if (negative) { - return '1' + new Array(9 - (512 + decimal).toString(2).length).join('0') + (512 + decimal).toString(2); - } - - var result = decimal.toString(2); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HEX2DEC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //十六进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) { - return luckysheet.formula.error.nm; - } - - //计算 - var decimal = parseInt(number, 16); - - return (decimal >= 549755813888) ? decimal - 1099511627776 : decimal; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "HEX2OCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //十六进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) { - return luckysheet.formula.error.nm; - } - - //计算 - var decimal = parseInt(number, 16); - - if (decimal > 536870911 && decimal < 1098974756864) { - return luckysheet.formula.error.nm; - } - - if (decimal >= 1098974756864) { - return (decimal - 1098437885952).toString(8); - } - - var result = decimal.toString(8); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "OCT2BIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //八进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^[0-7]{1,10}$/.test(number)) { - return luckysheet.formula.error.nm; - } - - //计算 - number = number.toString(); - - var negative = (number.length === 10 && number.substring(0, 1) === '7') ? true : false; - - var decimal = (negative) ? parseInt(number, 8) - 1073741824 : parseInt(number, 8); - - if (decimal < -512 || decimal > 511) { - return error.num; - } - - if (negative) { - return '1' + new Array(9 - (512 + decimal).toString(2).length).join('0') + (512 + decimal).toString(2); - } - - var result = decimal.toString(2); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "OCT2DEC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //八进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if (!/^[0-7]{1,10}$/.test(number)) { - return luckysheet.formula.error.nm; - } - - //计算 - var decimal = parseInt(number, 8); - - return (decimal >= 536870912) ? decimal - 1073741824 : decimal; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "OCT2HEX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //八进制数 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - //有效位数 - var places = null; - if(arguments.length == 2){ - places = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(places)){ - return places; - } - - if(!luckysheet.func_methods.isRealNum(places)){ - return luckysheet.formula.error.v; - } - - places = parseInt(places); - } - - if (!/^[0-7]{1,10}$/.test(number)) { - return luckysheet.formula.error.nm; - } - - //计算 - var decimal = parseInt(number, 8); - - if (decimal >= 536870912) { - return 'FF' + (decimal + 3221225472).toString(16).toUpperCase(); - } - - var result = decimal.toString(16).toUpperCase(); - - if (places == null) { - return result; - } - else { - if(places < 0 || places < result.length){ - return luckysheet.formula.error.nm; - } - - return new Array(places - result.length + 1).join('0') + result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COMPLEX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //复数的实系数 - var real_num = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(real_num)){ - return real_num; - } - - if(!luckysheet.func_methods.isRealNum(real_num)){ - return luckysheet.formula.error.v; - } - - real_num = parseFloat(real_num); - - //复数的虚系数 - var i_num = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(i_num)){ - return i_num; - } - - if(!luckysheet.func_methods.isRealNum(i_num)){ - return luckysheet.formula.error.v; - } - - i_num = parseFloat(i_num); - - //复数中虚系数的后缀 - var suffix = "i"; - if(arguments.length == 3){ - suffix = arguments[2].toString(); - } - - if(suffix != "i" && suffix != "j"){ - return luckysheet.formula.error.v; - } - - //计算 - if (real_num === 0 && i_num === 0) { - return 0; - } - else if (real_num === 0) { - return (i_num === 1) ? suffix : i_num.toString() + suffix; - } - else if (i_num === 0) { - return real_num.toString(); - } - else { - var sign = (i_num > 0) ? '+' : ''; - return real_num.toString() + sign + ((i_num === 1) ? suffix : i_num.toString() + suffix); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMREAL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //复数 - var inumber = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(inumber)){ - return inumber; - } - - inumber = inumber.toString(); - - if(inumber.toLowerCase() == "true" || inumber.toLowerCase() == "false"){ - return luckysheet.formula.error.v; - } - - //计算 - if(inumber == "0"){ - return 0; - } - - if(['i', '+i', '1i', '+1i', '-i', '-1i', 'j', '+j', '1j', '+1j', '-j', '-1j'].indexOf(inumber) >= 0){ - return 0; - } - - var plus = inumber.indexOf('+'); - var minus = inumber.indexOf('-'); - - if (plus === 0) { - plus = inumber.indexOf('+', 1); - } - - if (minus === 0) { - minus = inumber.indexOf('-', 1); - } - - var last = inumber.substring(inumber.length - 1, inumber.length); - var unit = (last === 'i' || last === 'j'); - - if (plus >= 0 || minus >= 0) { - if (!unit) { - return luckysheet.formula.error.nm; - } - - if (plus >= 0) { - return (isNaN(inumber.substring(0, plus)) || isNaN(inumber.substring(plus + 1, inumber.length - 1))) ? luckysheet.formula.error.nm : Number(inumber.substring(0, plus)); - } - else { - return (isNaN(inumber.substring(0, minus)) || isNaN(inumber.substring(minus + 1, inumber.length - 1))) ? luckysheet.formula.error.nm : Number(inumber.substring(0, minus)); - } - } - else { - if (unit) { - return (isNaN(inumber.substring(0, inumber.length - 1))) ? luckysheet.formula.error.nm : 0; - } - else { - return (isNaN(inumber)) ? luckysheet.formula.error.nm : inumber; - } - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMAGINARY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //复数 - var inumber = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(inumber)){ - return inumber; - } - - inumber = inumber.toString(); - - if(inumber.toLowerCase() == "true" || inumber.toLowerCase() == "false"){ - return luckysheet.formula.error.v; - } - - //计算 - if(inumber == "0"){ - return 0; - } - - if (['i', 'j'].indexOf(inumber) >= 0) { - return 1; - } - - inumber = inumber.replace('+i', '+1i').replace('-i', '-1i').replace('+j', '+1j').replace('-j', '-1j'); - - var plus = inumber.indexOf('+'); - var minus = inumber.indexOf('-'); - - if (plus === 0) { - plus = inumber.indexOf('+', 1); - } - - if (minus === 0) { - minus = inumber.indexOf('-', 1); - } - - var last = inumber.substring(inumber.length - 1, inumber.length); - var unit = (last === 'i' || last === 'j'); - - if (plus >= 0 || minus >= 0) { - if (!unit) { - return luckysheet.formula.error.nm; - } - - if (plus >= 0) { - return (isNaN(inumber.substring(0, plus)) || isNaN(inumber.substring(plus + 1, inumber.length - 1))) ? luckysheet.formula.error.nm : Number(inumber.substring(plus + 1, inumber.length - 1)); - } - else { - return (isNaN(inumber.substring(0, minus)) || isNaN(inumber.substring(minus + 1, inumber.length - 1))) ? luckysheet.formula.error.nm : -Number(inumber.substring(minus + 1, inumber.length - 1)); - } - } - else { - if (unit) { - return (isNaN(inumber.substring(0, inumber.length - 1))) ? luckysheet.formula.error.nm : inumber.substring(0, inumber.length - 1); - } - else { - return (isNaN(inumber)) ? luckysheet.formula.error.nm : 0; - } - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMCONJUGATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //复数 - var inumber = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(inumber)){ - return inumber; - } - - inumber = inumber.toString(); - - var x = window.luckysheet_function.IMREAL.f(inumber); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - var y = window.luckysheet_function.IMAGINARY.f(inumber); - if(luckysheet.func_methods.valueIsError(y)){ - return y; - } - - var unit = inumber.substring(inumber.length - 1); - unit = (unit === 'i' || unit === 'j') ? unit : 'i'; - - return (y !== 0) ? window.luckysheet_function.COMPLEX.f(x, -y, unit) : inumber; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMABS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var x = window.luckysheet_function.IMREAL.f(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - var y = window.luckysheet_function.IMAGINARY.f(arguments[0]); - if(luckysheet.func_methods.valueIsError(y)){ - return y; - } - - return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DELTA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //第一个数字 - var number1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number1)){ - return number1; - } - - if(!luckysheet.func_methods.isRealNum(number1)){ - return luckysheet.formula.error.v; - } - - number1 = parseFloat(number1); - - //第二个数字 - var number2 = 0; - if(arguments.length == 2){ - number2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number2)){ - return number2; - } - - if(!luckysheet.func_methods.isRealNum(number2)){ - return luckysheet.formula.error.v; - } - - number2 = parseFloat(number2); - } - - return (number1 === number2) ? 1 : 0; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMSUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var x = window.luckysheet_function.IMREAL.f(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - var y = window.luckysheet_function.IMAGINARY.f(arguments[0]); - if(luckysheet.func_methods.valueIsError(y)){ - return y; - } - - var result = arguments[0]; - - for(var i = 1; i < arguments.length; i++){ - var a = window.luckysheet_function.IMREAL.f(result); - if(luckysheet.func_methods.valueIsError(a)){ - return a; - } - - var b = window.luckysheet_function.IMAGINARY.f(result); - if(luckysheet.func_methods.valueIsError(b)){ - return b; - } - - var c = window.luckysheet_function.IMREAL.f(arguments[i]); - if(luckysheet.func_methods.valueIsError(c)){ - return c; - } - - var d = window.luckysheet_function.IMAGINARY.f(arguments[i]); - if(luckysheet.func_methods.valueIsError(d)){ - return d; - } - - result = window.luckysheet_function.COMPLEX.f(a + c, b + d); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMSUB": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //inumber1 - var inumber1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(inumber1)){ - return inumber1; - } - - inumber1 = inumber1.toString(); - - if(inumber1.toLowerCase() == "true" || inumber1.toLowerCase() == "false"){ - return luckysheet.formula.error.v; - } - - var a = window.luckysheet_function.IMREAL.f(inumber1); - if(luckysheet.func_methods.valueIsError(a)){ - return a; - } - - var b = window.luckysheet_function.IMAGINARY.f(inumber1); - if(luckysheet.func_methods.valueIsError(b)){ - return b; - } - - //inumber2 - var inumber2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(inumber2)){ - return inumber2; - } - - inumber2 = inumber2.toString(); - - if(inumber2.toLowerCase() == "true" || inumber2.toLowerCase() == "false"){ - return luckysheet.formula.error.v; - } - - var c = window.luckysheet_function.IMREAL.f(inumber2); - if(luckysheet.func_methods.valueIsError(c)){ - return c; - } - - var d = window.luckysheet_function.IMAGINARY.f(inumber2); - if(luckysheet.func_methods.valueIsError(d)){ - return d; - } - - //计算 - var unit1 = inumber1.substring(inumber1.length - 1); - var unit2 = inumber2.substring(inumber2.length - 1); - - var unit = 'i'; - - if (unit1 === 'j') { - unit = 'j'; - } - else if (unit2 === 'j') { - unit = 'j'; - } - - return window.luckysheet_function.COMPLEX.f(a - c, b - d, unit); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMPRODUCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var x = window.luckysheet_function.IMREAL.f(arguments[0]); - if(luckysheet.func_methods.valueIsError(x)){ - return x; - } - - var y = window.luckysheet_function.IMAGINARY.f(arguments[0]); - if(luckysheet.func_methods.valueIsError(y)){ - return y; - } - - var result = arguments[0]; - - for(var i = 1; i < arguments.length; i++){ - var a = window.luckysheet_function.IMREAL.f(result); - if(luckysheet.func_methods.valueIsError(a)){ - return a; - } - - var b = window.luckysheet_function.IMAGINARY.f(result); - if(luckysheet.func_methods.valueIsError(b)){ - return b; - } - - var c = window.luckysheet_function.IMREAL.f(arguments[i]); - if(luckysheet.func_methods.valueIsError(c)){ - return c; - } - - var d = window.luckysheet_function.IMAGINARY.f(arguments[i]); - if(luckysheet.func_methods.valueIsError(d)){ - return d; - } - - result = window.luckysheet_function.COMPLEX.f(a * c - b * d, a * d + b * c); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IMDIV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //inumber1 - var inumber1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(inumber1)){ - return inumber1; - } - - inumber1 = inumber1.toString(); - - if(inumber1.toLowerCase() == "true" || inumber1.toLowerCase() == "false"){ - return luckysheet.formula.error.v; - } - - var a = window.luckysheet_function.IMREAL.f(inumber1); - if(luckysheet.func_methods.valueIsError(a)){ - return a; - } - - var b = window.luckysheet_function.IMAGINARY.f(inumber1); - if(luckysheet.func_methods.valueIsError(b)){ - return b; - } - - //inumber2 - var inumber2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(inumber2)){ - return inumber2; - } - - inumber2 = inumber2.toString(); - - if(inumber2.toLowerCase() == "true" || inumber2.toLowerCase() == "false"){ - return luckysheet.formula.error.v; - } - - var c = window.luckysheet_function.IMREAL.f(inumber2); - if(luckysheet.func_methods.valueIsError(c)){ - return c; - } - - var d = window.luckysheet_function.IMAGINARY.f(inumber2); - if(luckysheet.func_methods.valueIsError(d)){ - return d; - } - - //计算 - var unit1 = inumber1.substring(inumber1.length - 1); - var unit2 = inumber2.substring(inumber2.length - 1); - - var unit = 'i'; - - if (unit1 === 'j') { - unit = 'j'; - } - else if (unit2 === 'j') { - unit = 'j'; - } - - if (c === 0 && d === 0) { - return luckysheet.formula.error.nm; - } - - var den = c * c + d * d; - - return window.luckysheet_function.COMPLEX.f((a * c + b * d) / den, (b * c - a * d) / den, unit); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NOT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //logical - var logical = luckysheet.func_methods.getCellBoolen(arguments[0]); - - if(luckysheet.func_methods.valueIsError(logical)){ - return logical; - } - - return !logical; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TRUE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return true; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FALSE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return false; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var result = true; - - for(var i = 0; i < arguments.length; i++){ - var logical = luckysheet.func_methods.getCellBoolen(arguments[i]); - - if(luckysheet.func_methods.valueIsError(logical)){ - return logical; - } - - if(!logical){ - result = false; - break; - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IFERROR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var value_if_error = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - - var value = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(value)){ - return value_if_error; - } - - return value; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "IF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要测试的条件 - var logical_test = luckysheet.func_methods.getCellBoolen(arguments[0]); - if(luckysheet.func_methods.valueIsError(logical_test)){ - return logical_test; - } - - //结果为 TRUE - var value_if_true = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(value_if_true)){ - return value_if_true; - } - - //结果为 FALSE - var value_if_false = ""; - if(arguments.length == 3){ - value_if_false = luckysheet.func_methods.getFirstValue(arguments[2], "text"); - if(luckysheet.func_methods.valueIsError(value_if_false)){ - return value_if_false; - } - } - - if(logical_test){ - return value_if_true; - } - else{ - return value_if_false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "OR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var result = false; - - for(var i = 0; i < arguments.length; i++){ - var logical = luckysheet.func_methods.getCellBoolen(arguments[i]); - - if(luckysheet.func_methods.valueIsError(logical)){ - return logical; - } - - if(logical){ - result = true; - break; - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - return value1 != value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EQ": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - return value1 == value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 > value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GTE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 >= value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 < value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LTE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 <= value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ADD": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 + value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MINUS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 - value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MULTIPLY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - return value1 * value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DIVIDE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - if(!luckysheet.func_methods.isRealNum(value1)){ - return luckysheet.formula.error.v; - } - - value1 = parseFloat(value1); - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - if(!luckysheet.func_methods.isRealNum(value2)){ - return luckysheet.formula.error.v; - } - - value2 = parseFloat(value2); - - if(value2 == 0){ - return luckysheet.formula.error.d; - } - - return value1 / value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CONCAT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //value1 - var value1 = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(value1)){ - return value1; - } - - //value2 - var value2 = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(value2)){ - return value2; - } - - return value1 + "" + value2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "UNARY_PERCENT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要作为百分比解释的数值 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - var result = number / 100; - - return Math.round(result * 100) / 100; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CONCATENATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var result = ""; - - for(var i = 0; i < arguments.length; i++){ - var text = luckysheet.func_methods.getFirstValue(arguments[i], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - result = result + "" + text; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CODE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - if(text == ""){ - return luckysheet.formula.error.v; - } - - return text.charCodeAt(0); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CHAR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - if(number < 1 || number > 255){ - return luckysheet.formula.error.v; - } - - return String.fromCharCode(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ARABIC": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString().toUpperCase(); - - if (!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(text)) { - return luckysheet.formula.error.v; - } - - var r = 0; - text.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g, function(i) { - r += { - M: 1000, - CM: 900, - D: 500, - CD: 400, - C: 100, - XC: 90, - L: 50, - XL: 40, - X: 10, - IX: 9, - V: 5, - IV: 4, - I: 1 - }[i]; - }); - - return r; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ROMAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseInt(number); - - if(number == 0){ - return ""; - } - else if(number < 1 || number > 3999){ - return luckysheet.formula.error.v; - } - - //计算 - function convert(num) { - var a=[ - ["","I","II","III","IV","V","VI","VII","VIII","IX"], - ["","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"], - ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"], - ["","M","MM","MMM"] - ]; - - var i = a[3][Math.floor(num / 1000)]; - var j = a[2][Math.floor(num % 1000 / 100)]; - var k = a[1][Math.floor(num % 100 / 10)]; - var l = a[0][num % 10]; - - return i + j + k + l; - } - - return convert(number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "REGEXEXTRACT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //输入文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - //表达式 - var regular_expression = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(regular_expression)){ - return regular_expression; - } - - var match = text.match(new RegExp(regular_expression)); - return match ? (match[match.length > 1 ? match.length - 1 : 0]) : null; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "REGEXMATCH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //输入文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - //表达式 - var regular_expression = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(regular_expression)){ - return regular_expression; - } - - var match = text.match(new RegExp(regular_expression)); - return match ? true : false; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "REGEXREPLACE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //输入文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - //表达式 - var regular_expression = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(regular_expression)){ - return regular_expression; - } - - //插入文本 - var replacement = luckysheet.func_methods.getFirstValue(arguments[2], "text"); - if(luckysheet.func_methods.valueIsError(replacement)){ - return replacement; - } - - return text.replace(new RegExp(regular_expression), replacement); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "T": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //文本 - var value = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - return luckysheet.getObjType(value) == "string" ? value : ''; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FIXED": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要进行舍入并转换为文本的数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //小数位数 - var decimals = 2; - if(arguments.length >= 2){ - decimals = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(decimals)){ - return decimals; - } - - if(!luckysheet.func_methods.isRealNum(decimals)){ - return luckysheet.formula.error.v; - } - - decimals = parseInt(decimals); - } - - //逻辑值 - var no_commas = false; - if(arguments.length == 3){ - no_commas = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(no_commas)){ - return no_commas; - } - } - - if(decimals > 127){ - return luckysheet.formula.error.v; - } - - //计算 - var format = no_commas ? '0' : '#,##0'; - - if (decimals <= 0) { - number = Math.round(number * Math.pow(10, decimals)) / Math.pow(10, decimals); - } - else if (decimals > 0) { - format += '.' + new Array(decimals + 1).join('0'); - } - - return luckysheet.mask.update(format, number); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FIND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要查找的文本 - var find_text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(find_text)){ - return find_text; - } - - find_text = find_text.toString(); - - //包含要查找文本的文本 - var within_text = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(within_text)){ - return within_text; - } - - within_text = within_text.toString(); - - //指定开始进行查找的字符 - var start_num = 1; - if(arguments.length == 3){ - start_num = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(start_num)){ - return start_num; - } - - if(!luckysheet.func_methods.isRealNum(start_num)){ - return luckysheet.formula.error.v; - } - - start_num = parseFloat(start_num); - } - - if(start_num < 0 || start_num > within_text.length){ - return luckysheet.formula.error.v; - } - - if(find_text == ""){ - return start_num; - } - - if(within_text.indexOf(find_text) == -1){ - return luckysheet.formula.error.v; - } - - var result = within_text.indexOf(find_text, start_num - 1) + 1; - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FINDB": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要查找的文本 - var find_text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(find_text)){ - return find_text; - } - - find_text = find_text.toString(); - - //包含要查找文本的文本 - var within_text = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(within_text)){ - return within_text; - } - - within_text = within_text.toString(); - - //指定开始进行查找的字符 - var start_num = 1; - if(arguments.length == 3){ - start_num = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(start_num)){ - return start_num; - } - - if(!luckysheet.func_methods.isRealNum(start_num)){ - return luckysheet.formula.error.v; - } - - start_num = parseFloat(start_num); - } - - if(start_num < 0 || start_num > within_text.length){ - return luckysheet.formula.error.v; - } - - if(find_text == ""){ - return start_num; - } - - if(within_text.indexOf(find_text) == -1){ - return luckysheet.formula.error.v; - } - - var strArr = within_text.split(""); - var index = within_text.indexOf(find_text, start_num - 1); - - var result = 0; - for(var i = 0; i < index; i++){ - if(/[^\x00-\xff]/g.test(strArr[i])){ - result += 2; - } - else{ - result += 1; - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "JOIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //定界符 - var separator = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(separator)){ - return separator; - } - - //值或数组 - var dataArr = []; - - for(var i = 1; i < arguments.length; i++){ - var data = arguments[i]; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - dataArr = dataArr.concat(luckysheet.func_methods.getDataArr(data, false)); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - dataArr = dataArr.concat(luckysheet.func_methods.getCellDataArr(data, "text", false)); - } - else{ - dataArr.push(data); - } - } - - return dataArr.join(separator); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LEFT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //包含要提取的字符的文本字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - //提取的字符的数量 - var num_chars = 1; - if(arguments.length == 2){ - num_chars = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(num_chars)){ - return num_chars; - } - - if(!luckysheet.func_methods.isRealNum(num_chars)){ - return luckysheet.formula.error.v; - } - - num_chars = parseInt(num_chars); - } - - if(num_chars < 0){ - return luckysheet.formula.error.v; - } - - //计算 - if(num_chars >= text.length){ - return text; - } - else if(num_chars == 0){ - return ""; - } - else{ - return text.substr(0, num_chars); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RIGHT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //包含要提取的字符的文本字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - //提取的字符的数量 - var num_chars = 1; - if(arguments.length == 2){ - num_chars = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(num_chars)){ - return num_chars; - } - - if(!luckysheet.func_methods.isRealNum(num_chars)){ - return luckysheet.formula.error.v; - } - - num_chars = parseInt(num_chars); - } - - if(num_chars < 0){ - return luckysheet.formula.error.v; - } - - //计算 - if(num_chars >= text.length){ - return text; - } - else if(num_chars == 0){ - return ""; - } - else{ - return text.substr(-num_chars, num_chars); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MID": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //包含要提取的字符的文本字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - //开始提取的位置 - var start_num = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(start_num)){ - return start_num; - } - - if(!luckysheet.func_methods.isRealNum(start_num)){ - return luckysheet.formula.error.v; - } - - start_num = parseInt(start_num); - - //提取的字符的数量 - var num_chars = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(num_chars)){ - return num_chars; - } - - if(!luckysheet.func_methods.isRealNum(num_chars)){ - return luckysheet.formula.error.v; - } - - num_chars = parseInt(num_chars); - - if(start_num < 1 || num_chars < 0){ - return luckysheet.formula.error.v; - } - - //计算 - if(start_num > text.length){ - return ""; - } - - if(start_num + num_chars > text.length){ - return text.substr(start_num - 1, text.length - start_num + 1); - } - - return text.substr(start_num - 1, num_chars); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LEN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - return text.length; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LENB": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - return text.replace(/[^\x00-\xff]/g, "aa").length; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOWER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - return text ? text.toLowerCase() : text; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "UPPER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - return text ? text.toUpperCase() : text; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "EXACT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串1 - var text1 = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text1)){ - return text1; - } - - text1 = text1.toString(); - - //字符串2 - var text2 = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(text2)){ - return text2; - } - - text2 = text2.toString(); - - return text1 === text2; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "REPLACE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串1 - var old_text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(old_text)){ - return old_text; - } - - old_text = old_text.toString(); - - //进行替换操作的位置 - var start_num = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(start_num)){ - return start_num; - } - - if(!luckysheet.func_methods.isRealNum(start_num)){ - return luckysheet.formula.error.v; - } - - start_num = parseInt(start_num); - - //要在文本中替换的字符个数 - var num_chars = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(num_chars)){ - return num_chars; - } - - if(!luckysheet.func_methods.isRealNum(num_chars)){ - return luckysheet.formula.error.v; - } - - num_chars = parseInt(num_chars); - - //字符串2 - var new_text = luckysheet.func_methods.getFirstValue(arguments[3], "text"); - if(luckysheet.func_methods.valueIsError(new_text)){ - return new_text; - } - - new_text = new_text.toString(); - - return old_text.substr(0, start_num - 1) + new_text + old_text.substr(start_num - 1 + num_chars); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "REPT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串1 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - //重复次数 - var number_times = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(number_times)){ - return number_times; - } - - if(!luckysheet.func_methods.isRealNum(number_times)){ - return luckysheet.formula.error.v; - } - - number_times = parseInt(number_times); - - if(number_times < 0){ - return luckysheet.formula.error.v; - } - - if(number_times > 100){ - number_times = 100; - } - - return new Array(number_times + 1).join(text); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SEARCH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串1 - var find_text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(find_text)){ - return find_text; - } - - find_text = find_text.toString(); - - //字符串2 - var within_text = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(within_text)){ - return within_text; - } - - within_text = within_text.toString(); - - //开始位置 - var start_num = 1; - if(arguments.length == 3){ - start_num = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(start_num)){ - return start_num; - } - - if(!luckysheet.func_methods.isRealNum(start_num)){ - return luckysheet.formula.error.v; - } - - start_num = parseInt(start_num); - } - - if(start_num <= 0 || start_num > within_text.length){ - return luckysheet.formula.error.v; - } - - var foundAt = within_text.toLowerCase().indexOf(find_text.toLowerCase(), start_num - 1) + 1; - - return (foundAt === 0) ? luckysheet.formula.error.v : foundAt; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUBSTITUTE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //需要替换其中字符的文本 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - //需要替换的文本 - var old_text = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(old_text)){ - return old_text; - } - - old_text = old_text.toString(); - - //用于替换 old_text 的文本 - var new_text = luckysheet.func_methods.getFirstValue(arguments[2], "text"); - if(luckysheet.func_methods.valueIsError(new_text)){ - return new_text; - } - - new_text = new_text.toString(); - - //instance_num - var instance_num = null; - if(arguments.length == 4){ - instance_num = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(instance_num)){ - return instance_num; - } - - if(!luckysheet.func_methods.isRealNum(instance_num)){ - return luckysheet.formula.error.v; - } - - instance_num = parseInt(instance_num); - } - - //计算 - var reg = new RegExp(old_text, "g"); - - var result; - - if(instance_num == null){ - result = text.replace(reg, new_text); - } - else{ - if(instance_num <= 0){ - return luckysheet.formula.error.v; - } - - var match = text.match(reg); - - if(match == null || instance_num > match.length){ - return text; - } - else{ - var len = old_text.length; - var index = 0; - - for(var i = 1; i <= instance_num; i++){ - index = text.indexOf(old_text, index) + 1; - } - - result = text.substring(0, index - 1) + new_text + text.substring(index - 1 + len); - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CLEAN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - var textArr = []; - for(var i = 0; i < text.length; i++){ - var code = text.charCodeAt(i); - - if(/[\u4e00-\u9fa5]/g.test(text.charAt(i)) || (code > 31 && code < 127)){ - textArr.push(text.charAt(i)); - } - } - - return textArr.join(""); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TEXT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var value = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - if(!luckysheet.func_methods.isRealNum(value)){ - return luckysheet.formula.error.v; - } - - value = parseFloat(value); - - //格式 - var format_text = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(format_text)){ - return format_text; - } - - format_text = format_text.toString(); - - return luckysheet.mask.update(format_text, value); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TRIM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - return text.replace(/ +/g, ' ').trim(); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "VALUE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString(); - - return luckysheet.mask.genarate(text)[2]; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PROPER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //字符串 - var text = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(text)){ - return text; - } - - text = text.toString().toLowerCase(); - - return text.replace(/[a-zA-Z]+/g, function(word){ return word.substring(0,1).toUpperCase() + word.substring(1); }) - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CONVERT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var number = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(number)){ - return number; - } - - if(!luckysheet.func_methods.isRealNum(number)){ - return luckysheet.formula.error.v; - } - - number = parseFloat(number); - - //数值的单位 - var from_unit = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(from_unit)){ - return from_unit; - } - - from_unit = from_unit.toString(); - - //结果的单位 - var to_unit = luckysheet.func_methods.getFirstValue(arguments[2], "text"); - if(luckysheet.func_methods.valueIsError(to_unit)){ - return to_unit; - } - - to_unit = to_unit.toString(); - - //计算 - var units = [ - ["a.u. of action", "?", null, "action", false, false, 1.05457168181818e-34], - ["a.u. of charge", "e", null, "electric_charge", false, false, 1.60217653141414e-19], - ["a.u. of energy", "Eh", null, "energy", false, false, 4.35974417757576e-18], - ["a.u. of length", "a?", null, "length", false, false, 5.29177210818182e-11], - ["a.u. of mass", "m?", null, "mass", false, false, 9.10938261616162e-31], - ["a.u. of time", "?/Eh", null, "time", false, false, 2.41888432650516e-17], - ["admiralty knot", "admkn", null, "speed", false, true, 0.514773333], - ["ampere", "A", null, "electric_current", true, false, 1], - ["ampere per meter", "A/m", null, "magnetic_field_intensity", true, false, 1], - ["ångström", "Å", ["ang"], "length", false, true, 1e-10], - ["are", "ar", null, "area", false, true, 100], - ["astronomical unit", "ua", null, "length", false, false, 1.49597870691667e-11], - ["bar", "bar", null, "pressure", false, false, 100000], - ["barn", "b", null, "area", false, false, 1e-28], - ["becquerel", "Bq", null, "radioactivity", true, false, 1], - ["bit", "bit", ["b"], "information", false, true, 1], - ["btu", "BTU", ["btu"], "energy", false, true, 1055.05585262], - ["byte", "byte", null, "information", false, true, 8], - ["candela", "cd", null, "luminous_intensity", true, false, 1], - ["candela per square metre", "cd/m?", null, "luminance", true, false, 1], - ["coulomb", "C", null, "electric_charge", true, false, 1], - ["cubic ångström", "ang3", ["ang^3"], "volume", false, true, 1e-30], - ["cubic foot", "ft3", ["ft^3"], "volume", false, true, 0.028316846592], - ["cubic inch", "in3", ["in^3"], "volume", false, true, 0.000016387064], - ["cubic light-year", "ly3", ["ly^3"], "volume", false, true, 8.46786664623715e-47], - ["cubic metre", "m?", null, "volume", true, true, 1], - ["cubic mile", "mi3", ["mi^3"], "volume", false, true, 4168181825.44058], - ["cubic nautical mile", "Nmi3", ["Nmi^3"], "volume", false, true, 6352182208], - ["cubic Pica", "Pica3", ["Picapt3", "Pica^3", "Picapt^3"], "volume", false, true, 7.58660370370369e-8], - ["cubic yard", "yd3", ["yd^3"], "volume", false, true, 0.764554857984], - ["cup", "cup", null, "volume", false, true, 0.0002365882365], - ["dalton", "Da", ["u"], "mass", false, false, 1.66053886282828e-27], - ["day", "d", ["day"], "time", false, true, 86400], - ["degree", "°", null, "angle", false, false, 0.0174532925199433], - ["degrees Rankine", "Rank", null, "temperature", false, true, 0.555555555555556], - ["dyne", "dyn", ["dy"], "force", false, true, 0.00001], - ["electronvolt", "eV", ["ev"], "energy", false, true, 1.60217656514141], - ["ell", "ell", null, "length", false, true, 1.143], - ["erg", "erg", ["e"], "energy", false, true, 1e-7], - ["farad", "F", null, "electric_capacitance", true, false, 1], - ["fluid ounce", "oz", null, "volume", false, true, 0.0000295735295625], - ["foot", "ft", null, "length", false, true, 0.3048], - ["foot-pound", "flb", null, "energy", false, true, 1.3558179483314], - ["gal", "Gal", null, "acceleration", false, false, 0.01], - ["gallon", "gal", null, "volume", false, true, 0.003785411784], - ["gauss", "G", ["ga"], "magnetic_flux_density", false, true, 1], - ["grain", "grain", null, "mass", false, true, 0.0000647989], - ["gram", "g", null, "mass", false, true, 0.001], - ["gray", "Gy", null, "absorbed_dose", true, false, 1], - ["gross registered ton", "GRT", ["regton"], "volume", false, true, 2.8316846592], - ["hectare", "ha", null, "area", false, true, 10000], - ["henry", "H", null, "inductance", true, false, 1], - ["hertz", "Hz", null, "frequency", true, false, 1], - ["horsepower", "HP", ["h"], "power", false, true, 745.69987158227], - ["horsepower-hour", "HPh", ["hh", "hph"], "energy", false, true, 2684519.538], - ["hour", "h", ["hr"], "time", false, true, 3600], - ["imperial gallon (U.K.)", "uk_gal", null, "volume", false, true, 0.00454609], - ["imperial hundredweight", "lcwt", ["uk_cwt", "hweight"], "mass", false, true, 50.802345], - ["imperial quart (U.K)", "uk_qt", null, "volume", false, true, 0.0011365225], - ["imperial ton", "brton", ["uk_ton", "LTON"], "mass", false, true, 1016.046909], - ["inch", "in", null, "length", false, true, 0.0254], - ["international acre", "uk_acre", null, "area", false, true, 4046.8564224], - ["IT calorie", "cal", null, "energy", false, true, 4.1868], - ["joule", "J", null, "energy", true, true, 1], - ["katal", "kat", null, "catalytic_activity", true, false, 1], - ["kelvin", "K", ["kel"], "temperature", true, true, 1], - ["kilogram", "kg", null, "mass", true, true, 1], - ["knot", "kn", null, "speed", false, true, 0.514444444444444], - ["light-year", "ly", null, "length", false, true, 9460730472580800], - ["litre", "L", ["l", "lt"], "volume", false, true, 0.001], - ["lumen", "lm", null, "luminous_flux", true, false, 1], - ["lux", "lx", null, "illuminance", true, false, 1], - ["maxwell", "Mx", null, "magnetic_flux", false, false, 1e-18], - ["measurement ton", "MTON", null, "volume", false, true, 1.13267386368], - ["meter per hour", "m/h", ["m/hr"], "speed", false, true, 0.00027777777777778], - ["meter per second", "m/s", ["m/sec"], "speed", true, true, 1], - ["meter per second squared", "m?s??", null, "acceleration", true, false, 1], - ["parsec", "pc", ["parsec"], "length", false, true, 30856775814671900], - ["meter squared per second", "m?/s", null, "kinematic_viscosity", true, false, 1], - ["metre", "m", null, "length", true, true, 1], - ["miles per hour", "mph", null, "speed", false, true, 0.44704], - ["millimetre of mercury", "mmHg", null, "pressure", false, false, 133.322], - ["minute", "?", null, "angle", false, false, 0.000290888208665722], - ["minute", "min", ["mn"], "time", false, true, 60], - ["modern teaspoon", "tspm", null, "volume", false, true, 0.000005], - ["mole", "mol", null, "amount_of_substance", true, false, 1], - ["morgen", "Morgen", null, "area", false, true, 2500], - ["n.u. of action", "?", null, "action", false, false, 1.05457168181818e-34], - ["n.u. of mass", "m?", null, "mass", false, false, 9.10938261616162e-31], - ["n.u. of speed", "c?", null, "speed", false, false, 299792458], - ["n.u. of time", "?/(me?c??)", null, "time", false, false, 1.28808866778687e-21], - ["nautical mile", "M", ["Nmi"], "length", false, true, 1852], - ["newton", "N", null, "force", true, true, 1], - ["œrsted", "Oe ", null, "magnetic_field_intensity", false, false, 79.5774715459477], - ["ohm", "Ω", null, "electric_resistance", true, false, 1], - ["ounce mass", "ozm", null, "mass", false, true, 0.028349523125], - ["pascal", "Pa", null, "pressure", true, false, 1], - ["pascal second", "Pa?s", null, "dynamic_viscosity", true, false, 1], - ["pferdestärke", "PS", null, "power", false, true, 735.49875], - ["phot", "ph", null, "illuminance", false, false, 0.0001], - ["pica (1/6 inch)", "pica", null, "length", false, true, 0.00035277777777778], - ["pica (1/72 inch)", "Pica", ["Picapt"], "length", false, true, 0.00423333333333333], - ["poise", "P", null, "dynamic_viscosity", false, false, 0.1], - ["pond", "pond", null, "force", false, true, 0.00980665], - ["pound force", "lbf", null, "force", false, true, 4.4482216152605], - ["pound mass", "lbm", null, "mass", false, true, 0.45359237], - ["quart", "qt", null, "volume", false, true, 0.000946352946], - ["radian", "rad", null, "angle", true, false, 1], - ["second", "?", null, "angle", false, false, 0.00000484813681109536], - ["second", "s", ["sec"], "time", true, true, 1], - ["short hundredweight", "cwt", ["shweight"], "mass", false, true, 45.359237], - ["siemens", "S", null, "electrical_conductance", true, false, 1], - ["sievert", "Sv", null, "equivalent_dose", true, false, 1], - ["slug", "sg", null, "mass", false, true, 14.59390294], - ["square ångström", "ang2", ["ang^2"], "area", false, true, 1e-20], - ["square foot", "ft2", ["ft^2"], "area", false, true, 0.09290304], - ["square inch", "in2", ["in^2"], "area", false, true, 0.00064516], - ["square light-year", "ly2", ["ly^2"], "area", false, true, 8.95054210748189e+31], - ["square meter", "m?", null, "area", true, true, 1], - ["square mile", "mi2", ["mi^2"], "area", false, true, 2589988.110336], - ["square nautical mile", "Nmi2", ["Nmi^2"], "area", false, true, 3429904], - ["square Pica", "Pica2", ["Picapt2", "Pica^2", "Picapt^2"], "area", false, true, 0.00001792111111111], - ["square yard", "yd2", ["yd^2"], "area", false, true, 0.83612736], - ["statute mile", "mi", null, "length", false, true, 1609.344], - ["steradian", "sr", null, "solid_angle", true, false, 1], - ["stilb", "sb", null, "luminance", false, false, 0.0001], - ["stokes", "St", null, "kinematic_viscosity", false, false, 0.0001], - ["stone", "stone", null, "mass", false, true, 6.35029318], - ["tablespoon", "tbs", null, "volume", false, true, 0.0000147868], - ["teaspoon", "tsp", null, "volume", false, true, 0.00000492892], - ["tesla", "T", null, "magnetic_flux_density", true, true, 1], - ["thermodynamic calorie", "c", null, "energy", false, true, 4.184], - ["ton", "ton", null, "mass", false, true, 907.18474], - ["tonne", "t", null, "mass", false, false, 1000], - ["U.K. pint", "uk_pt", null, "volume", false, true, 0.00056826125], - ["U.S. bushel", "bushel", null, "volume", false, true, 0.03523907], - ["U.S. oil barrel", "barrel", null, "volume", false, true, 0.158987295], - ["U.S. pint", "pt", ["us_pt"], "volume", false, true, 0.000473176473], - ["U.S. survey mile", "survey_mi", null, "length", false, true, 1609.347219], - ["U.S. survey/statute acre", "us_acre", null, "area", false, true, 4046.87261], - ["volt", "V", null, "voltage", true, false, 1], - ["watt", "W", null, "power", true, true, 1], - ["watt-hour", "Wh", ["wh"], "energy", false, true, 3600], - ["weber", "Wb", null, "magnetic_flux", true, false, 1], - ["yard", "yd", null, "length", false, true, 0.9144], - ["year", "yr", null, "time", false, true, 31557600] - ]; - - var binary_prefixes = { - Yi: ["yobi", 80, 1208925819614629174706176, "Yi", "yotta"], - Zi: ["zebi", 70, 1180591620717411303424, "Zi", "zetta"], - Ei: ["exbi", 60, 1152921504606846976, "Ei", "exa"], - Pi: ["pebi", 50, 1125899906842624, "Pi", "peta"], - Ti: ["tebi", 40, 1099511627776, "Ti", "tera"], - Gi: ["gibi", 30, 1073741824, "Gi", "giga"], - Mi: ["mebi", 20, 1048576, "Mi", "mega"], - ki: ["kibi", 10, 1024, "ki", "kilo"] - }; - - var unit_prefixes = { - Y: ["yotta", 1e+24, "Y"], - Z: ["zetta", 1e+21, "Z"], - E: ["exa", 1e+18, "E"], - P: ["peta", 1e+15, "P"], - T: ["tera", 1e+12, "T"], - G: ["giga", 1e+09, "G"], - M: ["mega", 1e+06, "M"], - k: ["kilo", 1e+03, "k"], - h: ["hecto", 1e+02, "h"], - e: ["dekao", 1e+01, "e"], - d: ["deci", 1e-01, "d"], - c: ["centi", 1e-02, "c"], - m: ["milli", 1e-03, "m"], - u: ["micro", 1e-06, "u"], - n: ["nano", 1e-09, "n"], - p: ["pico", 1e-12, "p"], - f: ["femto", 1e-15, "f"], - a: ["atto", 1e-18, "a"], - z: ["zepto", 1e-21, "z"], - y: ["yocto", 1e-24, "y"] - }; - - var from = null; - var to = null; - var base_from_unit = from_unit; - var base_to_unit = to_unit; - var from_multiplier = 1; - var to_multiplier = 1; - var alt; - - for (var i = 0; i < units.length; i++) { - alt = (units[i][2] === null) ? [] : units[i][2]; - - if (units[i][1] === base_from_unit || alt.indexOf(base_from_unit) >= 0) { - from = units[i]; - } - - if (units[i][1] === base_to_unit || alt.indexOf(base_to_unit) >= 0) { - to = units[i]; - } - } - - if (from === null) { - var from_binary_prefix = binary_prefixes[from_unit.substring(0, 2)]; - var from_unit_prefix = unit_prefixes[from_unit.substring(0, 1)]; - - if (from_unit.substring(0, 2) === 'da') { - from_unit_prefix = ["dekao", 1e+01, "da"]; - } - - if (from_binary_prefix) { - from_multiplier = from_binary_prefix[2]; - base_from_unit = from_unit.substring(2); - } - else if (from_unit_prefix) { - from_multiplier = from_unit_prefix[1]; - base_from_unit = from_unit.substring(from_unit_prefix[2].length); - } - - for (var j = 0; j < units.length; j++) { - alt = (units[j][2] === null) ? [] : units[j][2]; - - if (units[j][1] === base_from_unit || alt.indexOf(base_from_unit) >= 0) { - from = units[j]; - } - } - } - - if (to === null) { - var to_binary_prefix = binary_prefixes[to_unit.substring(0, 2)]; - var to_unit_prefix = unit_prefixes[to_unit.substring(0, 1)]; - - if (to_unit.substring(0, 2) === 'da') { - to_unit_prefix = ["dekao", 1e+01, "da"]; - } - - if (to_binary_prefix) { - to_multiplier = to_binary_prefix[2]; - base_to_unit = to_unit.substring(2); - } - else if (to_unit_prefix) { - to_multiplier = to_unit_prefix[1]; - base_to_unit = to_unit.substring(to_unit_prefix[2].length); - } - - for (var k = 0; k < units.length; k++) { - alt = (units[k][2] === null) ? [] : units[k][2]; - - if (units[k][1] === base_to_unit || alt.indexOf(base_to_unit) >= 0) { - to = units[k]; - } - } - } - - if (from === null || to === null) { - return luckysheet.formula.error.na; - } - - if (from[3] !== to[3]) { - return luckysheet.formula.error.na; - } - - return number * from[6] * from_multiplier / (to[6] * to_multiplier); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMX2MY2": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //第一个数组或数值区域 - var data_array_x = arguments[0]; - var array_x = []; - - if(luckysheet.getObjType(data_array_x) == "array"){ - if(luckysheet.getObjType(data_array_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array_x)){ - return luckysheet.formula.error.v; - } - - array_x = array_x.concat(luckysheet.func_methods.getDataArr(data_array_x, false)); - } - else if(luckysheet.getObjType(data_array_x) == "object" && data_array_x.startCell != null){ - array_x = array_x.concat(luckysheet.func_methods.getCellDataArr(data_array_x, "text", false)); - } - else{ - array_x.push(data_array_x); - } - - //第二个数组或数值区域 - var data_array_y = arguments[1]; - var array_y = []; - - if(luckysheet.getObjType(data_array_y) == "array"){ - if(luckysheet.getObjType(data_array_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array_y)){ - return luckysheet.formula.error.v; - } - - array_y = array_y.concat(luckysheet.func_methods.getDataArr(data_array_y, false)); - } - else if(luckysheet.getObjType(data_array_y) == "object" && data_array_y.startCell != null){ - array_y = array_y.concat(luckysheet.func_methods.getCellDataArr(data_array_y, "text", false)); - } - else{ - array_y.push(data_array_y); - } - - if(array_x.length != array_y.length){ - return luckysheet.formula.error.na; - } - - //array_x 和 array_y 只取数值 - var data_x = [], data_y = []; - - for(var i = 0; i < array_x.length; i++){ - var num_x = array_x[i]; - var num_y = array_y[i]; - - if(luckysheet.func_methods.isRealNum(num_x) && luckysheet.func_methods.isRealNum(num_y)){ - data_x.push(parseFloat(num_x)); - data_y.push(parseFloat(num_y)); - } - } - - //计算 - var sum = 0; - - for (var i = 0; i < data_x.length; i++) { - sum += Math.pow(data_x[i], 2) - Math.pow(data_y[i], 2); - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMX2PY2": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //第一个数组或数值区域 - var data_array_x = arguments[0]; - var array_x = []; - - if(luckysheet.getObjType(data_array_x) == "array"){ - if(luckysheet.getObjType(data_array_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array_x)){ - return luckysheet.formula.error.v; - } - - array_x = array_x.concat(luckysheet.func_methods.getDataArr(data_array_x, false)); - } - else if(luckysheet.getObjType(data_array_x) == "object" && data_array_x.startCell != null){ - array_x = array_x.concat(luckysheet.func_methods.getCellDataArr(data_array_x, "text", false)); - } - else{ - array_x.push(data_array_x); - } - - //第二个数组或数值区域 - var data_array_y = arguments[1]; - var array_y = []; - - if(luckysheet.getObjType(data_array_y) == "array"){ - if(luckysheet.getObjType(data_array_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array_y)){ - return luckysheet.formula.error.v; - } - - array_y = array_y.concat(luckysheet.func_methods.getDataArr(data_array_y, false)); - } - else if(luckysheet.getObjType(data_array_y) == "object" && data_array_y.startCell != null){ - array_y = array_y.concat(luckysheet.func_methods.getCellDataArr(data_array_y, "text", false)); - } - else{ - array_y.push(data_array_y); - } - - if(array_x.length != array_y.length){ - return luckysheet.formula.error.na; - } - - //array_x 和 array_y 只取数值 - var data_x = [], data_y = []; - - for(var i = 0; i < array_x.length; i++){ - var num_x = array_x[i]; - var num_y = array_y[i]; - - if(luckysheet.func_methods.isRealNum(num_x) && luckysheet.func_methods.isRealNum(num_y)){ - data_x.push(parseFloat(num_x)); - data_y.push(parseFloat(num_y)); - } - } - - //计算 - var sum = 0; - - for (var i = 0; i < data_x.length; i++) { - sum += Math.pow(data_x[i], 2) + Math.pow(data_y[i], 2); - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMXMY2": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //第一个数组或数值区域 - var data_array_x = arguments[0]; - var array_x = []; - - if(luckysheet.getObjType(data_array_x) == "array"){ - if(luckysheet.getObjType(data_array_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array_x)){ - return luckysheet.formula.error.v; - } - - array_x = array_x.concat(luckysheet.func_methods.getDataArr(data_array_x, false)); - } - else if(luckysheet.getObjType(data_array_x) == "object" && data_array_x.startCell != null){ - array_x = array_x.concat(luckysheet.func_methods.getCellDataArr(data_array_x, "text", false)); - } - else{ - array_x.push(data_array_x); - } - - //第二个数组或数值区域 - var data_array_y = arguments[1]; - var array_y = []; - - if(luckysheet.getObjType(data_array_y) == "array"){ - if(luckysheet.getObjType(data_array_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array_y)){ - return luckysheet.formula.error.v; - } - - array_y = array_y.concat(luckysheet.func_methods.getDataArr(data_array_y, false)); - } - else if(luckysheet.getObjType(data_array_y) == "object" && data_array_y.startCell != null){ - array_y = array_y.concat(luckysheet.func_methods.getCellDataArr(data_array_y, "text", false)); - } - else{ - array_y.push(data_array_y); - } - - if(array_x.length != array_y.length){ - return luckysheet.formula.error.na; - } - - //array_x 和 array_y 只取数值 - var data_x = [], data_y = []; - - for(var i = 0; i < array_x.length; i++){ - var num_x = array_x[i]; - var num_y = array_y[i]; - - if(luckysheet.func_methods.isRealNum(num_x) && luckysheet.func_methods.isRealNum(num_y)){ - data_x.push(parseFloat(num_x)); - data_y.push(parseFloat(num_y)); - } - } - - //计算 - var sum = 0; - - for (var i = 0; i < data_x.length; i++) { - sum += Math.pow(data_x[i] - data_y[i], 2); - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TRANSPOSE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //从其返回唯一值的数组或区域 - var data_array = arguments[0]; - var array = []; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - array = luckysheet.func_methods.getDataDyadicArr(data_array); - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - array = luckysheet.func_methods.getCellDataDyadicArr(data_array, "number"); - } - - array = array[0].map(function(col, a){ - return array.map(function(row){ - return row[a]; - }); - }); - - return array; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TREND": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //已知的 y 值集合 - var data_known_y = arguments[0]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = luckysheet.func_methods.getDataDyadicArr(data_known_y); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = luckysheet.func_methods.getCellDataDyadicArr(data_known_y, "text"); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_known_y)){ - return luckysheet.formula.error.v; - } - - var rowArr = []; - - rowArr.push(parseFloat(data_known_y)); - - known_y.push(rowArr); - } - - var known_y_rowlen = known_y.length; - var known_y_collen = known_y[0].length; - - for(var i = 0; i < known_y_rowlen; i++){ - for(var j = 0; j < known_y_collen; j++){ - if(!luckysheet.func_methods.isRealNum(known_y[i][j])){ - return luckysheet.formula.error.v; - } - - known_y[i][j] = parseFloat(known_y[i][j]); - } - } - - //可选 x 值集合 - var known_x = []; - for(var i = 1; i <= known_y_rowlen; i++){ - for(var j = 1; j <= known_y_collen; j++){ - var number = (i - 1) * known_y_collen + j; - known_x.push(number); - } - } - - if(arguments.length >= 2){ - var data_known_x = arguments[1]; - known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = luckysheet.func_methods.getDataDyadicArr(data_known_x); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = luckysheet.func_methods.getCellDataDyadicArr(data_known_x, "text"); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_known_x)){ - return luckysheet.formula.error.v; - } - - var rowArr = []; - - rowArr.push(parseFloat(data_known_x)); - - known_x.push(rowArr); - } - - for(var i = 0; i < known_x.length; i++){ - for(var j = 0; j < known_x[0].length; j++){ - if(!luckysheet.func_methods.isRealNum(known_x[i][j])){ - return luckysheet.formula.error.v; - } - - known_x[i][j] = parseFloat(known_x[i][j]); - } - } - } - - var known_x_rowlen = known_x.length; - var known_x_collen = known_x[0].length; - - //新 x 值 - var new_x = known_x; - - if(arguments.length >= 3){ - var data_new_x = arguments[2]; - new_x = []; - - if(luckysheet.getObjType(data_new_x) == "array"){ - if(luckysheet.getObjType(data_new_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_new_x)){ - return luckysheet.formula.error.v; - } - - new_x = luckysheet.func_methods.getDataDyadicArr(data_new_x); - } - else if(luckysheet.getObjType(data_new_x) == "object" && data_new_x.startCell != null){ - new_x = luckysheet.func_methods.getCellDataDyadicArr(data_new_x, "text"); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_new_x)){ - return luckysheet.formula.error.v; - } - - var rowArr = []; - - rowArr.push(parseFloat(data_new_x)); - - new_x.push(rowArr); - } - - for(var i = 0; i < new_x.length; i++){ - for(var j = 0; j < new_x[0].length; j++){ - if(!luckysheet.func_methods.isRealNum(new_x[i][j])){ - return luckysheet.formula.error.v; - } - - new_x[i][j] = parseFloat(new_x[i][j]); - } - } - } - - //逻辑值 - var const_b = true; - - if(arguments.length == 4){ - const_b = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(const_b)){ - return const_b; - } - } - - if(known_y_rowlen != known_x_rowlen || known_y_collen != known_x_collen){ - return luckysheet.formula.error.r; - } - - //计算 - function leastSquare(arr_x, arr_y){ - var xSum = 0, ySum = 0, xySum = 0, x2Sum = 0; - - for(var i = 0; i < arr_x.length; i++){ - for(var j = 0; j < arr_x[i].length; j++){ - xSum += arr_x[i][j]; - ySum += arr_y[i][j]; - xySum += arr_x[i][j] * arr_y[i][j]; - x2Sum += arr_x[i][j] * arr_x[i][j]; - } - } - - var n = arr_x.length * arr_x[0].length; - - var xMean = xSum / n; - var yMean = ySum / n; - var xyMean = xySum / n; - var x2Mean = x2Sum / n; - - var m = (xyMean - xMean * yMean) / (x2Mean - xMean * xMean); - var b = yMean - m * xMean; - - return [m, b]; - } - - var ls = leastSquare(known_x, known_y); - var m = ls[0]; - - if(const_b){ - var b = ls[1]; - } - else{ - var b = 0; - } - - var result = []; - - for(var i = 0; i < new_x.length; i++){ - for(var j = 0; j < new_x[i].length; j++){ - var x = new_x[i][j]; - var y = m * x + b; - - result.push(Math.round(y * 1000000000) / 1000000000); - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FREQUENCY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //频率数组 - var data_data_array = arguments[0]; - var data_array = []; - - if(luckysheet.getObjType(data_data_array) == "array"){ - if(luckysheet.getObjType(data_data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_data_array)){ - return luckysheet.formula.error.v; - } - - data_array = data_array.concat(luckysheet.func_methods.getDataArr(data_data_array, true)); - } - else if(luckysheet.getObjType(data_data_array) == "object" && data_data_array.startCell != null){ - data_array = data_array.concat(luckysheet.func_methods.getCellDataArr(data_data_array, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_data_array)){ - return luckysheet.formula.error.v; - } - - data_array.push(data_data_array); - } - - var data_array_n = []; - - for(var i = 0; i < data_array.length; i++){ - if(luckysheet.func_methods.isRealNum(data_array[i])){ - data_array_n.push(parseFloat(data_array[i])); - } - } - - //间隔数组 - var data_bins_array = arguments[1]; - var bins_array = []; - - if(luckysheet.getObjType(data_bins_array) == "array"){ - if(luckysheet.getObjType(data_bins_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_bins_array)){ - return luckysheet.formula.error.v; - } - - bins_array = bins_array.concat(luckysheet.func_methods.getDataArr(data_bins_array, true)); - } - else if(luckysheet.getObjType(data_bins_array) == "object" && data_bins_array.startCell != null){ - bins_array = bins_array.concat(luckysheet.func_methods.getCellDataArr(data_bins_array, "number", true)); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_bins_array)){ - return luckysheet.formula.error.v; - } - - bins_array.push(data_bins_array); - } - - var bins_array_n = []; - - for(var i = 0; i < bins_array.length; i++){ - if(luckysheet.func_methods.isRealNum(bins_array[i])){ - bins_array_n.push(parseFloat(bins_array[i])); - } - } - - //计算 - if(data_array_n.length == 0 && bins_array_n.length == 0){ - return [[0], [0]]; - } - else if(data_array_n.length == 0){ - var result = [[0]]; - - for(var i = 0; i < bins_array_n.length; i++){ - result.push([0]); - } - - return result; - } - else if(bins_array_n.length == 0){ - return [[0], [data_array_n.length]]; - } - else{ - bins_array_n.sort(function(a, b){ - return a - b; - }); - - var result = []; - - for(var i = 0; i < bins_array_n.length; i++){ - if(i == 0){ - var count = 0; - - for(var j = 0; j < data_array_n.length; j++){ - if(data_array_n[j] <= bins_array_n[0]){ - count++; - } - } - - result.push([count]); - } - else if(i == bins_array_n.length - 1){ - var count1 = 0, count2 = 0; - - for(var j = 0; j < data_array_n.length; j++){ - if(data_array_n[j] <= bins_array_n[i] && data_array_n[j] > bins_array_n[i - 1]){ - count1++; - } - - if(data_array_n[j] > bins_array_n[i]){ - count2++; - } - } - - result.push([count1]); - result.push([count2]); - } - else{ - var count = 0; - - for(var j = 0; j < data_array_n.length; j++){ - if(data_array_n[j] <= bins_array_n[i] && data_array_n[j] > bins_array_n[i - 1]){ - count++; - } - } - - result.push([count]); - } - } - - return result; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "GROWTH": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //已知的 y 值集合 - var data_known_y = arguments[0]; - var known_y = []; - - if(luckysheet.getObjType(data_known_y) == "array"){ - if(luckysheet.getObjType(data_known_y[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_y)){ - return luckysheet.formula.error.v; - } - - known_y = luckysheet.func_methods.getDataDyadicArr(data_known_y); - } - else if(luckysheet.getObjType(data_known_y) == "object" && data_known_y.startCell != null){ - known_y = luckysheet.func_methods.getCellDataDyadicArr(data_known_y, "text"); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_known_y)){ - return luckysheet.formula.error.v; - } - - var rowArr = []; - - rowArr.push(parseFloat(data_known_y)); - - known_y.push(rowArr); - } - - var known_y_rowlen = known_y.length; - var known_y_collen = known_y[0].length; - - for(var i = 0; i < known_y_rowlen; i++){ - for(var j = 0; j < known_y_collen; j++){ - if(!luckysheet.func_methods.isRealNum(known_y[i][j])){ - return luckysheet.formula.error.v; - } - - known_y[i][j] = parseFloat(known_y[i][j]); - } - } - - //可选 x 值集合 - var known_x = []; - for(var i = 1; i <= known_y_rowlen; i++){ - for(var j = 1; j <= known_y_collen; j++){ - var number = (i - 1) * known_y_collen + j; - known_x.push(number); - } - } - - if(arguments.length >= 2){ - var data_known_x = arguments[1]; - known_x = []; - - if(luckysheet.getObjType(data_known_x) == "array"){ - if(luckysheet.getObjType(data_known_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_known_x)){ - return luckysheet.formula.error.v; - } - - known_x = luckysheet.func_methods.getDataDyadicArr(data_known_x); - } - else if(luckysheet.getObjType(data_known_x) == "object" && data_known_x.startCell != null){ - known_x = luckysheet.func_methods.getCellDataDyadicArr(data_known_x, "text"); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_known_x)){ - return luckysheet.formula.error.v; - } - - var rowArr = []; - - rowArr.push(parseFloat(data_known_x)); - - known_x.push(rowArr); - } - - for(var i = 0; i < known_x.length; i++){ - for(var j = 0; j < known_x[0].length; j++){ - if(!luckysheet.func_methods.isRealNum(known_x[i][j])){ - return luckysheet.formula.error.v; - } - - known_x[i][j] = parseFloat(known_x[i][j]); - } - } - } - - var known_x_rowlen = known_x.length; - var known_x_collen = known_x[0].length; - - //新 x 值 - var new_x = known_x; - - if(arguments.length >= 3){ - var data_new_x = arguments[2]; - new_x = []; - - if(luckysheet.getObjType(data_new_x) == "array"){ - if(luckysheet.getObjType(data_new_x[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_new_x)){ - return luckysheet.formula.error.v; - } - - new_x = luckysheet.func_methods.getDataDyadicArr(data_new_x); - } - else if(luckysheet.getObjType(data_new_x) == "object" && data_new_x.startCell != null){ - new_x = luckysheet.func_methods.getCellDataDyadicArr(data_new_x, "text"); - } - else{ - if(!luckysheet.func_methods.isRealNum(data_new_x)){ - return luckysheet.formula.error.v; - } - - var rowArr = []; - - rowArr.push(parseFloat(data_new_x)); - - new_x.push(rowArr); - } - - for(var i = 0; i < new_x.length; i++){ - for(var j = 0; j < new_x[0].length; j++){ - if(!luckysheet.func_methods.isRealNum(new_x[i][j])){ - return luckysheet.formula.error.v; - } - - new_x[i][j] = parseFloat(new_x[i][j]); - } - } - } - - //逻辑值 - var const_b = true; - - if(arguments.length == 4){ - const_b = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(const_b)){ - return const_b; - } - } - - if(known_y_rowlen != known_x_rowlen || known_y_collen != known_x_collen){ - return luckysheet.formula.error.r; - } - - //计算 - function leastSquare(arr_x, arr_y){ - var xSum = 0, ySum = 0, xySum = 0, x2Sum = 0; - - for(var i = 0; i < arr_x.length; i++){ - for(var j = 0; j < arr_x[i].length; j++){ - xSum += arr_x[i][j]; - // ySum += arr_y[i][j]; - ySum += Math.log(arr_y[i][j]); - // xySum += arr_x[i][j] * arr_y[i][j]; - xySum += arr_x[i][j] * Math.log(arr_y[i][j]); - x2Sum += arr_x[i][j] * arr_x[i][j]; - } - } - - var n = arr_x.length * arr_x[0].length; - - var xMean = xSum / n; - var yMean = ySum / n; - var xyMean = xySum / n; - var x2Mean = x2Sum / n; - - var m = (xyMean - xMean * yMean) / (x2Mean - xMean * xMean); - var b = yMean - m * xMean; - - return [Math.exp(m), Math.exp(b)]; - } - - var ls = leastSquare(known_x, known_y); - var m = ls[0]; - - if(const_b){ - var b = ls[1]; - } - else{ - var b = 1; - } - - var result = []; - - for(var i = 0; i < new_x.length; i++){ - for(var j = 0; j < new_x[i].length; j++){ - var x = new_x[i][j]; - var y = b * Math.pow(m, x); - // var y = Math.exp(b + m * x); - - result.push(Math.round(y * 1000000000) / 1000000000); - } - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LINEST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return luckysheet.formula.error.v; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LOGEST": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return luckysheet.formula.error.v; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MDETERM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数组 - var data_array = arguments[0]; - var array = []; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - array = luckysheet.func_methods.getDataDyadicArr(data_array); - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - array = luckysheet.func_methods.getCellDataDyadicArr(data_array, "text"); - } - else{ - var rowArr = []; - rowArr.push(data_array); - array.push(rowArr); - } - - for(var i = 0; i < array.length; i++){ - for(var j = 0; j < array[i].length; j++){ - if(!luckysheet.func_methods.isRealNum(array[i][j])){ - return luckysheet.formula.error.v; - } - - array[i][j] = parseFloat(array[i][j]); - } - } - - if(array.length != array[0].length){ - return luckysheet.formula.error.v; - } - - //计算 - function Ma(a, n){ - var A; - var b = new Array(); - - if(n == 1){ - A = a[0][0]; - - return A; - } - else if(n == 2){ - A = a[0][0] * a[1][1] - a[0][1] * a[1][0]; - - return A; - } - else if(n == 3){ - A = a[0][0]*a[1][1]*a[2][2] + a[1][0]*a[2][1]*a[0][2] + a[2][0]*a[0][1]*a[1][2] - a[2][0]*a[1][1]*a[0][2] - a[0] [0]*a[2][1]*a[1][2] - a[1][0]*a[0][1]*a[2][2]; - - return A; - } - else{ - A = 0; - var c = new Array(); - var e = new Array(); - - for(var i = 0; i < n; i++){ - b[i] = a[i][0] * Math.pow(-1, i + 1 + 1); - } - - for(var i = 0; i < n; i++){ - e[i] = new Array(); - - for(var j = 0; j < n - 1; j++){ - e[i][j] = a[i][j + 1]; - } - } - - for(var i = 0; i < n; i++){ - for(var j = 0; j < n; j++){ - c[j] = new Array(); - - for(var k = 0; k < n - 1; k++){ - if(i > j){ - c[j][k] = e[j][k]; - } - else if(i < j){ - c[j - 1][k] = e[j][k]; - } - } - } - - A += b[i] * arguments.callee(c, n - 1); - } - - return A; - } - } - - return Ma(array, array.length); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MINVERSE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数组 - var data_array = arguments[0]; - var array = []; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - array = luckysheet.func_methods.getDataDyadicArr(data_array); - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - array = luckysheet.func_methods.getCellDataDyadicArr(data_array, "text"); - } - else{ - var rowArr = []; - rowArr.push(data_array); - array.push(rowArr); - } - - for(var i = 0; i < array.length; i++){ - for(var j = 0; j < array[i].length; j++){ - if(!luckysheet.func_methods.isRealNum(array[i][j])){ - return luckysheet.formula.error.v; - } - - array[i][j] = parseFloat(array[i][j]); - } - } - - if(array.length != array[0].length){ - return luckysheet.formula.error.v; - } - - //计算 - return luckysheet.matrix_methods.inverse(array); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "MMULT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数组1 - var data_array1 = arguments[0]; - var array1 = []; - - if(luckysheet.getObjType(data_array1) == "array"){ - if(luckysheet.getObjType(data_array1[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array1)){ - return luckysheet.formula.error.v; - } - - array1 = luckysheet.func_methods.getDataDyadicArr(data_array1); - } - else if(luckysheet.getObjType(data_array1) == "object" && data_array1.startCell != null){ - array1 = luckysheet.func_methods.getCellDataDyadicArr(data_array1, "text"); - } - else{ - var rowArr = []; - rowArr.push(data_array1); - array1.push(rowArr); - } - - for(var i = 0; i < array1.length; i++){ - for(var j = 0; j < array1[i].length; j++){ - if(!luckysheet.func_methods.isRealNum(array1[i][j])){ - return luckysheet.formula.error.v; - } - - array1[i][j] = parseFloat(array1[i][j]); - } - } - - //数组2 - var data_array2 = arguments[1]; - var array2 = []; - - if(luckysheet.getObjType(data_array2) == "array"){ - if(luckysheet.getObjType(data_array2[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array2)){ - return luckysheet.formula.error.v; - } - - array2 = luckysheet.func_methods.getDataDyadicArr(data_array2); - } - else if(luckysheet.getObjType(data_array2) == "object" && data_array2.startCell != null){ - array2 = luckysheet.func_methods.getCellDataDyadicArr(data_array2, "text"); - } - else{ - var rowArr = []; - rowArr.push(data_array2); - array2.push(rowArr); - } - - for(var i = 0; i < array2.length; i++){ - for(var j = 0; j < array2[i].length; j++){ - if(!luckysheet.func_methods.isRealNum(array2[i][j])){ - return luckysheet.formula.error.v; - } - - array2[i][j] = parseFloat(array2[i][j]); - } - } - - //计算 - if(array1[0].length != array2.length){ - return luckysheet.formula.error.v; - } - - var rowlen = array1.length; - var collen = array2[0].length; - - var result = []; - - for(var m = 0; m < rowlen; m++){ - var rowArr = []; - - for(var n = 0; n < collen; n++){ - var value = 0; - - for(var p = 0; p < array1[0].length; p++){ - value += array1[m][p] * array2[p][n]; - } - - rowArr.push(value); - } - - result.push(rowArr); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SUMPRODUCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //第一个数组 - //数组1 - var data_array1 = arguments[0]; - var array1 = []; - - if(luckysheet.getObjType(data_array1) == "array"){ - if(luckysheet.getObjType(data_array1[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array1)){ - return luckysheet.formula.error.v; - } - - array1 = luckysheet.func_methods.getDataDyadicArr(data_array1); - } - else if(luckysheet.getObjType(data_array1) == "object" && data_array1.startCell != null){ - array1 = luckysheet.func_methods.getCellDataDyadicArr(data_array1, "text"); - } - else{ - var rowArr = []; - rowArr.push(data_array1); - array1.push(rowArr); - } - - for(var i = 0; i < array1.length; i++){ - for(var j = 0; j < array1[i].length; j++){ - if(!luckysheet.func_methods.isRealNum(array1[i][j])){ - array1[i][j] = 0; - } - else{ - array1[i][j] = parseFloat(array1[i][j]); - } - } - } - - var rowlen = array1.length; - var collen = array1[0].length; - - if(arguments.length >= 2){ - for(var i = 1; i < arguments.length; i++){ - var data = arguments[i]; - var arr = []; - - if(luckysheet.getObjType(data) == "array"){ - if(luckysheet.getObjType(data[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data)){ - return luckysheet.formula.error.v; - } - - arr = luckysheet.func_methods.getDataDyadicArr(data); - } - else if(luckysheet.getObjType(data) == "object" && data.startCell != null){ - arr = luckysheet.func_methods.getCellDataDyadicArr(data, "text"); - } - else{ - var rowArr = []; - rowArr.push(data); - arr.push(rowArr); - } - - if(arr.length != rowlen || arr[0].length != collen){ - return luckysheet.formula.error.v; - } - - for(var m = 0; m < rowlen; m++){ - for(var n = 0; n < collen; n++){ - if(!luckysheet.func_methods.isRealNum(arr[m][n])){ - array1[m][n] = 0; - } - else{ - array1[m][n] = array1[m][n] * parseFloat(arr[m][n]); - } - } - } - } - } - - var sum = 0; - - for(var m = 0; m < rowlen; m++){ - for(var n = 0; n < collen; n++){ - sum += array1[m][n]; - } - } - - return sum; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISFORMULA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var data_cell = arguments[0]; - var cell; - - if(luckysheet.getObjType(data_cell) == "object" && data_cell.startCell != null){ - if(data_cell.data == null){ - return false; - } - - if(luckysheet.getObjType(data_cell.data) == "array"){ - cell = data_cell.data[0][0]; - } - else{ - cell = data_cell.data; - } - - if(cell != null && cell.f != null){ - return true; - } - else{ - return false; - } - } - else{ - return luckysheet.formula.error.v; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "CELL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格信息的类型 - var data_info_type = arguments[0]; - var info_type; - - if(luckysheet.getObjType(data_info_type) == "array"){ - if(luckysheet.getObjType(data_info_type[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_info_type)){ - return luckysheet.formula.error.v; - } - - info_type = data_info_type[0][0]; - } - else{ - info_type = data_info_type[0]; - } - } - else if(luckysheet.getObjType(data_info_type) == "object" && data_info_type.startCell != null){ - if(data_info_type.data == null){ - return luckysheet.formula.error.v; - } - else{ - if(luckysheet.getObjType(data_info_type.data) == "array"){ - return luckysheet.formula.error.v; - } - - info_type = data_info_type.data.v; - - if(luckysheet.func_methods.isRealNull(info_type)){ - return luckysheet.formula.error.v; - } - } - } - else{ - info_type = data_info_type; - } - - //单元格 - var data_reference = arguments[1]; - var reference; - - if(luckysheet.getObjType(data_reference) == "object" && data_reference.startCell != null){ - reference = data_reference.startCell; - } - else{ - return luckysheet.formula.error.v; - } - - if(["address", "col", "color", "contents", "filename", "format", "parentheses", "prefix", "protect", "row", "type", "width"].indexOf(info_type) == -1){ - return luckysheet.formula.error.v; - } - - var file = luckysheet.getluckysheetfile()[luckysheet.sheetmanage.getSheetIndex(luckysheet.currentSheetIndex)]; - - var cellrange = luckysheet.formula.getcellrange(reference); - var row_index = cellrange.row[0]; - var col_index = cellrange.column[0]; - - switch(info_type){ - case "address": - return reference; - break; - case "col": - return col_index + 1; - break; - case "color": - return 0; - break; - case "contents": - if(luckysheet.flowdata[row_index][col_index] == null || luckysheet.flowdata[row_index][col_index].v == null || luckysheet.flowdata[row_index][col_index].v ==""){ - return 0; - } - - return luckysheet.flowdata[row_index][col_index].v; - break; - case "filename": - return file.name; - break; - case "format": - if(luckysheet.flowdata[row_index][col_index] == null || luckysheet.flowdata[row_index][col_index].ct == null){ - return "G"; - } - - return luckysheet.flowdata[row_index][col_index].ct.fa; - break; - case "parentheses": - if(luckysheet.flowdata[row_index][col_index] == null || luckysheet.flowdata[row_index][col_index].v == null || luckysheet.flowdata[row_index][col_index].v ==""){ - return 0; - } - - if(luckysheet.flowdata[row_index][col_index].v > 0){ - return 1; - } - else{ - return 0; - } - break; - case "prefix": - if(luckysheet.flowdata[row_index][col_index] == null || luckysheet.flowdata[row_index][col_index].ht == null || luckysheet.flowdata[row_index][col_index].v == null || luckysheet.flowdata[row_index][col_index].v ==""){ - return ""; - } - - if(luckysheet.flowdata[row_index][col_index].ht == 0){//居中对齐 - return "^"; - } - else if(luckysheet.flowdata[row_index][col_index].ht == 1){//左对齐 - return "'"; - } - else if(luckysheet.flowdata[row_index][col_index].ht == 2){//右对齐 - return '"'; - } - else{ - return ""; - } - break; - case "protect": - return 0; - break; - case "row": - return row_index + 1; - break; - case "type": - if(luckysheet.flowdata[row_index][col_index] == null || luckysheet.flowdata[row_index][col_index].v == null || luckysheet.flowdata[row_index][col_index].v ==""){ - return "b"; - } - - return "l"; - break; - case "width": - var cfg = file.config; - - if(cfg["columlen"] != null && col_index in cfg["columlen"]){ - return cfg["columlen"][col_index]; - } - - return luckysheet.defaultcollen; - break; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "NA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - return luckysheet.formula.error.na; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ERROR_TYPE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_error_val = arguments[0]; - var error_val; - - if(luckysheet.getObjType(data_error_val) == "array"){ - if(luckysheet.getObjType(data_error_val[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_error_val)){ - return luckysheet.formula.error.v; - } - - error_val = data_error_val[0][0]; - } - else{ - error_val = data_error_val[0]; - } - } - else if(luckysheet.getObjType(data_error_val) == "object" && data_error_val.startCell != null){ - if(data_error_val.data == null){ - return luckysheet.formula.error.na; - } - - if(luckysheet.getObjType(data_error_val.data) == "array"){ - error_val = data_error_val.data[0][0]; - - if(error_val == null || luckysheet.func_methods.isRealNull(error_val.v)){ - return luckysheet.formula.error.na; - } - - error_val = error_val.v; - } - else{ - if(luckysheet.func_methods.isRealNull(data_error_val.data.v)){ - return luckysheet.formula.error.na; - } - - error_val = data_error_val.data.v; - } - } - else{ - error_val = data_error_val; - } - - var error_obj = { - "#NULL!": 1, - "#DIV/0!": 2, - "#VALUE!": 3, - "#REF!": 4, - "#NAME?": 5, - "#NUM!": 6, - "#N/A": 7, - "#GETTING_DATA": 8 - } - - if(error_val in error_obj){ - return error_obj[error_val]; - } - else{ - return luckysheet.formula.error.na; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISBLANK": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_error_val = arguments[0]; - var error_val; - - if(luckysheet.getObjType(data_error_val) == "object" && data_error_val.startCell != null){ - if(data_error_val.data == null){ - return true; - } - else{ - return false; - } - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISERR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return true; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return false; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(["#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISERROR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return true; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return false; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISLOGICAL": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return false - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return false; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISNA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return false; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return false; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(value.toString() == "#N/A"){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISNONTEXT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return true; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return true; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ - return true; - } - else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ - return true; - } - else if(luckysheet.func_methods.isRealNum(value)){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISNUMBER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return false; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return false; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(luckysheet.func_methods.isRealNum(value)){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISREF": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - if(luckysheet.getObjType(arguments[0]) == "object" && arguments[0].startCell != null){ - return true; - } - else{ - return false; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "ISTEXT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return false; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return false; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ - return false; - } - else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ - return false; - } - else if(luckysheet.func_methods.isRealNum(value)){ - return false; - } - else{ - return true; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TYPE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - return 64; - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - return 16; - } - - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return 1; - } - - value = data_value.data.v; - } - else{ - value = data_value; - } - - if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ - return 16; - } - else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ - return 4; - } - else if(luckysheet.func_methods.isRealNum(value)){ - return 1; - } - else{ - return 2; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "N": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //单元格 - var data_value = arguments[0]; - var value; - - if(luckysheet.getObjType(data_value) == "array"){ - if(luckysheet.getObjType(data_value[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_value)){ - return luckysheet.formula.error.v; - } - - value = data_value[0][0]; - } - else{ - value = data_value[0]; - } - } - else if(luckysheet.getObjType(data_value) == "object" && data_value.startCell != null){ - if(luckysheet.getObjType(data_value.data) == "array"){ - value = data_value.data[0][0]; - - if(value == null || luckysheet.func_methods.isRealNull(value.v)){ - return 0; - } - - value = value.v; - } - else{ - if(data_value.data == null || luckysheet.func_methods.isRealNull(data_value.data.v)){ - return 0; - } - - value = data_value.data.v; - } - } - else{ - value = data_value; - } - - if(["#N/A", "#VALUE!", "#REF!", "#DIV/0!", "#NUM!", "#NAME?", "#NULL!"].indexOf(value) > -1){ - return value; - } - else if(value.toString().toLowerCase() == "true" || value.toString().toLowerCase() == "false"){ - if(value.toString().toLowerCase() == "true"){ - return 1; - } - else{ - return 0; - } - } - else if(luckysheet.func_methods.isRealNum(value)){ - return parseFloat(value); - } - else{ - return 0; - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TO_DATE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var value = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - if(!luckysheet.func_methods.isRealNum(value)){ - return luckysheet.formula.error.v; - } - - value = parseFloat(value); - - return luckysheet.mask.update("yyyy-mm-dd", value); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TO_PURE_NUMBER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var value = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - if(moment(value).isValid()){ - return luckysheet.mask.genarate(value)[2]; - } - else{ - return numeral(value).value() == null ? value : numeral(value).value(); - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TO_TEXT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var value = luckysheet.func_methods.getFirstValue(arguments[0], "text"); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - return luckysheet.mask.update("@", value); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TO_DOLLARS": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var value = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - if(!luckysheet.func_methods.isRealNum(value)){ - return luckysheet.formula.error.v; - } - - value = parseFloat(value); - - return luckysheet.mask.update("$ 0.00", value); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TO_PERCENT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数字 - var value = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(value)){ - return value; - } - - if(!luckysheet.func_methods.isRealNum(value)){ - return luckysheet.formula.error.v; - } - - value = parseFloat(value); - - return luckysheet.mask.update("0%", value); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DGET": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - if (resultIndexes.length === 0) { - return luckysheet.formula.error.v; - } - - if (resultIndexes.length > 1) { - return luckysheet.formula.error.nm; - } - - return targetFields[resultIndexes[0]]; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DMAX": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var maxValue = targetFields[resultIndexes[0]]; - - for (var i = 1; i < resultIndexes.length; i++) { - if (maxValue < targetFields[resultIndexes[i]]) { - maxValue = targetFields[resultIndexes[i]]; - } - } - - return maxValue; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DMIN": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = findField(database, field); - targetFields = rest(database[index]); - } - else { - targetFields = rest(database[field]); - } - - var minValue = targetFields[resultIndexes[0]]; - - for (var i = 1; i < resultIndexes.length; i++) { - if (minValue > targetFields[resultIndexes[i]]) { - minValue = targetFields[resultIndexes[i]]; - } - } - - return minValue; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DAVERAGE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var sum = 0; - - for (var i = 0; i < resultIndexes.length; i++) { - sum += targetFields[resultIndexes[i]]; - } - - return resultIndexes.length === 0 ? luckysheet.formula.error.d : sum / resultIndexes.length; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DCOUNT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - return window.luckysheet_function.COUNT.f.apply(window.luckysheet_function.COUNT, targetValues); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DCOUNTA": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - return window.luckysheet_function.COUNTA.f.apply(window.luckysheet_function.COUNTA, targetValues); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DPRODUCT": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - targetValues = luckysheet.func_methods.compact(targetValues); - - var result = 1; - - for (i = 0; i < targetValues.length; i++) { - result *= targetValues[i]; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DSTDEV": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - targetValues = luckysheet.func_methods.compact(targetValues); - - return window.luckysheet_function.STDEVA.f.apply(window.luckysheet_function.STDEVA, targetValues); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DSTDEVP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - targetValues = luckysheet.func_methods.compact(targetValues); - - return window.luckysheet_function.STDEVP.f.apply(window.luckysheet_function.STDEVP, targetValues); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DSUM": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - targetValues = luckysheet.func_methods.compact(targetValues); - - var result = 0; - - for (i = 0; i < targetValues.length; i++) { - result += targetValues[i]; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DVAR": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - targetValues = luckysheet.func_methods.compact(targetValues); - - return window.luckysheet_function.VAR_S.f.apply(window.luckysheet_function.VAR_S, targetValues); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DVARP": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //数据库的单元格区域 - var data_database = arguments[0]; - var database = []; - - if(luckysheet.getObjType(data_database) == "object" && data_database.startCell != null){ - if(data_database.data == null){ - return luckysheet.formula.error.v; - } - - database = luckysheet.func_methods.getCellDataDyadicArr(data_database, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - //列 - var field = luckysheet.func_methods.getFirstValue(arguments[1], "text"); - if(luckysheet.func_methods.valueIsError(field)){ - return field; - } - - if(luckysheet.func_methods.isRealNull(field)){ - return luckysheet.formula.error.v; - } - - //条件的单元格区域 - var data_criteria = arguments[2]; - var criteria = []; - - if(luckysheet.getObjType(data_criteria) == "object" && data_criteria.startCell != null){ - if(data_criteria.data == null){ - return luckysheet.formula.error.v; - } - - criteria = luckysheet.func_methods.getCellDataDyadicArr(data_criteria, "text"); - } - else{ - return luckysheet.formula.error.v; - } - - if (!luckysheet.func_methods.isRealNum(field) && luckysheet.getObjType(field) !== "string") { - return luckysheet.formula.error.v; - } - - var resultIndexes = luckysheet.func_methods.findResultIndex(database, criteria); - var targetFields = []; - - if (luckysheet.getObjType(field) === "string") { - var index = luckysheet.func_methods.findField(database, field); - targetFields = luckysheet.func_methods.rest(database[index]); - } - else { - targetFields = luckysheet.func_methods.rest(database[field]); - } - - var targetValues = []; - - for (var i = 0; i < resultIndexes.length; i++) { - targetValues[i] = targetFields[resultIndexes[i]]; - } - - targetValues = luckysheet.func_methods.compact(targetValues); - - return window.luckysheet_function.VAR_P.f.apply(window.luckysheet_function.VAR_P, targetValues); - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "LINESPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - var lineColor = arguments[1]; - var lineWidth = arguments[2]; - var normalValue = arguments[3]; - var normalColor = arguments[4]; - var maxSpot = arguments[5]; - var minSpot = arguments[6]; - var spotRadius = arguments[7]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - if(lineWidth==null){ - lineWidth = 1; - } - sparksetting["lineWidth"] = lineWidth; - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting["offsetY"] = lineWidth+1; - sparksetting.height = height-(lineWidth+1); - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - if(lineColor==null){ - lineColor = "#2ec7c9"; - } - sparkColorSetting("lineColor", lineColor); - //sparkColorSetting("fillColor", fillColor); - sparksetting["fillColor"] = 0; - - - - - //设置辅助线,可以支持min、max、avg、median等几个字符变量,或者具体的数值。 - if(!!normalValue){ - if(typeof(normalValue)=="string"){ - normalValue = normalValue.toLowerCase(); - var nv = null; - if(normalValue=="min"){ - nv = window.luckysheet_function.MIN.f({"data":dataformat}); - } - else if(normalValue=="max"){ - nv = window.luckysheet_function.MAX.f({"data":dataformat}); - } - else if(normalValue=="avg" || normalValue=="mean"){ - nv = window.luckysheet_function.AVERAGE.f({"data":dataformat}); - } - else if(normalValue=="median"){ - nv = window.luckysheet_function.MEDIAN.f({"data":dataformat}); - } - - if(!!nv){ - sparksetting["normalRangeMin"] = nv; - sparksetting["normalRangeMax"] = nv; - } - } - else{ - sparksetting["normalRangeMin"] = normalValue; - sparksetting["normalRangeMax"] = normalValue; - } - - } - - if(normalColor==null){ - normalColor = "#000"; - } - sparkColorSetting("normalRangeColor", normalColor); - - sparkColorSetting("maxSpotColor", maxSpot); - sparkColorSetting("minSpotColor", minSpot); - - if(spotRadius==null){ - spotRadius = "1.5"; - } - sparksetting["spotRadius"] = spotRadius; - - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - // { - // height:rowlen, - // width:firstcolumlen, - // normalRangeMin:6, - // normalRangeMax:6, - // normalRangeColor:"#000" - // } - //return ""; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "AREASPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - var lineColor = arguments[1]; - var fillColor = arguments[2]; - var lineWidth = arguments[3]; - var normalValue = arguments[4]; - var normalColor = arguments[5]; - // var maxSpot = arguments[5]; - // var minSpot = arguments[6]; - // var spotRadius = arguments[7]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - if(lineWidth==null){ - lineWidth = 1; - } - sparksetting["lineWidth"] = lineWidth; - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting["offsetY"] = lineWidth+1; - sparksetting.height = height-(lineWidth+1); - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - if(lineColor==null){ - lineColor = "#2ec7c9"; - } - sparkColorSetting("lineColor", lineColor); - sparkColorSetting("fillColor", fillColor); - // sparksetting["fillColor"] = 0; - - if(lineWidth==null){ - lineWidth = "1"; - } - sparksetting["lineWidth"] = lineWidth; - - //设置辅助线,可以支持min、max、avg、median等几个字符变量,或者具体的数值。 - if(!!normalValue){ - if(typeof(normalValue)=="string"){ - normalValue = normalValue.toLowerCase(); - var nv = null; - if(normalValue=="min"){ - nv = window.luckysheet_function.MIN.f({"data":dataformat}); - } - else if(normalValue=="max"){ - nv = window.luckysheet_function.MAX.f({"data":dataformat}); - } - else if(normalValue=="avg" || normalValue=="mean"){ - nv = window.luckysheet_function.AVERAGE.f({"data":dataformat}); - } - else if(normalValue=="median"){ - nv = window.luckysheet_function.MEDIAN.f({"data":dataformat}); - } - - if(!!nv){ - sparksetting["normalRangeMin"] = nv; - sparksetting["normalRangeMax"] = nv; - } - } - else{ - sparksetting["normalRangeMin"] = normalValue; - sparksetting["normalRangeMax"] = normalValue; - } - - } - - if(normalColor==null){ - normalColor = "#000"; - } - sparkColorSetting("normalRangeColor", normalColor); - - // sparkColorSetting("maxSpotColor", maxSpot); - // sparkColorSetting("minSpotColor", minSpot); - - // if(spotRadius==null){ - // spotRadius = "1.5"; - // } - // sparksetting["spotRadius"] = spotRadius; - - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - // { - // height:rowlen, - // width:firstcolumlen, - // normalRangeMin:6, - // normalRangeMax:6, - // normalRangeColor:"#000" - // } - //return ""; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "COLUMNSPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var barSpacing = arguments[1]; - var barColor = arguments[2]; - var negBarColor = arguments[3]; - var chartRangeMax = arguments[4]; - - ////具体实现 - sparksetting["type"] = "column"; - if(barSpacing==null){ - barSpacing = "1"; - } - sparksetting["barSpacing"] = barSpacing; - - if(barColor==null){ - barColor = "#fc5c5c"; - } - sparkColorSetting("barColor", barColor); - - if(negBarColor==null){ - negBarColor = "#97b552"; - } - sparkColorSetting("negBarColor", negBarColor); - - if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ - sparksetting["chartRangeMax"] = undefined; - } - else{ - sparksetting["chartRangeMax"] = chartRangeMax; - } - - var colorLists = luckysheet.formula.sparklinesColorMap(arguments); - if(!!colorLists){ - sparksetting["colorMap"] = colorLists; - } - ////具体实现 - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STACKCOLUMNSPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - //var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - var dataformat = []; - - var data = []; - if(rangeValue!=null && rangeValue.data!=null){ - data = rangeValue.data; - } - - if(luckysheet.getObjType(data) == "array"){ - data = luckysheet.formula.getPureValueByData(data); - } - else if(luckysheet.getObjType(data) == "object"){ - data = data.v; - - return [data]; - } - else{ - if(/\{.*?\}/.test(data)){ - data = data.replace(/\{/g, "[").replace(/\}/g, "]"); - } - data = eval('('+ data +')'); - } - - var stackconfig = arguments[1]; - var offsetY = data.length; - if(stackconfig==null || !!stackconfig){ - for(var c=0;c19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var barSpacing = arguments[2]; - var chartRangeMax = arguments[3]; - - ////具体实现 - sparksetting["type"] = "column"; - if(barSpacing==null){ - barSpacing = "1"; - } - sparksetting["barSpacing"] = barSpacing; - - if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ - sparksetting["chartRangeMax"] = undefined; - } - else{ - sparksetting["chartRangeMax"] = chartRangeMax; - } - - var colorLists = luckysheet.formula.sparklinesColorMap(arguments, 4); - if(!!colorLists){ - sparksetting["colorMap"] = colorLists; - } - ////具体实现 - - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BARSPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var barSpacing = arguments[1]; - var barColor = arguments[2]; - var negBarColor = arguments[3]; - var chartRangeMax = arguments[4]; - - ////具体实现 - sparksetting["type"] = "bar"; - if(barSpacing==null){ - barSpacing = "1"; - } - sparksetting["barSpacing"] = barSpacing; - - if(barColor==null){ - barColor = "#fc5c5c"; - } - sparkColorSetting("barColor", barColor); - - if(negBarColor==null){ - negBarColor = "#97b552"; - } - sparkColorSetting("negBarColor", negBarColor); - - if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ - sparksetting["chartRangeMax"] = undefined; - } - else{ - sparksetting["chartRangeMax"] = chartRangeMax; - } - - var colorLists = luckysheet.formula.sparklinesColorMap(arguments); - if(!!colorLists){ - sparksetting["colorMap"] = colorLists; - } - ////具体实现 - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "STACKBARSPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - //var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - var dataformat = []; - - var data = []; - if(rangeValue!=null && rangeValue.data!=null){ - data = rangeValue.data; - } - - if(luckysheet.getObjType(data) == "array"){ - data = luckysheet.formula.getPureValueByData(data); - } - else if(luckysheet.getObjType(data) == "object"){ - data = data.v; - return [data]; - } - else{ - if(/\{.*?\}/.test(data)){ - data = data.replace(/\{/g, "[").replace(/\}/g, "]"); - } - data = eval('('+ data +')'); - } - - var stackconfig = arguments[1]; - var offsetY = data.length; - if(stackconfig==null || !!stackconfig){ - for(var c=0;c19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var barSpacing = arguments[2]; - var chartRangeMax = arguments[3]; - - ////具体实现 - sparksetting["type"] = "bar"; - if(barSpacing==null){ - barSpacing = "1"; - } - sparksetting["barSpacing"] = barSpacing; - - if(chartRangeMax==null || chartRangeMax===false || typeof chartRangeMax !="number" ){ - sparksetting["chartRangeMax"] = undefined; - } - else{ - sparksetting["chartRangeMax"] = chartRangeMax; - } - - var colorLists = luckysheet.formula.sparklinesColorMap(arguments, 4); - if(!!colorLists){ - sparksetting["colorMap"] = colorLists; - } - ////具体实现 - - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "DISCRETESPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var thresholdValue = arguments[1]; - var barColor = arguments[2]; - var negBarColor = arguments[3]; - - ////具体实现 - sparksetting["type"] = "discrete"; - - if(thresholdValue==null){ - thresholdValue = 0; - } - sparksetting["thresholdValue"] = thresholdValue; - - if(barColor==null){ - barColor = "#2ec7c9"; - } - sparkColorSetting("lineColor", barColor); - - if(negBarColor==null){ - negBarColor = "#fc5c5c"; - } - sparkColorSetting("thresholdColor", negBarColor); - ////具体实现 - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "TRISTATESPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var barSpacing = arguments[1]; - var barColor = arguments[2]; - var negBarColor = arguments[3]; - var zeroBarColor = arguments[4]; - - ////具体实现 - sparksetting["type"] = "tristate"; - if(barSpacing==null){ - barSpacing = "1"; - } - sparksetting["barSpacing"] = barSpacing; - - if(barColor==null){ - barColor = "#fc5c5c"; - } - sparkColorSetting("barColor", barColor); - - if(negBarColor==null){ - negBarColor = "#97b552"; - } - sparkColorSetting("negBarColor", negBarColor); - - if(zeroBarColor==null){ - zeroBarColor = "#999"; - } - sparkColorSetting("zeroBarColor", zeroBarColor); - - var colorLists = luckysheet.formula.sparklinesColorMap(arguments); - if(!!colorLists){ - sparksetting["colorMap"] = colorLists; - } - ////具体实现 - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "PIESPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var offset = arguments[1]; - var borderWidth = arguments[2]; - var borderColor = arguments[3]; - - ////具体实现 - sparksetting["type"] = "pie"; - if(offset==null){ - offset = 0; - } - sparksetting["offset"] = offset; - - if(borderWidth==null){ - borderWidth = 0; - } - sparkColorSetting("borderWidth", borderWidth); - - if(borderColor==null){ - borderColor = "#97b552"; - } - sparkColorSetting("borderColor", borderColor); - - var colorLists = luckysheet.formula.sparklinesColorMap(arguments, 4); - if(!!colorLists){ - sparksetting["colorMap"] = colorLists; - } - ////具体实现 - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BOXSPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - var rangeValue = arguments[0]; - - //定义需要格式化data数据 - var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - var outlierIQR = arguments[1]; - var target = arguments[2]; - var spotRadius = arguments[3]; - - ////具体实现 - sparksetting["type"] = "box"; - if(outlierIQR==null){ - outlierIQR = 1.5; - } - sparksetting["outlierIQR"] = outlierIQR; - - if(target==null){ - target = 0; - } - else{ - sparkColorSetting("target", target); - } - - if(spotRadius==null){ - spotRadius = 1.5; - } - sparkColorSetting("spotRadius", spotRadius); - ////具体实现 - - var temp1 = luckysheet.sparkline.init(dataformat, sparksetting); - - return temp1; - } - catch (e) { - var err = e; - //计算错误检测 - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "BULLETSPLINES": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - var cell_r = window.luckysheetCurrentRow; - var cell_c = window.luckysheetCurrentColumn; - var cell_fp = window.luckysheetCurrentFunction; - //色表,接下来会用到 - var colorList = luckysheet.formula.colorList; - //var rangeValue = arguments[0]; - - //定义需要格式化data数据 - //var dataformat = luckysheet.formula.readCellDataToOneArray(rangeValue); - - //在下面获得该单元格的长度和宽度,同时考虑了合并单元格问题 - var cellSize = luckysheet.menuButton.getCellRealSize(luckysheet.flowdata, cell_r, cell_c); - var width = cellSize[0]; - var height = cellSize[1]; - - //开始进行sparklines的详细设置,宽和高为单元格的宽高。 - var sparksetting = {}; - - //设置sparklines图表的宽高,线图的高会随着粗细而超出单元格高度,所以减去一个量,设置offsetY或者offsetX为渲染偏移量,传给luckysheetDrawMain使用。默认为0。=LINESPLINES(D9:E24,3,5) - sparksetting.height = height; - sparksetting.width = width; - - //定义sparklines的通用色彩设置函数,可以设置 色表【colorList】索引数值 或者 具体颜色值 - var sparkColorSetting = function(attr, value){ - if(!!value){ - if(typeof(value)=="number"){ - if(value>19){ - value = value % 20; - } - value = colorList[value]; - } - sparksetting[attr] = value; - } - } - - ////具体实现 - var dataformat = []; - luckysheet_getValue(arguments); - - var data1 = luckysheet.formula.getValueByFuncData(arguments[0]); - var data2 = luckysheet.formula.getValueByFuncData(arguments[1]); - - dataformat.push(data1); - dataformat.push(data2); - - for(var i=2;i this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要排序的范围或数组 - var data_array = arguments[0]; - var array = [], rowlen = 1, collen = 1; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - for(var i = 0; i < data_array.length; i++){ - var rowArr = []; - - for(var j = 0; j < data_array[i].length; j++){ - var number = data_array[i][j]; - - rowArr.push(number); - } - - array.push(rowArr); - } - - rowlen = array.length; - collen = array[0].length; - } - else{ - for(var i = 0; i < data_array.length; i++){ - var number = data_array[i]; - - array.push(number); - } - - rowlen = array.length; - } - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - if(data_array.data != null){ - if(luckysheet.getObjType(data_array.data) == "array"){ - for(var i = 0; i < data_array.data.length; i++){ - var rowArr = []; - - for(var j = 0; j < data_array.data[i].length; j++){ - if(data_array.data[i][j] != null){ - var number = data_array.data[i][j].v; - - if(luckysheet.func_methods.isRealNull(number)){ - number = 0; - } - - rowArr.push(number); - } - else{ - rowArr.push(0); - } - } - - array.push(rowArr); - } - - rowlen = array.length; - collen = array[0].length; - } - else{ - var number = data_array.data.v; - - if(luckysheet.func_methods.isRealNull(number)){ - number = 0; - } - - array.push(number); - } - } - else{ - array.push(0); - } - } - else{ - var number = data_array; - - array.push(number); - } - - //表示要排序的行或列的数字(默认row1/col1) - var sort_index = 1; - if(arguments.length >= 2){ - sort_index = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(sort_index)){ - return sort_index; - } - - if(!luckysheet.func_methods.isRealNum(sort_index)){ - return luckysheet.formula.error.v; - } - - sort_index = parseInt(sort_index); - } - - //表示所需排序顺序的数字;1表示升序(默认),-1表示降序。 - var sort_order = 1; - if(arguments.length >= 3){ - sort_order = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(sort_order)){ - return sort_order; - } - - if(!luckysheet.func_methods.isRealNum(sort_order)){ - return luckysheet.formula.error.v; - } - - sort_order = Math.floor(parseFloat(sort_order)); - } - - //表示所需排序方向的逻辑值;按行排序为FALSE(默认),按列排序为TRUE。 - var by_col = false; - if(arguments.length == 4){ - by_col = luckysheet.func_methods.getCellBoolen(arguments[3]); - - if(luckysheet.func_methods.valueIsError(by_col)){ - return by_col; - } - } - - if(by_col){ - if(sort_index < 1 || sort_index > rowlen){ - return luckysheet.formula.error.v; - } - } - else{ - if(sort_index < 1 || sort_index > collen){ - return luckysheet.formula.error.v; - } - } - - if(sort_order != 1 && sort_order != -1){ - return luckysheet.formula.error.v; - } - - //计算 - var asc = function(x, y){ - if(luckysheet.getObjType(x) == "array"){ - x = x[sort_index - 1]; - } - - if(luckysheet.getObjType(y) == "array"){ - y = y[sort_index - 1]; - } - - if(!isNaN(x) && !isNaN(y)){ - return x - y; - } - else if(!isNaN(x)){ - return -1; - } - else if(!isNaN(y)){ - return 1; - } - else{ - if(x > y){ - return 1; - } - else if(x < y){ - return -1; - } - } - } - - var desc = function(x, y){ - if(luckysheet.getObjType(x) == "array"){ - x = x[sort_index - 1]; - } - - if(luckysheet.getObjType(y) == "array"){ - y = y[sort_index - 1]; - } - - if(!isNaN(x) && !isNaN(y)){ - return y - x; - } - else if(!isNaN(x)){ - return 1; - } - else if(!isNaN(y)){ - return -1; - } - else{ - if(x > y){ - return -1; - } - else if(x < y){ - return 1; - } - } - } - - if(by_col){ - array = array[0].map(function(col, a){ - return array.map(function(row){ - return row[a]; - }); - }); - - if(sort_order == 1){ - array.sort(asc); - } - - if(sort_order == -1){ - array.sort(desc); - } - - array = array[0].map(function(col, b){ - return array.map(function(row){ - return row[b]; - }); - }); - } - else{ - if(sort_order == 1){ - array.sort(asc); - } - - if(sort_order == -1){ - array.sort(desc); - } - } - - return array; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "FILTER": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要筛选的数组或范围 - var data_array = arguments[0]; - var array = []; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - array = luckysheet.func_methods.getDataDyadicArr(data_array); - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - array = luckysheet.func_methods.getCellDataDyadicArr(data_array, "number"); - } - else{ - var rowArr = []; - - rowArr.push(parseFloat(data_array)); - - array.push(rowArr); - } - - var rowlen = array.length, - collen = array[0].length; - - //布尔数组,其高度或宽度与数组相同 - var data_include = arguments[1]; - var include = []; - var type = "row"; //筛选方式 row - 行,col - 列 - - if(luckysheet.getObjType(data_include) == "array"){ - if(luckysheet.getObjType(data_include[0]) == "array"){ - if(!luckysheet.func_methods.isDyadicArr(data_include)){ - return luckysheet.formula.error.v; - } - - if(data_include.length > 1 && data_include[0].length > 1){ - return luckysheet.formula.error.v; - } - - if(data_include.length > 1){ - if(data_include.length != array.length){ - return luckysheet.formula.error.v; - } - - type = "row"; - - for(var i = 0; i < data_include.length; i++){ - var txt = data_include[i][0]; - - if(luckysheet.getObjType(txt) == "boolean"){ - - } - else if(luckysheet.getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ - if(txt.toLowerCase() == "true"){ - txt = true; - } - else if(txt.toLowerCase() == "false"){ - txt = false; - } - } - else if(luckysheet.func_methods.isRealNum(txt)){ - txt = parseFloat(txt); - - txt = txt == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - - include.push(txt); - } - } - - if(data_include[0].length > 1){ - if(data_include[0].length != array[0].length){ - return luckysheet.formula.error.v; - } - - type = "col"; - - for(var i = 0; i < data_include[0].length; i++){ - var txt = data_include[0][i]; - - if(luckysheet.getObjType(txt) == "boolean"){ - - } - else if(luckysheet.getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ - if(txt.toLowerCase() == "true"){ - txt = true; - } - else if(txt.toLowerCase() == "false"){ - txt = false; - } - } - else if(luckysheet.func_methods.isRealNum(txt)){ - txt = parseFloat(txt); - - txt = txt == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - - include.push(txt); - } - } - } - else{ - if(data_include.length != array[0].length){ - return luckysheet.formula.error.v; - } - - type = "col"; - - for(var i = 0; i < data_include.length; i++){ - var txt = data_include[i]; - - if(luckysheet.getObjType(txt) == "boolean"){ - - } - else if(luckysheet.getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ - if(txt.toLowerCase() == "true"){ - txt = true; - } - else if(txt.toLowerCase() == "false"){ - txt = false; - } - } - else if(luckysheet.func_methods.isRealNum(txt)){ - txt = parseFloat(txt); - - txt = txt == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - - include.push(txt); - } - } - } - else if(luckysheet.getObjType(data_include) == "object" && data_include.data != null && luckysheet.getObjType(data_include.data) == "array"){ - if(data_include.data.length > 1 && data_include.data[0].length > 1){ - return luckysheet.formula.error.v; - } - - if(data_include.data.length > 1){ - if(data_include.data.length != array.length){ - return luckysheet.formula.error.v; - } - - type = "row"; - - for(var i = 0; i < data_include.data.length; i++){ - var txt = data_include.data[i][0].v; - - if(luckysheet.func_methods.isRealNull(txt)){ - txt = 0; - } - - if(luckysheet.getObjType(txt) == "boolean"){ - - } - else if(luckysheet.getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ - if(txt.toLowerCase() == "true"){ - txt = true; - } - else if(txt.toLowerCase() == "false"){ - txt = false; - } - } - else if(luckysheet.func_methods.isRealNum(txt)){ - txt = parseFloat(txt); - - txt = txt == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - - include.push(txt); - } - } - - if(data_include.data[0].length > 1){ - if(data_include.data[0].length != array[0].length){ - return luckysheet.formula.error.v; - } - - type = "col"; - - for(var i = 0; i < data_include.data[0].length; i++){ - var txt = data_include.data[0][i].v; - - if(luckysheet.func_methods.isRealNull(txt)){ - txt = 0; - } - - if(luckysheet.getObjType(txt) == "boolean"){ - - } - else if(luckysheet.getObjType(txt) == "string" && (txt.toLowerCase() == "true" || txt.toLowerCase() == "false")){ - if(txt.toLowerCase() == "true"){ - txt = true; - } - else if(txt.toLowerCase() == "false"){ - txt = false; - } - } - else if(luckysheet.func_methods.isRealNum(txt)){ - txt = parseFloat(txt); - - txt = txt == 0 ? false : true; - } - else{ - return luckysheet.formula.error.v; - } - - include.push(txt); - } - } - } - else{ - return luckysheet.formula.error.v; - } - - //如果包含数组中的所有值都为空(filter不返回任何值),则返回的值 - var if_empty = ""; - if(arguments.length == 3){ - if_empty = luckysheet.func_methods.getFirstValue(arguments[2], "text"); - if(luckysheet.func_methods.valueIsError(if_empty)){ - return if_empty; - } - } - - //计算 - var result = []; - if(type == "row"){ - for(var i = 0; i < array.length; i++){ - if(include[i]){ - result.push(array[i]); - } - } - } - else{ - for(var i = 0; i < array.length; i++){ - var rowArr = []; - - for(var j = 0; j < array[0].length; j++){ - if(include[j]){ - rowArr.push(array[i][j]); - } - } - - if(rowArr.length > 0){ - result.push(rowArr); - } - } - } - - if(result.length == 0){ - return if_empty; - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "UNIQUE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //从其返回唯一值的数组或区域 - var data_array = arguments[0]; - var array = []; - - if(luckysheet.getObjType(data_array) == "array"){ - if(luckysheet.getObjType(data_array[0]) == "array" && !luckysheet.func_methods.isDyadicArr(data_array)){ - return luckysheet.formula.error.v; - } - - array = luckysheet.func_methods.getDataDyadicArr(data_array); - } - else if(luckysheet.getObjType(data_array) == "object" && data_array.startCell != null){ - array = luckysheet.func_methods.getCellDataDyadicArr(data_array, "number"); - } - else{ - var rowArr = []; - - rowArr.push(parseFloat(data_array)); - - array.push(rowArr); - } - - //逻辑值,指示如何比较;按行 = FALSE 或省略;按列 = TRUE - var by_col = false; - if(arguments.length >= 2){ - by_col = luckysheet.func_methods.getCellBoolen(arguments[1]); - - if(luckysheet.func_methods.valueIsError(by_col)){ - return by_col; - } - } - - //逻辑值,仅返回唯一值中出现一次 = TRUE;包括所有唯一值 = FALSE 或省略 - var occurs_once = false; - if(arguments.length == 3){ - occurs_once = luckysheet.func_methods.getCellBoolen(arguments[2]); - - if(luckysheet.func_methods.valueIsError(occurs_once)){ - return occurs_once; - } - } - - //计算 - if(by_col){ - array = array[0].map(function(col, a){ - return array.map(function(row){ - return row[a]; - }); - }); - - var strObj = {}, strArr = []; - var allUnique = []; - - for(var i = 0; i < array.length; i++){ - var str = ''; - - for(var j = 0; j < array[i].length; j++){ - str += array[i][j].toString() + "|||"; - } - - strArr.push(str); - - if(!(str in strObj)){ - strObj[str] = 0; - - allUnique.push(array[i]); - } - } - - if(occurs_once){ - var oneUnique = []; - - for(var i = 0; i < strArr.length; i++){ - if(strArr.indexOf(strArr[i]) == strArr.lastIndexOf(strArr[i])){ - oneUnique.push(array[i]); - } - } - - oneUnique = oneUnique[0].map(function(col, a){ - return oneUnique.map(function(row){ - return row[a]; - }); - }); - - return oneUnique; - } - else{ - allUnique = allUnique[0].map(function(col, a){ - return allUnique.map(function(row){ - return row[a]; - }); - }); - - return allUnique; - } - } - else{ - var strObj = {}, strArr = []; - var allUnique = []; - - for(var i = 0; i < array.length; i++){ - var str = ''; - - for(var j = 0; j < array[i].length; j++){ - str += array[i][j].toString() + "|||"; - } - - strArr.push(str); - - if(!(str in strObj)){ - strObj[str] = 0; - - allUnique.push(array[i]); - } - } - - if(occurs_once){ - var oneUnique = []; - - for(var i = 0; i < strArr.length; i++){ - if(strArr.indexOf(strArr[i]) == strArr.lastIndexOf(strArr[i])){ - oneUnique.push(array[i]); - } - } - - return oneUnique; - } - else{ - return allUnique; - } - } - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "RANDARRAY": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要返回的行数 - var rows = 1; - if(arguments.length >= 1){ - rows = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rows)){ - return rows; - } - - if(!luckysheet.func_methods.isRealNum(rows)){ - return luckysheet.formula.error.v; - } - - rows = parseInt(rows); - } - - //要返回的列数 - var cols = 1; - if(arguments.length == 2){ - cols = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(cols)){ - return cols; - } - - if(!luckysheet.func_methods.isRealNum(cols)){ - return luckysheet.formula.error.v; - } - - cols = parseInt(cols); - } - - if(rows <= 0 || cols <= 0){ - return luckysheet.formula.error.v; - } - - //计算 - var result = []; - - for(var i = 0; i < rows; i++){ - var result_row = []; - - for(var j = 0; j < cols; j++){ - result_row.push(Math.random().toFixed(9)); - } - - result.push(result_row); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - "SEQUENCE": function() { - //必要参数个数错误检测 - if (arguments.length < this.m[0] || arguments.length > this.m[1]) { - return luckysheet.formula.error.na; - } - - //参数类型错误检测 - for (var i = 0; i < arguments.length; i++) { - var p = luckysheet.formula.errorParamCheck(this.p, arguments[i], i); - - if (!p[0]) { - return luckysheet.formula.error.v; - } - } - - try { - //要返回的行数 - var rows = luckysheet.func_methods.getFirstValue(arguments[0]); - if(luckysheet.func_methods.valueIsError(rows)){ - return rows; - } - - if(!luckysheet.func_methods.isRealNum(rows)){ - return luckysheet.formula.error.v; - } - - rows = parseInt(rows); - - //要返回的列数 - var cols = 1; - if(arguments.length >= 2){ - cols = luckysheet.func_methods.getFirstValue(arguments[1]); - if(luckysheet.func_methods.valueIsError(cols)){ - return cols; - } - - if(!luckysheet.func_methods.isRealNum(cols)){ - return luckysheet.formula.error.v; - } - - cols = parseInt(cols); - } - - //序列中的第一个数字 - var start = 1; - if(arguments.length >= 3){ - start = luckysheet.func_methods.getFirstValue(arguments[2]); - if(luckysheet.func_methods.valueIsError(start)){ - return start; - } - - if(!luckysheet.func_methods.isRealNum(start)){ - return luckysheet.formula.error.v; - } - - start = parseFloat(start); - } - - //序列中每个序列值的增量 - var step = 1; - if(arguments.length == 4){ - step = luckysheet.func_methods.getFirstValue(arguments[3]); - if(luckysheet.func_methods.valueIsError(step)){ - return step; - } - - if(!luckysheet.func_methods.isRealNum(step)){ - return luckysheet.formula.error.v; - } - - step = parseFloat(step); - } - - if(rows <= 0 || cols <= 0){ - return luckysheet.formula.error.v; - } - - //计算 - var result = []; - - for(var i = 0; i < rows; i++){ - var result_row = []; - - for(var j = 0; j < cols; j++){ - var number = start + step * (j + cols * i); - result_row.push(number); - } - - result.push(result_row); - } - - return result; - } - catch (e) { - var err = e; - err = luckysheet.formula.errorInfo(err); - return [luckysheet.formula.error.v, err]; - } - }, - }; - - for(var i = 0; i < luckysheet.functionlist.length; i++){ - var func = luckysheet.functionlist[i]; - func.f = luckysheet.functionImplementation[func.n]; - } - - luckysheet.matrix_methods = (function(){ - var matrix = ({}); - - var init = function init(matrix){ - var sylvester_matrix = function() {}; - - sylvester_matrix.precision = 1e-6; - - sylvester_matrix.create = function(elements) { - var M = new sylvester_matrix(); - return M.setElements(elements); - }; - var $M = sylvester_matrix.create; - - sylvester_matrix.I = function(n) { - var els = [], i = n, j; - while (i--) { j = n; - els[i] = []; - while (j--) { - els[i][j] = (i === j) ? 1 : 0; - } - } - return sylvester_matrix.create(els); - }; - - sylvester_matrix.prototype = { - e: function(i,j) { - if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; } - return this.elements[i-1][j-1]; - }, - dimensions: function() { - var cols = (this.elements.length === 0) ? 0 : this.elements[0].length; - return {rows: this.elements.length, cols: cols}; - }, - rows: function() { - return this.elements.length; - }, - cols: function() { - if (this.elements.length === 0) { return 0; } - return this.elements[0].length; - }, - eql: function(matrix) { - var M = matrix.elements || matrix; - if (!M[0] || typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } - if (this.elements.length === 0 || M.length === 0) { - return this.elements.length === M.length; - } - if (this.elements.length !== M.length) { return false; } - if (this.elements[0].length !== M[0].length) { return false; } - var i = this.elements.length, nj = this.elements[0].length, j; - while (i--) { j = nj; - while (j--) { - if (Math.abs(this.elements[i][j] - M[i][j]) > sylvester_matrix.precision) { return false; } - } - } - return true; - }, - dup: function() { - return sylvester_matrix.create(this.elements); - }, - map: function(fn, context) { - if (this.elements.length === 0) { - return sylvester_matrix.create([]); - } - var els = [], i = this.elements.length, nj = this.elements[0].length, j; - while (i--) { - j = nj; - els[i] = []; - while (j--) { - els[i][j] = fn.call(context, this.elements[i][j], i + 1, j + 1); - } - } - return sylvester_matrix.create(els); - }, - isSameSizeAs: function(matrix) { - var M = matrix.elements || matrix; - if (typeof(M[0][0]) === 'undefined') { - M = sylvester_matrix.create(M).elements; - } - if (this.elements.length === 0) { - return M.length === 0; - } - return (this.elements.length === M.length && this.elements[0].length === M[0].length); - }, - add: function(matrix) { - if (this.elements.length === 0) return this.map(function(x) { return x }); - var M = matrix.elements || matrix; - if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } - if (!this.isSameSizeAs(M)) { return null; } - return this.map(function(x, i, j) { return x + M[i-1][j-1]; }); - }, - subtract: function(matrix) { - if (this.elements.length === 0) return this.map(function(x) { return x }); - var M = matrix.elements || matrix; - if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } - if (!this.isSameSizeAs(M)) { return null; } - return this.map(function(x, i, j) { return x - M[i-1][j-1]; }); - }, - canMultiplyFromLeft: function(matrix) { - if (this.elements.length === 0) { return false; } - var M = matrix.elements || matrix; - if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } - // this.columns should equal matrix.rows - return (this.elements[0].length === M.length); - }, - multiply: function(matrix) { - if (this.elements.length === 0) { return null; } - if (!matrix.elements) { - return this.map(function(x) { return x * matrix; }); - } - var returnVector = matrix.modulus ? true : false; - var M = matrix.elements || matrix; - if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } - if (!this.canMultiplyFromLeft(M)) { return null; } - var i = this.elements.length, nj = M[0].length, j; - var cols = this.elements[0].length, c, elements = [], sum; - while (i--) { j = nj; - elements[i] = []; - while (j--) { c = cols; - sum = 0; - while (c--) { - sum += this.elements[i][c] * M[c][j]; - } - elements[i][j] = sum; - } - } - var M = sylvester_matrix.create(elements); - return returnVector ? M.col(1) : M; - }, - minor: function(a, b, c, d) { - if (this.elements.length === 0) { return null; } - var elements = [], ni = c, i, nj, j; - var rows = this.elements.length, cols = this.elements[0].length; - while (ni--) { i = c - ni - 1; - elements[i] = []; - nj = d; - while (nj--) { j = d - nj - 1; - elements[i][j] = this.elements[(a+i-1)%rows][(b+j-1)%cols]; - } - } - return sylvester_matrix.create(elements); - }, - transpose: function() { - if (this.elements.length === 0) return sylvester_matrix.create([]); - var rows = this.elements.length, i, cols = this.elements[0].length, j; - var elements = [], i = cols; - while (i--) { j = rows; - elements[i] = []; - while (j--) { - elements[i][j] = this.elements[j][i]; - } - } - return sylvester_matrix.create(elements); - }, - isSquare: function() { - var cols = (this.elements.length === 0) ? 0 : this.elements[0].length; - return (this.elements.length === cols); - }, - max: function() { - if (this.elements.length === 0) { return null; } - var m = 0, i = this.elements.length, nj = this.elements[0].length, j; - while (i--) { j = nj; - while (j--) { - if (Math.abs(this.elements[i][j]) > Math.abs(m)) { m = this.elements[i][j]; } - } - } - return m; - }, - indexOf: function(x) { - if (this.elements.length === 0) { return null; } - var index = null, ni = this.elements.length, i, nj = this.elements[0].length, j; - for (i = 0; i < ni; i++) { - for (j = 0; j < nj; j++) { - if (this.elements[i][j] === x) { return {i: i+1, j: j+1}; } - } - } - return null; - }, - diagonal: function() { - if (!this.isSquare) { return null; } - var els = [], n = this.elements.length; - for (var i = 0; i < n; i++) { - els.push(this.elements[i][i]); - } - return sylvester_matrix.create(els); - }, - toRightTriangular: function() { - if (this.elements.length === 0) return sylvester_matrix.create([]); - var M = this.dup(), els; - var n = this.elements.length, i, j, np = this.elements[0].length, p; - for (i = 0; i < n; i++) { - if (M.elements[i][i] === 0) { - for (j = i + 1; j < n; j++) { - if (M.elements[j][i] !== 0) { - els = []; - for (p = 0; p < np; p++) { - els.push(M.elements[i][p] + M.elements[j][p]); - } - M.elements[i] = els; - break; - } - } - } - if (M.elements[i][i] !== 0) { - for (j = i + 1; j < n; j++) { - var multiplier = M.elements[j][i] / M.elements[i][i]; - els = []; - for (p = 0; p < np; p++) { - // Elements with column numbers up to an including the number of the - // row that we're subtracting can safely be set straight to zero, - // since that's the point of this routine and it avoids having to - // loop over and correct rounding errors later - els.push(p <= i ? 0 : M.elements[j][p] - M.elements[i][p] * multiplier); - } - M.elements[j] = els; - } - } - } - return M; - }, - determinant: function() { - if (this.elements.length === 0) { return 1; } - if (!this.isSquare()) { return null; } - var M = this.toRightTriangular(); - var det = M.elements[0][0], n = M.elements.length; - for (var i = 1; i < n; i++) { - det = det * M.elements[i][i]; - } - return det; - }, - isSingular: function() { - return (this.isSquare() && this.determinant() === 0); - }, - trace: function() { - if (this.elements.length === 0) { return 0; } - if (!this.isSquare()) { return null; } - var tr = this.elements[0][0], n = this.elements.length; - for (var i = 1; i < n; i++) { - tr += this.elements[i][i]; - } - return tr; - }, - rank: function() { - if (this.elements.length === 0) { return 0; } - var M = this.toRightTriangular(), rank = 0; - var i = this.elements.length, nj = this.elements[0].length, j; - while (i--) { j = nj; - while (j--) { - if (Math.abs(M.elements[i][j]) > sylvester_matrix.precision) { rank++; break; } - } - } - return rank; - }, - augment: function(matrix) { - if (this.elements.length === 0) { return this.dup(); } - var M = matrix.elements || matrix; - if (typeof(M[0][0]) === 'undefined') { M = sylvester_matrix.create(M).elements; } - var T = this.dup(), cols = T.elements[0].length; - var i = T.elements.length, nj = M[0].length, j; - if (i !== M.length) { return null; } - while (i--) { - j = nj; - while (j--) { - T.elements[i][cols + j] = M[i][j]; - } - } - return T; - }, - inverse: function() { - if (this.elements.length === 0) { return null; } - if (!this.isSquare() || this.isSingular()) { return null; } - var n = this.elements.length, i= n, j; - var M = this.augment(sylvester_matrix.I(n)).toRightTriangular(); - var np = M.elements[0].length, p, els, divisor; - var inverse_elements = [], new_element; - // Sylvester.Matrix is non-singular so there will be no zeros on the - // diagonal. Cycle through rows from last to first. - while (i--) { - // First, normalise diagonal elements to 1 - els = []; - inverse_elements[i] = []; - divisor = M.elements[i][i]; - for (p = 0; p < np; p++) { - new_element = M.elements[i][p] / divisor; - els.push(new_element); - // Shuffle off the current row of the right hand side into the results - // array as it will not be modified by later runs through this loop - if (p >= n) { inverse_elements[i].push(new_element); } - } - M.elements[i] = els; - // Then, subtract this row from those above it to give the identity matrix - // on the left hand side - j = i; - while (j--) { - els = []; - for (p = 0; p < np; p++) { - els.push(M.elements[j][p] - M.elements[i][p] * M.elements[j][i]); - } - M.elements[j] = els; - } - } - return sylvester_matrix.create(inverse_elements); - }, - round: function() { - return this.map(function(x) { return Math.round(x); }); - }, - snapTo: function(x) { - return this.map(function(p) { - return (Math.abs(p - x) <= sylvester_matrix.precision) ? x : p; - }); - }, - setElements: function(els) { - var i, j, elements = els.elements || els; - if (elements[0] && typeof(elements[0][0]) !== 'undefined') { - i = elements.length; - this.elements = []; - while (i--) { j = elements[i].length; - this.elements[i] = []; - while (j--) { - this.elements[i][j] = elements[i][j]; - } - } - return this; - } - var n = elements.length; - this.elements = []; - for (i = 0; i < n; i++) { - this.elements.push([elements[i]]); - } - return this; - } - }; - - matrix.sylvester_matrix = sylvester_matrix; - } - init(matrix); - - return { - inverse: function(els){ - var M = matrix.sylvester_matrix.create(els); - return M.inverse().elements; - } - } - })(); - -})(luckysheet); \ No newline at end of file diff --git a/src/methods/get.js b/src/methods/get.js new file mode 100644 index 000000000..bd26baa0c --- /dev/null +++ b/src/methods/get.js @@ -0,0 +1,77 @@ +import { chatatABC } from '../utils/util'; +import Store from '../store'; + +function getSheetIndex(index) { + for (let i = 0; i < Store.luckysheetfile.length; i++) { + if (Store.luckysheetfile[i]["index"] == index) { + return i; + } + } + + return null; +} + +function getRangetxt(sheetIndex, range, currentIndex) { + let sheettxt = ""; + + if (currentIndex == null) { + currentIndex = Store.currentSheetIndex; + } + + if (sheetIndex != currentIndex) { + sheettxt = Store.luckysheetfile[getSheetIndex(sheetIndex)].name + "!"; + } + + let row0 = range["row"][0], row1 = range["row"][1]; + let column0 = range["column"][0], column1 = range["column"][1]; + + if (row0 == null && row1 == null) { + return sheettxt + chatatABC(column0) + ":" + chatatABC(column1); + } + else if (column0 == null && column1 == null) { + return sheettxt + (row0 + 1) + ":" + (row1 + 1); + } + else { + if (column0 == column1 && row0 == row1) { + return sheettxt + chatatABC(column0) + (row0 + 1); + } + else { + return sheettxt + chatatABC(column0) + (row0 + 1) + ":" + chatatABC(column1) + (row1 + 1); + } + } +} + +function getluckysheet_select_save() { + return Store.luckysheet_select_save; +} + +function getluckysheet_scroll_status() { + return Store.luckysheet_scroll_status; +} + +function getluckysheetfile() { + return Store.luckysheetfile; +} + +function getconfig() { + return Store.config; +} + +function getvisibledatarow() { + return Store.visibledatarow; +} + +function getvisibledatacolumn() { + return Store.visibledatacolumn; +} + +export { + getSheetIndex, + getRangetxt, + getluckysheet_select_save, + getluckysheet_scroll_status, + getluckysheetfile, + getconfig, + getvisibledatarow, + getvisibledatacolumn, +} \ No newline at end of file diff --git a/src/methods/set.js b/src/methods/set.js new file mode 100644 index 000000000..0bcda0556 --- /dev/null +++ b/src/methods/set.js @@ -0,0 +1,47 @@ +import { getSheetIndex } from '../methods/get'; +import Store from '../store'; + +function setluckysheet_select_save(v) { + Store.luckysheet_select_save = v; +} + +function setluckysheet_scroll_status(v) { + Store.luckysheet_scroll_status = v; +} + +function setluckysheetfile(d) { + Store.luckysheetfile = d; +} + +function setconfig(v) { + Store.config = v; + + if(Store.luckysheetfile != null){ + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = v; + } +} + +function setvisibledatarow(v) { + Store.visibledatarow = v; + + if(Store.luckysheetfile != null){ + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].visibledatarow = v; + } +} + +function setvisibledatacolumn(v) { + Store.visibledatacolumn = v; + + if(Store.luckysheetfile != null){ + Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].visibledatacolumn = v; + } +} + +export { + setluckysheet_select_save, + setluckysheet_scroll_status, + setluckysheetfile, + setconfig, + setvisibledatarow, + setvisibledatacolumn, +} \ No newline at end of file diff --git a/src/plugins/images/mario.jpg b/src/plugins/images/mario.jpg deleted file mode 100644 index 47b7902b97dec9467753b0cb31ea6f5284ef82b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66065 zcmeFYXH-++_bwO(Lcw;W=l1E&-2|M!dXDbuxwCG7Fzr4W z{=00z|Nc35o{pa30^>!dOU$$j8m<7&pQEEYPfy3dKu=G*I-GVMK!25i{l;zG3mj%o z8E^V=D!%yN9P&KwwaC2qg6NyU3{MnAo`Z)U@=B%&d=}vcD7-6_=Ejm4B_R zt8Zv*`rh2qh3@X@#r*8+9~+;ToWlN|#^DJ|f0qBQtgfw-cK7xV4v)zHj{l?AIRM@N zn6m$_*#Akdt2DjN)6>(@GyX@fbLT^7gYGIl!;RY)*mcbqpZam!RD64p^WKMoZ=Fmc zO6EkaXa1v?xJ8xmVx<45_TM!7zo%Hl|0~V@hhqPSUN`^?-8tIBqq_es_PUXUkEis}M3=)l3^_@%LqtIQaMPAMEw&Hrxe)$XcmR-q{#O>>41OkVs#{ zJ%t2eJ{@)_6EV1$M7N~cjbxzQBECui%S{y$z=Du0BjVo_FpDVDHKdAhtH*4~vYepX zAGE?x2y)qg%FJ^HV6>!goW?hRcwr;Jn(Zt+94B*_JSK|z6?6s=@(KwFL7ng5^1d>l zT{UJb{~_EB*u8Mov$jVR{u?J=?)G_lK~f{XJ>XhfwhD$=Kw=|+D4h4Hm#UURVbZV( z_%$eaX-M9?HTqpQRR@)i>Eu^q4U)}tVbc-zxPyboR6U6gInlCq<{N!kUt#E`mra;g z+s=aounZ{l`v&>_%ao61W72ajetjTvQKqqwcWyo)E#Xfo^F+?r)%1F}Zda~Yk5(vR zQOzb|mt`dGdxFx}@+XQ=1fzpMQn%&+&eF21*E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%HQh zWxQxv7pNG^8l38N%q>RCO3R{EC|DNC>Mqz&cRu^K*;X*)@v58eK}PYA{TZ|0K)NBS zQ}l!g)ujw)zYwAeQf@`&`pUg&v?-g>uy87-lp|Jvf}R4N18h2XAQH65Ng_j!s!LGC zXqgQUlFm_qDcj`8BN-=Gm?N391bR}ofbdo<`mp8L*d>J=$Y^J9l+r4BVq2~(usOdQ z8e(`bEKD*jV3VNEsB-CA2R82}`ksHabPyZdg2!-OzxQfe3+^<>B==~oE4U1?xL-)Qq?hMUbC^KA2&I={g8HfQz-j)ZQ=;sPhJU^7dCxT*FB146t#F$ z+a8C0ioeC=cBxU>nS29aCiA^1?*>=U~cMj;DQI)o#RGqu*f8Jz=8}bJ;0p-bF+YX5O}up8o+f1}$y? diff --git a/src/plugins/js/jquery-ui.min.js b/src/plugins/js/jquery-ui.min.js index 8c459fd35..2b81c5bf9 100644 --- a/src/plugins/js/jquery-ui.min.js +++ b/src/plugins/js/jquery-ui.min.js @@ -1 +1 @@ -!function(){var t;t=function(M){M.ui=M.ui||{};M.ui.version="1.12.1";var n,i=0,l=Array.prototype.slice;M.cleanData=(n=M.cleanData,function(t){var e,i,s;for(s=0;null!=(i=t[s]);s++)try{(e=M._data(i,"events"))&&e.remove&&M(i).triggerHandler("remove")}catch(t){}n(t)}),M.widget=function(t,i,e){var s,n,o,a={},l=t.split(".")[0],h=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=M.Widget),M.isArray(e)&&(e=M.extend.apply(null,[{}].concat(e))),M.expr[":"][h.toLowerCase()]=function(t){return!!M.data(t,h)},M[l]=M[l]||{},s=M[l][t],n=M[l][t]=function(t,e){if(!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},M.extend(n,s,{version:e.version,_proto:M.extend({},e),_childConstructors:[]}),(o=new i).options=M.widget.extend({},o.options),M.each(e,function(e,o){M.isFunction(o)?a[e]=function(){function s(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=n,t=o.apply(this,arguments),this._super=e,this._superApply=i,t}}():a[e]=o}),n.prototype=M.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:l,widgetName:t,widgetFullName:h}),s?(M.each(s._childConstructors,function(t,e){var i=e.prototype;M.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),M.widget.bridge(t,n),n},M.widget.extend=function(t){for(var e,i,s=l.call(arguments,1),n=0,o=s.length;n",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=M(e||this.defaultElement||this)[0],this.element=M(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=M(),this.hoverable=M(),this.focusable=M(),this.classesElementLookup={},e!==this&&(M.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=M(e.style?e.ownerDocument:e.document||e),this.window=M(this.document[0].defaultView||this.document[0].parentWindow)),this.options=M.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:M.noop,_create:M.noop,_init:M.noop,destroy:function(){var i=this;this._destroy(),M.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:M.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return M.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=M.widget.extend({},this.options[t]),n=0;n

"),s=i.children()[0];return M("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.widthC(x(s),x(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),a.offset(M.extend(u,{using:t}))})},M.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=t.left-e.collisionPosition.marginLeft,l=n-a,h=a+e.collisionWidth-o-n;e.collisionWidth>o?0o?0?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")}),M.fn.labels=function(){var t,e,i,s,n;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(i=this.attr("id"))&&(n=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+M.ui.escapeSelector(i)+"']",s=s.add(n.find(e).addBack(e))),this.pushStack(s))},M.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&M(this).removeAttr("id")})}});var e,t,o=/ui-corner-([a-z]){2,6}/g;M.widget("ui.controlgroup",{version:"1.12.1",defaultElement:""),s=i.children()[0];return M("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.widthC(x(s),x(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),a.offset(M.extend(u,{using:t}))})},M.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=t.left-e.collisionPosition.marginLeft,l=n-a,h=a+e.collisionWidth-o-n;e.collisionWidth>o?0o?0?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")}),M.fn.labels=function(){var t,e,i,s,n;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(i=this.attr("id"))&&(n=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+M.ui.escapeSelector(i)+"']",s=s.add(n.find(e).addBack(e))),this.pushStack(s))},M.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&M(this).removeAttr("id")})}});var e,t,o=/ui-corner-([a-z]){2,6}/g;M.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"
",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var a=this,l=[];M.each(this.options.items,function(n,t){var e,o={};if(t)return"controlgroupLabel"===n?((e=a.element.find(t)).each(function(){var t=M(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("")}),a._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(l=l.concat(e.get()))):void(M.fn[n]&&(o=a["_"+n+"Options"]?a["_"+n+"Options"]("middle"):{classes:{}},a.element.find(t).each(function(){var t=M(this),e=t[n]("instance"),i=M.widget.extend({},o);if("button"!==n||!t.parent(".ui-spinner").length){e||(e=t[n]()[n]("instance")),e&&(i.classes=a._resolveClassesValues(i.classes,e)),t[n](i);var s=t[n]("widget");M.data(s[0],"ui-controlgroup-data",e||t[n]("instance")),l.push(s[0])}})))}),this.childWidgets=M(M.unique(l)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=M(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return M.each(i,function(t){var e=s.options.classes[t]||"";e=M.trim(e.replace(o,"")),n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,this.options.onlyVisible&&(n=n.filter(":visible")),n.length&&(M.each(["first","last"],function(t,e){var i=n[e]().data("ui-controlgroup-data");if(i&&o["_"+i.widgetName+"Options"]){var s=o["_"+i.widgetName+"Options"](1===n.length?"only":e);s.classes=o._resolveClassesValues(s.classes,i),i.element[i.widgetName](s)}else o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}});M.widget("ui.checkboxradio",[M.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e,i=this,s=this._super()||{};return this._readType(),e=this.element.labels(),this.label=M(e[e.length-1]),this.label.length||M.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){i.originalLabel+=3===this.nodeType?M(this).text():this.outerHTML}),this.originalLabel&&(s.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(s.disabled=t),s},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||M.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+M.ui.escapeSelector(t)+"']";return t?(this.form.length?M(this.form[0].elements).filter(e):M(e).filter(function(){return 0===M(this).form().length})).not(this.element):M([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=M(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=M(""),this.iconSpace=M(" "),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var s;M.ui.checkboxradio;M.widget("ui.button",{version:"1.12.1",defaultElement:"
",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var a=this,l=[];M.each(this.options.items,function(n,t){var e,o={};if(t)return"controlgroupLabel"===n?((e=a.element.find(t)).each(function(){var t=M(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("")}),a._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(l=l.concat(e.get()))):void(M.fn[n]&&(o=a["_"+n+"Options"]?a["_"+n+"Options"]("middle"):{classes:{}},a.element.find(t).each(function(){var t=M(this),e=t[n]("instance"),i=M.widget.extend({},o);if("button"!==n||!t.parent(".ui-spinner").length){e||(e=t[n]()[n]("instance")),e&&(i.classes=a._resolveClassesValues(i.classes,e)),t[n](i);var s=t[n]("widget");M.data(s[0],"ui-controlgroup-data",e||t[n]("instance")),l.push(s[0])}})))}),this.childWidgets=M(M.unique(l)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=M(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return M.each(i,function(t){var e=s.options.classes[t]||"";e=M.trim(e.replace(o,"")),n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,this.options.onlyVisible&&(n=n.filter(":visible")),n.length&&(M.each(["first","last"],function(t,e){var i=n[e]().data("ui-controlgroup-data");if(i&&o["_"+i.widgetName+"Options"]){var s=o["_"+i.widgetName+"Options"](1===n.length?"only":e);s.classes=o._resolveClassesValues(s.classes,i),i.element[i.widgetName](s)}else o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}});M.widget("ui.checkboxradio",[M.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e,i=this,s=this._super()||{};return this._readType(),e=this.element.labels(),this.label=M(e[e.length-1]),this.label.length||M.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){i.originalLabel+=3===this.nodeType?M(this).text():this.outerHTML}),this.originalLabel&&(s.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(s.disabled=t),s},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||M.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+M.ui.escapeSelector(t)+"']";return t?(this.form.length?M(this.form[0].elements).filter(e):M(e).filter(function(){return 0===M(this).form().length})).not(this.element):M([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=M(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=M(""),this.iconSpace=M(" "),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var s;M.ui.checkboxradio;M.widget("ui.button",{version:"1.12.1",defaultElement:"